* 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
* add comments in mkdocs, autogenerate nav
* reorganize the docs folder structure so they look good when the nav is autogenerated
* add really cool Source page
* fix edit, hide nav in setup, cleanup mkdocstrings config a bit
* fix doc CI build failure
* cleanup mkdocs.yml
* allow mkdocstrings to use linter
* remove empty files
* show parameters cleaner
according to the google style guide, we shouldn't specify types when they are in annotation, so using table which always shows types doesn't make sense
* Fix proper check symlink path
* Fix#2531 terminfo issues in portable build
* Remove useless line this should be remove in #2459 PR
* Fix terminfo for portable on darwin
* test ci TERM=xterm-256color
* portable: Disable user site packages `-s` (same as PYTHONNOUSERSITE=1)
* portable: fix bundling on darwin
* portable: Disable user site packages (same as PYTHONNOUSERSITE=1)
* portable: Disable user site packages
We don't have an ARM64 runner for creating release binaries since ~6 months.
Commenting this out until GitHub finally allows open source projects to use its own arm64 runners.
* 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>
* Add gdb_version to mock gdblib
* Re-enable unit tests
* Only collect unit test coverage if --cov is passed
* Source venv before running tests in github action
* Add venv path PATH in to Dockerfile
* Only check for "/ls" in `which` test
* Move docs dependencies into pyproject, install with poetry in GH action
* Remove old sphinx files
* Remove custom theme dir
* Hide navigation and toc on the blog page
* Remove fetch-depth from docs GH workflow
* Source venv before running mkdocs build
* Remove caching from docs GH workflow
* Remove python version in docs GH workflow
- remove submodules from all files
- bump flake.lock
- add gdb-pt-dump as dependency
- fix building Dockerfile
- fix gdb-pt-dump was broken on portable packages
Until now we ran the lint job on CI on both Ubuntu 20.04 and Ubuntu 22.04. I am not sure why exactly we run it on both, but I think we can try running it only on Ubuntu 22.04 unless there are good reasons to keep both.
* Only run arch for testing
* Remove outdated arch repo
* Actually build the docker image
* Do not include site packages in sys.path
* Ignore `.relr.dyn` section; skip lines w/o spaces
Newer binaries can contain a `.relr.dyn` section to compress `R_X86_64_RELATIVE` relocation entries.
These binaries can be found for example on archlinux but also on Debian 12 for example.
`readelf` prints the content of the section similarly to this:
```
Relocation section '.relr.dyn' at offset 0x25220 contains 35 entries:
1198 offsets
00000000001ce8d0
00000000001ce8e0
```
Compared to `00000000001d2000 0000000000000025 R_X86_64_IRELATIVE 9f330` for
`.rela.plt`.
Pwndbg now chokes on the new format because it expects a space seperator where there is none.
It might be, that this is actually an upstream problem with binutils, because llvm-readelf prints this:
```
Relocation section '.relr.dyn' at offset 0x25220 contains 1198 entries:
Offset Info Type Symbol's Value Symbol's Name
00000000001ce8d0 0000000000000008 R_X86_64_RELATIVE
00000000001ce8e0 0000000000000008 R_X86_64_RELATIVE
```
Nevertheless, we aren't actually interested in `R_X86_64_RELATIVE` relocations so I guess it's fine to
just skip all lines that contain no spaces at all.
`.relr.dyn` can only containt `R_X86_64_RELATIVE` relocations as far as I understand
https://maskray.me/blog/2021-10-30-relative-relocations-and-relr
* Accept Full RELRO in test
Archlinux has libc and ld with Full RELRO.
We now just accept Partial and Full RELRO.
* Do not copy binaries from host to docker
The `Dockerfile` copies the whole pwndbg folder to the image.
If we have built binaries on the host before, these binaries will contain references to
the host system and *copied* to the image.
If we now run `context code` (inside docker) to have a look at the source code this will
fail, because we will try to refer to a path on the host system.
* Do not use loop index after loop
Do not use loop index after the loop. The tests assumed that the loop in line 186
would run at least once, thereby *resetting* `i` to zero. If we never enter the
loop, `i` will *continue* to have the value it had at the end of line 172.
This will cause the test to fail in mysterious ways because `i` is now not reset
to zero but still has the value `31` for example.
The solution is to never use `i` outside of a loop.
* Re-enable archlinux and temporarily disabled ones