Solved

How to display memory contents in GDB

Posted on 2006-11-16
1
1,219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

726 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