This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI: fix base members in references


Nick Roberts writes:
 > More generally variable objects still don't seem to work (even with
 > Vladimir's yet to be committed patch) for references to pointers.
 > 
 > Assuming that the test program below makes sense, a variable object for n1
 > has a value which includes the address and reports the value has changed
 > (as it used to do for pure references)

Sorry  thats actually rubbish (I was using an old GDB), but for

  struct S { int i; int j; };

  S *s;
  S *&s1 = s;

-var-create - * s
^done,name="var1",numchild="1",type="S *"
(gdb)
-var-create - * s1
^done,name="var2",numchild="0",type="S *&"

so the pointer is dereferenced by GDB but the reference to the pointer is
not.  I think that they should work in the same way but I'm not sure.


-- 
Nick                                           http://www.inet.net.nz/~nickrob


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]