manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1.1 Choosing Files

When No value for GDBN starts, it reads any arguments other than options as specifying an executable file and core file (or process ID). This is the same as if the arguments were specified by the ‘-se’ and ‘-c’ (or ‘-p’) options respectively. (No value for GDBN reads the first argument that does not have an associated option flag as equivalent to the ‘-se’ option followed by that argument; and the second argument that does not have an associated option flag, if any, as equivalent to the ‘-c’/‘-p’ option followed by that argument.) If the second argument begins with a decimal digit, No value for GDBN will first attempt to attach to it as a process, and if that fails, attempt to open it as a corefile. If you have a corefile whose name begins with a digit, you can prevent No value for GDBN from treating it as a pid by prefixing it with ‘./’, e.g. ‘./12345’.

If No value for GDBN has not been configured to included core file support, such as for most embedded targets, then it will complain about a second argument and ignore it.

Many options have both long and short forms; both are shown in the following list. No value for GDBN also recognizes the long forms if you truncate them, so long as enough of the option is present to be unambiguous. (If you prefer, you can flag option arguments with ‘--’ rather than ‘-’, though we illustrate the more usual convention.)

-symbols file
-s file

Read symbol table from file file.

-exec file
-e file

Use file file as the executable file to execute when appropriate, and for examining pure data in conjunction with a core dump.

-se file

Read symbol table from file file and use it as the executable file.

-core file
-c file

Use file file as a core dump to examine.

-c number
-pid number
-p number

Connect to process ID number, as with the attach command. If there is no such process, No value for GDBN will attempt to open a core file named number.

-command file
-x file

Execute No value for GDBN commands from file file. See section Command files.

-eval-command command
-ex command

Execute a single No value for GDBN command.

This option may be used multiple times to call multiple commands. It may also be interleaved with ‘-command’ as required.

 
No value for GDBP -ex 'target sim' -ex 'load' \
   -x setbreakpoints -ex 'run' a.out
-directory directory
-d directory

Add directory to the path to search for source and script files.

-r
-readnow

Read each symbol file's entire symbol table immediately, rather than the default, which is to read it incrementally as it is needed. This makes startup slower, but makes future operations faster.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.