This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Have a problem w.r.t debugging C++ code using gdb
- From: "ManjuM" <ManjuM at bristol dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 21 Mar 2002 10:20:20 +0530
- Subject: Have a problem w.r.t debugging C++ code using gdb
Hello Support,
I like to inform about a problem about debugging C++ on gdb,
on Redhat linux 7.1
using gcc/g++ 2.96
gdb version GNU gdb 5.0rh-5 Red Hat Linux 7.1
it is a shared c++ lib compiled using -g & -ggdb2 options
a c++ application uses this lib and I can step into it and the app works fine
I can print local non-member variable values within gdb without any problems but
have a problem when I try to print any member variable or even "this" - it says
"Cannot access memory at address ......" as shown below.
(gdb-says)p m_pfnSuper
Reading in symbols for cmdtarg.cxx...done.
Reading in symbols for objcore.cxx...done.
Cannot access memory at address 0x91456b3
(gdb-says)p m_hWnd
Cannot access memory at address 0x91456b3
(gdb-says)
Cannot access memory at address 0x91456b3
(gdb-says)
Cannot access memory at address 0x91456b3
Any idea why this might be happening? Any clues to fix this will be greatly
appreciated? You could contact me at ManjuM@bristol.com
Thanks,
Manju