This command shows libc version of currently debugged binary and link to its sources.
Currently it only supports glibc and shows link to raw/pure gnu.org glibc sources.
Meaning, it does not handle custom/patched glibc versions that may be there on Ubuntu etc.
In the future this command could support other libcs (like musl used by Alpine) or/and display the binary build_id and
maybe a link to libcdb.
* 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
* Expose list of breakpoint locations in aglib
The list of addresses with active breakpoints can be retrieved using `Debugger.breakpoint_locations()`.
* Highlight breakpoints in `nearpc` output
Addresses in the disassembly which have an active breakpoint attached to them
are prefixed using by `b+` and highlighted in red by default.
This can be configured using the new `highlight-breakpoints`, `nearpc-breakpoint`,
and `nearpc-breakpoint-color` theme config options.
* Fix `breakpoint_locations` on lldb
* Update tests/gdb-tests/tests/test_nearpc.py
* Refactor breakpoint prefix logic
* Account for leading space before prefix again
* Move prefix coloring and preparation outside loop
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* attachp: add --exact for exact command name match
Fixes#2816. This can now be done e.g. with `attach --retry --exact ls`
To test it, run `ls -lah /*` so ls is running long enough for GDB to attach to it
* Update pwndbg/commands/attachp.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update pwndbg/commands/attachp.py
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* attachp: add default target if not provided
Fixes#2815. The `attachp` command with no arguments will now attempt to attach to a process with the same name as the
name of the binary loaded into the debugger.
* Update pwndbg/commands/attachp.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add programatic controls to the LLDB Pwndbg CLI
* Update pwndbg-lldb.py
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* Use `sys.stdout.buffer` directly, when sensible
* Use `.execute`, not `.execute_and_capture` in pwndbg-lldb
* Small fixes
---------
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* Reduce context shaking when quickly stepping
by reserving empty lines after the command prompt
* clarify the extra lines property
* add config option
* disable line-reservation for tests
* lint
* Separate tips for GDB, Pwndbg and LLDB
* Fix linting issues
* Fix docstring formatting
* Remove redundant TIPS variable as suggested
* Fix: Update tips command to work with separated debugger tips
- Removed TIPS variable for backward compatibility
- Added get_all_tips() function to retrieve appropriate tips based on debugger
- Updated tips.py to use get_all_tips() instead of importing TIPS
- Modified get_tip_of_the_day() to use pwndbg.dbg.is_gdblib_available()
* fix lint
* fix lint
* Simplify get_tip_of_the_day() by using get_all_tips()
* Update tips.py
* Update tips.py fix lint
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
We're now using `writelines` to output the context data which wasn't implemented
for the CallOutput redirection layer. Add a smoke test for that output redirection.
Refs #2654
* commands/config.py: minor refactor
* config command: fix boolean parameter displays
Fixes#2748: a bug/bad UX where `config` command displayed the boolean
parameter values as `True` or `False` while setting them with `set
<param> <value>` requires passing `on` or `off`.
This commit makes it so that the `on` or `off` is shown instead.
* Fix lint
* Allow dumpargs to format bit flags
If flags are supplied for a funciton in `functions_data.py`, the
`dumpargs` command can pretty-print the combination of flags used in the
call.
* Update format for flags arguments.
The format now includes the original integer value *and* the extracted
flag names (if any). A sample output would be `0x03 (FLAG_2|0x01)`.
* Fix lint
* Address review comments
* Remove import after rebase
---------
Co-authored-by: Loren Van Spronsen <lorenvs@google.com>
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Set the parameter in gdb to the new value when the abstraction in
pwndbg.lib.config.Parameter changes. This makes sure other commands
accessing the value in gdb like "show <parameter>" display the correct value.
Fixes#2744
This commit fixes#2674. A bug in commands.context implementation where we printed out the banner without a newline when context was forwarded to separate terminals.
Use the `PWNDBG_[BINJA|IDA]_SERVER_HOST` and `PWNDBG_[BINJA|IDA]_SERVER_PORT`
environment variables to specify where the XMLRPC server should listen on.
This allows you to change the host to e.g. "0.0.0.0" to allow connecting from WSL to an
IDA/Binja running on Windows without having to touch the scripts everytime.