* 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
* Arm thumb mode in banner
* lint
* Use Walrus operator
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* changes
* remove unneeded line
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
This PR fixes a bug with stack exploration: we did not return it from `stack.get()`!
Additionally, it refactors the `is_executable` function to return early and do not cache the `nx` variable.
* Move syscall number evaluation into instruction.py. This allows us to determine and display future syscalls
* Move string manipulation to color.disasm.py
* lint
* fix padding
* Fix x86 syscall
* disable debug mode
* @override decorator added to methods
* comments
* lint
* Fix x86/x86_64 edge cases with syscall register reading, and add test for emulation off for syscalls
* Tests depend on width of context banner
* Fix strange rebasing error
* Add IRET to jump groups, and remove multiple places in codebase where jumps groups are defined (non uniformly)
* remove duplicate test (rebase stuff)
* Honor delay slots
* fix bug with linear use of nearpc
* Move some logic around to allow for x86 REP instruction to pass test cases
* lint + comment
* rebase
* restore wx changes
* rewrite small comment
* simply check and make call instructions work again
* Move syscall number evaluation into instruction.py. This allows us to determine and display future syscalls
* Move string manipulation to color.disasm.py
* lint
* fix padding
* Fix x86 syscall
* disable debug mode
* @override decorator added to methods
* comments
* lint
* Fix x86/x86_64 edge cases with syscall register reading, and add test for emulation off for syscalls
* Tests depend on width of context banner
* Fix strange rebasing error
* Call like instructions
* Add IRET to jump groups, and remove multiple places in codebase where jumps groups are defined (non uniformly)
* remove duplicate test (rebase stuff)
* lint
* Fix caching for pwndbg.gdblib.elf functions
* Add test for cache clear priority
* Fix formatting in files
* switch priority to an enum instead of boolean
* fix logging for start event
* decouple gdblib.events import from lib.cache
* Exit with non-zero code from gdbinit.py if an exception occurs
* Update gdbinit.py
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Move syscall number evaluation into instruction.py. This allows us to determine and display future syscalls
* Move string manipulation to color.disasm.py
* lint
* fix padding
* Fix x86 syscall
* comment
* disable debug mode
* Fix a test - we now remember previous syscalls as well
* Move x86 specific syscall logic to the x86 subclass
* lint
* @override decorator added to methods
* comments
* lint
* add test with emulation disabled for syscall annotation
* Fix x86/x86_64 edge cases with syscall register reading, and add test for emulation off for syscalls
* Update an outdated comment
* Tests depend on width of context banner
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>