This is the mail archive of the gdb-prs@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]

[Bug mi/10586] Anonymous unions/structs not handled correctly under MI


------- Additional Comments From nickrob at snap dot net dot nz  2009-10-10 22:35 -------
Subject:  Anonymous unions/structs not handled correctly under MI

 > Thanks again :) The situation is definitely improved. I can now expand the
 > anonymous unions. However, there are still some errors. Specifically from 522
 > onwards.
 > 

 >...
 > (gdb) 
 > 522 ptype test::<anonymous struct>
 > &"ptype test::<anonymous struct>\n"
 > &"A syntax error in expression, near `<anonymous struct>'.\n"
 > 522^error,msg="A syntax error in expression, near `<anonymous struct>'."

This isn't a valid expression or data type, so I wouldn't expect it to work

 > (gdb) 
 > 523 ptype (bar).0
 > &"ptype (bar).0\n"
 > &"A syntax error in expression, near `.0'.\n"
 > 523^error,msg="A syntax error in expression, near `.0'."
 > (gdb) 

I don't think that GDB can currently refer to anonymous structs/unions.  It
might be useful to do so but that would require a syntax to be defined and
documented.  I think this is additional to the original bug report about
variable objects and that the patch is sufficient for front ends that use
MI (or at least Emacs).


 >...
 > (gdb) 
 > 534-data-evaluate-expression ((bar).0).a
 > 534^error,msg="A syntax error in expression, near `.0).a'."
 > (gdb) 

When you you need to issue such a command?

If there is a need then you could file a further bug report once/if the first
patch gets approved.




-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10586

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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