Solved

How to display memory contents in GDB

Posted on 2006-11-16
1
1,209 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

786 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