LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-30-2005, 04:15 PM   #1
Ephracis
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.

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

Rep: Reputation: 67
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
Ephracis
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.
 
  


Reply


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/Novell 0 12-09-2004 03:02 AM


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

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