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]
Other format: [Raw text]

An install question and a bug


Mandrake Linux 8.1, gcc 2.96, gdb 5.1.1

When I configure the source code for gdb 5.1.1, it says after a while . . .

...
...
checking for tgetent in -lterminfo... no
configure: error: Could not find a term library
Configure in /home/salman/softdev/gdb/gdb-5.1.1/gdb failed, exiting.

What is term library?  Where do I install this from?

Here is a bug that I just submitted through the bug reporting database on 
the gdb homepage.  I searched for it in the archives and someone asked the 
exact same question but didn't receive a reply.  Anyone has a solution or 
patch to this?:

Cannot look at global variables inside a C++ namespace
======================================================
reproducable on 5.0 and 5.1 of gdb

Assuming the code:

#include <iostream>
using namespace std;

namespace FOO{
  float fSomeVar = 67.8;
}

namespace BAR{
  float fSomeVar = 27.2;
}

float fSomeVar = 23.0;

int main()
{
   FOO::fSomeVar = 100.0;
   BAR::fSomeVar = 200.0;
   fSomeVar = 300.0;

   cout << FOO::fSomeVar << endl;
   cout << BAR::fSomeVar << endl;
   cout << fSomeVar << endl;

   return 0;
}




The gdb output as is follows---Please note that I have tried the string with 
and without single-quotes.  GDB doesn't find the symbol without the 
quotes---with the quotes it is giving me a junk value:




Current directory is ~/softdev/nbug/
GNU gdb 20010813 (MI_OUT)
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-mandrake-linux"...
(gdb) b main
Breakpoint 1 at 0x8048656: file main.cpp, line 17.
(gdb) run
Starting program: /home/salman/softdev/nbug/hello

Breakpoint 1, main () at main.cpp:17
(gdb) n
(gdb)
(gdb)
(gdb) p fSomeVar
$1 = 300
(gdb) p FOO::fSomeVar
No symbol "FOO" in current context.
(gdb) p 'FOO::fSomeVar'
$2 = 1120403456
(gdb) p 'BAR::fSomeVar'
$3 = 1128792064
(gdb)c
Continuing.
100
200
300

Program exited normally.
(gdb)


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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