Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: "Robert Norton" <rnorton@broadcom.com>
Cc: gdb@sourceware.org
Subject: Re: FW: Segfault in varobj.c
Date: Sat, 28 Jul 2007 20:57:00 -0000	[thread overview]
Message-ID: <18090.40609.505683.775495@kahikatea.snap.net.nz> (raw)
In-Reply-To: <B0D822BFECD50F4991F2516EA50F273C01FEB559@NT-IRVA-0752.brcm.ad.broadcom.com>

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


  reply	other threads:[~2007-07-28  1:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27 17:53 Robert Norton
2007-07-28 20:57 ` Nick Roberts [this message]
2007-07-30 11:43   ` Robert Norton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18090.40609.505683.775495@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=gdb@sourceware.org \
    --cc=rnorton@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox