Skip to content

🐛 GDB Developer Tool: developer script to quickly and easily debug a remote QNX target or core file

License

Notifications You must be signed in to change notification settings

brandonsoto/gdt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GDT

GDB Developer Tool (GDT) is a developer script to quickly and easily debug a core file or remote target. It's essentially a wrapper around GDB that can automatically attach to a remote process and generate GDB's "solib-search-path" and "dir" options for you.

Features include

  • Debug a remote process
  • Debug a local core file

Prerequisites

  • python 2.7

Configuration

You are able to customize certain parts of GDT. All configuration can be found in config.json and gdbinit.

config.json

This file contains path and target configurations. The following can be customized:

  • gdb_path - full path to the GDB executable
  • project_root_path - path to the project's root directory
  • symbol_root_path - path to root symbol directory
  • excluded_dir_names - names of directories to be excluded from solib path and source path generation (ex. .svn, .git, .vscode, etc.)
  • target_ip - the target's IPv4 address
  • target_user - the target's username
  • target_password - the target's password
  • target_debug_port - the port to connect GDB
  • target_prompt - the target's command line prompt

gdbinit

This file contains GDB commands to automatically execute during GDB startup. Feel free to add any custom routines or commands here.

How can I install the tool

TODO

How can I use the tool

Get usage help

python gdt.py -h
python gdt.py remote -h
python gdt.py core -h
python gdt.py cmd -h

Debug a remote process

python gdt.py remote -p bin/Service.full

# debug remote process with saved breakpoints
python gdt.py remote -b breakpoints.txt -p bin/Service.full

# debug remote process with symbols (symbol_root_paths in config.json will be ignored)
python gdt.py remote -p bin/Service.full -s bin/Symbols/

Debug using a GDB command file

python gdt.py cmd Project/gdb_commands.txt

Debug a local core file

python gdt.py core -c bin/Service.core -p bin/Service.full

# debug core file with symbols (symbol_root_paths in config.json will be ignored)
python gdt.py core -c bin/Service.core -p bin/Service.full -s bin/Symbols/

Resources

Known Issues

TODO

About

🐛 GDB Developer Tool: developer script to quickly and easily debug a remote QNX target or core file

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published