Solved

How to display memory contents in GDB

Posted on 2006-11-16
1
1,218 Views
Last Modified: 2012-06-21
Hi,

I am using GDB and would like to know how to print the memory location.  For example,

if a pointer has value 0xf22323 then I want to know what is actually there in the memory.

Thanks
0
Comment
Question by:ambuli
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 300 total points
ID: 17958168
Just type

x 0xf22323

('x' is short for 'examine')

See also http://www.cs.cmu.edu/~gilpin/tutorial/ ("Debugging Under Unix: gdb Tutorial") and http://www.unknownroad.com/rtfm/gdbtut/gdbtoc.html ("RMS's gdb Debugger Tutorial") with http://www.unknownroad.com/rtfm/gdbtut/gdbadvanced.html#MEMORY ("6.1 How do I examine memory?") in particular
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IdTCPClient1->Disconnect(); not working 3 86
best sources to up-to-date in C++? 8 104
Arduino EDI - Programming language 3 115
why doesn't assert terminate here? 2 11
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question