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]

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




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