bug-gdb
[Top][All Lists]
Advanced

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

RE: To see a memory location using gdb


From: Gerrit Van Dyk
Subject: RE: To see a memory location using gdb
Date: Thu, 29 Nov 2001 12:12:03 +0200

If the memory you are pointing to, points to a char then do "p (char *)ptr"
else cast the pointer to the specific type it points to. (void *) is just a
pointer to something, so gdb does not know how to interpret the value the
pointer points to.

-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: Thursday, November 29, 2001 8:48 AM
To: address@hidden
Subject: To see a memory location using gdb


Hi every body,
 I was looking for a GDB news group and i can found only this one.
There is one void * ptr. And if i want to see the memory content what
can i do? If i try print ptr, then i can see the memory address
(suppose it is 0xc0c8ab0). Please help.

Mem

_______________________________________________
Bug-gdb mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-gdb
 
-------------------------------------------------------------------------
This e-mail is intended only for the use of the individual or entity named
above and may contain information that is confidential and privileged,
proprietary to the company and protected by law. If you are not the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this e-mail is strictly prohibited. Opinions, conclusions and
other information in this message that do not relate to the official
business of our company shall be understood as neither given nor endorsed by
it.



reply via email to

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