This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB not showing local-to-block variables ?
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Iztok Kobal <IKobal at netscape dot net>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 8 Jan 2003 09:10:42 -0500
- Subject: Re: GDB not showing local-to-block variables ?
- References: <3E1BDC6D.3020604@netscape.net>
Iztok Kobal writes:
> System: i686, SuSE 8.1, kernel 2.4.19, gcc-3.2, gdb-5.2.1
>
> code is configured to use exceptions and compiled using the
> --enable-debug. When invoking the gdb, it does not show the variables
> which are local to the block within some function:
>
> void function (some argument) {
> try {
> some variable; // which is not displayed by the debugger
> .....
> ......
> }
> catch (...) {
> ....
> }
> }
>
> When trying to display this variable as it was the watch variable, the
> debugger reports that there is no such symbol in the current stack frame.
>
> Is this the debugger problem or there is an option to be used at compile
> time to get this info ?
>
I think this is the same problem as the one in
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=833
and it is due to gdb not understanding dwarf2 debug info that is
stored in .debug_ranges sections.
Elena