To debug an application, do the following:
- Start GDB, but don't specify the application as an argument:
gdb
- Load the symbol information for the application:
file my_application
- If you're debugging remotely, set the target:
target qnx com_port_specifier | host:port | pty
- If you're debugging remotely, send the application to the target:
upload my_application /tmp/my_application
- Set any breakpoints.
For example, to set a breakpoint in main():
set break main
- Start the application:
run