From cb2ae6753a424b84c9c5eeb5b0513c6d16a5bf84 Mon Sep 17 00:00:00 2001 From: k4lizen <124312252+k4lizen@users.noreply.github.com> Date: Thu, 22 May 2025 14:06:18 +0200 Subject: [PATCH] Show differences in debuggers in the documentation (#2996) * cleanly handle parameter differences * cleanly handle command differences * cleanly handle function differences * add note about supported debuggers for commands and parameters * reduce h1 bottom margin * make it more obvious we only support functions in gdb * autogen docs * fixup buddydump * uppercase debugger name in supported debuggers message * update docs --- .../commands/breakpoint/break-if-not-taken.md | 7 +- docs/commands/breakpoint/break-if-taken.md | 7 +- docs/commands/breakpoint/breakrva.md | 7 +- docs/commands/breakpoint/ignore.md | 7 +- docs/commands/context/context.md | 6 - docs/commands/context/contextnext.md | 6 - docs/commands/context/contextoutput.md | 6 - docs/commands/context/contextprev.md | 6 - docs/commands/context/contextsearch.md | 6 - docs/commands/context/contextunwatch.md | 6 - docs/commands/context/contextwatch.md | 6 - docs/commands/context/regs.md | 6 - .../developer/dev-dump-instruction.md | 6 - docs/commands/developer/log-level.md | 6 - docs/commands/disassemble/emulate.md | 6 - docs/commands/disassemble/nearpc.md | 6 - docs/commands/glibc_ptmalloc2_heap/arena.md | 6 - docs/commands/glibc_ptmalloc2_heap/arenas.md | 6 - docs/commands/glibc_ptmalloc2_heap/bins.md | 6 - .../commands/glibc_ptmalloc2_heap/fastbins.md | 6 - .../glibc_ptmalloc2_heap/find-fake-fast.md | 6 - docs/commands/glibc_ptmalloc2_heap/heap.md | 6 - docs/commands/glibc_ptmalloc2_heap/hi.md | 6 - .../glibc_ptmalloc2_heap/largebins.md | 6 - .../glibc_ptmalloc2_heap/malloc-chunk.md | 6 - docs/commands/glibc_ptmalloc2_heap/mp.md | 6 - .../glibc_ptmalloc2_heap/smallbins.md | 6 - docs/commands/glibc_ptmalloc2_heap/tcache.md | 6 - .../glibc_ptmalloc2_heap/tcachebins.md | 6 - .../glibc_ptmalloc2_heap/top-chunk.md | 6 - .../commands/glibc_ptmalloc2_heap/try-free.md | 6 - .../glibc_ptmalloc2_heap/unsortedbin.md | 6 - .../glibc_ptmalloc2_heap/vis-heap-chunks.md | 6 - docs/commands/integrations/ai.md | 7 +- docs/commands/integrations/bn-sync.md | 6 - docs/commands/integrations/decomp.md | 6 - docs/commands/integrations/j.md | 7 +- docs/commands/integrations/r2.md | 5 - docs/commands/integrations/r2pipe.md | 5 - docs/commands/integrations/rop.md | 5 - docs/commands/integrations/ropper.md | 6 +- docs/commands/integrations/rz.md | 5 - docs/commands/integrations/rzpipe.md | 5 - docs/commands/integrations/save-ida.md | 7 +- .../jemalloc_heap/jemalloc-extent-info.md | 6 - .../jemalloc_heap/jemalloc-find-extent.md | 6 - docs/commands/jemalloc_heap/jemalloc-heap.md | 6 - docs/commands/kernel/binder.md | 6 - docs/commands/kernel/buddydump.md | 6 - docs/commands/kernel/kbase.md | 6 - docs/commands/kernel/kchecksec.md | 6 - docs/commands/kernel/kcmdline.md | 6 - docs/commands/kernel/kconfig.md | 6 - docs/commands/kernel/klookup.md | 6 - docs/commands/kernel/knft-dump.md | 6 - docs/commands/kernel/knft-list-chains.md | 6 - docs/commands/kernel/knft-list-exprs.md | 6 - docs/commands/kernel/knft-list-flowtables.md | 6 - docs/commands/kernel/knft-list-objects.md | 6 - docs/commands/kernel/knft-list-rules.md | 6 - docs/commands/kernel/knft-list-sets.md | 6 - docs/commands/kernel/knft-list-tables.md | 6 - docs/commands/kernel/kversion.md | 6 - docs/commands/kernel/msr.md | 6 - docs/commands/kernel/slab.md | 6 - docs/commands/linux_libc_elf/argc.md | 6 - docs/commands/linux_libc_elf/argv.md | 6 - docs/commands/linux_libc_elf/aslr.md | 6 - docs/commands/linux_libc_elf/auxv-explore.md | 6 - docs/commands/linux_libc_elf/auxv.md | 6 - docs/commands/linux_libc_elf/elfsections.md | 6 - docs/commands/linux_libc_elf/envp.md | 6 - docs/commands/linux_libc_elf/errno.md | 6 - docs/commands/linux_libc_elf/got.md | 7 +- docs/commands/linux_libc_elf/gotplt.md | 6 - docs/commands/linux_libc_elf/libcinfo.md | 6 - docs/commands/linux_libc_elf/linkmap.md | 6 - docs/commands/linux_libc_elf/onegadget.md | 6 - docs/commands/linux_libc_elf/piebase.md | 6 - docs/commands/linux_libc_elf/plt.md | 6 - docs/commands/linux_libc_elf/strings.md | 6 - docs/commands/linux_libc_elf/threads.md | 6 - docs/commands/linux_libc_elf/tls.md | 6 - docs/commands/linux_libc_elf/track-got.md | 7 +- docs/commands/linux_libc_elf/track-heap.md | 7 +- docs/commands/memory/distance.md | 6 - docs/commands/memory/dump-register-frame.md | 6 - docs/commands/memory/gdt.md | 6 - docs/commands/memory/go-dump.md | 6 - docs/commands/memory/go-type.md | 6 - docs/commands/memory/hexdump.md | 6 - docs/commands/memory/leakfind.md | 6 - docs/commands/memory/memfrob.md | 6 - docs/commands/memory/mmap.md | 6 - docs/commands/memory/mprotect.md | 6 - docs/commands/memory/p2p.md | 6 - docs/commands/memory/probeleak.md | 6 - docs/commands/memory/search.md | 6 - docs/commands/memory/telescope.md | 6 - docs/commands/memory/vmmap-add.md | 6 - docs/commands/memory/vmmap-clear.md | 6 - docs/commands/memory/vmmap-explore.md | 6 - docs/commands/memory/vmmap.md | 6 - docs/commands/memory/xinfo.md | 6 - docs/commands/memory/xor.md | 6 - docs/commands/misc/asm.md | 6 - docs/commands/misc/checksec.md | 5 - docs/commands/misc/comm.md | 6 - docs/commands/misc/cyclic.md | 6 - docs/commands/misc/cymbol.md | 7 +- docs/commands/misc/down.md | 7 +- docs/commands/misc/dt.md | 6 - docs/commands/misc/dumpargs.md | 6 - docs/commands/misc/getfile.md | 7 +- docs/commands/misc/hex2ptr.md | 6 - docs/commands/misc/hijack-fd.md | 6 - docs/commands/misc/ipi.md | 7 +- docs/commands/misc/patch-list.md | 6 - docs/commands/misc/patch-revert.md | 6 - docs/commands/misc/patch.md | 6 - docs/commands/misc/plist.md | 6 - docs/commands/misc/sigreturn.md | 6 - docs/commands/misc/spray.md | 6 - docs/commands/misc/tips.md | 6 - docs/commands/misc/up.md | 7 +- docs/commands/misc/valist.md | 6 - docs/commands/misc/vmmap-load.md | 6 - docs/commands/process/killthreads.md | 7 +- docs/commands/process/pid.md | 6 - docs/commands/process/procinfo.md | 6 - docs/commands/pwndbg/bugreport.md | 6 - docs/commands/pwndbg/config.md | 6 - docs/commands/pwndbg/configfile.md | 7 +- docs/commands/pwndbg/heap-config.md | 6 - docs/commands/pwndbg/memoize.md | 6 - docs/commands/pwndbg/profiler.md | 6 - docs/commands/pwndbg/pwndbg.md | 6 - docs/commands/pwndbg/reinit-pwndbg.md | 7 +- docs/commands/pwndbg/reload.md | 7 +- docs/commands/pwndbg/theme.md | 6 - docs/commands/pwndbg/themefile.md | 7 +- docs/commands/pwndbg/version.md | 7 +- docs/commands/register/cpsr.md | 6 - docs/commands/register/fsbase.md | 7 +- docs/commands/register/gsbase.md | 7 +- docs/commands/register/setflag.md | 5 - docs/commands/stack/canary.md | 6 - docs/commands/stack/retaddr.md | 6 - docs/commands/stack/stack-explore.md | 6 - docs/commands/stack/stack.md | 6 - docs/commands/stack/stackf.md | 6 - docs/commands/start/attachp.md | 7 +- docs/commands/start/entry.md | 6 - docs/commands/start/sstart.md | 7 +- docs/commands/start/start.md | 7 +- docs/commands/step_next_continue/nextcall.md | 6 - docs/commands/step_next_continue/nextjmp.md | 6 - .../step_next_continue/nextproginstr.md | 6 - docs/commands/step_next_continue/nextret.md | 6 - .../step_next_continue/nextsyscall.md | 6 - docs/commands/step_next_continue/stepover.md | 6 - docs/commands/step_next_continue/stepret.md | 6 - .../step_next_continue/stepsyscall.md | 6 - .../step_next_continue/stepuntilasm.md | 6 - docs/commands/step_next_continue/xuntil.md | 7 +- docs/commands/windbg/bc.md | 7 +- docs/commands/windbg/bd.md | 7 +- docs/commands/windbg/be.md | 7 +- docs/commands/windbg/bl.md | 7 +- docs/commands/windbg/bp.md | 7 +- docs/commands/windbg/da.md | 6 - docs/commands/windbg/db.md | 6 - docs/commands/windbg/dc.md | 6 - docs/commands/windbg/dd.md | 6 - docs/commands/windbg/dds.md | 6 - docs/commands/windbg/dq.md | 6 - docs/commands/windbg/ds.md | 6 - docs/commands/windbg/dw.md | 6 - docs/commands/windbg/eb.md | 6 - docs/commands/windbg/ed.md | 6 - docs/commands/windbg/eq.md | 6 - docs/commands/windbg/ew.md | 6 - docs/commands/windbg/ez.md | 6 - docs/commands/windbg/eza.md | 6 - docs/commands/windbg/go.md | 7 +- docs/commands/windbg/k.md | 7 +- docs/commands/windbg/ln.md | 6 - docs/commands/windbg/pc.md | 6 - docs/commands/windbg/peb.md | 6 - docs/configuration/config.md | 17 +++ docs/configuration/heap.md | 138 +++++++++++------- docs/functions/index.md | 2 +- docs/stylesheets/extra.css | 4 + mkdocs.yml | 12 +- scripts/_docs/build_command_docs.py | 67 +++++---- scripts/_docs/build_configuration_docs.py | 64 +++++--- scripts/_docs/build_function_docs.py | 83 +++++++---- 197 files changed, 288 insertions(+), 1260 deletions(-) diff --git a/docs/commands/breakpoint/break-if-not-taken.md b/docs/commands/breakpoint/break-if-not-taken.md index 946ee9900..9cf04b73c 100644 --- a/docs/commands/breakpoint/break-if-not-taken.md +++ b/docs/commands/breakpoint/break-if-not-taken.md @@ -1,10 +1,6 @@ - - - - # break-if-not-taken - +(only in GDB) ```text usage: break-if-not-taken [-h] branch @@ -24,6 +20,5 @@ Breaks on a branch if it is not taken. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/breakpoint/break-if-taken.md b/docs/commands/breakpoint/break-if-taken.md index 8bd98238f..3e1aee0d3 100644 --- a/docs/commands/breakpoint/break-if-taken.md +++ b/docs/commands/breakpoint/break-if-taken.md @@ -1,10 +1,6 @@ - - - - # break-if-taken - +(only in GDB) ```text usage: break-if-taken [-h] branch @@ -24,6 +20,5 @@ Breaks on a branch if it is taken. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/breakpoint/breakrva.md b/docs/commands/breakpoint/breakrva.md index ad64e06bd..9b234291c 100644 --- a/docs/commands/breakpoint/breakrva.md +++ b/docs/commands/breakpoint/breakrva.md @@ -1,10 +1,6 @@ - - - - # breakrva - +(only in GDB) ```text usage: breakrva [-h] [offset] [module] @@ -27,6 +23,5 @@ Break at RVA from PIE base. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/breakpoint/ignore.md b/docs/commands/breakpoint/ignore.md index 45763b371..cb115c70f 100644 --- a/docs/commands/breakpoint/ignore.md +++ b/docs/commands/breakpoint/ignore.md @@ -1,10 +1,6 @@ - - - - # ignore - +(only in GDB) ```text usage: ignore [-h] [N] COUNT @@ -29,6 +25,5 @@ By default, if `N' is ommitted, the last breakpoint (i.e. greatest breakpoint nu | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/context/context.md b/docs/commands/context/context.md index 50dcd2a2e..2718d66ef 100644 --- a/docs/commands/context/context.md +++ b/docs/commands/context/context.md @@ -1,11 +1,6 @@ - - - - # context - ```text usage: context [-h] [--on] [--off] [subcontext ...] @@ -28,6 +23,5 @@ Print out the current register, instruction, and stack context. ||--on|Show the section(s) in subsequent context commands again. The section(s) have to be in the 'context-sections' list.| ||--off|Do not show the section(s) in subsequent context commands even though they might be in the 'context-sections' list.| - diff --git a/docs/commands/context/contextnext.md b/docs/commands/context/contextnext.md index b352d654e..d577cfa09 100644 --- a/docs/commands/context/contextnext.md +++ b/docs/commands/context/contextnext.md @@ -1,11 +1,6 @@ - - - - # contextnext - ```text usage: contextnext [-h] [count] @@ -26,6 +21,5 @@ Select next entry in context history. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/context/contextoutput.md b/docs/commands/context/contextoutput.md index 52a030e4f..d8cb5b82f 100644 --- a/docs/commands/context/contextoutput.md +++ b/docs/commands/context/contextoutput.md @@ -1,11 +1,6 @@ - - - - # contextoutput - ```text usage: contextoutput [-h] section path clearing [banner] [width] @@ -30,6 +25,5 @@ Sets the output of a context section. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/context/contextprev.md b/docs/commands/context/contextprev.md index bb1129b75..b46fa653d 100644 --- a/docs/commands/context/contextprev.md +++ b/docs/commands/context/contextprev.md @@ -1,11 +1,6 @@ - - - - # contextprev - ```text usage: contextprev [-h] [count] @@ -26,6 +21,5 @@ Select previous entry in context history. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/context/contextsearch.md b/docs/commands/context/contextsearch.md index 3ffc3e91f..515d767c2 100644 --- a/docs/commands/context/contextsearch.md +++ b/docs/commands/context/contextsearch.md @@ -1,11 +1,6 @@ - - - - # contextsearch - ```text usage: contextsearch [-h] needle [section] @@ -27,6 +22,5 @@ Search for a string in the context history and select that entry. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/context/contextunwatch.md b/docs/commands/context/contextunwatch.md index 5e4aadb44..4f4779c48 100644 --- a/docs/commands/context/contextunwatch.md +++ b/docs/commands/context/contextunwatch.md @@ -1,11 +1,6 @@ - - - - # contextunwatch - ```text usage: contextunwatch [-h] num @@ -26,6 +21,5 @@ Removes an expression previously added to be watched. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/context/contextwatch.md b/docs/commands/context/contextwatch.md index d750a3d90..1c9c07f1e 100644 --- a/docs/commands/context/contextwatch.md +++ b/docs/commands/context/contextwatch.md @@ -1,11 +1,6 @@ - - - - # contextwatch - ```text usage: contextwatch [-h] [{eval,execute}] expression @@ -29,6 +24,5 @@ To remove an expression, see `cunwatch`. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/context/regs.md b/docs/commands/context/regs.md index 15f24a4f0..489c65624 100644 --- a/docs/commands/context/regs.md +++ b/docs/commands/context/regs.md @@ -1,11 +1,6 @@ - - - - # regs - ```text usage: regs [-h] [regs ...] @@ -24,6 +19,5 @@ Print out all registers and enhance the information. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/developer/dev-dump-instruction.md b/docs/commands/developer/dev-dump-instruction.md index b36be3528..b350155ee 100644 --- a/docs/commands/developer/dev-dump-instruction.md +++ b/docs/commands/developer/dev-dump-instruction.md @@ -1,11 +1,6 @@ - - - - # dev-dump-instruction - ```text usage: dev-dump-instruction [-h] [-e] [-n] [address] @@ -26,6 +21,5 @@ Dump internal PwndbgInstruction attributes. |-e|--emulate|Force the use of emulation when enhancing the instruction, regardless of global 'emulate' setting.| |-n|--no-emulate|Disable the use of emulation when enhancing the instruction, regardless of global 'emulate' setting.| - diff --git a/docs/commands/developer/log-level.md b/docs/commands/developer/log-level.md index 4f45a4656..ff4ab4272 100644 --- a/docs/commands/developer/log-level.md +++ b/docs/commands/developer/log-level.md @@ -1,11 +1,6 @@ - - - - # log-level - ```text usage: log-level [-h] [{debug,info,warning,error,critical}] @@ -24,6 +19,5 @@ Set the log level. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/disassemble/emulate.md b/docs/commands/disassemble/emulate.md index d12916ac3..8bf396566 100644 --- a/docs/commands/disassemble/emulate.md +++ b/docs/commands/disassemble/emulate.md @@ -1,11 +1,6 @@ - - - - # emulate - ```text usage: emulate [-h] [pc] [lines] @@ -25,6 +20,5 @@ Like nearpc, but will emulate instructions from the current $PC forward. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/disassemble/nearpc.md b/docs/commands/disassemble/nearpc.md index b1a98da00..ce59f752c 100644 --- a/docs/commands/disassemble/nearpc.md +++ b/docs/commands/disassemble/nearpc.md @@ -1,11 +1,6 @@ - - - - # nearpc - ```text usage: nearpc [-h] [-e] [pc] [lines] @@ -28,6 +23,5 @@ Disassemble near a specified address. |-h|--help|show this help message and exit| |-e|--emulate|Whether to emulate instructions to find the next ones or just linearly disassemble.| - diff --git a/docs/commands/glibc_ptmalloc2_heap/arena.md b/docs/commands/glibc_ptmalloc2_heap/arena.md index 4ea263aad..81255cb56 100644 --- a/docs/commands/glibc_ptmalloc2_heap/arena.md +++ b/docs/commands/glibc_ptmalloc2_heap/arena.md @@ -1,11 +1,6 @@ - - - - # arena - ```text usage: arena [-h] [addr] @@ -26,6 +21,5 @@ Default to the current thread's arena. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/glibc_ptmalloc2_heap/arenas.md b/docs/commands/glibc_ptmalloc2_heap/arenas.md index caa6c2b46..0dbfbc05e 100644 --- a/docs/commands/glibc_ptmalloc2_heap/arenas.md +++ b/docs/commands/glibc_ptmalloc2_heap/arenas.md @@ -1,11 +1,6 @@ - - - - # arenas - ```text usage: arenas [-h] @@ -18,6 +13,5 @@ List this process's arenas. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/glibc_ptmalloc2_heap/bins.md b/docs/commands/glibc_ptmalloc2_heap/bins.md index 731638384..f90c70f5b 100644 --- a/docs/commands/glibc_ptmalloc2_heap/bins.md +++ b/docs/commands/glibc_ptmalloc2_heap/bins.md @@ -1,11 +1,6 @@ - - - - # bins - ```text usage: bins [-h] [addr] [tcache_addr] @@ -27,6 +22,5 @@ Default to the current thread's arena and tcache. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/glibc_ptmalloc2_heap/fastbins.md b/docs/commands/glibc_ptmalloc2_heap/fastbins.md index de88da6a0..16ed25a5d 100644 --- a/docs/commands/glibc_ptmalloc2_heap/fastbins.md +++ b/docs/commands/glibc_ptmalloc2_heap/fastbins.md @@ -1,11 +1,6 @@ - - - - # fastbins - ```text usage: fastbins [-h] [-v] [addr] @@ -27,6 +22,5 @@ Default to the current thread's arena. |-h|--help|show this help message and exit| |-v|--verbose|Show all fastbins, including empty ones| - diff --git a/docs/commands/glibc_ptmalloc2_heap/find-fake-fast.md b/docs/commands/glibc_ptmalloc2_heap/find-fake-fast.md index 2b274df85..8b08c8175 100644 --- a/docs/commands/glibc_ptmalloc2_heap/find-fake-fast.md +++ b/docs/commands/glibc_ptmalloc2_heap/find-fake-fast.md @@ -1,11 +1,6 @@ - - - - # find-fake-fast - ```text usage: find-fake-fast [-h] [--align] [--glibc-fastbin-bug] [--partial-overwrite] @@ -30,6 +25,5 @@ Find candidate fake fast or tcache chunks overlapping the specified address. |-b|--glibc-fastbin-bug|Does the GLIBC fastbin size field bug affect the candidate size field width?| |-p|--partial-overwrite|Consider partial overwrite candidates, default behavior only shows word-size overwrites.| - diff --git a/docs/commands/glibc_ptmalloc2_heap/heap.md b/docs/commands/glibc_ptmalloc2_heap/heap.md index 826b53e49..06f38c7e7 100644 --- a/docs/commands/glibc_ptmalloc2_heap/heap.md +++ b/docs/commands/glibc_ptmalloc2_heap/heap.md @@ -1,11 +1,6 @@ - - - - # heap - ```text usage: heap [-h] [-v] [-s] [addr] @@ -28,6 +23,5 @@ Default to the current thread's active heap. |-v|--verbose|Print all chunk fields, even unused ones.| |-s|--simple|Simply print malloc_chunk struct's contents.| - diff --git a/docs/commands/glibc_ptmalloc2_heap/hi.md b/docs/commands/glibc_ptmalloc2_heap/hi.md index ade9f793f..088cde0e7 100644 --- a/docs/commands/glibc_ptmalloc2_heap/hi.md +++ b/docs/commands/glibc_ptmalloc2_heap/hi.md @@ -1,11 +1,6 @@ - - - - # hi - ```text usage: hi [-h] [-v] [-s] [-f] addr @@ -27,6 +22,5 @@ Searches all heaps to find if an address belongs to a chunk. If yes, prints the |-s|--simple|Simply print malloc_chunk struct's contents.| |-f|--fake|Allow fake chunks. If set, displays any memory as a heap chunk (even if its not a real chunk).| - diff --git a/docs/commands/glibc_ptmalloc2_heap/largebins.md b/docs/commands/glibc_ptmalloc2_heap/largebins.md index 5af26203a..8c15db42b 100644 --- a/docs/commands/glibc_ptmalloc2_heap/largebins.md +++ b/docs/commands/glibc_ptmalloc2_heap/largebins.md @@ -1,11 +1,6 @@ - - - - # largebins - ```text usage: largebins [-h] [-v] [addr] @@ -27,6 +22,5 @@ Default to the current thread's arena. |-h|--help|show this help message and exit| |-v|--verbose|Show all largebins, including empty ones| - diff --git a/docs/commands/glibc_ptmalloc2_heap/malloc-chunk.md b/docs/commands/glibc_ptmalloc2_heap/malloc-chunk.md index 6cbf9df2d..248700ce1 100644 --- a/docs/commands/glibc_ptmalloc2_heap/malloc-chunk.md +++ b/docs/commands/glibc_ptmalloc2_heap/malloc-chunk.md @@ -1,11 +1,6 @@ - - - - # malloc-chunk - ```text usage: malloc-chunk [-h] [-f] [-v] [-s] [-d] [-n NEXT] addr @@ -29,6 +24,5 @@ Print a chunk. |-d|--dump|Print a hexdump of the chunk.| |-n|--next|Print the next N chunks after the specified address. (default: 0)| - diff --git a/docs/commands/glibc_ptmalloc2_heap/mp.md b/docs/commands/glibc_ptmalloc2_heap/mp.md index 938e27662..b9f08610e 100644 --- a/docs/commands/glibc_ptmalloc2_heap/mp.md +++ b/docs/commands/glibc_ptmalloc2_heap/mp.md @@ -1,11 +1,6 @@ - - - - # mp - ```text usage: mp [-h] @@ -18,6 +13,5 @@ Print the mp_ struct's contents. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/glibc_ptmalloc2_heap/smallbins.md b/docs/commands/glibc_ptmalloc2_heap/smallbins.md index 12952cd4a..8c236dce7 100644 --- a/docs/commands/glibc_ptmalloc2_heap/smallbins.md +++ b/docs/commands/glibc_ptmalloc2_heap/smallbins.md @@ -1,11 +1,6 @@ - - - - # smallbins - ```text usage: smallbins [-h] [-v] [addr] @@ -27,6 +22,5 @@ Default to the current thread's arena. |-h|--help|show this help message and exit| |-v|--verbose|Show all smallbins, including empty ones| - diff --git a/docs/commands/glibc_ptmalloc2_heap/tcache.md b/docs/commands/glibc_ptmalloc2_heap/tcache.md index 356ea8cdf..dcbb42100 100644 --- a/docs/commands/glibc_ptmalloc2_heap/tcache.md +++ b/docs/commands/glibc_ptmalloc2_heap/tcache.md @@ -1,11 +1,6 @@ - - - - # tcache - ```text usage: tcache [-h] [addr] @@ -26,6 +21,5 @@ Default to the current thread's tcache. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/glibc_ptmalloc2_heap/tcachebins.md b/docs/commands/glibc_ptmalloc2_heap/tcachebins.md index 0fd8e225a..937f58cc0 100644 --- a/docs/commands/glibc_ptmalloc2_heap/tcachebins.md +++ b/docs/commands/glibc_ptmalloc2_heap/tcachebins.md @@ -1,11 +1,6 @@ - - - - # tcachebins - ```text usage: tcachebins [-h] [-v] [addr] @@ -27,6 +22,5 @@ Default to the current thread's tcache. |-h|--help|show this help message and exit| |-v|--verbose|Show all tcachebins, including empty ones| - diff --git a/docs/commands/glibc_ptmalloc2_heap/top-chunk.md b/docs/commands/glibc_ptmalloc2_heap/top-chunk.md index b05e28910..e5fd7a365 100644 --- a/docs/commands/glibc_ptmalloc2_heap/top-chunk.md +++ b/docs/commands/glibc_ptmalloc2_heap/top-chunk.md @@ -1,11 +1,6 @@ - - - - # top-chunk - ```text usage: top-chunk [-h] [addr] @@ -26,6 +21,5 @@ Default to current thread's arena. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/glibc_ptmalloc2_heap/try-free.md b/docs/commands/glibc_ptmalloc2_heap/try-free.md index 3983299f8..ab7ff490a 100644 --- a/docs/commands/glibc_ptmalloc2_heap/try-free.md +++ b/docs/commands/glibc_ptmalloc2_heap/try-free.md @@ -1,11 +1,6 @@ - - - - # try-free - ```text usage: try-free [-h] addr @@ -24,6 +19,5 @@ Check what would happen if free was called with given address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/glibc_ptmalloc2_heap/unsortedbin.md b/docs/commands/glibc_ptmalloc2_heap/unsortedbin.md index c5ea7757c..8e2dde0eb 100644 --- a/docs/commands/glibc_ptmalloc2_heap/unsortedbin.md +++ b/docs/commands/glibc_ptmalloc2_heap/unsortedbin.md @@ -1,11 +1,6 @@ - - - - # unsortedbin - ```text usage: unsortedbin [-h] [-v] [addr] @@ -27,6 +22,5 @@ Default to the current thread's arena. |-h|--help|show this help message and exit| |-v|--verbose|Show the "all" bin even if it's empty| - diff --git a/docs/commands/glibc_ptmalloc2_heap/vis-heap-chunks.md b/docs/commands/glibc_ptmalloc2_heap/vis-heap-chunks.md index ec7a7041d..a1ff99c5c 100644 --- a/docs/commands/glibc_ptmalloc2_heap/vis-heap-chunks.md +++ b/docs/commands/glibc_ptmalloc2_heap/vis-heap-chunks.md @@ -1,11 +1,6 @@ - - - - # vis-heap-chunks - ```text usage: vis-heap-chunks [-h] [--beyond_top] [--no_truncate] [--all_chunks] [count] [addr] @@ -33,6 +28,5 @@ Default to the current arena's active heap. |-n|--no_truncate|Display all the chunk contents (Ignore the `max-visualize-chunk-size` configuration).| |-a|--all_chunks| Display all chunks (Ignore the default-visualize-chunk-number configuration).| - diff --git a/docs/commands/integrations/ai.md b/docs/commands/integrations/ai.md index 3da921543..9748f26d2 100644 --- a/docs/commands/integrations/ai.md +++ b/docs/commands/integrations/ai.md @@ -1,10 +1,6 @@ - - - - # ai - +(only in GDB) ```text usage: ai [-h] [-M MODEL] [-t TEMPERATURE] [-m MAX_TOKENS] [-v] [-L] @@ -32,6 +28,5 @@ Ask GPT-3 a question about the current debugging context. |-L|--list-models|List the available models.| |-c|--command|Run a command in the GDB debugger and ask a question about the output.| - diff --git a/docs/commands/integrations/bn-sync.md b/docs/commands/integrations/bn-sync.md index aaaa51f27..52adbd8dd 100644 --- a/docs/commands/integrations/bn-sync.md +++ b/docs/commands/integrations/bn-sync.md @@ -1,11 +1,6 @@ - - - - # bn-sync - ```text usage: bn-sync [-h] @@ -20,6 +15,5 @@ Synchronize Binary Ninja's cursor with GDB. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/integrations/decomp.md b/docs/commands/integrations/decomp.md index 80d0662fe..f966209ba 100644 --- a/docs/commands/integrations/decomp.md +++ b/docs/commands/integrations/decomp.md @@ -1,11 +1,6 @@ - - - - # decomp - ```text usage: decomp [-h] [addr] [lines] @@ -25,6 +20,5 @@ Use the current integration to decompile code near an address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/integrations/j.md b/docs/commands/integrations/j.md index 0e3bc0597..64af7ac4f 100644 --- a/docs/commands/integrations/j.md +++ b/docs/commands/integrations/j.md @@ -1,10 +1,6 @@ - - - - # j - +(only in GDB) ```text usage: j [-h] @@ -18,6 +14,5 @@ Synchronize IDA's cursor with GDB. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/integrations/r2.md b/docs/commands/integrations/r2.md index 0b88630af..02a822104 100644 --- a/docs/commands/integrations/r2.md +++ b/docs/commands/integrations/r2.md @@ -1,11 +1,6 @@ - - - - # r2 - ```text usage: r2 [-h] [--no-seek] [--no-rebase] [arguments ...] diff --git a/docs/commands/integrations/r2pipe.md b/docs/commands/integrations/r2pipe.md index f62192ddc..6c921871c 100644 --- a/docs/commands/integrations/r2pipe.md +++ b/docs/commands/integrations/r2pipe.md @@ -1,11 +1,6 @@ - - - - # r2pipe - ```text usage: r2pipe [-h] arguments [arguments ...] diff --git a/docs/commands/integrations/rop.md b/docs/commands/integrations/rop.md index 7781c3f4b..95421b3be 100644 --- a/docs/commands/integrations/rop.md +++ b/docs/commands/integrations/rop.md @@ -1,11 +1,6 @@ - - - - # rop - ```text usage: rop [-h] [--grep GREP] [--memlimit MEMLIMIT] [argument ...] diff --git a/docs/commands/integrations/ropper.md b/docs/commands/integrations/ropper.md index 7f32b3d53..f2ed547b1 100644 --- a/docs/commands/integrations/ropper.md +++ b/docs/commands/integrations/ropper.md @@ -1,10 +1,6 @@ - - - - # ropper - +(only in GDB) ```text usage: ropper [-h] [argument ...] diff --git a/docs/commands/integrations/rz.md b/docs/commands/integrations/rz.md index 78d9ea74c..fdaf806cc 100644 --- a/docs/commands/integrations/rz.md +++ b/docs/commands/integrations/rz.md @@ -1,11 +1,6 @@ - - - - # rz - ```text usage: rz [-h] [--no-seek] [--no-rebase] [arguments ...] diff --git a/docs/commands/integrations/rzpipe.md b/docs/commands/integrations/rzpipe.md index f3d29df8a..1e918db51 100644 --- a/docs/commands/integrations/rzpipe.md +++ b/docs/commands/integrations/rzpipe.md @@ -1,11 +1,6 @@ - - - - # rzpipe - ```text usage: rzpipe [-h] arguments [arguments ...] diff --git a/docs/commands/integrations/save-ida.md b/docs/commands/integrations/save-ida.md index 2cb846d19..7aed618b2 100644 --- a/docs/commands/integrations/save-ida.md +++ b/docs/commands/integrations/save-ida.md @@ -1,10 +1,6 @@ - - - - # save-ida - +(only in GDB) ```text usage: save-ida [-h] @@ -18,6 +14,5 @@ Save the ida database. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/jemalloc_heap/jemalloc-extent-info.md b/docs/commands/jemalloc_heap/jemalloc-extent-info.md index 09bd72f28..75d8c70fd 100644 --- a/docs/commands/jemalloc_heap/jemalloc-extent-info.md +++ b/docs/commands/jemalloc_heap/jemalloc-extent-info.md @@ -1,11 +1,6 @@ - - - - # jemalloc-extent-info - ```text usage: jemalloc-extent-info [-h] [-v] addr @@ -25,6 +20,5 @@ Prints extent information for the given address |-h|--help|show this help message and exit| |-v|--verbose|Print all chunk fields, even unused ones.| - diff --git a/docs/commands/jemalloc_heap/jemalloc-find-extent.md b/docs/commands/jemalloc_heap/jemalloc-find-extent.md index 6c9c5a842..1041aafb1 100644 --- a/docs/commands/jemalloc_heap/jemalloc-find-extent.md +++ b/docs/commands/jemalloc_heap/jemalloc-find-extent.md @@ -1,11 +1,6 @@ - - - - # jemalloc-find-extent - ```text usage: jemalloc-find-extent [-h] addr @@ -24,6 +19,5 @@ Returns extent information for pointer address allocated by jemalloc | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/jemalloc_heap/jemalloc-heap.md b/docs/commands/jemalloc_heap/jemalloc-heap.md index bc75ff6d4..a90713de7 100644 --- a/docs/commands/jemalloc_heap/jemalloc-heap.md +++ b/docs/commands/jemalloc_heap/jemalloc-heap.md @@ -1,11 +1,6 @@ - - - - # jemalloc-heap - ```text usage: jemalloc-heap [-h] @@ -18,6 +13,5 @@ Prints all extents information | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/binder.md b/docs/commands/kernel/binder.md index f7269e10a..49f99c97e 100644 --- a/docs/commands/kernel/binder.md +++ b/docs/commands/kernel/binder.md @@ -1,11 +1,6 @@ - - - - # binder - ```text usage: binder [-h] @@ -18,6 +13,5 @@ Show Android Binder information | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/buddydump.md b/docs/commands/kernel/buddydump.md index 16e19892c..6bbc02ad4 100644 --- a/docs/commands/kernel/buddydump.md +++ b/docs/commands/kernel/buddydump.md @@ -1,11 +1,6 @@ - - - - # buddydump - ```text usage: buddydump [-h] [-z {DMA,DMA32,Normal,HighMem,Movable,Device}] [-o ORDER] @@ -28,6 +23,5 @@ Displays metadata and freelists of the buddy allocator. |-n|--node| (default: 0)| |-f|--find|The address to find in page free lists.| - diff --git a/docs/commands/kernel/kbase.md b/docs/commands/kernel/kbase.md index 5b8cd827f..5dd9c629a 100644 --- a/docs/commands/kernel/kbase.md +++ b/docs/commands/kernel/kbase.md @@ -1,11 +1,6 @@ - - - - # kbase - ```text usage: kbase [-h] [-r] @@ -19,6 +14,5 @@ Finds the kernel virtual base address. |-h|--help|show this help message and exit| |-r|--rebase|rebase loaded symbol file| - diff --git a/docs/commands/kernel/kchecksec.md b/docs/commands/kernel/kchecksec.md index eb00e2332..abfd32c86 100644 --- a/docs/commands/kernel/kchecksec.md +++ b/docs/commands/kernel/kchecksec.md @@ -1,11 +1,6 @@ - - - - # kchecksec - ```text usage: kchecksec [-h] @@ -18,6 +13,5 @@ Checks for kernel hardening configuration options. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/kcmdline.md b/docs/commands/kernel/kcmdline.md index 1ff40088f..21f262828 100644 --- a/docs/commands/kernel/kcmdline.md +++ b/docs/commands/kernel/kcmdline.md @@ -1,11 +1,6 @@ - - - - # kcmdline - ```text usage: kcmdline [-h] @@ -18,6 +13,5 @@ Return the kernel commandline (/proc/cmdline). | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/kconfig.md b/docs/commands/kernel/kconfig.md index 5979583cc..e921e2e2a 100644 --- a/docs/commands/kernel/kconfig.md +++ b/docs/commands/kernel/kconfig.md @@ -1,11 +1,6 @@ - - - - # kconfig - ```text usage: kconfig [-h] [config_name] @@ -24,6 +19,5 @@ Outputs the kernel config (requires CONFIG_IKCONFIG). | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/klookup.md b/docs/commands/kernel/klookup.md index 51e041903..255b6623d 100644 --- a/docs/commands/kernel/klookup.md +++ b/docs/commands/kernel/klookup.md @@ -1,11 +1,6 @@ - - - - # klookup - ```text usage: klookup [-h] symbol @@ -24,6 +19,5 @@ Lookup kernel symbols | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/knft-dump.md b/docs/commands/kernel/knft-dump.md index ea744d872..55bf86d59 100644 --- a/docs/commands/kernel/knft-dump.md +++ b/docs/commands/kernel/knft-dump.md @@ -1,11 +1,6 @@ - - - - # knft-dump - ```text usage: knft-dump [-h] [nsid] @@ -24,6 +19,5 @@ Dump all nftables: tables, chains, rules, expressions | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/knft-list-chains.md b/docs/commands/kernel/knft-list-chains.md index 328d21923..2e8c36710 100644 --- a/docs/commands/kernel/knft-list-chains.md +++ b/docs/commands/kernel/knft-list-chains.md @@ -1,11 +1,6 @@ - - - - # knft-list-chains - ```text usage: knft-list-chains [-h] [--nsid NSID] [table_family] [table_name] @@ -26,6 +21,5 @@ Dump netfilter chains form a specific table |-h|--help|show this help message and exit| |-n|--nsid|Network Namespace ID| - diff --git a/docs/commands/kernel/knft-list-exprs.md b/docs/commands/kernel/knft-list-exprs.md index fa39db098..76b772c23 100644 --- a/docs/commands/kernel/knft-list-exprs.md +++ b/docs/commands/kernel/knft-list-exprs.md @@ -1,11 +1,6 @@ - - - - # knft-list-exprs - ```text usage: knft-list-exprs [-h] [--nsid NSID] [table_family] [table_name] [chain_name] [rule_id] @@ -29,6 +24,5 @@ Dump only expressions from specific rule |-h|--help|show this help message and exit| |-n|--nsid|Network Namespace ID| - diff --git a/docs/commands/kernel/knft-list-flowtables.md b/docs/commands/kernel/knft-list-flowtables.md index 0dcf01924..a3a415c72 100644 --- a/docs/commands/kernel/knft-list-flowtables.md +++ b/docs/commands/kernel/knft-list-flowtables.md @@ -1,11 +1,6 @@ - - - - # knft-list-flowtables - ```text usage: knft-list-flowtables [-h] [--nsid NSID] [table_family] [table_name] @@ -26,6 +21,5 @@ Dump netfilter flowtables from a specific table |-h|--help|show this help message and exit| |-n|--nsid|Network Namespace ID| - diff --git a/docs/commands/kernel/knft-list-objects.md b/docs/commands/kernel/knft-list-objects.md index ef417211d..217b8c816 100644 --- a/docs/commands/kernel/knft-list-objects.md +++ b/docs/commands/kernel/knft-list-objects.md @@ -1,11 +1,6 @@ - - - - # knft-list-objects - ```text usage: knft-list-objects [-h] [--nsid NSID] [table_family] [table_name] @@ -26,6 +21,5 @@ Dump netfilter objects from a specific table |-h|--help|show this help message and exit| |-n|--nsid|Network Namespace ID| - diff --git a/docs/commands/kernel/knft-list-rules.md b/docs/commands/kernel/knft-list-rules.md index 10fcba4d1..7e253f0c0 100644 --- a/docs/commands/kernel/knft-list-rules.md +++ b/docs/commands/kernel/knft-list-rules.md @@ -1,11 +1,6 @@ - - - - # knft-list-rules - ```text usage: knft-list-rules [-h] [--nsid NSID] [table_family] [table_name] [chain_name] @@ -28,6 +23,5 @@ Dump netfilter rules form a specific chain |-h|--help|show this help message and exit| |-n|--nsid|Network Namespace ID| - diff --git a/docs/commands/kernel/knft-list-sets.md b/docs/commands/kernel/knft-list-sets.md index 4c1749233..89da4d48e 100644 --- a/docs/commands/kernel/knft-list-sets.md +++ b/docs/commands/kernel/knft-list-sets.md @@ -1,11 +1,6 @@ - - - - # knft-list-sets - ```text usage: knft-list-sets [-h] [--nsid NSID] [table_family] [table_name] @@ -26,6 +21,5 @@ Dump netfilter sets from a specific table |-h|--help|show this help message and exit| |-n|--nsid|Network Namespace ID| - diff --git a/docs/commands/kernel/knft-list-tables.md b/docs/commands/kernel/knft-list-tables.md index 16f4d161f..04ab1918c 100644 --- a/docs/commands/kernel/knft-list-tables.md +++ b/docs/commands/kernel/knft-list-tables.md @@ -1,11 +1,6 @@ - - - - # knft-list-tables - ```text usage: knft-list-tables [-h] [--nsid NSID] @@ -19,6 +14,5 @@ Dump netfliter tables from a specific network namespace |-h|--help|show this help message and exit| |-n|--nsid|Network Namespace ID| - diff --git a/docs/commands/kernel/kversion.md b/docs/commands/kernel/kversion.md index 583705a0f..ed76ce687 100644 --- a/docs/commands/kernel/kversion.md +++ b/docs/commands/kernel/kversion.md @@ -1,11 +1,6 @@ - - - - # kversion - ```text usage: kversion [-h] @@ -18,6 +13,5 @@ Outputs the kernel version (/proc/version). | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/kernel/msr.md b/docs/commands/kernel/msr.md index e37c9524f..5e20dfa83 100644 --- a/docs/commands/kernel/msr.md +++ b/docs/commands/kernel/msr.md @@ -1,11 +1,6 @@ - - - - # msr - ```text usage: msr [-h] [-w [write_value]] [-l] [-r [MSR_RANGE]] [msr] @@ -27,6 +22,5 @@ Read or write to Model Specific Register (MSR) |-l|--list|list common MSRs for the current arch| |-r|--range|dash separated range of MSRs to read (eg. --range=1-10 where 10 is included)| - diff --git a/docs/commands/kernel/slab.md b/docs/commands/kernel/slab.md index 51258c11c..6b63cbbda 100644 --- a/docs/commands/kernel/slab.md +++ b/docs/commands/kernel/slab.md @@ -1,11 +1,6 @@ - - - - # slab - ```text usage: slab [-h] {list,info,contains} ... @@ -24,6 +19,5 @@ Prints information about the slab allocator | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/argc.md b/docs/commands/linux_libc_elf/argc.md index d2145cca9..3615315ae 100644 --- a/docs/commands/linux_libc_elf/argc.md +++ b/docs/commands/linux_libc_elf/argc.md @@ -1,11 +1,6 @@ - - - - # argc - ```text usage: argc [-h] @@ -18,6 +13,5 @@ Prints out the number of arguments. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/argv.md b/docs/commands/linux_libc_elf/argv.md index a34bae604..2147d9bff 100644 --- a/docs/commands/linux_libc_elf/argv.md +++ b/docs/commands/linux_libc_elf/argv.md @@ -1,11 +1,6 @@ - - - - # argv - ```text usage: argv [-h] [i] @@ -24,6 +19,5 @@ Prints out the contents of argv. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/aslr.md b/docs/commands/linux_libc_elf/aslr.md index 21adc8d04..7e6aff900 100644 --- a/docs/commands/linux_libc_elf/aslr.md +++ b/docs/commands/linux_libc_elf/aslr.md @@ -1,11 +1,6 @@ - - - - # aslr - ```text usage: aslr [-h] [{on,off}] @@ -26,6 +21,5 @@ Does not take effect until the program is restarted. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/auxv-explore.md b/docs/commands/linux_libc_elf/auxv-explore.md index 68289c3b9..b0b97d397 100644 --- a/docs/commands/linux_libc_elf/auxv-explore.md +++ b/docs/commands/linux_libc_elf/auxv-explore.md @@ -1,11 +1,6 @@ - - - - # auxv-explore - ```text usage: auxv-explore [-h] @@ -18,6 +13,5 @@ Explore and print information from the Auxiliary ELF Vector. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/auxv.md b/docs/commands/linux_libc_elf/auxv.md index 5ae13fc10..70e533c05 100644 --- a/docs/commands/linux_libc_elf/auxv.md +++ b/docs/commands/linux_libc_elf/auxv.md @@ -1,11 +1,6 @@ - - - - # auxv - ```text usage: auxv [-h] @@ -18,6 +13,5 @@ Print information from the Auxiliary ELF Vector. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/elfsections.md b/docs/commands/linux_libc_elf/elfsections.md index 28abde46d..a33b8f581 100644 --- a/docs/commands/linux_libc_elf/elfsections.md +++ b/docs/commands/linux_libc_elf/elfsections.md @@ -1,11 +1,6 @@ - - - - # elfsections - ```text usage: elfsections [-h] @@ -18,6 +13,5 @@ Prints the section mappings contained in the ELF header. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/envp.md b/docs/commands/linux_libc_elf/envp.md index 8bc966274..5011404cf 100644 --- a/docs/commands/linux_libc_elf/envp.md +++ b/docs/commands/linux_libc_elf/envp.md @@ -1,11 +1,6 @@ - - - - # envp - ```text usage: envp [-h] [name] @@ -26,6 +21,5 @@ Prints out the contents of the environment. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/errno.md b/docs/commands/linux_libc_elf/errno.md index 6c97c1def..9387dbe2a 100644 --- a/docs/commands/linux_libc_elf/errno.md +++ b/docs/commands/linux_libc_elf/errno.md @@ -1,11 +1,6 @@ - - - - # errno - ```text usage: errno [-h] [err] @@ -24,6 +19,5 @@ Converts errno (or argument) to its string representation. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/got.md b/docs/commands/linux_libc_elf/got.md index 8ccdf31a2..bca53b228 100644 --- a/docs/commands/linux_libc_elf/got.md +++ b/docs/commands/linux_libc_elf/got.md @@ -1,10 +1,6 @@ - - - - # got - +(only in GDB) ```text usage: got [-h] [-p PATH_FILTER | -a] [-r] [symbol_filter] @@ -33,6 +29,5 @@ Examples: |-a|--all|Process all libs/obfjiles including the target executable.| |-r|--show-readonly|Also display read-only entries (which are filtered out by default).| - diff --git a/docs/commands/linux_libc_elf/gotplt.md b/docs/commands/linux_libc_elf/gotplt.md index 8fbea299e..ae07c5048 100644 --- a/docs/commands/linux_libc_elf/gotplt.md +++ b/docs/commands/linux_libc_elf/gotplt.md @@ -1,11 +1,6 @@ - - - - # gotplt - ```text usage: gotplt [-h] @@ -18,6 +13,5 @@ Prints any symbols found in the .got.plt section if it exists. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/libcinfo.md b/docs/commands/linux_libc_elf/libcinfo.md index 8e2268cc9..afa7d794e 100644 --- a/docs/commands/linux_libc_elf/libcinfo.md +++ b/docs/commands/linux_libc_elf/libcinfo.md @@ -1,11 +1,6 @@ - - - - # libcinfo - ```text usage: libcinfo [-h] @@ -18,6 +13,5 @@ Show libc version and link to its sources | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/linkmap.md b/docs/commands/linux_libc_elf/linkmap.md index 55f0471f6..177484f52 100644 --- a/docs/commands/linux_libc_elf/linkmap.md +++ b/docs/commands/linux_libc_elf/linkmap.md @@ -1,11 +1,6 @@ - - - - # linkmap - ```text usage: linkmap [-h] @@ -18,6 +13,5 @@ Show the state of the Link Map | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/onegadget.md b/docs/commands/linux_libc_elf/onegadget.md index b826d917e..176da684e 100644 --- a/docs/commands/linux_libc_elf/onegadget.md +++ b/docs/commands/linux_libc_elf/onegadget.md @@ -1,11 +1,6 @@ - - - - # onegadget - ```text usage: onegadget [-h] [--show-unsat] [--no-unknown] [-v] @@ -23,6 +18,5 @@ Uses the onegadget tool by david942j. ||--no-unknown|Do not show unknown gadgets.| |-v|--verbose|Show verbose output.| - diff --git a/docs/commands/linux_libc_elf/piebase.md b/docs/commands/linux_libc_elf/piebase.md index 085b573c5..5b74f1b25 100644 --- a/docs/commands/linux_libc_elf/piebase.md +++ b/docs/commands/linux_libc_elf/piebase.md @@ -1,11 +1,6 @@ - - - - # piebase - ```text usage: piebase [-h] [offset] [module] @@ -25,6 +20,5 @@ Calculate VA of RVA from PIE base. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/plt.md b/docs/commands/linux_libc_elf/plt.md index 284f1f871..65b75f3e9 100644 --- a/docs/commands/linux_libc_elf/plt.md +++ b/docs/commands/linux_libc_elf/plt.md @@ -1,11 +1,6 @@ - - - - # plt - ```text usage: plt [-h] @@ -18,6 +13,5 @@ Prints any symbols found in Procedure Linkage Table sections if any exist. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/strings.md b/docs/commands/linux_libc_elf/strings.md index d1009465b..894499ef6 100644 --- a/docs/commands/linux_libc_elf/strings.md +++ b/docs/commands/linux_libc_elf/strings.md @@ -1,11 +1,6 @@ - - - - # strings - ```text usage: strings [-h] [-n N] [--save-as SAVE_AS] [page_names ...] @@ -26,6 +21,5 @@ Extracts and displays ASCII strings from readable memory pages of the debugged p |-n||Minimum length of ASCII strings to include (default: 4)| ||--save-as|Sets the filename for the output of this command [e.g. --save-as='out.txt']| - diff --git a/docs/commands/linux_libc_elf/threads.md b/docs/commands/linux_libc_elf/threads.md index 2f921e316..221640be4 100644 --- a/docs/commands/linux_libc_elf/threads.md +++ b/docs/commands/linux_libc_elf/threads.md @@ -1,11 +1,6 @@ - - - - # threads - ```text usage: threads [-h] [-c] [num_threads] @@ -25,6 +20,5 @@ List all threads belonging to the selected inferior. |-h|--help|show this help message and exit| |-c|--config|Respect context-max-threads config to limit number of threads displayed.| - diff --git a/docs/commands/linux_libc_elf/tls.md b/docs/commands/linux_libc_elf/tls.md index 20ec17f33..7c60d260d 100644 --- a/docs/commands/linux_libc_elf/tls.md +++ b/docs/commands/linux_libc_elf/tls.md @@ -1,11 +1,6 @@ - - - - # tls - ```text usage: tls [-h] [-p] [-a] @@ -20,6 +15,5 @@ Print out base address of the current Thread Local Storage (TLS). |-p|--pthread-self|Try to get the address of TLS by calling pthread_self().| |-a|--all|Do not truncate the dump output.| - diff --git a/docs/commands/linux_libc_elf/track-got.md b/docs/commands/linux_libc_elf/track-got.md index 3c4aaea8f..fc0b6447e 100644 --- a/docs/commands/linux_libc_elf/track-got.md +++ b/docs/commands/linux_libc_elf/track-got.md @@ -1,10 +1,6 @@ - - - - # track-got - +(only in GDB) ```text usage: track-got [-h] {enable,disable,info,query} ... @@ -18,6 +14,5 @@ Controls GOT tracking | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/linux_libc_elf/track-heap.md b/docs/commands/linux_libc_elf/track-heap.md index 81feb09d2..9935f801f 100644 --- a/docs/commands/linux_libc_elf/track-heap.md +++ b/docs/commands/linux_libc_elf/track-heap.md @@ -1,10 +1,6 @@ - - - - # track-heap - +(only in GDB) ```text usage: track-heap [-h] {enable,disable,toggle-break} ... @@ -24,6 +20,5 @@ Currently, the following errors can be detected: | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/distance.md b/docs/commands/memory/distance.md index 31f2c4fdd..d1683e069 100644 --- a/docs/commands/memory/distance.md +++ b/docs/commands/memory/distance.md @@ -1,11 +1,6 @@ - - - - # distance - ```text usage: distance [-h] a [b] @@ -25,6 +20,5 @@ Print the distance between the two arguments, or print the offset to the address | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/dump-register-frame.md b/docs/commands/memory/dump-register-frame.md index a2ddd201a..14ccac4fb 100644 --- a/docs/commands/memory/dump-register-frame.md +++ b/docs/commands/memory/dump-register-frame.md @@ -1,11 +1,6 @@ - - - - # dump-register-frame - ```text usage: dump-register-frame [-h] [-p] {armcm-exception,armcm-exception2} [address] @@ -27,6 +22,5 @@ Display the registers saved to memory for a certain frame type |-h|--help|show this help message and exit| |-p|--print|Show addresses of frame values| - diff --git a/docs/commands/memory/gdt.md b/docs/commands/memory/gdt.md index 251edb6de..96a027c4b 100644 --- a/docs/commands/memory/gdt.md +++ b/docs/commands/memory/gdt.md @@ -1,11 +1,6 @@ - - - - # gdt - ```text usage: gdt [-h] address [count] @@ -32,6 +27,5 @@ In 64-bit mode, the Base and Limit values are ignored, each descriptor covers th | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/go-dump.md b/docs/commands/memory/go-dump.md index d5e512313..e0c53e272 100644 --- a/docs/commands/memory/go-dump.md +++ b/docs/commands/memory/go-dump.md @@ -1,11 +1,6 @@ - - - - # go-dump - ```text usage: go-dump [-h] [-x] [-f [DECIMALS]] [-d] [-p] ty address @@ -31,6 +26,5 @@ Dumps a Go value of a given type at a specified address. |-d|--debug|Shows debug info, like addresses for slice/map elements, slice capacity, etc.| |-p|--pretty|Enables pretty printing| - diff --git a/docs/commands/memory/go-type.md b/docs/commands/memory/go-type.md index 59bdf6552..414895310 100644 --- a/docs/commands/memory/go-type.md +++ b/docs/commands/memory/go-type.md @@ -1,11 +1,6 @@ - - - - # go-type - ```text usage: go-type [-h] address @@ -26,6 +21,5 @@ Dumps a Go runtime reflection type at a specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/hexdump.md b/docs/commands/memory/hexdump.md index 0ae8f15c8..9b6c3ffc9 100644 --- a/docs/commands/memory/hexdump.md +++ b/docs/commands/memory/hexdump.md @@ -1,11 +1,6 @@ - - - - # hexdump - ```text usage: hexdump [-h] [address] [count] @@ -25,6 +20,5 @@ Hexdumps data at the specified address or module name. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/leakfind.md b/docs/commands/memory/leakfind.md index 8919649b9..0085b65e2 100644 --- a/docs/commands/memory/leakfind.md +++ b/docs/commands/memory/leakfind.md @@ -1,11 +1,6 @@ - - - - # leakfind - ```text usage: leakfind [-h] [-p [PAGE_NAME]] [-o [MAX_OFFSET]] [-d [MAX_DEPTH]] [-s [STEP]] [--negative_offset [NEGATIVE_OFFSET]] @@ -34,6 +29,5 @@ Example: leakfind $rsp --page_name=filename --max_offset=0x48 --max_depth=6. Thi |-s|--step|Step to add between pointers so they are considered. For example, if this is 4 it would only consider pointers at an offset divisible by 4 from the starting pointer (default: 1)| ||--negative_offset|Max negative offset to search before an address when looking for a leak (default: 0)| - diff --git a/docs/commands/memory/memfrob.md b/docs/commands/memory/memfrob.md index 36325d20a..2f314ef7c 100644 --- a/docs/commands/memory/memfrob.md +++ b/docs/commands/memory/memfrob.md @@ -1,11 +1,6 @@ - - - - # memfrob - ```text usage: memfrob [-h] address count @@ -25,6 +20,5 @@ Memfrobs a region of memory (xor with '*'). | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/mmap.md b/docs/commands/memory/mmap.md index 0ad76bc9c..4966f9424 100644 --- a/docs/commands/memory/mmap.md +++ b/docs/commands/memory/mmap.md @@ -1,11 +1,6 @@ - - - - # mmap - ```text usage: mmap [-h] [--quiet] [--force] addr length [prot] [flags] [fd] [offset] @@ -56,6 +51,5 @@ Examples: |-q|--quiet|Disable address validity warnings and hints| |-f|--force|Force potentially unsafe actions to happen| - diff --git a/docs/commands/memory/mprotect.md b/docs/commands/memory/mprotect.md index 0a623bcdc..a9a286057 100644 --- a/docs/commands/memory/mprotect.md +++ b/docs/commands/memory/mprotect.md @@ -1,11 +1,6 @@ - - - - # mprotect - ```text usage: mprotect [-h] addr length prot @@ -36,6 +31,5 @@ Examples: | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/p2p.md b/docs/commands/memory/p2p.md index 13c949511..14639966b 100644 --- a/docs/commands/memory/p2p.md +++ b/docs/commands/memory/p2p.md @@ -1,11 +1,6 @@ - - - - # p2p - ```text usage: p2p [-h] mapping_names [mapping_names ...] @@ -26,6 +21,5 @@ Any chain length greater than 0 is valid. If only one mapping is given it just l | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/probeleak.md b/docs/commands/memory/probeleak.md index 6c31331ba..c5cfdfd12 100644 --- a/docs/commands/memory/probeleak.md +++ b/docs/commands/memory/probeleak.md @@ -1,11 +1,6 @@ - - - - # probeleak - ```text usage: probeleak [-h] [--max-distance MAX_DISTANCE] [--point-to POINT_TO] [--max-ptrs MAX_PTRS] [--flags FLAGS] @@ -35,6 +30,5 @@ Examples: ||--max-ptrs|Stop search after find n pointers, default 0 (default: 0)| ||--flags|flags of the page that you want the pointers point to. [e.g. rwx]| - diff --git a/docs/commands/memory/search.md b/docs/commands/memory/search.md index 919d33267..c81163320 100644 --- a/docs/commands/memory/search.md +++ b/docs/commands/memory/search.md @@ -1,11 +1,6 @@ - - - - # search - ```text usage: search [-h] [-t {byte,short,word,dword,qword,pointer,string,bytes,asm}] [-1] [-2] [-4] [-8] [-p] [--asm] @@ -51,6 +46,5 @@ By default search results are cached. If you want to cache all results, but only |-n|--next|Search only locations returned by previous search with --save| ||--trunc-out|Truncate the output to 20 results. Differs from --limit in that it will first save all search results| - diff --git a/docs/commands/memory/telescope.md b/docs/commands/memory/telescope.md index 36fe061e1..85a2f1d75 100644 --- a/docs/commands/memory/telescope.md +++ b/docs/commands/memory/telescope.md @@ -1,11 +1,6 @@ - - - - # telescope - ```text usage: telescope [-h] [-r] [-f] [-i] [address] [count] @@ -28,6 +23,5 @@ Recursively dereferences pointers starting at the specified address. |-f|--frame|Show the stack frame, from rsp to rbp| |-i|--inverse|Show the stack reverse growth| - diff --git a/docs/commands/memory/vmmap-add.md b/docs/commands/memory/vmmap-add.md index c39b1d60b..2d10ce372 100644 --- a/docs/commands/memory/vmmap-add.md +++ b/docs/commands/memory/vmmap-add.md @@ -1,11 +1,6 @@ - - - - # vmmap-add - ```text usage: vmmap-add [-h] start size [flags] [offset] @@ -27,6 +22,5 @@ Add virtual memory map page. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/vmmap-clear.md b/docs/commands/memory/vmmap-clear.md index c6ed4d2be..4012af36a 100644 --- a/docs/commands/memory/vmmap-clear.md +++ b/docs/commands/memory/vmmap-clear.md @@ -1,11 +1,6 @@ - - - - # vmmap-clear - ```text usage: vmmap-clear [-h] @@ -18,6 +13,5 @@ Clear the vmmap cache. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/vmmap-explore.md b/docs/commands/memory/vmmap-explore.md index 17f59f82b..5a63c2eee 100644 --- a/docs/commands/memory/vmmap-explore.md +++ b/docs/commands/memory/vmmap-explore.md @@ -1,11 +1,6 @@ - - - - # vmmap-explore - ```text usage: vmmap-explore [-h] address @@ -24,6 +19,5 @@ Explore a page, trying to guess permissions. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/vmmap.md b/docs/commands/memory/vmmap.md index 34b2603c3..8d0c08f91 100644 --- a/docs/commands/memory/vmmap.md +++ b/docs/commands/memory/vmmap.md @@ -1,11 +1,6 @@ - - - - # vmmap - ```text usage: vmmap [-h] [-w] [-x] [-A LINES_AFTER] [-B LINES_BEFORE] [-C CONTEXT] [--gaps] @@ -49,6 +44,5 @@ Memory pages can also be added manually with the use of vmmap-add, vmmap-clear a |-C|--context|Number of pages to display around the result| ||--gaps|Display unmapped memory gap information in the memory map.| - diff --git a/docs/commands/memory/xinfo.md b/docs/commands/memory/xinfo.md index 6e5264a8f..d12951563 100644 --- a/docs/commands/memory/xinfo.md +++ b/docs/commands/memory/xinfo.md @@ -1,11 +1,6 @@ - - - - # xinfo - ```text usage: xinfo [-h] [address] @@ -24,6 +19,5 @@ Shows offsets of the specified address from various useful locations. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/memory/xor.md b/docs/commands/memory/xor.md index 4ff485fe2..300e2ae71 100644 --- a/docs/commands/memory/xor.md +++ b/docs/commands/memory/xor.md @@ -1,11 +1,6 @@ - - - - # xor - ```text usage: xor [-h] address key count @@ -26,6 +21,5 @@ XOR `count` bytes at `address` with the key `key`. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/asm.md b/docs/commands/misc/asm.md index 321c5dd25..b7915e938 100644 --- a/docs/commands/misc/asm.md +++ b/docs/commands/misc/asm.md @@ -1,11 +1,6 @@ - - - - # asm - ```text usage: asm [-h] [-f {hex,string}] [--arch {powerpc64,aarch64,powerpc,riscv32,riscv64,sparc64,mips64,msp430,alpha,amd64,sparc,thumb,cris,i386,ia64,m68k,mips,s390,none,avr,arm,vax}] @@ -33,6 +28,5 @@ Assemble shellcode into bytes |-z|--zero|Encode the shellcode to avoid NULL bytes| |-i|--infile|Specify input file| - diff --git a/docs/commands/misc/checksec.md b/docs/commands/misc/checksec.md index 438854ff8..9e6c3d3e2 100644 --- a/docs/commands/misc/checksec.md +++ b/docs/commands/misc/checksec.md @@ -1,11 +1,6 @@ - - - - # checksec - ```text usage: checksec [-h] [-f FILE] diff --git a/docs/commands/misc/comm.md b/docs/commands/misc/comm.md index 129c83a4c..02573d4c9 100644 --- a/docs/commands/misc/comm.md +++ b/docs/commands/misc/comm.md @@ -1,11 +1,6 @@ - - - - # comm - ```text usage: comm [-h] [--addr address] comment @@ -25,6 +20,5 @@ Put comments in assembly code. |-h|--help|show this help message and exit| ||--addr|Address to write comments| - diff --git a/docs/commands/misc/cyclic.md b/docs/commands/misc/cyclic.md index aca24f6d8..e11e2d160 100644 --- a/docs/commands/misc/cyclic.md +++ b/docs/commands/misc/cyclic.md @@ -1,11 +1,6 @@ - - - - # cyclic - ```text usage: cyclic [-h] [-a charset] [-n length] [-l lookup_value] [count] [filename] @@ -29,6 +24,5 @@ Cyclic pattern creator/finder. |-n|--length|Size of the unique subsequences (defaults to the pointer size for the current arch)| |-o|--lookup|Do a lookup instead of printing the sequence (accepts constant values as well as expressions)| - diff --git a/docs/commands/misc/cymbol.md b/docs/commands/misc/cymbol.md index 0fa4ec300..4593718f5 100644 --- a/docs/commands/misc/cymbol.md +++ b/docs/commands/misc/cymbol.md @@ -1,10 +1,6 @@ - - - - # cymbol - +(only in GDB) ```text usage: cymbol [-h] [-a name] [-f filepath] [-r name] [-e name] [-l name] @@ -25,6 +21,5 @@ Add, show, load, edit, or delete custom structures in plain C. |-l|--load|Load an existing custom structure| |-s|--show|Show the source code of an existing custom structure| - diff --git a/docs/commands/misc/down.md b/docs/commands/misc/down.md index 66f3431ca..a14efdeef 100644 --- a/docs/commands/misc/down.md +++ b/docs/commands/misc/down.md @@ -1,10 +1,6 @@ - - - - # down - +(only in GDB) ```text usage: down [-h] [n] @@ -26,6 +22,5 @@ Select and print stack frame called by this one. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/dt.md b/docs/commands/misc/dt.md index 4c3a805bc..95f672d4b 100644 --- a/docs/commands/misc/dt.md +++ b/docs/commands/misc/dt.md @@ -1,11 +1,6 @@ - - - - # dt - ```text usage: dt [-h] typename [address] @@ -27,6 +22,5 @@ Optionally overlay that information at an address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/dumpargs.md b/docs/commands/misc/dumpargs.md index 3401e7770..6a6bb8657 100644 --- a/docs/commands/misc/dumpargs.md +++ b/docs/commands/misc/dumpargs.md @@ -1,11 +1,6 @@ - - - - # dumpargs - ```text usage: dumpargs [-h] [-f] @@ -21,6 +16,5 @@ Prints determined arguments for call instruction. |-h|--help|show this help message and exit| |-f|--force|Force displaying of all arguments.| - diff --git a/docs/commands/misc/getfile.md b/docs/commands/misc/getfile.md index 36062cc42..0cbd913af 100644 --- a/docs/commands/misc/getfile.md +++ b/docs/commands/misc/getfile.md @@ -1,10 +1,6 @@ - - - - # getfile - +(only in GDB) ```text usage: getfile [-h] @@ -18,6 +14,5 @@ Gets the current file. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/hex2ptr.md b/docs/commands/misc/hex2ptr.md index 43bf10950..45c3af51b 100644 --- a/docs/commands/misc/hex2ptr.md +++ b/docs/commands/misc/hex2ptr.md @@ -1,11 +1,6 @@ - - - - # hex2ptr - ```text usage: hex2ptr [-h] hex_string @@ -24,6 +19,5 @@ Converts a space-separated hex string to a little-endian address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/hijack-fd.md b/docs/commands/misc/hijack-fd.md index a404d38f0..52bf4326c 100644 --- a/docs/commands/misc/hijack-fd.md +++ b/docs/commands/misc/hijack-fd.md @@ -1,11 +1,6 @@ - - - - # hijack-fd - ```text usage: hijack-fd [-h] fdnum newfile @@ -38,6 +33,5 @@ Examples: | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/ipi.md b/docs/commands/misc/ipi.md index 20ed7b9eb..db933ab38 100644 --- a/docs/commands/misc/ipi.md +++ b/docs/commands/misc/ipi.md @@ -1,10 +1,6 @@ - - - - # ipi - +(only in GDB) ```text usage: ipi [-h] @@ -18,6 +14,5 @@ Start an interactive IPython prompt. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/patch-list.md b/docs/commands/misc/patch-list.md index 00465e30a..45505d795 100644 --- a/docs/commands/misc/patch-list.md +++ b/docs/commands/misc/patch-list.md @@ -1,11 +1,6 @@ - - - - # patch-list - ```text usage: patch-list [-h] @@ -18,6 +13,5 @@ List all patches. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/patch-revert.md b/docs/commands/misc/patch-revert.md index 978a6f0d4..d65c24780 100644 --- a/docs/commands/misc/patch-revert.md +++ b/docs/commands/misc/patch-revert.md @@ -1,11 +1,6 @@ - - - - # patch-revert - ```text usage: patch-revert [-h] address @@ -24,6 +19,5 @@ Revert patch at given address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/patch.md b/docs/commands/misc/patch.md index 8fc78532e..523d67088 100644 --- a/docs/commands/misc/patch.md +++ b/docs/commands/misc/patch.md @@ -1,11 +1,6 @@ - - - - # patch - ```text usage: patch [-h] [-q] address ins @@ -26,6 +21,5 @@ Patches given instruction with given code or bytes. |-h|--help|show this help message and exit| |-q|--quiet|don't print anything| - diff --git a/docs/commands/misc/plist.md b/docs/commands/misc/plist.md index fb4825a16..d11b542a5 100644 --- a/docs/commands/misc/plist.md +++ b/docs/commands/misc/plist.md @@ -1,11 +1,6 @@ - - - - # plist - ```text usage: plist [-h] [-s SENTINEL] [-i INNER_NAME] [-f FIELD_NAME] [-o OFFSET] [-c COUNT] @@ -154,6 +149,5 @@ pwndbg> plist inner_b_node_a -i inner next |-o|--offset|The offset of the first list element to display. Defaults to zero. (default: 0)| |-c|--count|The number of elements to display. Defaults to the value of dereference-limit.| - diff --git a/docs/commands/misc/sigreturn.md b/docs/commands/misc/sigreturn.md index a1d43ea44..521ad3748 100644 --- a/docs/commands/misc/sigreturn.md +++ b/docs/commands/misc/sigreturn.md @@ -1,11 +1,6 @@ - - - - # sigreturn - ```text usage: sigreturn [-h] [-a] [-p] [address] @@ -26,6 +21,5 @@ Display the SigreturnFrame at the specific address |-a|--all|Show all values in the frame in addition to common registers| |-p|--print|Show addresses of frame values| - diff --git a/docs/commands/misc/spray.md b/docs/commands/misc/spray.md index 3bee8c515..33b4dea1e 100644 --- a/docs/commands/misc/spray.md +++ b/docs/commands/misc/spray.md @@ -1,11 +1,6 @@ - - - - # spray - ```text usage: spray [-h] [--value VALUE] [-x] addr [length] @@ -27,6 +22,5 @@ Spray memory with cyclic() generated values ||--value|Value to spray memory with, when prefixed with '0x' treated as hex string encoded big-endian| |-x|--only-funcptrs|Spray only addresses whose values points to executable pages| - diff --git a/docs/commands/misc/tips.md b/docs/commands/misc/tips.md index 9fcda5ec8..c98c9dfa5 100644 --- a/docs/commands/misc/tips.md +++ b/docs/commands/misc/tips.md @@ -1,11 +1,6 @@ - - - - # tips - ```text usage: tips [-h] [-a] @@ -19,6 +14,5 @@ Shows tips. |-h|--help|show this help message and exit| |-a|--all|Show all tips.| - diff --git a/docs/commands/misc/up.md b/docs/commands/misc/up.md index ffcf016c6..56a293696 100644 --- a/docs/commands/misc/up.md +++ b/docs/commands/misc/up.md @@ -1,10 +1,6 @@ - - - - # up - +(only in GDB) ```text usage: up [-h] [n] @@ -24,6 +20,5 @@ Select and print stack frame that called this one. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/valist.md b/docs/commands/misc/valist.md index 7b406845e..4a051a089 100644 --- a/docs/commands/misc/valist.md +++ b/docs/commands/misc/valist.md @@ -1,11 +1,6 @@ - - - - # valist - ```text usage: valist [-h] addr [count] @@ -25,6 +20,5 @@ Dumps the arguments of a va_list. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/misc/vmmap-load.md b/docs/commands/misc/vmmap-load.md index 8c88f1eb5..6a7196c84 100644 --- a/docs/commands/misc/vmmap-load.md +++ b/docs/commands/misc/vmmap-load.md @@ -1,11 +1,6 @@ - - - - # vmmap-load - ```text usage: vmmap-load [-h] [filename] @@ -24,6 +19,5 @@ Load virtual memory map pages from ELF file. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/process/killthreads.md b/docs/commands/process/killthreads.md index 30f445154..a81b7db51 100644 --- a/docs/commands/process/killthreads.md +++ b/docs/commands/process/killthreads.md @@ -1,10 +1,6 @@ - - - - # killthreads - +(only in GDB) ```text usage: killthreads [-h] [-a] [thread_ids ...] @@ -30,6 +26,5 @@ Killing all other threads may be useful to use GDB checkpoints, e.g., to test gi |-h|--help|show this help message and exit| |-a|--all|Kill all threads except the current one.| - diff --git a/docs/commands/process/pid.md b/docs/commands/process/pid.md index 9b8b3a7a2..c7d58d9e7 100644 --- a/docs/commands/process/pid.md +++ b/docs/commands/process/pid.md @@ -1,11 +1,6 @@ - - - - # pid - ```text usage: pid [-h] @@ -20,6 +15,5 @@ Gets the pid. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/process/procinfo.md b/docs/commands/process/procinfo.md index 7f04aa4cb..93fceacd8 100644 --- a/docs/commands/process/procinfo.md +++ b/docs/commands/process/procinfo.md @@ -1,11 +1,6 @@ - - - - # procinfo - ```text usage: procinfo [-h] @@ -18,6 +13,5 @@ Display information about the running process. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/bugreport.md b/docs/commands/pwndbg/bugreport.md index 3814d6280..a3cf7b91c 100644 --- a/docs/commands/pwndbg/bugreport.md +++ b/docs/commands/pwndbg/bugreport.md @@ -1,11 +1,6 @@ - - - - # bugreport - ```text usage: bugreport [-h] [--run-browser | --use-gh] @@ -20,6 +15,5 @@ Generate a bug report. |-b|--run-browser|Open browser on github/issues/new| |-g|--use-gh|Create issue using Github CLI| - diff --git a/docs/commands/pwndbg/config.md b/docs/commands/pwndbg/config.md index 06ab0e118..0bd26fe11 100644 --- a/docs/commands/pwndbg/config.md +++ b/docs/commands/pwndbg/config.md @@ -1,11 +1,6 @@ - - - - # config - ```text usage: config [-h] [filter_pattern] @@ -24,6 +19,5 @@ Shows pwndbg-specific configuration. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/configfile.md b/docs/commands/pwndbg/configfile.md index 24ab1e8c9..e75b5cad8 100644 --- a/docs/commands/pwndbg/configfile.md +++ b/docs/commands/pwndbg/configfile.md @@ -1,10 +1,6 @@ - - - - # configfile - +(only in GDB) ```text usage: configfile [-h] [--show-all] @@ -19,6 +15,5 @@ Generates a configuration file for the current pwndbg options. |-h|--help|show this help message and exit| ||--show-all|Display all configuration options.| - diff --git a/docs/commands/pwndbg/heap-config.md b/docs/commands/pwndbg/heap-config.md index 4d0bc8568..09e6e9182 100644 --- a/docs/commands/pwndbg/heap-config.md +++ b/docs/commands/pwndbg/heap-config.md @@ -1,11 +1,6 @@ - - - - # heap-config - ```text usage: heap-config [-h] [filter_pattern] @@ -24,6 +19,5 @@ Shows heap related configuration. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/memoize.md b/docs/commands/pwndbg/memoize.md index a82dbc5c7..7122b4107 100644 --- a/docs/commands/pwndbg/memoize.md +++ b/docs/commands/pwndbg/memoize.md @@ -1,11 +1,6 @@ - - - - # memoize - ```text usage: memoize [-h] @@ -20,6 +15,5 @@ Useful for diagnosing caching-related bugs. Decreases performance. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/profiler.md b/docs/commands/pwndbg/profiler.md index dfd424c43..8fc2e0d47 100644 --- a/docs/commands/pwndbg/profiler.md +++ b/docs/commands/pwndbg/profiler.md @@ -1,11 +1,6 @@ - - - - # profiler - ```text usage: profiler [-h] {start,stop} ... @@ -24,6 +19,5 @@ Utilities for profiling pwndbg. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/pwndbg.md b/docs/commands/pwndbg/pwndbg.md index 0dff475a5..4a78e6573 100644 --- a/docs/commands/pwndbg/pwndbg.md +++ b/docs/commands/pwndbg/pwndbg.md @@ -1,11 +1,6 @@ - - - - # pwndbg - ```text usage: pwndbg [-h] [-c CATEGORY_ | --list-categories] [filter_pattern] @@ -26,6 +21,5 @@ Prints out a list of all pwndbg commands. |-c|--category|Filter commands by category| ||--list-categories|List command categories| - diff --git a/docs/commands/pwndbg/reinit-pwndbg.md b/docs/commands/pwndbg/reinit-pwndbg.md index 72027de28..9083fe83e 100644 --- a/docs/commands/pwndbg/reinit-pwndbg.md +++ b/docs/commands/pwndbg/reinit-pwndbg.md @@ -1,10 +1,6 @@ - - - - # reinit-pwndbg - +(only in GDB) ```text usage: reinit-pwndbg [-h] @@ -18,6 +14,5 @@ Makes pwndbg reinitialize all state. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/reload.md b/docs/commands/pwndbg/reload.md index cf60abaeb..99fd06417 100644 --- a/docs/commands/pwndbg/reload.md +++ b/docs/commands/pwndbg/reload.md @@ -1,10 +1,6 @@ - - - - # reload - +(only in GDB) ```text usage: reload [-h] @@ -18,6 +14,5 @@ Reload pwndbg. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/theme.md b/docs/commands/pwndbg/theme.md index ea31cda97..39647b6e3 100644 --- a/docs/commands/pwndbg/theme.md +++ b/docs/commands/pwndbg/theme.md @@ -1,11 +1,6 @@ - - - - # theme - ```text usage: theme [-h] [filter_pattern] @@ -24,6 +19,5 @@ Shows pwndbg-specific theme configuration. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/pwndbg/themefile.md b/docs/commands/pwndbg/themefile.md index 943377d0b..def8da653 100644 --- a/docs/commands/pwndbg/themefile.md +++ b/docs/commands/pwndbg/themefile.md @@ -1,10 +1,6 @@ - - - - # themefile - +(only in GDB) ```text usage: themefile [-h] [--show-all] @@ -19,6 +15,5 @@ Generates a configuration file for the current pwndbg theme options. |-h|--help|show this help message and exit| ||--show-all|Force displaying of all theme options.| - diff --git a/docs/commands/pwndbg/version.md b/docs/commands/pwndbg/version.md index 4f254a940..da12a1ac7 100644 --- a/docs/commands/pwndbg/version.md +++ b/docs/commands/pwndbg/version.md @@ -1,10 +1,6 @@ - - - - # version - +(only in GDB) ```text usage: version [-h] @@ -18,6 +14,5 @@ Displays Pwndbg and its important deps versions. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/register/cpsr.md b/docs/commands/register/cpsr.md index 443154746..8ff25294b 100644 --- a/docs/commands/register/cpsr.md +++ b/docs/commands/register/cpsr.md @@ -1,11 +1,6 @@ - - - - # cpsr - ```text usage: cpsr [-h] [cpsr_value] @@ -26,6 +21,5 @@ Print out ARM CPSR or xPSR register. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/register/fsbase.md b/docs/commands/register/fsbase.md index a9fdc50b1..feffa2626 100644 --- a/docs/commands/register/fsbase.md +++ b/docs/commands/register/fsbase.md @@ -1,10 +1,6 @@ - - - - # fsbase - +(only in GDB) ```text usage: fsbase [-h] @@ -18,6 +14,5 @@ Prints out the FS base address. See also $fsbase. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/register/gsbase.md b/docs/commands/register/gsbase.md index e9eaea0bd..85afbb907 100644 --- a/docs/commands/register/gsbase.md +++ b/docs/commands/register/gsbase.md @@ -1,10 +1,6 @@ - - - - # gsbase - +(only in GDB) ```text usage: gsbase [-h] @@ -18,6 +14,5 @@ Prints out the GS base address. See also $gsbase. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/register/setflag.md b/docs/commands/register/setflag.md index 8e3c22172..2519fabfe 100644 --- a/docs/commands/register/setflag.md +++ b/docs/commands/register/setflag.md @@ -1,11 +1,6 @@ - - - - # setflag - ```text usage: setflag [-h] flag value diff --git a/docs/commands/stack/canary.md b/docs/commands/stack/canary.md index 10e9c6978..a1fd0daf3 100644 --- a/docs/commands/stack/canary.md +++ b/docs/commands/stack/canary.md @@ -1,11 +1,6 @@ - - - - # canary - ```text usage: canary [-h] [-a] @@ -19,6 +14,5 @@ Print out the current stack canary. |-h|--help|show this help message and exit| |-a|--all|Print out stack canaries for all threads instead of the current thread only.| - diff --git a/docs/commands/stack/retaddr.md b/docs/commands/stack/retaddr.md index ad8d40a11..20f98eaed 100644 --- a/docs/commands/stack/retaddr.md +++ b/docs/commands/stack/retaddr.md @@ -1,11 +1,6 @@ - - - - # retaddr - ```text usage: retaddr [-h] @@ -18,6 +13,5 @@ Print out the stack addresses that contain return addresses. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/stack/stack-explore.md b/docs/commands/stack/stack-explore.md index 3fa9cc403..4174670d3 100644 --- a/docs/commands/stack/stack-explore.md +++ b/docs/commands/stack/stack-explore.md @@ -1,11 +1,6 @@ - - - - # stack-explore - ```text usage: stack-explore [-h] @@ -18,6 +13,5 @@ Explore stack from all threads. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/stack/stack.md b/docs/commands/stack/stack.md index 0c78cca6a..fe8f24612 100644 --- a/docs/commands/stack/stack.md +++ b/docs/commands/stack/stack.md @@ -1,11 +1,6 @@ - - - - # stack - ```text usage: stack [-h] [-f] [-i] [count] [offset] @@ -27,6 +22,5 @@ Dereferences on stack data with specified count and offset. |-f|--frame|Show the stack frame, from rsp to rbp| |-i|--inverse|Show reverse stack growth| - diff --git a/docs/commands/stack/stackf.md b/docs/commands/stack/stackf.md index 92e057df4..5e98faada 100644 --- a/docs/commands/stack/stackf.md +++ b/docs/commands/stack/stackf.md @@ -1,11 +1,6 @@ - - - - # stackf - ```text usage: stackf [-h] [count] [offset] @@ -25,6 +20,5 @@ Dereferences on stack data, printing the entire stack frame with specified count | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/start/attachp.md b/docs/commands/start/attachp.md index fd71a62e4..ff1a1da2a 100644 --- a/docs/commands/start/attachp.md +++ b/docs/commands/start/attachp.md @@ -1,10 +1,6 @@ - - - - # attachp - +(only in GDB) ```text usage: attachp [-h] [--no-truncate] [--retry] [--user USER] [-e] [-a] [target] @@ -48,6 +44,5 @@ Original GDB attach command help: |-e|--exact|get the pid only for an exact command name match| |-a|--all|get pids also for partial cmdline matches etc| - diff --git a/docs/commands/start/entry.md b/docs/commands/start/entry.md index 69c0bb18c..bbbd2f5a5 100644 --- a/docs/commands/start/entry.md +++ b/docs/commands/start/entry.md @@ -1,11 +1,6 @@ - - - - # entry - ```text usage: entry [-h] [args ...] @@ -39,6 +34,5 @@ To start the inferior without using a shell, use "set startup-with-shell off". | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/start/sstart.md b/docs/commands/start/sstart.md index 36801e12d..e8a3232d5 100644 --- a/docs/commands/start/sstart.md +++ b/docs/commands/start/sstart.md @@ -1,10 +1,6 @@ - - - - # sstart - +(only in GDB) ```text usage: sstart [-h] @@ -18,6 +14,5 @@ Alias for 'tbreak __libc_start_main; run'. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/start/start.md b/docs/commands/start/start.md index a100e5f06..1f3055c61 100644 --- a/docs/commands/start/start.md +++ b/docs/commands/start/start.md @@ -1,10 +1,6 @@ - - - - # start - +(only in GDB) ```text usage: start [-h] [args ...] @@ -39,6 +35,5 @@ To start the inferior without using a shell, use "set startup-with-shell off". | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/nextcall.md b/docs/commands/step_next_continue/nextcall.md index 7e131711c..28aae09d6 100644 --- a/docs/commands/step_next_continue/nextcall.md +++ b/docs/commands/step_next_continue/nextcall.md @@ -1,11 +1,6 @@ - - - - # nextcall - ```text usage: nextcall [-h] [symbol_regex] @@ -24,6 +19,5 @@ Breaks at the next call instruction. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/nextjmp.md b/docs/commands/step_next_continue/nextjmp.md index 0280173eb..ee9564fea 100644 --- a/docs/commands/step_next_continue/nextjmp.md +++ b/docs/commands/step_next_continue/nextjmp.md @@ -1,11 +1,6 @@ - - - - # nextjmp - ```text usage: nextjmp [-h] @@ -20,6 +15,5 @@ Breaks at the next jump instruction. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/nextproginstr.md b/docs/commands/step_next_continue/nextproginstr.md index 38b85f6e7..c68cb0f39 100644 --- a/docs/commands/step_next_continue/nextproginstr.md +++ b/docs/commands/step_next_continue/nextproginstr.md @@ -1,11 +1,6 @@ - - - - # nextproginstr - ```text usage: nextproginstr [-h] @@ -18,6 +13,5 @@ Breaks at the next instruction that belongs to the running program. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/nextret.md b/docs/commands/step_next_continue/nextret.md index 9a6b677e1..e5d6b0a58 100644 --- a/docs/commands/step_next_continue/nextret.md +++ b/docs/commands/step_next_continue/nextret.md @@ -1,11 +1,6 @@ - - - - # nextret - ```text usage: nextret [-h] @@ -18,6 +13,5 @@ Breaks at next return-like instruction. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/nextsyscall.md b/docs/commands/step_next_continue/nextsyscall.md index 19d6455d8..28a53d3a8 100644 --- a/docs/commands/step_next_continue/nextsyscall.md +++ b/docs/commands/step_next_continue/nextsyscall.md @@ -1,11 +1,6 @@ - - - - # nextsyscall - ```text usage: nextsyscall [-h] @@ -20,6 +15,5 @@ Breaks at the next syscall not taking branches. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/stepover.md b/docs/commands/step_next_continue/stepover.md index b92bd576e..10c21e905 100644 --- a/docs/commands/step_next_continue/stepover.md +++ b/docs/commands/step_next_continue/stepover.md @@ -1,11 +1,6 @@ - - - - # stepover - ```text usage: stepover [-h] [addr] @@ -26,6 +21,5 @@ Breaks on the instruction after this one. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/stepret.md b/docs/commands/step_next_continue/stepret.md index c02c904df..eea7c644f 100644 --- a/docs/commands/step_next_continue/stepret.md +++ b/docs/commands/step_next_continue/stepret.md @@ -1,11 +1,6 @@ - - - - # stepret - ```text usage: stepret [-h] @@ -18,6 +13,5 @@ Breaks at next return-like instruction by 'stepping' to it. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/stepsyscall.md b/docs/commands/step_next_continue/stepsyscall.md index 3bf4d598c..cb43c540f 100644 --- a/docs/commands/step_next_continue/stepsyscall.md +++ b/docs/commands/step_next_continue/stepsyscall.md @@ -1,11 +1,6 @@ - - - - # stepsyscall - ```text usage: stepsyscall [-h] @@ -20,6 +15,5 @@ Breaks at the next syscall by taking branches. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/stepuntilasm.md b/docs/commands/step_next_continue/stepuntilasm.md index be9ae393a..d099aedae 100644 --- a/docs/commands/step_next_continue/stepuntilasm.md +++ b/docs/commands/step_next_continue/stepuntilasm.md @@ -1,11 +1,6 @@ - - - - # stepuntilasm - ```text usage: stepuntilasm [-h] mnemonic [op_str ...] @@ -25,6 +20,5 @@ Breaks on the next matching instruction. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/step_next_continue/xuntil.md b/docs/commands/step_next_continue/xuntil.md index 389f5802b..450419b30 100644 --- a/docs/commands/step_next_continue/xuntil.md +++ b/docs/commands/step_next_continue/xuntil.md @@ -1,10 +1,6 @@ - - - - # xuntil - +(only in GDB) ```text usage: xuntil [-h] target @@ -24,6 +20,5 @@ Continue execution until an address or expression. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/bc.md b/docs/commands/windbg/bc.md index ad175564e..5a7759408 100644 --- a/docs/commands/windbg/bc.md +++ b/docs/commands/windbg/bc.md @@ -1,10 +1,6 @@ - - - - # bc - +(only in GDB) ```text usage: bc [-h] [which] @@ -24,6 +20,5 @@ Clear the breakpoint with the specified index. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/bd.md b/docs/commands/windbg/bd.md index c6daeee84..05e3e15ce 100644 --- a/docs/commands/windbg/bd.md +++ b/docs/commands/windbg/bd.md @@ -1,10 +1,6 @@ - - - - # bd - +(only in GDB) ```text usage: bd [-h] [which] @@ -24,6 +20,5 @@ Disable the breakpoint with the specified index. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/be.md b/docs/commands/windbg/be.md index 8fe05926f..4266ffa90 100644 --- a/docs/commands/windbg/be.md +++ b/docs/commands/windbg/be.md @@ -1,10 +1,6 @@ - - - - # be - +(only in GDB) ```text usage: be [-h] [which] @@ -24,6 +20,5 @@ Enable the breakpoint with the specified index. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/bl.md b/docs/commands/windbg/bl.md index 709ff74a6..d8d060cf3 100644 --- a/docs/commands/windbg/bl.md +++ b/docs/commands/windbg/bl.md @@ -1,10 +1,6 @@ - - - - # bl - +(only in GDB) ```text usage: bl [-h] @@ -18,6 +14,5 @@ List breakpoints. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/bp.md b/docs/commands/windbg/bp.md index d15ca394b..f93b76d4a 100644 --- a/docs/commands/windbg/bp.md +++ b/docs/commands/windbg/bp.md @@ -1,10 +1,6 @@ - - - - # bp - +(only in GDB) ```text usage: bp [-h] where @@ -24,6 +20,5 @@ Set a breakpoint at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/da.md b/docs/commands/windbg/da.md index c18c0d075..9fad128db 100644 --- a/docs/commands/windbg/da.md +++ b/docs/commands/windbg/da.md @@ -1,11 +1,6 @@ - - - - # da - ```text usage: da [-h] address [max] @@ -25,6 +20,5 @@ Dump a string at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/db.md b/docs/commands/windbg/db.md index 55d9fd688..9b265e63e 100644 --- a/docs/commands/windbg/db.md +++ b/docs/commands/windbg/db.md @@ -1,11 +1,6 @@ - - - - # db - ```text usage: db [-h] address [count] @@ -25,6 +20,5 @@ Starting at the specified address, dump N bytes. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/dc.md b/docs/commands/windbg/dc.md index be2317f7b..e5895ee8f 100644 --- a/docs/commands/windbg/dc.md +++ b/docs/commands/windbg/dc.md @@ -1,11 +1,6 @@ - - - - # dc - ```text usage: dc [-h] address [count] @@ -25,6 +20,5 @@ Starting at the specified address, hexdump. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/dd.md b/docs/commands/windbg/dd.md index 2ccad1018..3c7ae7a71 100644 --- a/docs/commands/windbg/dd.md +++ b/docs/commands/windbg/dd.md @@ -1,11 +1,6 @@ - - - - # dd - ```text usage: dd [-h] address [count] @@ -25,6 +20,5 @@ Starting at the specified address, dump N dwords. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/dds.md b/docs/commands/windbg/dds.md index 15285afa1..cab1aeb53 100644 --- a/docs/commands/windbg/dds.md +++ b/docs/commands/windbg/dds.md @@ -1,11 +1,6 @@ - - - - # dds - ```text usage: dds [-h] addr @@ -26,6 +21,5 @@ Dump pointers and symbols at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/dq.md b/docs/commands/windbg/dq.md index a82ba10a9..baa509f99 100644 --- a/docs/commands/windbg/dq.md +++ b/docs/commands/windbg/dq.md @@ -1,11 +1,6 @@ - - - - # dq - ```text usage: dq [-h] address [count] @@ -25,6 +20,5 @@ Starting at the specified address, dump N qwords. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/ds.md b/docs/commands/windbg/ds.md index 22ce16bfd..8efdd76a6 100644 --- a/docs/commands/windbg/ds.md +++ b/docs/commands/windbg/ds.md @@ -1,11 +1,6 @@ - - - - # ds - ```text usage: ds [-h] address [max] @@ -25,6 +20,5 @@ Dump a string at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/dw.md b/docs/commands/windbg/dw.md index 6254a6691..43a89f049 100644 --- a/docs/commands/windbg/dw.md +++ b/docs/commands/windbg/dw.md @@ -1,11 +1,6 @@ - - - - # dw - ```text usage: dw [-h] address [count] @@ -25,6 +20,5 @@ Starting at the specified address, dump N words. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/eb.md b/docs/commands/windbg/eb.md index 82f4087a2..7cc395bac 100644 --- a/docs/commands/windbg/eb.md +++ b/docs/commands/windbg/eb.md @@ -1,11 +1,6 @@ - - - - # eb - ```text usage: eb [-h] address [data ...] @@ -25,6 +20,5 @@ Write hex bytes at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/ed.md b/docs/commands/windbg/ed.md index a82307d73..876a6af17 100644 --- a/docs/commands/windbg/ed.md +++ b/docs/commands/windbg/ed.md @@ -1,11 +1,6 @@ - - - - # ed - ```text usage: ed [-h] address [data ...] @@ -25,6 +20,5 @@ Write hex dwords at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/eq.md b/docs/commands/windbg/eq.md index f4be6b64a..82a948248 100644 --- a/docs/commands/windbg/eq.md +++ b/docs/commands/windbg/eq.md @@ -1,11 +1,6 @@ - - - - # eq - ```text usage: eq [-h] address [data ...] @@ -25,6 +20,5 @@ Write hex qwords at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/ew.md b/docs/commands/windbg/ew.md index 1a6be6166..2ec853755 100644 --- a/docs/commands/windbg/ew.md +++ b/docs/commands/windbg/ew.md @@ -1,11 +1,6 @@ - - - - # ew - ```text usage: ew [-h] address [data ...] @@ -25,6 +20,5 @@ Write hex words at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/ez.md b/docs/commands/windbg/ez.md index 750efa34a..6571eba8f 100644 --- a/docs/commands/windbg/ez.md +++ b/docs/commands/windbg/ez.md @@ -1,11 +1,6 @@ - - - - # ez - ```text usage: ez [-h] address data @@ -25,6 +20,5 @@ Write a string at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/eza.md b/docs/commands/windbg/eza.md index 7c8394aa1..3cf19792e 100644 --- a/docs/commands/windbg/eza.md +++ b/docs/commands/windbg/eza.md @@ -1,11 +1,6 @@ - - - - # eza - ```text usage: eza [-h] address data @@ -25,6 +20,5 @@ Write a string at the specified address. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/go.md b/docs/commands/windbg/go.md index 18146a7c9..01738b140 100644 --- a/docs/commands/windbg/go.md +++ b/docs/commands/windbg/go.md @@ -1,10 +1,6 @@ - - - - # go - +(only in GDB) ```text usage: go [-h] @@ -18,6 +14,5 @@ Windbg compatibility alias for 'continue' command. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/k.md b/docs/commands/windbg/k.md index 72a0798d6..b91b5563c 100644 --- a/docs/commands/windbg/k.md +++ b/docs/commands/windbg/k.md @@ -1,10 +1,6 @@ - - - - # k - +(only in GDB) ```text usage: k [-h] @@ -18,6 +14,5 @@ Print a backtrace (alias 'bt'). | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/ln.md b/docs/commands/windbg/ln.md index e4663dae4..57ad74e60 100644 --- a/docs/commands/windbg/ln.md +++ b/docs/commands/windbg/ln.md @@ -1,11 +1,6 @@ - - - - # ln - ```text usage: ln [-h] [value] @@ -24,6 +19,5 @@ List the symbols nearest to the provided value. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/pc.md b/docs/commands/windbg/pc.md index 5096aa0fb..da825059f 100644 --- a/docs/commands/windbg/pc.md +++ b/docs/commands/windbg/pc.md @@ -1,11 +1,6 @@ - - - - # pc - ```text usage: pc [-h] @@ -18,6 +13,5 @@ Windbg compatibility alias for 'nextcall' command. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/commands/windbg/peb.md b/docs/commands/windbg/peb.md index a34778b69..62b581f0c 100644 --- a/docs/commands/windbg/peb.md +++ b/docs/commands/windbg/peb.md @@ -1,11 +1,6 @@ - - - - # peb - ```text usage: peb [-h] @@ -18,6 +13,5 @@ Not be windows. | :--- | :--- | :--- | |-h|--help|show this help message and exit| - diff --git a/docs/configuration/config.md b/docs/configuration/config.md index 977239428..315cb3c8b 100644 --- a/docs/configuration/config.md +++ b/docs/configuration/config.md @@ -6,6 +6,7 @@ # config ## **ai-anthropic-api-key** +(only in GDB) Anthropic API key. @@ -14,6 +15,7 @@ Defaults to ANTHROPIC_API_KEY environment variable if not set. **Default:** '' ## **ai-history-size** +(only in GDB) Maximum number of questions and answers to keep in the prompt. @@ -22,6 +24,7 @@ Maximum number of questions and answers to keep in the prompt. **Default:** 3 ## **ai-max-tokens** +(only in GDB) The maximum number of tokens to return in the response. @@ -30,6 +33,7 @@ Useful when limiting verbosity or conserving resources. Set to a lower value to **Default:** 100 ## **ai-model** +(only in GDB) The name of the large language model to query. @@ -38,6 +42,7 @@ Changing this affects the behavior, response quality, and cost (if applicable) o **Default:** 'gpt-3.5-turbo' ## **ai-ollama-endpoint** +(only in GDB) Ollama API endpoint. @@ -46,6 +51,7 @@ Defaults to OLLAMA_ENDPOINT environment variable if not set. **Default:** '' ## **ai-openai-api-key** +(only in GDB) OpenAI API key. @@ -54,6 +60,7 @@ Will default to OPENAI_API_KEY environment variable if not set. **Default:** '' ## **ai-show-usage** +(only in GDB) Whether to show how many tokens are used with each OpenAI API call. @@ -62,6 +69,7 @@ Whether to show how many tokens are used with each OpenAI API call. **Default:** off ## **ai-stack-depth** +(only in GDB) Rows of stack context to include in the prompt for the ai command. @@ -70,6 +78,7 @@ Rows of stack context to include in the prompt for the ai command. **Default:** 16 ## **ai-temperature** +(only in GDB) The temperature specification for the LLM query. @@ -78,6 +87,7 @@ This controls the degree of randomness in the response. **Default:** 0 ## **attachp-resolution-method** +(only in GDB) How to determine the process to attach when multiple candidates exists. @@ -270,6 +280,7 @@ Number of lines to print in the stack context. **Default:** 8 ## **cymbol-editor** +(only in GDB) Path to the editor for editing custom structures. @@ -278,6 +289,7 @@ Path to the editor for editing custom structures. **Default:** '' ## **debug-events** +(only in GDB) Display internal event debugging info. @@ -382,6 +394,7 @@ Print a full stacktrace for exceptions raised in pwndbg commands. **Default:** off ## **gcc-compiler-path** +(only in GDB) Path to the gcc/g++ toolchain for generating imported symbols. @@ -390,6 +403,7 @@ Path to the gcc/g++ toolchain for generating imported symbols. **Default:** '' ## **gdb-workaround-stop-event** +(only in GDB) Asynchronous stop events to improve 'commands' functionality. @@ -463,6 +477,7 @@ Line width of hexdump command. **Default:** 16 ## **ida-rpc-host** +(only in GDB) Ida xmlrpc server address. @@ -471,6 +486,7 @@ Ida xmlrpc server address. **Default:** '127.0.0.1' ## **ida-rpc-port** +(only in GDB) Ida xmlrpc server port. @@ -479,6 +495,7 @@ Ida xmlrpc server port. **Default:** 31337 ## **ida-timeout** +(only in GDB) Time to wait for ida xmlrpc in seconds. diff --git a/docs/configuration/heap.md b/docs/configuration/heap.md index bddccd238..3a41a7731 100644 --- a/docs/configuration/heap.md +++ b/docs/configuration/heap.md @@ -55,56 +55,96 @@ The address of mp_. **Default:** '0' ## **resolve-heap-via-heuristic** +=== "GDB" + + The strategy to resolve heap via heuristic. + + Values explained: + + + `auto` - pwndbg will try to use heuristics if debug symbols are missing + + `force` - pwndbg will always try to use heuristics, even if debug symbols are available + + `never` - pwndbg will never use heuristics to resolve the heap + + If the output of the heap related command produces errors with heuristics, you + can try manually setting the libc symbol addresses. + For this, see the `heap_config` command output and set the `main_arena`, `mp_`, + `global_max_fast`, `tcache` and `thread_arena` addresses. + + Note: pwndbg will generate more reliable results with proper debug symbols. + Therefore, when debug symbols are missing, you should try to install them first + if you haven't already. + + They can probably be installed via the package manager of your choice. + See also: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html . + + E.g. on Ubuntu/Debian you might need to do the following steps (for 64-bit and + 32-bit binaries): + ```bash + sudo apt-get install libc6-dbg + sudo dpkg --add-architecture i386 + sudo apt-get install libc-dbg:i386 + ``` + If you used setup.sh on Arch based distro you'll need to do a power cycle or set + environment variable manually like this: + ```bash + export DEBUGINFOD_URLS=https://debuginfod.archlinux.org + ``` + + In addition, even you have the debug symbols of libc, you might still see the + following warning when debugging a multi-threaded program: + ``` + warning: Unable to find libthread_db matching inferior's thread library, thread + debugging will not be available. + ``` + + You'll need to ensure that the correct `libthread_db.so` is loaded. To do this, + set the search path using: + ``` + set libthread-db-search-path + ``` + Then, restart your program to enable proper thread debugging. + + **Default:** 'auto' + **Valid values:** 'auto', 'force', 'never' +=== "LLDB" + + The strategy to resolve heap via heuristic. + + Values explained: + + + `auto` - pwndbg will try to use heuristics if debug symbols are missing + + `force` - pwndbg will always try to use heuristics, even if debug symbols are available + + `never` - pwndbg will never use heuristics to resolve the heap + + If the output of the heap related command produces errors with heuristics, you + can try manually setting the libc symbol addresses. + For this, see the `heap_config` command output and set the `main_arena`, `mp_`, + `global_max_fast`, `tcache` and `thread_arena` addresses. + + Note: pwndbg will generate more reliable results with proper debug symbols. + Therefore, when debug symbols are missing, you should try to install them first + if you haven't already. + + They can probably be installed via the package manager of your choice. + See also: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html . + + E.g. on Ubuntu/Debian you might need to do the following steps (for 64-bit and + 32-bit binaries): + ```bash + sudo apt-get install libc6-dbg + sudo dpkg --add-architecture i386 + sudo apt-get install libc-dbg:i386 + ``` + If you used setup.sh on Arch based distro you'll need to do a power cycle or set + environment variable manually like this: + ```bash + export DEBUGINFOD_URLS=https://debuginfod.archlinux.org + ``` + + **Default:** 'auto' + **Valid values:** 'auto', 'force', 'never' +---------- -The strategy to resolve heap via heuristic. - -Values explained: - -+ `auto` - pwndbg will try to use heuristics if debug symbols are missing -+ `force` - pwndbg will always try to use heuristics, even if debug symbols are available -+ `never` - pwndbg will never use heuristics to resolve the heap - -If the output of the heap related command produces errors with heuristics, you -can try manually setting the libc symbol addresses. -For this, see the `heap_config` command output and set the `main_arena`, `mp_`, -`global_max_fast`, `tcache` and `thread_arena` addresses. - -Note: pwndbg will generate more reliable results with proper debug symbols. -Therefore, when debug symbols are missing, you should try to install them first -if you haven't already. - -They can probably be installed via the package manager of your choice. -See also: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html . - -E.g. on Ubuntu/Debian you might need to do the following steps (for 64-bit and -32-bit binaries): -```bash -sudo apt-get install libc6-dbg -sudo dpkg --add-architecture i386 -sudo apt-get install libc-dbg:i386 -``` -If you used setup.sh on Arch based distro you'll need to do a power cycle or set -environment variable manually like this: -```bash -export DEBUGINFOD_URLS=https://debuginfod.archlinux.org -``` - -In addition, even you have the debug symbols of libc, you might still see the -following warning when debugging a multi-threaded program: -``` -warning: Unable to find libthread_db matching inferior's thread library, thread -debugging will not be available. -``` - -You'll need to ensure that the correct `libthread_db.so` is loaded. To do this, -set the search path using: -``` -set libthread-db-search-path -``` -Then, restart your program to enable proper thread debugging. - -**Default:** 'auto' -**Valid values:** 'auto', 'force', 'never' ## **tcache** diff --git a/docs/functions/index.md b/docs/functions/index.md index f6ce4d938..4c9c6aacd 100644 --- a/docs/functions/index.md +++ b/docs/functions/index.md @@ -12,7 +12,7 @@ hide: pwndbg provides a set of functions which can be used during expression evaluation to quickly perform common calculations. These can even be passed to other commands as arguments. -Currently, they only work in gdb. +Currently, they **only work in gdb**. To see a list of all functions, including those built into gdb, use `help function`. To see the help of any given function use `help function function_name`. Function invokation must diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index c78900526..461fad906 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -23,6 +23,10 @@ margin-top: 1em } +.md-typeset h1 { + margin-bottom: 0.6em +} + [data-md-color-scheme="slate"] { --md-hue: 266; /* [0, 360] */ --md-default-bg-color: hsla(var(--md-hue), 27.8%, 7.1%, 1); diff --git a/mkdocs.yml b/mkdocs.yml index 634dfaddc..358492a5c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -57,6 +57,9 @@ theme: # https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#code-actions # Adds an edit button to every page that links to the repository. - content.action.edit +# Extra + # Sync the content tab selection across the whole site (based on label). + - content.tabs.link palette: scheme: slate primary: black @@ -188,7 +191,7 @@ markdown_extensions: # https://facelessuser.github.io/pymdown-extensions/ # Officially supported are: # https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/ - # Not enabled from the list^ : arithmatex, critic, tabbed + # Not enabled from the list^ : arithmatex, critic - pymdownx.betterem: smart_enable: all - pymdownx.blocks.caption @@ -215,6 +218,13 @@ markdown_extensions: - pymdownx.superfences: - pymdownx.tasklist: custom_checkbox: true + - pymdownx.tabbed: + # Better on mobile. + alternate_style: true + # Nicer looking anchor links. + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower # Not officially supported: - pymdownx.magiclink: repo_url_shortener: true diff --git a/scripts/_docs/build_command_docs.py b/scripts/_docs/build_command_docs.py index 502680932..055af25f8 100644 --- a/scripts/_docs/build_command_docs.py +++ b/scripts/_docs/build_command_docs.py @@ -4,6 +4,7 @@ from __future__ import annotations import json import os import sys +import textwrap from typing import Dict from typing import Tuple @@ -20,15 +21,11 @@ AUTOGEN_END_MARKER1 = "\n" -def convert_to_markdown(cmd: ExtractedCommand, supported_by: list[str]) -> str: +def get_markdown_body(cmd: ExtractedCommand) -> str: mdFile = MdUtils(cmd.filename) - # title - mdFile.new_header(level=1, title=cmd.name) # usage mdFile.insert_code(cmd.usage, language="text") - # TODO: add text about which debuggers are supported if - # not all are. # description mdFile.new_paragraph(cmd.description + "\n") # aliases @@ -79,9 +76,7 @@ def convert_to_markdown(cmd: ExtractedCommand, supported_by: list[str]) -> str: if cmd.pure_epilog: mdFile.write("### Extra\n" + cmd.pure_epilog + "\n") - autogen_warning = "" - - return autogen_warning + "\n" + mdFile.get_md_text() + return "\n" + mdFile.get_md_text().strip() + "\n" def convert_all_to_markdown( @@ -97,29 +92,45 @@ def convert_all_to_markdown( # Generate markdown for those files. for filename in all_filenames: - # Make a list of all debuggers that know about this - # command. Make sure they all agree on the contents. - supported_debuggers: list[str] = [] - cmd: ExtractedCommand | None = None + # Make a (debugger name, command) list in case some + # debuggers disagree on what some command should + # display. We won't add debuggers that don't have the + # command. + cmd_variants: list[Tuple[str, ExtractedCommand]] = [] for debugger, data in extracted: if filename in data: - supported_debuggers.append(debugger) - if not cmd: - # Fetch the ExtractedCommand object - cmd = data[filename] - else: - # Check if this debugger agrees - cur_cmd = data[filename] - if cur_cmd != cmd: - print(f"Error: Debuggers don't agree on {filename}") - print(f"{supported_debuggers[0]} says: {cmd}\n") - print(f"{debugger} says: {cur_cmd}") - exit(10) - - assert cmd - assert supported_debuggers - result[filename] = convert_to_markdown(cmd, supported_debuggers) + cmd_variants.append((debugger, data[filename])) + + assert cmd_variants + + # command title + markdown = f"# {cmd_variants[0][1].name}\n" + + # Note about supported debuggers if the command isn't + # available everywhere. + if len(cmd_variants) != len(ALL_DEBUGGERS): + supported_list = ", ".join([x[0].upper() for x in cmd_variants]) + markdown += '' + markdown += f"(only in {supported_list})" + markdown += "\n" + + debuggers_agree = all(x[1] == cmd_variants[0][1] for x in cmd_variants) + + if debuggers_agree: + markdown += get_markdown_body(cmd_variants[0][1]) + else: + for debugger, dcmd in sorted(cmd_variants): + # Content tabs + # https://squidfunk.github.io/mkdocs-material/reference/content-tabs/ + markdown += f'\n=== "{debugger.upper()}"' + + body = get_markdown_body(dcmd) + body = textwrap.indent(body, " ") + markdown += "\n\n " + body + + autogen_warning = "" + result[filename] = autogen_warning + "\n" + markdown return result diff --git a/scripts/_docs/build_configuration_docs.py b/scripts/_docs/build_configuration_docs.py index a22819270..359c89574 100644 --- a/scripts/_docs/build_configuration_docs.py +++ b/scripts/_docs/build_configuration_docs.py @@ -3,6 +3,7 @@ from __future__ import annotations import json import os import sys +import textwrap from typing import Dict from typing import Tuple @@ -31,35 +32,50 @@ def convert_to_markdown(scope: str, debugger_to_params: Dict[str, list[Extracted all_params.update([param.name for param in params]) for param_name in sorted(all_params): - # Make a list of all debuggers that know about this - # parameter. Make sure they all agree on the contents. - supported_debuggers: list[str] = [] - param: ExtractedParam | None = None + # Make a (debugger name, parameter) list in case some + # debuggers disagree on what some parameter should + # display. We won't add debuggers that don't have the + # parameter. + param_variants: list[Tuple[str, ExtractedParam]] = [] for debugger, dparams in debugger_to_params.items(): # Slow but whatever for dparam in dparams: if param_name == dparam.name: - supported_debuggers.append(debugger) - if not param: - # Fetch the ExtractedParam object. - param = dparam - # FIXME: Currently resolve-heap-via-heuristic is different - # between gdb and lldb. How to handle this? - # elif param != dparam: - # print(f"Error: Debuggers don't agree on {scope}/{param.name}") - # print(f"{supported_debuggers[0]} says: {param}\n") - # print(f"{debugger} says: {dparam}") - # exit(10) - - assert param - assert supported_debuggers - - mdFile.new_header(level=2, title="**" + param.name + "**") - # TODO: add text about which debuggers are supported if - # not all are. - mdFile.new_paragraph(param.set_show_doc) - mdFile.new_paragraph(param.help_docstring) + param_variants.append((debugger, dparam)) + break + + assert param_variants + + mdFile.new_header(level=2, title="**" + param_name + "**") + + # Note about supported debuggers if the parameter isn't + # available everywhere. + if len(param_variants) != len(ALL_DEBUGGERS): + supported_list = ", ".join([x[0].upper() for x in param_variants]) + md = '' + md += f"(only in {supported_list})" + md += "\n" + mdFile.write(md) + + debuggers_agree = all(x[1] == param_variants[0][1] for x in param_variants) + + if debuggers_agree: + mdFile.new_paragraph(param_variants[0][1].set_show_doc) + mdFile.new_paragraph(param_variants[0][1].help_docstring) + else: + for debugger, dparam in sorted(param_variants): + # Content tabs + # https://squidfunk.github.io/mkdocs-material/reference/content-tabs/ + mdFile.write(f'\n=== "{debugger.upper()}"') + + indented_set_show_doc = textwrap.indent(dparam.set_show_doc, " ") + mdFile.new_paragraph(indented_set_show_doc) + + indented_help_docstring = textwrap.indent(dparam.help_docstring, " ") + mdFile.new_paragraph(indented_help_docstring) + + mdFile.write("\n----------\n") autogen_warning = ( "" diff --git a/scripts/_docs/build_function_docs.py b/scripts/_docs/build_function_docs.py index fbe60721b..5367b18da 100644 --- a/scripts/_docs/build_function_docs.py +++ b/scripts/_docs/build_function_docs.py @@ -12,6 +12,7 @@ from __future__ import annotations import json import os import sys +import textwrap from typing import Dict from typing import Tuple @@ -28,7 +29,7 @@ from scripts._docs.gen_docs_generic import verify_files_simple INTRO_TEXT = """ pwndbg provides a set of functions which can be used during expression evaluation to quickly perform common calculations. These can even be passed to other commands as arguments. -Currently, they only work in gdb. +Currently, they **only work in gdb**. To see a list of all functions, including those built into gdb, use `help function`. To see the help of any given function use `help function function_name`. Function invokation must @@ -60,6 +61,23 @@ pwndbg> tele '$environ("LANG")' """.strip() +def get_signature_markdown(func: ExtractedFunction, debugger: str): + func_signature_code = f""" +``` {{.python .no-copy}} +{func.name}{func.signature} +``` +""" + if ( + " object at " in func.signature or "<" in func.signature + ): # '>' is valid in type annotation (->) + print(f'Signature of {func.name} (from {debugger}) is rendered as "{func.signature}",') + print("please edit the sanitize_signature() function (in the extractor) to display") + print("the signature better in the docs.") + sys.exit(5) + + return func_signature_code + + def convert_to_markdown(extracted: list[Tuple[str, list[ExtractedFunction]]]) -> Dict[str, str]: """ Returns: @@ -77,41 +95,44 @@ def convert_to_markdown(extracted: list[Tuple[str, list[ExtractedFunction]]]) -> all_functions.update([func.name for func in funcs]) for func_name in sorted(all_functions): - # Make a list of all debuggers that know about this - # function. Make sure they all agree on the contents. - supported_debuggers: list[str] = [] - func: ExtractedFunction | None = None + # Make a (debugger name, function) list in case some + # debuggers disagree on what some function should + # display. We won't add debuggers that don't have the + # function. + func_variants: list[Tuple[str, ExtractedFunction]] = [] for debugger, dfuncs in extracted: # Slow but whatever for dfunc in dfuncs: if func_name == dfunc.name: - supported_debuggers.append(debugger) - if not func: - func = dfunc - elif func != dfunc: - print(f"Error: Debuggers don't agree on {func.name}") - print(f"{supported_debuggers[0]} says: {func}\n") - print(f"{debugger} says: {dfunc}") - exit(10) - - mdFile.new_paragraph(f"### **{func.name}**") - func_signature_code = f""" -``` {{.python .no-copy}} -{func.name}{func.signature} -``` -""" - if ( - " object at " in func.signature or "<" in func.signature - ): # '>' is valid in type annotation (->) - print(f'Signature of {func.name} is rendered as "{func.signature}", please edit') - print("the sanitize_signature() function (in the extractor) to display the ") - print("signature better in the docs.") - sys.exit(5) - - mdFile.new_paragraph(func_signature_code) - mdFile.new_paragraph(func.docstring.replace("Example:", "#### Example")) - mdFile.new_paragraph("-" * 10) + func_variants.append((debugger, dfunc)) + + assert func_variants + + mdFile.new_paragraph(f"### **{func_name}**") + # NOTE: We aren't saying anything about supported + # debuggers since all functions only work in gdb for now. + + debuggers_agree = all(x[1] == func_variants[0][1] for x in func_variants) + + if debuggers_agree: + mdFile.new_paragraph(get_signature_markdown(func_variants[0][1], debugger)) + mdFile.new_paragraph(func_variants[0][1].docstring.replace("Example:", "#### Example")) + else: + for debugger, dfunc in sorted(func_variants): + # Content tabs + # https://squidfunk.github.io/mkdocs-material/reference/content-tabs/ + mdFile.write(f'\n=== "{debugger.upper()}"') + + sig = get_signature_markdown(dfunc, debugger) + sig = textwrap.indent(sig, " ") + mdFile.new_paragraph(sig) + + docs = dfunc.docstring.replace("Example:", "#### Example") + docs = textwrap.indent(docs, " ") + mdFile.new_paragraph(docs) + + mdFile.new_paragraph("----------") hide_nav = "---\nhide:\n - navigation\n---\n" autogen_warning = (