as of nix 2.25.0, `nix fmt` will not automatically recurse through
nix files so `nixfmt-rfc-style` will format from stdin instead.
see: https://github.com/NixOS/nix/pull/11438
this issue https://github.com/NixOS/nixfmt/issues/273 recommends that
we use `nixfmt-tree` which calls `treefmt` in the backend with a
minimal configuration for nix
* add editable pwndbg into the nix devshell
* remove repl-flakes, it is deprecated, see https://github.com/NixOS/nix/issues/10103
* formatting
* mipsel -> mips in devshell
* Don't auto-delete files during command generation, if they contain a hand-written part
* spelling fix
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* expand and add examples to pwndbg convenience functions
* update usage descriptions in _gen_*
* refactor out some common logic
* implement function doc generation
* change some mkdocs defaults around to be better for the general case
* generate function docs
* cleanup some examples, help, and quote escaping explanation
* move fsbase and gsbase definitions (and use decorator)
* cleanup signature for fsbase and gsbase
* autogen functions
* type annotation
* fix ida and binja descriptions
* rename arguments, reorder docs for `help function` and assert convention
* add missing imports
* use inspect.getdoc instead of directly accessing __doc__
for more consistency across python versions
* regen docs with getdoc()
* rewire exit and lint
* let users know about convenience functions through the `pwndbg` command
* sys.exit instead of exit
* 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