| Gnu Debugger |
Article Index for Gnu |
Website Links For Gnu |
Information AboutGnu Debugger |
| CATEGORIES ABOUT GNU DEBUGGER | |
| debuggers | |
| gnu project software | |
| debugger | |
|
HISTORY Originally written by Richard Stallman in 1988 , GDB is Free Software released under the GNU General Public License . From 1990 to 1993 it was maintained by John Gilmore while he worked for Cygnus Solutions . TECHNICAL DETAILS Features GDB offers extensive facilities for tracing and altering the execution of Computer Program s. The user can monitor and modify the values of programs' internal Variable s, and even call Functions independently of the program's normal behavior. GDB target processors (as of 2003 ) include: Alpha , ARM , H8/300 , System/370 , System 390 , X86 and X86-64 , IA-64 "Itanium", Motorola 68000 , MIPS , PA-RISC , PowerPC , SuperH , SPARC , VAX . Lesser-known target processors supported in the standard release have included A29K , ARC , AVR , CRIS , D10V , D30V , FR-30 , FR-V , Intel I960 , M32R , 68HC11 , Motorola 88000 , MCORE , MN10200 , MN10300 , NS32K , Stormy16 , V850 , VAX , and Z8000 . (Newer releases will likely not include some of these.) GDB has compiled-in Simulators for target processors even for lesser-known target processors such like M32R or V850. Remote debugging GDB offers a 'remote' mode often used when debugging embedded systems. Remote operation is when GDB runs on one machine and the program being debugged runs on another. GDB can communicate to the remote 'stub' which understands GDB protocol via Serial or TCP/IP. The same mode is also used by KGDB for debugging a running Linux Kernel on the source level with gdb. With kgdb, kernel developers can debug a kernel similar to application programs. It makes it possible to place breakpoints in kernel code, step through the code and observe variables. On some architectures, where hardware debugging registers are available, also watchpoints can be set which trigger a breakpoint when a certain memory address is executed or accessed. kgdb requires an additional machine which is connected to the machine to be debugged using a Serial Cable or Ethernet . On FreeBSD , also debugging using Firewire DMA is possible. Limitations The debugger does not contain its own Graphical User Interface , and defaults to a Command-line Interface . Several front-ends have been built for it, such as DDD , GDBtk / Insight and the "GUD mode" in Emacs . These offer facilities similar to debuggers found in Integrated Development Environment s. Some other debugging tools have been designed to work with GDB, such as Memory Leak detectors. AN EXAMPLE SESSION This is an example GDB session on the example program in Stack Trace :
(gdb) edit (gdb) shell gcc crash.c -o crash -gstabs+ (gdb) run The program being debugged has been started already. Start it from the beginning? (y or n) y warning: cannot close "shared object read from target memory": File in wrong format `/home/sam/programming/crash' has changed; re-reading symbols. Starting program: /home/sam/programming/crash Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0xa3e000 This program will demonstrate gdb 24 Program exited normally. (gdb) quit The program is being run. After the cause of the segmentation fault is found, the program is edited to use the correct behavior. The corrected program is recompiled with GCC and then run. REFERENCES
EXTERNAL LINKS
|
|
|