This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/10586] Anonymous unions/structs not handled correctly under MI
- From: "nickrob at snap dot net dot nz" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 10 Oct 2009 22:35:58 -0000
- Subject: [Bug mi/10586] Anonymous unions/structs not handled correctly under MI
- References: <20090901200751.10586.elethiomel@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.