Using GDB

BlackBerry 10 OS-specific extensions

The BlackBerry 10 OS implementation of GDB includes some extensions:

target qnx
Set the target; see Setting the target.
set nto-inherit-env
Set where the remote process inherits its environment from; see Your program's environment.
set nto-cwd
Set the working directory for the remote process; see Starting your program.
set nto-timeout
Set the timeout for remote reads; see Setting the target.
upload local_path remote_path
Send a file to a remote target system.
download remote_path local_path
Retrieve a file from a remote target system.
info pidlist
Display a list of processes and their process IDs on the remote system
info meminfo
Display a list of memory-region mappings (shared objects) for the current process being debugged.

A quick overview of starting the debugger

To debug an application, do the following:

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

Last modified: 2014-12-11



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus