* Need help in understanding GDB stack trace
@ 2008-12-09 21:49 ying lcs
2008-12-10 23:28 ` Michael Snyder
0 siblings, 1 reply; 2+ messages in thread
From: ying lcs @ 2008-12-09 21:49 UTC (permalink / raw)
To: gdb
All,
I need help in understadning Gdb stack trace:
[Switching to Thread 0xb73b4700 (LWP 28041)]
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0xb5bfc9a6 in DefaultSerializeElementRule::serializeStart (this=0xa450e40,
domElement=0xa03e104, fd=0xa450ab0)
at /media/storage/working/content/serializer/src/DefaultSerializeElementRule.cpp:55
And here is my method:
void DefaultSerializeElementRule::serializeStart(nsIDOMElement*
domElement, FILE* fd) {
nsAutoString tagName;
domElement->GetTagName(tagName);
fprintf(fd, "<%s", NS_ConvertUTF16toUTF8(tagName).get());
// this is line 55:
serializeAttribute(domElement, fd);
}
I don't understand what is the meaning of :
0x00000000 in ?? ()
from the stack trace, both my domElement, fd are not null. So why my
program crashes?
Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Need help in understanding GDB stack trace
2008-12-09 21:49 Need help in understanding GDB stack trace ying lcs
@ 2008-12-10 23:28 ` Michael Snyder
0 siblings, 0 replies; 2+ messages in thread
From: Michael Snyder @ 2008-12-10 23:28 UTC (permalink / raw)
To: ying lcs; +Cc: gdb
ying lcs wrote:
> All,
>
> I need help in understadning Gdb stack trace:
>
> [Switching to Thread 0xb73b4700 (LWP 28041)]
> 0x00000000 in ?? ()
> (gdb) bt
> #0 0x00000000 in ?? ()
> #1 0xb5bfc9a6 in DefaultSerializeElementRule::serializeStart (this=0xa450e40,
> domElement=0xa03e104, fd=0xa450ab0)
> at /media/storage/working/content/serializer/src/DefaultSerializeElementRule.cpp:55
>
> And here is my method:
>
> void DefaultSerializeElementRule::serializeStart(nsIDOMElement*
> domElement, FILE* fd) {
>
> nsAutoString tagName;
>
> domElement->GetTagName(tagName);
>
> fprintf(fd, "<%s", NS_ConvertUTF16toUTF8(tagName).get());
> // this is line 55:
> serializeAttribute(domElement, fd);
>
> }
>
>
> I don't understand what is the meaning of :
> 0x00000000 in ?? ()
>
> from the stack trace, both my domElement, fd are not null. So why my
> program crashes?
Try this:
(gdb) frame 1
(gdb) print domElement->GetTagName
See whether the function pointer is actually valid.
Hopefully it should point to a function...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-10 23:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-09 21:49 Need help in understanding GDB stack trace ying lcs
2008-12-10 23:28 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox