The execution of a program is affected by certain information it receives from its superior. GDB provides ways to specify this information, which you must do before starting your program. (You can change it after starting your program, but such changes affect your program the next time you start it.)
This information may be divided into the following categories:
The run creates an inferior process and makes that process run your program.
If the modification time of your symbol file has changed since the last time GDB read its symbols, GDB discards its symbol table and reads it again. When it does this, GDB tries to retain your current breakpoints.
Here's an example of starting the program:
(gdb) target qnx mytst:8000 Remote debugging using mytst:8000 Remote target is little-endian (gdb) file /tmp/helloworld Reading symbols from /tmp/helloworld...done. (gdb) upload /tmp/helloworld /tmp/helloworld (gdb) b main Breakpoint 1 at 0x804860c: file ./main.c, line 5. (gdb) r Starting program: Remote: /tmp/helloworld Breakpoint 1, main () at ./main.c:5 5 { (gdb)
If your communication line is slow, you might need to set the timeout for remote reads:
set nto-timeout time
where time is the timeout, in seconds. The default is 10 seconds.