From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23625 invoked by alias); 10 Dec 2008 23:28:12 -0000 Received: (qmail 23616 invoked by uid 22791); 10 Dec 2008 23:28:11 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Dec 2008 23:27:29 +0000 Received: from mailhost5.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 1692741001; Wed, 10 Dec 2008 15:27:28 -0800 (PST) Received: from [10.20.92.151] (promb-2s-dhcp151.eng.vmware.com [10.20.92.151]) by mailhost5.vmware.com (Postfix) with ESMTP id 0DF71DC0B6; Wed, 10 Dec 2008 15:27:28 -0800 (PST) Message-ID: <49404F86.1000800@vmware.com> Date: Wed, 10 Dec 2008 23:28:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: ying lcs CC: "gdb@sourceware.org" Subject: Re: Need help in understanding GDB stack trace References: <568e62a40812091348w720d2240j6ac4e46747c13e46@mail.gmail.com> In-Reply-To: <568e62a40812091348w720d2240j6ac4e46747c13e46@mail.gmail.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00035.txt.bz2 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...