Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-30-2005, 04:15 PM   #1
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
examine memory with gdb

I am trying to learn how to handle gdb but the help command in it does not give me much info. What I want to do is to examine the memory after the program has crashed. I want to examine the memory of both the program itself but also its static variables and also the stack.

Old 05-30-2005, 04:43 PM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
backtrace will tell you the stack.
print expression will tell you the value of a given expression (local or stack variable).

You might look to using a GUI front-end to gdb; I think kdevelop has one. Even xgdb helps as an aide to memory.
Old 05-31-2005, 06:30 AM   #3
Senior Member
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 49
It seems that the command I was looking for was x (examine) and now when I can handle it, everything is working out great.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
normal gdb and spec gdb for kgdb Igor007 Programming 1 09-23-2005 04:15 PM
normal gdb and spec gdb for kgdb Igor007 Linux - Newbie 1 09-23-2005 01:41 PM
Can you use GDB to alter memory? tim_l Linux - Software 0 02-25-2005 05:19 AM
how to examine core file? iclinux Linux - Newbie 1 01-19-2005 11:37 PM
gdb .. looking for 32 bit gdb.. for ia64 suse.. nkshirsagar SUSE / openSUSE 0 12-09-2004 03:02 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration