Whole document tree
2.1 Invoking GDB
Invoke GDB by running the program
You can also run The command-line options described here are designed to cover a variety of situations; in some environments, some of these options may effectively be unavailable. The most usual way to start GDB is with one argument, specifying an executable program:
You can also start with both an executable program and a core file specified:
You can, instead, specify a process ID as a second argument, if you want to debug a running process:
would attach GDB to process Taking advantage of the second command-line argument requires a fairly complete operating system; when you use GDB as a remote debugger attached to a bare board, there may not be any notion of "process", and there is often no way to get a core dump. GDB will warn you if it is unable to attach or to read core dumps.
You can run
You can further control how GDB starts up by using command-line options. GDB itself can remind you of the options available. Type
to display all available options and briefly describe their use (`gdb -h' is a shorter equivalent). All options and command line arguments you give are processed in sequential order. The order makes a difference when the `-x' option is used.
This document was generated by root on January, 30 2002 using texi2html |