Add Documentation for Rizin

Updates documentation and adds help commands with the relevant rizin information.
This commit is contained in:
Maria 2023-02-08 13:36:51 -05:00 committed by Gulshan Singh
parent 84120d161b
commit 30053d1a24
3 changed files with 25 additions and 7 deletions

View File

@ -91,20 +91,21 @@ cwatch execute "x/20x $rsp"
### Ghidra
With the help of [radare2](https://github.com/radareorg/radare2) it is possible to show the
With the help of [radare2](https://github.com/radareorg/radare2) or [rizin](https://github.com/rizinorg/rizin) it is possible to show the
decompiled source code of the ghidra decompiler.
However, this comes with some prerequisites.
* First: you have to have installed radare2 and it must be found by gdb (within path)
* First: you have to have installed radare2 or rizin and it must be found by gdb (within path)
* Second: you have to install the ghidra plugin for radare2
[r2ghidra-dec](https://github.com/radareorg/r2ghidra-dec)
* Third: r2pipe has to be installed in the python-context gdb is using
[r2ghidra](https://github.com/radareorg/r2ghidra) or install the ghidra plugin for rizin [rz-ghidra](https://github.com/rizinorg/rz-ghidra)
* Third: r2pipe has to be installed in the python-context gdb is using (or if you are using rizin, install rzpipe instead)
The decompiled source be shown as part of the context by adding `ghidra` to `set context-sections`
or by calling `ctx-ghidra [function]` manually.
Be warned, the first call to radare2/r2ghidra-dec is rather slow! Subsequent requests for decompiled
source will be faster. And it does take up some resources as the radare2 instance is kept by r2pipe
Be warned, the first call to both radare2/r2ghidra and rizin/rz-ghidra are rather slow! Subsequent requests for decompiled
source will be faster. And it does take up some resources as the radare2/rizin instance is kept by r2pipe/rzpipe
to enable faster subsequent analysis.
With those performance penalties it is reasonable to not have it launch always. Therefore it includes

17
docs/commands/misc/rz.md Normal file
View File

@ -0,0 +1,17 @@
## Command: rz ##
```
usage: rz [-h] [--no-seek] [arguments [arguments ...]]
```
Launches rizin
| Positional Argument | Info |
|---------------------|------|
| arguments | Arguments to pass to radare |
| Optional Argument | Info |
|---------------------|------|
| --help | show this help message and exit |
| --no-seek | Do not seek to current pc (default: False) |
Example: rz -- -S -AA

View File

@ -327,7 +327,7 @@ def context_expressions(target=sys.stdout, with_banner=True, width=None):
config_context_ghidra = pwndbg.gdblib.config.add_param(
"context-ghidra",
"never",
"when to try to decompile the current function with ghidra (slow and requires radare2/r2pipe) (valid values: always, never, if-no-source)",
"when to try to decompile the current function with ghidra (slow and requires radare2/r2pipe or rizin/rzpipe) (valid values: always, never, if-no-source)",
)