ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Cannot access memory at address X"


From: Oscar L. Kramer
Subject: "Cannot access memory at address X"
Date: Wed, 26 Jun 2002 20:25:23 -0400

This is probably more of a GDB question than DDD, but I'll try anyway. On 
occasion I get this "Cannot access memory at address X" error trying to
print or display a data member of a C++ object. I don't know if this is 
relevant but the data member is declared in a base class of the
instantiated object. I have seen sometimes I can get it to access by doing 
first "print this->myDataMember" then after that first access, I can
do just "print myDataMember" and it works. Other times it doesn't. When I try 
"print this", I get the address of the instance. But when I do
"print *this" it comes back with the "cannot access memory at address X" error 
but with an address that is different (and lower) than that
specified by "print this". Is there something I need to enable in the debugger 
or the compiler or the source?

I'm running DDD 3.3 (i386-redhat-linux-gnu) with GDB 5.1-0.71 on redhat 7.2.

Thanks for any help,
Oscar Kramer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]