Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/etra0/ghidra-to-gdb
Small CLI utility to generate an object file with debug symbols from an exported header from Ghidra
https://github.com/etra0/ghidra-to-gdb
Last synced: 27 days ago
JSON representation
Small CLI utility to generate an object file with debug symbols from an exported header from Ghidra
- Host: GitHub
- URL: https://github.com/etra0/ghidra-to-gdb
- Owner: etra0
- Created: 2022-06-04T02:01:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-05T16:56:10.000Z (over 2 years ago)
- Last Synced: 2024-12-25T11:43:52.225Z (about 2 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ghidra to GDB
Small utility to generate debugging symbols from a ghidra-exported header.
This is useful to load them to GDB and then cast raw pointers to the structs to
have a pretty print!```gdb
# cossacks.h is exported from the Data Type Manager from Ghidra.
python ghidra_to_gdb.py --gcc_args=-m32 cossacks.hgdb my_software
(gdb) add-symbol-file ./symbols.o
(gdb) p/x *(struct TList*)*0x008F4D24
$5 = {ptr = 0x4223a0, first_element = 0x331ca70, size = 0x1, field3_0xc = 0x4}
```## Usage:
```bash
usage: ghidra_to_gdb.py [-h] [--gcc_args GCC_ARGS] [--output OUTPUT] headerGenerate obj file with symbol information
positional arguments:
header Path of the header fileoptions:
-h, --help show this help message and exit
--gcc_args GCC_ARGS Extra arguments for GCC, separated by a comma (,)
--output OUTPUT Name of the output file, default is symbols.o
```