This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/961: Sometimes GDB doesn't find local variables


>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. 
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]