* install uv and use it to create venv
* fix lint.sh to use all necessary deps
* make the test scripts use uv
* put uv into system path
* more clear setup.sh output
* don't look for uv in venv
* update the workflows to use uv
* lowercase pwndbg in upd message
* fix coverage invocation
* more robust test invocation
* pre-sync docs build
* don't pass venv to find_uv in [gdb/lldb]init
* uv sync before lint for more robustness
* make lldb work out of the box together with gdb
* don't uninstall dependancies when syncing
* modify scripts to use uv inside venv
* update workflows
* fix lint for scripts/
* update doc verifier workflow
* let nix magic check uv.lock
* use the venv as specified from venv in scripts so it works in docker
* add uv to project deps
* fix tests venv location
* revert uv venv lookup changes
* fix kernel tests
* fix nix
* work without venv, refactor code, packagers enjoy
* fix dockerfiles
* no posix; bash is my new best friend
* dont make venv in nix
* cleaned up paths
* Update gdbinit.py
* rebase: update link and uv lock
* Update lldbinit.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update scripts/common.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update gdbinit.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fixup bad rebase (setuptools)
* don't use UV if the .skip-venv file exists
* document the PWNDBG_PLEASE_SKIP_VENV option
* fix nix devshell
* Update lldbinit.py
* extend -> append
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Optimize vis_heap_chunks command
This commit optimizes the vis_heap_chunks command by:
1) precalculating bin labels instead of computing them on demand for each chunk
2) calling pwndbg.gdblib.memory.read once instead of twice in a hot loop
For `vis 2000` command ran when debugging python3 shell, the first change
cut down the execution time from almost 20s to 5s.
Another benchmark, for both 1) and 2) changes showed 19.28s->4.14s timing.
The benchmark done is included in this commit in
profiling/benchmark_vis_heap_chunks/ so that it can be reproduced e.g.
to optimize the function further or to reproduce my results.
* Fix and test ctx disasm when disassembly-flavor changes
* New lib/cache.py: make caching great again
This commit fixes bugs with old caching (memoize.py) and makes it more
readable.
See also https://github.com/pwndbg/pwndbg/issues/1453
* Update pwndbg/lib/cache.py
Co-authored-by: Gulshan Singh <gsingh2011@gmail.com>
* lib.cache: address PR comments and add debug mode
* Fix lint
* Remove leftover memoize usages
* Add cache benchmark
* fix lint
---------
Co-authored-by: Gulshan Singh <gsingh2011@gmail.com>
* Add scripts for benchmarking and profiling pwndbg commands
* Fix performance issue in emulator.py
Register to unicorn enum lookup was really ineffective. Replaced with
parsing (consts) on initialization time, and only dict lookup on hot path.
* Fix performance issue in syntax_highlight.
Current code initialized pygments on each syntax_highlight(), which
apparently took some time.
* Minor performance improvements in syntax_highlight
* Memoize IDA availability.
Not sure it this is a valid solution, I have never used pwndbg with IDA.
However, we should not try to connect to ida on each context(), as this
takes 25% of current exec time.
* Explicitly source gdbinit in benchmark scripts.