From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5607 invoked by alias); 28 Jul 2007 01:40:58 -0000 Received: (qmail 5596 invoked by uid 22791); 28 Jul 2007 01:40:57 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 28 Jul 2007 01:40:55 +0000 Received: from kahikatea.snap.net.nz (160.60.255.123.dynamic.snap.net.nz [123.255.60.160]) by viper.snap.net.nz (Postfix) with ESMTP id 739DB3D9DAC; Sat, 28 Jul 2007 13:40:52 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 75F458FC6D; Sat, 28 Jul 2007 13:40:50 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18090.40609.505683.775495@kahikatea.snap.net.nz> Date: Sat, 28 Jul 2007 20:57:00 -0000 To: "Robert Norton" Cc: gdb@sourceware.org Subject: Re: FW: Segfault in varobj.c In-Reply-To: References: X-Mailer: VM 7.19 under Emacs 22.1.50.3 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: 2007-07/txt/msg00199.txt.bz2 > > No, that won't happen any more. See get_value_type. > > Ah. Thanks. There doesn't seem to be any equivalent function in the 6.6 > version. Can you remember how this would have been handled then? > Appreciate that you're probably not interested in dredging up the past. > I tried variations on the following code but still wasn't able to > reproduce in 6.6 so there must be something more to my test binary: Your example crashes with GDB 6.6 for me in the way you first reported. > typedef int * INT_PTR; > > struct test_struct { > INT_PTR x; > }; > > struct test_struct test; > > int main(void) { > int x = 1; > test.x = &x; > return *test.x; > } > > rnorton@x-cbga-09:rnorton> gdb --interpreter=mi gdbtestfp > ... > ^done,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x00 > 000140",func="main",args=[],file="gdbtest.c",line="10"} > (gdb) > -var-create - * test > ^done,name="var1",numchild="1",type="struct test_struct" > (gdb) > -var-list-children test > &"Variable object not found\n" > ^error,msg="Variable object not found" > (gdb) > -var-list-children var1 > ^done,numchild="1",children={child={name="var1.x",exp="x",numchild="1",t > ype="INT_PTR"}} > (gdb) > -var-list-children var1.x > ^done,numchild="1",children={child={name="var1.x.*x",exp="*x",numchild=" > 0",type="int"}} > (gdb) > -var-list-children var1.x.*x > ^done,numchild="0" > (gdb) > > Suppose I'll just have to go with a workaround until such time as we can > upgrade. Yes. It appears to be fixed in current CVS but isn't handled by GDB 6.6. -- Nick http://www.inet.net.nz/~nickrob