* Initial version of qemu-user tests
* Refactor testing files to reduce file duplication, introduce qemu-user-tests
* lint and edit github actions workflow file. Move old qemu-user tests to seperate directory
* Add iproute2 so ss command is available
* test ubuntu 24
* funkiness with current working directory...
* Further remote old test_qemu.sh and integrate into a Pytest fixture
* lint
* Disable ASLR, add test for aarch64 jumps
* Use Popen.kill() function to make sure it closes.
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* qemu.kill() on the other fixture as well
* comment
* comment
* lint
* system test path stuff
* remove old try-catch block
* revert
* revert path change
* Use os._exit to pass return code, and move qemu-user tests above system tests because they run significantly faster
* lint
* Flush stdout before os._exit
* Comment out flaky check for the address of main in old qemu tests
* rename qemu-user to cross-arch
* rename qemu-user to cross-arch and hotfix to not run pytest when
cross-arch is used
* remove todo comment
* another comment
* Test pwndbg.gdblib.symbol.address is not None and revert setarch -R
* Revert os.exit change
* Revert os.exit change
* Revert os.exit change
* readd os.exit in new exit places
* lint
* rebase
* delete file introduced in rebase
* break up tests into 3 files to invoke separately. Update GitHub workflow, remove code duplication in existing test
* code coverage
* fix code coverage
* lint
* test difference between Ubuntu 22 and 24 in Kernel tests
* lint
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Improve attachp: fix partial match, add --user and --all
This commit fixes the attachp command so it has a better partial matching logic.
It also adds `--user <uid|username>` and `--all` options.
* Update pwndbg/commands/attachp.py
* Update pwndbg/commands/attachp.py
* resolving address expression for #2271
* reverting back to the trivial change, we will still have to deal with rebase as a new issue
* Update peda.py
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* first commit
* arm
* AArch64 add, sub. Fix handler, better arm thumb mode handling
* AArch64, Arm, Mips, and full RISCV math annotations
* Reduce code duplication in X86, add OR instruction
* lint
* mul, div, (aarch64, arm, mips) and mod (mips)
* basic mul for real this time
* Add rest of riscv instructions
* lint
* add +
* statically determine adrp
* fix risc-v crash
* rebase & lint
* lint and add last missing instructions
* Expand Debugger-agnostic API to include vmmap, symbol and architecture functionality
* Fix unit tests
* Update pwndbg/dbg/lldb.py
* Fix nits
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* basic go value dumping
* better error handling and misc improvements
* minor documentation changes
* satisfy mypy
* struct parsing and bug fix
* satisfy mypy
* deal with evacuated buckets
* better error message for invalid expressions
* convert bytearray to bytes before repr
* support for recursive types and better type dumping
* better QOL for go-dump command
* formatting options and debug/pretty printing
* add go dumping unit tests
* deal with differences in old go version
* lint
* old go versions missing any alias
* proper name dumping for go versions prior to 1.17
* lint
* go is being weird on CI
* warn instead of erroring
* function and interface dumping
* bump pwntools to 4.14.0b0
Run ./setup.sh or ./setup-dev.sh to upgrade.
This is required for RISC-V syscall numbers.
* Delete pwndbg.constants in favor of pwnlib
* Add event system to the Debugger-agnostic API
* Move uses of `pwndbg.gdblib.events` to the Debugger-agnostic API
* Fix rebase mistakes
* Update pwndbg/commands/context.py
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Update context.py
* Update __init__.py
* Fix nits
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* new register list to extract flags
* lint
* lint2
* list order
* remove stale comment
* fix
* disable debug mode...
* Fix with specific register ordering
* Add reference to pr
* remove debug statement
* cache order on registerset
* lint
* list -> List
* _generate_load_annotator
* Parent class function for load-instruction annotations. RISCV loads implemented and tested. SPARC load/store instructions noted
* Get ARM32 load and store instructions
* Add all AArch64 loads and stores
* MIPS memory address resolver
* AArch64 memory resolver
* AArch64 shift operation in memory operands
* Arm resolve memory operands and PC special case
* Lint
* comment
* rebase and lint
* comment corrections
* Fill in arm function maps
* extract mips load instructions
* lint
* Remove unnecessary parameter to enhancement telescope function
* Implement signed loads
* Now with load code moved to parent, refactor in x86 class
* lint
* aarch64 read size fix
* arm thumb mode pc + 4
* read thumb bit from emu when needed
* lint
* rebase
* lint
* rebase
* Add load annotator to MIPS
* lint
* fix last aarch64 register thing
* minor fixes
* Small fix to remove crash in specific cases - when we generate an annotation on an instruction detected to change the program counter (which sometimes happens, like an add instruction where the pc is the target in Arm)
* fix for real
* feat: enhance attachp command to support partial process name matching.
* feat: use to retrieve PID and command, support multiple target search.
* docs: update attachp command description to include partial name matching
* basic binary ninja integration
* start centralizing integrations into uniform interface
* finish most integrations
* make binja integration contain all ida features
* allow switching servers
* remove unused functions
* format
* fix unit tests
* satisfy mypy + warn instead of error on invalid provider
* fix decompilation not working in function prologue
* better config options and il config
* lint
* fix bn_sym test
* add decomp command
* add bn_eval gdb function
* format binja_script.py
* satisfy mypy again
* doc update
* move integrations to separate subdir + make test_loads more versatile
* format
* forgot to push a file
* format
* highlight next instruction instead of previous one in decomp
* fix disassembly il level
* prefer function tags over data tags
* add bn_var function
* add variable labeling
* more configurability, documentation, bug fixes
* code cleanup
* format
* remove code duplication between chain.py and memory.py
* add short-lived cache for some integration functions
* use every register available to help with frame inference
* lint
* don't waste time checking irrelevant registers
* move performance hit in cache only to except case
* fix issue with conflict resolution
* lint
* fix rebase mistake
* Add annotations for CMP like instructions in AArch64, Arm. Refactor it to avoid code duplication
* Use walrus operator
* Properly resolve Arm register and constant operands, applying shifts and extends, to resolve actual values used
* Apply mask only if doing shift/extend
* lint
* remove unused method
* immediate constant shift doesn't need bit mask - miximum shift possible is 4095 << 12, which doesn't overflow in any case
* constant 5
* Make register width check better
* lint
* Unicorn now runs Thumb mode, and Capstone disassembler can dynamically change to Thumb mode disassembling in the middle of the disasm view (based on the emulator)
* thumb mode fix
* fix
* lint
* comment
* Fix bool() bug and make emu code a bit cleaner
* Finish separating command from GDB
* Fix lints
* Add ContextManager for thread and frame selection
* Add LLDB to the Debugger API
* Add test command using `ArgparsedCommand`
* Fix lints and small issues
* Minor fix
* Fix session
* Change inferior selection in LLDB
* DON'T AWOO $350 FINE
* Lint fixes
* Reword comment about `Value.is_optimized_out`
* Revert to dev LLDB implementation
* Revert pwndbg/lldblib/__init__.py to upstream version
* Move usage of `pwndbg.gdblib.regs.fix` in `command/__init__.py` to Debugger API
* More lint fixes
* Add typing info to gdb.py
* Add a few clarifications
* Lint fix
* nit
* Finish separating command from GDB
* Fix lints
* Add ContextManager for thread and frame selection
* Make `pwndbg.dbg.gdb.Selection` a `@contextmanager` function
* Split from `pwndbg/commands/__init__.py` GDB disentaglement PR
* Added types to hexdump()'s parameters
* hexdump(): upgraded format strings to f-strings, while fixing the offset when data is empty
* hexdump(): offset is now correctly computed and updated accross repeated calls to hexdump.
This fixes two bugs:
1. Offset was increased by the number of lines displayed by the hexdump() command,
which was incorrect, as some lines may be compressed;
2. When dumping a number of bytes that is not divisible by the number of bytes per line,
offset would be incorrectly updated.
* Linter
* hexdump: fixed type of retrieved config entry hexdump_group_use_big_endian
* Fixed test_hexdump_saved_address_and_offset test to account for random stack address
* Improve bin corruption checks
* Update pwndbg/heap/ptmalloc.py
* factor out and clean up bin corruption check
* check chunks even if bin is longer than limit
* add empty bin check
* lint.sh, remove testing if
* dont modify chain in check, allow corruption=0, cleanup
* typing, more reliable empty bin check
* cast params to int, otherwise not detected properly
* add regression test for corruption check
* lint.sh
---------
Co-authored-by: Gulshan Singh <gsingh2011@gmail.com>
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Implement bitwise math rotation operations on numbers of discrete width. Will be used in manually evaluating arm instruction offsets and shifts
* fixes