This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: How to exam struct structname structname in C++
- From: Pedro Alves <palves at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GDB <gdb-patches at sourceware dot org>
- Date: Tue, 26 Mar 2013 20:08:43 +0000
- Subject: Re: How to exam struct structname structname in C++
- References: <CAMe9rOqN+rH+ptWngH7WLUvate5upzsyhcO6rmwh3R6221BuFQ at mail dot gmail dot com>
On 03/26/2013 07:59 PM, H.J. Lu wrote:
> GCC is compiled with C++ now and I can't exam recog_data:
>
> recog.h:struct recog_data
> recog.h:extern struct recog_data recog_data;
>
> under GDB due to:
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=7737
>
> Is there a work around for this without touching GCC
> source?
If you're looking for a quick one-off workaround, I'd do:
$ nm -A cc1 | grep recog_data
(gdb) p *(struct recog_data *) (0xaddress)
--
Pedro Alves