This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
pending/1011: Re: gdb/961: Sometimes GDB doesn't find local variables
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: ivans at isle dot spb dot ru
- Cc: gdb-gnats at sources dot redhat dot com
- Date: Fri, 31 Jan 2003 11:40:22 -0500
- Subject: pending/1011: Re: gdb/961: Sometimes GDB doesn't find local variables
- References: <20030128203619.24510.qmail@sources.redhat.com>
>Number: 1011
>Category: pending
>Synopsis: Re: gdb/961: Sometimes GDB doesn't find local variables
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Fri Jan 31 16:48:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release:
>Organization:
>Environment:
>Description:
On Tue, Jan 28, 2003 at 08:36:19PM -0000, ivans@isle.spb.ru wrote:
>
> >Number: 961
> >Category: gdb
> >Synopsis: Sometimes GDB doesn't find local variables
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: unassigned
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Tue Jan 28 20:38:00 UTC 2003
> >Closed-Date:
> >Last-Modified:
> >Originator: ivans@isle.spb.ru
> >Release: GNU gdb 5.3 (also 5.2.1)
> >Organization:
> >Environment:
> Linux lorien.home.net 2.4.20-xfs #3 ??? ??? 12 23:54:53 MSK 2002 i686 unknown unknown GNU/Linux
> gcc version 3.2.1 (ALT Linux, build 3.2.1-alt2)
> This GDB was configured as "i686-pc-linux-gnu".
> >Description:
> Sometimes GDB doesn't find local variables. Here's the example of the code, where gdb fails:
>
> StateDescr *sp = lm->states.addr;
> for (stateTable::iterator i = states.begin(); i != states.end(); sp++, i++) {
> StateDescr *stp = i->second;
> int len = strlen(stp->name) + 1;
>
> strcpy(cp_string, stp->name);
> sp->name = cp_string;
> sp->number = stp->number;
> sp->priority = stp->priority;
> sp->mask = stp->mask;
> cp_string += len;
> lm->strings.count++;
> }
>
> If I set the breakpoint at "strcpy(cp_string, stp->name);": and try to print outr the "i" variable, gdb replies: "No symbol "i" in current context.".
>
> The program is multi-threaded, but at the monent only single thread runs.
> >How-To-Repeat:
> I tried to reproduce the situation but regrettably it wouldn't appear in a simple programs.
Ivan, could you try again with a CVS head snapshot from yesterday or today?
I believe this is fixed for loops like the above, although there's some
more work to be done for more complex loops.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: