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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 8:48 AM To: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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. _______________________________________________ Bug-gdb mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gdb
