* Add a test that steps through each instruction in a program in different arches to detect crashes in annotations code
* lint
* Add symlinks so qemu can find libraries, simplify selecting correct qemu version
* lint
* compile cross-arch binaries with -static
* Add map of cross-arch library paths to avoid creating symlink
* lint
* clean up cross-arch makefile, skip the slow tests unless an environment variable is set
* correct compiler versions
* remove empty lines
* Makefile comment
* Add syscall to basic.c
* Increase performance
* Always run the tests
* lint
* initial PwndbgArchitecture
* pwndbg.aglib.arch refers to the PwndbgArchitecture instance
* Update pwndbg/aglib/arch.py
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* stuff
* Simplify setting the architecture, remove duplicated code
* ABI and SyscallABI now retrieved from the arch object
* lint
* fix syscall abi fetch
* rename
* lint
* Update pwndbg/aglib/arch.py
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* Update pwndbg/aglib/arch.py
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* Remove unused comment
* comment
* ABI fetch fix
* lint
* simplify sparc capstone constant
* Change how architectures are registered
* Ensure all uses of function abi/syscall abi have a check to see if they are not None
* More gracefully report error on unrecognized architectures
* Fix ABI function argument fetch
* remove old comment
* Add class for loongarch + s390x, add test to ensure all arches have a class defined
* Add variable 'max_instruction_size' to arch classes
* Rename mock arch to MockAmd64Arch
* Rebase
* Remove Protocol due to bug in __init__ in Python 3.10
* Remove name_raw, add ArchAttribute's + MIPS constants
* add @override decorator
* rebase
---------
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* readme/docs changes in install methods
* tip
* tip
* tip
* cleanup installation instructions
* gdb/lldb is bundled
---------
Co-authored-by: k4lizen <124312252+k4lizen@users.noreply.github.com>
* Fix crash on syscalls instructions when syscall ABI is not defined
* Fix crash when branch delay slot contains an invalid instruction
* Hotfix to detect mips version more precisely on gdb
* make parameter scope an enum
* brighter code text, smaller top-margins for level 2 headings
* cleanup configuration logic, add assertions
* add script for generating configuration docs, move out some common logic
* move heap-config to pwndbg category since it should encompass other allocators as well
* docs update for heap-config move
* don't annotate code blocks with line numbers; add ability to use github flavoured markdown-type tasklist
* hand write configuration index, auto generate other docs
oops the auto-generated docs/commands/index.md change is in this commit
* fix bug of discarding help_docstring
* auto-gen docs for previous bugfix
* make parameter help's work with markdown
* autogen docs again
* add scripts to lint and lint them
* import missing stuff
* update docs-live script
* fixups
* update docs
* get rid of unnecessary call in binja integration
* don't rely on ida to adjust xmlrpc marshaller
* only inject xmlrpc.client in init func
The call to .exe() is removed. Previously, we used it to get the exe base, but since the code uses pwndbg.aglib.proc.binary_base_addr now there's no point in the extra function call.
* Refactor DisassemblyAssistant so they can be used to share/track information between instructions being enhanced in the same pass
* Fix incorrect change in breakonconditionalbranch + add comment
* rebase
* Move disasm/__init__.py -> ../disassembly.py in order to avoid a circular import. Create central list of all DisassemblyAssistant's
* move disassembly.py file back to disasm folder
* Fallback to the heuristic if cannot resolve thread variables
* Move the hint about `libthread-db-search-path` to the help docstring
* Use line-wrapping and markdown code block
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Upgrade to Capstone V6
* Fix final bugs related to changes in metadata/shift encoding in Capstone v6. All tests pass
* rebase prep
* Update to Capstone v6 alpha 4
* lint
* Apply patch to fix nixos packaging
* Fix "set glibc 2.31" which got broken recently
I haven't tracked when it got broken, but we were setting a tuple for a string parameter.
It did not work on 2025.02.19 but worked on 2025.01.20.
I also added a testcase for this behavior now.
* Update glibc.py
* change branch-if-(not)taken command category to breakpoint
* more descriptive onegadget text
* add check for extraneous files in docs/commands, move the break command's files
* remove example since it renders wrong on the web doc
and the example itself is :(
* delete extra docs with gen
* add pyreadline3 for windows
* fix terminal for windows
* fix disasm mmap for windows
* fix lint
* Update pwndbg/dbg/lldb/repl/readline.py
* small fix for readline
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* parameter pretty printing, improved help doc
* make var descriptions short (put it in help doc), define enumerations
* swap value and description column
* lint
* revert to ' for quoting, fix some tests
* golf the config a bit
* fix config filtering test
* lint
* make category a mandatory argument for commands
* cleanup doc generating script, add option to verify, allow handwritten edits
* regenerated docs
* lint
* add verification to ci
* add gdb to docs ci
* run verification from uv?
* run pwndbg xd
* fixup! regenerated docs
* fixup! regenerated docs
* what?
* test
* ensure consistent doc generation by fixing term width
* change marker text a bit
* index generation
* update comment on usage
* fix: adjust to `rr`'s vFile reply
`rr replay` use `"F-01,2"` to indicate a vFile error while pwndbg
detects `"F-1,"`. Patch the code to process some cases like `rr`.
* edit: add a ` ` to satisfy lint.
* aglib.file: apply to potential `"errno;attachment"`
* edit: satisfy reviewdog
* aglib.file: skip `attachment` when parsing vFile
> F result [,errno] [;attachment]
`attachment` is what we don't need, strip it before parsing result and
errno
* aglib.file: remove duplicated split
* tls: dump the tls address by default
Use a `dt tcbhead_t <tls_address>` if there is a `tcbhead_t`. If there
is not, use telescope to dump it
Refactor the tls tests and add some new ones based on the change.
* Update pwndbg/commands/tls.py
* Update pwndbg/commands/tls.py
* Update pwndbg/commands/tls.py
* Update tls.py
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* add strings.yield_in_page, refactor strings command
This commit adds a `pwndbg.aglib.strings.yield_in_page` function that yields all strings in a given memory page.
It also refactors the `pwndbg.commands.strings` command to use this feature.
* fixes
* fixes
* fix