Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clarkb7/annotate_lineinfo
Annotate IDA with source and line number information from a PDB
https://github.com/clarkb7/annotate_lineinfo
ida idapython pdb
Last synced: 3 months ago
JSON representation
Annotate IDA with source and line number information from a PDB
- Host: GitHub
- URL: https://github.com/clarkb7/annotate_lineinfo
- Owner: clarkb7
- License: mit
- Created: 2019-03-24T00:42:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-15T05:43:49.000Z (over 3 years ago)
- Last Synced: 2024-05-13T02:41:22.878Z (6 months ago)
- Topics: ida, idapython, pdb
- Language: Python
- Size: 44.9 KB
- Stars: 11
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# annotate_lineinfo
[![PyPI version](https://badge.fury.io/py/annotate-lineinfo.svg)](https://badge.fury.io/py/annotate-lineinfo)This IDAPython script/plugin will parse the PDB for the loaded executable and annotate the disassembly with source and line number information.
## Usage
### Script
* Option 1) Run [annotate_lineinfo.py](https://github.com/clarkb7/annotate_lineinfo/blob/master/annotate_lineinfo/annotate_lineinfo.py) as a regular IDAPython script.* Option 2) From another script or the IDAPython console:
```python
import annotate_lineinfo
annotate_lineinfo.ida_annotate_lineinfo()
```### Plugin
To install
* Option 1) Run `python setup.py install --install-ida-plugin=PATH` to install [annotate_lineinfo_plugin.py](https://github.com/clarkb7/annotate_lineinfo/blob/master/annotate_lineinfo_plugin.py) to `PATH\plugins`
* If `PATH` is not specified, `%IDAUSR%` will be tried first
* If `%IDAUSR%` does not exist, it defaults to `%APPDATA%\Hex-Rays\IDA Pro`
* Option 2) Manually place [annotate_lineinfo_plugin.py](https://github.com/clarkb7/annotate_lineinfo/blob/master/annotate_lineinfo_plugin.py) in the `plugins` directory of your IDA installation.Annotate entire file
* Use shortcut key `Alt-Shift-A` or run from `Edit->Annotate lineinfo` menu.Disassembly view popup menu
* Right click inside a function, select annotate
* Select a range of instructions, right click, select annotateFunctions view popup menu
* Select one or more functions, right click, select annotateEach of the above actions has a corresponding `remove annotations` action.
On load, annotate_lineinfo attempts to locate the PDB in the following locations:
* `_NT_SYMBOL_PATH` if set
* IDA's default PDB download directory `%TEMP%\ida`
* MSDIA defaults - Path in debug directory of executable, same path as executableYou may specify the PDB path manually, or request another auto-locate attempt (e.g. after IDA downloads the PDB),
from the `Edit->Annotate lineinfo` menu.## Caveats
Only runs on Windows. This script makes use of the COM API provided by msdia[ver].dll to parse the PDB.