Re: Need help in understanding GDB stack trace

Michael Snyder
2008-12-10T23:28:12Z

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...