Results 1 to 3 of 3
Is there any good documentation anybody have on gdb.
Can anybody explain me where can i use it ?...
- 08-02-2008 #1Linux Newbie
- Join Date
- Feb 2008
- Location
- Bangalore, India
- Posts
- 112
What is gdb?
Is there any good documentation anybody have on gdb.
Can anybody explain me where can i use it ?bigunix.blogspot.com
Registered Linux User: #476440
- 08-02-2008 #2
gdb is the gnu debugger. You use it to debug a program that you have written and compiled, and that isn't working the way it should.
There is quite a good info page on it. Just typeCode:info gdb
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 08-02-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
As hazel very well said, it's the GNU debugger. A debugger is a program that can be used to "spy" live programs while they are running, to see how the info is being moved from one place to another, to get the status of the memory associated to the program, the cpu registers, the function you are running and much more.
There are many good guides around (just google) to use gdb, but they all require to some degree some knowledge about programming and debuging in general. There's no way you can understand the output of a debuger if you don't know the basics of programming at least.
Of course, it can still be useful to get backtraces and the like, that you can submit attached to your bugreports so more knowledgeable people and devs can take a look at it. But it's usually not needed unless they explicitly ask for it.
Anyway, most distros enable optimizations when compiling that makes impossible to get useful info out of gdb under most circumstances. They also strip unneeded stuff form the binaries rendering gdb backtraces useless. So, even if you have gdb installed and know how to use it, you usually need to recompile the program you want to debug with the relevant debug options and adequate CFLAGS, so you can get relevant info on backtraces. These are disabled on final builds because the debug builds usually perform much worse than regular builds, and most users will not need to debug anything.


Reply With Quote