Showing results for 
Search instead for 
Did you mean: 

Few questions on GDB ( GNU DEBUGGER)


Few questions on GDB ( GNU DEBUGGER)

Hi All,

I am New to use gdb tool. I am facing couple of issues to use gdb tool. Can you please help by answering the following questions.

(1) How can I fetch my data structures from a core dump file? (like a specific variable value, a pointer value , or strcucture member value..etc).

(2) What is the use of "-s" option and how we can use this

(3) From a running process how I can fetch my data structures ?

(4)To analyze a core dump, do we need to the source files and executable file? If so, how to analyze a core dump using its sources.

(5) How to tell the gdb to look into a specific directory for source files or executables.

Thanks for your help in advance.


Esteemed Contributor

Re: Few questions on GDB ( GNU DEBUGGER)

Hello Masthan
i am not really good in gnu, but can suggest you below few url, thanks,
dirk dierickx
Honored Contributor

Re: Few questions on GDB ( GNU DEBUGGER)

what you need to do is compile your programs with debug information. when you do that you can easily use gdb to do any of those things, in fact it's all transparent.

i recommend to use the gdb gui though, it makes life much easier. i always used ddd, but there is also insight (developed by redhat).