Solved

How to display memory contents in GDB

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now