This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix C `extern' shadowing in a local block
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 28 Mar 2009 22:37:53 +0100
- Subject: Re: [patch] Fix C `extern' shadowing in a local block
- References: <20090326212128.GA32657@host0.dyn.jankratochvil.net>
On Thu, 26 Mar 2009 22:21:28 +0100, Jan Kratochvil wrote:
> fix GDB evaluation for:
> {
> int var = 1;
> {
> extern int var;
>
> Access "var" at this point from GDB which must access the `extern' variable.
> }
> }
>
> Such code will still not work due to GCC PR debug/39563. GCC may also fix it
> a way compatible with current GDB (`extern var' to be global and use
> DW_TAG_imported_declaration in the local block). Still IMO a valid DWARF
> layout used in the attached .S testcase currently fails for GDB.
The patch provided for GCC (but still not checked-in) requires fixed GDB:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39563#c5
Thanks,
Jan