Closed
Bug 1247769
Opened 9 years ago
Closed 1 month ago
gdb is confused by nsPIDOMWindowInner/Outer
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: khuey, Unassigned)
References
Details
STR:
1. b nsGlobalWindow::RunTimeout
2. wait for a timeout to fire
3. p this->mOuterWindow.mRawPtr
4. p this->mOuterWindow.mRawPtr->mDocShell (this will fail)
5. p ((nsPIDOMWindow<nsISupports>*)this->mOuterWindow.mRawPtr)->mDocShell
Gdb is confused by nsPIDOMWindowOuter here, and doesn't seem to recognize it as a type. That may be due to https://sourceware.org/bugzilla/show_bug.cgi?id=14093
Is there some sort of pretty printing magic we can do here to hide the needed cast?
Flags: needinfo?(ttromey)
Flags: needinfo?(jimb)
Comment 1•9 years ago
|
||
I took a quick look at this. I think it is most likely a gcc bug.
It seems to me that nsPIDOMWindowOuter ought to exist somewhere in the debug info.
However a dwgrep script to find a non-declaration DIE shows no output:
dwgrep -e 'entry (?TAG_class_type) ?( (@AT_name == "nsPIDOMWindowOuter") !(@AT_declaration == true) )' ./obj-x86_64-unknown-linux-gnu/dist/bin/libxul.so
You can try this with another class (I used nsCSSScannerPosition) to see it working.
gdb generally ignores DW_AT_declaration classes, at least, IIRC, for the purpose of
building symbols and types.
Tomorrow I'll try to find the relevant gcc bug.
I don't think there is a particularly handy workaround.
You could make a convenience function but then you'd end up having to remember
to type it (like "print $_mumble(this->outerWindow)")
The new xmethod support doesn't, afaik, support simple references, just functions.
(I don't know if you could supply a phony operator-> here; maybe worth a try but
I'd be surprised)
Maybe there's some hack that could be done in the source to get gcc to emit a definition.
There's -fno-eliminate-unused-debug-types, but that's pretty heavy.
Flags: needinfo?(ttromey)
Updated•9 years ago
|
Flags: needinfo?(jimb)
Comment 2•9 years ago
|
||
This is related but not exactly the same:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12385
I'll file a new gcc bug report with some findings.
| Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Severity: normal → S3
Updated•1 month ago
|
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•