This is the mail archive of the gdb@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]

Re: Question regarding missing local variables in gdb


Cool, this is all the info I need.  I reproduced this on a Red Hat Linux 7
system with g++ 2.96 and gdb 5.0.

Then I did it again on a Red Hat Linux 7.1 system which has an updated
g++ (g++ 2.96-81).  The problem is fixed there.  So I recommend that
you upgrade to 7.1.

I also tested the vanilla FSF compiler, gcc 2.95.3, running on RHL 7.
The problem is fixed there as well.

Michael Elizabeth Chastain
<chastain@redhat.com>
"love without fear"

===

[chastain@rhl-71 tmp]$ export PATH=/bin:/usr/bin
[chastain@rhl-71 tmp]$ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
[chastain@rhl-71 tmp]$ gdb -v
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux".
[chastain@rhl-71 tmp]$ g++ -g -O0 -o x2.71 x2.cpp
[chastain@rhl-71 tmp]$ gdb x2.71
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) break 11
Breakpoint 1 at 0x8048730: file x2.cpp, line 11.
(gdb) run
Starting program: /home/chastain/tmp/x2.71 

Breakpoint 1, main () at x2.cpp:11
11	          cout << i << "\t" << j << "\t" << goo << "\t" << hoo << endl;
Current language:  auto; currently c++
(gdb) info locals
goo = 0
hoo = 5000
j = 10
foo = 100
i = 0
(gdb) 

===

[chastain@rhl-70 tmp]$ export PATH=/horton/chastain/gcc-2.95.3/bosch/native/install/bin:/bin:/usr/bin
[chastain@rhl-70 tmp]$ g++ -v
Reading specs from /horton/chastain/gcc-2.95.3/bosch/native/install/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
[chastain@rhl-70 tmp]$ g++ -g -O0 -o x2 x2.cpp
[chastain@rhl-70 tmp]$ gdb x2
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) break 11
Breakpoint 1 at 0x804a57c: file x2.cpp, line 11.
(gdb) run
Starting program: /home/chastain/tmp/x2 

Breakpoint 1, main () at x2.cpp:11
11	          cout << i << "\t" << j << "\t" << goo << "\t" << hoo << endl;
(gdb) info locals
goo = 0
hoo = 5000
j = 10
foo = 100
i = 0
(gdb) 


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