Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uyjulian/stab_debuginfo_utils
STAB debug information related utilities (focusing on x86 and r3000 MIPS)
https://github.com/uyjulian/stab_debuginfo_utils
Last synced: 7 days ago
JSON representation
STAB debug information related utilities (focusing on x86 and r3000 MIPS)
- Host: GitHub
- URL: https://github.com/uyjulian/stab_debuginfo_utils
- Owner: uyjulian
- License: mit
- Created: 2021-08-03T06:28:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-09T12:51:33.000Z (6 months ago)
- Last Synced: 2024-10-18T20:41:00.611Z (27 days ago)
- Language: Python
- Homepage:
- Size: 140 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Some useful utilities for STAB debug information parsing
Some useful utilities STAB debuginfo related utilities that may be helpful in reversing.
Missing dependencies, or get `ModuleNotFoundError`? Install them with `python3 -m pip`
# ELF to split STAB section
Supports reading `.stab`, `.stabstr`, and `.mdebug` section.
`.mdebug` section will be converted to the `.stab` and `.stabstr` specification.
Limitations:
* 32-bit support onlyUsage:
```bash
python3 /path/to/elf_to_split_stab.py /path/to/input/file.elf /path/to/output/file.stab /path/to/output/file.stabstr
```# Split STAB section to ELF
Supports reading `.stab`, and `.stabstr` pre-split files.
Limitations:
* 32-bit support onlyUsage:
```bash
python3 /path/to/split_stab_to_elf.py /path/to/input/file.stab /path/to/input/file.stabstr /path/to/output/file.elf
```# STABS debug info to JSON
A patch to `prdbg.c` from GNU Binutils that will output the information in JSON format.
Some functionality (like C++ data types) are not implemented properly.# JSON to the scripting format of an industry-leading disassembler
`json2pcode.py` converts the output of the above "STABS debug info to JSON" to the scripting format of an industry-leading disassembler.
Known missing/incomplete features:
* C++ types
* Static and register local variables
* 64-bit supportDue to interdependency issues, you need to run the generated script twice.
# See also
gdb-stabs documentation: https://sourceware.org/gdb/current/onlinedocs/stabs.html
StabsParser pull request for Ghidra: https://github.com/NationalSecurityAgency/ghidra/pull/1460
objdump documentation from Binutils: https://sourceware.org/binutils/docs/binutils/objdump.html# License
For `prdbg.c`, GPL v3 (or at your option any later version).
For everything else, MIT license, see `LICENSE` file for more information