mirror of https://github.com/pwndbg/pwndbg.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
1.7 MiB
1 line
1.7 MiB
{"config":{"lang":["en"],"separator":"[\\s\\u200b\\-_,:!=\\[\\]()\"`/]+|\\.(?!\\d)|&[lg]t;|(?!\\b)(?=[A-Z][a-z])","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Home","text":""},{"location":"#pwndbg","title":"pwndbg","text":"<p><code>pwndbg</code> (/pa\u028an\u02c8di\u02ccb\u028c\u0261/) is a GDB and LLDB plug-in that makes debugging suck less, with a focus on features needed by low-level software developers, hardware hackers, reverse-engineers and exploit developers.</p> <p>It has a boatload of features, see FEATURES.md and CHEATSHEET (feel free to print it!).</p>"},{"location":"#why","title":"Why?","text":"<p>Vanilla GDB and LLDB are terrible to use for reverse engineering and exploit development. Typing <code>x/g30x $esp</code> or navigating cumbersome LLDB commands is not fun and often provides minimal information. The year is 2025, and core debuggers still lack many user-friendly features such as a robust hexdump command. Windbg users are completely lost when they occasionally need to bump into GDB or LLDB.</p>"},{"location":"#what","title":"What?","text":"<p>Pwndbg is a Python module which is loaded directly into GDB or LLDB*. It provides a suite of utilities and enhancements that fill the gaps left by these debuggers, smoothing out rough edges and making them more user-friendly.</p> <p>Many other projects from the past (e.g., gdbinit, PEDA) and present (e.g. GEF) exist to fill some these gaps. Each provides an excellent experience and great features -- but they're difficult to extend (some are unmaintained, and all are a single 100KB, 200KB, or 363KB file (respectively)).</p> <p>Pwndbg exists not only to replace all of its predecessors, but also to have a clean implementation that runs quickly and is resilient against all the weird corner cases that come up. It also comes batteries-included, so all of its features are available if you run <code>setup.sh</code>.</p>"},{"location":"#when-to-use-gdb-or-lldb","title":"When to Use GDB or LLDB?","text":"<p>Pwndbg supports both GDB and LLDB, and each debugger has its own strengths. Here's a quick guide to help you decide which one to use:</p> Use Case Supported Debugger Debugging Linux binaries or ELF files GDB, LLDB Debugging Mach-O binaries on macOS LLDB Linux kernel debugging (qemu-system) GDB, LLDB Linux user-space emulation (qemu-user) GDB Embedded debugging (ARM Cortex M* or RISC-V/32) GDB, LLDB <p>Pwndbg ensures a consistent experience across both, so switching between them is seamless.</p> <p>The LLDB implementation in Pwndbg is still in early-stage and may contain bugs or limitations. Known issues are tracked in GitHub Issues.</p> <p>If you encounter any problems, feel free to report them or discuss on our Discord server.</p>"},{"location":"#compatibility-table","title":"Compatibility Table","text":"Feature Supported Version Notes pwndbg-gdb - Python 3.10+ - GDB 12.1+ Battle-tested on Ubuntu 22.04/24.04 pwndbg-lldb - Python 3.12+ - LLDB 19+ Experimental/early-stage support qemu-user QEMU 8.1+ vFile API is needed for vmmap qemu-system QEMU 6.2+ Supported version since ubuntu 22.04"},{"location":"#how","title":"How?","text":"<p>For a portable version with no external dependencies, scroll down for the Portable Installation section.</p>"},{"location":"#installing-lldb","title":"Installing LLDB","text":"<ul> <li>Install via the Nix package manager (you can use Nix on any distribution): <pre><code>nix shell github:pwndbg/pwndbg#pwndbg-lldb\npwndbg-lldb ./your-binary\n</code></pre></li> <li>Or download portable version with no external dependencies, scroll down for the Portable Installation section</li> <li>Or install from source, instructions below. (not supported)</li> </ul>"},{"location":"#installing-gdb","title":"Installing GDB","text":"<ul> <li>Install via the Nix package manager (you can use Nix on any distribution): <pre><code>nix shell github:pwndbg/pwndbg\npwndbg ./your-binary\n</code></pre></li> <li> <p>Or download portable version with no external dependencies, scroll down for the Portable Installation section</p> </li> <li> <p>Or install from source, instructions below.</p> </li> </ul> Click here to expand instructions Installation from source is straightforward: <pre><code>git clone https://github.com/pwndbg/pwndbg\ncd pwndbg\n./setup.sh\n</code></pre> Pwndbg is supported on Ubuntu 22.04, and 24.04 with GDB 12.1 and later. We do not test on any older versions of Ubuntu, so `pwndbg` may not work on these versions. - For Ubuntu 20.04 use the [2024.08.29 release](https://github.com/pwndbg/pwndbg/releases/tag/2024.08.29) - For Ubuntu 18.04 use the [2023.07.17: ubuntu18.04-final release](https://github.com/pwndbg/pwndbg/releases/tag/2023.07.17) We may accept pull requests fixing issues in older versions on a case by case basis, please discuss this with us on [Discord][discord] first. You can also always checkout an older version of `pwndbg` from around the time the Ubuntu version you're interested in was still supported by Canonical, or you can attempt to build a newer version of GDB from source. Other Linux distributions are also supported via `setup.sh`, including: * Debian-based OSes (via apt-get) * Fedora and Red Hat (via dnf) * Clear (via swiped) * OpenSUSE LEAP (via zypper) * Arch and Manjaro (via community AUR packages) * Void (via xbps) * Gentoo (via emerge) If you use any Linux distribution other than Ubuntu, we recommend using the [latest available GDB](https://www.gnu.org/software/gdb/download/) built from source. You can build it as: <pre><code>cd <gdb-sources-dir>\nmkdir build && cd build\nsudo apt install libgmp-dev libmpfr-dev libreadline-dev texinfo # required by build\n../configure --disable-nls --disable-werror --with-system-readline --with-python=`which python3` --with-system-gdbinit=/etc/gdb/gdbinit --enable-targets=all\nmake -j7\n</code></pre>"},{"location":"#portable-installation","title":"Portable Installation:","text":"<p>The portable version includes all necessary dependencies and should work without the need to install additional packages.</p>"},{"location":"#download-the-portable-version","title":"Download the Portable Version:","text":"<p>Download the portable version from the Pwndbg releases page by selecting the desired version.</p> <p>Note: For LLDB, only the tarball version is available.</p> <p>Make sure to select the correct file for your operating system and architecture: - Linux (x86_64, armv7l, aarch64, riscv64): - <code>pwndbg_2025.04.18_amd64.tar.xz</code> (x86_64 for GDB) - <code>pwndbg_2025.04.18_armv7.tar.xz</code> (armv7l for GDB) - <code>pwndbg_2025.04.18_arm64.tar.xz</code> (aarch64 for GDB) - <code>pwndbg_2025.04.18_riscv64.tar.xz</code> (riscv64 for GDB) - <code>pwndbg-lldb_2025.04.18_amd64.tar.xz</code> (x86_64 for LLDB) - <code>pwndbg-lldb_2025.04.18_armv7.tar.xz</code> (armv7l for LLDB) - <code>pwndbg-lldb_2025.04.18_arm64.tar.xz</code> (aarch64 for LLDB) - <code>pwndbg-lldb_2025.04.18_riscv64.tar.xz</code> (riscv64 for LLDB)</p> <ul> <li>macOS (amd64, arm64):</li> <li><code>pwndbg-lldb_2025.04.18_macos_amd64.tar.xz</code> (macOS, Intel/AMD CPUs, for LLDB)</li> <li><code>pwndbg-lldb_2025.04.18_macos_arm64.tar.xz</code> (macOS, Apple Silicon/M1/M2/M*, for LLDB)</li> <li><code>pwndbg_2025.04.18_macos_amd64.tar.xz</code> (macOS, Intel/AMD CPUs for GDB)</li> <li><code>pwndbg_2025.04.18_macos_amd64.tar.xz</code> (macOS, Apple Silicon/M1/M2/M*, for GDB via Rosseta emulation)</li> </ul>"},{"location":"#instructions","title":"Instructions:","text":"<ul> <li>Portable tarball: <pre><code>tar -v -xf ./pwndbg_2025.04.18_amd64.tar.xz\n# ./pwndbg/bin/pwndbg\n# or ./pwndbg/bin/pwndbg-lldb\n</code></pre></li> <li> <p>Installation on RPM-based Systems (CentOS/Alma/Rocky/RHEL): <pre><code>dnf install ./pwndbg-2025.04.18.x86_64.rpm\n# pwndbg\n# and/or pwndbg-lldb\n</code></pre></p> </li> <li> <p>Installation on DEB-based Systems (Debian/Ubuntu/Kali): <pre><code>apt install ./pwndbg_2025.04.18_amd64.deb\n# pwndbg\n# and/or pwndbg-lldb\n</code></pre></p> </li> <li> <p>Installation on Alpine: <pre><code>apk add --allow-untrusted ./pwndbg_2025.04.18_x86_64.apk\n# pwndbg\n# and/or pwndbg-lldb\n</code></pre></p> </li> <li> <p>Installation on Arch Linux: <pre><code>pacman -U ./pwndbg-2025.04.18-1-x86_64.pkg.tar.zst\n# pwndbg\n# and/or pwndbg-lldb\n</code></pre></p> </li> </ul>"},{"location":"#what-can-i-do-with-that","title":"What can I do with that?","text":"<p>For further info about features/functionalities, see FEATURES.</p>"},{"location":"#who","title":"Who?","text":"<p>Pwndbg is an open-source project, maintained by many contributors!</p> <p>Pwndbg was originally created by Zach Riggle, who is no longer with us. We want to thank Zach for all of his contributions to Pwndbg and the wider security community.</p> <p>Want to help with development? Read CONTRIBUTING or join our Discord server!</p>"},{"location":"#how-to-develop","title":"How to develop?","text":"<p>To run tests locally you can do this in docker image, after cloning repo run simply <pre><code>docker compose run main ./tests.sh\n</code></pre> Disclaimer - this won't work on apple silicon macs.</p>"},{"location":"#contact","title":"Contact","text":"<p>If you have any questions not worthy of a bug report, feel free to ping anybody on Discord and ask away.</p>"},{"location":"setup/","title":"Setup","text":""},{"location":"setup/#quick-start","title":"Quick start","text":"<p>Installation from source is straightforward:</p> <pre><code>git clone https://github.com/pwndbg/pwndbg\ncd pwndbg\n./setup.sh\n</code></pre>"},{"location":"setup/#install-on-linux-distributions","title":"Install on Linux distributions","text":"<p>Nix package manager (you can use Nix on any distribution): <pre><code>nix shell github:pwndbg/pwndbg\npwndbg ./your-binary\n</code></pre></p> <p>Pwndbg is supported on Ubuntu 22.04, and 24.04 with GDB 12.1 and later. We do not test on any older versions of Ubuntu, so <code>pwndbg</code> may not work on these versions (for Ubuntu 18.04 use the 2023.07.17: ubuntu18.04-final release). We may accept pull requests fixing issues in older versions on a case by case basis, please discuss this with us on Discord first. You can also always checkout an older version of <code>pwndbg</code> from around the time the Ubuntu version you're interested in was still supported by Canonical, or you can attempt to build a newer version of GDB from source.</p> <p>Other Linux distributions are also supported via <code>setup.sh</code>, including:</p> <ul> <li>Debian-based OSes (via apt-get)</li> <li>Fedora and Red Hat (via dnf)</li> <li>Clear (via swiped)</li> <li>OpenSUSE LEAP (via zypper)</li> <li>Arch and Manjaro (via community AUR packages)</li> <li>Void (via xbps)</li> <li>Gentoo (via emerge)</li> </ul> <p>If you use any Linux distribution other than Ubuntu, we recommend using the latest available GDB built from source. You can build it as: <pre><code>cd <gdb-sources-dir>\nmkdir build\ncd build\n../configure --disable-nls --disable-werror --with-system-readline --with-python=`which python3` --with-system-gdbinit=/etc/gdb/gdbinit --enable-targets=all\nmake -j7\n</code></pre></p>"},{"location":"setup/#portable-installation-from-package","title":"Portable Installation from package","text":"<p>The portable version includes all necessary dependencies and should work without the need to install additional packages.</p>"},{"location":"setup/#download-the-portable-version","title":"Download the Portable Version:","text":"<p>Download the portable version from the Pwndbg releases page by selecting the desired version. Choose the appropriate version for your system architecture (x86_64, armv7l, aarch64, riscv64).</p>"},{"location":"setup/#installation-on-rpm-based-systems-centosalmarockyrhel","title":"Installation on RPM-based Systems (CentOS/Alma/Rocky/RHEL):","text":"<pre><code>dnf install ./pwndbg-2025.04.18.x86_64.rpm\n# pwndbg\n</code></pre>"},{"location":"setup/#installation-on-deb-based-systems-debianubuntukali","title":"Installation on DEB-based Systems (Debian/Ubuntu/Kali):","text":"<pre><code>apt install ./pwndbg_2025.04.18_amd64.deb\n# pwndbg\n</code></pre>"},{"location":"setup/#installation-on-alpine","title":"Installation on Alpine:","text":"<pre><code>apk add --allow-untrusted ./pwndbg_2025.04.18_x86_64.apk\n# pwndbg\n</code></pre>"},{"location":"setup/#installation-on-arch-linux","title":"Installation on Arch Linux:","text":"<pre><code>pacman -U ./pwndbg-2025.04.18-1-x86_64.pkg.tar.zst\n# pwndbg\n</code></pre>"},{"location":"setup/#generic-linux-installation","title":"Generic Linux Installation:","text":"<pre><code>tar -v -xf ./pwndbg_2025.04.18_amd64.tar.xz\n# ./pwndbg/bin/pwndbg\n</code></pre>"},{"location":"blog/","title":"Blog","text":""},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/","title":"Pwndbg coding sprints report","text":"<p>This blog post is a report of the two coding sprints for the Pwndbg project that I organized first on the EuroPython 2022 conference and then, taking inspiration from the previous one, in the Hackerspace Krak\u00f3w, located in Cracow, Poland.</p> <p>PS: If you are only looking for a list of things done, scroll down!</p>"},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/#where-i-got-the-idea-for-sprints","title":"Where I got the idea for sprints?","text":"<p>I have recently attended the EuroPython 2022 conference and I enjoyed the \u201csprints\u201d there. In short, a sprint is a semi-organized event, where anyone can announce a project they will be working on and others can join them. This helps both the projects and the event participants to learn about the project and to make first-time contributions. At the EuroPython conference, there were 16 officially announced projects, but I know that even more projects were being worked on in practice. Of course, other communities or conferences also do this (e.g. NixCon).</p> <p>At the EuroPython conference, I announced my own sprint to work on the Pwndbg project that I maintain. Having no expectations, I felt excited when four people showed up to learn something new and hack together on the project. Later, taking inspiration from it, I organized another sprint, this time in Cracow in the local Hackerspace with even a bigger response. Below, you can read a small report on the two sprints that have happened.</p>"},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/#my-general-idea-for-a-pwndbg-sprint","title":"My general idea for a Pwndbg sprint","text":"<p>Pwndbg is written in Python, so on one hand is easy to hack on, but on the other hand it is a plugin for GDB, a console debugger for native programs (e.g. ones written in C, C++, Go or Rust). The general idea of Pwndbg is to alleviate the pain points of working with and improve the UX of GDB when debugging assembly code, reverse engineering a binary or during exploit development.</p> <p>Since not everyone is familiar with debuggers or the underlyings of programs execution (e.g. assembly code, CPU registers or stack or heap memory) I knew that I had to make some introduction to those concepts and if possible, prepare a list of simple tasks, so that people can get familiar with the codebase and the tool and contribute something.</p>"},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/#europython-2022-sprint","title":"EuroPython 2022 sprint","text":"<p>On the first sprint, four people showed up, mostly having no prior experience with the topic. We started with an introduction to what GDB and Pwndbg are and why and when they are useful.</p> <p>For this, I took a small C program that had a buffer overflow bug: <pre><code>#include <stdio.h>\n#include <string.h>\n\nint main(int argc, char* argv[]) {\n char name[16] = {0};\n\n // NOTE: We copy the `argv[1]` string which may be of arbitrary length\n // into the `name` buffer which is only of 16-bytes long. Thus, we can\n // overwrite the stack memory of the program past the `name` buffer.\n strcpy(name, argv[1]);\n\n printf(\"Hello %s!\\n\", name);\n}\n</code></pre></p> <p>Then, after compiling it (<code>gcc main.c</code>), we ran the program twice to see that it will crash if we provide a too long string as its argument:</p> <pre><code>$ ./a.out Disconnect3d\nHello Disconnect3d!\n\n$ ./a.out Disconnect3d_at_EuroPython\nHello Disconnect3d_at_EuroPython!\n*** stack smashing detected ***: <unknown> terminated\nAborted (core dumped)\n</code></pre> <p>Then, I explained that the \"stack smashing detected\" we see is the \"stack canaries\" (also called \"stack cookies\") exploit mitigation added by compilers. This compiler feature adds a special 8-bytes canary value after the function's local variables located on the stack, so that then a stack frame may look like this:</p> <pre><code>------------------------------ lower addresses\nchar name[16]; |\nuint8_t canary[8]; |\nvoid* function_return_address; V\n------------------------------ higher addresses\n</code></pre> <p>This local stack canary value is then filled in just after the function\u2019s prologue and is verified against a global value before the function returns to see if the stack was not corrupted (starting from the canary). Of course this may not detect all possible stack memory corruptions but it often makes it impossible to exploit a program (e.g. by changing the return address, also located on the stack), knowing just this vulnerability.</p> <p>The stack canary mitigation can also be disabled. And if it were done (by passing in a <code>-fno-stack-protector</code> flag during compilation), we would get a different result when running the resulting program:</p> <pre><code>$ gcc -fno-stack-protector buf.c\n\n$ ./a.out Disconnect3d_on_EuroPython\nHello Disconnect3d_on_EuroPython!\nSegmentation fault (core dumped)\n</code></pre> <p>Now, the \"stack smashing detected\" is gone, but the program still crashed, because we still corrupted a part of its memory that we shouldn't have touched in a way that made the program do illegal things (e.g. accessing unmapped memory).</p> <p>During the sprint, we also ran a GDB+Pwndbg session to see the exact instructions that placed the canary value on the stack memory, to see that our input string was located just before it and how the canary was checked just before the function was returned.</p> <p>I am not going to describe all of this here, but you can see some of it in the below asciinema recording.</p> <p></p>"},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/#hackerspace-krakow-sprint","title":"Hackerspace Krak\u00f3w sprint","text":"<p>Since the second sprint was an ad-hoc event, I had to organize it myself. As a member of Hackerspace Krak\u00f3w, I was able to reserve the hackerspace's softroom, which is a perfect place for people to hack on things using their computers. Then, I advertised the event on the Hackerspace's mailing list and on a few other mediums.</p> <p>I did not expect many people to come, especially that I advertised the sprint ~2 days before the event.</p> <p>But... 8 people (!) showed up (excluding me). I prepared a document with some basic information and tasks, which can be found here (though, it is in Polish and it was modified during and after the sprint).</p> <p>I won't lie: most people that came were friends of mine, some of which I play CTFs with. However, not all of them had really used or developed Pwndbg before.</p>"},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/#accomplishments-from-the-two-sprints","title":"Accomplishments from the two sprints","text":"<p>On the EP sprint, since we were just a group of four, we focused on small improvements to the codebase. In total, we did the following: * reviewed and merged the fs/gs_base fetching improvement PR, * pinned the project's dependencies, * updated the unicorn dependency version, * added a \"tip of the day\" feature, * improved the UX of using Pwndbg within a Python virtual environment, * and also worked on enhancing the display of arguments when stopping on a call to the printf functions family.</p> <p>The last item from the list was the hardest to jump on and it still requires enhancements until it is merged. Nonetheless, all of this was a nice outcome from the whole sprint :).</p> <p>On the second sprint, while we were a bigger group, we had much more limited time (since instead of having ~8 hours, we had just a few). Anyway, we were able to do the following:</p> <ul> <li>Cleanup some code leftover after dropping Python 2 support,</li> <li>Added documentation on how to debug Pwndbg using PyCharm remote debugging,</li> <li>Reviewed and merged the PRs that sets <code>$base_heap</code> variable and a tip for it, which may be useful for heap exploitation,</li> <li>Fix the X30 register display on AARCH64 targets,</li> <li>Fix <code>context args</code> display when PC/IP register pointed to unmapped memory,</li> <li>Fixed the <code>xor</code> and <code>memfrob</code> commands and added tests for them (! :D),</li> <li>Worked on adding a way to dump memory that can be copied right away as C or Python code (this needs to be changed to a command flag),</li> <li>Investigated a potential parsing issue, even looking at GDB's command parsing source code, implemented potential patch, which only later turned out to be redundant and the issue to be invalid.</li> </ul>"},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/#summary-and-whats-next","title":"Summary and what's next?","text":"<p>Organizing those sprints helped me to get back to develop the Pwndbg project more and and attract more people to contribute to it. I also think that more conferences should have this kind of attractions (similarly as more conferences should have lightning talk sessions, heh).</p> <p>Regarding the Pwndbg sprints, I am organizing another one this week in Cracow on Tuesday, so if you live nearby and are interested in learning about Pwndbg or contributing to the project, feel invited! :)</p> <p>PS: Thanks a lot to @arturcygan for reviewing this blog post.</p>"},{"location":"commands/","title":"Index","text":""},{"location":"commands/#commands","title":"Commands","text":""},{"location":"commands/#breakpoint","title":"Breakpoint","text":"<ul> <li>break-if-not-taken - Breaks on a branch if it is not taken.</li> <li>break-if-taken - Breaks on a branch if it is taken.</li> <li>breakrva - Break at RVA from PIE base.</li> <li>ignore - Set ignore-count of breakpoint number N to COUNT.</li> </ul>"},{"location":"commands/#context","title":"Context","text":"<ul> <li>context - Print out the current register, instruction, and stack context.</li> <li>contextnext - Select next entry in context history.</li> <li>contextoutput - Sets the output of a context section.</li> <li>contextprev - Select previous entry in context history.</li> <li>contextsearch - Search for a string in the context history and select that entry.</li> <li>contextunwatch - Removes an expression previously added to be watched.</li> <li>contextwatch - Adds an expression to be shown on context.</li> <li>regs - Print out all registers and enhance the information.</li> </ul>"},{"location":"commands/#developer","title":"Developer","text":"<ul> <li>dev-dump-instruction - Dump internal PwndbgInstruction attributes.</li> <li>log-level - Set the log level.</li> </ul>"},{"location":"commands/#disassemble","title":"Disassemble","text":"<ul> <li>emulate - Like nearpc, but will emulate instructions from the current $PC forward.</li> <li>nearpc - Disassemble near a specified address.</li> </ul>"},{"location":"commands/#glibc-ptmalloc2-heap","title":"GLibc ptmalloc2 Heap","text":"<ul> <li>arena - Print the contents of an arena.</li> <li>arenas - List this process's arenas.</li> <li>bins - Print the contents of all an arena's bins and a thread's tcache.</li> <li>fastbins - Print the contents of an arena's fastbins.</li> <li>find-fake-fast - Find candidate fake fast or tcache chunks overlapping the specified address.</li> <li>heap-config - Shows heap related configuration.</li> <li>heap - Iteratively print chunks on a heap.</li> <li>hi - Searches all heaps to find if an address belongs to a chunk. If yes, prints the chunk.</li> <li>largebins - Print the contents of an arena's largebins.</li> <li>malloc-chunk - Print a chunk.</li> <li>mp - Print the mp_ struct's contents.</li> <li>smallbins - Print the contents of an arena's smallbins.</li> <li>tcache - Print a thread's tcache contents.</li> <li>tcachebins - Print the contents of a tcache.</li> <li>top-chunk - Print relevant information about an arena's top chunk.</li> <li>try-free - Check what would happen if free was called with given address.</li> <li>unsortedbin - Print the contents of an arena's unsortedbin.</li> <li>vis-heap-chunks - Visualize chunks on a heap.</li> </ul>"},{"location":"commands/#integrations","title":"Integrations","text":"<ul> <li>ai - Ask GPT-3 a question about the current debugging context.</li> <li>bn-sync - Synchronize Binary Ninja's cursor with GDB.</li> <li>decomp - Use the current integration to decompile code near an address.</li> <li>j - Synchronize IDA's cursor with GDB.</li> <li>r2 - Launches radare2.</li> <li>r2pipe - Execute stateful radare2 commands through r2pipe.</li> <li>rop - Dump ROP gadgets with Jon Salwan's ROPgadget tool.</li> <li>ropper - ROP gadget search with ropper.</li> <li>rz - Launches rizin.</li> <li>rzpipe - Execute stateful rizin commands through rzpipe.</li> <li>save-ida - Save the ida database.</li> </ul>"},{"location":"commands/#kernel","title":"Kernel","text":"<ul> <li>binder - Show Android Binder information</li> <li>kbase - Finds the kernel virtual base address.</li> <li>kchecksec - Checks for kernel hardening configuration options.</li> <li>kcmdline - Return the kernel commandline (/proc/cmdline).</li> <li>kconfig - Outputs the kernel config (requires CONFIG_IKCONFIG).</li> <li>klookup - Lookup kernel symbols</li> <li>knft-dump - Dump all nftables: tables, chains, rules, expressions</li> <li>knft-list-chains - Dump netfilter chains form a specific table</li> <li>knft-list-exprs - Dump only expressions from specific rule</li> <li>knft-list-flowtables - Dump netfilter flowtables from a specific table</li> <li>knft-list-objects - Dump netfilter objects from a specific table</li> <li>knft-list-rules - Dump netfilter rules form a specific chain</li> <li>knft-list-sets - Dump netfilter sets from a specific table</li> <li>knft-list-tables - Dump netfliter tables from a specific network namespace</li> <li>kversion - Outputs the kernel version (/proc/version).</li> <li>pcplist - Print Per-CPU page list</li> <li>slab - Prints information about the slab allocator</li> </ul>"},{"location":"commands/#linuxlibcelf","title":"Linux/libc/ELF","text":"<ul> <li>argc - Prints out the number of arguments.</li> <li>argv - Prints out the contents of argv.</li> <li>aslr - Check the current ASLR status, or turn it on/off.</li> <li>auxv-explore - Explore and print information from the Auxiliary ELF Vector.</li> <li>auxv - Print information from the Auxiliary ELF Vector.</li> <li>elfsections - Prints the section mappings contained in the ELF header.</li> <li>envp - Prints out the contents of the environment.</li> <li>errno - Converts errno (or argument) to its string representation.</li> <li>got - Show the state of the Global Offset Table.</li> <li>gotplt - Prints any symbols found in the .got.plt section if it exists.</li> <li>libcinfo - Show libc version and link to its sources</li> <li>linkmap - Show the state of the Link Map</li> <li>onegadget - Find gadgets which single-handedly give code execution.</li> <li>piebase - Calculate VA of RVA from PIE base.</li> <li>plt - Prints any symbols found in the .plt section if it exists.</li> <li>strings - Extracts and displays ASCII strings from readable memory pages of the debugged process.</li> <li>threads - List all threads belonging to the selected inferior.</li> <li>tls - Print out base address of the current Thread Local Storage (TLS).</li> <li>track-got - Controls GOT tracking</li> <li>track-heap - Manages the heap tracker.</li> </ul>"},{"location":"commands/#memory","title":"Memory","text":"<ul> <li>distance - Print the distance between the two arguments, or print the offset to the address's page base.</li> <li>gdt - Decode X86-64 GDT entries at address</li> <li>go-dump - Dumps a Go value of a given type at a specified address.</li> <li>go-type - Dumps a Go runtime reflection type at a specified address.</li> <li>hexdump - Hexdumps data at the specified address or module name.</li> <li>leakfind - Attempt to find a leak chain given a starting address.</li> <li>memfrob - Memfrobs a region of memory (xor with '*').</li> <li>mmap - Calls the mmap syscall and prints its resulting address.</li> <li>mprotect - Calls the mprotect syscall and prints its result value.</li> <li>p2p - Pointer to pointer chain search. Searches given mapping for all pointers that point to specified mapping.</li> <li>probeleak - Pointer scan for possible offset leaks.</li> <li>search - Search memory for byte sequences, strings, pointers, and integer values.</li> <li>telescope - Recursively dereferences pointers starting at the specified address.</li> <li>telescope - Recursively dereferences pointers starting at the specified address.</li> <li>vmmap-add - Add virtual memory map page.</li> <li>vmmap-clear - Clear the vmmap cache.</li> <li>vmmap-explore - Explore a page, trying to guess permissions.</li> <li>vmmap - Print virtual memory map pages.</li> <li>xinfo - Shows offsets of the specified address from various useful locations.</li> <li>xor - XOR <code>count</code> bytes at <code>address</code> with the key <code>key</code>.</li> </ul>"},{"location":"commands/#misc","title":"Misc","text":"<ul> <li>asm - Assemble shellcode into bytes</li> <li>checksec - Prints out the binary security settings using <code>checksec</code>.</li> <li>comm - Put comments in assembly code.</li> <li>cyclic - Cyclic pattern creator/finder.</li> <li>cymbol - Add, show, load, edit, or delete custom structures in plain C.</li> <li>down - Select and print stack frame called by this one.</li> <li>dt - Dump out information on a type (e.g. ucontext_t).</li> <li>dumpargs - Prints determined arguments for call instruction.</li> <li>getfile - Gets the current file.</li> <li>hex2ptr - Converts a space-separated hex string to a little-endian address.</li> <li>hijack-fd - Replace a file descriptor of a debugged process.</li> <li>ipi - Start an interactive IPython prompt.</li> <li>patch-list - List all patches.</li> <li>patch-revert - Revert patch at given address.</li> <li>patch - Patches given instruction with given code or bytes.</li> <li>plist - Dumps the elements of a linked list.</li> <li>sigreturn - Display the SigreturnFrame at the specific address</li> <li>spray - Spray memory with cyclic() generated values</li> <li>tips - Shows tips.</li> <li>up - Select and print stack frame that called this one.</li> <li>valist - Dumps the arguments of a va_list.</li> <li>vmmap-load - Load virtual memory map pages from ELF file.</li> </ul>"},{"location":"commands/#process","title":"Process","text":"<ul> <li>killthreads - Kill all or given threads.</li> <li>pid - Gets the pid.</li> <li>procinfo - Display information about the running process.</li> </ul>"},{"location":"commands/#register","title":"Register","text":"<ul> <li>cpsr - Print out ARM CPSR or xPSR register.</li> <li>fsbase - Prints out the FS base address. See also $fsbase.</li> <li>gsbase - Prints out the GS base address. See also $gsbase.</li> <li>setflag - Modify the flags register.</li> </ul>"},{"location":"commands/#stack","title":"Stack","text":"<ul> <li>canary - Print out the current stack canary.</li> <li>retaddr - Print out the stack addresses that contain return addresses.</li> <li>stack-explore - Explore stack from all threads.</li> <li>stack - Dereferences on stack data with specified count and offset.</li> <li>stackf - Dereferences on stack data, printing the entire stack frame with specified count and offset .</li> </ul>"},{"location":"commands/#start","title":"Start","text":"<ul> <li>attachp - Attaches to a given pid, process name, process found with partial argv match or to a device file.</li> <li>entry - Start the debugged program stopping at its entrypoint address.</li> <li>sstart - Alias for 'tbreak __libc_start_main; run'.</li> <li>start - Start the debugged program stopping at the first convenient location</li> </ul>"},{"location":"commands/#stepnextcontinue","title":"Step/Next/Continue","text":"<ul> <li>nextcall - Breaks at the next call instruction.</li> <li>nextjmp - Breaks at the next jump instruction.</li> <li>nextproginstr - Breaks at the next instruction that belongs to the running program.</li> <li>nextret - Breaks at next return-like instruction.</li> <li>nextsyscall - Breaks at the next syscall not taking branches.</li> <li>stepover - Breaks on the instruction after this one.</li> <li>stepret - Breaks at next return-like instruction by 'stepping' to it.</li> <li>stepsyscall - Breaks at the next syscall by taking branches.</li> <li>stepuntilasm - Breaks on the next matching instruction.</li> <li>xuntil - Continue execution until an address or expression.</li> </ul>"},{"location":"commands/#windbg","title":"WinDbg","text":"<ul> <li>bc - Clear the breakpoint with the specified index.</li> <li>bd - Disable the breakpoint with the specified index.</li> <li>be - Enable the breakpoint with the specified index.</li> <li>bl - List breakpoints.</li> <li>bp - Set a breakpoint at the specified address.</li> <li>da - Dump a string at the specified address.</li> <li>db - Starting at the specified address, dump N bytes.</li> <li>dc - Starting at the specified address, hexdump.</li> <li>dd - Starting at the specified address, dump N dwords.</li> <li>dds - Dump pointers and symbols at the specified address.</li> <li>dq - Starting at the specified address, dump N qwords.</li> <li>ds - Dump a string at the specified address.</li> <li>dw - Starting at the specified address, dump N words.</li> <li>eb - Write hex bytes at the specified address.</li> <li>ed - Write hex dwords at the specified address.</li> <li>eq - Write hex qwords at the specified address.</li> <li>ew - Write hex words at the specified address.</li> <li>ez - Write a string at the specified address.</li> <li>eza - Write a string at the specified address.</li> <li>go - Windbg compatibility alias for 'continue' command.</li> <li>k - Print a backtrace (alias 'bt').</li> <li>ln - List the symbols nearest to the provided value.</li> <li>pc - Windbg compatibility alias for 'nextcall' command.</li> <li>peb - Not be windows.</li> </ul>"},{"location":"commands/#jemalloc-heap","title":"jemalloc Heap","text":"<ul> <li>jemalloc-extent-info - Prints extent information for the given address</li> <li>jemalloc-find-extent - Returns extent information for pointer address allocated by jemalloc</li> <li>jemalloc-heap - Prints all extents information</li> </ul>"},{"location":"commands/#pwndbg","title":"pwndbg","text":"<ul> <li>bugreport - Generate a bug report.</li> <li>config - Shows pwndbg-specific configuration.</li> <li>configfile - Generates a configuration file for the current pwndbg options.</li> <li>memoize - Toggles memoization (caching).</li> <li>profiler - Utilities for profiling pwndbg.</li> <li>pwndbg - Prints out a list of all pwndbg commands.</li> <li>reinit-pwndbg - Makes pwndbg reinitialize all state.</li> <li>reload - Reload pwndbg.</li> <li>theme - Shows pwndbg-specific theme configuration.</li> <li>themefile - Generates a configuration file for the current pwndbg theme options.</li> <li>version - Displays Pwndbg and its important deps versions.</li> </ul>"},{"location":"commands/breakpoint/break-if-not-taken/","title":"Break if not taken","text":""},{"location":"commands/breakpoint/break-if-not-taken/#break-if-not-taken","title":"break-if-not-taken","text":""},{"location":"commands/breakpoint/break-if-not-taken/#description","title":"Description","text":"<p>Breaks on a branch if it is not taken.</p>"},{"location":"commands/breakpoint/break-if-not-taken/#usage","title":"Usage:","text":"<pre><code>usage: break-if-not-taken [-h] branch\n</code></pre>"},{"location":"commands/breakpoint/break-if-not-taken/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>branch</code> The branch instruction to break on."},{"location":"commands/breakpoint/break-if-not-taken/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/breakpoint/break-if-taken/","title":"Break if taken","text":""},{"location":"commands/breakpoint/break-if-taken/#break-if-taken","title":"break-if-taken","text":""},{"location":"commands/breakpoint/break-if-taken/#description","title":"Description","text":"<p>Breaks on a branch if it is taken.</p>"},{"location":"commands/breakpoint/break-if-taken/#usage","title":"Usage:","text":"<pre><code>usage: break-if-taken [-h] branch\n</code></pre>"},{"location":"commands/breakpoint/break-if-taken/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>branch</code> The branch instruction to break on."},{"location":"commands/breakpoint/break-if-taken/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/breakpoint/breakrva/","title":"Breakrva","text":""},{"location":"commands/breakpoint/breakrva/#breakrva","title":"breakrva","text":""},{"location":"commands/breakpoint/breakrva/#description","title":"Description","text":"<p>Break at RVA from PIE base.</p>"},{"location":"commands/breakpoint/breakrva/#usage","title":"Usage:","text":"<pre><code>usage: breakrva [-h] [offset] [module]\n</code></pre>"},{"location":"commands/breakpoint/breakrva/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>offset</code> Offset to add. (default: %(default)s) <code>module</code> Module to choose as base. Defaults to the target executable. (default: %(default)s)"},{"location":"commands/breakpoint/breakrva/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/breakpoint/ignore/","title":"Ignore","text":""},{"location":"commands/breakpoint/ignore/#ignore","title":"ignore","text":""},{"location":"commands/breakpoint/ignore/#description","title":"Description","text":"<p>Set ignore-count of breakpoint number N to COUNT.</p> <p>While the ignore count is positive, execution will not stop on the breakpoint.</p> <p>By default, if `N' is ommitted, the last breakpoint (i.e. greatest breakpoint number) will be used.</p>"},{"location":"commands/breakpoint/ignore/#usage","title":"Usage:","text":"<pre><code>usage: ignore [-h] [N] COUNT\n</code></pre>"},{"location":"commands/breakpoint/ignore/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>bpnum</code> The breakpoint number N. <code>count</code> The number to set COUNT."},{"location":"commands/breakpoint/ignore/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/context/context/","title":"Context","text":""},{"location":"commands/context/context/#context","title":"context","text":""},{"location":"commands/context/context/#description","title":"Description","text":"<p>Print out the current register, instruction, and stack context.</p>"},{"location":"commands/context/context/#usage","title":"Usage:","text":"<pre><code>usage: context [-h] [--on] [--off] [subcontext ...]\n</code></pre>"},{"location":"commands/context/context/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>subcontext</code> Submenu to display: 'regs', 'disasm', 'code', 'stack', 'backtrace', 'ghidra', 'args', 'threads', 'heap_tracker', 'expressions', and/or 'last_signal'"},{"location":"commands/context/context/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--on</code> <code>None</code> Show the section(s) in subsequent context commands again. The section(s) have to be in the 'context-sections' list. <code>--off</code> <code>None</code> Do not show the section(s) in subsequent context commands even though they might be in the 'context-sections' list."},{"location":"commands/context/contextnext/","title":"Contextnext","text":""},{"location":"commands/context/contextnext/#contextnext","title":"contextnext","text":""},{"location":"commands/context/contextnext/#description","title":"Description","text":"<p>Select next entry in context history.</p>"},{"location":"commands/context/contextnext/#usage","title":"Usage:","text":"<pre><code>usage: contextnext [-h] [count]\n</code></pre>"},{"location":"commands/context/contextnext/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>count</code> The number of entries to go forward in history (default: %(default)s)"},{"location":"commands/context/contextnext/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/context/contextoutput/","title":"Contextoutput","text":""},{"location":"commands/context/contextoutput/#contextoutput","title":"contextoutput","text":""},{"location":"commands/context/contextoutput/#description","title":"Description","text":"<p>Sets the output of a context section.</p>"},{"location":"commands/context/contextoutput/#usage","title":"Usage:","text":"<pre><code>usage: contextoutput [-h] section path clearing [banner] [width]\n</code></pre>"},{"location":"commands/context/contextoutput/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>section</code> The section which is to be configured. ('regs', 'disasm', 'code', 'stack', 'backtrace', 'ghidra', 'args', 'threads', 'heap_tracker', 'expressions', and/or 'last_signal') <code>path</code> The path to which the output is written <code>clearing</code> Indicates weather to clear the output <code>banner</code> Where a banner should be placed: both, top , bottom, none (default: %(default)s) <code>width</code> Sets a fixed width (used for banner). Set to None for auto"},{"location":"commands/context/contextoutput/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/context/contextprev/","title":"Contextprev","text":""},{"location":"commands/context/contextprev/#contextprev","title":"contextprev","text":""},{"location":"commands/context/contextprev/#description","title":"Description","text":"<p>Select previous entry in context history.</p>"},{"location":"commands/context/contextprev/#usage","title":"Usage:","text":"<pre><code>usage: contextprev [-h] [count]\n</code></pre>"},{"location":"commands/context/contextprev/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>count</code> The number of entries to go back in history (default: %(default)s)"},{"location":"commands/context/contextprev/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/context/contextsearch/","title":"Contextsearch","text":""},{"location":"commands/context/contextsearch/#contextsearch","title":"contextsearch","text":""},{"location":"commands/context/contextsearch/#description","title":"Description","text":"<p>Search for a string in the context history and select that entry.</p>"},{"location":"commands/context/contextsearch/#usage","title":"Usage:","text":"<pre><code>usage: contextsearch [-h] needle [section]\n</code></pre>"},{"location":"commands/context/contextsearch/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>needle</code> The string to search for in the context history <code>section</code> The section to search in. If not provided, search in all sections"},{"location":"commands/context/contextsearch/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/context/contextunwatch/","title":"Contextunwatch","text":""},{"location":"commands/context/contextunwatch/#contextunwatch","title":"contextunwatch","text":""},{"location":"commands/context/contextunwatch/#description","title":"Description","text":"<p>Removes an expression previously added to be watched.</p>"},{"location":"commands/context/contextunwatch/#usage","title":"Usage:","text":"<pre><code>usage: contextunwatch [-h] num\n</code></pre>"},{"location":"commands/context/contextunwatch/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>num</code> The expression number to be removed from context"},{"location":"commands/context/contextunwatch/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/context/contextwatch/","title":"Contextwatch","text":""},{"location":"commands/context/contextwatch/#contextwatch","title":"contextwatch","text":""},{"location":"commands/context/contextwatch/#description","title":"Description","text":"<p>Adds an expression to be shown on context.</p> <p>To remove an expression, see <code>cunwatch</code>.</p>"},{"location":"commands/context/contextwatch/#usage","title":"Usage:","text":"<pre><code>usage: contextwatch [-h] [{eval,execute}] expression\n</code></pre>"},{"location":"commands/context/contextwatch/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>cmd</code> Command to be used with the expression. - eval: the expression is parsed and evaluated as in the debugged language. - execute: the expression is executed as a GDB command. (default: %(default)s) <code>expression</code> The expression to be evaluated and shown in context"},{"location":"commands/context/contextwatch/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/context/regs/","title":"Regs","text":""},{"location":"commands/context/regs/#regs","title":"regs","text":""},{"location":"commands/context/regs/#description","title":"Description","text":"<p>Print out all registers and enhance the information.</p>"},{"location":"commands/context/regs/#usage","title":"Usage:","text":"<pre><code>usage: regs [-h] [regs ...]\n</code></pre>"},{"location":"commands/context/regs/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>regs</code> Registers to be shown"},{"location":"commands/context/regs/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/developer/dev-dump-instruction/","title":"Dev dump instruction","text":""},{"location":"commands/developer/dev-dump-instruction/#dev-dump-instruction","title":"dev-dump-instruction","text":""},{"location":"commands/developer/dev-dump-instruction/#description","title":"Description","text":"<p>Dump internal PwndbgInstruction attributes.</p>"},{"location":"commands/developer/dev-dump-instruction/#usage","title":"Usage:","text":"<pre><code>usage: dev-dump-instruction [-h] [-e] [-n] [address]\n</code></pre>"},{"location":"commands/developer/dev-dump-instruction/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to get the enhanced instruction from - must be in cache."},{"location":"commands/developer/dev-dump-instruction/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-e</code> <code>--emulate</code> Force the use of emulation when enhancing the instruction, regardless of global 'emulate' setting. (default: %(default)s) <code>-n</code> <code>--no-emulate</code> Disable the use of emulation when enhancing the instruction, regardless of global 'emulate' setting. (default: %(default)s)"},{"location":"commands/developer/log-level/","title":"Log level","text":""},{"location":"commands/developer/log-level/#log-level","title":"log-level","text":""},{"location":"commands/developer/log-level/#description","title":"Description","text":"<p>Set the log level.</p>"},{"location":"commands/developer/log-level/#usage","title":"Usage:","text":"<pre><code>usage: log-level [-h] [{debug,info,warning,error,critical}]\n</code></pre>"},{"location":"commands/developer/log-level/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>level</code> The log level to set. (default: %(default)s)"},{"location":"commands/developer/log-level/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/disassemble/emulate/","title":"Emulate","text":""},{"location":"commands/disassemble/emulate/#emulate","title":"emulate","text":""},{"location":"commands/disassemble/emulate/#description","title":"Description","text":"<p>Like nearpc, but will emulate instructions from the current $PC forward.</p>"},{"location":"commands/disassemble/emulate/#usage","title":"Usage:","text":"<pre><code>usage: emulate [-h] [pc] [lines]\n</code></pre>"},{"location":"commands/disassemble/emulate/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>pc</code> Address to emulate near. <code>lines</code> Number of lines to show on either side of the address."},{"location":"commands/disassemble/emulate/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/disassemble/nearpc/","title":"Nearpc","text":""},{"location":"commands/disassemble/nearpc/#nearpc","title":"nearpc","text":""},{"location":"commands/disassemble/nearpc/#description","title":"Description","text":"<p>Disassemble near a specified address.</p>"},{"location":"commands/disassemble/nearpc/#usage","title":"Usage:","text":"<pre><code>usage: nearpc [-h] [-e] [pc] [lines]\n</code></pre>"},{"location":"commands/disassemble/nearpc/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>pc</code> Address to disassemble near. If this is the only argument and the value provided is small enough, it is interpreted as lines instead. <code>lines</code> Number of lines to show on either side of the address."},{"location":"commands/disassemble/nearpc/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-e</code> <code>--emulate</code> Whether to emulate instructions to find the next ones or just linearly disassemble. (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/arena/","title":"Arena","text":""},{"location":"commands/glibc_ptmalloc2_heap/arena/#arena","title":"arena","text":""},{"location":"commands/glibc_ptmalloc2_heap/arena/#description","title":"Description","text":"<p>Print the contents of an arena.</p> <p>Default to the current thread's arena.</p>"},{"location":"commands/glibc_ptmalloc2_heap/arena/#usage","title":"Usage:","text":"<pre><code>usage: arena [-h] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/arena/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/arena/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/arenas/","title":"Arenas","text":""},{"location":"commands/glibc_ptmalloc2_heap/arenas/#arenas","title":"arenas","text":""},{"location":"commands/glibc_ptmalloc2_heap/arenas/#description","title":"Description","text":"<p>List this process's arenas.</p>"},{"location":"commands/glibc_ptmalloc2_heap/arenas/#usage","title":"Usage:","text":"<pre><code>usage: arenas [-h]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/arenas/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/bins/","title":"Bins","text":""},{"location":"commands/glibc_ptmalloc2_heap/bins/#bins","title":"bins","text":""},{"location":"commands/glibc_ptmalloc2_heap/bins/#description","title":"Description","text":"<p>Print the contents of all an arena's bins and a thread's tcache.</p> <p>Default to the current thread's arena and tcache.</p>"},{"location":"commands/glibc_ptmalloc2_heap/bins/#usage","title":"Usage:","text":"<pre><code>usage: bins [-h] [addr] [tcache_addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/bins/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the arena. <code>tcache_addr</code> Address of the tcache."},{"location":"commands/glibc_ptmalloc2_heap/bins/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/fastbins/","title":"Fastbins","text":""},{"location":"commands/glibc_ptmalloc2_heap/fastbins/#fastbins","title":"fastbins","text":""},{"location":"commands/glibc_ptmalloc2_heap/fastbins/#description","title":"Description","text":"<p>Print the contents of an arena's fastbins.</p> <p>Default to the current thread's arena.</p>"},{"location":"commands/glibc_ptmalloc2_heap/fastbins/#usage","title":"Usage:","text":"<pre><code>usage: fastbins [-h] [-v] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/fastbins/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/fastbins/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Show all fastbins, including empty ones (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/","title":"Find fake fast","text":""},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/#find-fake-fast","title":"find-fake-fast","text":""},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/#description","title":"Description","text":"<p>Find candidate fake fast or tcache chunks overlapping the specified address.</p>"},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/#usage","title":"Usage:","text":"<pre><code>usage: find-fake-fast [-h] [--align] [--glibc-fastbin-bug]\n [--partial-overwrite]\n target_address [max_candidate_size]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>target_address</code> Address of the word-sized value to overlap. <code>max_candidate_size</code> Maximum size of fake chunks to find."},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-a</code> <code>--align</code> Whether the fake chunk must be aligned to MALLOC_ALIGNMENT. This is required for tcache chunks and for all chunks when Safe Linking is enabled (default: %(default)s) <code>-b</code> <code>--glibc-fastbin-bug</code> Does the GLIBC fastbin size field bug affect the candidate size field width? (default: %(default)s) <code>-p</code> <code>--partial-overwrite</code> Consider partial overwrite candidates, default behavior only shows word-size overwrites. (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/heap-config/","title":"Heap config","text":""},{"location":"commands/glibc_ptmalloc2_heap/heap-config/#heap-config","title":"heap-config","text":""},{"location":"commands/glibc_ptmalloc2_heap/heap-config/#description","title":"Description","text":"<p>Shows heap related configuration.</p>"},{"location":"commands/glibc_ptmalloc2_heap/heap-config/#usage","title":"Usage:","text":"<pre><code>usage: heap-config [-h] [filter_pattern]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/heap-config/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>filter_pattern</code> Filter to apply to config parameters names/descriptions"},{"location":"commands/glibc_ptmalloc2_heap/heap-config/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/heap/","title":"Heap","text":""},{"location":"commands/glibc_ptmalloc2_heap/heap/#heap","title":"heap","text":""},{"location":"commands/glibc_ptmalloc2_heap/heap/#description","title":"Description","text":"<p>Iteratively print chunks on a heap.</p> <p>Default to the current thread's active heap.</p>"},{"location":"commands/glibc_ptmalloc2_heap/heap/#usage","title":"Usage:","text":"<pre><code>usage: heap [-h] [-v] [-s] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/heap/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the first chunk (malloc_chunk struct start, prev_size field)."},{"location":"commands/glibc_ptmalloc2_heap/heap/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Print all chunk fields, even unused ones. (default: %(default)s) <code>-s</code> <code>--simple</code> Simply print malloc_chunk struct's contents. (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/hi/","title":"Hi","text":""},{"location":"commands/glibc_ptmalloc2_heap/hi/#hi","title":"hi","text":""},{"location":"commands/glibc_ptmalloc2_heap/hi/#description","title":"Description","text":"<p>Searches all heaps to find if an address belongs to a chunk. If yes, prints the chunk.</p>"},{"location":"commands/glibc_ptmalloc2_heap/hi/#usage","title":"Usage:","text":"<pre><code>usage: hi [-h] [-v] [-s] [-f] addr\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/hi/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the interest."},{"location":"commands/glibc_ptmalloc2_heap/hi/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Print all chunk fields, even unused ones. (default: %(default)s) <code>-s</code> <code>--simple</code> Simply print malloc_chunk struct's contents. (default: %(default)s) <code>-f</code> <code>--fake</code> Allow fake chunks. If set, displays any memory as a heap chunk (even if its not a real chunk). (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/largebins/","title":"Largebins","text":""},{"location":"commands/glibc_ptmalloc2_heap/largebins/#largebins","title":"largebins","text":""},{"location":"commands/glibc_ptmalloc2_heap/largebins/#description","title":"Description","text":"<p>Print the contents of an arena's largebins.</p> <p>Default to the current thread's arena.</p>"},{"location":"commands/glibc_ptmalloc2_heap/largebins/#usage","title":"Usage:","text":"<pre><code>usage: largebins [-h] [-v] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/largebins/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/largebins/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Show all largebins, including empty ones (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/","title":"Malloc chunk","text":""},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/#malloc-chunk","title":"malloc-chunk","text":""},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/#description","title":"Description","text":"<p>Print a chunk.</p>"},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/#usage","title":"Usage:","text":"<pre><code>usage: malloc-chunk [-h] [-f] [-v] [-s] [-d] [-n NEXT] addr\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the chunk (malloc_chunk struct start, prev_size field)."},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-f</code> <code>--fake</code> Is this a fake chunk? (default: %(default)s) <code>-v</code> <code>--verbose</code> Print all chunk fields, even unused ones. (default: %(default)s) <code>-s</code> <code>--simple</code> Simply print malloc_chunk struct's contents. (default: %(default)s) <code>-d</code> <code>--dump</code> Print a hexdump of the chunk. (default: %(default)s) <code>-n</code> <code>--next</code> <code>0</code> Print the next N chunks after the specified address. (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/mp/","title":"Mp","text":""},{"location":"commands/glibc_ptmalloc2_heap/mp/#mp","title":"mp","text":""},{"location":"commands/glibc_ptmalloc2_heap/mp/#description","title":"Description","text":"<p>Print the mp_ struct's contents.</p>"},{"location":"commands/glibc_ptmalloc2_heap/mp/#usage","title":"Usage:","text":"<pre><code>usage: mp [-h]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/mp/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/smallbins/","title":"Smallbins","text":""},{"location":"commands/glibc_ptmalloc2_heap/smallbins/#smallbins","title":"smallbins","text":""},{"location":"commands/glibc_ptmalloc2_heap/smallbins/#description","title":"Description","text":"<p>Print the contents of an arena's smallbins.</p> <p>Default to the current thread's arena.</p>"},{"location":"commands/glibc_ptmalloc2_heap/smallbins/#usage","title":"Usage:","text":"<pre><code>usage: smallbins [-h] [-v] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/smallbins/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/smallbins/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Show all smallbins, including empty ones (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/tcache/","title":"Tcache","text":""},{"location":"commands/glibc_ptmalloc2_heap/tcache/#tcache","title":"tcache","text":""},{"location":"commands/glibc_ptmalloc2_heap/tcache/#description","title":"Description","text":"<p>Print a thread's tcache contents.</p> <p>Default to the current thread's tcache.</p>"},{"location":"commands/glibc_ptmalloc2_heap/tcache/#usage","title":"Usage:","text":"<pre><code>usage: tcache [-h] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/tcache/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the tcache."},{"location":"commands/glibc_ptmalloc2_heap/tcache/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/","title":"Tcachebins","text":""},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/#tcachebins","title":"tcachebins","text":""},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/#description","title":"Description","text":"<p>Print the contents of a tcache.</p> <p>Default to the current thread's tcache.</p>"},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/#usage","title":"Usage:","text":"<pre><code>usage: tcachebins [-h] [-v] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> The address of the tcache bins."},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Show all tcachebins, including empty ones (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/","title":"Top chunk","text":""},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/#top-chunk","title":"top-chunk","text":""},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/#description","title":"Description","text":"<p>Print relevant information about an arena's top chunk.</p> <p>Default to current thread's arena.</p>"},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/#usage","title":"Usage:","text":"<pre><code>usage: top-chunk [-h] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/try-free/","title":"Try free","text":""},{"location":"commands/glibc_ptmalloc2_heap/try-free/#try-free","title":"try-free","text":""},{"location":"commands/glibc_ptmalloc2_heap/try-free/#description","title":"Description","text":"<p>Check what would happen if free was called with given address.</p>"},{"location":"commands/glibc_ptmalloc2_heap/try-free/#usage","title":"Usage:","text":"<pre><code>usage: try-free [-h] addr\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/try-free/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address passed to free"},{"location":"commands/glibc_ptmalloc2_heap/try-free/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/glibc_ptmalloc2_heap/unsortedbin/","title":"Unsortedbin","text":""},{"location":"commands/glibc_ptmalloc2_heap/unsortedbin/#unsortedbin","title":"unsortedbin","text":""},{"location":"commands/glibc_ptmalloc2_heap/unsortedbin/#description","title":"Description","text":"<p>Print the contents of an arena's unsortedbin.</p> <p>Default to the current thread's arena.</p>"},{"location":"commands/glibc_ptmalloc2_heap/unsortedbin/#usage","title":"Usage:","text":"<pre><code>usage: unsortedbin [-h] [-v] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/unsortedbin/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/unsortedbin/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Show the \"all\" bin even if it's empty (default: %(default)s)"},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/","title":"Vis heap chunks","text":""},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/#vis-heap-chunks","title":"vis-heap-chunks","text":""},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/#description","title":"Description","text":"<p>Visualize chunks on a heap.</p> <p>Default to the current arena's active heap.</p>"},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/#usage","title":"Usage:","text":"<pre><code>usage: vis-heap-chunks [-h] [--beyond_top] [--no_truncate] [--all_chunks]\n [count] [addr]\n</code></pre>"},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>count</code> Number of chunks to visualize. If the value is big enough and addr isn't provided, this is interpreted as addr instead. (default: %(default)s) <code>addr</code> Address of the first chunk."},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-b</code> <code>--beyond_top</code> Attempt to keep printing beyond the top chunk. (default: %(default)s) <code>-n</code> <code>--no_truncate</code> Display all the chunk contents (Ignore the <code>max-visualize-chunk-size</code> configuration). (default: %(default)s) <code>-a</code> <code>--all_chunks</code> Display all chunks (Ignore the default-visualize-chunk-number configuration). (default: %(default)s)"},{"location":"commands/integrations/ai/","title":"Ai","text":""},{"location":"commands/integrations/ai/#ai","title":"ai","text":""},{"location":"commands/integrations/ai/#description","title":"Description","text":"<p>Ask GPT-3 a question about the current debugging context.</p>"},{"location":"commands/integrations/ai/#usage","title":"Usage:","text":"<pre><code>usage: ai [-h] [-M MODEL] [-t TEMPERATURE] [-m MAX_TOKENS] [-v] [-L]\n [-c COMMAND]\n [question ...]\n</code></pre>"},{"location":"commands/integrations/ai/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>question</code> The question to ask."},{"location":"commands/integrations/ai/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-M</code> <code>--model</code> <code>None</code> The OpenAI model to use. <code>-t</code> <code>--temperature</code> <code>None</code> The temperature to use. <code>-m</code> <code>--max-tokens</code> <code>None</code> The maximum number of tokens to generate. <code>-v</code> <code>--verbose</code> Print the prompt and response. (default: %(default)s) <code>-L</code> <code>--list-models</code> List the available models. (default: %(default)s) <code>-c</code> <code>--command</code> <code>None</code> Run a command in the GDB debugger and ask a question about the output."},{"location":"commands/integrations/bn-sync/","title":"Bn sync","text":""},{"location":"commands/integrations/bn-sync/#bn-sync","title":"bn-sync","text":""},{"location":"commands/integrations/bn-sync/#description","title":"Description","text":"<p>Synchronize Binary Ninja's cursor with GDB.</p>"},{"location":"commands/integrations/bn-sync/#usage","title":"Usage:","text":"<pre><code>usage: bn-sync [-h]\n</code></pre>"},{"location":"commands/integrations/bn-sync/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/integrations/decomp/","title":"Decomp","text":""},{"location":"commands/integrations/decomp/#decomp","title":"decomp","text":""},{"location":"commands/integrations/decomp/#description","title":"Description","text":"<p>Use the current integration to decompile code near an address.</p>"},{"location":"commands/integrations/decomp/#usage","title":"Usage:","text":"<pre><code>usage: decomp [-h] [addr] [lines]\n</code></pre>"},{"location":"commands/integrations/decomp/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address to decompile near. <code>lines</code> Number of lines of decompilation to show."},{"location":"commands/integrations/decomp/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/integrations/j/","title":"J","text":""},{"location":"commands/integrations/j/#j","title":"j","text":""},{"location":"commands/integrations/j/#description","title":"Description","text":"<p>Synchronize IDA's cursor with GDB.</p>"},{"location":"commands/integrations/j/#usage","title":"Usage:","text":"<pre><code>usage: j [-h]\n</code></pre>"},{"location":"commands/integrations/j/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/integrations/r2/","title":"R2","text":""},{"location":"commands/integrations/r2/#r2","title":"r2","text":""},{"location":"commands/integrations/r2/#description","title":"Description","text":"<p>Launches radare2.</p>"},{"location":"commands/integrations/r2/#usage","title":"Usage:","text":"<pre><code>usage: r2 [-h] [--no-seek] [--no-rebase] [arguments ...]\n</code></pre>"},{"location":"commands/integrations/r2/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>arguments</code> Arguments to pass to radare"},{"location":"commands/integrations/r2/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--no-seek</code> Do not seek to current pc (default: %(default)s) <code>--no-rebase</code> Do not set the base address for PIE according to the current mapping (default: %(default)s)"},{"location":"commands/integrations/r2pipe/","title":"R2pipe","text":""},{"location":"commands/integrations/r2pipe/#r2pipe","title":"r2pipe","text":""},{"location":"commands/integrations/r2pipe/#description","title":"Description","text":"<p>Execute stateful radare2 commands through r2pipe.</p>"},{"location":"commands/integrations/r2pipe/#usage","title":"Usage:","text":"<pre><code>usage: r2pipe [-h] arguments [arguments ...]\n</code></pre>"},{"location":"commands/integrations/r2pipe/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>arguments</code> Arguments to pass to r2pipe"},{"location":"commands/integrations/r2pipe/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/integrations/rop/","title":"Rop","text":""},{"location":"commands/integrations/rop/#rop","title":"rop","text":""},{"location":"commands/integrations/rop/#description","title":"Description","text":"<p>Dump ROP gadgets with Jon Salwan's ROPgadget tool.</p>"},{"location":"commands/integrations/rop/#usage","title":"Usage:","text":"<pre><code>usage: rop [-h] [--grep GREP] [--memlimit MEMLIMIT] [argument ...]\n</code></pre>"},{"location":"commands/integrations/rop/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>argument</code> Arguments to pass to ROPgadget"},{"location":"commands/integrations/rop/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--grep</code> <code>None</code> String to grep the output for <code>--memlimit</code> <code>50MB</code> String to grep the output for (default: %(default)s)"},{"location":"commands/integrations/ropper/","title":"Ropper","text":""},{"location":"commands/integrations/ropper/#ropper","title":"ropper","text":""},{"location":"commands/integrations/ropper/#description","title":"Description","text":"<p>ROP gadget search with ropper.</p>"},{"location":"commands/integrations/ropper/#usage","title":"Usage:","text":"<pre><code>usage: ropper [-h] [argument ...]\n</code></pre>"},{"location":"commands/integrations/ropper/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>argument</code> Arguments to pass to ropper"},{"location":"commands/integrations/ropper/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/integrations/rz/","title":"Rz","text":""},{"location":"commands/integrations/rz/#rz","title":"rz","text":""},{"location":"commands/integrations/rz/#description","title":"Description","text":"<p>Launches rizin.</p>"},{"location":"commands/integrations/rz/#usage","title":"Usage:","text":"<pre><code>usage: rz [-h] [--no-seek] [--no-rebase] [arguments ...]\n</code></pre>"},{"location":"commands/integrations/rz/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>arguments</code> Arguments to pass to rizin"},{"location":"commands/integrations/rz/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--no-seek</code> Do not seek to current pc (default: %(default)s) <code>--no-rebase</code> Do not set the base address for PIE according to the current mapping (default: %(default)s)"},{"location":"commands/integrations/rzpipe/","title":"Rzpipe","text":""},{"location":"commands/integrations/rzpipe/#rzpipe","title":"rzpipe","text":""},{"location":"commands/integrations/rzpipe/#description","title":"Description","text":"<p>Execute stateful rizin commands through rzpipe.</p>"},{"location":"commands/integrations/rzpipe/#usage","title":"Usage:","text":"<pre><code>usage: rzpipe [-h] arguments [arguments ...]\n</code></pre>"},{"location":"commands/integrations/rzpipe/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>arguments</code> Arguments to pass to rzpipe"},{"location":"commands/integrations/rzpipe/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/integrations/save-ida/","title":"Save ida","text":""},{"location":"commands/integrations/save-ida/#save-ida","title":"save-ida","text":""},{"location":"commands/integrations/save-ida/#description","title":"Description","text":"<p>Save the ida database.</p>"},{"location":"commands/integrations/save-ida/#usage","title":"Usage:","text":"<pre><code>usage: save-ida [-h]\n</code></pre>"},{"location":"commands/integrations/save-ida/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/jemalloc_heap/jemalloc-extent-info/","title":"Jemalloc extent info","text":""},{"location":"commands/jemalloc_heap/jemalloc-extent-info/#jemalloc-extent-info","title":"jemalloc-extent-info","text":""},{"location":"commands/jemalloc_heap/jemalloc-extent-info/#description","title":"Description","text":"<p>Prints extent information for the given address</p>"},{"location":"commands/jemalloc_heap/jemalloc-extent-info/#usage","title":"Usage:","text":"<pre><code>usage: jemalloc-extent-info [-h] [-v] addr\n</code></pre>"},{"location":"commands/jemalloc_heap/jemalloc-extent-info/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the extent metadata"},{"location":"commands/jemalloc_heap/jemalloc-extent-info/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-v</code> <code>--verbose</code> Print all chunk fields, even unused ones. (default: %(default)s)"},{"location":"commands/jemalloc_heap/jemalloc-find-extent/","title":"Jemalloc find extent","text":""},{"location":"commands/jemalloc_heap/jemalloc-find-extent/#jemalloc-find-extent","title":"jemalloc-find-extent","text":""},{"location":"commands/jemalloc_heap/jemalloc-find-extent/#description","title":"Description","text":"<p>Returns extent information for pointer address allocated by jemalloc</p>"},{"location":"commands/jemalloc_heap/jemalloc-find-extent/#usage","title":"Usage:","text":"<pre><code>usage: jemalloc-find-extent [-h] addr\n</code></pre>"},{"location":"commands/jemalloc_heap/jemalloc-find-extent/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the allocated memory location"},{"location":"commands/jemalloc_heap/jemalloc-find-extent/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/jemalloc_heap/jemalloc-heap/","title":"Jemalloc heap","text":""},{"location":"commands/jemalloc_heap/jemalloc-heap/#jemalloc-heap","title":"jemalloc-heap","text":""},{"location":"commands/jemalloc_heap/jemalloc-heap/#description","title":"Description","text":"<p>Prints all extents information</p>"},{"location":"commands/jemalloc_heap/jemalloc-heap/#usage","title":"Usage:","text":"<pre><code>usage: jemalloc-heap [-h]\n</code></pre>"},{"location":"commands/jemalloc_heap/jemalloc-heap/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/binder/","title":"Binder","text":""},{"location":"commands/kernel/binder/#binder","title":"binder","text":""},{"location":"commands/kernel/binder/#description","title":"Description","text":"<p>Show Android Binder information</p>"},{"location":"commands/kernel/binder/#usage","title":"Usage:","text":"<pre><code>usage: binder [-h]\n</code></pre>"},{"location":"commands/kernel/binder/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/kbase/","title":"Kbase","text":""},{"location":"commands/kernel/kbase/#kbase","title":"kbase","text":""},{"location":"commands/kernel/kbase/#description","title":"Description","text":"<p>Finds the kernel virtual base address.</p>"},{"location":"commands/kernel/kbase/#usage","title":"Usage:","text":"<pre><code>usage: kbase [-h] [-r]\n</code></pre>"},{"location":"commands/kernel/kbase/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-r</code> <code>--rebase</code> rebase loaded symbol file (default: %(default)s)"},{"location":"commands/kernel/kchecksec/","title":"Kchecksec","text":""},{"location":"commands/kernel/kchecksec/#kchecksec","title":"kchecksec","text":""},{"location":"commands/kernel/kchecksec/#description","title":"Description","text":"<p>Checks for kernel hardening configuration options.</p>"},{"location":"commands/kernel/kchecksec/#usage","title":"Usage:","text":"<pre><code>usage: kchecksec [-h]\n</code></pre>"},{"location":"commands/kernel/kchecksec/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/kcmdline/","title":"Kcmdline","text":""},{"location":"commands/kernel/kcmdline/#kcmdline","title":"kcmdline","text":""},{"location":"commands/kernel/kcmdline/#description","title":"Description","text":"<p>Return the kernel commandline (/proc/cmdline).</p>"},{"location":"commands/kernel/kcmdline/#usage","title":"Usage:","text":"<pre><code>usage: kcmdline [-h]\n</code></pre>"},{"location":"commands/kernel/kcmdline/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/kconfig/","title":"Kconfig","text":""},{"location":"commands/kernel/kconfig/#kconfig","title":"kconfig","text":""},{"location":"commands/kernel/kconfig/#description","title":"Description","text":"<p>Outputs the kernel config (requires CONFIG_IKCONFIG).</p>"},{"location":"commands/kernel/kconfig/#usage","title":"Usage:","text":"<pre><code>usage: kconfig [-h] [config_name]\n</code></pre>"},{"location":"commands/kernel/kconfig/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>config_name</code> A config name to search for"},{"location":"commands/kernel/kconfig/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/klookup/","title":"Klookup","text":""},{"location":"commands/kernel/klookup/#klookup","title":"klookup","text":""},{"location":"commands/kernel/klookup/#description","title":"Description","text":"<p>Lookup kernel symbols</p>"},{"location":"commands/kernel/klookup/#usage","title":"Usage:","text":"<pre><code>usage: klookup [-h] symbol\n</code></pre>"},{"location":"commands/kernel/klookup/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>symbol</code> Address or symbol name to lookup"},{"location":"commands/kernel/klookup/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/knft-dump/","title":"Knft dump","text":""},{"location":"commands/kernel/knft-dump/#knft-dump","title":"knft-dump","text":""},{"location":"commands/kernel/knft-dump/#description","title":"Description","text":"<p>Dump all nftables: tables, chains, rules, expressions</p>"},{"location":"commands/kernel/knft-dump/#usage","title":"Usage:","text":"<pre><code>usage: knft-dump [-h] [nsid]\n</code></pre>"},{"location":"commands/kernel/knft-dump/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>nsid</code> Network Namespace ID"},{"location":"commands/kernel/knft-dump/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/knft-list-chains/","title":"Knft list chains","text":""},{"location":"commands/kernel/knft-list-chains/#knft-list-chains","title":"knft-list-chains","text":""},{"location":"commands/kernel/knft-list-chains/#description","title":"Description","text":"<p>Dump netfilter chains form a specific table</p>"},{"location":"commands/kernel/knft-list-chains/#usage","title":"Usage:","text":"<pre><code>usage: knft-list-chains [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre>"},{"location":"commands/kernel/knft-list-chains/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>table_family</code> Netfilter table family (inet, ip, ip6, netdev, bridge, arp) <code>table_name</code> Table name"},{"location":"commands/kernel/knft-list-chains/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>--nsid</code> <code>None</code> Network Namespace ID"},{"location":"commands/kernel/knft-list-exprs/","title":"Knft list exprs","text":""},{"location":"commands/kernel/knft-list-exprs/#knft-list-exprs","title":"knft-list-exprs","text":""},{"location":"commands/kernel/knft-list-exprs/#description","title":"Description","text":"<p>Dump only expressions from specific rule</p>"},{"location":"commands/kernel/knft-list-exprs/#usage","title":"Usage:","text":"<pre><code>usage: knft-list-exprs [-h] [--nsid NSID]\n [table_family] [table_name] [chain_name] [rule_id]\n</code></pre>"},{"location":"commands/kernel/knft-list-exprs/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>table_family</code> Table family, eg: inet, ip, ip6, netdev, bridge, arp <code>table_name</code> Table name <code>chain_name</code> Chain name <code>rule_id</code> Rule Handle ID"},{"location":"commands/kernel/knft-list-exprs/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>--nsid</code> <code>None</code> Network Namespace ID"},{"location":"commands/kernel/knft-list-flowtables/","title":"Knft list flowtables","text":""},{"location":"commands/kernel/knft-list-flowtables/#knft-list-flowtables","title":"knft-list-flowtables","text":""},{"location":"commands/kernel/knft-list-flowtables/#description","title":"Description","text":"<p>Dump netfilter flowtables from a specific table</p>"},{"location":"commands/kernel/knft-list-flowtables/#usage","title":"Usage:","text":"<pre><code>usage: knft-list-flowtables [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre>"},{"location":"commands/kernel/knft-list-flowtables/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>table_family</code> Netfilter table family (inet, ip, ip6, netdev, bridge, arp) <code>table_name</code> Table name"},{"location":"commands/kernel/knft-list-flowtables/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>--nsid</code> <code>None</code> Network Namespace ID"},{"location":"commands/kernel/knft-list-objects/","title":"Knft list objects","text":""},{"location":"commands/kernel/knft-list-objects/#knft-list-objects","title":"knft-list-objects","text":""},{"location":"commands/kernel/knft-list-objects/#description","title":"Description","text":"<p>Dump netfilter objects from a specific table</p>"},{"location":"commands/kernel/knft-list-objects/#usage","title":"Usage:","text":"<pre><code>usage: knft-list-objects [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre>"},{"location":"commands/kernel/knft-list-objects/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>table_family</code> Table family, eg: inet, ip, ip6, netdev, bridge, arp <code>table_name</code> Table name"},{"location":"commands/kernel/knft-list-objects/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>--nsid</code> <code>None</code> Network Namespace ID"},{"location":"commands/kernel/knft-list-rules/","title":"Knft list rules","text":""},{"location":"commands/kernel/knft-list-rules/#knft-list-rules","title":"knft-list-rules","text":""},{"location":"commands/kernel/knft-list-rules/#description","title":"Description","text":"<p>Dump netfilter rules form a specific chain</p>"},{"location":"commands/kernel/knft-list-rules/#usage","title":"Usage:","text":"<pre><code>usage: knft-list-rules [-h] [--nsid NSID]\n [table_family] [table_name] [chain_name]\n</code></pre>"},{"location":"commands/kernel/knft-list-rules/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>table_family</code> Table family, eg: inet, ip, ip6, netdev, bridge, arp <code>table_name</code> Table name <code>chain_name</code> Chain name"},{"location":"commands/kernel/knft-list-rules/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>--nsid</code> <code>None</code> Network Namespace ID"},{"location":"commands/kernel/knft-list-sets/","title":"Knft list sets","text":""},{"location":"commands/kernel/knft-list-sets/#knft-list-sets","title":"knft-list-sets","text":""},{"location":"commands/kernel/knft-list-sets/#description","title":"Description","text":"<p>Dump netfilter sets from a specific table</p>"},{"location":"commands/kernel/knft-list-sets/#usage","title":"Usage:","text":"<pre><code>usage: knft-list-sets [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre>"},{"location":"commands/kernel/knft-list-sets/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>table_family</code> Table family, eg: inet, ip, ip6, netdev, bridge, arp <code>table_name</code> Table name"},{"location":"commands/kernel/knft-list-sets/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>--nsid</code> <code>None</code> Network Namespace ID"},{"location":"commands/kernel/knft-list-tables/","title":"Knft list tables","text":""},{"location":"commands/kernel/knft-list-tables/#knft-list-tables","title":"knft-list-tables","text":""},{"location":"commands/kernel/knft-list-tables/#description","title":"Description","text":"<p>Dump netfliter tables from a specific network namespace</p>"},{"location":"commands/kernel/knft-list-tables/#usage","title":"Usage:","text":"<pre><code>usage: knft-list-tables [-h] [--nsid NSID]\n</code></pre>"},{"location":"commands/kernel/knft-list-tables/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>--nsid</code> <code>None</code> Network Namespace ID"},{"location":"commands/kernel/kversion/","title":"Kversion","text":""},{"location":"commands/kernel/kversion/#kversion","title":"kversion","text":""},{"location":"commands/kernel/kversion/#description","title":"Description","text":"<p>Outputs the kernel version (/proc/version).</p>"},{"location":"commands/kernel/kversion/#usage","title":"Usage:","text":"<pre><code>usage: kversion [-h]\n</code></pre>"},{"location":"commands/kernel/kversion/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/pcplist/","title":"Pcplist","text":""},{"location":"commands/kernel/pcplist/#pcplist","title":"pcplist","text":""},{"location":"commands/kernel/pcplist/#description","title":"Description","text":"<p>Print Per-CPU page list</p>"},{"location":"commands/kernel/pcplist/#usage","title":"Usage:","text":"<pre><code>usage: pcplist [-h] [zone]\n</code></pre>"},{"location":"commands/kernel/pcplist/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>zone</code>"},{"location":"commands/kernel/pcplist/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/kernel/slab/","title":"Slab","text":""},{"location":"commands/kernel/slab/#slab","title":"slab","text":""},{"location":"commands/kernel/slab/#description","title":"Description","text":"<p>Prints information about the slab allocator</p>"},{"location":"commands/kernel/slab/#usage","title":"Usage:","text":"<pre><code>usage: slab [-h] {list,info,contains} ...\n</code></pre>"},{"location":"commands/kernel/slab/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>command</code> <code>None</code>"},{"location":"commands/kernel/slab/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/argc/","title":"Argc","text":""},{"location":"commands/linux_libc_elf/argc/#argc","title":"argc","text":""},{"location":"commands/linux_libc_elf/argc/#description","title":"Description","text":"<p>Prints out the number of arguments.</p>"},{"location":"commands/linux_libc_elf/argc/#usage","title":"Usage:","text":"<pre><code>usage: argc [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/argc/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/argv/","title":"Argv","text":""},{"location":"commands/linux_libc_elf/argv/#argv","title":"argv","text":""},{"location":"commands/linux_libc_elf/argv/#description","title":"Description","text":"<p>Prints out the contents of argv.</p>"},{"location":"commands/linux_libc_elf/argv/#usage","title":"Usage:","text":"<pre><code>usage: argv [-h] [i]\n</code></pre>"},{"location":"commands/linux_libc_elf/argv/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>i</code> Index of the argument to print out."},{"location":"commands/linux_libc_elf/argv/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/aslr/","title":"Aslr","text":""},{"location":"commands/linux_libc_elf/aslr/#aslr","title":"aslr","text":""},{"location":"commands/linux_libc_elf/aslr/#description","title":"Description","text":"<p>Check the current ASLR status, or turn it on/off.</p> <p>Does not take effect until the program is restarted.</p>"},{"location":"commands/linux_libc_elf/aslr/#usage","title":"Usage:","text":"<pre><code>usage: aslr [-h] [{on,off}]\n</code></pre>"},{"location":"commands/linux_libc_elf/aslr/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>state</code> Turn ASLR on or off (takes effect when target is started)"},{"location":"commands/linux_libc_elf/aslr/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/auxv-explore/","title":"Auxv explore","text":""},{"location":"commands/linux_libc_elf/auxv-explore/#auxv-explore","title":"auxv-explore","text":""},{"location":"commands/linux_libc_elf/auxv-explore/#description","title":"Description","text":"<p>Explore and print information from the Auxiliary ELF Vector.</p>"},{"location":"commands/linux_libc_elf/auxv-explore/#usage","title":"Usage:","text":"<pre><code>usage: auxv-explore [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/auxv-explore/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/auxv/","title":"Auxv","text":""},{"location":"commands/linux_libc_elf/auxv/#auxv","title":"auxv","text":""},{"location":"commands/linux_libc_elf/auxv/#description","title":"Description","text":"<p>Print information from the Auxiliary ELF Vector.</p>"},{"location":"commands/linux_libc_elf/auxv/#usage","title":"Usage:","text":"<pre><code>usage: auxv [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/auxv/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/elfsections/","title":"Elfsections","text":""},{"location":"commands/linux_libc_elf/elfsections/#elfsections","title":"elfsections","text":""},{"location":"commands/linux_libc_elf/elfsections/#description","title":"Description","text":"<p>Prints the section mappings contained in the ELF header.</p>"},{"location":"commands/linux_libc_elf/elfsections/#usage","title":"Usage:","text":"<pre><code>usage: elfsections [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/elfsections/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/envp/","title":"Envp","text":""},{"location":"commands/linux_libc_elf/envp/#envp","title":"envp","text":""},{"location":"commands/linux_libc_elf/envp/#description","title":"Description","text":"<p>Prints out the contents of the environment.</p>"},{"location":"commands/linux_libc_elf/envp/#usage","title":"Usage:","text":"<pre><code>usage: envp [-h] [name]\n</code></pre>"},{"location":"commands/linux_libc_elf/envp/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>name</code> Name of the environment variable to see."},{"location":"commands/linux_libc_elf/envp/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/errno/","title":"Errno","text":""},{"location":"commands/linux_libc_elf/errno/#errno","title":"errno","text":""},{"location":"commands/linux_libc_elf/errno/#description","title":"Description","text":"<p>Converts errno (or argument) to its string representation.</p>"},{"location":"commands/linux_libc_elf/errno/#usage","title":"Usage:","text":"<pre><code>usage: errno [-h] [err]\n</code></pre>"},{"location":"commands/linux_libc_elf/errno/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>err</code> Errno; if not passed, it is retrieved from __errno_location"},{"location":"commands/linux_libc_elf/errno/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/got/","title":"Got","text":""},{"location":"commands/linux_libc_elf/got/#got","title":"got","text":""},{"location":"commands/linux_libc_elf/got/#description","title":"Description","text":"<p>Show the state of the Global Offset Table.</p> <p>Examples: got got puts got -p libc got -a</p>"},{"location":"commands/linux_libc_elf/got/#usage","title":"Usage:","text":"<pre><code>usage: got [-h] [-p PATH_FILTER | -a] [-r] [symbol_filter]\n</code></pre>"},{"location":"commands/linux_libc_elf/got/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>symbol_filter</code> Filter results by symbol name. (default: %(default)s)"},{"location":"commands/linux_libc_elf/got/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-p</code> <code>--path</code> `` Filter results by library/objfile path. (default: %(default)s) <code>-a</code> <code>--all</code> Process all libs/obfjiles including the target executable. (default: %(default)s) <code>-r</code> <code>--show-readonly</code> Also display read-only entries (which are filtered out by default). (default: %(default)s)"},{"location":"commands/linux_libc_elf/gotplt/","title":"Gotplt","text":""},{"location":"commands/linux_libc_elf/gotplt/#gotplt","title":"gotplt","text":""},{"location":"commands/linux_libc_elf/gotplt/#description","title":"Description","text":"<p>Prints any symbols found in the .got.plt section if it exists.</p>"},{"location":"commands/linux_libc_elf/gotplt/#usage","title":"Usage:","text":"<pre><code>usage: gotplt [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/gotplt/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/libcinfo/","title":"Libcinfo","text":""},{"location":"commands/linux_libc_elf/libcinfo/#libcinfo","title":"libcinfo","text":""},{"location":"commands/linux_libc_elf/libcinfo/#description","title":"Description","text":"<p>Show libc version and link to its sources</p>"},{"location":"commands/linux_libc_elf/libcinfo/#usage","title":"Usage:","text":"<pre><code>usage: libcinfo [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/libcinfo/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/linkmap/","title":"Linkmap","text":""},{"location":"commands/linux_libc_elf/linkmap/#linkmap","title":"linkmap","text":""},{"location":"commands/linux_libc_elf/linkmap/#description","title":"Description","text":"<p>Show the state of the Link Map</p>"},{"location":"commands/linux_libc_elf/linkmap/#usage","title":"Usage:","text":"<pre><code>usage: linkmap [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/linkmap/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/onegadget/","title":"Onegadget","text":""},{"location":"commands/linux_libc_elf/onegadget/#onegadget","title":"onegadget","text":""},{"location":"commands/linux_libc_elf/onegadget/#description","title":"Description","text":"<p>Find gadgets which single-handedly give code execution.</p> <p>Uses the onegadget tool by david942j.</p>"},{"location":"commands/linux_libc_elf/onegadget/#usage","title":"Usage:","text":"<pre><code>usage: onegadget [-h] [--show-unsat] [--no-unknown] [-v]\n</code></pre>"},{"location":"commands/linux_libc_elf/onegadget/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--show-unsat</code> Show unsatisfiable gadgets. (default: %(default)s) <code>--no-unknown</code> Do not show unknown gadgets. (default: %(default)s) <code>-v</code> <code>--verbose</code> Show verbose output. (default: %(default)s)"},{"location":"commands/linux_libc_elf/piebase/","title":"Piebase","text":""},{"location":"commands/linux_libc_elf/piebase/#piebase","title":"piebase","text":""},{"location":"commands/linux_libc_elf/piebase/#description","title":"Description","text":"<p>Calculate VA of RVA from PIE base.</p>"},{"location":"commands/linux_libc_elf/piebase/#usage","title":"Usage:","text":"<pre><code>usage: piebase [-h] [offset] [module]\n</code></pre>"},{"location":"commands/linux_libc_elf/piebase/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>offset</code> Offset from PIE base. (default: %(default)s) <code>module</code> Module to choose as base. Defaults to the target executable. (default: %(default)s)"},{"location":"commands/linux_libc_elf/piebase/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/plt/","title":"Plt","text":""},{"location":"commands/linux_libc_elf/plt/#plt","title":"plt","text":""},{"location":"commands/linux_libc_elf/plt/#description","title":"Description","text":"<p>Prints any symbols found in the .plt section if it exists.</p>"},{"location":"commands/linux_libc_elf/plt/#usage","title":"Usage:","text":"<pre><code>usage: plt [-h]\n</code></pre>"},{"location":"commands/linux_libc_elf/plt/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/strings/","title":"Strings","text":""},{"location":"commands/linux_libc_elf/strings/#strings","title":"strings","text":""},{"location":"commands/linux_libc_elf/strings/#description","title":"Description","text":"<p>Extracts and displays ASCII strings from readable memory pages of the debugged process.</p>"},{"location":"commands/linux_libc_elf/strings/#usage","title":"Usage:","text":"<pre><code>usage: strings [-h] [-n N] [--save-as SAVE_AS] [page_names ...]\n</code></pre>"},{"location":"commands/linux_libc_elf/strings/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>page_names</code> Mapping to search [e.g. libc]. Can be used with multiple mappings [e.g libc heap stack] (default: %(default)s)"},{"location":"commands/linux_libc_elf/strings/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-n</code> <code>4</code> Minimum length of ASCII strings to include (default: %(default)s) <code>--save-as</code> <code>None</code> Sets the filename for the output of this command [e.g. --save-as='out.txt']"},{"location":"commands/linux_libc_elf/threads/","title":"Threads","text":""},{"location":"commands/linux_libc_elf/threads/#threads","title":"threads","text":""},{"location":"commands/linux_libc_elf/threads/#description","title":"Description","text":"<p>List all threads belonging to the selected inferior.</p>"},{"location":"commands/linux_libc_elf/threads/#usage","title":"Usage:","text":"<pre><code>usage: threads [-h] [-c] [num_threads]\n</code></pre>"},{"location":"commands/linux_libc_elf/threads/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>num_threads</code> Number of threads to display. Omit to display all threads."},{"location":"commands/linux_libc_elf/threads/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-c</code> <code>--config</code> Respect context-max-threads config to limit number of threads displayed. (default: %(default)s)"},{"location":"commands/linux_libc_elf/tls/","title":"Tls","text":""},{"location":"commands/linux_libc_elf/tls/#tls","title":"tls","text":""},{"location":"commands/linux_libc_elf/tls/#description","title":"Description","text":"<p>Print out base address of the current Thread Local Storage (TLS).</p>"},{"location":"commands/linux_libc_elf/tls/#usage","title":"Usage:","text":"<pre><code>usage: tls [-h] [-p] [-a]\n</code></pre>"},{"location":"commands/linux_libc_elf/tls/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-p</code> <code>--pthread-self</code> Try to get the address of TLS by calling pthread_self(). (default: %(default)s) <code>-a</code> <code>--all</code> Do not truncate the dump output. (default: %(default)s)"},{"location":"commands/linux_libc_elf/track-got/","title":"Track got","text":""},{"location":"commands/linux_libc_elf/track-got/#track-got","title":"track-got","text":""},{"location":"commands/linux_libc_elf/track-got/#description","title":"Description","text":"<p>Controls GOT tracking</p>"},{"location":"commands/linux_libc_elf/track-got/#usage","title":"Usage:","text":"<pre><code>usage: track-got [-h] {enable,disable,info,query} ...\n</code></pre>"},{"location":"commands/linux_libc_elf/track-got/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/linux_libc_elf/track-heap/","title":"Track heap","text":""},{"location":"commands/linux_libc_elf/track-heap/#track-heap","title":"track-heap","text":""},{"location":"commands/linux_libc_elf/track-heap/#description","title":"Description","text":"<p>Manages the heap tracker.</p> <p>The heap tracker is a module that tracks usage of the GLibc heap and looks for user errors such as double frees and use after frees.</p> <p>Currently, the following errors can be detected: - Use After Free</p>"},{"location":"commands/linux_libc_elf/track-heap/#usage","title":"Usage:","text":"<pre><code>usage: track-heap [-h] {enable,disable,toggle-break} ...\n</code></pre>"},{"location":"commands/linux_libc_elf/track-heap/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/distance/","title":"Distance","text":""},{"location":"commands/memory/distance/#distance","title":"distance","text":""},{"location":"commands/memory/distance/#description","title":"Description","text":"<p>Print the distance between the two arguments, or print the offset to the address's page base.</p>"},{"location":"commands/memory/distance/#usage","title":"Usage:","text":"<pre><code>usage: distance [-h] a [b]\n</code></pre>"},{"location":"commands/memory/distance/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>a</code> The first address. <code>b</code> The second address."},{"location":"commands/memory/distance/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/gdt/","title":"Gdt","text":""},{"location":"commands/memory/gdt/#gdt","title":"gdt","text":""},{"location":"commands/memory/gdt/#description","title":"Description","text":"<p>Decode X86-64 GDT entries at address</p> <p>See also: * https://wiki.osdev.org/Global_Descriptor_Table * https://wiki.osdev.org/GDT_Tutorial</p> <p>Note: In 64-bit mode, the Base and Limit values are ignored, each descriptor covers the entire linear address space regardless of what they are set to.</p>"},{"location":"commands/memory/gdt/#usage","title":"Usage:","text":"<pre><code>usage: gdt [-h] address [count]\n</code></pre>"},{"location":"commands/memory/gdt/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> x86-64 GDTR base address (e.g. read from sgdt instruction from [16:79] bits) <code>count</code> Number of entries to dump (should be (GDTR.size+1)/8) (default: %(default)s)"},{"location":"commands/memory/gdt/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/go-dump/","title":"Go dump","text":""},{"location":"commands/memory/go-dump/#go-dump","title":"go-dump","text":""},{"location":"commands/memory/go-dump/#description","title":"Description","text":"<p>Dumps a Go value of a given type at a specified address.</p>"},{"location":"commands/memory/go-dump/#usage","title":"Usage:","text":"<pre><code>usage: go-dump [-h] [-x] [-f [DECIMALS]] [-d] [-p] ty address\n</code></pre>"},{"location":"commands/memory/go-dump/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>ty</code> Go type of value to dump, e.g. map[int]string, or the address of a type to resolve at runtime, e.g. 0x408860 <code>address</code> Address to dump"},{"location":"commands/memory/go-dump/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-x</code> <code>--hex</code> Display non-pointer integers as hex (default: %(default)s) <code>-f</code> <code>--decimals</code> <code>None</code> Configures the number of decimal places to display for floating points <code>-d</code> <code>--debug</code> Shows debug info, like addresses for slice/map elements, slice capacity, etc. (default: %(default)s) <code>-p</code> <code>--pretty</code> Enables pretty printing (default: %(default)s)"},{"location":"commands/memory/go-type/","title":"Go type","text":""},{"location":"commands/memory/go-type/#go-type","title":"go-type","text":""},{"location":"commands/memory/go-type/#description","title":"Description","text":"<p>Dumps a Go runtime reflection type at a specified address.</p>"},{"location":"commands/memory/go-type/#usage","title":"Usage:","text":"<pre><code>usage: go-type [-h] address\n</code></pre>"},{"location":"commands/memory/go-type/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Address to dump"},{"location":"commands/memory/go-type/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/hexdump/","title":"Hexdump","text":""},{"location":"commands/memory/hexdump/#hexdump","title":"hexdump","text":""},{"location":"commands/memory/hexdump/#description","title":"Description","text":"<p>Hexdumps data at the specified address or module name.</p>"},{"location":"commands/memory/hexdump/#usage","title":"Usage:","text":"<pre><code>usage: hexdump [-h] [address] [count]\n</code></pre>"},{"location":"commands/memory/hexdump/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Address or module name to dump (default: %(default)s) <code>count</code> Number of bytes to dump (default: %(default)s)"},{"location":"commands/memory/hexdump/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/leakfind/","title":"Leakfind","text":""},{"location":"commands/memory/leakfind/#leakfind","title":"leakfind","text":""},{"location":"commands/memory/leakfind/#description","title":"Description","text":"<p>Attempt to find a leak chain given a starting address. Scans memory near the given address, looks for pointers, and continues that process to attempt to find leaks.</p> <p>Example: leakfind $rsp --page_name=filename --max_offset=0x48 --max_depth=6. This would look for any chains of leaks that point to a section in filename which begin near $rsp, are never 0x48 bytes further from a known pointer, and are a maximum length of 6.</p>"},{"location":"commands/memory/leakfind/#usage","title":"Usage:","text":"<pre><code>usage: leakfind [-h] [-p [PAGE_NAME]] [-o [MAX_OFFSET]] [-d [MAX_DEPTH]]\n [-s [STEP]] [--negative_offset [NEGATIVE_OFFSET]]\n [address]\n</code></pre>"},{"location":"commands/memory/leakfind/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Starting address to find a leak chain from (default: %(default)s)"},{"location":"commands/memory/leakfind/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-p</code> <code>--page_name</code> <code>None</code> Substring required to be part of the name of any found pages <code>-o</code> <code>--max_offset</code> <code>72</code> Max offset to add to addresses when looking for leak (default: %(default)s) <code>-d</code> <code>--max_depth</code> <code>4</code> Maximum depth to follow pointers to (default: %(default)s) <code>-s</code> <code>--step</code> <code>1</code> Step to add between pointers so they are considered. For example, if this is 4 it would only consider pointers at an offset divisible by 4 from the starting pointer (default: %(default)s) <code>--negative_offset</code> <code>0</code> Max negative offset to search before an address when looking for a leak (default: %(default)s)"},{"location":"commands/memory/memfrob/","title":"Memfrob","text":""},{"location":"commands/memory/memfrob/#memfrob","title":"memfrob","text":""},{"location":"commands/memory/memfrob/#description","title":"Description","text":"<p>Memfrobs a region of memory (xor with '*').</p>"},{"location":"commands/memory/memfrob/#usage","title":"Usage:","text":"<pre><code>usage: memfrob [-h] address count\n</code></pre>"},{"location":"commands/memory/memfrob/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to start xoring at. <code>count</code> The number of bytes to xor."},{"location":"commands/memory/memfrob/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/mmap/","title":"Mmap","text":""},{"location":"commands/memory/mmap/#mmap","title":"mmap","text":""},{"location":"commands/memory/mmap/#description","title":"Description","text":"<p>Calls the mmap syscall and prints its resulting address.</p> <p>Note that the mmap syscall may fail for various reasons (see <code>man mmap</code>) and, in case of failure, its return value will not be a valid pointer.</p> <p>PROT values: NONE (0), READ (1), WRITE (2), EXEC (4) MAP values: SHARED (1), PRIVATE (2), SHARED_VALIDATE (3), FIXED (0x10), ANONYMOUS (0x20)</p> <p>Flags and protection values can be either a string containing the names of the flags or permissions or a single number corresponding to the bitwise OR of the protection and flag numbers.</p> <p>Examples: mmap 0x0 4096 PROT_READ|PROT_WRITE|PROT_EXEC MAP_PRIVATE|MAP_ANONYMOUS -1 0 - Maps a new private+anonymous page with RWX permissions at a location decided by the kernel.</p> <pre><code>mmap 0x0 4096 PROT_READ MAP_PRIVATE 10 0\n - Maps 4096 bytes of the file pointed to by file descriptor number 10 with\n read permission at a location decided by the kernel.\n\nmmap 0xdeadbeef 0x1000\n - Maps a new private+anonymous page with RWX permissions at a page boundary\n near 0xdeadbeef.\n</code></pre>"},{"location":"commands/memory/mmap/#usage","title":"Usage:","text":"<pre><code>usage: mmap [-h] [--quiet] [--force] addr length [prot] [flags] [fd] [offset]\n</code></pre>"},{"location":"commands/memory/mmap/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address hint to be given to mmap. <code>length</code> Length of the mapping, in bytes. Needs to be greater than zero. <code>prot</code> Prot enum or int as in mmap(2). Eg. \"PROT_READ|PROT_EXEC\" or 7 (for RWX). (default: %(default)s) <code>flags</code> Flags enum or int as in mmap(2). Eg. \"MAP_PRIVATE|MAP_ANONYMOUS\" or 0x22. (default: %(default)s) <code>fd</code> File descriptor of the file to be mapped, or -1 if using MAP_ANONYMOUS. (default: %(default)s) <code>offset</code> Offset from the start of the file, in bytes, if using file based mapping. (default: %(default)s)"},{"location":"commands/memory/mmap/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-q</code> <code>--quiet</code> Disable address validity warnings and hints (default: %(default)s) <code>-f</code> <code>--force</code> Force potentially unsafe actions to happen (default: %(default)s)"},{"location":"commands/memory/mprotect/","title":"Mprotect","text":""},{"location":"commands/memory/mprotect/#mprotect","title":"mprotect","text":""},{"location":"commands/memory/mprotect/#description","title":"Description","text":"<p>Calls the mprotect syscall and prints its result value.</p> <p>Note that the mprotect syscall may fail for various reasons (see <code>man mprotect</code>) and a non-zero error return value can be decoded with the <code>errno <value></code> command.</p> <p>Examples: mprotect $rsp 4096 PROT_READ|PROT_WRITE|PROT_EXEC mprotect $rsp 4096 rwx mprotect $rsp 4096 7 mprotect some_symbol 0x1000 PROT_NONE</p>"},{"location":"commands/memory/mprotect/#usage","title":"Usage:","text":"<pre><code>usage: mprotect [-h] addr length prot\n</code></pre>"},{"location":"commands/memory/mprotect/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Page-aligned address to all mprotect on. <code>length</code> Count of bytes to call mprotect on. Needs to be multiple of page size. <code>prot</code> Prot string as in mprotect(2). Eg. \"PROT_READ|PROT_EXEC\", \"rx\", or \"5\""},{"location":"commands/memory/mprotect/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/p2p/","title":"P2p","text":""},{"location":"commands/memory/p2p/#p2p","title":"p2p","text":""},{"location":"commands/memory/p2p/#description","title":"Description","text":"<p>Pointer to pointer chain search. Searches given mapping for all pointers that point to specified mapping.</p> <p>Any chain length greater than 0 is valid. If only one mapping is given it just looks for any pointers in that mapping.</p>"},{"location":"commands/memory/p2p/#usage","title":"Usage:","text":"<pre><code>usage: p2p [-h] mapping_names [mapping_names ...]\n</code></pre>"},{"location":"commands/memory/p2p/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>mapping_names</code> Mapping name"},{"location":"commands/memory/p2p/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/probeleak/","title":"Probeleak","text":""},{"location":"commands/memory/probeleak/#probeleak","title":"probeleak","text":""},{"location":"commands/memory/probeleak/#description","title":"Description","text":"<p>Pointer scan for possible offset leaks. Examples: probeleak $rsp 0x64 - leaks 0x64 bytes starting at stack pointer and search for valid pointers probeleak $rsp 0x64 --max-dist 0x10 - as above, but pointers may point 0x10 bytes outside of memory page probeleak $rsp 0x64 --point-to libc --max-ptrs 1 --flags rwx - leaks 0x64 bytes starting at stack pointer and search for one valid pointer which points to a libc rwx page</p>"},{"location":"commands/memory/probeleak/#usage","title":"Usage:","text":"<pre><code>usage: probeleak [-h] [--max-distance MAX_DISTANCE] [--point-to POINT_TO]\n [--max-ptrs MAX_PTRS] [--flags FLAGS]\n [address] [count]\n</code></pre>"},{"location":"commands/memory/probeleak/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Leak memory address (default: %(default)s) <code>count</code> Leak size in bytes (default: %(default)s)"},{"location":"commands/memory/probeleak/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--max-distance</code> <code>0</code> Max acceptable distance between memory page boundary and leaked pointer (default: %(default)s) <code>--point-to</code> <code>None</code> Mapping name of the page that you want the pointers point to <code>--max-ptrs</code> <code>0</code> Stop search after find n pointers, default 0 (default: %(default)s) <code>--flags</code> <code>None</code> flags of the page that you want the pointers point to. [e.g. rwx]"},{"location":"commands/memory/search/","title":"Search","text":""},{"location":"commands/memory/search/#search","title":"search","text":""},{"location":"commands/memory/search/#description","title":"Description","text":"<p>Search memory for byte sequences, strings, pointers, and integer values.</p> <p>By default search results are cached. If you want to cache all results, but only print a subset, use --trunc-out. If you want to cache only a subset of results, and print the results immediately, use --limit. The latter is specially useful if you're searching a huge section of memory.</p>"},{"location":"commands/memory/search/#usage","title":"Usage:","text":"<pre><code>usage: search [-h] [-t {byte,short,word,dword,qword,pointer,string,bytes,asm}]\n [-1] [-2] [-4] [-8] [-p] [--asm]\n [--arch {powerpc64,aarch64,powerpc,riscv32,riscv64,sparc64,mips64,msp430,alpha,amd64,sparc,thumb,cris,i386,ia64,m68k,mips,s390,none,avr,arm,vax}]\n [--asmbp] [-x] [-e] [-w] [-s STEP] [-l LIMIT] [-a ALIGNED]\n [--save] [--no-save] [-n] [--trunc-out]\n value [mapping_name]\n</code></pre>"},{"location":"commands/memory/search/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>value</code> Value to search for <code>mapping_name</code> Mapping to search [e.g. libc]"},{"location":"commands/memory/search/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-t</code> <code>--type</code> <code>bytes</code> Size of search target (default: %(default)s) <code>-1</code> <code>--byte</code> <code>None</code> Search for a 1-byte integer <code>-2</code> <code>--short</code> <code>None</code> Search for a 2-byte integer <code>-4</code> <code>--dword</code> <code>None</code> Search for a 4-byte integer <code>-8</code> <code>--qword</code> <code>None</code> Search for an 8-byte integer <code>-p</code> <code>--pointer</code> <code>None</code> Search for a pointer-width integer <code>--asm</code> <code>None</code> Search for an assembly instruction <code>--arch</code> <code>None</code> Target architecture <code>--asmbp</code> Set breakpoint for found assembly instruction (default: %(default)s) <code>-x</code> <code>--hex</code> Target is a hex-encoded (for bytes/strings) (default: %(default)s) <code>-e</code> <code>--executable</code> Search executable segments only (default: %(default)s) <code>-w</code> <code>--writable</code> Search writable segments only (default: %(default)s) <code>-s</code> <code>--step</code> <code>None</code> Step search address forward to next alignment after each hit (ex: 0x1000) <code>-l</code> <code>--limit</code> <code>None</code> Max results before quitting the search. Differs from --trunc-out in that it will not save all search results before quitting <code>-a</code> <code>--aligned</code> <code>None</code> Result must be aligned to this byte boundary <code>--save</code> <code>None</code> Save results for further searches with --next. Default comes from config 'auto-save-search' <code>--no-save</code> <code>None</code> Invert --save <code>-n</code> <code>--next</code> Search only locations returned by previous search with --save (default: %(default)s) <code>--trunc-out</code> Truncate the output to 20 results. Differs from --limit in that it will first save all search results (default: %(default)s)"},{"location":"commands/memory/telescope/","title":"Telescope","text":""},{"location":"commands/memory/telescope/#telescope","title":"telescope","text":""},{"location":"commands/memory/telescope/#description","title":"Description","text":"<p>Recursively dereferences pointers starting at the specified address.</p>"},{"location":"commands/memory/telescope/#usage","title":"Usage:","text":"<pre><code>usage: telescope [-h] [-r] [-f] [-i] [address] [count]\n</code></pre>"},{"location":"commands/memory/telescope/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to telescope at. (default: %(default)s) <code>count</code> The number of lines to show. (default: %(default)s)"},{"location":"commands/memory/telescope/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-r</code> <code>--reverse</code> Show previous addresses instead of next ones (default: %(default)s) <code>-f</code> <code>--frame</code> Show the stack frame, from rsp to rbp (default: %(default)s) <code>-i</code> <code>--inverse</code> Show the stack reverse growth (default: %(default)s)"},{"location":"commands/memory/vmmap-add/","title":"Vmmap add","text":""},{"location":"commands/memory/vmmap-add/#vmmap-add","title":"vmmap-add","text":""},{"location":"commands/memory/vmmap-add/#description","title":"Description","text":"<p>Add virtual memory map page.</p>"},{"location":"commands/memory/vmmap-add/#usage","title":"Usage:","text":"<pre><code>usage: vmmap-add [-h] start size [flags] [offset]\n</code></pre>"},{"location":"commands/memory/vmmap-add/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>start</code> Starting virtual address <code>size</code> Size of the address space, in bytes <code>flags</code> Flags set by the ELF file (r - read, w - write, x - executable) (default: %(default)s) <code>offset</code> Offset into the original ELF file that the data is loaded from (default: %(default)s)"},{"location":"commands/memory/vmmap-add/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/vmmap-clear/","title":"Vmmap clear","text":""},{"location":"commands/memory/vmmap-clear/#vmmap-clear","title":"vmmap-clear","text":""},{"location":"commands/memory/vmmap-clear/#description","title":"Description","text":"<p>Clear the vmmap cache.</p>"},{"location":"commands/memory/vmmap-clear/#usage","title":"Usage:","text":"<pre><code>usage: vmmap-clear [-h]\n</code></pre>"},{"location":"commands/memory/vmmap-clear/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/vmmap-explore/","title":"Vmmap explore","text":""},{"location":"commands/memory/vmmap-explore/#vmmap-explore","title":"vmmap-explore","text":""},{"location":"commands/memory/vmmap-explore/#description","title":"Description","text":"<p>Explore a page, trying to guess permissions.</p>"},{"location":"commands/memory/vmmap-explore/#usage","title":"Usage:","text":"<pre><code>usage: vmmap-explore [-h] address\n</code></pre>"},{"location":"commands/memory/vmmap-explore/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Address of the page to explore"},{"location":"commands/memory/vmmap-explore/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/vmmap/","title":"Vmmap","text":""},{"location":"commands/memory/vmmap/#vmmap","title":"vmmap","text":""},{"location":"commands/memory/vmmap/#description","title":"Description","text":"<p>Print virtual memory map pages.</p> <p>Unnamed mappings are named as [anon_%#x] where %#x is high part of their start address. This is useful for filtering with <code>vmmap</code> or <code>search</code> commands.</p> <p>Known issues with vmmap: For QEMU user targets, the QEMU's gdbstub does not provide memory maps information to GDB until [0] is finished & merged. We try to deal with it without parsing the QEMU process' /proc/$pid/maps file, but if our approach fails, we simply create a [0, 0xffff...] vmmap which is not great and may result in lack of proper colors or inability to search memory with the <code>search</code> command.</p> <p>For QEMU kernel, we use gdb-pt-dump that parses page tables from the guest by reading /proc/$pid/mem of QEMU process. If this does not work for you, use <code>set kernel-vmmap-via-page-tables off</code> to refer to our old method of reading vmmap info from <code>monitor info mem</code> command exposed by QEMU. Note that the latter may be slower and will not give full vmmaps permission information.</p> <p>For coredump debugging, GDB also lacks all vmmap info but we do our best to get it back by using the <code>info proc mappings</code> and <code>maintenance info sections</code> commands.</p> <p>As a last resort, we sometimes try to explore the addresses in CPU registers and if they are readable by GDB, we determine their bounds and create an \"\" vmmap. However, this method is slow and is not used on each GDB stop. <p>Memory pages can also be added manually with the use of vmmap-add, vmmap-clear and vmmap-load commands. This may be useful for bare metal debugging.</p> <p>[0] https://lore.kernel.org/all/20220221030910.3203063-1-dominik.b.czarnota@gmail.com/</p>"},{"location":"commands/memory/vmmap/#usage","title":"Usage:","text":"<pre><code>usage: vmmap [-h] [-w] [-x] [-A LINES_AFTER] [-B LINES_BEFORE] [-C CONTEXT]\n [--gaps]\n [gdbval_or_str]\n</code></pre>"},{"location":"commands/memory/vmmap/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>gdbval_or_str</code> Address or module name filter"},{"location":"commands/memory/vmmap/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-w</code> <code>--writable</code> Display writable maps only (default: %(default)s) <code>-x</code> <code>--executable</code> Display executable maps only (default: %(default)s) <code>-A</code> <code>--lines-after</code> <code>1</code> Number of pages to display after result (default: %(default)s) <code>-B</code> <code>--lines-before</code> <code>1</code> Number of pages to display before result (default: %(default)s) <code>-C</code> <code>--context</code> <code>None</code> Number of pages to display around the result <code>--gaps</code> Display unmapped memory gap information in the memory map. (default: %(default)s)"},{"location":"commands/memory/xinfo/","title":"Xinfo","text":""},{"location":"commands/memory/xinfo/#xinfo","title":"xinfo","text":""},{"location":"commands/memory/xinfo/#description","title":"Description","text":"<p>Shows offsets of the specified address from various useful locations.</p>"},{"location":"commands/memory/xinfo/#usage","title":"Usage:","text":"<pre><code>usage: xinfo [-h] [address]\n</code></pre>"},{"location":"commands/memory/xinfo/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Address to inspect (default: %(default)s)"},{"location":"commands/memory/xinfo/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/memory/xor/","title":"Xor","text":""},{"location":"commands/memory/xor/#xor","title":"xor","text":""},{"location":"commands/memory/xor/#description","title":"Description","text":"<p>XOR <code>count</code> bytes at <code>address</code> with the key <code>key</code>.</p>"},{"location":"commands/memory/xor/#usage","title":"Usage:","text":"<pre><code>usage: xor [-h] address key count\n</code></pre>"},{"location":"commands/memory/xor/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to start xoring at. <code>key</code> The key to use. <code>count</code> The number of bytes to xor."},{"location":"commands/memory/xor/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/asm/","title":"Asm","text":""},{"location":"commands/misc/asm/#asm","title":"asm","text":""},{"location":"commands/misc/asm/#description","title":"Description","text":"<p>Assemble shellcode into bytes</p>"},{"location":"commands/misc/asm/#usage","title":"Usage:","text":"<pre><code>usage: asm [-h] [-f {hex,string}]\n [--arch {powerpc64,aarch64,powerpc,riscv32,riscv64,sparc64,mips64,msp430,alpha,amd64,sparc,thumb,cris,i386,ia64,m68k,mips,s390,none,avr,arm,vax}]\n [-v AVOID] [-n] [-z] [-i INFILE]\n [shellcode ...]\n</code></pre>"},{"location":"commands/misc/asm/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>shellcode</code> Assembler code to assemble (default: %(default)s)"},{"location":"commands/misc/asm/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-f</code> <code>--format</code> <code>hex</code> Output format (default: %(default)s) <code>--arch</code> <code>None</code> Target architecture <code>-v</code> <code>--avoid</code> <code>None</code> Encode the shellcode to avoid the listed bytes (provided as hex) <code>-n</code> <code>--newline</code> <code>None</code> Encode the shellcode to avoid newlines <code>-z</code> <code>--zero</code> <code>None</code> Encode the shellcode to avoid NULL bytes <code>-i</code> <code>--infile</code> <code>None</code> Specify input file"},{"location":"commands/misc/checksec/","title":"Checksec","text":""},{"location":"commands/misc/checksec/#checksec","title":"checksec","text":""},{"location":"commands/misc/checksec/#description","title":"Description","text":"<p>Prints out the binary security settings using <code>checksec</code>.</p>"},{"location":"commands/misc/checksec/#usage","title":"Usage:","text":"<pre><code>usage: checksec [-h] [-f FILE]\n</code></pre>"},{"location":"commands/misc/checksec/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-f</code> <code>--file</code> <code>None</code> Specify the file to run <code>checksec</code> on."},{"location":"commands/misc/comm/","title":"Comm","text":""},{"location":"commands/misc/comm/#comm","title":"comm","text":""},{"location":"commands/misc/comm/#description","title":"Description","text":"<p>Put comments in assembly code.</p>"},{"location":"commands/misc/comm/#usage","title":"Usage:","text":"<pre><code>usage: comm [-h] [--addr address] comment\n</code></pre>"},{"location":"commands/misc/comm/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>comment</code> The text you want to comment"},{"location":"commands/misc/comm/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--addr</code> <code>None</code> Address to write comments"},{"location":"commands/misc/cyclic/","title":"Cyclic","text":""},{"location":"commands/misc/cyclic/#cyclic","title":"cyclic","text":""},{"location":"commands/misc/cyclic/#description","title":"Description","text":"<p>Cyclic pattern creator/finder.</p>"},{"location":"commands/misc/cyclic/#usage","title":"Usage:","text":"<pre><code>usage: cyclic [-h] [-a charset] [-n length] [-l lookup_value]\n [count] [filename]\n</code></pre>"},{"location":"commands/misc/cyclic/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>count</code> Number of characters to print from the sequence (default: print the entire sequence) (default: %(default)s) <code>filename</code> Name (path) of the file to save the cyclic pattern to (default: %(default)s)"},{"location":"commands/misc/cyclic/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-a</code> <code>--alphabet</code> <code>abcdefghijklmnopqrstuvwxyz</code> The alphabet to use in the cyclic pattern (default: %(default)s) <code>-n</code> <code>--length</code> <code>None</code> Size of the unique subsequences (defaults to the pointer size for the current arch) <code>-o</code> <code>--lookup</code> <code>None</code> Do a lookup instead of printing the sequence (accepts constant values as well as expressions)"},{"location":"commands/misc/cymbol/","title":"Cymbol","text":""},{"location":"commands/misc/cymbol/#cymbol","title":"cymbol","text":""},{"location":"commands/misc/cymbol/#description","title":"Description","text":"<p>Add, show, load, edit, or delete custom structures in plain C.</p>"},{"location":"commands/misc/cymbol/#usage","title":"Usage:","text":"<pre><code>usage: cymbol [-h] [-a name] [-f filepath] [-r name] [-e name] [-l name]\n [-s name]\n</code></pre>"},{"location":"commands/misc/cymbol/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-a</code> <code>--add</code> <code>None</code> Add a new custom structure <code>-f</code> <code>--file</code> <code>None</code> Add a new custom structure from header file <code>-r</code> <code>--remove</code> <code>None</code> Remove an existing custom structure <code>-e</code> <code>--edit</code> <code>None</code> Edit an existing custom structure <code>-l</code> <code>--load</code> <code>None</code> Load an existing custom structure <code>-s</code> <code>--show</code> <code>None</code> Show the source code of an existing custom structure"},{"location":"commands/misc/down/","title":"Down","text":""},{"location":"commands/misc/down/#down","title":"down","text":""},{"location":"commands/misc/down/#description","title":"Description","text":"<p>Select and print stack frame called by this one.</p>"},{"location":"commands/misc/down/#usage","title":"Usage:","text":"<pre><code>usage: down [-h] [n]\n</code></pre>"},{"location":"commands/misc/down/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>n</code> The number of stack frames to go down. (default: %(default)s)"},{"location":"commands/misc/down/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/dt/","title":"Dt","text":""},{"location":"commands/misc/dt/#dt","title":"dt","text":""},{"location":"commands/misc/dt/#description","title":"Description","text":"<pre><code>Dump out information on a type (e.g. ucontext_t).\n\nOptionally overlay that information at an address.\n</code></pre>"},{"location":"commands/misc/dt/#usage","title":"Usage:","text":"<pre><code>usage: dt [-h] typename [address]\n</code></pre>"},{"location":"commands/misc/dt/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>typename</code> The name of the structure being dumped. Use quotes if the type contains spaces (e.g. \"struct malloc_state\"). <code>address</code> The address of the structure."},{"location":"commands/misc/dt/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/dumpargs/","title":"Dumpargs","text":""},{"location":"commands/misc/dumpargs/#dumpargs","title":"dumpargs","text":""},{"location":"commands/misc/dumpargs/#description","title":"Description","text":"<p>Prints determined arguments for call instruction.</p>"},{"location":"commands/misc/dumpargs/#usage","title":"Usage:","text":"<pre><code>usage: dumpargs [-h] [-f]\n</code></pre>"},{"location":"commands/misc/dumpargs/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-f</code> <code>--force</code> Force displaying of all arguments. (default: %(default)s)"},{"location":"commands/misc/getfile/","title":"Getfile","text":""},{"location":"commands/misc/getfile/#getfile","title":"getfile","text":""},{"location":"commands/misc/getfile/#description","title":"Description","text":"<p>Gets the current file.</p>"},{"location":"commands/misc/getfile/#usage","title":"Usage:","text":"<pre><code>usage: getfile [-h]\n</code></pre>"},{"location":"commands/misc/getfile/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/hex2ptr/","title":"Hex2ptr","text":""},{"location":"commands/misc/hex2ptr/#hex2ptr","title":"hex2ptr","text":""},{"location":"commands/misc/hex2ptr/#description","title":"Description","text":"<p>Converts a space-separated hex string to a little-endian address.</p>"},{"location":"commands/misc/hex2ptr/#usage","title":"Usage:","text":"<pre><code>usage: hex2ptr [-h] hex_string\n</code></pre>"},{"location":"commands/misc/hex2ptr/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>hex_string</code> Hexadecimal string to convert (e.g., '00 70 75 c1 cd ef 59 00')."},{"location":"commands/misc/hex2ptr/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/hijack-fd/","title":"Hijack fd","text":""},{"location":"commands/misc/hijack-fd/#hijack-fd","title":"hijack-fd","text":""},{"location":"commands/misc/hijack-fd/#description","title":"Description","text":"<p>Replace a file descriptor of a debugged process.</p> <p>The new file descriptor can point to: - a file - a pipe - a socket - a device, etc.</p> <p>Examples: 1. Redirect STDOUT to a file: <code>hijack-fd 1 /dev/null</code></p> <ol> <li>Redirect STDERR to a socket: <code>hijack-fd 2 tcp://localhost:8888</code></li> </ol>"},{"location":"commands/misc/hijack-fd/#usage","title":"Usage:","text":"<pre><code>usage: hijack-fd [-h] fdnum newfile\n</code></pre>"},{"location":"commands/misc/hijack-fd/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>fdnum</code> File descriptor (FD) number to be replaced with the specified new socket or file. <code>newfile</code> Specify a file or a socket. For files, the filename must start with <code>/</code> (e.g., <code>/etc/passwd</code>). For sockets, the following formats are allowed: - <code>127.0.0.1:80</code> (default is TCP) - <code>tcp://[::1]:80</code> - <code>udp://example.com:80</code> - <code>tcp+ipv6://example.com:80</code>"},{"location":"commands/misc/hijack-fd/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/ipi/","title":"Ipi","text":""},{"location":"commands/misc/ipi/#ipi","title":"ipi","text":""},{"location":"commands/misc/ipi/#description","title":"Description","text":"<p>Start an interactive IPython prompt.</p>"},{"location":"commands/misc/ipi/#usage","title":"Usage:","text":"<pre><code>usage: ipi [-h]\n</code></pre>"},{"location":"commands/misc/ipi/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/patch-list/","title":"Patch list","text":""},{"location":"commands/misc/patch-list/#patch-list","title":"patch-list","text":""},{"location":"commands/misc/patch-list/#description","title":"Description","text":"<p>List all patches.</p>"},{"location":"commands/misc/patch-list/#usage","title":"Usage:","text":"<pre><code>usage: patch-list [-h]\n</code></pre>"},{"location":"commands/misc/patch-list/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/patch-revert/","title":"Patch revert","text":""},{"location":"commands/misc/patch-revert/#patch-revert","title":"patch-revert","text":""},{"location":"commands/misc/patch-revert/#description","title":"Description","text":"<p>Revert patch at given address.</p>"},{"location":"commands/misc/patch-revert/#usage","title":"Usage:","text":"<pre><code>usage: patch-revert [-h] address\n</code></pre>"},{"location":"commands/misc/patch-revert/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Address to revert patch on"},{"location":"commands/misc/patch-revert/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/patch/","title":"Patch","text":""},{"location":"commands/misc/patch/#patch","title":"patch","text":""},{"location":"commands/misc/patch/#description","title":"Description","text":"<p>Patches given instruction with given code or bytes.</p>"},{"location":"commands/misc/patch/#usage","title":"Usage:","text":"<pre><code>usage: patch [-h] [-q] address ins\n</code></pre>"},{"location":"commands/misc/patch/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to patch <code>ins</code> instruction[s]"},{"location":"commands/misc/patch/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-q</code> <code>--quiet</code> don't print anything (default: %(default)s)"},{"location":"commands/misc/plist/","title":"Plist","text":""},{"location":"commands/misc/plist/#plist","title":"plist","text":""},{"location":"commands/misc/plist/#description","title":"Description","text":"<p>Dumps the elements of a linked list.</p> <p>This command traverses the linked list beginning at a given element, dumping its contents and the contents of all the elements that come after it in the list. Traversal is configurable and can handle multiple types of linked lists, but will always stop when a cycle is detected.</p> <p>The path to the first element can be any GDB expression that evaluates to either the first element directly, or a to pointer to it. The next element is the name of the field containing the next pointer, in either the structure itself or in the structure given by --inner.</p> <p>An address value may be given with --sentinel that signals the end of the list. By default, the value used is NULL (0).</p> <p>If only one field inside each node is desired, it can be printed exclusively by specifying its name with --field.</p> <p>This command supports traversing three types of linked lists, classified by how the next pointer can be found in the structure and what type it is: 1 - Next pointer is field of structure, type is the same as structure. 2 - Next pointer is field of inner nested structure, pointed to type is the same as outer structure. 3 - Next pointer is field of inner nested structure, pointed to type is the same as inner structure. Types 2 and 3 require --inner to be specified.</p> <p>Example 1:</p> <pre><code>struct node {\n int value;\n struct node *next;\n};\nstruct node node_c = { 2, NULL };\nstruct node node_b = { 1, &node_c };\nstruct node node_a = { 0, &node_b };\n</code></pre> <p>pwndbg> plist node_a next 0x4000011050 : { value = 0, next = 0x4000011040 } 0x4000011040 : { value = 1, next = 0x4000011010 } 0x4000011010 : { value = 2, next = 0x0 } <p>Example 2:</p> <pre><code>struct node_inner_a {\n struct node_inner_a *next;\n};\nstruct inner_a_node {\n int value;\n struct node_inner_a inner;\n};\nstruct inner_a_node inner_a_node_c = { 2, { NULL } };\nstruct inner_a_node inner_a_node_b = { 1, { &inner_a_node_c.inner } };\nstruct inner_a_node inner_a_node_a = { 0, { &inner_a_node_b.inner } };\n</code></pre> <p>pwndbg> plist inner_a_node_a -i inner next 0x4000011070 : { value = 0, inner = { next = 0x4000011068 } } 0x4000011060 : { value = 1, inner = { next = 0x4000011028 } } 0x4000011020 : { value = 2, inner = { next = 0x0 } } <p>Example 3:</p> <pre><code>struct inner_b_node;\nstruct node_inner_b {\n struct inner_b_node *next;\n};\nstruct inner_b_node {\n int value;\n struct node_inner_b inner;\n};\nstruct inner_b_node inner_b_node_c = { 2, { NULL } };\nstruct inner_b_node inner_b_node_b = { 1, { &inner_b_node_c } };\nstruct inner_b_node inner_b_node_a = { 0, { &inner_b_node_b } };\n</code></pre> <p>pwndbg> plist inner_b_node_a -i inner next 0x4000011090 : { value = 0, inner = { next = 0x4000011080 } } 0x4000011080 : { value = 1, inner = { next = 0x4000011030 } } 0x4000011030 : { value = 2, inner = { next = 0x0 } }"},{"location":"commands/misc/plist/#usage","title":"Usage:","text":"<pre><code>usage: plist [-h] [-s SENTINEL] [-i INNER_NAME] [-f FIELD_NAME] [-o OFFSET]\n [-c COUNT]\n path next\n</code></pre>"},{"location":"commands/misc/plist/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>path</code> The first element of the linked list <code>next</code> The name of the field pointing to the next element in the list"},{"location":"commands/misc/plist/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-s</code> <code>--sentinel</code> <code>0</code> The address that stands in for an end of list marker in a non-cyclic list (default: %(default)s) <code>-i</code> <code>--inner</code> <code>None</code> The name of the inner nested structure where the next pointer is stored <code>-f</code> <code>--field</code> <code>None</code> The name of the field to be displayed, if only one is desired <code>-o</code> <code>--offset</code> <code>0</code> The offset of the first list element to display. Defaults to zero. (default: %(default)s) <code>-c</code> <code>--count</code> <code>None</code> The number of elements to display. Defaults to the value of dereference-limit."},{"location":"commands/misc/sigreturn/","title":"Sigreturn","text":""},{"location":"commands/misc/sigreturn/#sigreturn","title":"sigreturn","text":""},{"location":"commands/misc/sigreturn/#description","title":"Description","text":"<p>Display the SigreturnFrame at the specific address</p>"},{"location":"commands/misc/sigreturn/#usage","title":"Usage:","text":"<pre><code>usage: sigreturn [-h] [-a] [-p] [address]\n</code></pre>"},{"location":"commands/misc/sigreturn/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to read the frame from"},{"location":"commands/misc/sigreturn/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-a</code> <code>--all</code> Show all values in the frame in addition to common registers (default: %(default)s) <code>-p</code> <code>--print</code> Show addresses of frame values (default: %(default)s)"},{"location":"commands/misc/spray/","title":"Spray","text":""},{"location":"commands/misc/spray/#spray","title":"spray","text":""},{"location":"commands/misc/spray/#description","title":"Description","text":"<p>Spray memory with cyclic() generated values</p>"},{"location":"commands/misc/spray/#usage","title":"Usage:","text":"<pre><code>usage: spray [-h] [--value VALUE] [-x] addr [length]\n</code></pre>"},{"location":"commands/misc/spray/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address to spray <code>length</code> Length of byte sequence, when unspecified sprays until the end of vmmap which address belongs to (default: %(default)s)"},{"location":"commands/misc/spray/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--value</code> <code>None</code> Value to spray memory with, when prefixed with '0x' treated as hex string encoded big-endian <code>-x</code> <code>--only-funcptrs</code> Spray only addresses whose values points to executable pages (default: %(default)s)"},{"location":"commands/misc/tips/","title":"Tips","text":""},{"location":"commands/misc/tips/#tips","title":"tips","text":""},{"location":"commands/misc/tips/#description","title":"Description","text":"<p>Shows tips.</p>"},{"location":"commands/misc/tips/#usage","title":"Usage:","text":"<pre><code>usage: tips [-h] [-a]\n</code></pre>"},{"location":"commands/misc/tips/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-a</code> <code>--all</code> Show all tips. (default: %(default)s)"},{"location":"commands/misc/up/","title":"Up","text":""},{"location":"commands/misc/up/#up","title":"up","text":""},{"location":"commands/misc/up/#description","title":"Description","text":"<p>Select and print stack frame that called this one.</p>"},{"location":"commands/misc/up/#usage","title":"Usage:","text":"<pre><code>usage: up [-h] [n]\n</code></pre>"},{"location":"commands/misc/up/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>n</code> The number of stack frames to go up. (default: %(default)s)"},{"location":"commands/misc/up/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/valist/","title":"Valist","text":""},{"location":"commands/misc/valist/#valist","title":"valist","text":""},{"location":"commands/misc/valist/#description","title":"Description","text":"<p>Dumps the arguments of a va_list.</p>"},{"location":"commands/misc/valist/#usage","title":"Usage:","text":"<pre><code>usage: valist [-h] addr [count]\n</code></pre>"},{"location":"commands/misc/valist/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> Address of the va_list <code>count</code> Number of arguments to dump (default: %(default)s)"},{"location":"commands/misc/valist/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/misc/vmmap-load/","title":"Vmmap load","text":""},{"location":"commands/misc/vmmap-load/#vmmap-load","title":"vmmap-load","text":""},{"location":"commands/misc/vmmap-load/#description","title":"Description","text":"<p>Load virtual memory map pages from ELF file.</p>"},{"location":"commands/misc/vmmap-load/#usage","title":"Usage:","text":"<pre><code>usage: vmmap-load [-h] [filename]\n</code></pre>"},{"location":"commands/misc/vmmap-load/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>filename</code> ELF filename, by default uses current loaded filename."},{"location":"commands/misc/vmmap-load/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/process/killthreads/","title":"Killthreads","text":""},{"location":"commands/process/killthreads/#killthreads","title":"killthreads","text":""},{"location":"commands/process/killthreads/#description","title":"Description","text":"<p>Kill all or given threads.</p> <p>Switches to given threads and calls pthread_exit(0) on them. This is performed with scheduler-locking to prevent other threads from operating at the same time.</p> <p>Killing all other threads may be useful to use GDB checkpoints, e.g., to test given input & restart the execution to the point of interest (checkpoint).</p>"},{"location":"commands/process/killthreads/#usage","title":"Usage:","text":"<pre><code>usage: killthreads [-h] [-a] [thread_ids ...]\n</code></pre>"},{"location":"commands/process/killthreads/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>thread_ids</code> Thread IDs to kill."},{"location":"commands/process/killthreads/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-a</code> <code>--all</code> Kill all threads except the current one. (default: %(default)s)"},{"location":"commands/process/pid/","title":"Pid","text":""},{"location":"commands/process/pid/#pid","title":"pid","text":""},{"location":"commands/process/pid/#description","title":"Description","text":"<p>Gets the pid.</p>"},{"location":"commands/process/pid/#usage","title":"Usage:","text":"<pre><code>usage: pid [-h]\n</code></pre>"},{"location":"commands/process/pid/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/process/procinfo/","title":"Procinfo","text":""},{"location":"commands/process/procinfo/#procinfo","title":"procinfo","text":""},{"location":"commands/process/procinfo/#description","title":"Description","text":"<p>Display information about the running process.</p>"},{"location":"commands/process/procinfo/#usage","title":"Usage:","text":"<pre><code>usage: procinfo [-h]\n</code></pre>"},{"location":"commands/process/procinfo/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/pwndbg/bugreport/","title":"Bugreport","text":""},{"location":"commands/pwndbg/bugreport/#bugreport","title":"bugreport","text":""},{"location":"commands/pwndbg/bugreport/#description","title":"Description","text":"<p>Generate a bug report.</p>"},{"location":"commands/pwndbg/bugreport/#usage","title":"Usage:","text":"<pre><code>usage: bugreport [-h] [--run-browser | --use-gh]\n</code></pre>"},{"location":"commands/pwndbg/bugreport/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-b</code> <code>--run-browser</code> Open browser on github/issues/new (default: %(default)s) <code>-g</code> <code>--use-gh</code> Create issue using Github CLI (default: %(default)s)"},{"location":"commands/pwndbg/config/","title":"Config","text":""},{"location":"commands/pwndbg/config/#config","title":"config","text":""},{"location":"commands/pwndbg/config/#description","title":"Description","text":"<p>Shows pwndbg-specific configuration.</p>"},{"location":"commands/pwndbg/config/#usage","title":"Usage:","text":"<pre><code>usage: config [-h] [filter_pattern]\n</code></pre>"},{"location":"commands/pwndbg/config/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>filter_pattern</code> Filter to apply to config parameters names/descriptions"},{"location":"commands/pwndbg/config/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/pwndbg/configfile/","title":"Configfile","text":""},{"location":"commands/pwndbg/configfile/#configfile","title":"configfile","text":""},{"location":"commands/pwndbg/configfile/#description","title":"Description","text":"<p>Generates a configuration file for the current pwndbg options.</p>"},{"location":"commands/pwndbg/configfile/#usage","title":"Usage:","text":"<pre><code>usage: configfile [-h] [--show-all]\n</code></pre>"},{"location":"commands/pwndbg/configfile/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--show-all</code> Display all configuration options. (default: %(default)s)"},{"location":"commands/pwndbg/memoize/","title":"Memoize","text":""},{"location":"commands/pwndbg/memoize/#memoize","title":"memoize","text":""},{"location":"commands/pwndbg/memoize/#description","title":"Description","text":"<p>Toggles memoization (caching).</p> <p>Useful for diagnosing caching-related bugs. Decreases performance.</p>"},{"location":"commands/pwndbg/memoize/#usage","title":"Usage:","text":"<pre><code>usage: memoize [-h]\n</code></pre>"},{"location":"commands/pwndbg/memoize/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/pwndbg/profiler/","title":"Profiler","text":""},{"location":"commands/pwndbg/profiler/#profiler","title":"profiler","text":""},{"location":"commands/pwndbg/profiler/#description","title":"Description","text":"<p>Utilities for profiling pwndbg.</p>"},{"location":"commands/pwndbg/profiler/#usage","title":"Usage:","text":"<pre><code>usage: profiler [-h] {start,stop} ...\n</code></pre>"},{"location":"commands/pwndbg/profiler/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>command</code> <code>None</code>"},{"location":"commands/pwndbg/profiler/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/pwndbg/pwndbg/","title":"Pwndbg","text":""},{"location":"commands/pwndbg/pwndbg/#pwndbg","title":"pwndbg","text":""},{"location":"commands/pwndbg/pwndbg/#description","title":"Description","text":"<p>Prints out a list of all pwndbg commands.</p>"},{"location":"commands/pwndbg/pwndbg/#usage","title":"Usage:","text":"<pre><code>usage: pwndbg [-h] [--shell | --all] [-c CATEGORY_ | --list-categories]\n [filter_pattern]\n</code></pre>"},{"location":"commands/pwndbg/pwndbg/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>filter_pattern</code> Filter to apply to commands names/docs"},{"location":"commands/pwndbg/pwndbg/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--shell</code> Only display shell commands (default: %(default)s) <code>--all</code> Only display shell commands (default: %(default)s) <code>-c</code> <code>--category</code> <code>None</code> Filter commands by category <code>--list-categories</code> List command categories (default: %(default)s)"},{"location":"commands/pwndbg/reinit-pwndbg/","title":"Reinit pwndbg","text":""},{"location":"commands/pwndbg/reinit-pwndbg/#reinit-pwndbg","title":"reinit-pwndbg","text":""},{"location":"commands/pwndbg/reinit-pwndbg/#description","title":"Description","text":"<p>Makes pwndbg reinitialize all state.</p>"},{"location":"commands/pwndbg/reinit-pwndbg/#usage","title":"Usage:","text":"<pre><code>usage: reinit-pwndbg [-h]\n</code></pre>"},{"location":"commands/pwndbg/reinit-pwndbg/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/pwndbg/reload/","title":"Reload","text":""},{"location":"commands/pwndbg/reload/#reload","title":"reload","text":""},{"location":"commands/pwndbg/reload/#description","title":"Description","text":"<p>Reload pwndbg.</p>"},{"location":"commands/pwndbg/reload/#usage","title":"Usage:","text":"<pre><code>usage: reload [-h]\n</code></pre>"},{"location":"commands/pwndbg/reload/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/pwndbg/theme/","title":"Theme","text":""},{"location":"commands/pwndbg/theme/#theme","title":"theme","text":""},{"location":"commands/pwndbg/theme/#description","title":"Description","text":"<p>Shows pwndbg-specific theme configuration.</p>"},{"location":"commands/pwndbg/theme/#usage","title":"Usage:","text":"<pre><code>usage: theme [-h] [filter_pattern]\n</code></pre>"},{"location":"commands/pwndbg/theme/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>filter_pattern</code> Filter to apply to theme parameters names/descriptions"},{"location":"commands/pwndbg/theme/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/pwndbg/themefile/","title":"Themefile","text":""},{"location":"commands/pwndbg/themefile/#themefile","title":"themefile","text":""},{"location":"commands/pwndbg/themefile/#description","title":"Description","text":"<p>Generates a configuration file for the current pwndbg theme options.</p>"},{"location":"commands/pwndbg/themefile/#usage","title":"Usage:","text":"<pre><code>usage: themefile [-h] [--show-all]\n</code></pre>"},{"location":"commands/pwndbg/themefile/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--show-all</code> Force displaying of all theme options. (default: %(default)s)"},{"location":"commands/pwndbg/version/","title":"Version","text":""},{"location":"commands/pwndbg/version/#version","title":"version","text":""},{"location":"commands/pwndbg/version/#description","title":"Description","text":"<p>Displays Pwndbg and its important deps versions.</p>"},{"location":"commands/pwndbg/version/#usage","title":"Usage:","text":"<pre><code>usage: version [-h]\n</code></pre>"},{"location":"commands/pwndbg/version/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/register/cpsr/","title":"Cpsr","text":""},{"location":"commands/register/cpsr/#cpsr","title":"cpsr","text":""},{"location":"commands/register/cpsr/#description","title":"Description","text":"<p>Print out ARM CPSR or xPSR register.</p>"},{"location":"commands/register/cpsr/#usage","title":"Usage:","text":"<pre><code>usage: cpsr [-h] [cpsr_value]\n</code></pre>"},{"location":"commands/register/cpsr/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>cpsr_value</code> Parse the given CPSR value instead of the actual one."},{"location":"commands/register/cpsr/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/register/fsbase/","title":"Fsbase","text":""},{"location":"commands/register/fsbase/#fsbase","title":"fsbase","text":""},{"location":"commands/register/fsbase/#description","title":"Description","text":"<p>Prints out the FS base address. See also $fsbase.</p>"},{"location":"commands/register/fsbase/#usage","title":"Usage:","text":"<pre><code>usage: fsbase [-h]\n</code></pre>"},{"location":"commands/register/fsbase/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/register/gsbase/","title":"Gsbase","text":""},{"location":"commands/register/gsbase/#gsbase","title":"gsbase","text":""},{"location":"commands/register/gsbase/#description","title":"Description","text":"<p>Prints out the GS base address. See also $gsbase.</p>"},{"location":"commands/register/gsbase/#usage","title":"Usage:","text":"<pre><code>usage: gsbase [-h]\n</code></pre>"},{"location":"commands/register/gsbase/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/register/setflag/","title":"Setflag","text":""},{"location":"commands/register/setflag/#setflag","title":"setflag","text":""},{"location":"commands/register/setflag/#description","title":"Description","text":"<p>Modify the flags register.</p>"},{"location":"commands/register/setflag/#usage","title":"Usage:","text":"<pre><code>usage: setflag [-h] flag value\n</code></pre>"},{"location":"commands/register/setflag/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>flag</code> Flag for which you want to change the value <code>value</code> Value to which you want to set the flag - only valid options are 0 and 1"},{"location":"commands/register/setflag/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/stack/canary/","title":"Canary","text":""},{"location":"commands/stack/canary/#canary","title":"canary","text":""},{"location":"commands/stack/canary/#description","title":"Description","text":"<p>Print out the current stack canary.</p>"},{"location":"commands/stack/canary/#usage","title":"Usage:","text":"<pre><code>usage: canary [-h] [-a]\n</code></pre>"},{"location":"commands/stack/canary/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-a</code> <code>--all</code> Print out stack canaries for all threads instead of the current thread only. (default: %(default)s)"},{"location":"commands/stack/retaddr/","title":"Retaddr","text":""},{"location":"commands/stack/retaddr/#retaddr","title":"retaddr","text":""},{"location":"commands/stack/retaddr/#description","title":"Description","text":"<p>Print out the stack addresses that contain return addresses.</p>"},{"location":"commands/stack/retaddr/#usage","title":"Usage:","text":"<pre><code>usage: retaddr [-h]\n</code></pre>"},{"location":"commands/stack/retaddr/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/stack/stack-explore/","title":"Stack explore","text":""},{"location":"commands/stack/stack-explore/#stack-explore","title":"stack-explore","text":""},{"location":"commands/stack/stack-explore/#description","title":"Description","text":"<p>Explore stack from all threads.</p>"},{"location":"commands/stack/stack-explore/#usage","title":"Usage:","text":"<pre><code>usage: stack-explore [-h]\n</code></pre>"},{"location":"commands/stack/stack-explore/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/stack/stack/","title":"Stack","text":""},{"location":"commands/stack/stack/#stack","title":"stack","text":""},{"location":"commands/stack/stack/#description","title":"Description","text":"<p>Dereferences on stack data with specified count and offset.</p>"},{"location":"commands/stack/stack/#usage","title":"Usage:","text":"<pre><code>usage: stack [-h] [-f] [-i] [count] [offset]\n</code></pre>"},{"location":"commands/stack/stack/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>count</code> number of element to dump (default: %(default)s) <code>offset</code> Element offset from $sp (support negative offset) (default: %(default)s)"},{"location":"commands/stack/stack/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>-f</code> <code>--frame</code> Show the stack frame, from rsp to rbp (default: %(default)s) <code>-i</code> <code>--inverse</code> Show reverse stack growth (default: %(default)s)"},{"location":"commands/stack/stackf/","title":"Stackf","text":""},{"location":"commands/stack/stackf/#stackf","title":"stackf","text":""},{"location":"commands/stack/stackf/#description","title":"Description","text":"<p>Dereferences on stack data, printing the entire stack frame with specified count and offset .</p>"},{"location":"commands/stack/stackf/#usage","title":"Usage:","text":"<pre><code>usage: stackf [-h] [count] [offset]\n</code></pre>"},{"location":"commands/stack/stackf/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>count</code> number of element to dump (default: %(default)s) <code>offset</code> Element offset from $sp (support negative offset) (default: %(default)s)"},{"location":"commands/stack/stackf/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/start/attachp/","title":"Attachp","text":""},{"location":"commands/start/attachp/#attachp","title":"attachp","text":""},{"location":"commands/start/attachp/#description","title":"Description","text":"<p>Attaches to a given pid, process name, process found with partial argv match or to a device file.</p> <p>This command wraps the original GDB <code>attach</code> command to add the ability to debug a process with a given name or partial name match. In such cases, the process identifier is fetched via the <code>pidof <name></code> command first. If no matches are found, then it uses the <code>ps -eo pid,args</code> command to search for partial name matches.</p> <p>Original GDB attach command help: Attach to a process or file outside of GDB. This command attaches to another target, of the same type as your last \"target\" command (\"info files\" will show your target stack). The command may take as argument a process id or a device file. For a process id, you must have permission to send the process a signal, and it must have the same effective uid as the debugger. When using \"attach\" with a process id, the debugger finds the program running in the process, looking first in the current working directory, or (if not found there) using the source file search path (see the \"directory\" command). You can also use the \"file\" command to specify the program, and to load its symbol table.</p>"},{"location":"commands/start/attachp/#usage","title":"Usage:","text":"<pre><code>usage: attachp [-h] [--no-truncate] [--retry] [--user USER] [-e] [-a] [target]\n</code></pre>"},{"location":"commands/start/attachp/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>target</code> pid, process name, part of cmdline to be matched or device file to attach to (uses current loaded file name if not provided)"},{"location":"commands/start/attachp/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit <code>--no-truncate</code> dont truncate command args (default: %(default)s) <code>--retry</code> retry until a target is found (default: %(default)s) <code>--user</code> <code>None</code> username or uid to filter by <code>-e</code> <code>--exact</code> get the pid only for an exact command name match (default: %(default)s) <code>-a</code> <code>--all</code> get pids also for partial cmdline matches etc (default: %(default)s)"},{"location":"commands/start/entry/","title":"Entry","text":""},{"location":"commands/start/entry/#entry","title":"entry","text":""},{"location":"commands/start/entry/#description","title":"Description","text":"<p>Start the debugged program stopping at its entrypoint address.</p> <p>Note that the entrypoint may not be the first instruction executed by the program. If you want to stop on the first executed instruction, use the GDB's <code>starti</code> command.</p> <p>Args may include \"*\", or \"[...]\"; they are expanded using the shell that will start the program (specified by the \"$SHELL\" environment variable). Input and output redirection with \">\", \"<\", or \">>\" are also allowed.</p> <p>With no arguments, uses arguments last specified (with \"run\" or \"set args\"). To cancel previous arguments and run with no arguments, use \"set args\" without arguments.</p> <p>To start the inferior without using a shell, use \"set startup-with-shell off\".</p>"},{"location":"commands/start/entry/#usage","title":"Usage:","text":"<pre><code>usage: entry [-h] [args ...]\n</code></pre>"},{"location":"commands/start/entry/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>args</code> The arguments to run the binary with."},{"location":"commands/start/entry/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/start/sstart/","title":"Sstart","text":""},{"location":"commands/start/sstart/#sstart","title":"sstart","text":""},{"location":"commands/start/sstart/#description","title":"Description","text":"<p>Alias for 'tbreak __libc_start_main; run'.</p>"},{"location":"commands/start/sstart/#usage","title":"Usage:","text":"<pre><code>usage: sstart [-h]\n</code></pre>"},{"location":"commands/start/sstart/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/start/start/","title":"Start","text":""},{"location":"commands/start/start/#start","title":"start","text":""},{"location":"commands/start/start/#description","title":"Description","text":"<p>Start the debugged program stopping at the first convenient location from this list: main, _main, start, _start, init or _init. You may specify arguments to give it.</p> <p>Args may include \"*\", or \"[...]\"; they are expanded using the shell that will start the program (specified by the \"$SHELL\" environment variable). Input and output redirection with \">\", \"<\", or \">>\" are also allowed.</p> <p>With no arguments, uses arguments last specified (with \"run\" or \"set args\"). To cancel previous arguments and run with no arguments, use \"set args\" without arguments.</p> <p>To start the inferior without using a shell, use \"set startup-with-shell off\".</p>"},{"location":"commands/start/start/#usage","title":"Usage:","text":"<pre><code>usage: start [-h] [args ...]\n</code></pre>"},{"location":"commands/start/start/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>args</code> The arguments to run the binary with."},{"location":"commands/start/start/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/nextcall/","title":"Nextcall","text":""},{"location":"commands/step_next_continue/nextcall/#nextcall","title":"nextcall","text":""},{"location":"commands/step_next_continue/nextcall/#description","title":"Description","text":"<p>Breaks at the next call instruction.</p>"},{"location":"commands/step_next_continue/nextcall/#usage","title":"Usage:","text":"<pre><code>usage: nextcall [-h] [symbol_regex]\n</code></pre>"},{"location":"commands/step_next_continue/nextcall/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>symbol_regex</code> A regex matching the name of next symbol to be broken on before calling."},{"location":"commands/step_next_continue/nextcall/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/nextjmp/","title":"Nextjmp","text":""},{"location":"commands/step_next_continue/nextjmp/#nextjmp","title":"nextjmp","text":""},{"location":"commands/step_next_continue/nextjmp/#description","title":"Description","text":"<p>Breaks at the next jump instruction.</p>"},{"location":"commands/step_next_continue/nextjmp/#usage","title":"Usage:","text":"<pre><code>usage: nextjmp [-h]\n</code></pre>"},{"location":"commands/step_next_continue/nextjmp/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/nextproginstr/","title":"Nextproginstr","text":""},{"location":"commands/step_next_continue/nextproginstr/#nextproginstr","title":"nextproginstr","text":""},{"location":"commands/step_next_continue/nextproginstr/#description","title":"Description","text":"<p>Breaks at the next instruction that belongs to the running program.</p>"},{"location":"commands/step_next_continue/nextproginstr/#usage","title":"Usage:","text":"<pre><code>usage: nextproginstr [-h]\n</code></pre>"},{"location":"commands/step_next_continue/nextproginstr/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/nextret/","title":"Nextret","text":""},{"location":"commands/step_next_continue/nextret/#nextret","title":"nextret","text":""},{"location":"commands/step_next_continue/nextret/#description","title":"Description","text":"<p>Breaks at next return-like instruction.</p>"},{"location":"commands/step_next_continue/nextret/#usage","title":"Usage:","text":"<pre><code>usage: nextret [-h]\n</code></pre>"},{"location":"commands/step_next_continue/nextret/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/nextsyscall/","title":"Nextsyscall","text":""},{"location":"commands/step_next_continue/nextsyscall/#nextsyscall","title":"nextsyscall","text":""},{"location":"commands/step_next_continue/nextsyscall/#description","title":"Description","text":"<p>Breaks at the next syscall not taking branches.</p>"},{"location":"commands/step_next_continue/nextsyscall/#usage","title":"Usage:","text":"<pre><code>usage: nextsyscall [-h]\n</code></pre>"},{"location":"commands/step_next_continue/nextsyscall/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/stepover/","title":"Stepover","text":""},{"location":"commands/step_next_continue/stepover/#stepover","title":"stepover","text":""},{"location":"commands/step_next_continue/stepover/#description","title":"Description","text":"<p>Breaks on the instruction after this one.</p>"},{"location":"commands/step_next_continue/stepover/#usage","title":"Usage:","text":"<pre><code>usage: stepover [-h] [addr]\n</code></pre>"},{"location":"commands/step_next_continue/stepover/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> The address to break after."},{"location":"commands/step_next_continue/stepover/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/stepret/","title":"Stepret","text":""},{"location":"commands/step_next_continue/stepret/#stepret","title":"stepret","text":""},{"location":"commands/step_next_continue/stepret/#description","title":"Description","text":"<p>Breaks at next return-like instruction by 'stepping' to it.</p>"},{"location":"commands/step_next_continue/stepret/#usage","title":"Usage:","text":"<pre><code>usage: stepret [-h]\n</code></pre>"},{"location":"commands/step_next_continue/stepret/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/stepsyscall/","title":"Stepsyscall","text":""},{"location":"commands/step_next_continue/stepsyscall/#stepsyscall","title":"stepsyscall","text":""},{"location":"commands/step_next_continue/stepsyscall/#description","title":"Description","text":"<p>Breaks at the next syscall by taking branches.</p>"},{"location":"commands/step_next_continue/stepsyscall/#usage","title":"Usage:","text":"<pre><code>usage: stepsyscall [-h]\n</code></pre>"},{"location":"commands/step_next_continue/stepsyscall/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/stepuntilasm/","title":"Stepuntilasm","text":""},{"location":"commands/step_next_continue/stepuntilasm/#stepuntilasm","title":"stepuntilasm","text":""},{"location":"commands/step_next_continue/stepuntilasm/#description","title":"Description","text":"<p>Breaks on the next matching instruction.</p>"},{"location":"commands/step_next_continue/stepuntilasm/#usage","title":"Usage:","text":"<pre><code>usage: stepuntilasm [-h] mnemonic [op_str ...]\n</code></pre>"},{"location":"commands/step_next_continue/stepuntilasm/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>mnemonic</code> The mnemonic of the instruction <code>op_str</code> The operands of the instruction"},{"location":"commands/step_next_continue/stepuntilasm/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/step_next_continue/xuntil/","title":"Xuntil","text":""},{"location":"commands/step_next_continue/xuntil/#xuntil","title":"xuntil","text":""},{"location":"commands/step_next_continue/xuntil/#description","title":"Description","text":"<p>Continue execution until an address or expression.</p>"},{"location":"commands/step_next_continue/xuntil/#usage","title":"Usage:","text":"<pre><code>usage: xuntil [-h] target\n</code></pre>"},{"location":"commands/step_next_continue/xuntil/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>target</code> Location to stop execution at"},{"location":"commands/step_next_continue/xuntil/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/bc/","title":"Bc","text":""},{"location":"commands/windbg/bc/#bc","title":"bc","text":""},{"location":"commands/windbg/bc/#description","title":"Description","text":"<p>Clear the breakpoint with the specified index.</p>"},{"location":"commands/windbg/bc/#usage","title":"Usage:","text":"<pre><code>usage: bc [-h] [which]\n</code></pre>"},{"location":"commands/windbg/bc/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>which</code> Index of the breakpoint to clear. (default: %(default)s)"},{"location":"commands/windbg/bc/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/bd/","title":"Bd","text":""},{"location":"commands/windbg/bd/#bd","title":"bd","text":""},{"location":"commands/windbg/bd/#description","title":"Description","text":"<p>Disable the breakpoint with the specified index.</p>"},{"location":"commands/windbg/bd/#usage","title":"Usage:","text":"<pre><code>usage: bd [-h] [which]\n</code></pre>"},{"location":"commands/windbg/bd/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>which</code> Index of the breakpoint to disable. (default: %(default)s)"},{"location":"commands/windbg/bd/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/be/","title":"Be","text":""},{"location":"commands/windbg/be/#be","title":"be","text":""},{"location":"commands/windbg/be/#description","title":"Description","text":"<p>Enable the breakpoint with the specified index.</p>"},{"location":"commands/windbg/be/#usage","title":"Usage:","text":"<pre><code>usage: be [-h] [which]\n</code></pre>"},{"location":"commands/windbg/be/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>which</code> Index of the breakpoint to enable. (default: %(default)s)"},{"location":"commands/windbg/be/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/bl/","title":"Bl","text":""},{"location":"commands/windbg/bl/#bl","title":"bl","text":""},{"location":"commands/windbg/bl/#description","title":"Description","text":"<p>List breakpoints.</p>"},{"location":"commands/windbg/bl/#usage","title":"Usage:","text":"<pre><code>usage: bl [-h]\n</code></pre>"},{"location":"commands/windbg/bl/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/bp/","title":"Bp","text":""},{"location":"commands/windbg/bp/#bp","title":"bp","text":""},{"location":"commands/windbg/bp/#description","title":"Description","text":"<p>Set a breakpoint at the specified address.</p>"},{"location":"commands/windbg/bp/#usage","title":"Usage:","text":"<pre><code>usage: bp [-h] where\n</code></pre>"},{"location":"commands/windbg/bp/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>where</code> The address to break at."},{"location":"commands/windbg/bp/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/da/","title":"Da","text":""},{"location":"commands/windbg/da/#da","title":"da","text":""},{"location":"commands/windbg/da/#description","title":"Description","text":"<p>Dump a string at the specified address.</p>"},{"location":"commands/windbg/da/#usage","title":"Usage:","text":"<pre><code>usage: da [-h] address [max]\n</code></pre>"},{"location":"commands/windbg/da/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Address to dump <code>max</code> Maximum string length (default: %(default)s)"},{"location":"commands/windbg/da/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/db/","title":"Db","text":""},{"location":"commands/windbg/db/#db","title":"db","text":""},{"location":"commands/windbg/db/#description","title":"Description","text":"<p>Starting at the specified address, dump N bytes.</p>"},{"location":"commands/windbg/db/#usage","title":"Usage:","text":"<pre><code>usage: db [-h] address [count]\n</code></pre>"},{"location":"commands/windbg/db/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to dump from. <code>count</code> The number of bytes to dump. (default: %(default)s)"},{"location":"commands/windbg/db/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/dc/","title":"Dc","text":""},{"location":"commands/windbg/dc/#dc","title":"dc","text":""},{"location":"commands/windbg/dc/#description","title":"Description","text":"<p>Starting at the specified address, hexdump.</p>"},{"location":"commands/windbg/dc/#usage","title":"Usage:","text":"<pre><code>usage: dc [-h] address [count]\n</code></pre>"},{"location":"commands/windbg/dc/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to dump from. <code>count</code> The number of bytes to hexdump. (default: %(default)s)"},{"location":"commands/windbg/dc/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/dd/","title":"Dd","text":""},{"location":"commands/windbg/dd/#dd","title":"dd","text":""},{"location":"commands/windbg/dd/#description","title":"Description","text":"<p>Starting at the specified address, dump N dwords.</p>"},{"location":"commands/windbg/dd/#usage","title":"Usage:","text":"<pre><code>usage: dd [-h] address [count]\n</code></pre>"},{"location":"commands/windbg/dd/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to dump from. <code>count</code> The number of dwords to dump. (default: %(default)s)"},{"location":"commands/windbg/dd/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/dds/","title":"Dds","text":""},{"location":"commands/windbg/dds/#dds","title":"dds","text":""},{"location":"commands/windbg/dds/#description","title":"Description","text":"<p>Dump pointers and symbols at the specified address.</p>"},{"location":"commands/windbg/dds/#usage","title":"Usage:","text":"<pre><code>usage: dds [-h] addr\n</code></pre>"},{"location":"commands/windbg/dds/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>addr</code> The address to dump from."},{"location":"commands/windbg/dds/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/dq/","title":"Dq","text":""},{"location":"commands/windbg/dq/#dq","title":"dq","text":""},{"location":"commands/windbg/dq/#description","title":"Description","text":"<p>Starting at the specified address, dump N qwords.</p>"},{"location":"commands/windbg/dq/#usage","title":"Usage:","text":"<pre><code>usage: dq [-h] address [count]\n</code></pre>"},{"location":"commands/windbg/dq/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to dump from. <code>count</code> The number of qwords to dump. (default: %(default)s)"},{"location":"commands/windbg/dq/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/ds/","title":"Ds","text":""},{"location":"commands/windbg/ds/#ds","title":"ds","text":""},{"location":"commands/windbg/ds/#description","title":"Description","text":"<p>Dump a string at the specified address.</p>"},{"location":"commands/windbg/ds/#usage","title":"Usage:","text":"<pre><code>usage: ds [-h] address [max]\n</code></pre>"},{"location":"commands/windbg/ds/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> Address to dump <code>max</code> Maximum string length (default: %(default)s)"},{"location":"commands/windbg/ds/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/dw/","title":"Dw","text":""},{"location":"commands/windbg/dw/#dw","title":"dw","text":""},{"location":"commands/windbg/dw/#description","title":"Description","text":"<p>Starting at the specified address, dump N words.</p>"},{"location":"commands/windbg/dw/#usage","title":"Usage:","text":"<pre><code>usage: dw [-h] address [count]\n</code></pre>"},{"location":"commands/windbg/dw/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to dump from. <code>count</code> The number of words to dump. (default: %(default)s)"},{"location":"commands/windbg/dw/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/eb/","title":"Eb","text":""},{"location":"commands/windbg/eb/#eb","title":"eb","text":""},{"location":"commands/windbg/eb/#description","title":"Description","text":"<p>Write hex bytes at the specified address.</p>"},{"location":"commands/windbg/eb/#usage","title":"Usage:","text":"<pre><code>usage: eb [-h] address [data ...]\n</code></pre>"},{"location":"commands/windbg/eb/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to write to. <code>data</code> The bytes to write."},{"location":"commands/windbg/eb/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/ed/","title":"Ed","text":""},{"location":"commands/windbg/ed/#ed","title":"ed","text":""},{"location":"commands/windbg/ed/#description","title":"Description","text":"<p>Write hex dwords at the specified address.</p>"},{"location":"commands/windbg/ed/#usage","title":"Usage:","text":"<pre><code>usage: ed [-h] address [data ...]\n</code></pre>"},{"location":"commands/windbg/ed/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to write to. <code>data</code> The dwords to write."},{"location":"commands/windbg/ed/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/eq/","title":"Eq","text":""},{"location":"commands/windbg/eq/#eq","title":"eq","text":""},{"location":"commands/windbg/eq/#description","title":"Description","text":"<p>Write hex qwords at the specified address.</p>"},{"location":"commands/windbg/eq/#usage","title":"Usage:","text":"<pre><code>usage: eq [-h] address [data ...]\n</code></pre>"},{"location":"commands/windbg/eq/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to write to. <code>data</code> The qwords to write."},{"location":"commands/windbg/eq/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/ew/","title":"Ew","text":""},{"location":"commands/windbg/ew/#ew","title":"ew","text":""},{"location":"commands/windbg/ew/#description","title":"Description","text":"<p>Write hex words at the specified address.</p>"},{"location":"commands/windbg/ew/#usage","title":"Usage:","text":"<pre><code>usage: ew [-h] address [data ...]\n</code></pre>"},{"location":"commands/windbg/ew/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to write to. <code>data</code> The words to write."},{"location":"commands/windbg/ew/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/ez/","title":"Ez","text":""},{"location":"commands/windbg/ez/#ez","title":"ez","text":""},{"location":"commands/windbg/ez/#description","title":"Description","text":"<p>Write a string at the specified address.</p>"},{"location":"commands/windbg/ez/#usage","title":"Usage:","text":"<pre><code>usage: ez [-h] address data\n</code></pre>"},{"location":"commands/windbg/ez/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to write to. <code>data</code> The string to write."},{"location":"commands/windbg/ez/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/eza/","title":"Eza","text":""},{"location":"commands/windbg/eza/#eza","title":"eza","text":""},{"location":"commands/windbg/eza/#description","title":"Description","text":"<p>Write a string at the specified address.</p>"},{"location":"commands/windbg/eza/#usage","title":"Usage:","text":"<pre><code>usage: eza [-h] address data\n</code></pre>"},{"location":"commands/windbg/eza/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>address</code> The address to write to. <code>data</code> The string to write."},{"location":"commands/windbg/eza/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/go/","title":"Go","text":""},{"location":"commands/windbg/go/#go","title":"go","text":""},{"location":"commands/windbg/go/#description","title":"Description","text":"<p>Windbg compatibility alias for 'continue' command.</p>"},{"location":"commands/windbg/go/#usage","title":"Usage:","text":"<pre><code>usage: go [-h]\n</code></pre>"},{"location":"commands/windbg/go/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/k/","title":"K","text":""},{"location":"commands/windbg/k/#k","title":"k","text":""},{"location":"commands/windbg/k/#description","title":"Description","text":"<p>Print a backtrace (alias 'bt').</p>"},{"location":"commands/windbg/k/#usage","title":"Usage:","text":"<pre><code>usage: k [-h]\n</code></pre>"},{"location":"commands/windbg/k/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/ln/","title":"Ln","text":""},{"location":"commands/windbg/ln/#ln","title":"ln","text":""},{"location":"commands/windbg/ln/#description","title":"Description","text":"<p>List the symbols nearest to the provided value.</p>"},{"location":"commands/windbg/ln/#usage","title":"Usage:","text":"<pre><code>usage: ln [-h] [value]\n</code></pre>"},{"location":"commands/windbg/ln/#positional-arguments","title":"Positional Arguments","text":"Positional Argument Help <code>value</code> The address you want the name of."},{"location":"commands/windbg/ln/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/pc/","title":"Pc","text":""},{"location":"commands/windbg/pc/#pc","title":"pc","text":""},{"location":"commands/windbg/pc/#description","title":"Description","text":"<p>Windbg compatibility alias for 'nextcall' command.</p>"},{"location":"commands/windbg/pc/#usage","title":"Usage:","text":"<pre><code>usage: pc [-h]\n</code></pre>"},{"location":"commands/windbg/pc/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"commands/windbg/peb/","title":"Peb","text":""},{"location":"commands/windbg/peb/#peb","title":"peb","text":""},{"location":"commands/windbg/peb/#description","title":"Description","text":"<p>Not be windows.</p>"},{"location":"commands/windbg/peb/#usage","title":"Usage:","text":"<pre><code>usage: peb [-h]\n</code></pre>"},{"location":"commands/windbg/peb/#optional-arguments","title":"Optional Arguments","text":"Short Long Default Help <code>-h</code> <code>--help</code> show this help message and exit"},{"location":"misc/binja_integration/","title":"Integrating Binary Ninja with pwndbg","text":""},{"location":"misc/binja_integration/#requirements","title":"Requirements","text":"<p>You need at least the personal edition of Binary Ninja (only tested on version 4.0+) that runs at least Python 3.10 for plugins.</p>"},{"location":"misc/binja_integration/#setup","title":"Setup","text":"<p>Copy (or symlink) <code>binja_script.py</code> to your plugins directory.</p>"},{"location":"misc/binja_integration/#usage","title":"Usage","text":"<p>To start the Binary Ninja integration, open the binary you want to debug in Binary Ninja, then go to <code>Plugins > pwndbg > Start integration on current view</code>. This will start the XMLRPC server that pwndbg queries for information.</p> <p>Then, inside GDB, run <code>set integration-provider binja</code>, which will start the integration. You can run <code>set integration-provider none</code> to disable it again.</p>"},{"location":"misc/binja_integration/#features","title":"Features","text":"<p>The integration currently syncs symbol names, comments, decompilation, function type signatures, and stack variables.</p>"},{"location":"misc/binja_integration/#commands","title":"Commands","text":"<ul> <li><code>bn-sync</code>: Navigate the Binary Ninja view to the current instruction</li> <li><code>decomp ADDR NLINES</code>: Displays the decompilation for <code>NLINES</code> lines at address <code>ADDR</code>.</li> </ul>"},{"location":"misc/binja_integration/#config-options","title":"Config Options","text":"<ul> <li><code>bn-autosync</code>: If set to <code>yes</code>, every step will automatically run <code>bn-sync</code></li> <li><code>bn-il-level</code>: Sets the IL level to use for decompilation. Valid values are: <code>disasm</code>, <code>llil</code>, <code>mlil</code>, <code>hlil</code></li> <li><code>bn-rpc-host</code>/<code>bn-rpc-port</code>: The host and port to connect to for the XMLRPC server</li> <li><code>bn-timeout</code>: The amount, in seconds, to wait for the XMLRPC server to connect</li> </ul>"},{"location":"misc/env_vars/","title":"Env vars","text":""},{"location":"misc/env_vars/#environment-variables","title":"Environment Variables","text":"<p>Pwndbg relies on several environment variables to customize its behavior. Below is a list of these variables and their purposes:</p> <ul> <li><code>PATH</code>: Standard system <code>PATH</code> variable used to locate executables.</li> <li><code>EDITOR</code>, <code>VISUAL</code>: Used by the <code>cymbol</code> command to open an editor.</li> <li><code>HOME</code>, <code>XDG_CACHE_HOME</code>: Used by <code>lib.tempfile</code> to determine temporary file locations.</li> <li><code>PWNDBG_VENV_PATH</code>: Specifies the virtual environment path for Pwndbg.</li> <li><code>PWNDBG_DISABLE_COLORS</code>: Disables colored output in Pwndbg.</li> <li><code>PWNDBG_LOGLEVEL</code>: Initial log level to use for log messages.</li> <li><code>OPENAI_API_KEY</code>, <code>ANTHROPIC_API_KEY</code>: Used by the <code>ai</code> command for accessing respective AI APIs.</li> <li><code>GITHUB_ACTIONS</code>, <code>RUN_FLAKY</code>: Used by <code>tests_commands.py</code> to determine the test environment.</li> <li><code>PWNDBG_PROFILE</code>: Enables profiling for benchmarking.</li> <li><code>USE_PDB</code>: Enables Python debugger in tests.</li> <li><code>PWNDBG_LAUNCH_TEST</code>: Used by tests to configure test launching.</li> <li><code>PWNDBG_ARCH</code>, <code>PWNDBG_KERNEL_TYPE</code>, <code>PWNDBG_KERNEL_VERSION</code>: Used by <code>gdblib</code> kernel tests to specify kernel parameters.</li> <li><code>SPHINX</code>: Used by <code>docs/source/conf.py</code>, likely to be removed.</li> <li><code>PWNLIB_NOTERM=1</code>: Set by Pwndbg to avoid terminal issues with Pwntools.</li> </ul>"},{"location":"misc/go_debugging/","title":"Debugging Go with pwndbg","text":""},{"location":"misc/go_debugging/#basics","title":"Basics","text":"<p>The <code>go-dump</code> command can be used to dump Go values during debugging. It takes the form <code>go-dump type address_expression</code>, and supports many different types with the same syntax as Go: - Integer types: <code>int</code>, <code>int8</code>, <code>int16</code>, <code>int32</code>, <code>int64</code>, <code>int128</code>, and their <code>uint</code> counterparts - Misc types: <code>bool</code>, <code>rune</code>, <code>uintptr</code>, <code>string</code> - Floating point types: <code>float32</code>, <code>float64</code> - Complex numbers: <code>complex64</code>, <code>complex128</code> - Interface types: <code>any</code> for <code>interface{}</code> (the empty interface), and <code>interface</code> for all non-empty interfaces - Function types: <code>funcptr</code> for all function types - Pointers: <code>*ELEM</code> - Slices: <code>[]ELEM</code> - Arrays: <code>[LEN]ELEM</code> - Maps: <code>map[KEY][VAL]</code> (note that maps in Go are actually pointers to the map, whereas this map is the inner map, so you may need to use <code>*map[KEY]VAL</code> to dump a map)</p> <p>Struct types are also supported, but the syntax is slightly different from Go in order to avoid having to compute offsets (and also to support only having partial field information on structs). Struct types are notated as <code>OFFSET:FIELD_NAME:TYPE</code> triples separated by semicolons then enclosed with <code>struct(SIZE){}</code>, e.g. <code>struct(24){0:foo:string;16:bar:int64}</code> to represent the 24-byte Go struct <code>struct { foo string; bar int64 }</code>.</p> <p>Example: <pre><code>pwndbg> go-dump map[string]int 0xc0000b20f0\n{\"a\": 1, \"b\": 2, \"c\": 3}\n\npwndbg> go-dump any 0xc0000ace40\n([]struct { a int; b string }) [struct {a: 1, b: \"first\"}, struct {a: 2, b: \"second\"}]\n\npwndbg> go-dump struct(24){0:a:int;8:b:string} 0xc000108120\nstruct {a: 1, b: \"first\"}\n</code></pre></p> <p>Some notable flags include <code>-p</code> to enable pretty printing, <code>-x</code> to display integers in hex, <code>-f DECIMALS</code> to set the number of decimals used to display floats, <code>-d</code> to enable debug printing, which displays memory addresses of everything shown in the dump.</p>"},{"location":"misc/go_debugging/#runtime-type-parsing","title":"Runtime Type Parsing","text":"<p>Go's compiler emits type objects for every single type used by the program. This is what enables dumping interface values with <code>go-dump</code> without having to specify any additional type information, and can also be leveraged to dump non-interface values if the type can be located. A good way to locate types is by finding the type pointer passed into heap allocation functions like <code>runtime.newobject</code> or <code>runtime.makeslice</code>.</p> <p>After finding the type pointer, the <code>go-type</code> command can be used to inspect a type: <pre><code>pwndbg> go-type 0x49fbc0\n Name: struct { a int; b string }\n Kind: STRUCT\n Size: 24 (0x18)\nAlign: 8\nParse: struct(24){0:a:int;8:b:string}\nField a:\n Offset: 0 (0x0)\n Type name: int\n Type addr: 0x498ce0\nField b:\n Offset: 8 (0x8)\n Type name: string\n Type addr: 0x498aa0\n</code></pre></p> <p>The <code>go-dump</code> command can also take an address to a type instead of the name of a type: <pre><code>pwndbg> go-dump 0x49fbc0 0xc000108120\nstruct {a: 1, b: \"first\"}\n</code></pre></p>"},{"location":"misc/pycharm_debugging/","title":"Debugging with PyCharm","text":"<p>In order to debug code with PyCharm you need to configure remote debugging.</p> <p>PyCharm will start a remote debugging server which will listen for connections and pwndbg will then connect to that server, on startup.</p>"},{"location":"misc/pycharm_debugging/#configuring-the-debugging-server","title":"Configuring the debugging server","text":"<p>Select <code>Run -> Edit Configurations</code> and follow the instructions there :)</p> <ul> <li>Create a new server with the <code>+</code> button.</li> <li>Put your IP in <code>IDE host name</code> and select a port number.</li> <li>Optionally, add a path mapping: <code>pycharm/pwndbg/dir=machine/pwndbg/dir</code></li> <li>Uncheck <code>suspend after connect</code></li> </ul>"},{"location":"misc/pycharm_debugging/#configuring-pwndbg","title":"Configuring pwndbg","text":"<ul> <li>Select <code>Run -> Edit Configurations</code> and install the packages described in that window.</li> <li><code>pip install pydevd-pycharm~=<your_pycharm_version></code></li> <li>Add the following code somewhere where it will execute on gdb startup: <pre><code>import pydevd_pycharm\npydevd_pycharm.settrace('<your_IP>', port=<port>, stdoutToServer=True, stderrToServer=True)\n</code></pre></li> </ul>"},{"location":"misc/pycharm_debugging/#debugging","title":"Debugging","text":"<ol> <li>Start the debugging server in PyCharm</li> <li>Run pwndbg</li> </ol>"},{"location":"misc/pycharm_debugging/#wsl2","title":"WSL2","text":"<p>In order to debug using WSL2, you need to obtain your Windows IP. The easiest way to do that is to run: <pre><code>cat /etc/resolv.conf\n</code></pre> and then to pick the value in the <code>nameserver</code> line. Then use that IP in the <code>IDE host name</code> field, when configuring the server. Afterwards, use the same IP in <code>pydevd_pycharm.settrace(...)</code></p>"},{"location":"reference/pwndbg/","title":"pwndbg","text":""},{"location":"reference/pwndbg/#pwndbg","title":"pwndbg","text":"<p>Modules:</p> <ul> <li> <code>aglib</code> \u2013 </li> <li> <code>arguments</code> \u2013 <p>Allows describing functions, specifically enumerating arguments which</p> </li> <li> <code>auxv</code> \u2013 </li> <li> <code>chain</code> \u2013 </li> <li> <code>color</code> \u2013 </li> <li> <code>commands</code> \u2013 </li> <li> <code>dbg</code> \u2013 <p>The abstracted debugger interface.</p> </li> <li> <code>decorators</code> \u2013 </li> <li> <code>emu</code> \u2013 </li> <li> <code>enhance</code> \u2013 <p>Given an address in memory which does not contain a pointer elsewhere</p> </li> <li> <code>exception</code> \u2013 </li> <li> <code>gdblib</code> \u2013 </li> <li> <code>ghidra</code> \u2013 </li> <li> <code>glibc</code> \u2013 <p>Get information about the GLibc</p> </li> <li> <code>hexdump</code> \u2013 <p>Hexdump implementation, ~= stolen from pwntools.</p> </li> <li> <code>integration</code> \u2013 </li> <li> <code>lib</code> \u2013 </li> <li> <code>log</code> \u2013 </li> <li> <code>profiling</code> \u2013 </li> <li> <code>radare2</code> \u2013 </li> <li> <code>rizin</code> \u2013 </li> <li> <code>search</code> \u2013 <p>Search the address space for byte patterns.</p> </li> <li> <code>ui</code> \u2013 <p>A few helpers for making things print pretty-like.</p> </li> <li> <code>wrappers</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>config</code> (<code>Config</code>) \u2013 </li> <li> <code>__version__</code> \u2013 </li> <li> <code>version</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/#pwndbg.config","title":"config <code>module-attribute</code>","text":"<pre><code>config: Config = Config()\n</code></pre>"},{"location":"reference/pwndbg/#pwndbg.__version__","title":"__version__ <code>module-attribute</code>","text":"<pre><code>__version__ = __version__\n</code></pre>"},{"location":"reference/pwndbg/#pwndbg.version","title":"version <code>module-attribute</code>","text":"<pre><code>version = __version__\n</code></pre>"},{"location":"reference/pwndbg/aglib/","title":"pwndbg.aglib","text":""},{"location":"reference/pwndbg/aglib/#pwndbg.aglib","title":"aglib","text":"<p>Modules:</p> <ul> <li> <code>arch</code> \u2013 </li> <li> <code>argv</code> \u2013 </li> <li> <code>ctypes</code> \u2013 <p>On-the-fly endianness switching for ctypes structures.</p> </li> <li> <code>disasm</code> \u2013 <p>Functionality for disassmebling code at an address, or at an</p> </li> <li> <code>dt</code> \u2013 <p>Prints structures in a manner similar to Windbg's \"dt\" command.</p> </li> <li> <code>dynamic</code> \u2013 <p>Dynamic linking interface.</p> </li> <li> <code>elf</code> \u2013 <p>This file declares types and methods useful for enumerating</p> </li> <li> <code>file</code> \u2013 <p>Retrieve files from the debuggee's filesystem. Useful when</p> </li> <li> <code>godbg</code> \u2013 </li> <li> <code>heap</code> \u2013 </li> <li> <code>kernel</code> \u2013 </li> <li> <code>memory</code> \u2013 </li> <li> <code>nearpc</code> \u2013 </li> <li> <code>next</code> \u2013 <p>Commands for setting temporary breakpoints on the next</p> </li> <li> <code>onegadget</code> \u2013 </li> <li> <code>proc</code> \u2013 <p>Provides values which would be available from /proc which</p> </li> <li> <code>qemu</code> \u2013 <p>Determine whether the target is being run under QEMU.</p> </li> <li> <code>regs</code> \u2013 <p>Reading register value from the inferior, and provides a</p> </li> <li> <code>remote</code> \u2013 <p>Information about whether the debuggee is local (under GDB) or remote</p> </li> <li> <code>shellcode</code> \u2013 <p>Shellcode</p> </li> <li> <code>stack</code> \u2013 <p>Helpers for finding address mappings which are used as a stack.</p> </li> <li> <code>strings</code> \u2013 <p>Functionality for resolving ASCII printable strings within</p> </li> <li> <code>symbol</code> \u2013 <p>Looking up addresses for function names / symbols, and</p> </li> <li> <code>tls</code> \u2013 <p>Getting Thread Local Storage (TLS) information.</p> </li> <li> <code>typeinfo</code> \u2013 <p>Common types.</p> </li> <li> <code>vmmap</code> \u2013 </li> <li> <code>vmmap_custom</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>load_aglib</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/#pwndbg.aglib.load_aglib","title":"load_aglib","text":"<pre><code>load_aglib()\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/","title":"pwndbg.aglib.arch","text":""},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch","title":"arch","text":"<p>Functions:</p> <ul> <li> <code>read_thumb_bit</code> \u2013 <p>Return 0 or 1, representing the status of the Thumb bit in the current Arm architecture</p> </li> <li> <code>get_thumb_mode_string</code> \u2013 </li> <li> <code>update</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>arch</code> (<code>Arch</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.arch","title":"arch <code>module-attribute</code>","text":"<pre><code>arch: Arch = Arch('i386', 4, 'little')\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -> int | None\n</code></pre> <p>Return 0 or 1, representing the status of the Thumb bit in the current Arm architecture</p> <p>Return None if the Thumb bit is not relevent to the current architecture</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.get_thumb_mode_string","title":"get_thumb_mode_string","text":"<pre><code>get_thumb_mode_string() -> Literal['arm', 'thumb'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.update","title":"update","text":"<pre><code>update() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/","title":"pwndbg.aglib.argv","text":""},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv","title":"argv","text":"<p>Functions:</p> <ul> <li> <code>update</code> \u2013 </li> <li> <code>update_state</code> \u2013 </li> <li> <code>argc</code> \u2013 </li> <li> <code>argv</code> \u2013 </li> <li> <code>envc</code> \u2013 </li> <li> <code>envp</code> \u2013 </li> <li> <code>environ</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.update","title":"update","text":"<pre><code>update() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.update_state","title":"update_state","text":"<pre><code>update_state() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.argc","title":"argc","text":"<pre><code>argc() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.argv","title":"argv","text":"<pre><code>argv(number: int) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.envc","title":"envc","text":"<pre><code>envc() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.envp","title":"envp","text":"<pre><code>envp(number: int) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.environ","title":"environ","text":"<pre><code>environ(name: str) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/ctypes/","title":"pwndbg.aglib.ctypes","text":""},{"location":"reference/pwndbg/aglib/ctypes/#pwndbg.aglib.ctypes","title":"ctypes","text":"<p>On-the-fly endianness switching for ctypes structures.</p> <p>We cannot make use of ctypes.LittleEndianStructure and ctypes.BigEndianStructure, since these use metaclass hooks to catch fields being set when the class is declared.</p> <p>We need to catch on the fly. We do this by swapping out the base classes of the Structure type, and incurring a performance penalty for foreign-endianness targets.</p> <p>Functions:</p> <ul> <li> <code>update</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>module</code> \u2013 </li> <li> <code>Structure</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/ctypes/#pwndbg.aglib.ctypes.module","title":"module <code>module-attribute</code>","text":"<pre><code>module = modules[__name__]\n</code></pre>"},{"location":"reference/pwndbg/aglib/ctypes/#pwndbg.aglib.ctypes.Structure","title":"Structure <code>module-attribute</code>","text":"<pre><code>Structure = LittleEndianStructure\n</code></pre>"},{"location":"reference/pwndbg/aglib/ctypes/#pwndbg.aglib.ctypes.update","title":"update","text":"<pre><code>update() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/","title":"pwndbg.aglib.disasm","text":""},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm","title":"disasm","text":"<p>Functionality for disassmebling code at an address, or at an address \u00b1 a few instructions.</p> <p>Modules:</p> <ul> <li> <code>aarch64</code> \u2013 </li> <li> <code>arch</code> \u2013 </li> <li> <code>arm</code> \u2013 </li> <li> <code>instruction</code> \u2013 </li> <li> <code>mips</code> \u2013 </li> <li> <code>ppc</code> \u2013 </li> <li> <code>riscv</code> \u2013 </li> <li> <code>sparc</code> \u2013 </li> <li> <code>x86</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>enhance_cache_listener</code> \u2013 </li> <li> <code>clear_on_reg_mem_change</code> \u2013 </li> <li> <code>get_disassembler_cached</code> \u2013 </li> <li> <code>get_disassembler</code> \u2013 </li> <li> <code>get_one_instruction</code> \u2013 <p>If passed an emulator, this will pass it to the DisassemblyAssistant which will</p> </li> <li> <code>one</code> \u2013 </li> <li> <code>one_raw</code> \u2013 </li> <li> <code>get</code> \u2013 </li> <li> <code>can_run_first_emulate</code> \u2013 <p>Disable the emulate config variable if we don't have enough memory to use it</p> </li> <li> <code>no_emulate_one</code> \u2013 </li> <li> <code>emulate_one</code> \u2013 </li> <li> <code>one_with_config</code> \u2013 <p>Returns a single Pwndbg Instruction at the current PC.</p> </li> <li> <code>near</code> \u2013 <p>Disasms instructions near given <code>address</code>. Passing <code>emulate</code> makes use of</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>CapstoneArch</code> \u2013 </li> <li> <code>CapstoneEndian</code> \u2013 </li> <li> <code>CapstoneMode</code> \u2013 </li> <li> <code>CapstoneSyntax</code> \u2013 </li> <li> <code>VariableInstructionSizeMax</code> \u2013 </li> <li> <code>next_addresses_cache</code> (<code>set[int]</code>) \u2013 </li> <li> <code>backward_cache</code> (<code>DefaultDict[int, int]</code>) \u2013 </li> <li> <code>computed_instruction_cache</code> (<code>DefaultDict[int, PwndbgInstruction]</code>) \u2013 </li> <li> <code>emulated_arm_mode_cache</code> (<code>DefaultDict[int, int]</code>) \u2013 </li> <li> <code>first_time_emulate</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.CapstoneArch","title":"CapstoneArch <code>module-attribute</code>","text":"<pre><code>CapstoneArch = {\n \"arm\": CS_ARCH_ARM,\n \"armcm\": CS_ARCH_ARM,\n \"aarch64\": CS_ARCH_ARM64,\n \"i386\": CS_ARCH_X86,\n \"i8086\": CS_ARCH_X86,\n \"x86-64\": CS_ARCH_X86,\n \"powerpc\": CS_ARCH_PPC,\n \"mips\": CS_ARCH_MIPS,\n \"sparc\": CS_ARCH_SPARC,\n \"rv32\": CS_ARCH_RISCV,\n \"rv64\": CS_ARCH_RISCV,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.CapstoneEndian","title":"CapstoneEndian <code>module-attribute</code>","text":"<pre><code>CapstoneEndian = {'little': CS_MODE_LITTLE_ENDIAN, 'big': CS_MODE_BIG_ENDIAN}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.CapstoneMode","title":"CapstoneMode <code>module-attribute</code>","text":"<pre><code>CapstoneMode = {4: CS_MODE_32, 8: CS_MODE_64}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.CapstoneSyntax","title":"CapstoneSyntax <code>module-attribute</code>","text":"<pre><code>CapstoneSyntax = {'intel': CS_OPT_SYNTAX_INTEL, 'att': CS_OPT_SYNTAX_ATT}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.VariableInstructionSizeMax","title":"VariableInstructionSizeMax <code>module-attribute</code>","text":"<pre><code>VariableInstructionSizeMax = {\n \"i386\": 16,\n \"x86-64\": 16,\n \"i8086\": 16,\n \"mips\": 8,\n \"rv32\": 22,\n \"rv64\": 22,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.next_addresses_cache","title":"next_addresses_cache <code>module-attribute</code>","text":"<pre><code>next_addresses_cache: set[int] = set()\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.backward_cache","title":"backward_cache <code>module-attribute</code>","text":"<pre><code>backward_cache: DefaultDict[int, int] = defaultdict(lambda: None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.computed_instruction_cache","title":"computed_instruction_cache <code>module-attribute</code>","text":"<pre><code>computed_instruction_cache: DefaultDict[int, PwndbgInstruction] = defaultdict(\n lambda: None\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.emulated_arm_mode_cache","title":"emulated_arm_mode_cache <code>module-attribute</code>","text":"<pre><code>emulated_arm_mode_cache: DefaultDict[int, int] = defaultdict(lambda: None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.first_time_emulate","title":"first_time_emulate <code>module-attribute</code>","text":"<pre><code>first_time_emulate = True\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.enhance_cache_listener","title":"enhance_cache_listener","text":"<pre><code>enhance_cache_listener() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.clear_on_reg_mem_change","title":"clear_on_reg_mem_change","text":"<pre><code>clear_on_reg_mem_change() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.get_disassembler_cached","title":"get_disassembler_cached","text":"<pre><code>get_disassembler_cached(arch, ptrsize: int, endian, extra=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.get_disassembler","title":"get_disassembler","text":"<pre><code>get_disassembler(address)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.get_one_instruction","title":"get_one_instruction","text":"<pre><code>get_one_instruction(\n address,\n emu: Emulator = None,\n enhance=True,\n from_cache=False,\n put_cache=False,\n) -> PwndbgInstruction\n</code></pre> <p>If passed an emulator, this will pass it to the DisassemblyAssistant which will single_step the emulator to determine the operand values before and after the instruction executes.</p>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.one","title":"one","text":"<pre><code>one(\n address=None,\n emu: Emulator = None,\n enhance=True,\n from_cache=False,\n put_cache=False,\n put_backward_cache=True,\n) -> PwndbgInstruction | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.one_raw","title":"one_raw","text":"<pre><code>one_raw(address=None) -> PwndbgInstruction | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.get","title":"get","text":"<pre><code>get(\n address,\n instructions=1,\n emu: Emulator = None,\n enhance=True,\n from_cache=False,\n put_cache=False,\n) -> list[PwndbgInstruction]\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.can_run_first_emulate","title":"can_run_first_emulate","text":"<pre><code>can_run_first_emulate() -> bool\n</code></pre> <p>Disable the emulate config variable if we don't have enough memory to use it See #1534 And unicorn-engine/unicorn!1743</p>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.no_emulate_one","title":"no_emulate_one","text":"<pre><code>no_emulate_one()\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.emulate_one","title":"emulate_one","text":"<pre><code>emulate_one()\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.one_with_config","title":"one_with_config","text":"<pre><code>one_with_config()\n</code></pre> <p>Returns a single Pwndbg Instruction at the current PC.</p> <p>Emulation determined by the <code>pwndbg.config.emulate</code> setting.</p>"},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm.near","title":"near","text":"<pre><code>near(\n address,\n instructions=1,\n emulate=False,\n show_prev_insns=True,\n use_cache=False,\n linear=False,\n) -> tuple[list[PwndbgInstruction], int]\n</code></pre> <p>Disasms instructions near given <code>address</code>. Passing <code>emulate</code> makes use of unicorn engine to emulate instructions to predict branches that will be taken. <code>show_prev_insns</code> makes this show previously cached instructions (this is mostly used by context's disasm display, so user see what was previously)</p>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/","title":"pwndbg.aglib.disasm.aarch64","text":""},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64","title":"aarch64","text":"<p>Classes:</p> <ul> <li> <code>DisassemblyAssistant</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>resolve_condition</code> \u2013 <p>Given a condition and the NZCV flag bits, determine when the condition is satisfied</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>AARCH64_SINGLE_LOAD_INSTRUCTIONS</code> (<code>dict[int, int | None]</code>) \u2013 </li> <li> <code>AARCH64_SINGLE_STORE_INSTRUCTIONS</code> (<code>dict[int, int | None]</code>) \u2013 </li> <li> <code>AARCH64_EXCLUSIVE_STORE_INSTRUCTIONS</code> \u2013 </li> <li> <code>CONDITIONAL_SELECT_INSTRUCTIONS</code> \u2013 </li> <li> <code>AARCH64_EMULATED_ANNOTATIONS</code> \u2013 </li> <li> <code>AARCH64_BIT_SHIFT_MAP</code> (<code>dict[int, Callable[[int, int, int], int]]</code>) \u2013 </li> <li> <code>AARCH64_EXTEND_MAP</code> (<code>dict[int, Callable[[int], int]]</code>) \u2013 </li> <li> <code>AARCH64_MATH_INSTRUCTIONS</code> \u2013 </li> <li> <code>assistant</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_SINGLE_LOAD_INSTRUCTIONS","title":"AARCH64_SINGLE_LOAD_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>AARCH64_SINGLE_LOAD_INSTRUCTIONS: dict[int, int | None] = {\n ARM64_INS_LDRB: 1,\n ARM64_INS_LDURB: 1,\n ARM64_INS_LDRSB: -1,\n ARM64_INS_LDURSB: -1,\n ARM64_INS_LDRH: 2,\n ARM64_INS_LDURH: 2,\n ARM64_INS_LDRSH: -2,\n ARM64_INS_LDURSH: -2,\n ARM64_INS_LDURSW: -4,\n ARM64_INS_LDRSW: -4,\n ARM64_INS_LDUR: None,\n ARM64_INS_LDR: None,\n ARM64_INS_LDTRB: 1,\n ARM64_INS_LDTRSB: -1,\n ARM64_INS_LDTRH: 2,\n ARM64_INS_LDTRSH: -2,\n ARM64_INS_LDTRSW: -4,\n ARM64_INS_LDTR: None,\n ARM64_INS_LDXRB: 1,\n ARM64_INS_LDXRH: 2,\n ARM64_INS_LDXR: None,\n ARM64_INS_LDARB: 1,\n ARM64_INS_LDARH: 2,\n ARM64_INS_LDAR: None,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_SINGLE_STORE_INSTRUCTIONS","title":"AARCH64_SINGLE_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>AARCH64_SINGLE_STORE_INSTRUCTIONS: dict[int, int | None] = {\n ARM64_INS_STRB: 1,\n ARM64_INS_STURB: 1,\n ARM64_INS_STRH: 2,\n ARM64_INS_STURH: 2,\n ARM64_INS_STUR: None,\n ARM64_INS_STR: None,\n ARM64_INS_STTRB: 1,\n ARM64_INS_STTRH: 2,\n ARM64_INS_STTR: None,\n ARM64_INS_STLRB: 1,\n ARM64_INS_STLRH: 2,\n ARM64_INS_STLR: None,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_EXCLUSIVE_STORE_INSTRUCTIONS","title":"AARCH64_EXCLUSIVE_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>AARCH64_EXCLUSIVE_STORE_INSTRUCTIONS = {\n ARM64_INS_STXRB: 1,\n ARM64_INS_STXRH: 2,\n ARM64_INS_STXR: None,\n ARM64_INS_STLXRB: 1,\n ARM64_INS_STLXRH: 2,\n ARM64_INS_STLXR: None,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.CONDITIONAL_SELECT_INSTRUCTIONS","title":"CONDITIONAL_SELECT_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>CONDITIONAL_SELECT_INSTRUCTIONS = {\n ARM64_INS_CSEL,\n ARM64_INS_CSINC,\n ARM64_INS_CSINV,\n ARM64_INS_CSNEG,\n ARM64_INS_CSET,\n ARM64_INS_CSETM,\n ARM64_INS_CINC,\n ARM64_INS_CINV,\n ARM64_INS_CNEG,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_EMULATED_ANNOTATIONS","title":"AARCH64_EMULATED_ANNOTATIONS <code>module-attribute</code>","text":"<pre><code>AARCH64_EMULATED_ANNOTATIONS = CONDITIONAL_SELECT_INSTRUCTIONS | {\n ARM64_INS_SXTB,\n ARM64_INS_SXTH,\n ARM64_INS_SXTW,\n ARM64_INS_UXTB,\n ARM64_INS_UXTH,\n ARM64_INS_UXTW,\n ARM64_INS_RBIT,\n ARM64_INS_CLS,\n ARM64_INS_CLZ,\n ARM64_INS_BFXIL,\n ARM64_INS_UBFIZ,\n ARM64_INS_UBFM,\n ARM64_INS_UBFX,\n ARM64_INS_SBFIZ,\n ARM64_INS_SBFM,\n ARM64_INS_SBFX,\n ARM64_INS_BFI,\n ARM64_INS_NEG,\n ARM64_INS_NEGS,\n ARM64_INS_REV,\n ARM64_INS_BIC,\n ARM64_INS_BICS,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_BIT_SHIFT_MAP","title":"AARCH64_BIT_SHIFT_MAP <code>module-attribute</code>","text":"<pre><code>AARCH64_BIT_SHIFT_MAP: dict[int, Callable[[int, int, int], int]] = {\n ARM64_SFT_LSL: logical_shift_left,\n ARM64_SFT_LSR: logical_shift_right,\n ARM64_SFT_ASR: arithmetic_shift_right,\n ARM64_SFT_ROR: rotate_right,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_EXTEND_MAP","title":"AARCH64_EXTEND_MAP <code>module-attribute</code>","text":"<pre><code>AARCH64_EXTEND_MAP: dict[int, Callable[[int], int]] = {\n ARM64_EXT_UXTB: lambda x: x & 1 << 8 - 1,\n ARM64_EXT_UXTH: lambda x: x & 1 << 16 - 1,\n ARM64_EXT_UXTW: lambda x: x & 1 << 32 - 1,\n ARM64_EXT_UXTX: lambda x: x,\n ARM64_EXT_SXTB: lambda x: to_signed(x, 8),\n ARM64_EXT_SXTH: lambda x: to_signed(x, 16),\n ARM64_EXT_SXTW: lambda x: to_signed(x, 32),\n ARM64_EXT_SXTX: lambda x: to_signed(x, 64),\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_MATH_INSTRUCTIONS","title":"AARCH64_MATH_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>AARCH64_MATH_INSTRUCTIONS = {\n ARM64_INS_ADD: \"+\",\n ARM64_INS_ADDS: \"+\",\n ARM64_INS_SUB: \"-\",\n ARM64_INS_SUBS: \"-\",\n ARM64_INS_AND: \"&\",\n ARM64_INS_ANDS: \"&\",\n ARM64_INS_ORR: \"&\",\n ARM64_INS_ASR: \">>s\",\n ARM64_INS_ASRV: \">>s\",\n ARM64_INS_EOR: \"^\",\n ARM64_INS_LSL: \"<<\",\n ARM64_INS_LSLV: \"<<\",\n ARM64_INS_LSR: \">>\",\n ARM64_INS_LSRV: \">>\",\n ARM64_INS_UDIV: \"/\",\n ARM64_INS_SDIV: \"/\",\n ARM64_INS_SMULH: \"*\",\n ARM64_INS_SMULL: \"*\",\n ARM64_INS_UMULH: \"*\",\n ARM64_INS_UMULL: \"*\",\n ARM64_INS_MUL: \"*\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.assistant","title":"assistant <code>module-attribute</code>","text":"<pre><code>assistant = DisassemblyAssistant('aarch64')\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant","title":"DisassemblyAssistant","text":"<pre><code>DisassemblyAssistant(architecture: str)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>for_current_arch</code> \u2013 </li> <li> <code>enhance</code> \u2013 </li> <li> <code>can_reason_about_process_state</code> \u2013 <p>Determine if the program counter of the process equals the address of the instruction being enhanced.</p> </li> <li> <code>dump</code> \u2013 <p>Debug-only method.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>annotation_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, Emulator], None]]</code>) \u2013 </li> <li> <code>assistants</code> (<code>dict[str, DisassemblyAssistant]</code>) \u2013 </li> <li> <code>op_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]]</code>) \u2013 </li> <li> <code>op_names</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.annotation_handlers","title":"annotation_handlers <code>instance-attribute</code>","text":"<pre><code>annotation_handlers: dict[\n int, Callable[[PwndbgInstruction, Emulator], None]\n] = {\n ARM64_INS_MOV: _common_move_annotator,\n ARM64_INS_MOVK: _common_generic_register_destination,\n ARM64_INS_ADR: _common_generic_register_destination,\n ARM64_INS_ADRP: _handle_adrp,\n ARM64_INS_CMP: _common_cmp_annotator_builder(\"cpsr\", \"-\"),\n ARM64_INS_CMN: _common_cmp_annotator_builder(\"cpsr\", \"+\"),\n ARM64_INS_TST: _common_cmp_annotator_builder(\"cpsr\", \"&\"),\n ARM64_INS_CCMP: _common_cmp_annotator_builder(\"cpsr\", \"\"),\n ARM64_INS_CCMN: _common_cmp_annotator_builder(\"cpsr\", \"\"),\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.assistants","title":"assistants <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>assistants: dict[str, DisassemblyAssistant] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.op_handlers","title":"op_handlers <code>instance-attribute</code>","text":"<pre><code>op_handlers: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]\n] = {\n CS_OP_IMM: _parse_immediate,\n CS_OP_REG: _parse_register,\n CS_OP_MEM: _parse_memory,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.op_names","title":"op_names <code>instance-attribute</code>","text":"<pre><code>op_names: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]\n] = {\n CS_OP_IMM: _immediate_string,\n CS_OP_REG: _register_string,\n CS_OP_MEM: _memory_string,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.for_current_arch","title":"for_current_arch <code>staticmethod</code>","text":"<pre><code>for_current_arch() -> DisassemblyAssistant\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.enhance","title":"enhance <code>staticmethod</code>","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -> bool\n</code></pre> <p>Determine if the program counter of the process equals the address of the instruction being enhanced. If so, it means we can safely reason and read from registers and memory to enhance values that we can add to the annotation string. This becomes relevent when NOT emulating, and is meant to allow more details when the PC is at the instruction being enhanced</p>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.resolve_condition","title":"resolve_condition","text":"<pre><code>resolve_condition(condition: int, cpsr: int) -> InstructionCondition\n</code></pre> <p>Given a condition and the NZCV flag bits, determine when the condition is satisfied</p> <p>The condition is a Capstone constant</p>"},{"location":"reference/pwndbg/aglib/disasm/arch/","title":"pwndbg.aglib.disasm.arch","text":""},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch","title":"arch","text":"<p>Classes:</p> <ul> <li> <code>DisassemblyAssistant</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>syntax_highlight</code> \u2013 </li> <li> <code>register_assign</code> \u2013 </li> <li> <code>memory_assign</code> \u2013 </li> <li> <code>memory_or_register_assign</code> \u2013 <p>Used when we don't know until runtime whether a codepath will annotate a register or memory location.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>DEBUG_ENHANCEMENT</code> \u2013 </li> <li> <code>groups</code> \u2013 </li> <li> <code>ops</code> \u2013 </li> <li> <code>access</code> \u2013 </li> <li> <code>DO_NOT_EMULATE</code> \u2013 </li> <li> <code>generic_assistant</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DEBUG_ENHANCEMENT","title":"DEBUG_ENHANCEMENT <code>module-attribute</code>","text":"<pre><code>DEBUG_ENHANCEMENT = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.groups","title":"groups <code>module-attribute</code>","text":"<pre><code>groups = {v: _lfor (k, v) in items() if startswith('CS_GRP_')}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.ops","title":"ops <code>module-attribute</code>","text":"<pre><code>ops = {v: _Jfor (k, v) in items() if startswith('CS_OP_')}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.access","title":"access <code>module-attribute</code>","text":"<pre><code>access = {v: _Ffor (k, v) in items() if startswith('CS_AC_')}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DO_NOT_EMULATE","title":"DO_NOT_EMULATE <code>module-attribute</code>","text":"<pre><code>DO_NOT_EMULATE = {CS_GRP_INT, CS_GRP_INVALID, CS_GRP_IRET}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.generic_assistant","title":"generic_assistant <code>module-attribute</code>","text":"<pre><code>generic_assistant = DisassemblyAssistant(None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant","title":"DisassemblyAssistant","text":"<pre><code>DisassemblyAssistant(architecture: str)\n</code></pre> <p>Methods:</p> <ul> <li> <code>for_current_arch</code> \u2013 </li> <li> <code>enhance</code> \u2013 </li> <li> <code>can_reason_about_process_state</code> \u2013 <p>Determine if the program counter of the process equals the address of the instruction being enhanced.</p> </li> <li> <code>dump</code> \u2013 <p>Debug-only method.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>assistants</code> (<code>dict[str, DisassemblyAssistant]</code>) \u2013 </li> <li> <code>op_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]]</code>) \u2013 </li> <li> <code>op_names</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.assistants","title":"assistants <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>assistants: dict[str, DisassemblyAssistant] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.op_handlers","title":"op_handlers <code>instance-attribute</code>","text":"<pre><code>op_handlers: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]\n] = {\n CS_OP_IMM: _parse_immediate,\n CS_OP_REG: _parse_register,\n CS_OP_MEM: _parse_memory,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.op_names","title":"op_names <code>instance-attribute</code>","text":"<pre><code>op_names: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]\n] = {\n CS_OP_IMM: _immediate_string,\n CS_OP_REG: _register_string,\n CS_OP_MEM: _memory_string,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.for_current_arch","title":"for_current_arch <code>staticmethod</code>","text":"<pre><code>for_current_arch() -> DisassemblyAssistant\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.enhance","title":"enhance <code>staticmethod</code>","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -> bool\n</code></pre> <p>Determine if the program counter of the process equals the address of the instruction being enhanced. If so, it means we can safely reason and read from registers and memory to enhance values that we can add to the annotation string. This becomes relevent when NOT emulating, and is meant to allow more details when the PC is at the instruction being enhanced</p>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.syntax_highlight","title":"syntax_highlight","text":"<pre><code>syntax_highlight(ins)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.register_assign","title":"register_assign","text":"<pre><code>register_assign(left: str, right: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.memory_assign","title":"memory_assign","text":"<pre><code>memory_assign(left: str, right: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.memory_or_register_assign","title":"memory_or_register_assign","text":"<pre><code>memory_or_register_assign(left: str, right: str, mem_assign: bool) -> str\n</code></pre> <p>Used when we don't know until runtime whether a codepath will annotate a register or memory location.</p>"},{"location":"reference/pwndbg/aglib/disasm/arm/","title":"pwndbg.aglib.disasm.arm","text":""},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm","title":"arm","text":"<p>Classes:</p> <ul> <li> <code>DisassemblyAssistant</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>first_op_is_pc</code> \u2013 </li> <li> <code>ops_contain_pc</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ARM_BIT_SHIFT_MAP</code> (<code>dict[int, Callable[[int, int, int], int]]</code>) \u2013 </li> <li> <code>ARM_SINGLE_LOAD_INSTRUCTIONS</code> \u2013 </li> <li> <code>ARM_SINGLE_STORE_INSTRUCTIONS</code> \u2013 </li> <li> <code>ARM_EXCLUSIVE_STORE_INSTRUCTIONS</code> \u2013 </li> <li> <code>ARM_MATH_INSTRUCTIONS</code> \u2013 </li> <li> <code>ARM_SHIFT_INSTRUCTIONS</code> \u2013 </li> <li> <code>ARM_CAN_WRITE_TO_PC</code> (<code>dict[int, Callable[[PwndbgInstruction], bool]]</code>) \u2013 </li> <li> <code>assistant</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_BIT_SHIFT_MAP","title":"ARM_BIT_SHIFT_MAP <code>module-attribute</code>","text":"<pre><code>ARM_BIT_SHIFT_MAP: dict[int, Callable[[int, int, int], int]] = {\n ARM_SFT_ASR: arithmetic_shift_right,\n ARM_SFT_LSL: logical_shift_left,\n ARM_SFT_LSR: logical_shift_right,\n ARM_SFT_ROR: rotate_right,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_SINGLE_LOAD_INSTRUCTIONS","title":"ARM_SINGLE_LOAD_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>ARM_SINGLE_LOAD_INSTRUCTIONS = {\n ARM_INS_LDRB: 1,\n ARM_INS_LDRSB: -1,\n ARM_INS_LDRH: 2,\n ARM_INS_LDRSH: -2,\n ARM_INS_LDR: 4,\n ARM_INS_LDRBT: 1,\n ARM_INS_LDRSBT: -1,\n ARM_INS_LDRHT: 2,\n ARM_INS_LDRSHT: -2,\n ARM_INS_LDRT: 4,\n ARM_INS_LDREXB: 1,\n ARM_INS_LDREXH: 2,\n ARM_INS_LDREX: 4,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_SINGLE_STORE_INSTRUCTIONS","title":"ARM_SINGLE_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>ARM_SINGLE_STORE_INSTRUCTIONS = {\n ARM_INS_STRB: 1,\n ARM_INS_STRH: 2,\n ARM_INS_STR: 4,\n ARM_INS_STRBT: 1,\n ARM_INS_STRHT: 2,\n ARM_INS_STRT: 4,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_EXCLUSIVE_STORE_INSTRUCTIONS","title":"ARM_EXCLUSIVE_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>ARM_EXCLUSIVE_STORE_INSTRUCTIONS = {\n ARM_INS_STREXB: 1,\n ARM_INS_STREXH: 2,\n ARM_INS_STREX: 4,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_MATH_INSTRUCTIONS","title":"ARM_MATH_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>ARM_MATH_INSTRUCTIONS = {\n ARM_INS_ADD: \"+\",\n ARM_INS_ADDW: \"+\",\n ARM_INS_SUB: \"-\",\n ARM_INS_ORR: \"|\",\n ARM_INS_AND: \"&\",\n ARM_INS_EOR: \"^\",\n ARM_INS_UDIV: \"/\",\n ARM_INS_SDIV: \"/\",\n ARM_INS_MUL: \"*\",\n ARM_INS_UMULL: \"*\",\n ARM_INS_SMULL: \"*\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_SHIFT_INSTRUCTIONS","title":"ARM_SHIFT_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>ARM_SHIFT_INSTRUCTIONS = {\n ARM_INS_ASR: \">>s\",\n ARM_INS_LSR: \">>\",\n ARM_INS_LSL: \"<<\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_CAN_WRITE_TO_PC","title":"ARM_CAN_WRITE_TO_PC <code>module-attribute</code>","text":"<pre><code>ARM_CAN_WRITE_TO_PC: dict[int, Callable[[PwndbgInstruction], bool]] = {\n ARM_INS_ADD: first_op_is_pc,\n ARM_INS_SUB: first_op_is_pc,\n ARM_INS_SUBS: first_op_is_pc,\n ARM_INS_MOV: first_op_is_pc,\n ARM_INS_LDR: first_op_is_pc,\n ARM_INS_POP: ops_contain_pc,\n ARM_INS_LDM: ops_contain_pc,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.assistant","title":"assistant <code>module-attribute</code>","text":"<pre><code>assistant = DisassemblyAssistant('armcm', 'xpsr')\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant","title":"DisassemblyAssistant","text":"<pre><code>DisassemblyAssistant(architecture: str, flags_reg: Literal['cpsr', 'xpsr'])\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>read_thumb_bit</code> \u2013 </li> <li> <code>for_current_arch</code> \u2013 </li> <li> <code>enhance</code> \u2013 </li> <li> <code>can_reason_about_process_state</code> \u2013 <p>Determine if the program counter of the process equals the address of the instruction being enhanced.</p> </li> <li> <code>dump</code> \u2013 <p>Debug-only method.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>flags_reg</code> \u2013 </li> <li> <code>annotation_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, Emulator], None]]</code>) \u2013 </li> <li> <code>assistants</code> (<code>dict[str, DisassemblyAssistant]</code>) \u2013 </li> <li> <code>op_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]]</code>) \u2013 </li> <li> <code>op_names</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.flags_reg","title":"flags_reg <code>instance-attribute</code>","text":"<pre><code>flags_reg = flags_reg\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.annotation_handlers","title":"annotation_handlers <code>instance-attribute</code>","text":"<pre><code>annotation_handlers: dict[\n int, Callable[[PwndbgInstruction, Emulator], None]\n] = {\n ARM_INS_MOV: _common_move_annotator,\n ARM_INS_MOVW: _common_move_annotator,\n ARM_INS_MOVT: _common_generic_register_destination,\n ARM_INS_MVN: _common_generic_register_destination,\n ARM_INS_CMP: _common_cmp_annotator_builder(flags_reg, \"-\"),\n ARM_INS_CMN: _common_cmp_annotator_builder(flags_reg, \"+\"),\n ARM_INS_TST: _common_cmp_annotator_builder(flags_reg, \"&\"),\n ARM_INS_TEQ: _common_cmp_annotator_builder(flags_reg, \"^\"),\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.assistants","title":"assistants <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>assistants: dict[str, DisassemblyAssistant] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.op_handlers","title":"op_handlers <code>instance-attribute</code>","text":"<pre><code>op_handlers: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]\n] = {\n CS_OP_IMM: _parse_immediate,\n CS_OP_REG: _parse_register,\n CS_OP_MEM: _parse_memory,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.op_names","title":"op_names <code>instance-attribute</code>","text":"<pre><code>op_names: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]\n] = {\n CS_OP_IMM: _immediate_string,\n CS_OP_REG: _register_string,\n CS_OP_MEM: _memory_string,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit(instruction: PwndbgInstruction, emu: Emulator) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.for_current_arch","title":"for_current_arch <code>staticmethod</code>","text":"<pre><code>for_current_arch() -> DisassemblyAssistant\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.enhance","title":"enhance <code>staticmethod</code>","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -> bool\n</code></pre> <p>Determine if the program counter of the process equals the address of the instruction being enhanced. If so, it means we can safely reason and read from registers and memory to enhance values that we can add to the annotation string. This becomes relevent when NOT emulating, and is meant to allow more details when the PC is at the instruction being enhanced</p>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.first_op_is_pc","title":"first_op_is_pc","text":"<pre><code>first_op_is_pc(i: PwndbgInstruction) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ops_contain_pc","title":"ops_contain_pc","text":"<pre><code>ops_contain_pc(i: PwndbgInstruction) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/","title":"pwndbg.aglib.disasm.instruction","text":""},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction","title":"instruction","text":"<p>Classes:</p> <ul> <li> <code>InstructionCondition</code> \u2013 </li> <li> <code>SplitType</code> \u2013 </li> <li> <code>PwndbgInstruction</code> \u2013 </li> <li> <code>PwndbgInstructionImpl</code> \u2013 </li> <li> <code>EnhancedOperand</code> \u2013 </li> <li> <code>ManualPwndbgInstruction</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>boolean_to_instruction_condition</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>UNCONDITIONAL_JUMP_INSTRUCTIONS</code> (<code>dict[int, set[int]]</code>) \u2013 </li> <li> <code>BRANCH_AND_LINK_INSTRUCTIONS</code> (<code>dict[int, set[int]]</code>) \u2013 </li> <li> <code>GENERIC_UNCONDITIONAL_JUMP_GROUPS</code> \u2013 </li> <li> <code>GENERIC_JUMP_GROUPS</code> \u2013 </li> <li> <code>ALL_JUMP_GROUPS</code> \u2013 </li> <li> <code>FORWARD_JUMP_GROUP</code> \u2013 </li> <li> <code>CAPSTONE_ARCH_MAPPING_STRING</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.UNCONDITIONAL_JUMP_INSTRUCTIONS","title":"UNCONDITIONAL_JUMP_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>UNCONDITIONAL_JUMP_INSTRUCTIONS: dict[int, set[int]] = {\n CS_ARCH_X86: {X86_INS_JMP},\n CS_ARCH_MIPS: {\n MIPS_INS_J,\n MIPS_INS_JR,\n MIPS_INS_JAL,\n MIPS_INS_JALR,\n MIPS_INS_BAL,\n MIPS_INS_B,\n },\n CS_ARCH_SPARC: {SPARC_INS_JMP, SPARC_INS_JMPL},\n CS_ARCH_ARM: {ARM_INS_TBB, ARM_INS_TBH},\n CS_ARCH_ARM64: {ARM64_INS_BL, ARM64_INS_BLR, ARM64_INS_BR},\n CS_ARCH_RISCV: {\n RISCV_INS_JAL,\n RISCV_INS_JALR,\n RISCV_INS_C_JAL,\n RISCV_INS_C_JALR,\n RISCV_INS_C_J,\n RISCV_INS_C_JR,\n },\n CS_ARCH_PPC: {PPC_INS_B, PPC_INS_BA, PPC_INS_BL, PPC_INS_BLA},\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.BRANCH_AND_LINK_INSTRUCTIONS","title":"BRANCH_AND_LINK_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>BRANCH_AND_LINK_INSTRUCTIONS: dict[int, set[int]] = defaultdict(set)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.GENERIC_UNCONDITIONAL_JUMP_GROUPS","title":"GENERIC_UNCONDITIONAL_JUMP_GROUPS <code>module-attribute</code>","text":"<pre><code>GENERIC_UNCONDITIONAL_JUMP_GROUPS = {CS_GRP_CALL, CS_GRP_RET, CS_GRP_IRET}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.GENERIC_JUMP_GROUPS","title":"GENERIC_JUMP_GROUPS <code>module-attribute</code>","text":"<pre><code>GENERIC_JUMP_GROUPS = {CS_GRP_JUMP, CS_GRP_BRANCH_RELATIVE}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ALL_JUMP_GROUPS","title":"ALL_JUMP_GROUPS <code>module-attribute</code>","text":"<pre><code>ALL_JUMP_GROUPS = GENERIC_JUMP_GROUPS | GENERIC_UNCONDITIONAL_JUMP_GROUPS\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.FORWARD_JUMP_GROUP","title":"FORWARD_JUMP_GROUP <code>module-attribute</code>","text":"<pre><code>FORWARD_JUMP_GROUP = {CS_GRP_CALL} | GENERIC_JUMP_GROUPS\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.CAPSTONE_ARCH_MAPPING_STRING","title":"CAPSTONE_ARCH_MAPPING_STRING <code>module-attribute</code>","text":"<pre><code>CAPSTONE_ARCH_MAPPING_STRING = {\n CS_ARCH_ARM: \"arm\",\n CS_ARCH_ARM64: \"aarch64\",\n CS_ARCH_X86: \"x86\",\n CS_ARCH_PPC: \"powerpc\",\n CS_ARCH_MIPS: \"mips\",\n CS_ARCH_SPARC: \"sparc\",\n CS_ARCH_RISCV: \"RISCV\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.InstructionCondition","title":"InstructionCondition","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>TRUE</code> \u2013 </li> <li> <code>FALSE</code> \u2013 </li> <li> <code>UNDETERMINED</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.InstructionCondition.TRUE","title":"TRUE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>TRUE = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.InstructionCondition.FALSE","title":"FALSE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FALSE = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.InstructionCondition.UNDETERMINED","title":"UNDETERMINED <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UNDETERMINED = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.SplitType","title":"SplitType","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>NO_SPLIT</code> \u2013 </li> <li> <code>BRANCH_TAKEN</code> \u2013 </li> <li> <code>BRANCH_NOT_TAKEN</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.SplitType.NO_SPLIT","title":"NO_SPLIT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NO_SPLIT = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.SplitType.BRANCH_TAKEN","title":"BRANCH_TAKEN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>BRANCH_TAKEN = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.SplitType.BRANCH_NOT_TAKEN","title":"BRANCH_NOT_TAKEN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>BRANCH_NOT_TAKEN = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction","title":"PwndbgInstruction","text":"<p> Bases: <code>Protocol</code></p> <p>Methods:</p> <ul> <li> <code>op_find</code> \u2013 </li> <li> <code>op_count</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>cs_insn</code> (<code>CsInsn</code>) \u2013 </li> <li> <code>address</code> (<code>int</code>) \u2013 </li> <li> <code>size</code> (<code>int</code>) \u2013 </li> <li> <code>mnemonic</code> (<code>str</code>) \u2013 </li> <li> <code>op_str</code> (<code>str</code>) \u2013 </li> <li> <code>groups</code> (<code>set[int]</code>) \u2013 </li> <li> <code>id</code> (<code>int</code>) \u2013 </li> <li> <code>operands</code> (<code>list[EnhancedOperand]</code>) \u2013 </li> <li> <code>asm_string</code> (<code>str</code>) \u2013 </li> <li> <code>next</code> (<code>int</code>) \u2013 </li> <li> <code>target</code> (<code>int</code>) \u2013 </li> <li> <code>target_string</code> (<code>str | None</code>) \u2013 </li> <li> <code>target_const</code> (<code>bool | None</code>) \u2013 </li> <li> <code>condition</code> (<code>InstructionCondition</code>) \u2013 </li> <li> <code>declare_conditional</code> (<code>bool | None</code>) \u2013 </li> <li> <code>declare_is_unconditional_jump</code> (<code>bool</code>) \u2013 </li> <li> <code>force_unconditional_jump_target</code> (<code>bool</code>) \u2013 </li> <li> <code>annotation</code> (<code>str | None</code>) \u2013 </li> <li> <code>annotation_padding</code> (<code>int | None</code>) \u2013 </li> <li> <code>syscall</code> (<code>int | None</code>) \u2013 </li> <li> <code>syscall_name</code> (<code>str | None</code>) \u2013 </li> <li> <code>causes_branch_delay</code> (<code>bool</code>) \u2013 </li> <li> <code>split</code> (<code>SplitType</code>) \u2013 </li> <li> <code>emulated</code> (<code>bool</code>) \u2013 </li> <li> <code>call_like</code> (<code>bool</code>) \u2013 </li> <li> <code>jump_like</code> (<code>bool</code>) \u2013 </li> <li> <code>has_jump_target</code> (<code>bool</code>) \u2013 </li> <li> <code>is_conditional_jump</code> (<code>bool</code>) \u2013 </li> <li> <code>is_unconditional_jump</code> (<code>bool</code>) \u2013 </li> <li> <code>is_conditional_jump_taken</code> (<code>bool</code>) \u2013 </li> <li> <code>bytes</code> (<code>bytearray</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.cs_insn","title":"cs_insn <code>instance-attribute</code>","text":"<pre><code>cs_insn: CsInsn\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.size","title":"size <code>instance-attribute</code>","text":"<pre><code>size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.mnemonic","title":"mnemonic <code>instance-attribute</code>","text":"<pre><code>mnemonic: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.op_str","title":"op_str <code>instance-attribute</code>","text":"<pre><code>op_str: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.groups","title":"groups <code>instance-attribute</code>","text":"<pre><code>groups: set[int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.id","title":"id <code>instance-attribute</code>","text":"<pre><code>id: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.operands","title":"operands <code>instance-attribute</code>","text":"<pre><code>operands: list[EnhancedOperand]\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.asm_string","title":"asm_string <code>instance-attribute</code>","text":"<pre><code>asm_string: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.next","title":"next <code>instance-attribute</code>","text":"<pre><code>next: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.target","title":"target <code>instance-attribute</code>","text":"<pre><code>target: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.target_string","title":"target_string <code>instance-attribute</code>","text":"<pre><code>target_string: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.target_const","title":"target_const <code>instance-attribute</code>","text":"<pre><code>target_const: bool | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.condition","title":"condition <code>instance-attribute</code>","text":"<pre><code>condition: InstructionCondition\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.declare_conditional","title":"declare_conditional <code>instance-attribute</code>","text":"<pre><code>declare_conditional: bool | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.declare_is_unconditional_jump","title":"declare_is_unconditional_jump <code>instance-attribute</code>","text":"<pre><code>declare_is_unconditional_jump: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.force_unconditional_jump_target","title":"force_unconditional_jump_target <code>instance-attribute</code>","text":"<pre><code>force_unconditional_jump_target: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.annotation","title":"annotation <code>instance-attribute</code>","text":"<pre><code>annotation: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.annotation_padding","title":"annotation_padding <code>instance-attribute</code>","text":"<pre><code>annotation_padding: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.syscall","title":"syscall <code>instance-attribute</code>","text":"<pre><code>syscall: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.syscall_name","title":"syscall_name <code>instance-attribute</code>","text":"<pre><code>syscall_name: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.causes_branch_delay","title":"causes_branch_delay <code>instance-attribute</code>","text":"<pre><code>causes_branch_delay: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.split","title":"split <code>instance-attribute</code>","text":"<pre><code>split: SplitType\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.emulated","title":"emulated <code>instance-attribute</code>","text":"<pre><code>emulated: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.call_like","title":"call_like <code>property</code>","text":"<pre><code>call_like: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.jump_like","title":"jump_like <code>property</code>","text":"<pre><code>jump_like: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.has_jump_target","title":"has_jump_target <code>property</code>","text":"<pre><code>has_jump_target: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.is_conditional_jump","title":"is_conditional_jump <code>property</code>","text":"<pre><code>is_conditional_jump: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.is_unconditional_jump","title":"is_unconditional_jump <code>property</code>","text":"<pre><code>is_unconditional_jump: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.is_conditional_jump_taken","title":"is_conditional_jump_taken <code>property</code>","text":"<pre><code>is_conditional_jump_taken: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.bytes","title":"bytes <code>property</code>","text":"<pre><code>bytes: bytearray\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.op_find","title":"op_find","text":"<pre><code>op_find(op_type: int, position: int) -> EnhancedOperand\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstruction.op_count","title":"op_count","text":"<pre><code>op_count(op_type: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl","title":"PwndbgInstructionImpl","text":"<pre><code>PwndbgInstructionImpl(cs_insn: CsInsn)\n</code></pre> <p> Bases: <code>PwndbgInstruction</code></p> <p>Methods:</p> <ul> <li> <code>op_find</code> \u2013 <p>Get the operand at position @position of all operands having the same type @op_type</p> </li> <li> <code>op_count</code> \u2013 <p>Return number of operands having same operand Capstone type 'op_type'</p> </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>cs_insn</code> (<code>CsInsn</code>) \u2013 <p>The underlying Capstone instruction object.</p> </li> <li> <code>address</code> (<code>int</code>) \u2013 </li> <li> <code>size</code> (<code>int</code>) \u2013 <p>Length of the instruction</p> </li> <li> <code>mnemonic</code> (<code>str</code>) \u2013 <p>Ex: 'MOV'</p> </li> <li> <code>op_str</code> (<code>str</code>) \u2013 <p>Ex: 'RAX, RDX'</p> </li> <li> <code>groups</code> (<code>set[int]</code>) \u2013 <p>Capstone instruction groups that we belong to.</p> </li> <li> <code>id</code> (<code>int</code>) \u2013 <p>The underlying Capstone ID for the instruction</p> </li> <li> <code>operands</code> (<code>list[EnhancedOperand]</code>) \u2013 </li> <li> <code>asm_string</code> (<code>str</code>) \u2013 <p>The full string representing the instruction - <code>mov rdi, rsp</code> with appropriate padding.</p> </li> <li> <code>next</code> (<code>int</code>) \u2013 <p>This is the address that the instruction pointer will be set to after using the \"nexti\" GDB command.</p> </li> <li> <code>target</code> (<code>int</code>) \u2013 <p>This is target of instructions that change the PC, regardless of if it's conditional or not,</p> </li> <li> <code>target_string</code> (<code>str | None</code>) \u2013 <p>String representation of the target address.</p> </li> <li> <code>target_const</code> (<code>bool | None</code>) \u2013 <p>Whether the target is a constant expression</p> </li> <li> <code>condition</code> (<code>InstructionCondition</code>) \u2013 <p>Does the condition that the instruction checks for pass?</p> </li> <li> <code>declare_conditional</code> (<code>bool | None</code>) \u2013 <p>This field is used to declare if the instruction is a conditional instruction.</p> </li> <li> <code>declare_is_unconditional_jump</code> (<code>bool</code>) \u2013 <p>This field is used to declare that this instruction is an unconditional jump.</p> </li> <li> <code>force_unconditional_jump_target</code> (<code>bool</code>) \u2013 <p>This asserts that the .target attribute is the real target of the instruction.</p> </li> <li> <code>annotation</code> (<code>str | None</code>) \u2013 <p>The string is set in the \"DisassemblyAssistant.enhance\" function.</p> </li> <li> <code>annotation_padding</code> (<code>int | None</code>) \u2013 <p>The left adjustment padding that was used to previously print this.</p> </li> <li> <code>syscall</code> (<code>int | None</code>) \u2013 <p>The syscall number for this instruction, if it is a syscall. Otherwise None.</p> </li> <li> <code>syscall_name</code> (<code>str | None</code>) \u2013 <p>The syscall name as a string</p> </li> <li> <code>causes_branch_delay</code> (<code>bool</code>) \u2013 <p>Whether or not this instruction has a single branch delay slot</p> </li> <li> <code>split</code> (<code>SplitType</code>) \u2013 <p>The type of split in the disasm display this instruction causes:</p> </li> <li> <code>emulated</code> (<code>bool</code>) \u2013 <p>If the enhancement successfully used emulation for this instruction</p> </li> <li> <code>call_like</code> (<code>bool</code>) \u2013 <p>True if this is a call-like instruction, meaning either it's a CALL or a branch and link.</p> </li> <li> <code>jump_like</code> (<code>bool</code>) \u2013 <p>True if this instruction is \"jump-like\", such as a JUMP, CALL, or RET.</p> </li> <li> <code>has_jump_target</code> (<code>bool</code>) \u2013 <p>True if we have determined that this instruction can explicitly change the program counter, and</p> </li> <li> <code>is_conditional_jump</code> (<code>bool</code>) \u2013 <p>True if this instruction can change the program counter conditionally.</p> </li> <li> <code>is_unconditional_jump</code> (<code>bool</code>) \u2013 <p>True if we know the instruction can change the program counter, and does so unconditionally.</p> </li> <li> <code>is_conditional_jump_taken</code> (<code>bool</code>) \u2013 <p>True if this is a conditional jump, and we predicted that we will take the jump</p> </li> <li> <code>bytes</code> (<code>bytearray</code>) \u2013 <p>Raw machine instruction bytes</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.cs_insn","title":"cs_insn <code>instance-attribute</code>","text":"<pre><code>cs_insn: CsInsn = cs_insn\n</code></pre> <p>The underlying Capstone instruction object. Only the enhancement code should access the 'cs_insn' property</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address: int = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.size","title":"size <code>instance-attribute</code>","text":"<pre><code>size: int = size\n</code></pre> <p>Length of the instruction</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.mnemonic","title":"mnemonic <code>instance-attribute</code>","text":"<pre><code>mnemonic: str = mnemonic\n</code></pre> <p>Ex: 'MOV'</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.op_str","title":"op_str <code>instance-attribute</code>","text":"<pre><code>op_str: str = op_str\n</code></pre> <p>Ex: 'RAX, RDX'</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.groups","title":"groups <code>instance-attribute</code>","text":"<pre><code>groups: set[int] = set(groups)\n</code></pre> <p>Capstone instruction groups that we belong to. Groups that apply to all architectures: CS_GRP_INVALID | CS_GRP_JUMP | CS_GRP_CALL | CS_GRP_RET | CS_GRP_INT | CS_GRP_IRET | CS_GRP_PRIVILEGE | CS_GRP_BRANCH_RELATIVE</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.id","title":"id <code>instance-attribute</code>","text":"<pre><code>id: int = id\n</code></pre> <p>The underlying Capstone ID for the instruction Examples: X86_INS_JMP, X86_INS_CALL, RISCV_INS_C_JAL</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.operands","title":"operands <code>instance-attribute</code>","text":"<pre><code>operands: list[EnhancedOperand] = [EnhancedOperand(op) for op in operands]\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.asm_string","title":"asm_string <code>instance-attribute</code>","text":"<pre><code>asm_string: str = f'{mnemonic} {op_str}'\n</code></pre> <p>The full string representing the instruction - <code>mov rdi, rsp</code> with appropriate padding.</p> <p>This is syntax highlighted during enhancement.</p> <p>This is additionally modified during enhancement for the purposes of replacing immediate values with their corresponding symbols</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.next","title":"next <code>instance-attribute</code>","text":"<pre><code>next: int = address + size\n</code></pre> <p>This is the address that the instruction pointer will be set to after using the \"nexti\" GDB command. This means it is the address of the next instruction to be executed in all cases except \"call\" instructions.</p> <p>Typically, it is <code>self.address + self.size</code> (the next instruction in memory)</p> <p>If it is a jump and we know it is taken, then it is the value of the jump target.</p> <p>Not set to \"call\" instruction targets, to indicate we will eventually (probably) return to this address</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.target","title":"target <code>instance-attribute</code>","text":"<pre><code>target: int = None\n</code></pre> <p>This is target of instructions that change the PC, regardless of if it's conditional or not, and whether or not we take the jump. This includes \"call\" and all other instructions that set the PC</p> <p>If the instruction is not one that changes the PC, target is set to \"next\"</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.target_string","title":"target_string <code>instance-attribute</code>","text":"<pre><code>target_string: str | None = None\n</code></pre> <p>String representation of the target address.</p> <p>Colorized symbol if a symbol exists at address, else colorized address</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.target_const","title":"target_const <code>instance-attribute</code>","text":"<pre><code>target_const: bool | None = None\n</code></pre> <p>Whether the target is a constant expression</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.condition","title":"condition <code>instance-attribute</code>","text":"<pre><code>condition: InstructionCondition = UNDETERMINED\n</code></pre> <p>Does the condition that the instruction checks for pass?</p> <p>For example, \"JNE\" jumps if Zero Flag is 0, else it does nothing. \"CMOVA\" conditionally performs a move depending on a flag. See 'condition' function in pwndbg.aglib.disasm.x86 for example on setting this.</p> <p>UNDETERMINED if we cannot reason about the condition, or if the instruction always executes unconditionally (most instructions).</p> <p>TRUE if the instruction has a conditional action, and we determine it is taken.</p> <p>FALSE if the instruction has a conditional action, and we know it is not taken.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.declare_conditional","title":"declare_conditional <code>instance-attribute</code>","text":"<pre><code>declare_conditional: bool | None = None\n</code></pre> <p>This field is used to declare if the instruction is a conditional instruction. In most cases, we can determine this purely based on the instruction ID, and this field is irrelevent. However, in some arches, like Arm, the same instruction can be made conditional by certain instruction attributes. Ex: Arm, <code>bls</code> instruction. This is encoded as a <code>b</code> (Capstone ID 11) under the code, with an additional condition code field. In this case, sometimes a <code>b</code> instruction (ID 11) is unconditional (always branches), in other cases it is conditional. We use this field to disambiguate these cases.</p> <p>True if we manually determine this instruction is a conditional instruction False if it's not a conditional instruction None if we don't have a determination (most cases)</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.declare_is_unconditional_jump","title":"declare_is_unconditional_jump <code>instance-attribute</code>","text":"<pre><code>declare_is_unconditional_jump: bool = False\n</code></pre> <p>This field is used to declare that this instruction is an unconditional jump. Most of the type, we depend on Capstone groups to check for jump instructions, but sometimes these are lacking, such as in the case of general-purpose instructions where the PC is the destination register, such as Arm <code>add</code>, <code>sub</code>, <code>ldr</code>, and <code>pop</code> instructions.</p> <p>In these cases, we want to forcefully state that this instruction mutates the PC, so we set this attribute to True.</p> <p>This helps in two cases: 1. Disassembly splits 2. Instructions like <code>stepuntilasm</code> work better, as they detect these as branches to stop at.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.force_unconditional_jump_target","title":"force_unconditional_jump_target <code>instance-attribute</code>","text":"<pre><code>force_unconditional_jump_target: bool = False\n</code></pre> <p>This asserts that the .target attribute is the real target of the instruction. This is only relevent in the edge case that the target is the next instruction in memory (address + size). The normal check for \"target\" checks that the target is NOT the next address in memory, and here we can assert that even if that is the case, we know that the jump really does just go to where self.target is.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.annotation","title":"annotation <code>instance-attribute</code>","text":"<pre><code>annotation: str | None = None\n</code></pre> <p>The string is set in the \"DisassemblyAssistant.enhance\" function. It is used in the disasm print view to add context to the instruction, mostly operand value. This string is not used for all cases - if the instruction is a call or a jump, the 'target'. variables is used instead. See 'pwndbg.color.disasm.instruction()' for specific usage.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.annotation_padding","title":"annotation_padding <code>instance-attribute</code>","text":"<pre><code>annotation_padding: int | None = None\n</code></pre> <p>The left adjustment padding that was used to previously print this. We retain it so the output is consistent between prints</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.syscall","title":"syscall <code>instance-attribute</code>","text":"<pre><code>syscall: int | None = None\n</code></pre> <p>The syscall number for this instruction, if it is a syscall. Otherwise None.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.syscall_name","title":"syscall_name <code>instance-attribute</code>","text":"<pre><code>syscall_name: str | None = None\n</code></pre> <p>The syscall name as a string</p> <p>Ex: \"openat\", \"read\"</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.causes_branch_delay","title":"causes_branch_delay <code>instance-attribute</code>","text":"<pre><code>causes_branch_delay: bool = False\n</code></pre> <p>Whether or not this instruction has a single branch delay slot</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.split","title":"split <code>instance-attribute</code>","text":"<pre><code>split: SplitType = NO_SPLIT\n</code></pre> <p>The type of split in the disasm display this instruction causes:</p> <pre><code>NO_SPLIT - no extra spacing between this and the next instruction\nBRANCH_TAKEN - a newline with an arrow pointing down\nBRANCH_NOT_TAKEN - an empty newline\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.emulated","title":"emulated <code>instance-attribute</code>","text":"<pre><code>emulated: bool = False\n</code></pre> <p>If the enhancement successfully used emulation for this instruction</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.call_like","title":"call_like <code>property</code>","text":"<pre><code>call_like: bool\n</code></pre> <p>True if this is a call-like instruction, meaning either it's a CALL or a branch and link.</p> <p>Checking for the CS_GRP_CALL is insufficient, as there are many \"branch and link\" instructions that are not labeled as a call</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.jump_like","title":"jump_like <code>property</code>","text":"<pre><code>jump_like: bool\n</code></pre> <p>True if this instruction is \"jump-like\", such as a JUMP, CALL, or RET. Basically, the PC is set to some target by means of this instruction.</p> <p>It may still be a conditional jump - this property does not indicate whether the jump is taken or not.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.has_jump_target","title":"has_jump_target <code>property</code>","text":"<pre><code>has_jump_target: bool\n</code></pre> <p>True if we have determined that this instruction can explicitly change the program counter, and we have determined the jump target.</p> <p>Edge case - the jump target MAY be the next address in memory - so we check force_unconditional_jump_target</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.is_conditional_jump","title":"is_conditional_jump <code>property</code>","text":"<pre><code>is_conditional_jump: bool\n</code></pre> <p>True if this instruction can change the program counter conditionally.</p> <p>This is used, in part, to determine if the instruction deserves a \"checkmark\" in the disasm view.</p> <p>This does not imply that we have resolved the .target</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.is_unconditional_jump","title":"is_unconditional_jump <code>property</code>","text":"<pre><code>is_unconditional_jump: bool\n</code></pre> <p>True if we know the instruction can change the program counter, and does so unconditionally.</p> <p>This includes things like RET, CALL, and JMP (in x86).</p> <p>This property is used in enhancement to determine certain codepaths when resolving .next for this instruction.</p> <p>This does not imply that we have resolved the .target</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.is_conditional_jump_taken","title":"is_conditional_jump_taken <code>property</code>","text":"<pre><code>is_conditional_jump_taken: bool\n</code></pre> <p>True if this is a conditional jump, and we predicted that we will take the jump</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.bytes","title":"bytes <code>property</code>","text":"<pre><code>bytes: bytearray\n</code></pre> <p>Raw machine instruction bytes</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.op_find","title":"op_find","text":"<pre><code>op_find(op_type: int, position: int) -> EnhancedOperand\n</code></pre> <p>Get the operand at position @position of all operands having the same type @op_type</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.op_count","title":"op_count","text":"<pre><code>op_count(op_type: int) -> int\n</code></pre> <p>Return number of operands having same operand Capstone type 'op_type'</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.PwndbgInstructionImpl.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand","title":"EnhancedOperand","text":"<pre><code>EnhancedOperand(cs_op)\n</code></pre> <p>Methods:</p> <ul> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>cs_op</code> (<code>Any</code>) \u2013 <p>Underlying Capstone operand. Takes on a different value depending on the architecture.</p> </li> <li> <code>before_value</code> (<code>int | None</code>) \u2013 <p>The value of the operand before the instruction executes.</p> </li> <li> <code>after_value</code> (<code>int | None</code>) \u2013 <p>The value of the operand after the instruction executes.</p> </li> <li> <code>before_value_resolved</code> (<code>int | None</code>) \u2013 <p>The 'resolved' value of the operand that is actually used in the instruction logic, before the instruction executes.</p> </li> <li> <code>before_value_no_modifiers</code> (<code>int | None</code>) \u2013 <p>This is a special field used in some architectures that allow operand modifiers, such as shifts and extends in Arm.</p> </li> <li> <code>after_value_resolved</code> (<code>int | None</code>) \u2013 <p>The 'resolved' value of the operand after the instruction executes.</p> </li> <li> <code>str</code> (<code>str | None</code>) \u2013 <p>String representing the operand</p> </li> <li> <code>symbol</code> (<code>str | None</code>) \u2013 <p>Colorized symbol name for this operand, if .before_value is set and symbol exists, else None.</p> </li> <li> <code>type</code> (<code>int</code>) \u2013 <p>CS_OP_REG | CS_OP_MEM | CS_OP_IMM | CS_OP_INVALID | CS_OP_FP</p> </li> <li> <code>reg</code> (<code>int</code>) \u2013 <p>The underlying Capstone ID for the register</p> </li> <li> <code>imm</code> (<code>int</code>) \u2013 <p>The immediate value of the operand (if applicable)</p> </li> <li> <code>mem</code> (<code>Any</code>) \u2013 <p>Return the underlying Capstone mem object (if applicable)</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.cs_op","title":"cs_op <code>instance-attribute</code>","text":"<pre><code>cs_op: Any = cs_op\n</code></pre> <p>Underlying Capstone operand. Takes on a different value depending on the architecture.</p> <p>x86 = capstone.x86.X86Op, arm = capstone.arm.ArmOp, mips = capstone.mips.MipsOp</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.before_value","title":"before_value <code>instance-attribute</code>","text":"<pre><code>before_value: int | None = None\n</code></pre> <p>The value of the operand before the instruction executes. This is set only if the operand value can be reasoned about.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.after_value","title":"after_value <code>instance-attribute</code>","text":"<pre><code>after_value: int | None = None\n</code></pre> <p>The value of the operand after the instruction executes. Only set when using emulation.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.before_value_resolved","title":"before_value_resolved <code>instance-attribute</code>","text":"<pre><code>before_value_resolved: int | None = None\n</code></pre> <p>The 'resolved' value of the operand that is actually used in the instruction logic, before the instruction executes. This is the same as before_value if it's not a memory operand, in which cases it's the dereferenced value.</p> <p>Helpful for cases like <code>cmp byte ptr [rip + 0x166669], 0</code>, where first operand could be a register or a memory value to dereference, and we want the actual value used.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.before_value_no_modifiers","title":"before_value_no_modifiers <code>instance-attribute</code>","text":"<pre><code>before_value_no_modifiers: int | None = None\n</code></pre> <p>This is a special field used in some architectures that allow operand modifiers, such as shifts and extends in Arm. Capstone bundles the modifier with the operand, and when we are resolving concrete operand values, we apply the modifier. However, in some annotations we need to un-modified raw register value, which is what this field is for.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.after_value_resolved","title":"after_value_resolved <code>instance-attribute</code>","text":"<pre><code>after_value_resolved: int | None = None\n</code></pre> <p>The 'resolved' value of the operand after the instruction executes.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.str","title":"str <code>instance-attribute</code>","text":"<pre><code>str: str | None = ''\n</code></pre> <p>String representing the operand</p> <p>Ex: \"RAX\", or \"[0x7fffffffd9e8]\". None if value cannot be determined.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.symbol","title":"symbol <code>instance-attribute</code>","text":"<pre><code>symbol: str | None = None\n</code></pre> <p>Colorized symbol name for this operand, if .before_value is set and symbol exists, else None.</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.type","title":"type <code>property</code>","text":"<pre><code>type: int\n</code></pre> <p>CS_OP_REG | CS_OP_MEM | CS_OP_IMM | CS_OP_INVALID | CS_OP_FP</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.reg","title":"reg <code>property</code>","text":"<pre><code>reg: int\n</code></pre> <p>The underlying Capstone ID for the register</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.imm","title":"imm <code>property</code>","text":"<pre><code>imm: int\n</code></pre> <p>The immediate value of the operand (if applicable)</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.mem","title":"mem <code>property</code>","text":"<pre><code>mem: Any\n</code></pre> <p>Return the underlying Capstone mem object (if applicable)</p>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.EnhancedOperand.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction","title":"ManualPwndbgInstruction","text":"<pre><code>ManualPwndbgInstruction(address: int)\n</code></pre> <p> Bases: <code>PwndbgInstruction</code></p> <p>GDB/LLDB's built-in disassemblers.</p> <p>Instances of this class do not go through the 'enhancement' process due to lacking important information provided by Capstone. As a result of this, some of the methods raise NotImplementedError, because if they are called it indicates a bug elsewhere in the codebase.</p> <p>Methods:</p> <ul> <li> <code>op_find</code> \u2013 </li> <li> <code>op_count</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>cs_insn</code> (<code>CsInsn</code>) \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>mnemonic</code> \u2013 </li> <li> <code>op_str</code> \u2013 </li> <li> <code>groups</code> \u2013 </li> <li> <code>id</code> \u2013 </li> <li> <code>operands</code> \u2013 </li> <li> <code>asm_string</code> \u2013 </li> <li> <code>next</code> \u2013 </li> <li> <code>target</code> \u2013 </li> <li> <code>target_string</code> \u2013 </li> <li> <code>target_const</code> \u2013 </li> <li> <code>condition</code> \u2013 </li> <li> <code>declare_conditional</code> \u2013 </li> <li> <code>declare_is_unconditional_jump</code> \u2013 </li> <li> <code>force_unconditional_jump_target</code> \u2013 </li> <li> <code>annotation</code> \u2013 </li> <li> <code>annotation_padding</code> \u2013 </li> <li> <code>syscall</code> \u2013 </li> <li> <code>syscall_name</code> \u2013 </li> <li> <code>causes_branch_delay</code> \u2013 </li> <li> <code>split</code> \u2013 </li> <li> <code>emulated</code> \u2013 </li> <li> <code>bytes</code> (<code>bytearray</code>) \u2013 </li> <li> <code>call_like</code> (<code>bool</code>) \u2013 </li> <li> <code>jump_like</code> (<code>bool</code>) \u2013 </li> <li> <code>has_jump_target</code> (<code>bool</code>) \u2013 </li> <li> <code>is_conditional_jump</code> (<code>bool</code>) \u2013 </li> <li> <code>is_unconditional_jump</code> (<code>bool</code>) \u2013 </li> <li> <code>is_conditional_jump_taken</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.cs_insn","title":"cs_insn <code>instance-attribute</code>","text":"<pre><code>cs_insn: CsInsn = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.size","title":"size <code>instance-attribute</code>","text":"<pre><code>size = ins['length']\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.mnemonic","title":"mnemonic <code>instance-attribute</code>","text":"<pre><code>mnemonic = strip()\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.op_str","title":"op_str <code>instance-attribute</code>","text":"<pre><code>op_str = strip() if len(asm) > 1 else ''\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.groups","title":"groups <code>instance-attribute</code>","text":"<pre><code>groups = set()\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.id","title":"id <code>instance-attribute</code>","text":"<pre><code>id = -1\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.operands","title":"operands <code>instance-attribute</code>","text":"<pre><code>operands = []\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.asm_string","title":"asm_string <code>instance-attribute</code>","text":"<pre><code>asm_string = f'{mnemonic} {op_str}'\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.next","title":"next <code>instance-attribute</code>","text":"<pre><code>next = address + size\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.target","title":"target <code>instance-attribute</code>","text":"<pre><code>target = next\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.target_string","title":"target_string <code>instance-attribute</code>","text":"<pre><code>target_string = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.target_const","title":"target_const <code>instance-attribute</code>","text":"<pre><code>target_const = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.condition","title":"condition <code>instance-attribute</code>","text":"<pre><code>condition = UNDETERMINED\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.declare_conditional","title":"declare_conditional <code>instance-attribute</code>","text":"<pre><code>declare_conditional = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.declare_is_unconditional_jump","title":"declare_is_unconditional_jump <code>instance-attribute</code>","text":"<pre><code>declare_is_unconditional_jump = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.force_unconditional_jump_target","title":"force_unconditional_jump_target <code>instance-attribute</code>","text":"<pre><code>force_unconditional_jump_target = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.annotation","title":"annotation <code>instance-attribute</code>","text":"<pre><code>annotation = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.annotation_padding","title":"annotation_padding <code>instance-attribute</code>","text":"<pre><code>annotation_padding = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.syscall","title":"syscall <code>instance-attribute</code>","text":"<pre><code>syscall = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.syscall_name","title":"syscall_name <code>instance-attribute</code>","text":"<pre><code>syscall_name = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.causes_branch_delay","title":"causes_branch_delay <code>instance-attribute</code>","text":"<pre><code>causes_branch_delay = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.split","title":"split <code>instance-attribute</code>","text":"<pre><code>split = NO_SPLIT\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.emulated","title":"emulated <code>instance-attribute</code>","text":"<pre><code>emulated = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.bytes","title":"bytes <code>property</code>","text":"<pre><code>bytes: bytearray\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.call_like","title":"call_like <code>property</code>","text":"<pre><code>call_like: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.jump_like","title":"jump_like <code>property</code>","text":"<pre><code>jump_like: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.has_jump_target","title":"has_jump_target <code>property</code>","text":"<pre><code>has_jump_target: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.is_conditional_jump","title":"is_conditional_jump <code>property</code>","text":"<pre><code>is_conditional_jump: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.is_unconditional_jump","title":"is_unconditional_jump <code>property</code>","text":"<pre><code>is_unconditional_jump: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.is_conditional_jump_taken","title":"is_conditional_jump_taken <code>property</code>","text":"<pre><code>is_conditional_jump_taken: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.op_find","title":"op_find","text":"<pre><code>op_find(op_type: int, position: int) -> EnhancedOperand\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.ManualPwndbgInstruction.op_count","title":"op_count","text":"<pre><code>op_count(op_type: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/#pwndbg.aglib.disasm.instruction.boolean_to_instruction_condition","title":"boolean_to_instruction_condition","text":"<pre><code>boolean_to_instruction_condition(condition: bool) -> InstructionCondition\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/","title":"pwndbg.aglib.disasm.mips","text":""},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips","title":"mips","text":"<p>Classes:</p> <ul> <li> <code>DisassemblyAssistant</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>BRANCH_LIKELY_INSTRUCTIONS</code> \u2013 </li> <li> <code>CONDITION_RESOLVERS</code> (<code>dict[int, Callable[[list[int]], bool]]</code>) \u2013 </li> <li> <code>MIPS_SIMPLE_DESTINATION_INSTRUCTIONS</code> \u2013 </li> <li> <code>MIPS_LOAD_INSTRUCTIONS</code> \u2013 </li> <li> <code>MIPS_STORE_INSTRUCTIONS</code> \u2013 </li> <li> <code>MIPS_BINARY_OPERATIONS</code> \u2013 </li> <li> <code>assistant</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.BRANCH_LIKELY_INSTRUCTIONS","title":"BRANCH_LIKELY_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>BRANCH_LIKELY_INSTRUCTIONS = {\n MIPS_INS_BC0TL,\n MIPS_INS_BC1TL,\n MIPS_INS_BC0FL,\n MIPS_INS_BC1FL,\n MIPS_INS_BEQL,\n MIPS_INS_BGEZALL,\n MIPS_INS_BGEZL,\n MIPS_INS_BGTZL,\n MIPS_INS_BLEZL,\n MIPS_INS_BLTZALL,\n MIPS_INS_BLTZL,\n MIPS_INS_BNEL,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.CONDITION_RESOLVERS","title":"CONDITION_RESOLVERS <code>module-attribute</code>","text":"<pre><code>CONDITION_RESOLVERS: dict[int, Callable[[list[int]], bool]] = {\n MIPS_INS_BEQZ: lambda ops: ops[0] == 0,\n MIPS_INS_BNEZ: lambda ops: ops[0] != 0,\n MIPS_INS_BEQ: lambda ops: ops[0] == ops[1],\n MIPS_INS_BNE: lambda ops: ops[0] != ops[1],\n MIPS_INS_BGEZ: lambda ops: to_signed(ops[0], ptrsize * 8) >= 0,\n MIPS_INS_BGEZAL: lambda ops: to_signed(ops[0], ptrsize * 8) >= 0,\n MIPS_INS_BGTZ: lambda ops: to_signed(ops[0], ptrsize * 8) > 0,\n MIPS_INS_BLEZ: lambda ops: to_signed(ops[0], ptrsize * 8) <= 0,\n MIPS_INS_BLTZAL: lambda ops: to_signed(ops[0], ptrsize * 8) < 0,\n MIPS_INS_BLTZ: lambda ops: to_signed(ops[0], ptrsize * 8) < 0,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MIPS_SIMPLE_DESTINATION_INSTRUCTIONS","title":"MIPS_SIMPLE_DESTINATION_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>MIPS_SIMPLE_DESTINATION_INSTRUCTIONS = {\n MIPS_INS_CLO,\n MIPS_INS_CLZ,\n MIPS_INS_DCLO,\n MIPS_INS_DCLZ,\n MIPS_INS_LSA,\n MIPS_INS_DLSA,\n MIPS_INS_MFHI,\n MIPS_INS_MFLO,\n MIPS_INS_SEB,\n MIPS_INS_SEH,\n MIPS_INS_WSBH,\n MIPS_INS_SLT,\n MIPS_INS_SLTI,\n MIPS_INS_SLTIU,\n MIPS_INS_SLTU,\n MIPS_INS_MOVN,\n MIPS_INS_LDL,\n MIPS_INS_LDR,\n MIPS_INS_LWL,\n MIPS_INS_LWR,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MIPS_LOAD_INSTRUCTIONS","title":"MIPS_LOAD_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>MIPS_LOAD_INSTRUCTIONS = {\n MIPS_INS_LB: -1,\n MIPS_INS_LBU: 1,\n MIPS_INS_LH: -2,\n MIPS_INS_LHU: 2,\n MIPS_INS_LW: -4,\n MIPS_INS_LWU: 4,\n MIPS_INS_LWPC: -4,\n MIPS_INS_LWUPC: 4,\n MIPS_INS_LD: -8,\n MIPS_INS_LDPC: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MIPS_STORE_INSTRUCTIONS","title":"MIPS_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>MIPS_STORE_INSTRUCTIONS = {\n MIPS_INS_SB: 1,\n MIPS_INS_SH: 2,\n MIPS_INS_SW: 4,\n MIPS_INS_SD: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MIPS_BINARY_OPERATIONS","title":"MIPS_BINARY_OPERATIONS <code>module-attribute</code>","text":"<pre><code>MIPS_BINARY_OPERATIONS = {\n MIPS_INS_ADD: \"+\",\n MIPS_INS_ADDI: \"+\",\n MIPS_INS_ADDIU: \"+\",\n MIPS_INS_ADDU: \"+\",\n MIPS_INS_DADD: \"+\",\n MIPS_INS_DADDI: \"+\",\n MIPS_INS_DADDIU: \"+\",\n MIPS_INS_DADDU: \"+\",\n MIPS_INS_SUB: \"-\",\n MIPS_INS_SUBU: \"-\",\n MIPS_INS_DSUB: \"-\",\n MIPS_INS_DSUBU: \"-\",\n MIPS_INS_ANDI: \"&\",\n MIPS_INS_AND: \"&\",\n MIPS_INS_ORI: \"|\",\n MIPS_INS_OR: \"|\",\n MIPS_INS_XOR: \"^\",\n MIPS_INS_XORI: \"^\",\n MIPS_INS_SLL: \"<<\",\n MIPS_INS_SLLV: \"<<\",\n MIPS_INS_DSLL: \"<<\",\n MIPS_INS_DSLLV: \"<<\",\n MIPS_INS_SRL: \">>\",\n MIPS_INS_SRLV: \">>\",\n MIPS_INS_DSRL: \">>\",\n MIPS_INS_DSRLV: \">>\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.assistant","title":"assistant <code>module-attribute</code>","text":"<pre><code>assistant = DisassemblyAssistant('mips')\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant","title":"DisassemblyAssistant","text":"<pre><code>DisassemblyAssistant(architecture: str)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>for_current_arch</code> \u2013 </li> <li> <code>enhance</code> \u2013 </li> <li> <code>can_reason_about_process_state</code> \u2013 <p>Determine if the program counter of the process equals the address of the instruction being enhanced.</p> </li> <li> <code>dump</code> \u2013 <p>Debug-only method.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>annotation_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, Emulator], None]]</code>) \u2013 </li> <li> <code>assistants</code> (<code>dict[str, DisassemblyAssistant]</code>) \u2013 </li> <li> <code>op_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]]</code>) \u2013 </li> <li> <code>op_names</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.annotation_handlers","title":"annotation_handlers <code>instance-attribute</code>","text":"<pre><code>annotation_handlers: dict[\n int, Callable[[PwndbgInstruction, Emulator], None]\n] = {\n MIPS_INS_MOVE: _common_move_annotator,\n MIPS_INS_LI: _common_move_annotator,\n MIPS_INS_LUI: _lui_annotator,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.assistants","title":"assistants <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>assistants: dict[str, DisassemblyAssistant] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.op_handlers","title":"op_handlers <code>instance-attribute</code>","text":"<pre><code>op_handlers: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]\n] = {\n CS_OP_IMM: _parse_immediate,\n CS_OP_REG: _parse_register,\n CS_OP_MEM: _parse_memory,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.op_names","title":"op_names <code>instance-attribute</code>","text":"<pre><code>op_names: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]\n] = {\n CS_OP_IMM: _immediate_string,\n CS_OP_REG: _register_string,\n CS_OP_MEM: _memory_string,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.for_current_arch","title":"for_current_arch <code>staticmethod</code>","text":"<pre><code>for_current_arch() -> DisassemblyAssistant\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.enhance","title":"enhance <code>staticmethod</code>","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -> bool\n</code></pre> <p>Determine if the program counter of the process equals the address of the instruction being enhanced. If so, it means we can safely reason and read from registers and memory to enhance values that we can add to the annotation string. This becomes relevent when NOT emulating, and is meant to allow more details when the PC is at the instruction being enhanced</p>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/ppc/","title":"pwndbg.aglib.disasm.ppc","text":""},{"location":"reference/pwndbg/aglib/disasm/ppc/#pwndbg.aglib.disasm.ppc","title":"ppc","text":""},{"location":"reference/pwndbg/aglib/disasm/riscv/","title":"pwndbg.aglib.disasm.riscv","text":""},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv","title":"riscv","text":"<p>Classes:</p> <ul> <li> <code>DisassemblyAssistant</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>RISCV_LOAD_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_COMPRESSED_LOAD_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_STORE_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_COMPRESSED_STORE_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_MATH_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_EMULATED_ANNOTATIONS</code> \u2013 </li> <li> <code>assistant_rv32</code> \u2013 </li> <li> <code>assistant_rv64</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCV_LOAD_INSTRUCTIONS","title":"RISCV_LOAD_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>RISCV_LOAD_INSTRUCTIONS = {\n RISCV_INS_LB: -1,\n RISCV_INS_LH: -2,\n RISCV_INS_LW: -4,\n RISCV_INS_LBU: 1,\n RISCV_INS_LHU: 2,\n RISCV_INS_LWU: 4,\n RISCV_INS_LD: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCV_COMPRESSED_LOAD_INSTRUCTIONS","title":"RISCV_COMPRESSED_LOAD_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>RISCV_COMPRESSED_LOAD_INSTRUCTIONS = {\n RISCV_INS_C_LW: -4,\n RISCV_INS_C_LD: 8,\n RISCV_INS_C_LDSP: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCV_STORE_INSTRUCTIONS","title":"RISCV_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>RISCV_STORE_INSTRUCTIONS = {\n RISCV_INS_SB: 1,\n RISCV_INS_SH: 2,\n RISCV_INS_SW: 4,\n RISCV_INS_SD: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCV_COMPRESSED_STORE_INSTRUCTIONS","title":"RISCV_COMPRESSED_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>RISCV_COMPRESSED_STORE_INSTRUCTIONS = {\n RISCV_INS_C_SW: 4,\n RISCV_INS_C_SWSP: 4,\n RISCV_INS_C_SD: 8,\n RISCV_INS_C_SDSP: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCV_MATH_INSTRUCTIONS","title":"RISCV_MATH_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>RISCV_MATH_INSTRUCTIONS = {\n RISCV_INS_ADDI: \"+\",\n RISCV_INS_ADD: \"+\",\n RISCV_INS_C_ADDI: \"+\",\n RISCV_INS_C_ADD: \"+\",\n RISCV_INS_SUB: \"-\",\n RISCV_INS_C_SUB: \"-\",\n RISCV_INS_XORI: \"^\",\n RISCV_INS_XOR: \"^\",\n RISCV_INS_C_XOR: \"^\",\n RISCV_INS_ORI: \"|\",\n RISCV_INS_OR: \"|\",\n RISCV_INS_C_OR: \"|\",\n RISCV_INS_ANDI: \"&\",\n RISCV_INS_C_ANDI: \"&\",\n RISCV_INS_AND: \"&\",\n RISCV_INS_C_AND: \"&\",\n RISCV_INS_SLLI: \"<<\",\n RISCV_INS_C_SLLI: \"<<\",\n RISCV_INS_SLL: \"<<\",\n RISCV_INS_SRLI: \">>\",\n RISCV_INS_C_SRLI: \">>\",\n RISCV_INS_SRL: \">>\",\n RISCV_INS_SRAI: \">>s\",\n RISCV_INS_C_SRAI: \">>s\",\n RISCV_INS_SRA: \">>s\",\n RISCV_INS_MUL: \"*\",\n RISCV_INS_MULH: \"*\",\n RISCV_INS_MULHSU: \"*\",\n RISCV_INS_MULHU: \"*\",\n RISCV_INS_DIV: \"/\",\n RISCV_INS_DIVU: \"/\",\n RISCV_INS_REM: \"%\",\n RISCV_INS_REMU: \"%\",\n RISCV_INS_C_ADDI4SPN: \"+\",\n RISCV_INS_C_ADDI16SP: \"+\",\n RISCV_INS_ADDIW: \"+\",\n RISCV_INS_ADDW: \"+\",\n RISCV_INS_SUBW: \"-\",\n RISCV_INS_SLLIW: \"<<\",\n RISCV_INS_SLLW: \"<<\",\n RISCV_INS_SRLIW: \">>\",\n RISCV_INS_SRLW: \">>\",\n RISCV_INS_SRAIW: \">>s\",\n RISCV_INS_SRAW: \">>s\",\n RISCV_INS_MULW: \"*\",\n RISCV_INS_DIVW: \"/\",\n RISCV_INS_DIVUW: \"/\",\n RISCV_INS_REMW: \"%\",\n RISCV_INS_REMUW: \"%\",\n RISCV_INS_C_ADDIW: \"+\",\n RISCV_INS_C_ADDW: \"+\",\n RISCV_INS_C_SUBW: \"-\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCV_EMULATED_ANNOTATIONS","title":"RISCV_EMULATED_ANNOTATIONS <code>module-attribute</code>","text":"<pre><code>RISCV_EMULATED_ANNOTATIONS = {\n RISCV_INS_SLT,\n RISCV_INS_SLTU,\n RISCV_INS_SLTI,\n RISCV_INS_SLTIU,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.assistant_rv32","title":"assistant_rv32 <code>module-attribute</code>","text":"<pre><code>assistant_rv32 = DisassemblyAssistant('rv32')\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.assistant_rv64","title":"assistant_rv64 <code>module-attribute</code>","text":"<pre><code>assistant_rv64 = DisassemblyAssistant('rv64')\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant","title":"DisassemblyAssistant","text":"<pre><code>DisassemblyAssistant(architecture)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>for_current_arch</code> \u2013 </li> <li> <code>enhance</code> \u2013 </li> <li> <code>can_reason_about_process_state</code> \u2013 <p>Determine if the program counter of the process equals the address of the instruction being enhanced.</p> </li> <li> <code>dump</code> \u2013 <p>Debug-only method.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>architecture</code> \u2013 </li> <li> <code>annotation_handlers</code> (<code>Dict[int, Callable[[PwndbgInstruction, Emulator], None]]</code>) \u2013 </li> <li> <code>assistants</code> (<code>dict[str, DisassemblyAssistant]</code>) \u2013 </li> <li> <code>op_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]]</code>) \u2013 </li> <li> <code>op_names</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.architecture","title":"architecture <code>instance-attribute</code>","text":"<pre><code>architecture = architecture\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.annotation_handlers","title":"annotation_handlers <code>instance-attribute</code>","text":"<pre><code>annotation_handlers: Dict[\n int, Callable[[PwndbgInstruction, Emulator], None]\n] = {\n RISCV_INS_AUIPC: _auipc_annotator,\n RISCV_INS_C_MV: _common_move_annotator,\n RISCV_INS_C_LI: _common_move_annotator,\n RISCV_INS_LUI: _lui_annotator,\n RISCV_INS_C_LUI: _lui_annotator,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.assistants","title":"assistants <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>assistants: dict[str, DisassemblyAssistant] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.op_handlers","title":"op_handlers <code>instance-attribute</code>","text":"<pre><code>op_handlers: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]\n] = {\n CS_OP_IMM: _parse_immediate,\n CS_OP_REG: _parse_register,\n CS_OP_MEM: _parse_memory,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.op_names","title":"op_names <code>instance-attribute</code>","text":"<pre><code>op_names: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]\n] = {\n CS_OP_IMM: _immediate_string,\n CS_OP_REG: _register_string,\n CS_OP_MEM: _memory_string,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.for_current_arch","title":"for_current_arch <code>staticmethod</code>","text":"<pre><code>for_current_arch() -> DisassemblyAssistant\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.enhance","title":"enhance <code>staticmethod</code>","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -> bool\n</code></pre> <p>Determine if the program counter of the process equals the address of the instruction being enhanced. If so, it means we can safely reason and read from registers and memory to enhance values that we can add to the annotation string. This becomes relevent when NOT emulating, and is meant to allow more details when the PC is at the instruction being enhanced</p>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/sparc/","title":"pwndbg.aglib.disasm.sparc","text":""},{"location":"reference/pwndbg/aglib/disasm/sparc/#pwndbg.aglib.disasm.sparc","title":"sparc","text":"<p>Attributes:</p> <ul> <li> <code>SPARC_LOAD_INSTRUCTIONS</code> \u2013 </li> <li> <code>SPARC_STORE_INSTRUCTIONS</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/sparc/#pwndbg.aglib.disasm.sparc.SPARC_LOAD_INSTRUCTIONS","title":"SPARC_LOAD_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>SPARC_LOAD_INSTRUCTIONS = {\n SPARC_INS_LDUB: 1,\n SPARC_INS_LDSB: 1,\n SPARC_INS_LDUH: 2,\n SPARC_INS_LDSH: 2,\n SPARC_INS_LD: 4,\n SPARC_INS_LDD: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/sparc/#pwndbg.aglib.disasm.sparc.SPARC_STORE_INSTRUCTIONS","title":"SPARC_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>SPARC_STORE_INSTRUCTIONS = {\n SPARC_INS_STB: 1,\n SPARC_INS_STH: 2,\n SPARC_INS_ST: 4,\n SPARC_INS_STD: 8,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/","title":"pwndbg.aglib.disasm.x86","text":""},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86","title":"x86","text":"<p>Classes:</p> <ul> <li> <code>DisassemblyAssistant</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>groups</code> \u2013 </li> <li> <code>ops</code> \u2013 </li> <li> <code>regs</code> \u2013 </li> <li> <code>access</code> \u2013 </li> <li> <code>X86_MATH_INSTRUCTIONS</code> \u2013 </li> <li> <code>assistant</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.groups","title":"groups <code>module-attribute</code>","text":"<pre><code>groups = {v: _9for (k, v) in items() if startswith('X86_GRP_')}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.ops","title":"ops <code>module-attribute</code>","text":"<pre><code>ops = {v: _Tfor (k, v) in items() if startswith('X86_OP_')}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.regs","title":"regs <code>module-attribute</code>","text":"<pre><code>regs = {v: _xfor (k, v) in items() if startswith('X86_REG_')}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.access","title":"access <code>module-attribute</code>","text":"<pre><code>access = {v: _Wfor (k, v) in items() if startswith('CS_AC_')}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86_MATH_INSTRUCTIONS","title":"X86_MATH_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>X86_MATH_INSTRUCTIONS = {\n X86_INS_ADD: \"+\",\n X86_INS_SUB: \"-\",\n X86_INS_AND: \"&\",\n X86_INS_OR: \"|\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.assistant","title":"assistant <code>module-attribute</code>","text":"<pre><code>assistant = DisassemblyAssistant('x86-64')\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant","title":"DisassemblyAssistant","text":"<pre><code>DisassemblyAssistant(architecture: str)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>handle_mov</code> \u2013 </li> <li> <code>handle_vmovaps</code> \u2013 </li> <li> <code>handle_lea</code> \u2013 </li> <li> <code>handle_xchg</code> \u2013 </li> <li> <code>handle_pop</code> \u2013 </li> <li> <code>handle_xor</code> \u2013 </li> <li> <code>handle_inc</code> \u2013 </li> <li> <code>handle_dec</code> \u2013 </li> <li> <code>memory_string_with_components_resolved</code> \u2013 </li> <li> <code>for_current_arch</code> \u2013 </li> <li> <code>enhance</code> \u2013 </li> <li> <code>can_reason_about_process_state</code> \u2013 <p>Determine if the program counter of the process equals the address of the instruction being enhanced.</p> </li> <li> <code>dump</code> \u2013 <p>Debug-only method.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>annotation_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, Emulator], None]]</code>) \u2013 </li> <li> <code>assistants</code> (<code>dict[str, DisassemblyAssistant]</code>) \u2013 </li> <li> <code>op_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]]</code>) \u2013 </li> <li> <code>op_names</code> (<code>dict[int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.annotation_handlers","title":"annotation_handlers <code>instance-attribute</code>","text":"<pre><code>annotation_handlers: dict[\n int, Callable[[PwndbgInstruction, Emulator], None]\n] = {\n X86_INS_MOV: handle_mov,\n X86_INS_MOVABS: handle_mov,\n X86_INS_MOVZX: handle_mov,\n X86_INS_MOVD: handle_mov,\n X86_INS_MOVQ: handle_mov,\n X86_INS_MOVSXD: handle_mov,\n X86_INS_MOVSX: handle_mov,\n X86_INS_MOVAPS: handle_vmovaps,\n X86_INS_VMOVAPS: handle_vmovaps,\n X86_INS_LEA: handle_lea,\n X86_INS_XCHG: handle_xchg,\n X86_INS_POP: handle_pop,\n X86_INS_CMP: _common_cmp_annotator_builder(\"eflags\", \"-\"),\n X86_INS_TEST: _common_cmp_annotator_builder(\"eflags\", \"&\"),\n X86_INS_XOR: handle_xor,\n X86_INS_INC: handle_inc,\n X86_INS_DEC: handle_dec,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.assistants","title":"assistants <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>assistants: dict[str, DisassemblyAssistant] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.op_handlers","title":"op_handlers <code>instance-attribute</code>","text":"<pre><code>op_handlers: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand, Emulator], int | None]\n] = {\n CS_OP_IMM: _parse_immediate,\n CS_OP_REG: _parse_register,\n CS_OP_MEM: _parse_memory,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.op_names","title":"op_names <code>instance-attribute</code>","text":"<pre><code>op_names: dict[\n int, Callable[[PwndbgInstruction, EnhancedOperand], str | None]\n] = {\n CS_OP_IMM: _immediate_string,\n CS_OP_REG: _register_string,\n CS_OP_MEM: _memory_string,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_mov","title":"handle_mov","text":"<pre><code>handle_mov(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_vmovaps","title":"handle_vmovaps","text":"<pre><code>handle_vmovaps(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_lea","title":"handle_lea","text":"<pre><code>handle_lea(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_xchg","title":"handle_xchg","text":"<pre><code>handle_xchg(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_pop","title":"handle_pop","text":"<pre><code>handle_pop(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_xor","title":"handle_xor","text":"<pre><code>handle_xor(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_inc","title":"handle_inc","text":"<pre><code>handle_inc(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.handle_dec","title":"handle_dec","text":"<pre><code>handle_dec(instruction: PwndbgInstruction, emu: Emulator) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.memory_string_with_components_resolved","title":"memory_string_with_components_resolved","text":"<pre><code>memory_string_with_components_resolved(\n instruction: PwndbgInstruction, op: EnhancedOperand\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.for_current_arch","title":"for_current_arch <code>staticmethod</code>","text":"<pre><code>for_current_arch() -> DisassemblyAssistant\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.enhance","title":"enhance <code>staticmethod</code>","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -> bool\n</code></pre> <p>Determine if the program counter of the process equals the address of the instruction being enhanced. If so, it means we can safely reason and read from registers and memory to enhance values that we can add to the annotation string. This becomes relevent when NOT emulating, and is meant to allow more details when the PC is at the instruction being enhanced</p>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/dt/","title":"pwndbg.aglib.dt","text":""},{"location":"reference/pwndbg/aglib/dt/#pwndbg.aglib.dt","title":"dt","text":"<p>Prints structures in a manner similar to Windbg's \"dt\" command.</p> <p>Functions:</p> <ul> <li> <code>dt</code> \u2013 <p>Dump out a structure type Windbg style.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/dt/#pwndbg.aglib.dt.dt","title":"dt","text":"<pre><code>dt(\n name: str = \"\", addr: int | Value | None = None, obj: Value | None = None\n) -> str\n</code></pre> <p>Dump out a structure type Windbg style.</p>"},{"location":"reference/pwndbg/aglib/dynamic/","title":"pwndbg.aglib.dynamic","text":""},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic","title":"dynamic","text":"<p>Dynamic linking interface.</p> <p>This module provides an interface to analyze various aspects of dynamically linked programs.</p> <p>It also defines a hook that watches for changes to the link map communicated by ld.so, and exposes an event that other parts of pwndbg can tap into, but one that may have a somewhat obtuse beahvior, due to limitations in GDB. See <code>r_debug_install_link_map_changed_hook</code> for more information.</p> <p>Classes:</p> <ul> <li> <code>LinkMapEntry</code> \u2013 <p>An entry in the link map.</p> </li> <li> <code>DynamicSegment</code> \u2013 <p>Parser for the DYNAMIC segment present in a binary image.</p> </li> <li> <code>CStruct</code> \u2013 <p>Utility class for reading fields off of C structs.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>is_dynamic</code> \u2013 <p>Returns whether the current inferior is dynamic.</p> </li> <li> <code>r_debug_link_map_changed_hook</code> \u2013 <p>Hook that gets activated whenever the link map changes.</p> </li> <li> <code>r_debug_install_link_map_changed_hook</code> \u2013 <p>Installs the r_debug-based hook to the change event of the link map.</p> </li> <li> <code>r_debug_link_map_changed_add_listener</code> \u2013 <p>Install a callback to be called whenever r_debug signal of there being a</p> </li> <li> <code>r_debug_link_map_changed_remove_listener</code> \u2013 <p>Removes a listener previously installed with</p> </li> <li> <code>link_map_head</code> \u2013 <p>Acquires a reference to the head entry of the link map.</p> </li> <li> <code>link_map</code> \u2013 <p>Iterator over all the entries in the link map.</p> </li> <li> <code>elf32_r_sym</code> \u2013 <p>Returns the r_sym portion of the r_info relocation field for ELF32.</p> </li> <li> <code>elf32_r_type</code> \u2013 <p>Returns the r_type portion of the r_info relocation field for ELF32.</p> </li> <li> <code>elf64_r_sym</code> \u2013 <p>Returns the r_sym portion of the r_info relocation field for ELF64.</p> </li> <li> <code>elf64_r_type</code> \u2013 <p>Returns the r_type portion of the r_info relocation field for ELF64.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>R_DEBUG_LINK_MAP_CHANGED_HOOK</code> \u2013 </li> <li> <code>R_DEBUG_LINK_MAP_CHANGED_LISTENERS</code> (<code>set[Callable[..., Any]]</code>) \u2013 </li> <li> <code>DYNAMIC_SECTION_ALLOW_MULTIPLE</code> \u2013 </li> <li> <code>DYNAMIC_SECTION_REQUIRED_TAGS</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.R_DEBUG_LINK_MAP_CHANGED_HOOK","title":"R_DEBUG_LINK_MAP_CHANGED_HOOK <code>module-attribute</code>","text":"<pre><code>R_DEBUG_LINK_MAP_CHANGED_HOOK = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.R_DEBUG_LINK_MAP_CHANGED_LISTENERS","title":"R_DEBUG_LINK_MAP_CHANGED_LISTENERS <code>module-attribute</code>","text":"<pre><code>R_DEBUG_LINK_MAP_CHANGED_LISTENERS: set[Callable[..., Any]] = set()\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DYNAMIC_SECTION_ALLOW_MULTIPLE","title":"DYNAMIC_SECTION_ALLOW_MULTIPLE <code>module-attribute</code>","text":"<pre><code>DYNAMIC_SECTION_ALLOW_MULTIPLE = {DT_NEEDED}\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DYNAMIC_SECTION_REQUIRED_TAGS","title":"DYNAMIC_SECTION_REQUIRED_TAGS <code>module-attribute</code>","text":"<pre><code>DYNAMIC_SECTION_REQUIRED_TAGS = {DT_STRTAB, DT_STRSZ, DT_SYMTAB, DT_SYMENT}\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry","title":"LinkMapEntry","text":"<pre><code>LinkMapEntry(address)\n</code></pre> <p>An entry in the link map.</p> <p>Methods:</p> <ul> <li> <code>name</code> \u2013 <p>The name of the binary image this entry describes.</p> </li> <li> <code>dynamic</code> \u2013 <p>The pointer to the memory mapped dynamic segment of the binary image.</p> </li> <li> <code>load_bias</code> \u2013 <p>The difference between the addresses in the data structures of the</p> </li> <li> <code>next</code> \u2013 <p>The next entry in the chain, if any.</p> </li> <li> <code>prev</code> \u2013 <p>The previous entry in the chain, if any.</p> </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>link_map</code> \u2013 </li> <li> <code>link_map_address</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.link_map","title":"link_map <code>instance-attribute</code>","text":"<pre><code>link_map = link_map()\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.link_map_address","title":"link_map_address <code>instance-attribute</code>","text":"<pre><code>link_map_address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.name","title":"name","text":"<pre><code>name()\n</code></pre> <p>The name of the binary image this entry describes.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.dynamic","title":"dynamic","text":"<pre><code>dynamic()\n</code></pre> <p>The pointer to the memory mapped dynamic segment of the binary image.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.load_bias","title":"load_bias","text":"<pre><code>load_bias()\n</code></pre> <p>The difference between the addresses in the data structures of the binary image and the actual location of the data being pointed to by them in the address space of the inferior. This number will never be negative.</p> <p>Aditionally, for DYN images, such as PIE executables and shared libraries, this value is the same as the base load address of the image.</p> <p>The term \"load bias\" comes from the ELF binary format loading procedure in the Linux Kernel.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.next","title":"next","text":"<pre><code>next()\n</code></pre> <p>The next entry in the chain, if any.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.prev","title":"prev","text":"<pre><code>prev()\n</code></pre> <p>The previous entry in the chain, if any.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.LinkMapEntry.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment","title":"DynamicSegment","text":"<pre><code>DynamicSegment(address, load_bias)\n</code></pre> <p>Parser for the DYNAMIC segment present in a binary image.</p> <p>Methods:</p> <ul> <li> <code>jmprel_has_addend</code> \u2013 <p>Returns whether the <code>r_addend</code> field is available in entries of JMPREL.</p> </li> <li> <code>rela_read</code> \u2013 <p>Reads the requested field from the entry of the given index in RELA.</p> </li> <li> <code>rel_read</code> \u2013 <p>Reads the requested field from the entry of the given index in REL.</p> </li> <li> <code>jmprel_read</code> \u2013 <p>Reads the requested field from the entry of the given index in JMPREL.</p> </li> <li> <code>rela_entry_count</code> \u2013 <p>Returns the number of RELA entries.</p> </li> <li> <code>rel_entry_count</code> \u2013 <p>Returns the number of REL entries.</p> </li> <li> <code>jmprel_entry_count</code> \u2013 <p>Returns the number of JMPREL entries.</p> </li> <li> <code>string</code> \u2013 <p>Reads the string at index i from the string table.</p> </li> <li> <code>symtab_read</code> \u2013 <p>Reads the requested field from the entry of given index in the symbol</p> </li> <li> <code>dyn_array_read</code> \u2013 <p>Reads the requested field from the entry of given index in the dynamic</p> </li> <li> <code>dyn_array_read_tag_val</code> \u2013 <p>Reads the <code>d_un</code> field from the entry of given tag in the dynamic</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>symtab_elem</code> \u2013 </li> <li> <code>jmprel_addr</code> \u2013 </li> <li> <code>rela_addr</code> \u2013 </li> <li> <code>rel_addr</code> \u2013 </li> <li> <code>jmprel_elem</code> \u2013 </li> <li> <code>rela_elem</code> \u2013 </li> <li> <code>rel_elem</code> \u2013 </li> <li> <code>jmprel_r_sym_fn</code> \u2013 </li> <li> <code>jmprel_r_info_fn</code> \u2013 </li> <li> <code>rela_r_sym_fn</code> \u2013 </li> <li> <code>rela_r_info_fn</code> \u2013 </li> <li> <code>rel_r_sym_fn</code> \u2013 </li> <li> <code>rel_r_info_fn</code> \u2013 </li> <li> <code>entries</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>load_bias</code> \u2013 </li> <li> <code>elf_dyn</code> \u2013 </li> <li> <code>entries_by_tag</code> (<code>dict[Any, Any]</code>) \u2013 </li> <li> <code>strtab_addr</code> \u2013 </li> <li> <code>strtab_size</code> \u2013 </li> <li> <code>symtab_addr</code> \u2013 </li> <li> <code>has_jmprel</code> \u2013 </li> <li> <code>has_rela</code> \u2013 </li> <li> <code>has_rel</code> \u2013 </li> <li> <code>rela_r_sym</code> \u2013 </li> <li> <code>rela_r_type</code> \u2013 </li> <li> <code>rel_r_sym</code> \u2013 </li> <li> <code>rel_r_type</code> \u2013 </li> <li> <code>jmprel_r_sym</code> \u2013 </li> <li> <code>jmprel_r_type</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.symtab_elem","title":"symtab_elem <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>symtab_elem = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_addr","title":"jmprel_addr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>jmprel_addr = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_addr","title":"rela_addr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rela_addr = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_addr","title":"rel_addr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rel_addr = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_elem","title":"jmprel_elem <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>jmprel_elem = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_elem","title":"rela_elem <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rela_elem = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_elem","title":"rel_elem <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rel_elem = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_r_sym_fn","title":"jmprel_r_sym_fn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>jmprel_r_sym_fn = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_r_info_fn","title":"jmprel_r_info_fn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>jmprel_r_info_fn = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_r_sym_fn","title":"rela_r_sym_fn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rela_r_sym_fn = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_r_info_fn","title":"rela_r_info_fn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rela_r_info_fn = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_r_sym_fn","title":"rel_r_sym_fn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rel_r_sym_fn = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_r_info_fn","title":"rel_r_info_fn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rel_r_info_fn = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.entries","title":"entries <code>instance-attribute</code>","text":"<pre><code>entries = count\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.load_bias","title":"load_bias <code>instance-attribute</code>","text":"<pre><code>load_bias = load_bias\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.elf_dyn","title":"elf_dyn <code>instance-attribute</code>","text":"<pre><code>elf_dyn = elf_dyn\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.entries_by_tag","title":"entries_by_tag <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>entries_by_tag: dict[Any, Any] = sections\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.strtab_addr","title":"strtab_addr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>strtab_addr = dyn_array_read_tag_val(DT_STRTAB)\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.strtab_size","title":"strtab_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>strtab_size = dyn_array_read_tag_val(DT_STRSZ)\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.symtab_addr","title":"symtab_addr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>symtab_addr = dyn_array_read_tag_val(DT_SYMTAB)\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.has_jmprel","title":"has_jmprel <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>has_jmprel = (\n DT_JMPREL in sections and DT_PLTREL in sections and DT_PLTRELSZ in sections\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.has_rela","title":"has_rela <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>has_rela = (\n DT_RELA in sections and DT_RELASZ in sections and DT_RELAENT in sections\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.has_rel","title":"has_rel <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>has_rel = DT_REL in sections and DT_RELSZ in sections and DT_RELENT in sections\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_r_sym","title":"rela_r_sym <code>instance-attribute</code>","text":"<pre><code>rela_r_sym = elf32_r_sym\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_r_type","title":"rela_r_type <code>instance-attribute</code>","text":"<pre><code>rela_r_type = elf32_r_type\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_r_sym","title":"rel_r_sym <code>instance-attribute</code>","text":"<pre><code>rel_r_sym = elf32_r_sym\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_r_type","title":"rel_r_type <code>instance-attribute</code>","text":"<pre><code>rel_r_type = elf32_r_type\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_r_sym","title":"jmprel_r_sym <code>instance-attribute</code>","text":"<pre><code>jmprel_r_sym = elf32_r_sym\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_r_type","title":"jmprel_r_type <code>instance-attribute</code>","text":"<pre><code>jmprel_r_type = elf32_r_type\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_has_addend","title":"jmprel_has_addend","text":"<pre><code>jmprel_has_addend()\n</code></pre> <p>Returns whether the <code>r_addend</code> field is available in entries of JMPREL.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_read","title":"rela_read","text":"<pre><code>rela_read(i, field)\n</code></pre> <p>Reads the requested field from the entry of the given index in RELA.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_read","title":"rel_read","text":"<pre><code>rel_read(i, field)\n</code></pre> <p>Reads the requested field from the entry of the given index in REL.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_read","title":"jmprel_read","text":"<pre><code>jmprel_read(i, field)\n</code></pre> <p>Reads the requested field from the entry of the given index in JMPREL.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rela_entry_count","title":"rela_entry_count","text":"<pre><code>rela_entry_count()\n</code></pre> <p>Returns the number of RELA entries.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.rel_entry_count","title":"rel_entry_count","text":"<pre><code>rel_entry_count()\n</code></pre> <p>Returns the number of REL entries.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.jmprel_entry_count","title":"jmprel_entry_count","text":"<pre><code>jmprel_entry_count()\n</code></pre> <p>Returns the number of JMPREL entries.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.string","title":"string","text":"<pre><code>string(i)\n</code></pre> <p>Reads the string at index i from the string table.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.symtab_read","title":"symtab_read","text":"<pre><code>symtab_read(i, field)\n</code></pre> <p>Reads the requested field from the entry of given index in the symbol table.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.dyn_array_read","title":"dyn_array_read","text":"<pre><code>dyn_array_read(i, field)\n</code></pre> <p>Reads the requested field from the entry of given index in the dynamic array.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.DynamicSegment.dyn_array_read_tag_val","title":"dyn_array_read_tag_val","text":"<pre><code>dyn_array_read_tag_val(tag)\n</code></pre> <p>Reads the <code>d_un</code> field from the entry of given tag in the dynamic array. Must not be a tag that allows multiple entries.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct","title":"CStruct","text":"<pre><code>CStruct(fields: list[tuple[str, Type, type]])\n</code></pre> <p>Utility class for reading fields off of C structs.</p> <p>Without proper debug information it cannot be guaranteed that the calculated field offsets are correct, therefore, reasonable caution should be exercised when using this class. The assumptions made are: - Padding is added between fields so that all internal members are correctly aligned, as long as the struct itself is correctly aligned. - The alignment of the struct is the same as the alignment of its most strictly aligned member. - Padding is added to the end of the struct so that sequentially laid out instances are always correctly aligned. - Stuct sizes must be greater than or equal to 1 byte.</p> <p>While these assumptions do not apply in all cases, they should be good enough for the structs in ld.so and in the ELF program images.</p> <p>Methods:</p> <ul> <li> <code>link_map</code> \u2013 <p>Creates a new instance describing the ABI-stable part of the link_map</p> </li> <li> <code>r_debug</code> \u2013 <p>Creates a new instance describing the ABI-stable part of the r_debug</p> </li> <li> <code>elfNN_dyn</code> \u2013 <p>Creates a new instance describing the ElfNN_Dyn structure, suitable for</p> </li> <li> <code>elfNN_rel</code> \u2013 <p>Creates a new instance describing the ElfNN_Rel structure, suitable for</p> </li> <li> <code>elfNN_rela</code> \u2013 <p>Creates a new instance describing the ElfNN_Rela structure, suitable for</p> </li> <li> <code>elf32_sym</code> \u2013 <p>Creates a new instance describing the Elf32_Sym srtucture.</p> </li> <li> <code>elf64_sym</code> \u2013 <p>Creates a new instance describing the Elf64_Sym structure.</p> </li> <li> <code>read</code> \u2013 <p>Reads the field with the given name from the struct instance located at</p> </li> <li> <code>has_field</code> \u2013 <p>Returns whether a field with the given name exists in this struct.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>types</code> (<code>dict[str, Type]</code>) \u2013 </li> <li> <code>offsets</code> (<code>dict[str, int]</code>) \u2013 </li> <li> <code>converters</code> (<code>dict[str, type]</code>) \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>align</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.types","title":"types <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>types: dict[str, Type] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.offsets","title":"offsets <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>offsets: dict[str, int] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.converters","title":"converters <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>converters: dict[str, type] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.size","title":"size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>size = current_offset\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.align","title":"align <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>align = alignment\n</code></pre>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.link_map","title":"link_map <code>staticmethod</code>","text":"<pre><code>link_map()\n</code></pre> <p>Creates a new instance describing the ABI-stable part of the link_map struct.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.r_debug","title":"r_debug <code>staticmethod</code>","text":"<pre><code>r_debug()\n</code></pre> <p>Creates a new instance describing the ABI-stable part of the r_debug struct.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.elfNN_dyn","title":"elfNN_dyn <code>staticmethod</code>","text":"<pre><code>elfNN_dyn()\n</code></pre> <p>Creates a new instance describing the ElfNN_Dyn structure, suitable for the architecture of the inferior.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.elfNN_rel","title":"elfNN_rel <code>staticmethod</code>","text":"<pre><code>elfNN_rel()\n</code></pre> <p>Creates a new instance describing the ElfNN_Rel structure, suitable for the architecture of the inferior.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.elfNN_rela","title":"elfNN_rela <code>staticmethod</code>","text":"<pre><code>elfNN_rela()\n</code></pre> <p>Creates a new instance describing the ElfNN_Rela structure, suitable for the architecture of the inferior.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.elf32_sym","title":"elf32_sym <code>staticmethod</code>","text":"<pre><code>elf32_sym()\n</code></pre> <p>Creates a new instance describing the Elf32_Sym srtucture.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.elf64_sym","title":"elf64_sym <code>staticmethod</code>","text":"<pre><code>elf64_sym()\n</code></pre> <p>Creates a new instance describing the Elf64_Sym structure.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.read","title":"read","text":"<pre><code>read(address, name)\n</code></pre> <p>Reads the field with the given name from the struct instance located at the given address.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.CStruct.has_field","title":"has_field","text":"<pre><code>has_field(name) -> bool\n</code></pre> <p>Returns whether a field with the given name exists in this struct.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.is_dynamic","title":"is_dynamic","text":"<pre><code>is_dynamic() -> bool\n</code></pre> <p>Returns whether the current inferior is dynamic.</p> <p>Not all programs are dynamically linked, or even need the dynamic loader at all. Since this module is entirely reliant on at least the presence of the dynamic loader, and really only makes sense for dynamic programs, it should not be used at all with programs that don't participate in dynamic linkage, or when there is a dynamic linker, but we have no way to talk to it.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.r_debug_link_map_changed_hook","title":"r_debug_link_map_changed_hook","text":"<pre><code>r_debug_link_map_changed_hook() -> Callable[[StopPoint], bool]\n</code></pre> <p>Hook that gets activated whenever the link map changes.</p> <p>The r_debug structure, in addition to having a refence to the head of the link map, also has, in its ABI-stable part, a reference to an address that can have a breakpoint attached to it, such that whenever the contents of the link map change, that breakpoint will be triggered1.</p> <p>We take advantage of that here, by installing our own breakpoint in that location, and watching for trigger events, so that we can notify other bits of pwndbg that the contents of the <code>link_map()</code> function will be different.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.r_debug_install_link_map_changed_hook","title":"r_debug_install_link_map_changed_hook","text":"<pre><code>r_debug_install_link_map_changed_hook() -> None\n</code></pre> <p>Installs the r_debug-based hook to the change event of the link map.</p> <p>This function is a bit tricky, because ideally we want it to be run as soon as possible, before even the dynamic linker runs, but after both it and the main binary have been mapped into the address space of the inferior. While doing this manually would be trivial - seeing as there is a command in GDB that gives the user control at the exact place we would like -, there does not seem to be a way of easily doing this from inside Python.</p> <p>Because of this, parts of the code that rely on the hook should try calling this function and firing their own listeners manually at least once.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.r_debug_link_map_changed_add_listener","title":"r_debug_link_map_changed_add_listener","text":"<pre><code>r_debug_link_map_changed_add_listener(handler: Callable[..., Any]) -> None\n</code></pre> <p>Install a callback to be called whenever r_debug signal of there being a change in the link map link map is triggered.</p> <p>Keep in mind this function may be called before the hook that calls the listeners is installed, and, until it is installed, no listener callbacks will actually be triggered. See <code>r_debug_install_link_map_changed_hook</code>.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.r_debug_link_map_changed_remove_listener","title":"r_debug_link_map_changed_remove_listener","text":"<pre><code>r_debug_link_map_changed_remove_listener(handler: Callable[..., Any]) -> None\n</code></pre> <p>Removes a listener previously installed with r_debug_link_map_changed_add_listener().</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.link_map_head","title":"link_map_head","text":"<pre><code>link_map_head()\n</code></pre> <p>Acquires a reference to the head entry of the link map.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.link_map","title":"link_map","text":"<pre><code>link_map()\n</code></pre> <p>Iterator over all the entries in the link map.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.elf32_r_sym","title":"elf32_r_sym","text":"<pre><code>elf32_r_sym(r_info)\n</code></pre> <p>Returns the r_sym portion of the r_info relocation field for ELF32.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.elf32_r_type","title":"elf32_r_type","text":"<pre><code>elf32_r_type(r_info)\n</code></pre> <p>Returns the r_type portion of the r_info relocation field for ELF32.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.elf64_r_sym","title":"elf64_r_sym","text":"<pre><code>elf64_r_sym(r_info)\n</code></pre> <p>Returns the r_sym portion of the r_info relocation field for ELF64.</p>"},{"location":"reference/pwndbg/aglib/dynamic/#pwndbg.aglib.dynamic.elf64_r_type","title":"elf64_r_type","text":"<pre><code>elf64_r_type(r_info)\n</code></pre> <p>Returns the r_type portion of the r_info relocation field for ELF64.</p>"},{"location":"reference/pwndbg/aglib/elf/","title":"pwndbg.aglib.elf","text":""},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf","title":"elf","text":"<p>This file declares types and methods useful for enumerating all of the address spaces and permissions of an ELF file in memory.</p> <p>This is necessary for when access to /proc is restricted, or when working on a BSD system which simply does not have /proc.</p> <p>Classes:</p> <ul> <li> <code>ELFInfo</code> \u2013 <p>ELF metadata and structures.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>update</code> \u2013 </li> <li> <code>read</code> \u2013 </li> <li> <code>get_elf_info</code> \u2013 <p>Parse and return ELFInfo.</p> </li> <li> <code>get_elf_info_rebased</code> \u2013 <p>Parse and return ELFInfo with all virtual addresses rebased to vaddr</p> </li> <li> <code>get_containing_segments</code> \u2013 </li> <li> <code>get_containing_sections</code> \u2013 </li> <li> <code>dump_section_by_name</code> \u2013 <p>Dump the content of a section from an ELF file, return the start address, size and content.</p> </li> <li> <code>dump_relocations_by_section_name</code> \u2013 <p>Dump the relocation entries of a section from an ELF file, return a generator of Relocation objects.</p> </li> <li> <code>exe</code> \u2013 <p>Return a loaded ELF header object pointing to the Ehdr of the</p> </li> <li> <code>entry</code> \u2013 <p>Return the address of the entry point for the main executable.</p> </li> <li> <code>load</code> \u2013 </li> <li> <code>reset_ehdr_type_loaded</code> \u2013 </li> <li> <code>get_ehdr</code> \u2013 <p>Returns an ehdr object for the ELF pointer points into.</p> </li> <li> <code>get_phdrs</code> \u2013 <p>Returns a tuple containing (phnum, phentsize, gdb.Value),</p> </li> <li> <code>iter_phdrs</code> \u2013 </li> <li> <code>map</code> \u2013 <p>Given a pointer into an ELF module, return a list of all loaded</p> </li> <li> <code>map_inner</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>module</code> \u2013 </li> <li> <code>Ehdr</code> \u2013 </li> <li> <code>Phdr</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>ehdr_type_loaded</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.module","title":"module <code>module-attribute</code>","text":"<pre><code>module = modules[__name__]\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.Ehdr","title":"Ehdr <code>module-attribute</code>","text":"<pre><code>Ehdr = Union[Elf32_Ehdr, Elf64_Ehdr]\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.Phdr","title":"Phdr <code>module-attribute</code>","text":"<pre><code>Phdr = Union[Elf32_Phdr, Elf64_Phdr]\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T', Union[Elf32_Ehdr, Elf64_Ehdr], Union[Elf32_Phdr, Elf64_Phdr])\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.ehdr_type_loaded","title":"ehdr_type_loaded <code>module-attribute</code>","text":"<pre><code>ehdr_type_loaded = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.ELFInfo","title":"ELFInfo","text":"<p> Bases: <code>NamedTuple</code></p> <p>ELF metadata and structures.</p> <p>Attributes:</p> <ul> <li> <code>header</code> (<code>dict[str, int | str]</code>) \u2013 </li> <li> <code>sections</code> (<code>list[dict[str, int | str]]</code>) \u2013 </li> <li> <code>segments</code> (<code>list[dict[str, int | str]]</code>) \u2013 </li> <li> <code>is_pic</code> (<code>bool</code>) \u2013 </li> <li> <code>is_pie</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.ELFInfo.header","title":"header <code>instance-attribute</code>","text":"<pre><code>header: dict[str, int | str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.ELFInfo.sections","title":"sections <code>instance-attribute</code>","text":"<pre><code>sections: list[dict[str, int | str]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.ELFInfo.segments","title":"segments <code>instance-attribute</code>","text":"<pre><code>segments: list[dict[str, int | str]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.ELFInfo.is_pic","title":"is_pic <code>property</code>","text":"<pre><code>is_pic: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.ELFInfo.is_pie","title":"is_pie <code>property</code>","text":"<pre><code>is_pie: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.update","title":"update","text":"<pre><code>update() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.read","title":"read","text":"<pre><code>read(typ: T, address: int, blob: bytearray | None = None) -> T\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.get_elf_info","title":"get_elf_info","text":"<pre><code>get_elf_info(filepath: str) -> ELFInfo\n</code></pre> <p>Parse and return ELFInfo.</p> <p>Adds various calculated properties to the ELF header, segments and sections. Such added properties are those with prefix 'x_' in the returned dicts.</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.get_elf_info_rebased","title":"get_elf_info_rebased","text":"<pre><code>get_elf_info_rebased(filepath: str, vaddr: int) -> ELFInfo\n</code></pre> <p>Parse and return ELFInfo with all virtual addresses rebased to vaddr</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.get_containing_segments","title":"get_containing_segments","text":"<pre><code>get_containing_segments(elf_filepath: str, elf_loadaddr: int, vaddr: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.get_containing_sections","title":"get_containing_sections","text":"<pre><code>get_containing_sections(elf_filepath: str, elf_loadaddr: int, vaddr: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.dump_section_by_name","title":"dump_section_by_name","text":"<pre><code>dump_section_by_name(\n filepath: str, section_name: str, try_local_path: bool = False\n) -> tuple[int, int, bytes] | None\n</code></pre> <p>Dump the content of a section from an ELF file, return the start address, size and content.</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.dump_relocations_by_section_name","title":"dump_relocations_by_section_name","text":"<pre><code>dump_relocations_by_section_name(\n filepath: str, section_name: str, try_local_path: bool = False\n) -> tuple[Relocation, ...] | None\n</code></pre> <p>Dump the relocation entries of a section from an ELF file, return a generator of Relocation objects.</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.exe","title":"exe","text":"<pre><code>exe() -> Ehdr | None\n</code></pre> <p>Return a loaded ELF header object pointing to the Ehdr of the main executable.</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.entry","title":"entry","text":"<pre><code>entry() -> int\n</code></pre> <p>Return the address of the entry point for the main executable.</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.load","title":"load","text":"<pre><code>load(pointer: int) -> Ehdr | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.reset_ehdr_type_loaded","title":"reset_ehdr_type_loaded","text":"<pre><code>reset_ehdr_type_loaded() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.get_ehdr","title":"get_ehdr","text":"<pre><code>get_ehdr(pointer: int) -> tuple[int | None, Ehdr | None]\n</code></pre> <p>Returns an ehdr object for the ELF pointer points into.</p> <p>We expect the <code>pointer</code> to be an address from the binary.</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.get_phdrs","title":"get_phdrs","text":"<pre><code>get_phdrs(pointer: int)\n</code></pre> <p>Returns a tuple containing (phnum, phentsize, gdb.Value), where the gdb.Value object is an ELF Program Header with the architecture-appropriate structure type.</p>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.iter_phdrs","title":"iter_phdrs","text":"<pre><code>iter_phdrs(ehdr: Ehdr)\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.map","title":"map","text":"<pre><code>map(pointer: int, objfile: str = '') -> tuple[Page, ...]\n</code></pre> <p>Given a pointer into an ELF module, return a list of all loaded sections in the ELF.</p> <p>Returns:</p> <ul> <li> <code>tuple[Page, ...]</code> \u2013 <p>A sorted list of pwndbg.lib.memory.Page objects</p> </li> </ul> <p>Example:</p> <pre><code>>>> pwndbg.aglib.elf.load(pwndbg.aglib.regs.pc)\n[Page('400000-4ef000 r-xp 0'),\n Page('6ef000-6f0000 r--p ef000'),\n Page('6f0000-6ff000 rw-p f0000')]\n>>> pwndbg.aglib.elf.load(0x7ffff77a2000)\n[Page('7ffff75e7000-7ffff77a2000 r-xp 0x1bb000 0'),\n Page('7ffff77a2000-7ffff79a2000 ---p 0x200000 1bb000'),\n Page('7ffff79a2000-7ffff79a6000 r--p 0x4000 1bb000'),\n Page('7ffff79a6000-7ffff79ad000 rw-p 0x7000 1bf000')]\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.map_inner","title":"map_inner","text":"<pre><code>map_inner(ei_class: int, ehdr: Ehdr, objfile: str) -> tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/file/","title":"pwndbg.aglib.file","text":""},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file","title":"file","text":"<p>Retrieve files from the debuggee's filesystem. Useful when debugging a remote process over SSH or similar, where e.g. /proc/FOO/maps is needed from the remote system.</p> <p>Functions:</p> <ul> <li> <code>reset_remote_files</code> \u2013 </li> <li> <code>remote_files_dir</code> \u2013 </li> <li> <code>get_proc_exe_file</code> \u2013 <p>Returns the local path to the debugged file name.</p> </li> <li> <code>can_download_remote_file</code> \u2013 </li> <li> <code>get_file</code> \u2013 <p>Downloads the specified file from the system where the current process is</p> </li> <li> <code>get</code> \u2013 <p>Retrieves the contents of the specified file on the system</p> </li> <li> <code>readlink</code> \u2013 <p>readlink(path) -> str</p> </li> <li> <code>is_vfile_qemu_user_bug</code> \u2013 </li> <li> <code>vfile_readlink</code> \u2013 <p>Reads the target of a symbolic link on the remote system.</p> </li> <li> <code>vfile_readfile</code> \u2013 <p>Reads the entire content of a file on the remote system.</p> </li> <li> <code>vfile_open</code> \u2013 <p>Opens a file on the remote system and returns the file descriptor.</p> </li> <li> <code>gdb_memtox_inverse</code> \u2013 </li> <li> <code>vfile_pread</code> \u2013 <p>Reads data from a file descriptor.</p> </li> <li> <code>vfile_close</code> \u2013 <p>Closes a previously opened file descriptor.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.reset_remote_files","title":"reset_remote_files","text":"<pre><code>reset_remote_files() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.remote_files_dir","title":"remote_files_dir","text":"<pre><code>remote_files_dir()\n</code></pre>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.get_proc_exe_file","title":"get_proc_exe_file","text":"<pre><code>get_proc_exe_file() -> str\n</code></pre> <p>Returns the local path to the debugged file name.</p>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.can_download_remote_file","title":"can_download_remote_file","text":"<pre><code>can_download_remote_file() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.get_file","title":"get_file","text":"<pre><code>get_file(path: str, try_local_path: bool = False) -> str\n</code></pre> <p>Downloads the specified file from the system where the current process is being debugged.</p> <p>If the <code>path</code> is prefixed with \"target:\" the prefix is stripped (to support remote target paths properly).</p> <p>If the <code>try_local_path</code> is set to <code>True</code> and the <code>path</code> exists locally and \"target:\" prefix is not present, it will return the local path instead of downloading the file.</p> <p>Returns:</p> <ul> <li> <code>str</code> \u2013 <p>The local path to the file</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.get","title":"get","text":"<pre><code>get(path: str) -> bytes\n</code></pre> <p>Retrieves the contents of the specified file on the system where the current process is being debugged.</p> <p>Returns:</p> <ul> <li> <code>bytes</code> \u2013 <p>A byte array, or None.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.readlink","title":"readlink","text":"<pre><code>readlink(path: str) -> str\n</code></pre> <p>readlink(path) -> str</p> <p>Read the link specified by 'path' on the system being debugged.</p> <p>Handles local, qemu-usermode, and remote debugging cases.</p>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.is_vfile_qemu_user_bug","title":"is_vfile_qemu_user_bug","text":"<pre><code>is_vfile_qemu_user_bug() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.vfile_readlink","title":"vfile_readlink","text":"<pre><code>vfile_readlink(pathname: str | bytes) -> bytes\n</code></pre> <p>Reads the target of a symbolic link on the remote system.</p> <p>:param pathname: The path to the symbolic link (string). :param buffer_size: The size of the buffer to read into (integer). :return: The target of the symbolic link as a string.</p>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.vfile_readfile","title":"vfile_readfile","text":"<pre><code>vfile_readfile(filename: str, chunk_size=1000) -> Iterator[bytes]\n</code></pre> <p>Reads the entire content of a file on the remote system.</p> <p>:param filename: The path to the file (string). :param chunk_size: The number of bytes to read in each iteration (integer). :return: The complete content of the file as bytes.</p>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.vfile_open","title":"vfile_open","text":"<pre><code>vfile_open(filename: str, flags: int, mode: int) -> int\n</code></pre> <p>Opens a file on the remote system and returns the file descriptor.</p> <p>:param filename: The path to the file (string). :param flags: Flags passed to the open call (integer, base 16). These correspond to the constant values in the enum <code>OpenOptions</code> from LLDB\u2019s <code>File.h</code>, not the traditional <code>open(2)</code> flags. :param mode: Mode bits for the file (integer, base 16). :return: File descriptor (integer), or raises an exception if an error occurs.</p>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.gdb_memtox_inverse","title":"gdb_memtox_inverse","text":"<pre><code>gdb_memtox_inverse(data: bytes) -> bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.vfile_pread","title":"vfile_pread","text":"<pre><code>vfile_pread(fd: int, size: int, offset: int) -> tuple[int, bytes]\n</code></pre> <p>Reads data from a file descriptor.</p> <p>:param fd: File descriptor (integer). :param size: Number of bytes to read (integer, base 16). :param offset: Offset in the file to start reading from (integer, base 16). :return: Tuple of (bytes_read, data) where bytes_read is an integer and data is the binary data.</p>"},{"location":"reference/pwndbg/aglib/file/#pwndbg.aglib.file.vfile_close","title":"vfile_close","text":"<pre><code>vfile_close(fd)\n</code></pre> <p>Closes a previously opened file descriptor.</p> <p>:param fd: File descriptor (integer). :return: None, or raises an exception if an error occurs.</p>"},{"location":"reference/pwndbg/aglib/godbg/","title":"pwndbg.aglib.godbg","text":""},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg","title":"godbg","text":"<p>Classes:</p> <ul> <li> <code>FormatOpts</code> \u2013 </li> <li> <code>Type</code> \u2013 </li> <li> <code>GoTypeKind</code> \u2013 </li> <li> <code>GoTypeMeta</code> \u2013 </li> <li> <code>BackrefType</code> \u2013 <p>A temporary placeholder type used when dumping recursive types, e.g. type a []a</p> </li> <li> <code>BasicType</code> \u2013 <p>A primitive Go type.</p> </li> <li> <code>SliceType</code> \u2013 <p>A slice type in Go, notated as []inner.</p> </li> <li> <code>PointerType</code> \u2013 <p>A pointer type in Go, notated as *inner.</p> </li> <li> <code>ArrayType</code> \u2013 <p>An array type in Go, notated as [count]inner.</p> </li> <li> <code>MapType</code> \u2013 <p>A map type in Go, notated as map[key]val.</p> </li> <li> <code>StructType</code> \u2013 <p>A struct type in Go, notated as struct(SIZE){FIELDS},</p> </li> <li> <code>RuntimeType</code> \u2013 <p>A value of a runtime reflection type in Go, notated as runtime(SIZE)ADDRESS,</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>word_size</code> \u2013 <p>Gets the Go word size for the current architecture.</p> </li> <li> <code>compute_offsets</code> \u2013 <p>Given a list of (size, alignment) for struct field types,</p> </li> <li> <code>compute_named_offsets</code> \u2013 <p>Like compute_offsets, but takes in field names and returns a dictionary</p> </li> <li> <code>load_uint</code> \u2013 </li> <li> <code>load_int</code> \u2013 </li> <li> <code>load_float</code> \u2013 </li> <li> <code>emit_warning</code> \u2013 </li> <li> <code>get_elf</code> \u2013 </li> <li> <code>read_buildversion</code> \u2013 <p>Reads a Go runtime.buildVersion string to extract the version.</p> </li> <li> <code>get_go_version</code> \u2013 <p>Try to determine the Go version used to compile the binary.</p> </li> <li> <code>get_type_start</code> \u2013 <p>Given the address to a type, try to find the moduledata types section containing it.</p> </li> <li> <code>read_varint_str</code> \u2013 <p>Read a length-prefix string encoded with Go's variable length encoding.</p> </li> <li> <code>read_type_name</code> \u2013 <p>Reads a Go type name given the address to the name.</p> </li> <li> <code>decode_runtime_type</code> \u2013 <p>Decodes a runtime reflection type from memory, returning a (meta, type) tuplee.</p> </li> <li> <code>parse_type</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>line_width</code> \u2013 </li> <li> <code>indent_amount</code> \u2013 </li> <li> <code>debug_color</code> \u2013 </li> <li> <code>hex_digits</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.line_width","title":"line_width <code>module-attribute</code>","text":"<pre><code>line_width = add_param(\n \"go-dump-line-width\", 80, \"the soft line width for go-dump pretty printing\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.indent_amount","title":"indent_amount <code>module-attribute</code>","text":"<pre><code>indent_amount = add_param(\n \"go-dump-indent-amount\", 4, \"the indent amount for go-dump pretty printing\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.debug_color","title":"debug_color <code>module-attribute</code>","text":"<pre><code>debug_color = add_color_param(\n \"go-dump-debug\",\n \"blue\",\n \"color for 'go-dump' command's debug info when --debug is specified\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.hex_digits","title":"hex_digits <code>module-attribute</code>","text":"<pre><code>hex_digits = set('0123456789abcdefABCDEFxX')\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts","title":"FormatOpts <code>dataclass</code>","text":"<pre><code>FormatOpts(\n int_hex: bool = False,\n debug: bool = False,\n pretty: bool = False,\n float_decimals: int | None = None,\n)\n</code></pre> <p>Methods:</p> <ul> <li> <code>fmt_int</code> \u2013 </li> <li> <code>fmt_float</code> \u2013 </li> <li> <code>fmt_str</code> \u2013 </li> <li> <code>fmt_bytes</code> \u2013 </li> <li> <code>fmt_debug</code> \u2013 </li> <li> <code>fmt_elems</code> \u2013 </li> <li> <code>fmt_ptr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>int_hex</code> (<code>bool</code>) \u2013 </li> <li> <code>debug</code> (<code>bool</code>) \u2013 </li> <li> <code>pretty</code> (<code>bool</code>) \u2013 </li> <li> <code>float_decimals</code> (<code>int | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.int_hex","title":"int_hex <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>int_hex: bool = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.debug","title":"debug <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>debug: bool = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.pretty","title":"pretty <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pretty: bool = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.float_decimals","title":"float_decimals <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>float_decimals: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.fmt_int","title":"fmt_int","text":"<pre><code>fmt_int(val: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.fmt_float","title":"fmt_float","text":"<pre><code>fmt_float(val: float) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.fmt_str","title":"fmt_str","text":"<pre><code>fmt_str(val: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.fmt_bytes","title":"fmt_bytes","text":"<pre><code>fmt_bytes(val: bytes) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.fmt_debug","title":"fmt_debug","text":"<pre><code>fmt_debug(val: str, default: str = '') -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.fmt_elems","title":"fmt_elems","text":"<pre><code>fmt_elems(elems: Iterable[str]) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.FormatOpts.fmt_ptr","title":"fmt_ptr","text":"<pre><code>fmt_ptr(val: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type","title":"Type <code>dataclass</code>","text":"<pre><code>Type(meta: GoTypeMeta | None)\n</code></pre> <p> Bases: <code>ABC</code></p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 <p>Dump a type from memory given an address and format.</p> </li> <li> <code>size</code> \u2013 <p>Returns the size of a type in bytes.</p> </li> <li> <code>get_typename</code> \u2013 <p>Returns the typename of a type. Should be reparsable via _parse_ty.</p> </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>additional_metadata</code> \u2013 <p>Returns a list of lines of additional metadata to dump from the <code>go-type</code> command.</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type.dump","title":"dump <code>abstractmethod</code>","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre> <p>Dump a type from memory given an address and format.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type.size","title":"size <code>abstractmethod</code>","text":"<pre><code>size() -> int\n</code></pre> <p>Returns the size of a type in bytes.</p> <p>Used for computing array and struct layouts.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type.get_typename","title":"get_typename <code>abstractmethod</code>","text":"<pre><code>get_typename() -> str\n</code></pre> <p>Returns the typename of a type. Should be reparsable via _parse_ty.</p> <p>Also used to get the string representation.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre> <p>Returns a list of lines of additional metadata to dump from the <code>go-type</code> command.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.Type.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind","title":"GoTypeKind","text":"<p> Bases: <code>IntEnum</code></p> <p>Methods:</p> <ul> <li> <code>get_simple_name</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>INVALID</code> \u2013 </li> <li> <code>BOOL</code> \u2013 </li> <li> <code>INT</code> \u2013 </li> <li> <code>INT8</code> \u2013 </li> <li> <code>INT16</code> \u2013 </li> <li> <code>INT32</code> \u2013 </li> <li> <code>INT64</code> \u2013 </li> <li> <code>UINT</code> \u2013 </li> <li> <code>UINT8</code> \u2013 </li> <li> <code>UINT16</code> \u2013 </li> <li> <code>UINT32</code> \u2013 </li> <li> <code>UINT64</code> \u2013 </li> <li> <code>UINTPTR</code> \u2013 </li> <li> <code>FLOAT32</code> \u2013 </li> <li> <code>FLOAT64</code> \u2013 </li> <li> <code>COMPLEX64</code> \u2013 </li> <li> <code>COMPLEX128</code> \u2013 </li> <li> <code>ARRAY</code> \u2013 </li> <li> <code>CHAN</code> \u2013 </li> <li> <code>FUNC</code> \u2013 </li> <li> <code>INTERFACE</code> \u2013 </li> <li> <code>MAP</code> \u2013 </li> <li> <code>POINTER</code> \u2013 </li> <li> <code>SLICE</code> \u2013 </li> <li> <code>STRING</code> \u2013 </li> <li> <code>STRUCT</code> \u2013 </li> <li> <code>UNSAFEPOINTER</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.INVALID","title":"INVALID <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INVALID = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.BOOL","title":"BOOL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>BOOL = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.INT","title":"INT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INT = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.INT8","title":"INT8 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INT8 = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.INT16","title":"INT16 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INT16 = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.INT32","title":"INT32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INT32 = 5\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.INT64","title":"INT64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INT64 = 6\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.UINT","title":"UINT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UINT = 7\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.UINT8","title":"UINT8 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UINT8 = 8\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.UINT16","title":"UINT16 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UINT16 = 9\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.UINT32","title":"UINT32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UINT32 = 10\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.UINT64","title":"UINT64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UINT64 = 11\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.UINTPTR","title":"UINTPTR <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UINTPTR = 12\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.FLOAT32","title":"FLOAT32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FLOAT32 = 13\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.FLOAT64","title":"FLOAT64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FLOAT64 = 14\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.COMPLEX64","title":"COMPLEX64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>COMPLEX64 = 15\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.COMPLEX128","title":"COMPLEX128 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>COMPLEX128 = 16\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.ARRAY","title":"ARRAY <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ARRAY = 17\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.CHAN","title":"CHAN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>CHAN = 18\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.FUNC","title":"FUNC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FUNC = 19\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.INTERFACE","title":"INTERFACE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INTERFACE = 20\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.MAP","title":"MAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MAP = 21\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.POINTER","title":"POINTER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>POINTER = 22\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.SLICE","title":"SLICE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SLICE = 23\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.STRING","title":"STRING <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STRING = 24\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.STRUCT","title":"STRUCT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STRUCT = 25\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.UNSAFEPOINTER","title":"UNSAFEPOINTER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UNSAFEPOINTER = 26\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeKind.get_simple_name","title":"get_simple_name","text":"<pre><code>get_simple_name() -> str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeMeta","title":"GoTypeMeta <code>dataclass</code>","text":"<pre><code>GoTypeMeta(\n name: str,\n kind: GoTypeKind,\n addr: int,\n size: int = 0,\n align: int = 1,\n direct_iface: bool = False,\n)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>kind</code> (<code>GoTypeKind</code>) \u2013 </li> <li> <code>addr</code> (<code>int</code>) \u2013 </li> <li> <code>size</code> (<code>int</code>) \u2013 </li> <li> <code>align</code> (<code>int</code>) \u2013 </li> <li> <code>direct_iface</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeMeta.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeMeta.kind","title":"kind <code>instance-attribute</code>","text":"<pre><code>kind: GoTypeKind\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeMeta.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeMeta.size","title":"size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>size: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeMeta.align","title":"align <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>align: int = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.GoTypeMeta.direct_iface","title":"direct_iface <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>direct_iface: bool = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType","title":"BackrefType <code>dataclass</code>","text":"<pre><code>BackrefType(meta: GoTypeMeta | None, key: int)\n</code></pre> <p> Bases: <code>Type</code></p> <p>A temporary placeholder type used when dumping recursive types, e.g. type a []a</p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>additional_metadata</code> \u2013 <p>Returns a list of lines of additional metadata to dump from the <code>go-type</code> command.</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>key</code> (<code>int</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.key","title":"key <code>instance-attribute</code>","text":"<pre><code>key: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts())\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre> <p>Returns a list of lines of additional metadata to dump from the <code>go-type</code> command.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType","title":"BasicType <code>dataclass</code>","text":"<pre><code>BasicType(meta: GoTypeMeta | None, name: str, extra_meta: list[str] = list())\n</code></pre> <p> Bases: <code>Type</code></p> <p>A primitive Go type.</p> <p>Complex numbers are laid out as a real and imaginary part (both floats). Strings are laid out as a pointer and a length.</p> <p>Methodless interfaces (the interface{} type) are denoted as any, and interfaces with methods are denoted as interface.</p> <p>Function pointers are denoted as funcptr.</p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>additional_metadata</code> \u2013 </li> <li> <code>__post_init__</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>sz</code> (<code>int</code>) \u2013 </li> <li> <code>extra_meta</code> (<code>list[str]</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.sz","title":"sz <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>sz: int = field(init=False)\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.extra_meta","title":"extra_meta <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>extra_meta: list[str] = field(default_factory=list)\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.__post_init__","title":"__post_init__","text":"<pre><code>__post_init__() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType","title":"SliceType <code>dataclass</code>","text":"<pre><code>SliceType(meta: GoTypeMeta | None, inner: Type)\n</code></pre> <p> Bases: <code>Type</code></p> <p>A slice type in Go, notated as []inner.</p> <p>Slices are laid out as a pointer, length, and capacity.</p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>additional_metadata</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>Type</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType","title":"PointerType <code>dataclass</code>","text":"<pre><code>PointerType(meta: GoTypeMeta | None, inner: Type)\n</code></pre> <p> Bases: <code>Type</code></p> <p>A pointer type in Go, notated as *inner.</p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>additional_metadata</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>Type</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType","title":"ArrayType <code>dataclass</code>","text":"<pre><code>ArrayType(meta: GoTypeMeta | None, inner: Type, count: int)\n</code></pre> <p> Bases: <code>Type</code></p> <p>An array type in Go, notated as [count]inner.</p> <p>Arrays are laid out as contiguous data.</p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>additional_metadata</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>Type</code>) \u2013 </li> <li> <code>count</code> (<code>int</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.count","title":"count <code>instance-attribute</code>","text":"<pre><code>count: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType","title":"MapType <code>dataclass</code>","text":"<pre><code>MapType(meta: GoTypeMeta | None, key: Type, val: Type)\n</code></pre> <p> Bases: <code>Type</code></p> <p>A map type in Go, notated as map[key]val.</p> <p>Note that maps in Go are actually pointers to the inner map, but the map type printer here directly prints the inner map.</p> <p>Maps don't have a simple layout, and may reasonably change, but the last change was in 2017, so it probably won't.</p> <p>The layout assumed is as follows (taken from src/runtime/map.go commit 1b4f1dc):</p> <p>type hmap struct { count int flags uint8 B uint8 noverflow uint16 hash0 uint32 buckets unsafe.Pointer oldbuckets unsafe.Pointer nevacuate uintptr extra *mapextra }</p> <p>Methods:</p> <ul> <li> <code>field_offsets</code> \u2013 </li> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>additional_metadata</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>key</code> (<code>Type</code>) \u2013 </li> <li> <code>val</code> (<code>Type</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.key","title":"key <code>instance-attribute</code>","text":"<pre><code>key: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.val","title":"val <code>instance-attribute</code>","text":"<pre><code>val: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.field_offsets","title":"field_offsets <code>staticmethod</code>","text":"<pre><code>field_offsets() -> dict[str, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType","title":"StructType <code>dataclass</code>","text":"<pre><code>StructType(\n meta: GoTypeMeta | None,\n fields: list[tuple[str, str | Type, int]],\n sz: int,\n name: str | None = None,\n)\n</code></pre> <p> Bases: <code>Type</code></p> <p>A struct type in Go, notated as struct(SIZE){FIELDS}, where SIZE is the size of the struct in bytes, and FIELDS is a semicolon-separated list of OFFSET:NAME:TYPE fields.</p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>additional_metadata</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>fields</code> (<code>list[tuple[str, str | Type, int]]</code>) \u2013 </li> <li> <code>sz</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str | None</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.fields","title":"fields <code>instance-attribute</code>","text":"<pre><code>fields: list[tuple[str, str | Type, int]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.sz","title":"sz <code>instance-attribute</code>","text":"<pre><code>sz: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.name","title":"name <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>name: str | None = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType","title":"RuntimeType <code>dataclass</code>","text":"<pre><code>RuntimeType(meta: GoTypeMeta | None, sz: int, addr: int)\n</code></pre> <p> Bases: <code>Type</code></p> <p>A value of a runtime reflection type in Go, notated as runtime(SIZE)ADDRESS, where SIZE is the size of the type's value in bytes, and ADDRESS is the address of the type.</p> <p>This type is useful for serializing cyclic types.</p> <p>Methods:</p> <ul> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>get_typename</code> \u2013 </li> <li> <code>is_cyclic</code> \u2013 <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p> </li> <li> <code>additional_metadata</code> \u2013 <p>Returns a list of lines of additional metadata to dump from the <code>go-type</code> command.</p> </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>sz</code> (<code>int</code>) \u2013 </li> <li> <code>addr</code> (<code>int</code>) \u2013 </li> <li> <code>meta</code> (<code>GoTypeMeta | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.sz","title":"sz <code>instance-attribute</code>","text":"<pre><code>sz: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta: GoTypeMeta | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.size","title":"size","text":"<pre><code>size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -> bool\n</code></pre> <p>Checks if a type is cyclic (contains references to itself), e.g. type a []a</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -> list[str]\n</code></pre> <p>Returns a list of lines of additional metadata to dump from the <code>go-type</code> command.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.word_size","title":"word_size","text":"<pre><code>word_size() -> int\n</code></pre> <p>Gets the Go word size for the current architecture.</p> <p>Values taken from https://github.com/golang/go/blob/20b79fd5775c39061d949569743912ad5e58b0e7/src/go/types/sizes.go#L233-L252</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.compute_offsets","title":"compute_offsets","text":"<pre><code>compute_offsets(fields: Iterable[tuple[int, int]]) -> list[int]\n</code></pre> <p>Given a list of (size, alignment) for struct field types, returns a list of field offsets for the struct. The last element will be the offset of the struct's end (the struct size).</p> <p>Layout computation taken from src/go/types/sizes.go commit 1b4f1dc</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.compute_named_offsets","title":"compute_named_offsets","text":"<pre><code>compute_named_offsets(fields: Iterable[tuple[str, int, int]]) -> dict[str, int]\n</code></pre> <p>Like compute_offsets, but takes in field names and returns a dictionary mapping field name to offset instead.</p> <p>Also maps in a special $size field with the size of the struct.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.load_uint","title":"load_uint","text":"<pre><code>load_uint(data: bytes, endian: Literal['little', 'big'] | None = None) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.load_int","title":"load_int","text":"<pre><code>load_int(data: bytes) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.load_float","title":"load_float","text":"<pre><code>load_float(data: bytes) -> float\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.emit_warning","title":"emit_warning","text":"<pre><code>emit_warning(msg: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.get_elf","title":"get_elf","text":"<pre><code>get_elf() -> ELFInfo | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.read_buildversion","title":"read_buildversion","text":"<pre><code>read_buildversion(addr: int) -> str\n</code></pre> <p>Reads a Go runtime.buildVersion string to extract the version.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.get_go_version","title":"get_go_version","text":"<pre><code>get_go_version() -> tuple[int, ...] | None\n</code></pre> <p>Try to determine the Go version used to compile the binary.</p> <p>None can be returned if the version couldn't be inferred, at which point it's probably best to assume latest version.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.get_type_start","title":"get_type_start","text":"<pre><code>get_type_start(addr: int | None = None) -> int | None\n</code></pre> <p>Given the address to a type, try to find the moduledata types section containing it.</p> <p>Necessary to determine the base address that the type name is offset by.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.read_varint_str","title":"read_varint_str","text":"<pre><code>read_varint_str(addr: int) -> bytes\n</code></pre> <p>Read a length-prefix string encoded with Go's variable length encoding.</p> <p>Implementation taken from https://github.com/golang/go/blob/9d33956503c0d96c0c5666d374173f7ac9756d98/src/internal/abi/type.go#L640-L649</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.read_type_name","title":"read_type_name","text":"<pre><code>read_type_name(addr: int) -> bytes\n</code></pre> <p>Reads a Go type name given the address to the name.</p> <p>Go type names are stored as a 1 byte bitfield followed by a varint length prefixed string after 1.17.</p> <p>Prior to 1.17, they were stored as a 1 byte bitfield followed by a 2 byte length prefixed string.</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.decode_runtime_type","title":"decode_runtime_type","text":"<pre><code>decode_runtime_type(\n addr: int, keep_backrefs: bool = False\n) -> tuple[GoTypeMeta, Type | None]\n</code></pre> <p>Decodes a runtime reflection type from memory, returning a (meta, type) tuplee.</p> <p>The layout assumed is as follows (taken from src/internal/abi/type.go commit 1b4f1dc):</p> <p>type Type struct { Size_ uintptr PtrBytes uintptr Hash uint32 TFlag TFlag Align_ uint8 FieldAlign_ uint8 Kind_ Kind Equal func(unsafe.Pointer, unsafe.Pointer) bool GCData *byte Str NameOff PtrToThis TypeOff }</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.parse_type","title":"parse_type","text":"<pre><code>parse_type(ty: str) -> Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/","title":"pwndbg.aglib.heap","text":""},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap","title":"heap","text":"<p>Modules:</p> <ul> <li> <code>heap</code> \u2013 </li> <li> <code>jemalloc</code> \u2013 </li> <li> <code>ptmalloc</code> \u2013 </li> <li> <code>structs</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>add_heap_param</code> \u2013 </li> <li> <code>update</code> \u2013 </li> <li> <code>reset</code> \u2013 </li> <li> <code>resolve_heap</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>current</code> (<code>MemoryAllocator | None</code>) \u2013 </li> <li> <code>main_arena</code> \u2013 </li> <li> <code>thread_arena</code> \u2013 </li> <li> <code>mp_</code> \u2013 </li> <li> <code>tcache</code> \u2013 </li> <li> <code>global_max_fast</code> \u2013 </li> <li> <code>symbol_list</code> \u2013 </li> <li> <code>heap_chain_limit</code> \u2013 </li> <li> <code>heap_corruption_check_limit</code> \u2013 </li> <li> <code>resolve_heap_via_heuristic</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.current","title":"current <code>module-attribute</code>","text":"<pre><code>current: MemoryAllocator | None = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.main_arena","title":"main_arena <code>module-attribute</code>","text":"<pre><code>main_arena = add_heap_param('main-arena', '0', 'the address of main_arena')\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.thread_arena","title":"thread_arena <code>module-attribute</code>","text":"<pre><code>thread_arena = add_heap_param(\n \"thread-arena\", \"0\", \"the address pointed by thread_arena\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.mp_","title":"mp_ <code>module-attribute</code>","text":"<pre><code>mp_ = add_heap_param('mp', '0', 'the address of mp_')\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.tcache","title":"tcache <code>module-attribute</code>","text":"<pre><code>tcache = add_heap_param('tcache', '0', 'the address pointed by tcache')\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.global_max_fast","title":"global_max_fast <code>module-attribute</code>","text":"<pre><code>global_max_fast = add_heap_param(\n \"global-max-fast\", \"0\", \"the address of global_max_fast\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.symbol_list","title":"symbol_list <code>module-attribute</code>","text":"<pre><code>symbol_list = [main_arena, thread_arena, mp_, tcache, global_max_fast]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.heap_chain_limit","title":"heap_chain_limit <code>module-attribute</code>","text":"<pre><code>heap_chain_limit = add_heap_param(\n \"heap-dereference-limit\",\n 8,\n \"number of chunks to dereference in each bin\",\n param_class=PARAM_UINTEGER,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.heap_corruption_check_limit","title":"heap_corruption_check_limit <code>module-attribute</code>","text":"<pre><code>heap_corruption_check_limit = add_heap_param(\n \"heap-corruption-check-limit\",\n 64,\n \"amount of chunks to traverse for the bin corruption check\",\n param_class=PARAM_UINTEGER,\n help_docstring=\"\\nThe bins are traversed both forwards and backwards.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.resolve_heap_via_heuristic","title":"resolve_heap_via_heuristic <code>module-attribute</code>","text":"<pre><code>resolve_heap_via_heuristic = add_heap_param(\n \"resolve-heap-via-heuristic\",\n \"auto\",\n \"the strategy to resolve heap via heuristic\",\n help_docstring=\"resolve-heap-via-heuristic can be:\\nauto - pwndbg will try to use heuristics if debug symbols are missing\\nforce - pwndbg will always try to use heuristics, even if debug symbols are available\\nnever - pwndbg will never use heuristics to resolve the heap\\n\\nIf the output of the heap related command produces errors with heuristics, you can try manually setting the libc symbol addresses.\\nFor this, see the `heap-config` command output and set the `main_arena`, `mp_`, `global_max_fast`, `tcache` and `thread_arena` addresses.\\n\\nNote: pwndbg will generate more reliable results with proper debug symbols.\\nTherefore, when debug symbols are missing, you should try to install them first if you haven't already.\\n\\nThey can probably be installed via the package manager of your choice.\\nSee also: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html\\n\\nE.g. on Ubuntu/Debian you might need to do the following steps (for 64-bit and 32-bit binaries):\\nsudo apt-get install libc6-dbg\\nsudo dpkg --add-architecture i386\\nsudo apt-get install libc-dbg:i386\\n\\nIf you used setup.sh on Arch based distro you'll need to do a power cycle or set environment variable manually like this: export DEBUGINFOD_URLS=https://debuginfod.archlinux.org\\n\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"auto\", \"force\", \"never\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.add_heap_param","title":"add_heap_param","text":"<pre><code>add_heap_param(\n name: str,\n default: Any,\n set_show_doc: str,\n *,\n help_docstring: str = \"\",\n param_class: int | None = None,\n enum_sequence: Sequence[str] | None = None,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.update","title":"update","text":"<pre><code>update() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.reset","title":"reset","text":"<pre><code>reset() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.resolve_heap","title":"resolve_heap","text":"<pre><code>resolve_heap(is_first_run: bool = False) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/heap/","title":"pwndbg.aglib.heap.heap","text":""},{"location":"reference/pwndbg/aglib/heap/heap/#pwndbg.aglib.heap.heap","title":"heap","text":"<p>Classes:</p> <ul> <li> <code>MemoryAllocator</code> \u2013 <p>Heap abstraction layer.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/heap/#pwndbg.aglib.heap.heap.MemoryAllocator","title":"MemoryAllocator","text":"<p>Heap abstraction layer.</p> <p>Methods:</p> <ul> <li> <code>summarize</code> \u2013 <p>Returns a textual summary of the specified address.</p> </li> <li> <code>containing</code> \u2013 <p>Returns the address of the allocation which contains 'address'.</p> </li> <li> <code>is_initialized</code> \u2013 <p>Returns whether the allocator is initialized or not.</p> </li> <li> <code>libc_has_debug_syms</code> \u2013 <p>Returns whether the libc has debug symbols or not.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/heap/#pwndbg.aglib.heap.heap.MemoryAllocator.summarize","title":"summarize","text":"<pre><code>summarize(address: int, **kwargs: Any) -> str\n</code></pre> <p>Returns a textual summary of the specified address.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address of the heap block to summarize.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>str</code> \u2013 <p>A string.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/heap/#pwndbg.aglib.heap.heap.MemoryAllocator.containing","title":"containing","text":"<pre><code>containing(address: int) -> int\n</code></pre> <p>Returns the address of the allocation which contains 'address'.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to look up.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>int</code> \u2013 <p>An integer.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/heap/#pwndbg.aglib.heap.heap.MemoryAllocator.is_initialized","title":"is_initialized","text":"<pre><code>is_initialized() -> bool\n</code></pre> <p>Returns whether the allocator is initialized or not.</p> <p>Returns:</p> <ul> <li> <code>bool</code> \u2013 <p>A boolean.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/heap/#pwndbg.aglib.heap.heap.MemoryAllocator.libc_has_debug_syms","title":"libc_has_debug_syms","text":"<pre><code>libc_has_debug_syms() -> bool\n</code></pre> <p>Returns whether the libc has debug symbols or not.</p> <p>Returns:</p> <ul> <li> <code>bool</code> \u2013 <p>A boolean.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/","title":"pwndbg.aglib.heap.jemalloc","text":""},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc","title":"jemalloc","text":"<p>Classes:</p> <ul> <li> <code>RTree</code> \u2013 <p>RTree is used by jemalloc to keep track of extents that are allocated by jemalloc.</p> </li> <li> <code>Extent</code> \u2013 <p>Concept of extent (edata) is similar to chunk in glibc malloc but allocation algorithm differs a lot.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>mask</code> \u2013 </li> <li> <code>lg_floor_1</code> \u2013 </li> <li> <code>lg_floor_2</code> \u2013 </li> <li> <code>lg_floor_4</code> \u2013 </li> <li> <code>lg_floor_8</code> \u2013 </li> <li> <code>lg_floor_16</code> \u2013 </li> <li> <code>lg_floor_32</code> \u2013 </li> <li> <code>lg_floor_64</code> \u2013 </li> <li> <code>lg_floor</code> \u2013 </li> <li> <code>lg_ceil</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>LG_VADDR</code> \u2013 </li> <li> <code>LG_PAGE</code> \u2013 </li> <li> <code>MALLOCX_ARENA_BITS</code> \u2013 </li> <li> <code>LG_SIZEOF_PTR</code> \u2013 </li> <li> <code>RTREE_NHIB</code> \u2013 </li> <li> <code>RTREE_NLIB</code> \u2013 </li> <li> <code>RTREE_NSB</code> \u2013 </li> <li> <code>RTREE_HEIGHT</code> \u2013 </li> <li> <code>LG_QUANTUM</code> \u2013 </li> <li> <code>SC_LG_TINY_MIN</code> \u2013 </li> <li> <code>SC_NTINY</code> \u2013 </li> <li> <code>SC_LG_NGROUP</code> \u2013 </li> <li> <code>SC_NGROUP</code> \u2013 </li> <li> <code>SC_NPSEUDO</code> \u2013 </li> <li> <code>SC_PTR_BITS</code> \u2013 </li> <li> <code>SC_LG_BASE_MAX</code> \u2013 </li> <li> <code>SC_LG_FIRST_REGULAR_BASE</code> \u2013 </li> <li> <code>SC_NREGULAR</code> \u2013 </li> <li> <code>SC_NSIZES</code> \u2013 </li> <li> <code>SC_LG_SLAB_MAXREGS</code> \u2013 </li> <li> <code>EDATA_BITS_ARENA_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_ARENA_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_ARENA_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_SLAB_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_SLAB_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_SLAB_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_COMMITTED_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_COMMITTED_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_COMMITTED_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_PAI_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_PAI_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_PAI_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_ZEROED_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_ZEROED_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_ZEROED_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_GUARDED_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_GUARDED_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_GUARDED_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_STATE_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_STATE_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_STATE_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_SZIND_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_SZIND_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_SZIND_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_NFREE_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_NFREE_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_NFREE_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_BINSHARD_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_BINSHARD_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_BINSHARD_MASK</code> \u2013 </li> <li> <code>EDATA_BITS_IS_HEAD_WIDTH</code> \u2013 </li> <li> <code>EDATA_BITS_IS_HEAD_SHIFT</code> \u2013 </li> <li> <code>EDATA_BITS_IS_HEAD_MASK</code> \u2013 </li> <li> <code>rtree_levels</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.LG_VADDR","title":"LG_VADDR <code>module-attribute</code>","text":"<pre><code>LG_VADDR = 48\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.LG_PAGE","title":"LG_PAGE <code>module-attribute</code>","text":"<pre><code>LG_PAGE = 12\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.MALLOCX_ARENA_BITS","title":"MALLOCX_ARENA_BITS <code>module-attribute</code>","text":"<pre><code>MALLOCX_ARENA_BITS = 12\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.LG_SIZEOF_PTR","title":"LG_SIZEOF_PTR <code>module-attribute</code>","text":"<pre><code>LG_SIZEOF_PTR = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTREE_NHIB","title":"RTREE_NHIB <code>module-attribute</code>","text":"<pre><code>RTREE_NHIB = 1 << LG_SIZEOF_PTR + 3 - LG_VADDR\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTREE_NLIB","title":"RTREE_NLIB <code>module-attribute</code>","text":"<pre><code>RTREE_NLIB = LG_PAGE\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTREE_NSB","title":"RTREE_NSB <code>module-attribute</code>","text":"<pre><code>RTREE_NSB = LG_VADDR - RTREE_NLIB\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTREE_HEIGHT","title":"RTREE_HEIGHT <code>module-attribute</code>","text":"<pre><code>RTREE_HEIGHT = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.LG_QUANTUM","title":"LG_QUANTUM <code>module-attribute</code>","text":"<pre><code>LG_QUANTUM = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_LG_TINY_MIN","title":"SC_LG_TINY_MIN <code>module-attribute</code>","text":"<pre><code>SC_LG_TINY_MIN = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_NTINY","title":"SC_NTINY <code>module-attribute</code>","text":"<pre><code>SC_NTINY = LG_QUANTUM - SC_LG_TINY_MIN\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_LG_NGROUP","title":"SC_LG_NGROUP <code>module-attribute</code>","text":"<pre><code>SC_LG_NGROUP = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_NGROUP","title":"SC_NGROUP <code>module-attribute</code>","text":"<pre><code>SC_NGROUP = 1 << SC_LG_NGROUP\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_NPSEUDO","title":"SC_NPSEUDO <code>module-attribute</code>","text":"<pre><code>SC_NPSEUDO = SC_NGROUP\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_PTR_BITS","title":"SC_PTR_BITS <code>module-attribute</code>","text":"<pre><code>SC_PTR_BITS = 1 << LG_SIZEOF_PTR * 8\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_LG_BASE_MAX","title":"SC_LG_BASE_MAX <code>module-attribute</code>","text":"<pre><code>SC_LG_BASE_MAX = SC_PTR_BITS - 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_LG_FIRST_REGULAR_BASE","title":"SC_LG_FIRST_REGULAR_BASE <code>module-attribute</code>","text":"<pre><code>SC_LG_FIRST_REGULAR_BASE = LG_QUANTUM + SC_LG_NGROUP\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_NREGULAR","title":"SC_NREGULAR <code>module-attribute</code>","text":"<pre><code>SC_NREGULAR = SC_NGROUP * SC_LG_BASE_MAX - SC_LG_FIRST_REGULAR_BASE + 1 - 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_NSIZES","title":"SC_NSIZES <code>module-attribute</code>","text":"<pre><code>SC_NSIZES = SC_NTINY + SC_NPSEUDO + SC_NREGULAR\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.SC_LG_SLAB_MAXREGS","title":"SC_LG_SLAB_MAXREGS <code>module-attribute</code>","text":"<pre><code>SC_LG_SLAB_MAXREGS = LG_PAGE - SC_LG_TINY_MIN\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_ARENA_WIDTH","title":"EDATA_BITS_ARENA_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_ARENA_WIDTH = MALLOCX_ARENA_BITS\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_ARENA_SHIFT","title":"EDATA_BITS_ARENA_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_ARENA_SHIFT = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_ARENA_MASK","title":"EDATA_BITS_ARENA_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_ARENA_MASK = mask(EDATA_BITS_ARENA_WIDTH, EDATA_BITS_ARENA_SHIFT)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_SLAB_WIDTH","title":"EDATA_BITS_SLAB_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_SLAB_WIDTH = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_SLAB_SHIFT","title":"EDATA_BITS_SLAB_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_SLAB_SHIFT = EDATA_BITS_ARENA_WIDTH + EDATA_BITS_ARENA_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_SLAB_MASK","title":"EDATA_BITS_SLAB_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_SLAB_MASK = mask(EDATA_BITS_SLAB_WIDTH, EDATA_BITS_SLAB_SHIFT)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_COMMITTED_WIDTH","title":"EDATA_BITS_COMMITTED_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_COMMITTED_WIDTH = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_COMMITTED_SHIFT","title":"EDATA_BITS_COMMITTED_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_COMMITTED_SHIFT = EDATA_BITS_SLAB_WIDTH + EDATA_BITS_SLAB_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_COMMITTED_MASK","title":"EDATA_BITS_COMMITTED_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_COMMITTED_MASK = mask(\n EDATA_BITS_COMMITTED_WIDTH, EDATA_BITS_COMMITTED_SHIFT\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_PAI_WIDTH","title":"EDATA_BITS_PAI_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_PAI_WIDTH = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_PAI_SHIFT","title":"EDATA_BITS_PAI_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_PAI_SHIFT = EDATA_BITS_COMMITTED_WIDTH + EDATA_BITS_COMMITTED_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_PAI_MASK","title":"EDATA_BITS_PAI_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_PAI_MASK = mask(EDATA_BITS_PAI_WIDTH, EDATA_BITS_PAI_SHIFT)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_ZEROED_WIDTH","title":"EDATA_BITS_ZEROED_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_ZEROED_WIDTH = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_ZEROED_SHIFT","title":"EDATA_BITS_ZEROED_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_ZEROED_SHIFT = EDATA_BITS_PAI_WIDTH + EDATA_BITS_PAI_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_ZEROED_MASK","title":"EDATA_BITS_ZEROED_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_ZEROED_MASK = mask(EDATA_BITS_ZEROED_WIDTH, EDATA_BITS_ZEROED_SHIFT)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_GUARDED_WIDTH","title":"EDATA_BITS_GUARDED_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_GUARDED_WIDTH = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_GUARDED_SHIFT","title":"EDATA_BITS_GUARDED_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_GUARDED_SHIFT = EDATA_BITS_ZEROED_WIDTH + EDATA_BITS_ZEROED_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_GUARDED_MASK","title":"EDATA_BITS_GUARDED_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_GUARDED_MASK = mask(\n EDATA_BITS_GUARDED_WIDTH, EDATA_BITS_GUARDED_SHIFT\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_STATE_WIDTH","title":"EDATA_BITS_STATE_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_STATE_WIDTH = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_STATE_SHIFT","title":"EDATA_BITS_STATE_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_STATE_SHIFT = EDATA_BITS_GUARDED_WIDTH + EDATA_BITS_GUARDED_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_STATE_MASK","title":"EDATA_BITS_STATE_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_STATE_MASK = mask(EDATA_BITS_STATE_WIDTH, EDATA_BITS_STATE_SHIFT)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_SZIND_WIDTH","title":"EDATA_BITS_SZIND_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_SZIND_WIDTH = lg_ceil(SC_NSIZES)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_SZIND_SHIFT","title":"EDATA_BITS_SZIND_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_SZIND_SHIFT = EDATA_BITS_STATE_WIDTH + EDATA_BITS_STATE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_SZIND_MASK","title":"EDATA_BITS_SZIND_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_SZIND_MASK = mask(EDATA_BITS_SZIND_WIDTH, EDATA_BITS_SZIND_SHIFT)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_NFREE_WIDTH","title":"EDATA_BITS_NFREE_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_NFREE_WIDTH = SC_LG_SLAB_MAXREGS + 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_NFREE_SHIFT","title":"EDATA_BITS_NFREE_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_NFREE_SHIFT = EDATA_BITS_SZIND_WIDTH + EDATA_BITS_SZIND_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_NFREE_MASK","title":"EDATA_BITS_NFREE_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_NFREE_MASK = mask(EDATA_BITS_NFREE_WIDTH, EDATA_BITS_NFREE_SHIFT)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_BINSHARD_WIDTH","title":"EDATA_BITS_BINSHARD_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_BINSHARD_WIDTH = 6\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_BINSHARD_SHIFT","title":"EDATA_BITS_BINSHARD_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_BINSHARD_SHIFT = EDATA_BITS_NFREE_WIDTH + EDATA_BITS_NFREE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_BINSHARD_MASK","title":"EDATA_BITS_BINSHARD_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_BINSHARD_MASK = mask(\n EDATA_BITS_BINSHARD_WIDTH, EDATA_BITS_BINSHARD_SHIFT\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_IS_HEAD_WIDTH","title":"EDATA_BITS_IS_HEAD_WIDTH <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_IS_HEAD_WIDTH = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_IS_HEAD_SHIFT","title":"EDATA_BITS_IS_HEAD_SHIFT <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_IS_HEAD_SHIFT = EDATA_BITS_BINSHARD_WIDTH + EDATA_BITS_BINSHARD_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.EDATA_BITS_IS_HEAD_MASK","title":"EDATA_BITS_IS_HEAD_MASK <code>module-attribute</code>","text":"<pre><code>EDATA_BITS_IS_HEAD_MASK = mask(\n EDATA_BITS_IS_HEAD_WIDTH, EDATA_BITS_IS_HEAD_SHIFT\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.rtree_levels","title":"rtree_levels <code>module-attribute</code>","text":"<pre><code>rtree_levels = [\n [{\"bits\": RTREE_NSB, \"cumbits\": RTREE_NHIB + RTREE_NSB}],\n [\n {\"bits\": RTREE_NSB // 2, \"cumbits\": RTREE_NHIB + RTREE_NSB // 2},\n {\n \"bits\": RTREE_NSB // 2 + RTREE_NSB % 2,\n \"cumbits\": RTREE_NHIB + RTREE_NSB,\n },\n ],\n [\n {\"bits\": RTREE_NSB // 3, \"cumbits\": RTREE_NHIB + RTREE_NSB // 3},\n {\n \"bits\": RTREE_NSB // 3 + RTREE_NSB % 3 // 2,\n \"cumbits\": RTREE_NHIB + RTREE_NSB // 3 * 2 + RTREE_NSB % 3 // 2,\n },\n {\n \"bits\": RTREE_NSB // 3 + RTREE_NSB % 3 - RTREE_NSB % 3 // 2,\n \"cumbits\": RTREE_NHIB + RTREE_NSB,\n },\n ],\n]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree","title":"RTree","text":"<pre><code>RTree(addr: int)\n</code></pre> <p>RTree is used by jemalloc to keep track of extents that are allocated by jemalloc. Since extent data is not stored in a doubly linked list, rtree is used to find the extent belonging to a pointer that is being freed. Implementation of rtree is similar to Linux Radix tree: https://lwn.net/Articles/175432/</p> <p>Methods:</p> <ul> <li> <code>get_rtree</code> \u2013 </li> <li> <code>lookup_hard</code> \u2013 <p>Lookup the key in the rtree and return the value.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>root</code> \u2013 </li> <li> <code>extents</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.root","title":"root <code>property</code>","text":"<pre><code>root\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.extents","title":"extents <code>property</code>","text":"<pre><code>extents\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.get_rtree","title":"get_rtree <code>staticmethod</code>","text":"<pre><code>get_rtree() -> RTree\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.__rtree_leaf_maskbits","title":"__rtree_leaf_maskbits","text":"<pre><code>__rtree_leaf_maskbits(level)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.__rtree_leafkey","title":"__rtree_leafkey","text":"<pre><code>__rtree_leafkey(key: int, level: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.__subkey","title":"__subkey","text":"<pre><code>__subkey(key: int, level: int) -> int\n</code></pre> <p>Return a portion of the key that is used to find the node/leaf in the rtree at a specific level. Source: https://github.com/jemalloc/jemalloc/blob/5b72ac098abce464add567869d082f2097bd59a2/include/jemalloc/internal/rtree.h#L161</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.__alignment_addr2base","title":"__alignment_addr2base <code>staticmethod</code>","text":"<pre><code>__alignment_addr2base(addr, alignment=64)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.RTree.lookup_hard","title":"lookup_hard","text":"<pre><code>lookup_hard(key: int)\n</code></pre> <p>Lookup the key in the rtree and return the value.</p> <p>How it works: - Jemalloc stores the extent address in the rtree as a node and to find a specific node we need a address key.</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent","title":"Extent","text":"<pre><code>Extent(addr: int)\n</code></pre> <p>Concept of extent (edata) is similar to chunk in glibc malloc but allocation algorithm differs a lot. - Extents are used to manage memory blocks (including jemalloc metadata) where extents sizes can vary but each block is always a multiple of the page size. - jemalloc will either allocate one large class request or multiple small class request (called slab) depending on request size. - Unlike chunks in glibc malloc, extents are not doubly linked list but are managed using rtree. - This tree is mostly used during deallocation to find the extent belonging to a pointer that is being freed. - Extents are also not stored as a header structure but externally (therefore extent metadata and actually mapped data may be very far apart).</p> <p>Attributes:</p> <ul> <li> <code>size</code> \u2013 <p>May be larger in case of large size class allocation when cache_oblivious is enabled.</p> </li> <li> <code>extent_address</code> (<code>int</code>) \u2013 <p>Address of the extent data structure (not the actual memory).</p> </li> <li> <code>allocated_address</code> (<code>int</code>) \u2013 <p>Starting address of allocated memory</p> </li> <li> <code>bsize</code> (<code>int</code>) \u2013 </li> <li> <code>bits</code> (<code>int</code>) \u2013 </li> <li> <code>bitfields</code> (<code>dict[str, int]</code>) \u2013 <p>Extract bitfields</p> </li> <li> <code>state_name</code> (<code>str</code>) \u2013 </li> <li> <code>has_slab</code> (<code>bool</code>) \u2013 <p>Returns True if the extent is used for small size classes.</p> </li> <li> <code>is_free</code> (<code>bool</code>) \u2013 <p>Returns True if the extent is free.</p> </li> <li> <code>pai</code> (<code>str</code>) \u2013 <p>Page Allocator Interface</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.size","title":"size <code>property</code>","text":"<pre><code>size\n</code></pre> <p>May be larger in case of large size class allocation when cache_oblivious is enabled.</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.extent_address","title":"extent_address <code>property</code>","text":"<pre><code>extent_address: int\n</code></pre> <p>Address of the extent data structure (not the actual memory).</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.allocated_address","title":"allocated_address <code>property</code>","text":"<pre><code>allocated_address: int\n</code></pre> <p>Starting address of allocated memory cache-oblivious large allocation alignment: When a large class allocation is made, jemalloc selects the closest size class that can fit the request and allocates that size + 4 KiB (0x1000). However, the pointer returned to user is randomized between the 'base' and 'base + 4 KiB' (0x1000) range. Source code: https://github.com/jemalloc/jemalloc/blob/a25b9b8ba91881964be3083db349991bbbbf1661/include/jemalloc/internal/arena_inlines_b.h#L505</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.bsize","title":"bsize <code>property</code>","text":"<pre><code>bsize: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.bits","title":"bits <code>property</code>","text":"<pre><code>bits: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.bitfields","title":"bitfields <code>property</code>","text":"<pre><code>bitfields: dict[str, int]\n</code></pre> <p>Extract bitfields</p> <p>arena_ind: Arena from which this extent came, or all 1 bits if unassociated. slab: The slab flag indicates whether the extent is used for a slab of small regions. This helps differentiate small size classes, and it indicates whether interior pointers can be looked up via iealloc(). committed: The committed flag indicates whether physical memory is committed to the extent, whether explicitly or implicitly as on a system that overcommits and satisfies physical memory needs on demand via soft page faults. pai: The pai flag is an extent_pai_t. zeroed: The zeroed flag is used by extent recycling code to track whether memory is zero-filled. guarded: The guarded flag is used by the sanitizer to track whether the extent has page guards around it. state: The state flag is an extent_state_t. szind: The szind flag indicates usable size class index for allocations residing in this extent, regardless of whether the extent is a slab. Extent size and usable size often differ even for non-slabs, either due to sz_large_pad or promotion of sampled small regions. nfree: Number of free regions in slab. bin_shard: The shard of the bin from which this extent came.</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.state_name","title":"state_name <code>property</code>","text":"<pre><code>state_name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.has_slab","title":"has_slab <code>property</code>","text":"<pre><code>has_slab: bool\n</code></pre> <p>Returns True if the extent is used for small size classes. Reference for size in Table 1 at https://jemalloc.net/jemalloc.3.html At time of writing, allocations <= 0x3800 are considered as small allocations and has slabs.</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.is_free","title":"is_free <code>property</code>","text":"<pre><code>is_free: bool\n</code></pre> <p>Returns True if the extent is free.</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.Extent.pai","title":"pai <code>property</code>","text":"<pre><code>pai: str\n</code></pre> <p>Page Allocator Interface</p>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.mask","title":"mask","text":"<pre><code>mask(current_field_width, current_field_shift)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor_1","title":"lg_floor_1","text":"<pre><code>lg_floor_1(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor_2","title":"lg_floor_2","text":"<pre><code>lg_floor_2(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor_4","title":"lg_floor_4","text":"<pre><code>lg_floor_4(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor_8","title":"lg_floor_8","text":"<pre><code>lg_floor_8(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor_16","title":"lg_floor_16","text":"<pre><code>lg_floor_16(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor_32","title":"lg_floor_32","text":"<pre><code>lg_floor_32(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor_64","title":"lg_floor_64","text":"<pre><code>lg_floor_64(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_floor","title":"lg_floor","text":"<pre><code>lg_floor(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/jemalloc/#pwndbg.aglib.heap.jemalloc.lg_ceil","title":"lg_ceil","text":"<pre><code>lg_ceil(x)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/","title":"pwndbg.aglib.heap.ptmalloc","text":""},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc","title":"ptmalloc","text":"<p>Classes:</p> <ul> <li> <code>BinType</code> \u2013 </li> <li> <code>Bin</code> \u2013 </li> <li> <code>Bins</code> \u2013 </li> <li> <code>ChunkField</code> \u2013 </li> <li> <code>Chunk</code> \u2013 </li> <li> <code>Heap</code> \u2013 </li> <li> <code>Arena</code> \u2013 </li> <li> <code>GlibcMemoryAllocator</code> \u2013 </li> <li> <code>DebugSymsHeap</code> \u2013 </li> <li> <code>SymbolUnresolvableError</code> \u2013 </li> <li> <code>HeuristicHeap</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>heap_for_ptr</code> \u2013 <p>Round a pointer to a chunk down to find its corresponding heap_info</p> </li> <li> <code>fetch_chunk_metadata</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>PREV_INUSE</code> \u2013 </li> <li> <code>IS_MMAPPED</code> \u2013 </li> <li> <code>NON_MAIN_ARENA</code> \u2013 </li> <li> <code>SIZE_BITS</code> \u2013 </li> <li> <code>NONCONTIGUOUS_BIT</code> \u2013 </li> <li> <code>TheType</code> \u2013 </li> <li> <code>TheValue</code> \u2013 </li> <li> <code>HEAP_MAX_SIZE</code> (<code>int</code>) \u2013 </li> <li> <code>NBINS</code> \u2013 </li> <li> <code>BINMAPSIZE</code> \u2013 </li> <li> <code>TCACHE_MAX_BINS</code> \u2013 </li> <li> <code>NFASTBINS</code> \u2013 </li> <li> <code>NSMALLBINS</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.PREV_INUSE","title":"PREV_INUSE <code>module-attribute</code>","text":"<pre><code>PREV_INUSE = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.IS_MMAPPED","title":"IS_MMAPPED <code>module-attribute</code>","text":"<pre><code>IS_MMAPPED = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.NON_MAIN_ARENA","title":"NON_MAIN_ARENA <code>module-attribute</code>","text":"<pre><code>NON_MAIN_ARENA = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.SIZE_BITS","title":"SIZE_BITS <code>module-attribute</code>","text":"<pre><code>SIZE_BITS = PREV_INUSE | IS_MMAPPED | NON_MAIN_ARENA\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.NONCONTIGUOUS_BIT","title":"NONCONTIGUOUS_BIT <code>module-attribute</code>","text":"<pre><code>NONCONTIGUOUS_BIT = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.TheType","title":"TheType <code>module-attribute</code>","text":"<pre><code>TheType = TypeVar('TheType', Type, Type[CStruct2GDB])\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.TheValue","title":"TheValue <code>module-attribute</code>","text":"<pre><code>TheValue = TypeVar('TheValue', Value, CStruct2GDB)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HEAP_MAX_SIZE","title":"HEAP_MAX_SIZE <code>module-attribute</code>","text":"<pre><code>HEAP_MAX_SIZE: int = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.NBINS","title":"NBINS <code>module-attribute</code>","text":"<pre><code>NBINS = 128\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BINMAPSIZE","title":"BINMAPSIZE <code>module-attribute</code>","text":"<pre><code>BINMAPSIZE = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.TCACHE_MAX_BINS","title":"TCACHE_MAX_BINS <code>module-attribute</code>","text":"<pre><code>TCACHE_MAX_BINS = 64\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.NFASTBINS","title":"NFASTBINS <code>module-attribute</code>","text":"<pre><code>NFASTBINS = 10\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.NSMALLBINS","title":"NSMALLBINS <code>module-attribute</code>","text":"<pre><code>NSMALLBINS = 64\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType","title":"BinType","text":"<p> Bases: <code>str</code>, <code>Enum</code></p> <p>Methods:</p> <ul> <li> <code>valid_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>TCACHE</code> \u2013 </li> <li> <code>FAST</code> \u2013 </li> <li> <code>SMALL</code> \u2013 </li> <li> <code>LARGE</code> \u2013 </li> <li> <code>UNSORTED</code> \u2013 </li> <li> <code>NOT_IN_BIN</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType.TCACHE","title":"TCACHE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>TCACHE = 'tcachebins'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType.FAST","title":"FAST <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FAST = 'fastbins'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType.SMALL","title":"SMALL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SMALL = 'smallbins'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType.LARGE","title":"LARGE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>LARGE = 'largebins'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType.UNSORTED","title":"UNSORTED <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UNSORTED = 'unsortedbin'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType.NOT_IN_BIN","title":"NOT_IN_BIN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NOT_IN_BIN = 'not_in_bin'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.BinType.valid_fields","title":"valid_fields","text":"<pre><code>valid_fields() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bin","title":"Bin","text":"<pre><code>Bin(\n fd_chain: list[int],\n bk_chain: list[int] | None = None,\n count: int | None = None,\n is_corrupted: bool = False,\n)\n</code></pre> <p>Methods:</p> <ul> <li> <code>contains_chunk</code> \u2013 </li> <li> <code>size_to_display_name</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>fd_chain</code> \u2013 </li> <li> <code>bk_chain</code> \u2013 </li> <li> <code>count</code> \u2013 </li> <li> <code>is_corrupted</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bin.fd_chain","title":"fd_chain <code>instance-attribute</code>","text":"<pre><code>fd_chain = fd_chain\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bin.bk_chain","title":"bk_chain <code>instance-attribute</code>","text":"<pre><code>bk_chain = bk_chain\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bin.count","title":"count <code>instance-attribute</code>","text":"<pre><code>count = count\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bin.is_corrupted","title":"is_corrupted <code>instance-attribute</code>","text":"<pre><code>is_corrupted = is_corrupted\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bin.contains_chunk","title":"contains_chunk","text":"<pre><code>contains_chunk(chunk: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bin.size_to_display_name","title":"size_to_display_name <code>staticmethod</code>","text":"<pre><code>size_to_display_name(size: int | str) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bins","title":"Bins","text":"<pre><code>Bins(bin_type: BinType)\n</code></pre> <p>Methods:</p> <ul> <li> <code>contains_chunk</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>bins</code> (<code>OrderedDict[int | str, Bin]</code>) \u2013 </li> <li> <code>bin_type</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bins.bins","title":"bins <code>instance-attribute</code>","text":"<pre><code>bins: OrderedDict[int | str, Bin] = OrderedDict()\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bins.bin_type","title":"bin_type <code>instance-attribute</code>","text":"<pre><code>bin_type = bin_type\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Bins.contains_chunk","title":"contains_chunk","text":"<pre><code>contains_chunk(size: int, chunk: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.ChunkField","title":"ChunkField","text":"<p> Bases: <code>int</code>, <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>PREV_SIZE</code> \u2013 </li> <li> <code>SIZE</code> \u2013 </li> <li> <code>FD</code> \u2013 </li> <li> <code>BK</code> \u2013 </li> <li> <code>FD_NEXTSIZE</code> \u2013 </li> <li> <code>BK_NEXTSIZE</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.ChunkField.PREV_SIZE","title":"PREV_SIZE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PREV_SIZE = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.ChunkField.SIZE","title":"SIZE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SIZE = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.ChunkField.FD","title":"FD <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FD = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.ChunkField.BK","title":"BK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>BK = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.ChunkField.FD_NEXTSIZE","title":"FD_NEXTSIZE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FD_NEXTSIZE = 5\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.ChunkField.BK_NEXTSIZE","title":"BK_NEXTSIZE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>BK_NEXTSIZE = 6\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk","title":"Chunk","text":"<pre><code>Chunk(addr: int, heap: Heap | None = None, arena: Arena | None = None)\n</code></pre> <p>Methods:</p> <ul> <li> <code>next_chunk</code> \u2013 </li> <li> <code>__contains__</code> \u2013 <p>This allow us to avoid extra constructions like 'if start_addr <= ptr < end_addr', etc.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>__slots__</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>prev_size</code> (<code>int | None</code>) \u2013 </li> <li> <code>size</code> (<code>int | None</code>) \u2013 </li> <li> <code>real_size</code> (<code>int | None</code>) \u2013 </li> <li> <code>flags</code> (<code>dict[str, bool] | None</code>) \u2013 </li> <li> <code>non_main_arena</code> (<code>bool | None</code>) \u2013 </li> <li> <code>is_mmapped</code> (<code>bool | None</code>) \u2013 </li> <li> <code>prev_inuse</code> (<code>bool | None</code>) \u2013 </li> <li> <code>fd</code> \u2013 </li> <li> <code>bk</code> \u2013 </li> <li> <code>fd_nextsize</code> \u2013 </li> <li> <code>bk_nextsize</code> \u2013 </li> <li> <code>heap</code> (<code>Heap</code>) \u2013 </li> <li> <code>arena</code> (<code>Arena | None</code>) \u2013 </li> <li> <code>is_top_chunk</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.__slots__","title":"__slots__ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>__slots__ = (\n \"_gdbValue\",\n \"address\",\n \"_prev_size\",\n \"_size\",\n \"_real_size\",\n \"_flags\",\n \"_non_main_arena\",\n \"_is_mmapped\",\n \"_prev_inuse\",\n \"_fd\",\n \"_bk\",\n \"_fd_nextsize\",\n \"_bk_nextsize\",\n \"_heap\",\n \"_arena\",\n \"_is_top_chunk\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = int(address)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.prev_size","title":"prev_size <code>property</code>","text":"<pre><code>prev_size: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.size","title":"size <code>property</code>","text":"<pre><code>size: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.real_size","title":"real_size <code>property</code>","text":"<pre><code>real_size: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.flags","title":"flags <code>property</code>","text":"<pre><code>flags: dict[str, bool] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.non_main_arena","title":"non_main_arena <code>property</code>","text":"<pre><code>non_main_arena: bool | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.is_mmapped","title":"is_mmapped <code>property</code>","text":"<pre><code>is_mmapped: bool | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.prev_inuse","title":"prev_inuse <code>property</code>","text":"<pre><code>prev_inuse: bool | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.fd","title":"fd <code>property</code>","text":"<pre><code>fd\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.bk","title":"bk <code>property</code>","text":"<pre><code>bk\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.fd_nextsize","title":"fd_nextsize <code>property</code>","text":"<pre><code>fd_nextsize\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.bk_nextsize","title":"bk_nextsize <code>property</code>","text":"<pre><code>bk_nextsize\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.heap","title":"heap <code>property</code>","text":"<pre><code>heap: Heap\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.arena","title":"arena <code>property</code>","text":"<pre><code>arena: Arena | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.is_top_chunk","title":"is_top_chunk <code>property</code>","text":"<pre><code>is_top_chunk\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.__match_renamed_field","title":"__match_renamed_field","text":"<pre><code>__match_renamed_field(field: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.next_chunk","title":"next_chunk","text":"<pre><code>next_chunk()\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Chunk.__contains__","title":"__contains__","text":"<pre><code>__contains__(addr: int) -> bool\n</code></pre> <p>This allow us to avoid extra constructions like 'if start_addr <= ptr < end_addr', etc.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap","title":"Heap","text":"<pre><code>Heap(addr: int, arena: Arena | None = None)\n</code></pre> <p>1) main_arena - uses the sbrk heap 2) non-main arena - heap starts after its heap_info struct (and possibly an arena) 3) non-contiguous main_arena - just a memory region 4) no arena - for fake/mmapped chunks</p> <p>Methods:</p> <ul> <li> <code>__iter__</code> \u2013 </li> <li> <code>__contains__</code> \u2013 </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>__slots__</code> \u2013 </li> <li> <code>arena</code> \u2013 </li> <li> <code>start</code> (<code>int</code>) \u2013 </li> <li> <code>end</code> (<code>int</code>) \u2013 </li> <li> <code>first_chunk</code> \u2013 </li> <li> <code>prev</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.__slots__","title":"__slots__ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>__slots__ = (\n \"_gdbValue\",\n \"arena\",\n \"_memory_region\",\n \"start\",\n \"end\",\n \"_prev\",\n \"first_chunk\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.arena","title":"arena <code>instance-attribute</code>","text":"<pre><code>arena = main_arena if arena is None else arena\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.start","title":"start <code>instance-attribute</code>","text":"<pre><code>start: int = start\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.end","title":"end <code>instance-attribute</code>","text":"<pre><code>end: int = end\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.first_chunk","title":"first_chunk <code>instance-attribute</code>","text":"<pre><code>first_chunk = Chunk(start)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.prev","title":"prev <code>property</code>","text":"<pre><code>prev\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.__iter__","title":"__iter__","text":"<pre><code>__iter__()\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.__contains__","title":"__contains__","text":"<pre><code>__contains__(addr: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena","title":"Arena","text":"<pre><code>Arena(addr: int)\n</code></pre> <p>Methods:</p> <ul> <li> <code>fastbins</code> \u2013 </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>__slots__</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>is_main_arena</code> (<code>bool</code>) \u2013 </li> <li> <code>mutex</code> (<code>int | None</code>) \u2013 </li> <li> <code>flags</code> (<code>int | None</code>) \u2013 </li> <li> <code>non_contiguous</code> (<code>bool | None</code>) \u2013 </li> <li> <code>have_fastchunks</code> (<code>int | None</code>) \u2013 </li> <li> <code>top</code> (<code>int | None</code>) \u2013 </li> <li> <code>fastbinsY</code> (<code>list[int]</code>) \u2013 </li> <li> <code>bins</code> (<code>list[int]</code>) \u2013 </li> <li> <code>binmap</code> (<code>list[int]</code>) \u2013 </li> <li> <code>next</code> (<code>int | None</code>) \u2013 </li> <li> <code>next_free</code> (<code>int | None</code>) \u2013 </li> <li> <code>system_mem</code> (<code>int | None</code>) \u2013 </li> <li> <code>active_heap</code> (<code>Heap</code>) \u2013 </li> <li> <code>heaps</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.__slots__","title":"__slots__ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>__slots__ = (\n \"_gdbValue\",\n \"address\",\n \"_is_main_arena\",\n \"_top\",\n \"_active_heap\",\n \"_heaps\",\n \"_mutex\",\n \"_flags\",\n \"_non_contiguous\",\n \"_have_fastchunks\",\n \"_fastbinsY\",\n \"_bins\",\n \"_binmap\",\n \"_next\",\n \"_next_free\",\n \"_system_mem\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = int(address)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.is_main_arena","title":"is_main_arena <code>property</code>","text":"<pre><code>is_main_arena: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.mutex","title":"mutex <code>property</code>","text":"<pre><code>mutex: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.flags","title":"flags <code>property</code>","text":"<pre><code>flags: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.non_contiguous","title":"non_contiguous <code>property</code>","text":"<pre><code>non_contiguous: bool | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.have_fastchunks","title":"have_fastchunks <code>property</code>","text":"<pre><code>have_fastchunks: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.top","title":"top <code>property</code>","text":"<pre><code>top: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.fastbinsY","title":"fastbinsY <code>property</code>","text":"<pre><code>fastbinsY: list[int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.bins","title":"bins <code>property</code>","text":"<pre><code>bins: list[int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.binmap","title":"binmap <code>property</code>","text":"<pre><code>binmap: list[int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.next","title":"next <code>property</code>","text":"<pre><code>next: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.next_free","title":"next_free <code>property</code>","text":"<pre><code>next_free: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.system_mem","title":"system_mem <code>property</code>","text":"<pre><code>system_mem: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.active_heap","title":"active_heap <code>property</code>","text":"<pre><code>active_heap: Heap\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.heaps","title":"heaps <code>property</code>","text":"<pre><code>heaps\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.fastbins","title":"fastbins","text":"<pre><code>fastbins() -> Bins\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator","title":"GlibcMemoryAllocator","text":"<pre><code>GlibcMemoryAllocator()\n</code></pre> <p> Bases: <code>MemoryAllocator</code>, <code>Generic[TheType, TheValue]</code></p> <p>Methods:</p> <ul> <li> <code>largebin_reverse_lookup</code> \u2013 <p>Pick the appropriate largebin_reverse_lookup_ function for this architecture.</p> </li> <li> <code>largebin_size_range_from_index</code> \u2013 </li> <li> <code>can_be_resolved</code> \u2013 </li> <li> <code>has_tcache</code> \u2013 </li> <li> <code>chunk_flags</code> \u2013 </li> <li> <code>chunk_key_offset</code> \u2013 <p>Find the index of a field in the malloc_chunk struct.</p> </li> <li> <code>get_heap</code> \u2013 </li> <li> <code>get_tcache</code> \u2013 </li> <li> <code>get_sbrk_heap_region</code> \u2013 </li> <li> <code>get_region</code> \u2013 <p>Find the memory map containing 'addr'.</p> </li> <li> <code>get_bins</code> \u2013 </li> <li> <code>fastbin_index</code> \u2013 </li> <li> <code>fastbins</code> \u2013 <p>Returns: chain or None</p> </li> <li> <code>tcachebins</code> \u2013 <p>Returns: tuple(chain, count) or None</p> </li> <li> <code>check_chain_corrupted</code> \u2013 <p>Checks if the doubly linked list (of a {unsorted, small, large} bin)</p> </li> <li> <code>bin_at</code> \u2013 <p>Modeled after glibc's bin_at function - so starts indexing from 1</p> </li> <li> <code>unsortedbin</code> \u2013 </li> <li> <code>smallbins</code> \u2013 </li> <li> <code>largebins</code> \u2013 </li> <li> <code>largebin_index_32</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_32 macro.</p> </li> <li> <code>largebin_index_32_big</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_32_big macro.</p> </li> <li> <code>largebin_index_64</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_64 macro.</p> </li> <li> <code>largebin_index</code> \u2013 <p>Pick the appropriate largebin_index_ function for this architecture.</p> </li> <li> <code>is_initialized</code> \u2013 </li> <li> <code>is_statically_linked</code> \u2013 </li> <li> <code>libc_has_debug_syms</code> \u2013 <p>The <code>struct malloc_chunk</code> comes from debugging symbols and it will not be there</p> </li> <li> <code>summarize</code> \u2013 <p>Returns a textual summary of the specified address.</p> </li> <li> <code>containing</code> \u2013 <p>Returns the address of the allocation which contains 'address'.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>largebin_reverse_lookup_32</code> \u2013 </li> <li> <code>largebin_reverse_lookup_32_big</code> \u2013 </li> <li> <code>largebin_reverse_lookup_64</code> \u2013 </li> <li> <code>main_arena</code> (<code>Arena | None</code>) \u2013 </li> <li> <code>arenas</code> (<code>tuple[Arena, ...]</code>) \u2013 <p>Return a tuple of all current arenas.</p> </li> <li> <code>thread_arena</code> (<code>Arena | None</code>) \u2013 </li> <li> <code>thread_cache</code> (<code>TheValue | None</code>) \u2013 </li> <li> <code>mp</code> (<code>TheValue | None</code>) \u2013 </li> <li> <code>global_max_fast</code> (<code>int | None</code>) \u2013 </li> <li> <code>heap_info</code> (<code>TheType | None</code>) \u2013 </li> <li> <code>malloc_chunk</code> (<code>TheType | None</code>) \u2013 </li> <li> <code>malloc_state</code> (<code>TheType | None</code>) \u2013 </li> <li> <code>tcache_perthread_struct</code> (<code>TheType | None</code>) \u2013 </li> <li> <code>tcache_entry</code> (<code>TheType | None</code>) \u2013 </li> <li> <code>mallinfo</code> (<code>TheType | None</code>) \u2013 </li> <li> <code>malloc_par</code> (<code>TheType | None</code>) \u2013 </li> <li> <code>malloc_alignment</code> (<code>int</code>) \u2013 <p>Corresponds to MALLOC_ALIGNMENT in glibc malloc.c</p> </li> <li> <code>size_sz</code> (<code>int</code>) \u2013 <p>Corresponds to SIZE_SZ in glibc malloc.c</p> </li> <li> <code>malloc_align_mask</code> (<code>int</code>) \u2013 <p>Corresponds to MALLOC_ALIGN_MASK in glibc malloc.c</p> </li> <li> <code>minsize</code> (<code>int</code>) \u2013 <p>Corresponds to MINSIZE in glibc malloc.c</p> </li> <li> <code>min_chunk_size</code> (<code>int</code>) \u2013 <p>Corresponds to MIN_CHUNK_SIZE in glibc malloc.c</p> </li> <li> <code>multithreaded</code> (<code>bool</code>) \u2013 <p>Is malloc operating within a multithreaded environment.</p> </li> <li> <code>tcache_next_offset</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_reverse_lookup_32","title":"largebin_reverse_lookup_32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_32 = (\n 512,\n 576,\n 640,\n 704,\n 768,\n 832,\n 896,\n 960,\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 3072,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_reverse_lookup_32_big","title":"largebin_reverse_lookup_32_big <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_32_big = (\n 1008,\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 2624,\n 2688,\n 2752,\n 2816,\n 2880,\n 2944,\n 2944,\n 3072,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_reverse_lookup_64","title":"largebin_reverse_lookup_64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_64 = (\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 2624,\n 2688,\n 2752,\n 2816,\n 2880,\n 2944,\n 3008,\n 3072,\n 3136,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.main_arena","title":"main_arena <code>property</code>","text":"<pre><code>main_arena: Arena | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.arenas","title":"arenas <code>property</code>","text":"<pre><code>arenas: tuple[Arena, ...]\n</code></pre> <p>Return a tuple of all current arenas.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.thread_arena","title":"thread_arena <code>property</code>","text":"<pre><code>thread_arena: Arena | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.thread_cache","title":"thread_cache <code>property</code>","text":"<pre><code>thread_cache: TheValue | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.mp","title":"mp <code>property</code>","text":"<pre><code>mp: TheValue | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.global_max_fast","title":"global_max_fast <code>property</code>","text":"<pre><code>global_max_fast: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.heap_info","title":"heap_info <code>property</code>","text":"<pre><code>heap_info: TheType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.malloc_chunk","title":"malloc_chunk <code>property</code>","text":"<pre><code>malloc_chunk: TheType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.malloc_state","title":"malloc_state <code>property</code>","text":"<pre><code>malloc_state: TheType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.tcache_perthread_struct","title":"tcache_perthread_struct <code>property</code>","text":"<pre><code>tcache_perthread_struct: TheType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.tcache_entry","title":"tcache_entry <code>property</code>","text":"<pre><code>tcache_entry: TheType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.mallinfo","title":"mallinfo <code>property</code>","text":"<pre><code>mallinfo: TheType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.malloc_par","title":"malloc_par <code>property</code>","text":"<pre><code>malloc_par: TheType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.malloc_alignment","title":"malloc_alignment <code>property</code>","text":"<pre><code>malloc_alignment: int\n</code></pre> <p>Corresponds to MALLOC_ALIGNMENT in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.size_sz","title":"size_sz <code>property</code>","text":"<pre><code>size_sz: int\n</code></pre> <p>Corresponds to SIZE_SZ in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.malloc_align_mask","title":"malloc_align_mask <code>property</code>","text":"<pre><code>malloc_align_mask: int\n</code></pre> <p>Corresponds to MALLOC_ALIGN_MASK in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.minsize","title":"minsize <code>property</code>","text":"<pre><code>minsize: int\n</code></pre> <p>Corresponds to MINSIZE in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.min_chunk_size","title":"min_chunk_size <code>property</code>","text":"<pre><code>min_chunk_size: int\n</code></pre> <p>Corresponds to MIN_CHUNK_SIZE in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.multithreaded","title":"multithreaded <code>property</code>","text":"<pre><code>multithreaded: bool\n</code></pre> <p>Is malloc operating within a multithreaded environment.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.tcache_next_offset","title":"tcache_next_offset <code>property</code>","text":"<pre><code>tcache_next_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_reverse_lookup","title":"largebin_reverse_lookup","text":"<pre><code>largebin_reverse_lookup(index: int) -> int\n</code></pre> <p>Pick the appropriate largebin_reverse_lookup_ function for this architecture.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_size_range_from_index","title":"largebin_size_range_from_index","text":"<pre><code>largebin_size_range_from_index(index: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.can_be_resolved","title":"can_be_resolved","text":"<pre><code>can_be_resolved() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.has_tcache","title":"has_tcache","text":"<pre><code>has_tcache() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.chunk_flags","title":"chunk_flags","text":"<pre><code>chunk_flags(size: int) -> tuple[int, int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.chunk_key_offset","title":"chunk_key_offset","text":"<pre><code>chunk_key_offset(key: str) -> int | None\n</code></pre> <p>Find the index of a field in the malloc_chunk struct.</p> 64bit example <p>prev_size == 0 size == 8 fd == 16 bk == 24 ...</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.get_heap","title":"get_heap","text":"<pre><code>get_heap(addr: int) -> TheValue | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.get_tcache","title":"get_tcache","text":"<pre><code>get_tcache(tcache_addr: int | None = None) -> TheValue | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.get_sbrk_heap_region","title":"get_sbrk_heap_region","text":"<pre><code>get_sbrk_heap_region() -> Page | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.get_region","title":"get_region","text":"<pre><code>get_region(addr: int | Value | None) -> Page | None\n</code></pre> <p>Find the memory map containing 'addr'.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.get_bins","title":"get_bins","text":"<pre><code>get_bins(bin_type: BinType, addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.fastbin_index","title":"fastbin_index","text":"<pre><code>fastbin_index(size: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.fastbins","title":"fastbins","text":"<pre><code>fastbins(arena_addr: int | None = None) -> Bins | None\n</code></pre> <p>Returns: chain or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.tcachebins","title":"tcachebins","text":"<pre><code>tcachebins(tcache_addr: int | None = None) -> Bins | None\n</code></pre> <p>Returns: tuple(chain, count) or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.check_chain_corrupted","title":"check_chain_corrupted","text":"<pre><code>check_chain_corrupted(chain_fd: list[int], chain_bk: list[int]) -> bool\n</code></pre> <p>Checks if the doubly linked list (of a {unsorted, small, large} bin) defined by chain_fd, chain_bk is corrupted.</p> <p>Even if the chains do not cover the whole bin, they still are expected to be of the same length.</p> <p>Returns True if the bin is certainly corrupted, otherwise False.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.bin_at","title":"bin_at","text":"<pre><code>bin_at(\n index: int, arena_addr: int | None = None\n) -> tuple[list[int], list[int], bool] | None\n</code></pre> <p>Modeled after glibc's bin_at function - so starts indexing from 1 https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/eglibc/trusty-security/view/head:/malloc/malloc.c#L1394</p> <p>bin_at(1) returns the unsorted bin</p> <p>Bin 1 - Unsorted BiN Bin 2 to 63 - Smallbins Bin 64 to 126 - Largebins</p> <p>Returns: tuple(chain_from_bin_fd, chain_from_bin_bk, is_chain_corrupted) or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.unsortedbin","title":"unsortedbin","text":"<pre><code>unsortedbin(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.smallbins","title":"smallbins","text":"<pre><code>smallbins(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebins","title":"largebins","text":"<pre><code>largebins(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_index_32","title":"largebin_index_32","text":"<pre><code>largebin_index_32(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_32 macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1414</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_index_32_big","title":"largebin_index_32_big","text":"<pre><code>largebin_index_32_big(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_32_big macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1422</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_index_64","title":"largebin_index_64","text":"<pre><code>largebin_index_64(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_64 macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1433</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.largebin_index","title":"largebin_index","text":"<pre><code>largebin_index(sz: int)\n</code></pre> <p>Pick the appropriate largebin_index_ function for this architecture.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.is_initialized","title":"is_initialized","text":"<pre><code>is_initialized()\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.is_statically_linked","title":"is_statically_linked","text":"<pre><code>is_statically_linked() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.libc_has_debug_syms","title":"libc_has_debug_syms","text":"<pre><code>libc_has_debug_syms() -> bool\n</code></pre> <p>The <code>struct malloc_chunk</code> comes from debugging symbols and it will not be there for statically linked binaries</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.summarize","title":"summarize","text":"<pre><code>summarize(address: int, **kwargs: Any) -> str\n</code></pre> <p>Returns a textual summary of the specified address.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address of the heap block to summarize.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>str</code> \u2013 <p>A string.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.GlibcMemoryAllocator.containing","title":"containing","text":"<pre><code>containing(address: int) -> int\n</code></pre> <p>Returns the address of the allocation which contains 'address'.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to look up.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>int</code> \u2013 <p>An integer.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap","title":"DebugSymsHeap","text":"<pre><code>DebugSymsHeap()\n</code></pre> <p> Bases: <code>GlibcMemoryAllocator[Type, Value]</code></p> <p>Methods:</p> <ul> <li> <code>has_tcache</code> \u2013 </li> <li> <code>get_heap</code> \u2013 <p>Find & read the heap_info struct belonging to the chunk at 'addr'.</p> </li> <li> <code>get_tcache</code> \u2013 </li> <li> <code>get_sbrk_heap_region</code> \u2013 <p>Return a Page object representing the sbrk heap region.</p> </li> <li> <code>is_initialized</code> \u2013 </li> <li> <code>summarize</code> \u2013 <p>Returns a textual summary of the specified address.</p> </li> <li> <code>containing</code> \u2013 <p>Returns the address of the allocation which contains 'address'.</p> </li> <li> <code>libc_has_debug_syms</code> \u2013 <p>The <code>struct malloc_chunk</code> comes from debugging symbols and it will not be there</p> </li> <li> <code>largebin_reverse_lookup</code> \u2013 <p>Pick the appropriate largebin_reverse_lookup_ function for this architecture.</p> </li> <li> <code>largebin_size_range_from_index</code> \u2013 </li> <li> <code>chunk_flags</code> \u2013 </li> <li> <code>chunk_key_offset</code> \u2013 <p>Find the index of a field in the malloc_chunk struct.</p> </li> <li> <code>get_region</code> \u2013 <p>Find the memory map containing 'addr'.</p> </li> <li> <code>get_bins</code> \u2013 </li> <li> <code>fastbin_index</code> \u2013 </li> <li> <code>fastbins</code> \u2013 <p>Returns: chain or None</p> </li> <li> <code>tcachebins</code> \u2013 <p>Returns: tuple(chain, count) or None</p> </li> <li> <code>check_chain_corrupted</code> \u2013 <p>Checks if the doubly linked list (of a {unsorted, small, large} bin)</p> </li> <li> <code>bin_at</code> \u2013 <p>Modeled after glibc's bin_at function - so starts indexing from 1</p> </li> <li> <code>unsortedbin</code> \u2013 </li> <li> <code>smallbins</code> \u2013 </li> <li> <code>largebins</code> \u2013 </li> <li> <code>largebin_index_32</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_32 macro.</p> </li> <li> <code>largebin_index_32_big</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_32_big macro.</p> </li> <li> <code>largebin_index_64</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_64 macro.</p> </li> <li> <code>largebin_index</code> \u2013 <p>Pick the appropriate largebin_index_ function for this architecture.</p> </li> <li> <code>is_statically_linked</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>can_be_resolved</code> \u2013 </li> <li> <code>main_arena</code> (<code>Arena | None</code>) \u2013 </li> <li> <code>thread_arena</code> (<code>Arena | None</code>) \u2013 </li> <li> <code>thread_cache</code> (<code>Value | None</code>) \u2013 <p>Locate a thread's tcache struct. If it doesn't have one, use the main</p> </li> <li> <code>mp</code> (<code>Value | None</code>) \u2013 </li> <li> <code>global_max_fast</code> (<code>int | None</code>) \u2013 </li> <li> <code>heap_info</code> (<code>Type | None</code>) \u2013 </li> <li> <code>malloc_chunk</code> (<code>Type | None</code>) \u2013 </li> <li> <code>malloc_state</code> (<code>Type | None</code>) \u2013 </li> <li> <code>tcache_perthread_struct</code> (<code>Type | None</code>) \u2013 </li> <li> <code>tcache_entry</code> (<code>Type | None</code>) \u2013 </li> <li> <code>mallinfo</code> (<code>Type | None</code>) \u2013 </li> <li> <code>malloc_par</code> (<code>Type | None</code>) \u2013 </li> <li> <code>largebin_reverse_lookup_32</code> \u2013 </li> <li> <code>largebin_reverse_lookup_32_big</code> \u2013 </li> <li> <code>largebin_reverse_lookup_64</code> \u2013 </li> <li> <code>arenas</code> (<code>tuple[Arena, ...]</code>) \u2013 <p>Return a tuple of all current arenas.</p> </li> <li> <code>malloc_alignment</code> (<code>int</code>) \u2013 <p>Corresponds to MALLOC_ALIGNMENT in glibc malloc.c</p> </li> <li> <code>size_sz</code> (<code>int</code>) \u2013 <p>Corresponds to SIZE_SZ in glibc malloc.c</p> </li> <li> <code>malloc_align_mask</code> (<code>int</code>) \u2013 <p>Corresponds to MALLOC_ALIGN_MASK in glibc malloc.c</p> </li> <li> <code>minsize</code> (<code>int</code>) \u2013 <p>Corresponds to MINSIZE in glibc malloc.c</p> </li> <li> <code>min_chunk_size</code> (<code>int</code>) \u2013 <p>Corresponds to MIN_CHUNK_SIZE in glibc malloc.c</p> </li> <li> <code>multithreaded</code> (<code>bool</code>) \u2013 <p>Is malloc operating within a multithreaded environment.</p> </li> <li> <code>tcache_next_offset</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.can_be_resolved","title":"can_be_resolved <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>can_be_resolved = libc_has_debug_syms\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.main_arena","title":"main_arena <code>property</code>","text":"<pre><code>main_arena: Arena | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.thread_arena","title":"thread_arena <code>property</code>","text":"<pre><code>thread_arena: Arena | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.thread_cache","title":"thread_cache <code>property</code>","text":"<pre><code>thread_cache: Value | None\n</code></pre> <p>Locate a thread's tcache struct. If it doesn't have one, use the main thread's tcache.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.mp","title":"mp <code>property</code>","text":"<pre><code>mp: Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.global_max_fast","title":"global_max_fast <code>property</code>","text":"<pre><code>global_max_fast: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.heap_info","title":"heap_info <code>property</code>","text":"<pre><code>heap_info: Type | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.malloc_chunk","title":"malloc_chunk <code>property</code>","text":"<pre><code>malloc_chunk: Type | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.malloc_state","title":"malloc_state <code>property</code>","text":"<pre><code>malloc_state: Type | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.tcache_perthread_struct","title":"tcache_perthread_struct <code>property</code>","text":"<pre><code>tcache_perthread_struct: Type | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.tcache_entry","title":"tcache_entry <code>property</code>","text":"<pre><code>tcache_entry: Type | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.mallinfo","title":"mallinfo <code>property</code>","text":"<pre><code>mallinfo: Type | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.malloc_par","title":"malloc_par <code>property</code>","text":"<pre><code>malloc_par: Type | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_reverse_lookup_32","title":"largebin_reverse_lookup_32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_32 = (\n 512,\n 576,\n 640,\n 704,\n 768,\n 832,\n 896,\n 960,\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 3072,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_reverse_lookup_32_big","title":"largebin_reverse_lookup_32_big <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_32_big = (\n 1008,\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 2624,\n 2688,\n 2752,\n 2816,\n 2880,\n 2944,\n 2944,\n 3072,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_reverse_lookup_64","title":"largebin_reverse_lookup_64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_64 = (\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 2624,\n 2688,\n 2752,\n 2816,\n 2880,\n 2944,\n 3008,\n 3072,\n 3136,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.arenas","title":"arenas <code>property</code>","text":"<pre><code>arenas: tuple[Arena, ...]\n</code></pre> <p>Return a tuple of all current arenas.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.malloc_alignment","title":"malloc_alignment <code>property</code>","text":"<pre><code>malloc_alignment: int\n</code></pre> <p>Corresponds to MALLOC_ALIGNMENT in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.size_sz","title":"size_sz <code>property</code>","text":"<pre><code>size_sz: int\n</code></pre> <p>Corresponds to SIZE_SZ in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.malloc_align_mask","title":"malloc_align_mask <code>property</code>","text":"<pre><code>malloc_align_mask: int\n</code></pre> <p>Corresponds to MALLOC_ALIGN_MASK in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.minsize","title":"minsize <code>property</code>","text":"<pre><code>minsize: int\n</code></pre> <p>Corresponds to MINSIZE in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.min_chunk_size","title":"min_chunk_size <code>property</code>","text":"<pre><code>min_chunk_size: int\n</code></pre> <p>Corresponds to MIN_CHUNK_SIZE in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.multithreaded","title":"multithreaded <code>property</code>","text":"<pre><code>multithreaded: bool\n</code></pre> <p>Is malloc operating within a multithreaded environment.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.tcache_next_offset","title":"tcache_next_offset <code>property</code>","text":"<pre><code>tcache_next_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.has_tcache","title":"has_tcache","text":"<pre><code>has_tcache() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.get_heap","title":"get_heap","text":"<pre><code>get_heap(addr: int) -> Value | None\n</code></pre> <p>Find & read the heap_info struct belonging to the chunk at 'addr'.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.get_tcache","title":"get_tcache","text":"<pre><code>get_tcache(tcache_addr: int | Value | None = None) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.get_sbrk_heap_region","title":"get_sbrk_heap_region","text":"<pre><code>get_sbrk_heap_region() -> Page | None\n</code></pre> <p>Return a Page object representing the sbrk heap region. Ensure the region's start address is aligned to SIZE_SZ * 2, which compensates for the presence of GLIBC_TUNABLES.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.is_initialized","title":"is_initialized","text":"<pre><code>is_initialized() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.summarize","title":"summarize","text":"<pre><code>summarize(address: int, **kwargs: Any) -> str\n</code></pre> <p>Returns a textual summary of the specified address.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address of the heap block to summarize.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>str</code> \u2013 <p>A string.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.containing","title":"containing","text":"<pre><code>containing(address: int) -> int\n</code></pre> <p>Returns the address of the allocation which contains 'address'.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to look up.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>int</code> \u2013 <p>An integer.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.libc_has_debug_syms","title":"libc_has_debug_syms","text":"<pre><code>libc_has_debug_syms() -> bool\n</code></pre> <p>The <code>struct malloc_chunk</code> comes from debugging symbols and it will not be there for statically linked binaries</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_reverse_lookup","title":"largebin_reverse_lookup","text":"<pre><code>largebin_reverse_lookup(index: int) -> int\n</code></pre> <p>Pick the appropriate largebin_reverse_lookup_ function for this architecture.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_size_range_from_index","title":"largebin_size_range_from_index","text":"<pre><code>largebin_size_range_from_index(index: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.chunk_flags","title":"chunk_flags","text":"<pre><code>chunk_flags(size: int) -> tuple[int, int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.chunk_key_offset","title":"chunk_key_offset","text":"<pre><code>chunk_key_offset(key: str) -> int | None\n</code></pre> <p>Find the index of a field in the malloc_chunk struct.</p> 64bit example <p>prev_size == 0 size == 8 fd == 16 bk == 24 ...</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.get_region","title":"get_region","text":"<pre><code>get_region(addr: int | Value | None) -> Page | None\n</code></pre> <p>Find the memory map containing 'addr'.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.get_bins","title":"get_bins","text":"<pre><code>get_bins(bin_type: BinType, addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.fastbin_index","title":"fastbin_index","text":"<pre><code>fastbin_index(size: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.fastbins","title":"fastbins","text":"<pre><code>fastbins(arena_addr: int | None = None) -> Bins | None\n</code></pre> <p>Returns: chain or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.tcachebins","title":"tcachebins","text":"<pre><code>tcachebins(tcache_addr: int | None = None) -> Bins | None\n</code></pre> <p>Returns: tuple(chain, count) or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.check_chain_corrupted","title":"check_chain_corrupted","text":"<pre><code>check_chain_corrupted(chain_fd: list[int], chain_bk: list[int]) -> bool\n</code></pre> <p>Checks if the doubly linked list (of a {unsorted, small, large} bin) defined by chain_fd, chain_bk is corrupted.</p> <p>Even if the chains do not cover the whole bin, they still are expected to be of the same length.</p> <p>Returns True if the bin is certainly corrupted, otherwise False.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.bin_at","title":"bin_at","text":"<pre><code>bin_at(\n index: int, arena_addr: int | None = None\n) -> tuple[list[int], list[int], bool] | None\n</code></pre> <p>Modeled after glibc's bin_at function - so starts indexing from 1 https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/eglibc/trusty-security/view/head:/malloc/malloc.c#L1394</p> <p>bin_at(1) returns the unsorted bin</p> <p>Bin 1 - Unsorted BiN Bin 2 to 63 - Smallbins Bin 64 to 126 - Largebins</p> <p>Returns: tuple(chain_from_bin_fd, chain_from_bin_bk, is_chain_corrupted) or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.unsortedbin","title":"unsortedbin","text":"<pre><code>unsortedbin(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.smallbins","title":"smallbins","text":"<pre><code>smallbins(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebins","title":"largebins","text":"<pre><code>largebins(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_index_32","title":"largebin_index_32","text":"<pre><code>largebin_index_32(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_32 macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1414</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_index_32_big","title":"largebin_index_32_big","text":"<pre><code>largebin_index_32_big(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_32_big macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1422</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_index_64","title":"largebin_index_64","text":"<pre><code>largebin_index_64(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_64 macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1433</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.largebin_index","title":"largebin_index","text":"<pre><code>largebin_index(sz: int)\n</code></pre> <p>Pick the appropriate largebin_index_ function for this architecture.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.is_statically_linked","title":"is_statically_linked","text":"<pre><code>is_statically_linked() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.SymbolUnresolvableError","title":"SymbolUnresolvableError","text":"<pre><code>SymbolUnresolvableError(symbol: str)\n</code></pre> <p> Bases: <code>Exception</code></p> <p>Attributes:</p> <ul> <li> <code>symbol</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.SymbolUnresolvableError.symbol","title":"symbol <code>instance-attribute</code>","text":"<pre><code>symbol = symbol\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap","title":"HeuristicHeap","text":"<pre><code>HeuristicHeap()\n</code></pre> <p> Bases: <code>GlibcMemoryAllocator[Type['pwndbg.aglib.heap.structs.CStruct2GDB'], 'pwndbg.aglib.heap.structs.CStruct2GDB']</code></p> <p>Methods:</p> <ul> <li> <code>can_be_resolved</code> \u2013 </li> <li> <code>has_tcache</code> \u2013 </li> <li> <code>prompt_for_brute_force_thread_arena_permission</code> \u2013 <p>Check if the user wants to brute force the thread_arena's value.</p> </li> <li> <code>prompt_for_brute_force_thread_cache_permission</code> \u2013 <p>Check if the user wants to brute force the tcache's value.</p> </li> <li> <code>prompt_for_tls_address</code> \u2013 <p>Check if we can determine the TLS address and return it.</p> </li> <li> <code>brute_force_tls_reference_in_got_section</code> \u2013 <p>Brute force the TLS-reference in the .got section to that can pass the validator.</p> </li> <li> <code>brute_force_thread_local_variable_near_tls_base</code> \u2013 <p>Brute force the thread-local variable near the TLS base address that can pass the validator.</p> </li> <li> <code>get_heap</code> \u2013 <p>Find & read the heap_info struct belonging to the chunk at 'addr'.</p> </li> <li> <code>get_tcache</code> \u2013 </li> <li> <code>get_sbrk_heap_region</code> \u2013 <p>Return a Page object representing the sbrk heap region.</p> </li> <li> <code>is_initialized</code> \u2013 </li> <li> <code>summarize</code> \u2013 <p>Returns a textual summary of the specified address.</p> </li> <li> <code>containing</code> \u2013 <p>Returns the address of the allocation which contains 'address'.</p> </li> <li> <code>libc_has_debug_syms</code> \u2013 <p>The <code>struct malloc_chunk</code> comes from debugging symbols and it will not be there</p> </li> <li> <code>largebin_reverse_lookup</code> \u2013 <p>Pick the appropriate largebin_reverse_lookup_ function for this architecture.</p> </li> <li> <code>largebin_size_range_from_index</code> \u2013 </li> <li> <code>chunk_flags</code> \u2013 </li> <li> <code>chunk_key_offset</code> \u2013 <p>Find the index of a field in the malloc_chunk struct.</p> </li> <li> <code>get_region</code> \u2013 <p>Find the memory map containing 'addr'.</p> </li> <li> <code>get_bins</code> \u2013 </li> <li> <code>fastbin_index</code> \u2013 </li> <li> <code>fastbins</code> \u2013 <p>Returns: chain or None</p> </li> <li> <code>tcachebins</code> \u2013 <p>Returns: tuple(chain, count) or None</p> </li> <li> <code>check_chain_corrupted</code> \u2013 <p>Checks if the doubly linked list (of a {unsorted, small, large} bin)</p> </li> <li> <code>bin_at</code> \u2013 <p>Modeled after glibc's bin_at function - so starts indexing from 1</p> </li> <li> <code>unsortedbin</code> \u2013 </li> <li> <code>smallbins</code> \u2013 </li> <li> <code>largebins</code> \u2013 </li> <li> <code>largebin_index_32</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_32 macro.</p> </li> <li> <code>largebin_index_32_big</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_32_big macro.</p> </li> <li> <code>largebin_index_64</code> \u2013 <p>Modeled on the GLIBC malloc largebin_index_64 macro.</p> </li> <li> <code>largebin_index</code> \u2013 <p>Pick the appropriate largebin_index_ function for this architecture.</p> </li> <li> <code>is_statically_linked</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>struct_module</code> (<code>ModuleType | None</code>) \u2013 </li> <li> <code>main_arena</code> (<code>Arena | None</code>) \u2013 </li> <li> <code>thread_arena</code> (<code>Arena | None</code>) \u2013 </li> <li> <code>thread_cache</code> (<code>'pwndbg.aglib.heap.structs.TcachePerthreadStruct' | None</code>) \u2013 <p>Locate a thread's tcache struct. We try to find its address in Thread Local Storage (TLS) first,</p> </li> <li> <code>mp</code> (<code>'pwndbg.aglib.heap.structs.CStruct2GDB'</code>) \u2013 </li> <li> <code>global_max_fast</code> (<code>int</code>) \u2013 </li> <li> <code>heap_info</code> (<code>type['pwndbg.aglib.heap.structs.HeapInfo'] | None</code>) \u2013 </li> <li> <code>malloc_chunk</code> (<code>type['pwndbg.aglib.heap.structs.MallocChunk'] | None</code>) \u2013 </li> <li> <code>malloc_state</code> (<code>type['pwndbg.aglib.heap.structs.MallocState'] | None</code>) \u2013 </li> <li> <code>tcache_perthread_struct</code> (<code>type['pwndbg.aglib.heap.structs.TcachePerthreadStruct'] | None</code>) \u2013 </li> <li> <code>tcache_entry</code> (<code>type['pwndbg.aglib.heap.structs.TcacheEntry'] | None</code>) \u2013 </li> <li> <code>mallinfo</code> (<code>type['pwndbg.aglib.heap.structs.CStruct2GDB'] | None</code>) \u2013 </li> <li> <code>malloc_par</code> (<code>type['pwndbg.aglib.heap.structs.MallocPar'] | None</code>) \u2013 </li> <li> <code>largebin_reverse_lookup_32</code> \u2013 </li> <li> <code>largebin_reverse_lookup_32_big</code> \u2013 </li> <li> <code>largebin_reverse_lookup_64</code> \u2013 </li> <li> <code>arenas</code> (<code>tuple[Arena, ...]</code>) \u2013 <p>Return a tuple of all current arenas.</p> </li> <li> <code>malloc_alignment</code> (<code>int</code>) \u2013 <p>Corresponds to MALLOC_ALIGNMENT in glibc malloc.c</p> </li> <li> <code>size_sz</code> (<code>int</code>) \u2013 <p>Corresponds to SIZE_SZ in glibc malloc.c</p> </li> <li> <code>malloc_align_mask</code> (<code>int</code>) \u2013 <p>Corresponds to MALLOC_ALIGN_MASK in glibc malloc.c</p> </li> <li> <code>minsize</code> (<code>int</code>) \u2013 <p>Corresponds to MINSIZE in glibc malloc.c</p> </li> <li> <code>min_chunk_size</code> (<code>int</code>) \u2013 <p>Corresponds to MIN_CHUNK_SIZE in glibc malloc.c</p> </li> <li> <code>multithreaded</code> (<code>bool</code>) \u2013 <p>Is malloc operating within a multithreaded environment.</p> </li> <li> <code>tcache_next_offset</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.struct_module","title":"struct_module <code>property</code>","text":"<pre><code>struct_module: ModuleType | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.main_arena","title":"main_arena <code>property</code>","text":"<pre><code>main_arena: Arena | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.thread_arena","title":"thread_arena <code>property</code>","text":"<pre><code>thread_arena: Arena | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.thread_cache","title":"thread_cache <code>property</code>","text":"<pre><code>thread_cache: 'pwndbg.aglib.heap.structs.TcachePerthreadStruct' | None\n</code></pre> <p>Locate a thread's tcache struct. We try to find its address in Thread Local Storage (TLS) first, and if that fails, we guess it's at the first chunk of the heap.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.mp","title":"mp <code>property</code>","text":"<pre><code>mp: 'pwndbg.aglib.heap.structs.CStruct2GDB'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.global_max_fast","title":"global_max_fast <code>property</code>","text":"<pre><code>global_max_fast: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.heap_info","title":"heap_info <code>property</code>","text":"<pre><code>heap_info: type['pwndbg.aglib.heap.structs.HeapInfo'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.malloc_chunk","title":"malloc_chunk <code>property</code>","text":"<pre><code>malloc_chunk: type['pwndbg.aglib.heap.structs.MallocChunk'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.malloc_state","title":"malloc_state <code>property</code>","text":"<pre><code>malloc_state: type['pwndbg.aglib.heap.structs.MallocState'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.tcache_perthread_struct","title":"tcache_perthread_struct <code>property</code>","text":"<pre><code>tcache_perthread_struct: (\n type[\"pwndbg.aglib.heap.structs.TcachePerthreadStruct\"] | None\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.tcache_entry","title":"tcache_entry <code>property</code>","text":"<pre><code>tcache_entry: type['pwndbg.aglib.heap.structs.TcacheEntry'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.mallinfo","title":"mallinfo <code>property</code>","text":"<pre><code>mallinfo: type['pwndbg.aglib.heap.structs.CStruct2GDB'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.malloc_par","title":"malloc_par <code>property</code>","text":"<pre><code>malloc_par: type['pwndbg.aglib.heap.structs.MallocPar'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_reverse_lookup_32","title":"largebin_reverse_lookup_32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_32 = (\n 512,\n 576,\n 640,\n 704,\n 768,\n 832,\n 896,\n 960,\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 3072,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_reverse_lookup_32_big","title":"largebin_reverse_lookup_32_big <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_32_big = (\n 1008,\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 2624,\n 2688,\n 2752,\n 2816,\n 2880,\n 2944,\n 2944,\n 3072,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_reverse_lookup_64","title":"largebin_reverse_lookup_64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>largebin_reverse_lookup_64 = (\n 1024,\n 1088,\n 1152,\n 1216,\n 1280,\n 1344,\n 1408,\n 1472,\n 1536,\n 1600,\n 1664,\n 1728,\n 1792,\n 1856,\n 1920,\n 1984,\n 2048,\n 2112,\n 2176,\n 2240,\n 2304,\n 2368,\n 2432,\n 2496,\n 2560,\n 2624,\n 2688,\n 2752,\n 2816,\n 2880,\n 2944,\n 3008,\n 3072,\n 3136,\n 3584,\n 4096,\n 4608,\n 5120,\n 5632,\n 6144,\n 6656,\n 7168,\n 7680,\n 8192,\n 8704,\n 9216,\n 9728,\n 10240,\n 10752,\n 12288,\n 16384,\n 20480,\n 24576,\n 28672,\n 32768,\n 36864,\n 40960,\n 65536,\n 98304,\n 131072,\n 163840,\n 262144,\n 524288,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.arenas","title":"arenas <code>property</code>","text":"<pre><code>arenas: tuple[Arena, ...]\n</code></pre> <p>Return a tuple of all current arenas.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.malloc_alignment","title":"malloc_alignment <code>property</code>","text":"<pre><code>malloc_alignment: int\n</code></pre> <p>Corresponds to MALLOC_ALIGNMENT in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.size_sz","title":"size_sz <code>property</code>","text":"<pre><code>size_sz: int\n</code></pre> <p>Corresponds to SIZE_SZ in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.malloc_align_mask","title":"malloc_align_mask <code>property</code>","text":"<pre><code>malloc_align_mask: int\n</code></pre> <p>Corresponds to MALLOC_ALIGN_MASK in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.minsize","title":"minsize <code>property</code>","text":"<pre><code>minsize: int\n</code></pre> <p>Corresponds to MINSIZE in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.min_chunk_size","title":"min_chunk_size <code>property</code>","text":"<pre><code>min_chunk_size: int\n</code></pre> <p>Corresponds to MIN_CHUNK_SIZE in glibc malloc.c</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.multithreaded","title":"multithreaded <code>property</code>","text":"<pre><code>multithreaded: bool\n</code></pre> <p>Is malloc operating within a multithreaded environment.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.tcache_next_offset","title":"tcache_next_offset <code>property</code>","text":"<pre><code>tcache_next_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.can_be_resolved","title":"can_be_resolved","text":"<pre><code>can_be_resolved() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.has_tcache","title":"has_tcache","text":"<pre><code>has_tcache() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.prompt_for_brute_force_thread_arena_permission","title":"prompt_for_brute_force_thread_arena_permission","text":"<pre><code>prompt_for_brute_force_thread_arena_permission() -> bool\n</code></pre> <p>Check if the user wants to brute force the thread_arena's value.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.prompt_for_brute_force_thread_cache_permission","title":"prompt_for_brute_force_thread_cache_permission","text":"<pre><code>prompt_for_brute_force_thread_cache_permission() -> bool\n</code></pre> <p>Check if the user wants to brute force the tcache's value.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.prompt_for_tls_address","title":"prompt_for_tls_address","text":"<pre><code>prompt_for_tls_address() -> int\n</code></pre> <p>Check if we can determine the TLS address and return it.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.brute_force_tls_reference_in_got_section","title":"brute_force_tls_reference_in_got_section","text":"<pre><code>brute_force_tls_reference_in_got_section(\n tls_address: int, validator: Callable[[int], bool]\n) -> tuple[int, int] | None\n</code></pre> <p>Brute force the TLS-reference in the .got section to that can pass the validator.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.brute_force_thread_local_variable_near_tls_base","title":"brute_force_thread_local_variable_near_tls_base","text":"<pre><code>brute_force_thread_local_variable_near_tls_base(\n tls_address: int, validator: Callable[[int], bool]\n) -> tuple[int, int] | None\n</code></pre> <p>Brute force the thread-local variable near the TLS base address that can pass the validator.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.get_heap","title":"get_heap","text":"<pre><code>get_heap(addr: int) -> 'pwndbg.aglib.heap.structs.HeapInfo' | None\n</code></pre> <p>Find & read the heap_info struct belonging to the chunk at 'addr'.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.get_tcache","title":"get_tcache","text":"<pre><code>get_tcache(\n tcache_addr: int | None = None,\n) -> \"pwndbg.aglib.heap.structs.TcachePerthreadStruct\" | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.get_sbrk_heap_region","title":"get_sbrk_heap_region","text":"<pre><code>get_sbrk_heap_region() -> Page\n</code></pre> <p>Return a Page object representing the sbrk heap region. Ensure the region's start address is aligned to SIZE_SZ * 2, which compensates for the presence of GLIBC_TUNABLES. This heuristic version requires some sanity checks and may raise SymbolUnresolvableError if malloc's <code>mp_</code> struct can't be resolved.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.is_initialized","title":"is_initialized","text":"<pre><code>is_initialized() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.summarize","title":"summarize","text":"<pre><code>summarize(address: int, **kwargs: Any) -> str\n</code></pre> <p>Returns a textual summary of the specified address.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address of the heap block to summarize.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>str</code> \u2013 <p>A string.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.containing","title":"containing","text":"<pre><code>containing(address: int) -> int\n</code></pre> <p>Returns the address of the allocation which contains 'address'.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to look up.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>int</code> \u2013 <p>An integer.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.libc_has_debug_syms","title":"libc_has_debug_syms","text":"<pre><code>libc_has_debug_syms() -> bool\n</code></pre> <p>The <code>struct malloc_chunk</code> comes from debugging symbols and it will not be there for statically linked binaries</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_reverse_lookup","title":"largebin_reverse_lookup","text":"<pre><code>largebin_reverse_lookup(index: int) -> int\n</code></pre> <p>Pick the appropriate largebin_reverse_lookup_ function for this architecture.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_size_range_from_index","title":"largebin_size_range_from_index","text":"<pre><code>largebin_size_range_from_index(index: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.chunk_flags","title":"chunk_flags","text":"<pre><code>chunk_flags(size: int) -> tuple[int, int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.chunk_key_offset","title":"chunk_key_offset","text":"<pre><code>chunk_key_offset(key: str) -> int | None\n</code></pre> <p>Find the index of a field in the malloc_chunk struct.</p> 64bit example <p>prev_size == 0 size == 8 fd == 16 bk == 24 ...</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.get_region","title":"get_region","text":"<pre><code>get_region(addr: int | Value | None) -> Page | None\n</code></pre> <p>Find the memory map containing 'addr'.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.get_bins","title":"get_bins","text":"<pre><code>get_bins(bin_type: BinType, addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.fastbin_index","title":"fastbin_index","text":"<pre><code>fastbin_index(size: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.fastbins","title":"fastbins","text":"<pre><code>fastbins(arena_addr: int | None = None) -> Bins | None\n</code></pre> <p>Returns: chain or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.tcachebins","title":"tcachebins","text":"<pre><code>tcachebins(tcache_addr: int | None = None) -> Bins | None\n</code></pre> <p>Returns: tuple(chain, count) or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.check_chain_corrupted","title":"check_chain_corrupted","text":"<pre><code>check_chain_corrupted(chain_fd: list[int], chain_bk: list[int]) -> bool\n</code></pre> <p>Checks if the doubly linked list (of a {unsorted, small, large} bin) defined by chain_fd, chain_bk is corrupted.</p> <p>Even if the chains do not cover the whole bin, they still are expected to be of the same length.</p> <p>Returns True if the bin is certainly corrupted, otherwise False.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.bin_at","title":"bin_at","text":"<pre><code>bin_at(\n index: int, arena_addr: int | None = None\n) -> tuple[list[int], list[int], bool] | None\n</code></pre> <p>Modeled after glibc's bin_at function - so starts indexing from 1 https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/eglibc/trusty-security/view/head:/malloc/malloc.c#L1394</p> <p>bin_at(1) returns the unsorted bin</p> <p>Bin 1 - Unsorted BiN Bin 2 to 63 - Smallbins Bin 64 to 126 - Largebins</p> <p>Returns: tuple(chain_from_bin_fd, chain_from_bin_bk, is_chain_corrupted) or None</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.unsortedbin","title":"unsortedbin","text":"<pre><code>unsortedbin(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.smallbins","title":"smallbins","text":"<pre><code>smallbins(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebins","title":"largebins","text":"<pre><code>largebins(arena_addr: int | None = None) -> Bins | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_index_32","title":"largebin_index_32","text":"<pre><code>largebin_index_32(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_32 macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1414</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_index_32_big","title":"largebin_index_32_big","text":"<pre><code>largebin_index_32_big(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_32_big macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1422</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_index_64","title":"largebin_index_64","text":"<pre><code>largebin_index_64(sz: int) -> int\n</code></pre> <p>Modeled on the GLIBC malloc largebin_index_64 macro.</p> <p>https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=f7cd29bc2f93e1082ee77800bd64a4b2a2897055;hb=9ea3686266dca3f004ba874745a4087a89682617#l1433</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.largebin_index","title":"largebin_index","text":"<pre><code>largebin_index(sz: int)\n</code></pre> <p>Pick the appropriate largebin_index_ function for this architecture.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.is_statically_linked","title":"is_statically_linked","text":"<pre><code>is_statically_linked() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.heap_for_ptr","title":"heap_for_ptr","text":"<pre><code>heap_for_ptr(ptr: int) -> int\n</code></pre> <p>Round a pointer to a chunk down to find its corresponding heap_info struct, the pointer must point inside a heap which does not belong to the main arena.</p>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.fetch_chunk_metadata","title":"fetch_chunk_metadata","text":"<pre><code>fetch_chunk_metadata(\n address: int, include_only_fields: set[ChunkField] | None = None\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/","title":"pwndbg.aglib.heap.structs","text":""},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs","title":"structs","text":"<p>Classes:</p> <ul> <li> <code>c_pvoid</code> \u2013 <p>Represents a pointer.</p> </li> <li> <code>c_size_t</code> \u2013 <p>Represents a size_t.</p> </li> <li> <code>FakeGDBField</code> \u2013 <p>Fake gdb.Field for compatibility</p> </li> <li> <code>CStruct2GDB</code> \u2013 </li> <li> <code>c_malloc_state_2_26</code> \u2013 <p>This class represents malloc_state struct for GLIBC < 2.27 as a ctypes struct.</p> </li> <li> <code>c_malloc_state_2_12</code> \u2013 <p>This class represents malloc_state struct for GLIBC < 2.22 as a ctypes struct.</p> </li> <li> <code>c_malloc_state_2_27</code> \u2013 <p>This class represents malloc_state struct for GLIBC >= 2.27 as a ctypes struct.</p> </li> <li> <code>MallocState</code> \u2013 <p>This class represents malloc_state struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>c_heap_info</code> \u2013 <p>This class represents heap_info struct as a ctypes struct.</p> </li> <li> <code>HeapInfo</code> \u2013 <p>This class represents heap_info struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>c_malloc_chunk</code> \u2013 <p>This class represents malloc_chunk struct as a ctypes struct.</p> </li> <li> <code>MallocChunk</code> \u2013 <p>This class represents malloc_chunk struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>c_tcache_perthread_struct_2_29</code> \u2013 <p>This class represents tcache_perthread_struct for GLIBC < 2.30 as a ctypes struct.</p> </li> <li> <code>c_tcache_perthread_struct_2_30</code> \u2013 <p>This class represents the tcache_perthread_struct for GLIBC >= 2.30 as a ctypes struct.</p> </li> <li> <code>TcachePerthreadStruct</code> \u2013 <p>This class represents tcache_perthread_struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>c_tcache_entry_2_28</code> \u2013 <p>This class represents the tcache_entry struct for GLIBC < 2.29 as a ctypes struct.</p> </li> <li> <code>c_tcache_entry_2_29</code> \u2013 <p>This class represents the tcache_entry struct for GLIBC >= 2.29 as a ctypes struct.</p> </li> <li> <code>TcacheEntry</code> \u2013 <p>This class represents the tcache_entry struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>c_malloc_par_2_23</code> \u2013 <p>This class represents the malloc_par struct for GLIBC < 2.24 as a ctypes struct.</p> </li> <li> <code>c_malloc_par_2_12</code> \u2013 <p>This class represents the malloc_par struct for GLIBC < 2.15 as a ctypes struct.</p> </li> <li> <code>c_malloc_par_2_24</code> \u2013 <p>This class represents the malloc_par struct for GLIBC >= 2.24 as a ctypes struct.</p> </li> <li> <code>c_malloc_par_2_26</code> \u2013 <p>This class represents the malloc_par struct for GLIBC >= 2.26 as a ctypes struct.</p> </li> <li> <code>c_malloc_par_2_35</code> \u2013 <p>This class represents the malloc_par struct for GLIBC >= 2.35 as a ctypes struct.</p> </li> <li> <code>MallocPar</code> \u2013 <p>This class represents the malloc_par struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>request2size</code> \u2013 </li> <li> <code>fastbin_index</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>GLIBC_VERSION</code> \u2013 </li> <li> <code>SIZE_SZ</code> \u2013 </li> <li> <code>MINSIZE</code> \u2013 </li> <li> <code>MALLOC_ALIGN</code> \u2013 </li> <li> <code>long_double_alignment</code> \u2013 </li> <li> <code>MALLOC_ALIGN_MASK</code> \u2013 </li> <li> <code>MAX_FAST_SIZE</code> \u2013 </li> <li> <code>NBINS</code> \u2013 </li> <li> <code>BINMAPSIZE</code> \u2013 </li> <li> <code>TCACHE_MAX_BINS</code> \u2013 </li> <li> <code>NFASTBINS</code> \u2013 </li> <li> <code>PTR</code> \u2013 </li> <li> <code>SIZE_T</code> \u2013 </li> <li> <code>DEFAULT_TOP_PAD</code> \u2013 </li> <li> <code>DEFAULT_MMAP_MAX</code> \u2013 </li> <li> <code>DEFAULT_MMAP_THRESHOLD</code> \u2013 </li> <li> <code>DEFAULT_TRIM_THRESHOLD</code> \u2013 </li> <li> <code>DEFAULT_PAGE_SIZE</code> \u2013 </li> <li> <code>TCACHE_FILL_COUNT</code> \u2013 </li> <li> <code>C2GDB_MAPPING</code> \u2013 </li> <li> <code>DEFAULT_MP_</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.GLIBC_VERSION","title":"GLIBC_VERSION <code>module-attribute</code>","text":"<pre><code>GLIBC_VERSION = get_version()\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.SIZE_SZ","title":"SIZE_SZ <code>module-attribute</code>","text":"<pre><code>SIZE_SZ = ptrsize\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MINSIZE","title":"MINSIZE <code>module-attribute</code>","text":"<pre><code>MINSIZE = ptrsize * 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MALLOC_ALIGN","title":"MALLOC_ALIGN <code>module-attribute</code>","text":"<pre><code>MALLOC_ALIGN = 16\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.long_double_alignment","title":"long_double_alignment <code>module-attribute</code>","text":"<pre><code>long_double_alignment = alignof\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MALLOC_ALIGN_MASK","title":"MALLOC_ALIGN_MASK <code>module-attribute</code>","text":"<pre><code>MALLOC_ALIGN_MASK = MALLOC_ALIGN - 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MAX_FAST_SIZE","title":"MAX_FAST_SIZE <code>module-attribute</code>","text":"<pre><code>MAX_FAST_SIZE = 80 * SIZE_SZ // 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.NBINS","title":"NBINS <code>module-attribute</code>","text":"<pre><code>NBINS = 128\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.BINMAPSIZE","title":"BINMAPSIZE <code>module-attribute</code>","text":"<pre><code>BINMAPSIZE = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TCACHE_MAX_BINS","title":"TCACHE_MAX_BINS <code>module-attribute</code>","text":"<pre><code>TCACHE_MAX_BINS = 64\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.NFASTBINS","title":"NFASTBINS <code>module-attribute</code>","text":"<pre><code>NFASTBINS = fastbin_index(request2size(MAX_FAST_SIZE)) + 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.PTR","title":"PTR <code>module-attribute</code>","text":"<pre><code>PTR = c_uint32\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.SIZE_T","title":"SIZE_T <code>module-attribute</code>","text":"<pre><code>SIZE_T = c_uint32\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.DEFAULT_TOP_PAD","title":"DEFAULT_TOP_PAD <code>module-attribute</code>","text":"<pre><code>DEFAULT_TOP_PAD = 131072\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.DEFAULT_MMAP_MAX","title":"DEFAULT_MMAP_MAX <code>module-attribute</code>","text":"<pre><code>DEFAULT_MMAP_MAX = 65536\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.DEFAULT_MMAP_THRESHOLD","title":"DEFAULT_MMAP_THRESHOLD <code>module-attribute</code>","text":"<pre><code>DEFAULT_MMAP_THRESHOLD = 128 * 1024\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.DEFAULT_TRIM_THRESHOLD","title":"DEFAULT_TRIM_THRESHOLD <code>module-attribute</code>","text":"<pre><code>DEFAULT_TRIM_THRESHOLD = 128 * 1024\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.DEFAULT_PAGE_SIZE","title":"DEFAULT_PAGE_SIZE <code>module-attribute</code>","text":"<pre><code>DEFAULT_PAGE_SIZE = 4096\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TCACHE_FILL_COUNT","title":"TCACHE_FILL_COUNT <code>module-attribute</code>","text":"<pre><code>TCACHE_FILL_COUNT = 7\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.C2GDB_MAPPING","title":"C2GDB_MAPPING <code>module-attribute</code>","text":"<pre><code>C2GDB_MAPPING = {\n c_char: char,\n c_int8: int8,\n c_int16: int16,\n c_int32: int32,\n c_int64: int64,\n c_uint8: uint8,\n c_uint16: uint16,\n c_uint32: uint32,\n c_uint64: uint64,\n c_pvoid: pvoid,\n c_size_t: size_t,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.DEFAULT_MP_","title":"DEFAULT_MP_ <code>module-attribute</code>","text":"<pre><code>DEFAULT_MP_ = _c_struct()\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_pvoid","title":"c_pvoid","text":"<p> Bases: <code>PTR</code></p> <p>Represents a pointer.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_size_t","title":"c_size_t","text":"<p> Bases: <code>SIZE_T</code></p> <p>Represents a size_t.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField","title":"FakeGDBField","text":"<pre><code>FakeGDBField(\n bitpos: int,\n name: str | None,\n type,\n parent_type,\n enumval: int | None = None,\n artificial: bool = False,\n is_base_class: bool = False,\n bitsize: int = 0,\n)\n</code></pre> <p>Fake gdb.Field for compatibility</p> <p>Attributes:</p> <ul> <li> <code>bitpos</code> \u2013 </li> <li> <code>name</code> \u2013 </li> <li> <code>type</code> \u2013 </li> <li> <code>parent_type</code> \u2013 </li> <li> <code>enumval</code> \u2013 </li> <li> <code>artificial</code> \u2013 </li> <li> <code>is_base_class</code> \u2013 </li> <li> <code>bitsize</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.bitpos","title":"bitpos <code>instance-attribute</code>","text":"<pre><code>bitpos = bitpos\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.type","title":"type <code>instance-attribute</code>","text":"<pre><code>type = type\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.parent_type","title":"parent_type <code>instance-attribute</code>","text":"<pre><code>parent_type = parent_type\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.enumval","title":"enumval <code>instance-attribute</code>","text":"<pre><code>enumval = enumval\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.artificial","title":"artificial <code>instance-attribute</code>","text":"<pre><code>artificial = artificial\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.is_base_class","title":"is_base_class <code>instance-attribute</code>","text":"<pre><code>is_base_class = is_base_class\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.FakeGDBField.bitsize","title":"bitsize <code>instance-attribute</code>","text":"<pre><code>bitsize = bitsize\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB","title":"CStruct2GDB","text":"<pre><code>CStruct2GDB(address: int)\n</code></pre> <p>Methods:</p> <ul> <li> <code>__int__</code> \u2013 <p>Returns the address of the C struct.</p> </li> <li> <code>__getitem__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__getattr__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p> </li> <li> <code>read_field</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>unqualified</code> \u2013 <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p> </li> <li> <code>fields</code> \u2013 <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>keys</code> \u2013 <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>get_field_address</code> \u2013 <p>Returns the address of the specified field.</p> </li> <li> <code>get_field_offset</code> \u2013 <p>Returns the offset of the specified field.</p> </li> <li> <code>items</code> \u2013 <p>Returns a tuple of (field name, field value) pairs.</p> </li> <li> <code>has_field</code> \u2013 <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>code</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>type</code> \u2013 <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.code","title":"code <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>code = STRUCT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.type","title":"type <code>property</code>","text":"<pre><code>type\n</code></pre> <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Returns the address of the C struct.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: Any) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.read_field","title":"read_field","text":"<pre><code>read_field(field: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.unqualified","title":"unqualified <code>classmethod</code>","text":"<pre><code>unqualified()\n</code></pre> <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.fields","title":"fields <code>classmethod</code>","text":"<pre><code>fields() -> list[FakeGDBField]\n</code></pre> <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.keys","title":"keys <code>classmethod</code>","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.get_field_address","title":"get_field_address","text":"<pre><code>get_field_address(field: str) -> int\n</code></pre> <p>Returns the address of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.get_field_offset","title":"get_field_offset <code>classmethod</code>","text":"<pre><code>get_field_offset(field: str) -> int\n</code></pre> <p>Returns the offset of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.items","title":"items","text":"<pre><code>items() -> tuple[tuple[Any, Any], ...]\n</code></pre> <p>Returns a tuple of (field name, field value) pairs.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.CStruct2GDB.has_field","title":"has_field <code>classmethod</code>","text":"<pre><code>has_field(field: str) -> bool\n</code></pre> <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_state_2_26","title":"c_malloc_state_2_26","text":"<p> Bases: <code>Structure</code></p> <p>This class represents malloc_state struct for GLIBC < 2.27 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/1c9a5c270d8b66f30dcfaf1cb2d6cf39d3e18369/malloc/malloc.c#L1678-L1716</p> <p>struct malloc_state { /* Serialize access. */ __libc_lock_define (, mutex);</p> <pre><code>/* Flags (formerly in max_fast). */\nint flags;\n\n/* Fastbins */\nmfastbinptr fastbinsY[NFASTBINS];\n\n/* Base of the topmost chunk -- not otherwise kept in a bin */\nmchunkptr top;\n\n/* The remainder from the most recent split of a small request */\nmchunkptr last_remainder;\n\n/* Normal bins packed as described above */\nmchunkptr bins[NBINS * 2 - 2];\n\n/* Bitmap of bins */\nunsigned int binmap[BINMAPSIZE];\n\n/* Linked list */\nstruct malloc_state *next;\n\n/* Linked list for free arenas. Access to this field is serialized\n by free_list_lock in arena.c. */\nstruct malloc_state *next_free;\n\n/* Number of threads attached to this arena. 0 if the arena is on\n the free list. Access to this field is serialized by\n free_list_lock in arena.c. */\nINTERNAL_SIZE_T attached_threads;\n\n/* Memory allocated from the system in this arena. */\nINTERNAL_SIZE_T system_mem;\nINTERNAL_SIZE_T max_system_mem;\n</code></pre> <p>};</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_state_2_12","title":"c_malloc_state_2_12","text":"<p> Bases: <code>Structure</code></p> <p>This class represents malloc_state struct for GLIBC < 2.22 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.12/malloc/malloc.c#L2362-L2400</p> <p>struct malloc_state { /* Serialize access. */ mutex_t mutex;</p> <p>/* Flags (formerly in max_fast). */ int flags;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_state_2_12--if-thread_stats","title":"if THREAD_STATS","text":"<p>/* Statistics for locking. Only used if THREAD_STATS is defined. */ long stat_lock_direct, stat_lock_loop, stat_lock_wait;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_state_2_12--endif","title":"endif","text":"<p>/* Fastbins */ mfastbinptr fastbinsY[NFASTBINS];</p> <p>/* Base of the topmost chunk -- not otherwise kept in a bin */ mchunkptr top;</p> <p>/* The remainder from the most recent split of a small request */ mchunkptr last_remainder;</p> <p>/* Normal bins packed as described above */ mchunkptr bins[NBINS * 2 - 2];</p> <p>/* Bitmap of bins */ unsigned int binmap[BINMAPSIZE];</p> <p>/* Linked list */ struct malloc_state *next;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_state_2_12--ifdef-per_thread","title":"ifdef PER_THREAD","text":"<p>/* Linked list for free arenas. */ struct malloc_state *next_free;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_state_2_12--endif_1","title":"endif","text":"<p>/* Memory allocated from the system in this arena. */ INTERNAL_SIZE_T system_mem; INTERNAL_SIZE_T max_system_mem; };</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_state_2_27","title":"c_malloc_state_2_27","text":"<p> Bases: <code>Structure</code></p> <p>This class represents malloc_state struct for GLIBC >= 2.27 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.34/malloc/malloc.c#L1831</p> <p>struct malloc_state { /* Serialize access. */ __libc_lock_define (, mutex);</p> <pre><code>/* Flags (formerly in max_fast). */\nint flags;\n\n/* Set if the fastbin chunks contain recently inserted free blocks. */\n/* Note this is a bool but not all targets support atomics on booleans. */\nint have_fastchunks;\n\n/* Fastbins */\nmfastbinptr fastbinsY[NFASTBINS];\n\n/* Base of the topmost chunk -- not otherwise kept in a bin */\nmchunkptr top;\n\n/* The remainder from the most recent split of a small request */\nmchunkptr last_remainder;\n\n/* Normal bins packed as described above */\nmchunkptr bins[NBINS * 2 - 2];\n\n/* Bitmap of bins */\nunsigned int binmap[BINMAPSIZE];\n\n/* Linked list */\nstruct malloc_state *next;\n\n/* Linked list for free arenas. Access to this field is serialized\n by free_list_lock in arena.c. */\nstruct malloc_state *next_free;\n\n/* Number of threads attached to this arena. 0 if the arena is on\n the free list. Access to this field is serialized by\n free_list_lock in arena.c. */\nINTERNAL_SIZE_T attached_threads;\n\n/* Memory allocated from the system in this arena. */\nINTERNAL_SIZE_T system_mem;\nINTERNAL_SIZE_T max_system_mem;\n</code></pre> <p>};</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState","title":"MallocState","text":"<pre><code>MallocState(address: int)\n</code></pre> <p> Bases: <code>CStruct2GDB</code></p> <p>This class represents malloc_state struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> <p>Methods:</p> <ul> <li> <code>__int__</code> \u2013 <p>Returns the address of the C struct.</p> </li> <li> <code>__getitem__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__getattr__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p> </li> <li> <code>read_field</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>unqualified</code> \u2013 <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p> </li> <li> <code>fields</code> \u2013 <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>keys</code> \u2013 <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>get_field_address</code> \u2013 <p>Returns the address of the specified field.</p> </li> <li> <code>get_field_offset</code> \u2013 <p>Returns the offset of the specified field.</p> </li> <li> <code>items</code> \u2013 <p>Returns a tuple of (field name, field value) pairs.</p> </li> <li> <code>has_field</code> \u2013 <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>sizeof</code> \u2013 </li> <li> <code>code</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>type</code> \u2013 <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.sizeof","title":"sizeof <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>sizeof = sizeof(_c_struct)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.code","title":"code <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>code = STRUCT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.type","title":"type <code>property</code>","text":"<pre><code>type\n</code></pre> <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Returns the address of the C struct.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: Any) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.read_field","title":"read_field","text":"<pre><code>read_field(field: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.unqualified","title":"unqualified <code>classmethod</code>","text":"<pre><code>unqualified()\n</code></pre> <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.fields","title":"fields <code>classmethod</code>","text":"<pre><code>fields() -> list[FakeGDBField]\n</code></pre> <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.keys","title":"keys <code>classmethod</code>","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.get_field_address","title":"get_field_address","text":"<pre><code>get_field_address(field: str) -> int\n</code></pre> <p>Returns the address of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.get_field_offset","title":"get_field_offset <code>classmethod</code>","text":"<pre><code>get_field_offset(field: str) -> int\n</code></pre> <p>Returns the offset of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.items","title":"items","text":"<pre><code>items() -> tuple[tuple[Any, Any], ...]\n</code></pre> <p>Returns a tuple of (field name, field value) pairs.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocState.has_field","title":"has_field <code>classmethod</code>","text":"<pre><code>has_field(field: str) -> bool\n</code></pre> <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_heap_info","title":"c_heap_info","text":"<p> Bases: <code>Structure</code></p> <p>This class represents heap_info struct as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.34/malloc/arena.c#L53</p> <p>typedef struct _heap_info { mstate ar_ptr; /* Arena for this heap. / struct _heap_info *prev; / Previous heap. / size_t size; / Current size in bytes. / size_t mprotect_size; / Size in bytes that has been mprotected PROT_READ|PROT_WRITE. / / Make sure the following data is properly aligned, particularly that sizeof (heap_info) + 2 * SIZE_SZ is a multiple of MALLOC_ALIGNMENT. */ char pad[-6 * SIZE_SZ & MALLOC_ALIGN_MASK]; } heap_info;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo","title":"HeapInfo","text":"<pre><code>HeapInfo(address: int)\n</code></pre> <p> Bases: <code>CStruct2GDB</code></p> <p>This class represents heap_info struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> <p>Methods:</p> <ul> <li> <code>__int__</code> \u2013 <p>Returns the address of the C struct.</p> </li> <li> <code>__getitem__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__getattr__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p> </li> <li> <code>read_field</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>unqualified</code> \u2013 <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p> </li> <li> <code>fields</code> \u2013 <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>keys</code> \u2013 <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>get_field_address</code> \u2013 <p>Returns the address of the specified field.</p> </li> <li> <code>get_field_offset</code> \u2013 <p>Returns the offset of the specified field.</p> </li> <li> <code>items</code> \u2013 <p>Returns a tuple of (field name, field value) pairs.</p> </li> <li> <code>has_field</code> \u2013 <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>sizeof</code> \u2013 </li> <li> <code>code</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>type</code> \u2013 <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.sizeof","title":"sizeof <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>sizeof = sizeof(_c_struct)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.code","title":"code <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>code = STRUCT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.type","title":"type <code>property</code>","text":"<pre><code>type\n</code></pre> <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Returns the address of the C struct.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: Any) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.read_field","title":"read_field","text":"<pre><code>read_field(field: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.unqualified","title":"unqualified <code>classmethod</code>","text":"<pre><code>unqualified()\n</code></pre> <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.fields","title":"fields <code>classmethod</code>","text":"<pre><code>fields() -> list[FakeGDBField]\n</code></pre> <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.keys","title":"keys <code>classmethod</code>","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.get_field_address","title":"get_field_address","text":"<pre><code>get_field_address(field: str) -> int\n</code></pre> <p>Returns the address of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.get_field_offset","title":"get_field_offset <code>classmethod</code>","text":"<pre><code>get_field_offset(field: str) -> int\n</code></pre> <p>Returns the offset of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.items","title":"items","text":"<pre><code>items() -> tuple[tuple[Any, Any], ...]\n</code></pre> <p>Returns a tuple of (field name, field value) pairs.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.HeapInfo.has_field","title":"has_field <code>classmethod</code>","text":"<pre><code>has_field(field: str) -> bool\n</code></pre> <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_chunk","title":"c_malloc_chunk","text":"<p> Bases: <code>Structure</code></p> <p>This class represents malloc_chunk struct as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.34/malloc/malloc.c#L1154</p> <p>struct malloc_chunk {</p> <pre><code>INTERNAL_SIZE_T mchunk_prev_size; /* Size of previous chunk (if free). */\nINTERNAL_SIZE_T mchunk_size; /* Size in bytes, including overhead. */\n\nstruct malloc_chunk* fd; /* double links -- used only if free. */\nstruct malloc_chunk* bk;\n\n/* Only used for large blocks: pointer to next larger size. */\nstruct malloc_chunk* fd_nextsize; /* double links -- used only if free. */\nstruct malloc_chunk* bk_nextsize;\n</code></pre> <p>};</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk","title":"MallocChunk","text":"<pre><code>MallocChunk(address: int)\n</code></pre> <p> Bases: <code>CStruct2GDB</code></p> <p>This class represents malloc_chunk struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> <p>Methods:</p> <ul> <li> <code>__int__</code> \u2013 <p>Returns the address of the C struct.</p> </li> <li> <code>__getitem__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__getattr__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p> </li> <li> <code>read_field</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>unqualified</code> \u2013 <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p> </li> <li> <code>fields</code> \u2013 <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>keys</code> \u2013 <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>get_field_address</code> \u2013 <p>Returns the address of the specified field.</p> </li> <li> <code>get_field_offset</code> \u2013 <p>Returns the offset of the specified field.</p> </li> <li> <code>items</code> \u2013 <p>Returns a tuple of (field name, field value) pairs.</p> </li> <li> <code>has_field</code> \u2013 <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>sizeof</code> \u2013 </li> <li> <code>code</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>type</code> \u2013 <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.sizeof","title":"sizeof <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>sizeof = sizeof(_c_struct)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.code","title":"code <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>code = STRUCT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.type","title":"type <code>property</code>","text":"<pre><code>type\n</code></pre> <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Returns the address of the C struct.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: Any) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.read_field","title":"read_field","text":"<pre><code>read_field(field: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.unqualified","title":"unqualified <code>classmethod</code>","text":"<pre><code>unqualified()\n</code></pre> <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.fields","title":"fields <code>classmethod</code>","text":"<pre><code>fields() -> list[FakeGDBField]\n</code></pre> <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.keys","title":"keys <code>classmethod</code>","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.get_field_address","title":"get_field_address","text":"<pre><code>get_field_address(field: str) -> int\n</code></pre> <p>Returns the address of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.get_field_offset","title":"get_field_offset <code>classmethod</code>","text":"<pre><code>get_field_offset(field: str) -> int\n</code></pre> <p>Returns the offset of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.items","title":"items","text":"<pre><code>items() -> tuple[tuple[Any, Any], ...]\n</code></pre> <p>Returns a tuple of (field name, field value) pairs.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocChunk.has_field","title":"has_field <code>classmethod</code>","text":"<pre><code>has_field(field: str) -> bool\n</code></pre> <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_tcache_perthread_struct_2_29","title":"c_tcache_perthread_struct_2_29","text":"<p> Bases: <code>Structure</code></p> <p>This class represents tcache_perthread_struct for GLIBC < 2.30 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.29/malloc/malloc.c#L2916</p> <p>typedef struct tcache_perthread_struct { char counts[TCACHE_MAX_BINS]; tcache_entry *entries[TCACHE_MAX_BINS]; } tcache_perthread_struct;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_tcache_perthread_struct_2_30","title":"c_tcache_perthread_struct_2_30","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the tcache_perthread_struct for GLIBC >= 2.30 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.34/malloc/malloc.c#L3025</p> <p>typedef struct tcache_perthread_struct { uint16_t counts[TCACHE_MAX_BINS]; tcache_entry *entries[TCACHE_MAX_BINS]; } tcache_perthread_struct;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct","title":"TcachePerthreadStruct","text":"<pre><code>TcachePerthreadStruct(address: int)\n</code></pre> <p> Bases: <code>CStruct2GDB</code></p> <p>This class represents tcache_perthread_struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> <p>Methods:</p> <ul> <li> <code>__int__</code> \u2013 <p>Returns the address of the C struct.</p> </li> <li> <code>__getitem__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__getattr__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p> </li> <li> <code>read_field</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>unqualified</code> \u2013 <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p> </li> <li> <code>fields</code> \u2013 <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>keys</code> \u2013 <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>get_field_address</code> \u2013 <p>Returns the address of the specified field.</p> </li> <li> <code>get_field_offset</code> \u2013 <p>Returns the offset of the specified field.</p> </li> <li> <code>items</code> \u2013 <p>Returns a tuple of (field name, field value) pairs.</p> </li> <li> <code>has_field</code> \u2013 <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>sizeof</code> \u2013 </li> <li> <code>code</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>type</code> \u2013 <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.sizeof","title":"sizeof <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>sizeof = sizeof(_c_struct)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.code","title":"code <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>code = STRUCT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.type","title":"type <code>property</code>","text":"<pre><code>type\n</code></pre> <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Returns the address of the C struct.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: Any) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.read_field","title":"read_field","text":"<pre><code>read_field(field: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.unqualified","title":"unqualified <code>classmethod</code>","text":"<pre><code>unqualified()\n</code></pre> <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.fields","title":"fields <code>classmethod</code>","text":"<pre><code>fields() -> list[FakeGDBField]\n</code></pre> <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.keys","title":"keys <code>classmethod</code>","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.get_field_address","title":"get_field_address","text":"<pre><code>get_field_address(field: str) -> int\n</code></pre> <p>Returns the address of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.get_field_offset","title":"get_field_offset <code>classmethod</code>","text":"<pre><code>get_field_offset(field: str) -> int\n</code></pre> <p>Returns the offset of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.items","title":"items","text":"<pre><code>items() -> tuple[tuple[Any, Any], ...]\n</code></pre> <p>Returns a tuple of (field name, field value) pairs.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcachePerthreadStruct.has_field","title":"has_field <code>classmethod</code>","text":"<pre><code>has_field(field: str) -> bool\n</code></pre> <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_tcache_entry_2_28","title":"c_tcache_entry_2_28","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the tcache_entry struct for GLIBC < 2.29 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.28/malloc/malloc.c#L2888</p> <p>typedef struct tcache_entry { struct tcache_entry *next; } tcache_entry;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_tcache_entry_2_29","title":"c_tcache_entry_2_29","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the tcache_entry struct for GLIBC >= 2.29 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.34/malloc/malloc.c#L3013</p> <p>typedef struct tcache_entry { struct tcache_entry next; / This field exists to detect double frees. */ uintptr_t key; } tcache_entry;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry","title":"TcacheEntry","text":"<pre><code>TcacheEntry(address: int)\n</code></pre> <p> Bases: <code>CStruct2GDB</code></p> <p>This class represents the tcache_entry struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> <p>Methods:</p> <ul> <li> <code>__int__</code> \u2013 <p>Returns the address of the C struct.</p> </li> <li> <code>__getitem__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__getattr__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p> </li> <li> <code>read_field</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>unqualified</code> \u2013 <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p> </li> <li> <code>fields</code> \u2013 <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>keys</code> \u2013 <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>get_field_address</code> \u2013 <p>Returns the address of the specified field.</p> </li> <li> <code>get_field_offset</code> \u2013 <p>Returns the offset of the specified field.</p> </li> <li> <code>items</code> \u2013 <p>Returns a tuple of (field name, field value) pairs.</p> </li> <li> <code>has_field</code> \u2013 <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>sizeof</code> \u2013 </li> <li> <code>code</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>type</code> \u2013 <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.sizeof","title":"sizeof <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>sizeof = sizeof(_c_struct)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.code","title":"code <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>code = STRUCT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.type","title":"type <code>property</code>","text":"<pre><code>type\n</code></pre> <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Returns the address of the C struct.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: Any) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.read_field","title":"read_field","text":"<pre><code>read_field(field: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.unqualified","title":"unqualified <code>classmethod</code>","text":"<pre><code>unqualified()\n</code></pre> <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.fields","title":"fields <code>classmethod</code>","text":"<pre><code>fields() -> list[FakeGDBField]\n</code></pre> <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.keys","title":"keys <code>classmethod</code>","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.get_field_address","title":"get_field_address","text":"<pre><code>get_field_address(field: str) -> int\n</code></pre> <p>Returns the address of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.get_field_offset","title":"get_field_offset <code>classmethod</code>","text":"<pre><code>get_field_offset(field: str) -> int\n</code></pre> <p>Returns the offset of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.items","title":"items","text":"<pre><code>items() -> tuple[tuple[Any, Any], ...]\n</code></pre> <p>Returns a tuple of (field name, field value) pairs.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TcacheEntry.has_field","title":"has_field <code>classmethod</code>","text":"<pre><code>has_field(field: str) -> bool\n</code></pre> <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_23","title":"c_malloc_par_2_23","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the malloc_par struct for GLIBC < 2.24 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.23/malloc/malloc.c#L1726</p> <p>struct malloc_par { /* Tunable parameters */ unsigned long trim_threshold; INTERNAL_SIZE_T top_pad; INTERNAL_SIZE_T mmap_threshold; INTERNAL_SIZE_T arena_test; INTERNAL_SIZE_T arena_max;</p> <p>/* Memory map support / int n_mmaps; int n_mmaps_max; int max_n_mmaps; / the mmap_threshold is dynamic, until the user sets it manually, at which point we need to disable any dynamic behavior. */ int no_dyn_threshold;</p> <p>/* Statistics / INTERNAL_SIZE_T mmapped_mem; /*INTERNAL_SIZE_T sbrked_mem;/ /INTERNAL_SIZE_T max_sbrked_mem;/ INTERNAL_SIZE_T max_mmapped_mem; INTERNAL_SIZE_T max_total_mem; /* only kept for NO_THREADS */</p> <p>/* First address handed out by MORECORE/sbrk. */ char *sbrk_base; };</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_12","title":"c_malloc_par_2_12","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the malloc_par struct for GLIBC < 2.15 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.12/malloc/malloc.c#L2402-L2433</p> <p>struct malloc_par { /* Tunable parameters */ unsigned long trim_threshold; INTERNAL_SIZE_T top_pad; INTERNAL_SIZE_T mmap_threshold;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_12--ifdef-per_thread","title":"ifdef PER_THREAD","text":"<p>INTERNAL_SIZE_T arena_test; INTERNAL_SIZE_T arena_max;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_12--endif","title":"endif","text":"<p>/* Memory map support / int n_mmaps; int n_mmaps_max; int max_n_mmaps; / the mmap_threshold is dynamic, until the user sets it manually, at which point we need to disable any dynamic behavior. */ int no_dyn_threshold;</p> <p>/* Cache malloc_getpagesize */ unsigned int pagesize;</p> <p>/* Statistics / INTERNAL_SIZE_T mmapped_mem; /*INTERNAL_SIZE_T sbrked_mem;/ /INTERNAL_SIZE_T max_sbrked_mem;/ INTERNAL_SIZE_T max_mmapped_mem; INTERNAL_SIZE_T max_total_mem; /* only kept for NO_THREADS */</p> <p>/* First address handed out by MORECORE/sbrk. / char sbrk_base; };</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_24","title":"c_malloc_par_2_24","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the malloc_par struct for GLIBC >= 2.24 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.25/malloc/malloc.c#L1690 https://github.com/bminor/glibc/blob/glibc-2.24/malloc/malloc.c#L1719</p> <p>struct malloc_par { /* Tunable parameters */ unsigned long trim_threshold; INTERNAL_SIZE_T top_pad; INTERNAL_SIZE_T mmap_threshold; INTERNAL_SIZE_T arena_test; INTERNAL_SIZE_T arena_max;</p> <pre><code>/* Memory map support */\nint n_mmaps;\nint n_mmaps_max;\nint max_n_mmaps;\n/* the mmap_threshold is dynamic, until the user sets\n it manually, at which point we need to disable any\n dynamic behavior. */\nint no_dyn_threshold;\n\n/* Statistics */\nINTERNAL_SIZE_T mmapped_mem;\nINTERNAL_SIZE_T max_mmapped_mem;\n\n/* First address handed out by MORECORE/sbrk. */\nchar *sbrk_base;\n</code></pre> <p>};</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_26","title":"c_malloc_par_2_26","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the malloc_par struct for GLIBC >= 2.26 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.34/malloc/malloc.c#L1875</p> <p>struct malloc_par { /* Tunable parameters */ unsigned long trim_threshold; INTERNAL_SIZE_T top_pad; INTERNAL_SIZE_T mmap_threshold; INTERNAL_SIZE_T arena_test; INTERNAL_SIZE_T arena_max;</p> <pre><code>/* Memory map support */\nint n_mmaps;\nint n_mmaps_max;\nint max_n_mmaps;\n/* the mmap_threshold is dynamic, until the user sets\n it manually, at which point we need to disable any\n dynamic behavior. */\nint no_dyn_threshold;\n\n/* Statistics */\nINTERNAL_SIZE_T mmapped_mem;\nINTERNAL_SIZE_T max_mmapped_mem;\n\n/* First address handed out by MORECORE/sbrk. */\nchar *sbrk_base;\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_26--if-use_tcache","title":"if USE_TCACHE","text":"<pre><code>/* Maximum number of buckets to use. */\nsize_t tcache_bins;\nsize_t tcache_max_bytes;\n/* Maximum number of chunks in each bucket. */\nsize_t tcache_count;\n/* Maximum number of chunks to remove from the unsorted list, which\n aren't used to prefill the cache. */\nsize_t tcache_unsorted_limit;\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_26--endif","title":"endif","text":"<p>};</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_35","title":"c_malloc_par_2_35","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the malloc_par struct for GLIBC >= 2.35 as a ctypes struct.</p> <p>https://github.com/bminor/glibc/blob/glibc-2.35/malloc/malloc.c#L1874</p> <p>struct malloc_par { /* Tunable parameters */ unsigned long trim_threshold; INTERNAL_SIZE_T top_pad; INTERNAL_SIZE_T mmap_threshold; INTERNAL_SIZE_T arena_test; INTERNAL_SIZE_T arena_max;</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_35--if-have_tunables","title":"if HAVE_TUNABLES","text":"<pre><code>/* Transparent Large Page support. */\nINTERNAL_SIZE_T thp_pagesize;\n/* A value different than 0 means to align mmap allocation to hp_pagesize\n add hp_flags on flags. */\nINTERNAL_SIZE_T hp_pagesize;\nint hp_flags;\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_35--endif","title":"endif","text":"<pre><code>/* Memory map support */\nint n_mmaps;\nint n_mmaps_max;\nint max_n_mmaps;\n/* the mmap_threshold is dynamic, until the user sets\n it manually, at which point we need to disable any\n dynamic behavior. */\nint no_dyn_threshold;\n\n/* Statistics */\nINTERNAL_SIZE_T mmapped_mem;\nINTERNAL_SIZE_T max_mmapped_mem;\n\n/* First address handed out by MORECORE/sbrk. */\nchar *sbrk_base;\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_35--if-use_tcache","title":"if USE_TCACHE","text":"<pre><code>/* Maximum number of buckets to use. */\nsize_t tcache_bins;\nsize_t tcache_max_bytes;\n/* Maximum number of chunks in each bucket. */\nsize_t tcache_count;\n/* Maximum number of chunks to remove from the unsorted list, which\n aren't used to prefill the cache. */\nsize_t tcache_unsorted_limit;\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.c_malloc_par_2_35--endif_1","title":"endif","text":"<p>};</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar","title":"MallocPar","text":"<pre><code>MallocPar(address: int)\n</code></pre> <p> Bases: <code>CStruct2GDB</code></p> <p>This class represents the malloc_par struct with interface compatible with <code>pwndbg.dbg_mod.Value</code>.</p> <p>Methods:</p> <ul> <li> <code>__int__</code> \u2013 <p>Returns the address of the C struct.</p> </li> <li> <code>__getitem__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__getattr__</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p> </li> <li> <code>read_field</code> \u2013 <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p> </li> <li> <code>unqualified</code> \u2013 <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p> </li> <li> <code>fields</code> \u2013 <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>keys</code> \u2013 <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> <li> <code>get_field_address</code> \u2013 <p>Returns the address of the specified field.</p> </li> <li> <code>get_field_offset</code> \u2013 <p>Returns the offset of the specified field.</p> </li> <li> <code>items</code> \u2013 <p>Returns a tuple of (field name, field value) pairs.</p> </li> <li> <code>has_field</code> \u2013 <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>sizeof</code> \u2013 </li> <li> <code>code</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>type</code> \u2013 <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.sizeof","title":"sizeof <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>sizeof = sizeof(_c_struct)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.code","title":"code <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>code = STRUCT\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.type","title":"type <code>property</code>","text":"<pre><code>type\n</code></pre> <p>Returns type(self) to make it compatible with the <code>pwndbg.dbg_mod.Value</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Returns the address of the C struct.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(key: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: Any) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <p>Returns a string representation of the C struct like <code>pwndbg.dbg_mod.Value</code> does.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.read_field","title":"read_field","text":"<pre><code>read_field(field: str) -> Value\n</code></pre> <p>Returns the value of the specified field as a <code>pwndbg.dbg_mod.Value</code>.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.unqualified","title":"unqualified <code>classmethod</code>","text":"<pre><code>unqualified()\n</code></pre> <p>Returns cls to make it compatible with the <code>gdb.types.has_field()</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.fields","title":"fields <code>classmethod</code>","text":"<pre><code>fields() -> list[FakeGDBField]\n</code></pre> <p>Return fields of the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.keys","title":"keys <code>classmethod</code>","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Return a list of the names of the fields in the struct to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.get_field_address","title":"get_field_address","text":"<pre><code>get_field_address(field: str) -> int\n</code></pre> <p>Returns the address of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.get_field_offset","title":"get_field_offset <code>classmethod</code>","text":"<pre><code>get_field_offset(field: str) -> int\n</code></pre> <p>Returns the offset of the specified field.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.items","title":"items","text":"<pre><code>items() -> tuple[tuple[Any, Any], ...]\n</code></pre> <p>Returns a tuple of (field name, field value) pairs.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.MallocPar.has_field","title":"has_field <code>classmethod</code>","text":"<pre><code>has_field(field: str) -> bool\n</code></pre> <p>Checks whether a field exists to make it compatible with the <code>pwndbg.dbg_mod.Type</code> interface.</p>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.request2size","title":"request2size","text":"<pre><code>request2size(req: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.fastbin_index","title":"fastbin_index","text":"<pre><code>fastbin_index(size: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/","title":"pwndbg.aglib.kernel","text":""},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel","title":"kernel","text":"<p>Modules:</p> <ul> <li> <code>kallsyms</code> \u2013 </li> <li> <code>macros</code> \u2013 </li> <li> <code>nftables</code> \u2013 </li> <li> <code>rbtree</code> \u2013 </li> <li> <code>slab</code> \u2013 </li> <li> <code>vmmap</code> \u2013 </li> </ul> <p>Classes:</p> <ul> <li> <code>ArchOps</code> \u2013 </li> <li> <code>x86Ops</code> \u2013 </li> <li> <code>i386Ops</code> \u2013 </li> <li> <code>x86_64Ops</code> \u2013 </li> <li> <code>Aarch64Ops</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>BIT</code> \u2013 </li> <li> <code>has_debug_syms</code> \u2013 </li> <li> <code>requires_kconfig</code> \u2013 </li> <li> <code>requires_debug_syms</code> \u2013 </li> <li> <code>nproc</code> \u2013 <p>Returns the number of processing units available, similar to nproc(1)</p> </li> <li> <code>get_first_kernel_ro</code> \u2013 <p>Returns the first kernel mapping which contains the linux_banner</p> </li> <li> <code>load_kconfig</code> \u2013 </li> <li> <code>kconfig</code> \u2013 </li> <li> <code>kcmdline</code> \u2013 </li> <li> <code>kversion</code> \u2013 </li> <li> <code>krelease</code> \u2013 </li> <li> <code>is_kaslr_enabled</code> \u2013 </li> <li> <code>kbase</code> \u2013 </li> <li> <code>get_idt_entries</code> \u2013 <p>Retrieves the IDT entries from memory.</p> </li> <li> <code>arch_ops</code> \u2013 </li> <li> <code>page_size</code> \u2013 </li> <li> <code>per_cpu</code> \u2013 </li> <li> <code>virt_to_phys</code> \u2013 </li> <li> <code>phys_to_virt</code> \u2013 </li> <li> <code>phys_to_pfn</code> \u2013 </li> <li> <code>pfn_to_phys</code> \u2013 </li> <li> <code>pfn_to_page</code> \u2013 </li> <li> <code>page_to_pfn</code> \u2013 </li> <li> <code>phys_to_page</code> \u2013 </li> <li> <code>page_to_phys</code> \u2013 </li> <li> <code>virt_to_page</code> \u2013 </li> <li> <code>page_to_virt</code> \u2013 </li> <li> <code>pfn_to_virt</code> \u2013 </li> <li> <code>virt_to_pfn</code> \u2013 </li> <li> <code>paging_enabled</code> \u2013 </li> <li> <code>num_numa_nodes</code> \u2013 <p>Returns the number of NUMA nodes that are online on the system</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>P</code> \u2013 </li> <li> <code>D</code> \u2013 </li> <li> <code>T</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.D","title":"D <code>module-attribute</code>","text":"<pre><code>D = TypeVar('D')\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps","title":"ArchOps","text":"<p> Bases: <code>ABC</code></p> <p>Methods:</p> <ul> <li> <code>page_size</code> \u2013 </li> <li> <code>per_cpu</code> \u2013 </li> <li> <code>virt_to_phys</code> \u2013 </li> <li> <code>phys_to_virt</code> \u2013 </li> <li> <code>phys_to_pfn</code> \u2013 </li> <li> <code>pfn_to_phys</code> \u2013 </li> <li> <code>pfn_to_page</code> \u2013 </li> <li> <code>page_to_pfn</code> \u2013 </li> <li> <code>virt_to_pfn</code> \u2013 </li> <li> <code>pfn_to_virt</code> \u2013 </li> <li> <code>phys_to_page</code> \u2013 </li> <li> <code>page_to_phys</code> \u2013 </li> <li> <code>virt_to_page</code> \u2013 </li> <li> <code>page_to_virt</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.page_size","title":"page_size <code>abstractmethod</code>","text":"<pre><code>page_size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.per_cpu","title":"per_cpu <code>abstractmethod</code>","text":"<pre><code>per_cpu(addr: Value, cpu=None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.virt_to_phys","title":"virt_to_phys <code>abstractmethod</code>","text":"<pre><code>virt_to_phys(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.phys_to_virt","title":"phys_to_virt <code>abstractmethod</code>","text":"<pre><code>phys_to_virt(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.phys_to_pfn","title":"phys_to_pfn <code>abstractmethod</code>","text":"<pre><code>phys_to_pfn(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.pfn_to_phys","title":"pfn_to_phys <code>abstractmethod</code>","text":"<pre><code>pfn_to_phys(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.pfn_to_page","title":"pfn_to_page <code>abstractmethod</code>","text":"<pre><code>pfn_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.page_to_pfn","title":"page_to_pfn <code>abstractmethod</code>","text":"<pre><code>page_to_pfn(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.virt_to_pfn","title":"virt_to_pfn","text":"<pre><code>virt_to_pfn(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.pfn_to_virt","title":"pfn_to_virt","text":"<pre><code>pfn_to_virt(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.phys_to_page","title":"phys_to_page","text":"<pre><code>phys_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.page_to_phys","title":"page_to_phys","text":"<pre><code>page_to_phys(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.virt_to_page","title":"virt_to_page","text":"<pre><code>virt_to_page(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.page_to_virt","title":"page_to_virt","text":"<pre><code>page_to_virt(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops","title":"x86Ops","text":"<p> Bases: <code>ArchOps</code></p> <p>Methods:</p> <ul> <li> <code>page_size</code> \u2013 </li> <li> <code>phys_to_virt</code> \u2013 </li> <li> <code>phys_to_pfn</code> \u2013 </li> <li> <code>pfn_to_phys</code> \u2013 </li> <li> <code>paging_enabled</code> \u2013 </li> <li> <code>per_cpu</code> \u2013 </li> <li> <code>virt_to_phys</code> \u2013 </li> <li> <code>pfn_to_page</code> \u2013 </li> <li> <code>page_to_pfn</code> \u2013 </li> <li> <code>virt_to_pfn</code> \u2013 </li> <li> <code>pfn_to_virt</code> \u2013 </li> <li> <code>phys_to_page</code> \u2013 </li> <li> <code>page_to_phys</code> \u2013 </li> <li> <code>virt_to_page</code> \u2013 </li> <li> <code>page_to_virt</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ptr_size</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.ptr_size","title":"ptr_size <code>abstractmethod</code> <code>property</code>","text":"<pre><code>ptr_size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.page_shift","title":"page_shift <code>abstractmethod</code> <code>property</code>","text":"<pre><code>page_shift: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.page_offset","title":"page_offset <code>abstractmethod</code> <code>property</code>","text":"<pre><code>page_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.page_size","title":"page_size","text":"<pre><code>page_size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.phys_to_virt","title":"phys_to_virt","text":"<pre><code>phys_to_virt(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.phys_to_pfn","title":"phys_to_pfn","text":"<pre><code>phys_to_pfn(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.pfn_to_phys","title":"pfn_to_phys","text":"<pre><code>pfn_to_phys(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.paging_enabled","title":"paging_enabled <code>staticmethod</code>","text":"<pre><code>paging_enabled() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.per_cpu","title":"per_cpu <code>abstractmethod</code>","text":"<pre><code>per_cpu(addr: Value, cpu=None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.virt_to_phys","title":"virt_to_phys <code>abstractmethod</code>","text":"<pre><code>virt_to_phys(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.pfn_to_page","title":"pfn_to_page <code>abstractmethod</code>","text":"<pre><code>pfn_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.page_to_pfn","title":"page_to_pfn <code>abstractmethod</code>","text":"<pre><code>page_to_pfn(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.virt_to_pfn","title":"virt_to_pfn","text":"<pre><code>virt_to_pfn(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.pfn_to_virt","title":"pfn_to_virt","text":"<pre><code>pfn_to_virt(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.phys_to_page","title":"phys_to_page","text":"<pre><code>phys_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.page_to_phys","title":"page_to_phys","text":"<pre><code>page_to_phys(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.virt_to_page","title":"virt_to_page","text":"<pre><code>virt_to_page(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.page_to_virt","title":"page_to_virt","text":"<pre><code>page_to_virt(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops","title":"i386Ops","text":"<pre><code>i386Ops()\n</code></pre> <p> Bases: <code>x86Ops</code></p> <p>Methods:</p> <ul> <li> <code>virt_to_phys</code> \u2013 </li> <li> <code>per_cpu</code> \u2013 </li> <li> <code>pfn_to_page</code> \u2013 </li> <li> <code>page_to_pfn</code> \u2013 </li> <li> <code>page_size</code> \u2013 </li> <li> <code>phys_to_virt</code> \u2013 </li> <li> <code>phys_to_pfn</code> \u2013 </li> <li> <code>pfn_to_phys</code> \u2013 </li> <li> <code>virt_to_pfn</code> \u2013 </li> <li> <code>pfn_to_virt</code> \u2013 </li> <li> <code>phys_to_page</code> \u2013 </li> <li> <code>page_to_phys</code> \u2013 </li> <li> <code>virt_to_page</code> \u2013 </li> <li> <code>page_to_virt</code> \u2013 </li> <li> <code>paging_enabled</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>START_KERNEL_map</code> \u2013 </li> <li> <code>ptr_size</code> (<code>int</code>) \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.START_KERNEL_map","title":"START_KERNEL_map <code>instance-attribute</code>","text":"<pre><code>START_KERNEL_map = _PAGE_OFFSET\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.ptr_size","title":"ptr_size <code>property</code>","text":"<pre><code>ptr_size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.page_offset","title":"page_offset <code>property</code>","text":"<pre><code>page_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.page_shift","title":"page_shift <code>property</code>","text":"<pre><code>page_shift: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.virt_to_phys","title":"virt_to_phys","text":"<pre><code>virt_to_phys(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.per_cpu","title":"per_cpu","text":"<pre><code>per_cpu(addr: Value, cpu: int | None = None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.pfn_to_page","title":"pfn_to_page","text":"<pre><code>pfn_to_page(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.page_to_pfn","title":"page_to_pfn","text":"<pre><code>page_to_pfn(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.page_size","title":"page_size","text":"<pre><code>page_size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.phys_to_virt","title":"phys_to_virt","text":"<pre><code>phys_to_virt(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.phys_to_pfn","title":"phys_to_pfn","text":"<pre><code>phys_to_pfn(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.pfn_to_phys","title":"pfn_to_phys","text":"<pre><code>pfn_to_phys(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.virt_to_pfn","title":"virt_to_pfn","text":"<pre><code>virt_to_pfn(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.pfn_to_virt","title":"pfn_to_virt","text":"<pre><code>pfn_to_virt(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.phys_to_page","title":"phys_to_page","text":"<pre><code>phys_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.page_to_phys","title":"page_to_phys","text":"<pre><code>page_to_phys(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.virt_to_page","title":"virt_to_page","text":"<pre><code>virt_to_page(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.page_to_virt","title":"page_to_virt","text":"<pre><code>page_to_virt(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.paging_enabled","title":"paging_enabled <code>staticmethod</code>","text":"<pre><code>paging_enabled() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops","title":"x86_64Ops","text":"<pre><code>x86_64Ops()\n</code></pre> <p> Bases: <code>x86Ops</code></p> <p>Methods:</p> <ul> <li> <code>per_cpu</code> \u2013 </li> <li> <code>virt_to_phys</code> \u2013 </li> <li> <code>pfn_to_page</code> \u2013 </li> <li> <code>page_to_pfn</code> \u2013 </li> <li> <code>cpu_feature_capability</code> \u2013 </li> <li> <code>uses_5lvl_paging</code> \u2013 </li> <li> <code>page_size</code> \u2013 </li> <li> <code>phys_to_virt</code> \u2013 </li> <li> <code>phys_to_pfn</code> \u2013 </li> <li> <code>pfn_to_phys</code> \u2013 </li> <li> <code>virt_to_pfn</code> \u2013 </li> <li> <code>pfn_to_virt</code> \u2013 </li> <li> <code>phys_to_page</code> \u2013 </li> <li> <code>page_to_phys</code> \u2013 </li> <li> <code>virt_to_page</code> \u2013 </li> <li> <code>page_to_virt</code> \u2013 </li> <li> <code>paging_enabled</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>VMEMMAP_START</code> \u2013 </li> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>START_KERNEL_map</code> \u2013 </li> <li> <code>phys_base</code> \u2013 </li> <li> <code>ptr_size</code> (<code>int</code>) \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.VMEMMAP_START","title":"VMEMMAP_START <code>instance-attribute</code>","text":"<pre><code>VMEMMAP_START = 18434359174734282752\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>instance-attribute</code>","text":"<pre><code>STRUCT_PAGE_SIZE = sizeof\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>instance-attribute</code>","text":"<pre><code>STRUCT_PAGE_SHIFT = int(log2(STRUCT_PAGE_SIZE))\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.START_KERNEL_map","title":"START_KERNEL_map <code>instance-attribute</code>","text":"<pre><code>START_KERNEL_map = 18446744071562067968\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.phys_base","title":"phys_base <code>instance-attribute</code>","text":"<pre><code>phys_base = 16777216\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.ptr_size","title":"ptr_size <code>property</code>","text":"<pre><code>ptr_size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.page_offset","title":"page_offset <code>property</code>","text":"<pre><code>page_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.page_shift","title":"page_shift <code>property</code>","text":"<pre><code>page_shift: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.per_cpu","title":"per_cpu","text":"<pre><code>per_cpu(addr: Value, cpu: int | None = None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.virt_to_phys","title":"virt_to_phys","text":"<pre><code>virt_to_phys(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.pfn_to_page","title":"pfn_to_page","text":"<pre><code>pfn_to_page(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.page_to_pfn","title":"page_to_pfn","text":"<pre><code>page_to_pfn(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.cpu_feature_capability","title":"cpu_feature_capability <code>staticmethod</code>","text":"<pre><code>cpu_feature_capability(feature: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.uses_5lvl_paging","title":"uses_5lvl_paging <code>staticmethod</code>","text":"<pre><code>uses_5lvl_paging() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.page_size","title":"page_size","text":"<pre><code>page_size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.phys_to_virt","title":"phys_to_virt","text":"<pre><code>phys_to_virt(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.phys_to_pfn","title":"phys_to_pfn","text":"<pre><code>phys_to_pfn(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.pfn_to_phys","title":"pfn_to_phys","text":"<pre><code>pfn_to_phys(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.virt_to_pfn","title":"virt_to_pfn","text":"<pre><code>virt_to_pfn(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.pfn_to_virt","title":"pfn_to_virt","text":"<pre><code>pfn_to_virt(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.phys_to_page","title":"phys_to_page","text":"<pre><code>phys_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.page_to_phys","title":"page_to_phys","text":"<pre><code>page_to_phys(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.virt_to_page","title":"virt_to_page","text":"<pre><code>virt_to_page(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.page_to_virt","title":"page_to_virt","text":"<pre><code>page_to_virt(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.paging_enabled","title":"paging_enabled <code>staticmethod</code>","text":"<pre><code>paging_enabled() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops","title":"Aarch64Ops","text":"<pre><code>Aarch64Ops()\n</code></pre> <p> Bases: <code>ArchOps</code></p> <p>Methods:</p> <ul> <li> <code>page_size</code> \u2013 </li> <li> <code>per_cpu</code> \u2013 </li> <li> <code>virt_to_phys</code> \u2013 </li> <li> <code>phys_to_virt</code> \u2013 </li> <li> <code>phys_to_pfn</code> \u2013 </li> <li> <code>pfn_to_phys</code> \u2013 </li> <li> <code>pfn_to_page</code> \u2013 </li> <li> <code>page_to_pfn</code> \u2013 </li> <li> <code>paging_enabled</code> \u2013 </li> <li> <code>virt_to_pfn</code> \u2013 </li> <li> <code>pfn_to_virt</code> \u2013 </li> <li> <code>phys_to_page</code> \u2013 </li> <li> <code>page_to_phys</code> \u2013 </li> <li> <code>virt_to_page</code> \u2013 </li> <li> <code>page_to_virt</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>VA_BITS</code> \u2013 </li> <li> <code>PAGE_SHIFT</code> \u2013 </li> <li> <code>PHYS_OFFSET</code> \u2013 </li> <li> <code>PAGE_OFFSET</code> \u2013 </li> <li> <code>VMEMMAP_SHIFT</code> \u2013 </li> <li> <code>VMEMMAP_START</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>instance-attribute</code>","text":"<pre><code>STRUCT_PAGE_SIZE = sizeof\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>instance-attribute</code>","text":"<pre><code>STRUCT_PAGE_SHIFT = int(log2(STRUCT_PAGE_SIZE))\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.VA_BITS","title":"VA_BITS <code>instance-attribute</code>","text":"<pre><code>VA_BITS = int(kconfig()['ARM64_VA_BITS'])\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.PAGE_SHIFT","title":"PAGE_SHIFT <code>instance-attribute</code>","text":"<pre><code>PAGE_SHIFT = int(kconfig()['CONFIG_ARM64_PAGE_SHIFT'])\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.PHYS_OFFSET","title":"PHYS_OFFSET <code>instance-attribute</code>","text":"<pre><code>PHYS_OFFSET = u(addr)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.PAGE_OFFSET","title":"PAGE_OFFSET <code>instance-attribute</code>","text":"<pre><code>PAGE_OFFSET = -1 << VA_BITS + 2 ** 64\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.VMEMMAP_SHIFT","title":"VMEMMAP_SHIFT <code>instance-attribute</code>","text":"<pre><code>VMEMMAP_SHIFT = PAGE_SHIFT - STRUCT_PAGE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.VMEMMAP_START","title":"VMEMMAP_START <code>instance-attribute</code>","text":"<pre><code>VMEMMAP_START = -1 << VA_BITS - VMEMMAP_SHIFT % 1 << 64\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.page_size","title":"page_size","text":"<pre><code>page_size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.per_cpu","title":"per_cpu","text":"<pre><code>per_cpu(addr: Value, cpu: int | None = None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.virt_to_phys","title":"virt_to_phys","text":"<pre><code>virt_to_phys(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.phys_to_virt","title":"phys_to_virt","text":"<pre><code>phys_to_virt(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.phys_to_pfn","title":"phys_to_pfn","text":"<pre><code>phys_to_pfn(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.pfn_to_phys","title":"pfn_to_phys","text":"<pre><code>pfn_to_phys(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.pfn_to_page","title":"pfn_to_page","text":"<pre><code>pfn_to_page(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.page_to_pfn","title":"page_to_pfn","text":"<pre><code>page_to_pfn(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.paging_enabled","title":"paging_enabled <code>staticmethod</code>","text":"<pre><code>paging_enabled() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.virt_to_pfn","title":"virt_to_pfn","text":"<pre><code>virt_to_pfn(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.pfn_to_virt","title":"pfn_to_virt","text":"<pre><code>pfn_to_virt(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.phys_to_page","title":"phys_to_page","text":"<pre><code>phys_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.page_to_phys","title":"page_to_phys","text":"<pre><code>page_to_phys(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.virt_to_page","title":"virt_to_page","text":"<pre><code>virt_to_page(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.page_to_virt","title":"page_to_virt","text":"<pre><code>page_to_virt(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.BIT","title":"BIT","text":"<pre><code>BIT(shift: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.has_debug_syms","title":"has_debug_syms","text":"<pre><code>has_debug_syms() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.requires_kconfig","title":"requires_kconfig","text":"<pre><code>requires_kconfig(\n default: D = None,\n) -> Callable[[Callable[P, T]], Callable[P, T | D]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.requires_debug_syms","title":"requires_debug_syms","text":"<pre><code>requires_debug_syms(\n default: D = None,\n) -> Callable[[Callable[P, T]], Callable[P, T | D]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.nproc","title":"nproc","text":"<pre><code>nproc() -> int\n</code></pre> <p>Returns the number of processing units available, similar to nproc(1)</p>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.get_first_kernel_ro","title":"get_first_kernel_ro","text":"<pre><code>get_first_kernel_ro() -> Page | None\n</code></pre> <p>Returns the first kernel mapping which contains the linux_banner</p>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.load_kconfig","title":"load_kconfig","text":"<pre><code>load_kconfig() -> Kconfig | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.kconfig","title":"kconfig","text":"<pre><code>kconfig() -> Kconfig | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.kcmdline","title":"kcmdline","text":"<pre><code>kcmdline() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.kversion","title":"kversion","text":"<pre><code>kversion() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.krelease","title":"krelease","text":"<pre><code>krelease() -> tuple[int, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.is_kaslr_enabled","title":"is_kaslr_enabled","text":"<pre><code>is_kaslr_enabled() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.kbase","title":"kbase","text":"<pre><code>kbase() -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.get_idt_entries","title":"get_idt_entries","text":"<pre><code>get_idt_entries() -> list[IDTEntry]\n</code></pre> <p>Retrieves the IDT entries from memory.</p>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.arch_ops","title":"arch_ops","text":"<pre><code>arch_ops() -> ArchOps\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.page_size","title":"page_size","text":"<pre><code>page_size() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.per_cpu","title":"per_cpu","text":"<pre><code>per_cpu(addr: Value, cpu: int | None = None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.virt_to_phys","title":"virt_to_phys","text":"<pre><code>virt_to_phys(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.phys_to_virt","title":"phys_to_virt","text":"<pre><code>phys_to_virt(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.phys_to_pfn","title":"phys_to_pfn","text":"<pre><code>phys_to_pfn(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.pfn_to_phys","title":"pfn_to_phys","text":"<pre><code>pfn_to_phys(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.pfn_to_page","title":"pfn_to_page","text":"<pre><code>pfn_to_page(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.page_to_pfn","title":"page_to_pfn","text":"<pre><code>page_to_pfn(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.phys_to_page","title":"phys_to_page","text":"<pre><code>phys_to_page(phys: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.page_to_phys","title":"page_to_phys","text":"<pre><code>page_to_phys(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.virt_to_page","title":"virt_to_page","text":"<pre><code>virt_to_page(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.page_to_virt","title":"page_to_virt","text":"<pre><code>page_to_virt(page: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.pfn_to_virt","title":"pfn_to_virt","text":"<pre><code>pfn_to_virt(pfn: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.virt_to_pfn","title":"virt_to_pfn","text":"<pre><code>virt_to_pfn(virt: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.paging_enabled","title":"paging_enabled","text":"<pre><code>paging_enabled() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.num_numa_nodes","title":"num_numa_nodes","text":"<pre><code>num_numa_nodes() -> int\n</code></pre> <p>Returns the number of NUMA nodes that are online on the system</p>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/","title":"pwndbg.aglib.kernel.kallsyms","text":""},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms","title":"kallsyms","text":"<p>Classes:</p> <ul> <li> <code>Kallsyms</code> \u2013 <ul> <li>linux_banner >= 6.4</li> </ul> </li> </ul> <p>Functions:</p> <ul> <li> <code>get</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms","title":"Kallsyms","text":"<pre><code>Kallsyms()\n</code></pre> <ul> <li>linux_banner >= 6.4</li> <li>... <= 6.4</li> <li>kallsyms_offsets</li> <li>kallsyms_relative_base</li> <li>kallsyms_num_syms</li> <li>kallsyms_names</li> <li>kallsyms_markers</li> <li>kallsyms_token_table</li> <li>kallsyms_token_index</li> <li>kallsyms_offsets >= 6.4</li> <li>kallsyms_relative_base >= 6.4</li> </ul> <p>Methods:</p> <ul> <li> <code>find_token_table</code> \u2013 <p>This function searches for the kallsyms_token_table structure in the kernel memory.</p> </li> <li> <code>find_token_index</code> \u2013 <p>This function searches for the kallsyms_token_index structure in the kernel memory</p> </li> <li> <code>find_markers</code> \u2013 <p>This function searches for the kallsyms_markers structure in the kernel memory</p> </li> <li> <code>find_num_syms</code> \u2013 <p>This function searches for the kallsyms_num_syms variable in the kernel memory</p> </li> <li> <code>find_offsets</code> \u2013 <p>This function searches for the kallsyms_offsets/kallsyms_addresses table in the kernel memory</p> </li> <li> <code>find_relative_base</code> \u2013 <p>This function searches for the kallsyms_relative_base variable in the kernel memory.</p> </li> <li> <code>find_names</code> \u2013 </li> <li> <code>get_kernel_addresses</code> \u2013 </li> <li> <code>parse_symbol_table</code> \u2013 </li> <li> <code>get_token_table</code> \u2013 </li> <li> <code>find_names_uncompressed</code> \u2013 </li> <li> <code>find_markers_uncompressed</code> \u2013 <p>This function searches for the kallsyms_markers structure in the kernel memory</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>kallsyms</code> (<code>dict[str, tuple[int, str]]</code>) \u2013 </li> <li> <code>kbase</code> \u2013 </li> <li> <code>r_base</code> \u2013 </li> <li> <code>kernel_ro_mem</code> \u2013 </li> <li> <code>kernel_version</code> \u2013 </li> <li> <code>is_offsets</code> \u2013 </li> <li> <code>rbase_offset</code> \u2013 </li> <li> <code>is_big_endian</code> \u2013 </li> <li> <code>token_table</code> \u2013 </li> <li> <code>is_uncompressed</code> \u2013 </li> <li> <code>markers</code> \u2013 </li> <li> <code>token_index</code> \u2013 </li> <li> <code>num_syms</code> \u2013 </li> <li> <code>offsets</code> \u2013 </li> <li> <code>names</code> \u2013 </li> <li> <code>kernel_addresses</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.kallsyms","title":"kallsyms <code>instance-attribute</code>","text":"<pre><code>kallsyms: dict[str, tuple[int, str]] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.kbase","title":"kbase <code>instance-attribute</code>","text":"<pre><code>kbase = kbase()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.r_base","title":"r_base <code>instance-attribute</code>","text":"<pre><code>r_base = vaddr\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.kernel_ro_mem","title":"kernel_ro_mem <code>instance-attribute</code>","text":"<pre><code>kernel_ro_mem = read(vaddr, memsz)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.kernel_version","title":"kernel_version <code>instance-attribute</code>","text":"<pre><code>kernel_version = krelease()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.is_offsets","title":"is_offsets <code>instance-attribute</code>","text":"<pre><code>is_offsets = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.rbase_offset","title":"rbase_offset <code>instance-attribute</code>","text":"<pre><code>rbase_offset = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.is_big_endian","title":"is_big_endian <code>instance-attribute</code>","text":"<pre><code>is_big_endian = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.token_table","title":"token_table <code>instance-attribute</code>","text":"<pre><code>token_table = find_token_table()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.is_uncompressed","title":"is_uncompressed <code>instance-attribute</code>","text":"<pre><code>is_uncompressed = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.markers","title":"markers <code>instance-attribute</code>","text":"<pre><code>markers = find_markers_uncompressed()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.token_index","title":"token_index <code>instance-attribute</code>","text":"<pre><code>token_index = find_token_index()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.num_syms","title":"num_syms <code>instance-attribute</code>","text":"<pre><code>num_syms = find_num_syms()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.offsets","title":"offsets <code>instance-attribute</code>","text":"<pre><code>offsets = find_offsets()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.names","title":"names <code>instance-attribute</code>","text":"<pre><code>names = find_names()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.kernel_addresses","title":"kernel_addresses <code>instance-attribute</code>","text":"<pre><code>kernel_addresses = get_kernel_addresses()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_token_table","title":"find_token_table","text":"<pre><code>find_token_table() -> int\n</code></pre> <p>This function searches for the kallsyms_token_table structure in the kernel memory. The kallsyms_token_table contains 256 zero-terminated tokens from which symbol names are built. Example structure: 0xffffffff827b2f00: \"mm\" 0xffffffff827b2f03: \"tim\" 0xffffffff827b2f07: \"bu\" 0xffffffff827b2f0a: \"ode_\" 0xffffffff827b2f0f: \"robestub\" 0xffffffff827b2fdb: \"0\" 0xffffffff827b2fdd: \"1\" 0xffffffff827b2fdf: \"2\" 0xffffffff827b2fe1: \"3\" 0xffffffff827b2fe3: \"4\" 0xffffffff827b2fe5: \"5\" 0xffffffff827b2fe7: \"6\" 0xffffffff827b2fe9: \"7\" 0xffffffff827b2feb: \"8\" 0xffffffff827b2fed: \"9\""},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_token_index","title":"find_token_index","text":"<pre><code>find_token_index() -> int | None\n</code></pre> <p>This function searches for the kallsyms_token_index structure in the kernel memory starting at kallsyms_token_table. The token index table provides offsets into the kallsyms_token_table for each 256 byte-valued sub-table. The kallsyms_token_index is typically located immediately after the kallsyms_token_table in the kernel's read-only data section. Example structure: 0xffffffff827b3288: 0x0000 0x0003 0x0007 0x000a 0x000f 0x0018 0x001f 0x0023 0xffffffff827b3298: 0x0027 0x0031 0x0035 0x0038 0x003b 0x0043 0x0047 0x004a 0xffffffff827b32a8: 0x004f 0x0053 0x0056 0x0059 0x005d 0x0061 0x0067 0x006b 0xffffffff827b32b8: 0x006e 0x0071 0x0076 0x007c 0x0080 0x0088 0x008b 0x008f 0xffffffff827b32c8: 0x0094 0x0098 0x009b 0x009f 0x00a3 0x00a8 0x00ab 0x00b0</p>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_markers","title":"find_markers","text":"<pre><code>find_markers() -> int | None\n</code></pre> <p>This function searches for the kallsyms_markers structure in the kernel memory starting at kallsyms_token_table and search backwards. The markers table contains offsets to the corresponding symbol name for each kernel symbol. The kallsyms_markers table is typically located immediately before the kallsyms_token_table in the kernel's read-only data section. Example structure: 0xffffffff827b2430: 0x00000000 0x00000b2a 0x00001762 0x000023f6 0xffffffff827b2440: 0x00002fe4 0x00003c9d 0x0000487c 0x000056fd 0xffffffff827b2450: 0x00006597 0x000073b9 0x000081be 0x00008f21 0xffffffff827b2460: 0x00009c94 0x0000a958 0x0000b632 0x0000c193 0xffffffff827b2470: 0x0000ce0b 0x0000db98 0x0000ea3e 0x0000f80a 0xffffffff827b2480: 0x000105be 0x000112d3 0x00011f8c 0x00012d75 0xffffffff827b2490: 0x0001384d 0x0001446e 0x00015138 0x00015d8c</p>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_num_syms","title":"find_num_syms","text":"<pre><code>find_num_syms()\n</code></pre> <p>This function searches for the kallsyms_num_syms variable in the kernel memory starting at kallsyms_markers. The kallsyms_num_syms holds the number of kernel symbols in the symbol table. The kallsyms_num_syms variable is typically located before the kallsyms_names table in the kernel's read-only data section. In newer kernel versions the kallsyms_num_syms is immediately behind the linux_banner and in older version its behind kallsyms_base_relative or kallsyms_addresses (it depends on CONFIG_KALLSYMS_BASE_RELATIVE y/n)</p>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_offsets","title":"find_offsets","text":"<pre><code>find_offsets()\n</code></pre> <p>This function searches for the kallsyms_offsets/kallsyms_addresses table in the kernel memory starting at kallsyms_token_index. The offsets/addresses table containts offsets / addresses of each symbol in the kernel. The kallsyms_addresses is typically located before the kallsyms_num_syms variable in the kernel's read-only data section. Example structure: 0xffffffff827b3488: 0x00000000 0x00000000 0x00001000 0x00002000 0xffffffff827b3498: 0x00006000 0x0000b000 0x0000c000 0x0000d000 0xffffffff827b34a8: 0x00015000 0x00015008 0x00015010 0x00015018 0xffffffff827b34b8: 0x00015020 0x00015022 0x00015030 0x00015050 0xffffffff827b34c8: 0x00015450 0x00015460 0x00015860 0x00015888 0xffffffff827b34d8: 0x00015890 0x00015898 0x000158a0 0x000159c0</p>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_relative_base","title":"find_relative_base","text":"<pre><code>find_relative_base()\n</code></pre> <p>This function searches for the kallsyms_relative_base variable in the kernel memory. The relative base is used to calculate the actual virtual addresses of symbols from their offsets in the kallsyms_offsets table. The kallsyms_relative_base variable is typically located after the kallsyms_offsets table in the kernel's read-only data section.</p>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_names","title":"find_names","text":"<pre><code>find_names()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.get_kernel_addresses","title":"get_kernel_addresses","text":"<pre><code>get_kernel_addresses()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.parse_symbol_table","title":"parse_symbol_table","text":"<pre><code>parse_symbol_table()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.get_token_table","title":"get_token_table","text":"<pre><code>get_token_table()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_names_uncompressed","title":"find_names_uncompressed","text":"<pre><code>find_names_uncompressed()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.Kallsyms.find_markers_uncompressed","title":"find_markers_uncompressed","text":"<pre><code>find_markers_uncompressed()\n</code></pre> <p>This function searches for the kallsyms_markers structure in the kernel memory Original Source: https://github.com/marin-m/vmlinux-to-elf/blob/master/vmlinux_to_elf/kallsyms_finder.py</p>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/#pwndbg.aglib.kernel.kallsyms.get","title":"get","text":"<pre><code>get() -> dict[str, tuple[int, str]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/macros/","title":"pwndbg.aglib.kernel.macros","text":""},{"location":"reference/pwndbg/aglib/kernel/macros/#pwndbg.aglib.kernel.macros","title":"macros","text":"<p>Functions:</p> <ul> <li> <code>container_of</code> \u2013 </li> <li> <code>for_each_entry</code> \u2013 </li> <li> <code>swab</code> \u2013 </li> <li> <code>compound_head</code> \u2013 <p>returns the head page of compound pages</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/macros/#pwndbg.aglib.kernel.macros.container_of","title":"container_of","text":"<pre><code>container_of(ptr: int, typename: str, fieldname: str) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/macros/#pwndbg.aglib.kernel.macros.for_each_entry","title":"for_each_entry","text":"<pre><code>for_each_entry(head: Value, typename: str, field: str) -> Iterator[Value]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/macros/#pwndbg.aglib.kernel.macros.swab","title":"swab","text":"<pre><code>swab(x: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/macros/#pwndbg.aglib.kernel.macros.compound_head","title":"compound_head","text":"<pre><code>compound_head(page: Value) -> Value\n</code></pre> <p>returns the head page of compound pages</p>"},{"location":"reference/pwndbg/aglib/kernel/nftables/","title":"pwndbg.aglib.kernel.nftables","text":""},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables","title":"nftables","text":"<p>Classes:</p> <ul> <li> <code>NftFields</code> \u2013 </li> <li> <code>Expr</code> \u2013 </li> <li> <code>Rule</code> \u2013 </li> <li> <code>ChainHook</code> \u2013 </li> <li> <code>Chain</code> \u2013 </li> <li> <code>Set</code> \u2013 </li> <li> <code>Object</code> \u2013 </li> <li> <code>FlowtableHook</code> \u2013 </li> <li> <code>Flowtable</code> \u2013 </li> <li> <code>Table</code> \u2013 </li> <li> <code>Nftables</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>catch_error</code> \u2013 </li> <li> <code>get_init_net_namespace</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>NFPROTO_INET</code> \u2013 </li> <li> <code>NFPROTO_IPV4</code> \u2013 </li> <li> <code>NFPROTO_ARP</code> \u2013 </li> <li> <code>NFPROTO_NETDEV</code> \u2013 </li> <li> <code>NFPROTO_BRIDGE</code> \u2013 </li> <li> <code>NFPROTO_IPV6</code> \u2013 </li> <li> <code>nftables_table_family</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NFPROTO_INET","title":"NFPROTO_INET <code>module-attribute</code>","text":"<pre><code>NFPROTO_INET = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NFPROTO_IPV4","title":"NFPROTO_IPV4 <code>module-attribute</code>","text":"<pre><code>NFPROTO_IPV4 = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NFPROTO_ARP","title":"NFPROTO_ARP <code>module-attribute</code>","text":"<pre><code>NFPROTO_ARP = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NFPROTO_NETDEV","title":"NFPROTO_NETDEV <code>module-attribute</code>","text":"<pre><code>NFPROTO_NETDEV = 5\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NFPROTO_BRIDGE","title":"NFPROTO_BRIDGE <code>module-attribute</code>","text":"<pre><code>NFPROTO_BRIDGE = 7\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NFPROTO_IPV6","title":"NFPROTO_IPV6 <code>module-attribute</code>","text":"<pre><code>NFPROTO_IPV6 = 10\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.nftables_table_family","title":"nftables_table_family <code>module-attribute</code>","text":"<pre><code>nftables_table_family = {\n \"inet\": NFPROTO_INET,\n \"ip\": NFPROTO_IPV4,\n \"arp\": NFPROTO_ARP,\n \"netdev\": NFPROTO_NETDEV,\n \"bridge\": NFPROTO_BRIDGE,\n \"ip6\": NFPROTO_IPV6,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NftFields","title":"NftFields","text":"<p> Bases: <code>object</code></p> <p>Methods:</p> <ul> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NftFields.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NftFields.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.NftFields.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Expr","title":"Expr","text":"<pre><code>Expr(addr: Value)\n</code></pre> <p>Methods:</p> <ul> <li> <code>print_expr_iptables</code> \u2013 </li> <li> <code>print_expr_nftables</code> \u2013 </li> <li> <code>print</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>expr_name</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Expr.expr_name","title":"expr_name <code>property</code>","text":"<pre><code>expr_name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Expr.print_expr_iptables","title":"print_expr_iptables","text":"<pre><code>print_expr_iptables(expr_name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Expr.print_expr_nftables","title":"print_expr_nftables","text":"<pre><code>print_expr_nftables(expr_name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Expr.print","title":"print","text":"<pre><code>print(print_nested: bool = True)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule","title":"Rule","text":"<pre><code>Rule(addr: Value, chain: 'Chain')\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>find</code> \u2013 </li> <li> <code>iter_exprs</code> \u2013 </li> <li> <code>print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>handle</code> (<code>int</code>) \u2013 </li> <li> <code>userdata</code> (<code>bytearray</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.userdata","title":"userdata <code>property</code>","text":"<pre><code>userdata: bytearray\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.find","title":"find <code>classmethod</code>","text":"<pre><code>find(\n table_name: str,\n table_family: int,\n chain_name: str,\n rule_id: int,\n nsid: int | None = None,\n) -> Iterator[\"Rule\"]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.iter_exprs","title":"iter_exprs","text":"<pre><code>iter_exprs() -> Iterator[Expr]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.print","title":"print","text":"<pre><code>print(print_nested: bool = True)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Rule.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook","title":"ChainHook","text":"<pre><code>ChainHook(parent: 'Chain')\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>is_netdev</code> \u2013 </li> <li> <code>get_netdevs</code> \u2013 </li> <li> <code>nested_print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>hooknum</code> (<code>int</code>) \u2013 </li> <li> <code>priority</code> (<code>int</code>) \u2013 </li> <li> <code>dev</code> (<code>str</code>) \u2013 </li> <li> <code>devs</code> (<code>list[str]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.hooknum","title":"hooknum <code>instance-attribute</code>","text":"<pre><code>hooknum: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.priority","title":"priority <code>instance-attribute</code>","text":"<pre><code>priority: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.dev","title":"dev <code>property</code>","text":"<pre><code>dev: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.devs","title":"devs <code>property</code>","text":"<pre><code>devs: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.is_netdev","title":"is_netdev","text":"<pre><code>is_netdev() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.get_netdevs","title":"get_netdevs","text":"<pre><code>get_netdevs() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.nested_print","title":"nested_print","text":"<pre><code>nested_print(nested: int = 0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.ChainHook.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain","title":"Chain","text":"<pre><code>Chain(addr: Value)\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>find</code> \u2013 </li> <li> <code>iter_rules</code> \u2013 </li> <li> <code>print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>bound</code> (<code>int</code>) \u2013 </li> <li> <code>genmask</code> (<code>int</code>) \u2013 </li> <li> <code>handle</code> (<code>int</code>) \u2013 </li> <li> <code>use</code> (<code>int</code>) \u2013 </li> <li> <code>flags</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>hook</code> (<code>ChainHook</code>) \u2013 </li> <li> <code>userdata</code> (<code>bytearray</code>) \u2013 </li> <li> <code>policy</code> (<code>int</code>) \u2013 </li> <li> <code>type</code> (<code>str</code>) \u2013 </li> <li> <code>table</code> (<code>'Table'</code>) \u2013 </li> <li> <code>basechain</code> (<code>Value | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.bound","title":"bound <code>instance-attribute</code>","text":"<pre><code>bound: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.genmask","title":"genmask <code>instance-attribute</code>","text":"<pre><code>genmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.use","title":"use <code>instance-attribute</code>","text":"<pre><code>use: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.flags","title":"flags <code>instance-attribute</code>","text":"<pre><code>flags: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.hook","title":"hook <code>instance-attribute</code>","text":"<pre><code>hook: ChainHook = ChainHook(self)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.userdata","title":"userdata <code>property</code>","text":"<pre><code>userdata: bytearray\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.policy","title":"policy <code>property</code>","text":"<pre><code>policy: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.type","title":"type <code>property</code>","text":"<pre><code>type: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.table","title":"table <code>property</code>","text":"<pre><code>table: 'Table'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.basechain","title":"basechain <code>property</code>","text":"<pre><code>basechain: Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.find","title":"find <code>classmethod</code>","text":"<pre><code>find(\n table_family: int | None = None,\n table_name: str | None = None,\n chain_name: str | None = None,\n nsid: int | None = None,\n) -> Iterator[\"Chain\"]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.iter_rules","title":"iter_rules","text":"<pre><code>iter_rules() -> Iterator[Rule]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.print","title":"print","text":"<pre><code>print(print_nested: bool = True)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Chain.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set","title":"Set","text":"<pre><code>Set(addr: Value)\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>iter_expr</code> \u2013 </li> <li> <code>iter_elems</code> \u2013 </li> <li> <code>print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>use</code> (<code>int</code>) \u2013 </li> <li> <code>dead</code> (<code>int</code>) \u2013 </li> <li> <code>genmask</code> (<code>int</code>) \u2013 </li> <li> <code>field_count</code> (<code>int</code>) \u2013 </li> <li> <code>num_exprs</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>flags</code> (<code>int</code>) \u2013 </li> <li> <code>ktype</code> (<code>int</code>) \u2013 </li> <li> <code>klen</code> (<code>int</code>) \u2013 </li> <li> <code>dtype</code> (<code>int</code>) \u2013 </li> <li> <code>dlen</code> (<code>int</code>) \u2013 </li> <li> <code>policy</code> (<code>int</code>) \u2013 </li> <li> <code>timeout</code> (<code>int</code>) \u2013 </li> <li> <code>gc_int</code> (<code>int</code>) \u2013 </li> <li> <code>objtype</code> (<code>int</code>) \u2013 </li> <li> <code>handle</code> (<code>int</code>) \u2013 </li> <li> <code>nelems</code> (<code>int</code>) \u2013 </li> <li> <code>desc_size</code> (<code>int</code>) \u2013 </li> <li> <code>desc_concat</code> (<code>list[int]</code>) \u2013 </li> <li> <code>table</code> (<code>'Table'</code>) \u2013 </li> <li> <code>userdata</code> (<code>bytearray</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.use","title":"use <code>instance-attribute</code>","text":"<pre><code>use: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.dead","title":"dead <code>instance-attribute</code>","text":"<pre><code>dead: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.genmask","title":"genmask <code>instance-attribute</code>","text":"<pre><code>genmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.field_count","title":"field_count <code>instance-attribute</code>","text":"<pre><code>field_count: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.num_exprs","title":"num_exprs <code>instance-attribute</code>","text":"<pre><code>num_exprs: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.flags","title":"flags <code>instance-attribute</code>","text":"<pre><code>flags: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.ktype","title":"ktype <code>instance-attribute</code>","text":"<pre><code>ktype: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.klen","title":"klen <code>instance-attribute</code>","text":"<pre><code>klen: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.dtype","title":"dtype <code>instance-attribute</code>","text":"<pre><code>dtype: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.dlen","title":"dlen <code>instance-attribute</code>","text":"<pre><code>dlen: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.policy","title":"policy <code>instance-attribute</code>","text":"<pre><code>policy: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.timeout","title":"timeout <code>instance-attribute</code>","text":"<pre><code>timeout: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.gc_int","title":"gc_int <code>instance-attribute</code>","text":"<pre><code>gc_int: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.objtype","title":"objtype <code>instance-attribute</code>","text":"<pre><code>objtype: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.nelems","title":"nelems <code>property</code>","text":"<pre><code>nelems: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.desc_size","title":"desc_size <code>property</code>","text":"<pre><code>desc_size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.desc_concat","title":"desc_concat <code>property</code>","text":"<pre><code>desc_concat: list[int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.table","title":"table <code>property</code>","text":"<pre><code>table: 'Table'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.userdata","title":"userdata <code>property</code>","text":"<pre><code>userdata: bytearray\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.iter_expr","title":"iter_expr","text":"<pre><code>iter_expr() -> Iterator[Expr]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.iter_elems","title":"iter_elems","text":"<pre><code>iter_elems() -> Iterator[None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.print","title":"print","text":"<pre><code>print(print_nested: bool = True)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Set.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object","title":"Object","text":"<pre><code>Object(addr: Value)\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>iter_data</code> \u2013 </li> <li> <code>print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>genmask</code> (<code>int</code>) \u2013 </li> <li> <code>use</code> (<code>int</code>) \u2013 </li> <li> <code>handle</code> (<code>int</code>) \u2013 </li> <li> <code>type</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>table</code> (<code>'Table'</code>) \u2013 </li> <li> <code>userdata</code> (<code>bytearray</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.genmask","title":"genmask <code>instance-attribute</code>","text":"<pre><code>genmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.use","title":"use <code>instance-attribute</code>","text":"<pre><code>use: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.type","title":"type <code>property</code>","text":"<pre><code>type: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.name","title":"name <code>property</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.table","title":"table <code>property</code>","text":"<pre><code>table: 'Table'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.userdata","title":"userdata <code>property</code>","text":"<pre><code>userdata: bytearray\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.iter_data","title":"iter_data","text":"<pre><code>iter_data() -> Iterator[None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.print","title":"print","text":"<pre><code>print(print_nested: bool = True)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Object.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook","title":"FlowtableHook","text":"<pre><code>FlowtableHook(parent: 'Flowtable')\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>nested_print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>hooknum</code> (<code>int</code>) \u2013 </li> <li> <code>priority</code> (<code>int</code>) \u2013 </li> <li> <code>devs</code> (<code>list[str]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook.hooknum","title":"hooknum <code>property</code>","text":"<pre><code>hooknum: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook.priority","title":"priority <code>property</code>","text":"<pre><code>priority: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook.devs","title":"devs <code>property</code>","text":"<pre><code>devs: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook.nested_print","title":"nested_print","text":"<pre><code>nested_print(nested: int = 0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.FlowtableHook.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable","title":"Flowtable","text":"<pre><code>Flowtable(addr: Value)\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>genmask</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>use</code> (<code>int</code>) \u2013 </li> <li> <code>handle</code> (<code>int</code>) \u2013 </li> <li> <code>hook</code> (<code>FlowtableHook</code>) \u2013 </li> <li> <code>table</code> (<code>'Table'</code>) \u2013 </li> <li> <code>flags</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.genmask","title":"genmask <code>instance-attribute</code>","text":"<pre><code>genmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.use","title":"use <code>instance-attribute</code>","text":"<pre><code>use: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.hook","title":"hook <code>instance-attribute</code>","text":"<pre><code>hook: FlowtableHook = FlowtableHook(self)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.table","title":"table <code>property</code>","text":"<pre><code>table: 'Table'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.flags","title":"flags <code>property</code>","text":"<pre><code>flags: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.print","title":"print","text":"<pre><code>print(print_nested: bool = True)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Flowtable.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table","title":"Table","text":"<pre><code>Table(addr: Value)\n</code></pre> <p> Bases: <code>NftFields</code></p> <p>Methods:</p> <ul> <li> <code>find</code> \u2013 </li> <li> <code>iter_chains</code> \u2013 </li> <li> <code>iter_sets</code> \u2013 </li> <li> <code>iter_flowtables</code> \u2013 </li> <li> <code>iter_objects</code> \u2013 </li> <li> <code>nested_print</code> \u2013 </li> <li> <code>print</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>get_hook_list_dev_names</code> \u2013 </li> <li> <code>print_fields</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>family</code> (<code>int</code>) \u2013 </li> <li> <code>genmask</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>handle</code> (<code>int</code>) \u2013 </li> <li> <code>use</code> (<code>int</code>) \u2013 </li> <li> <code>flags</code> (<code>int</code>) \u2013 </li> <li> <code>nlpid</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.family","title":"family <code>instance-attribute</code>","text":"<pre><code>family: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.genmask","title":"genmask <code>instance-attribute</code>","text":"<pre><code>genmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.use","title":"use <code>instance-attribute</code>","text":"<pre><code>use: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.flags","title":"flags <code>instance-attribute</code>","text":"<pre><code>flags: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.nlpid","title":"nlpid <code>instance-attribute</code>","text":"<pre><code>nlpid: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.find","title":"find <code>classmethod</code>","text":"<pre><code>find(\n table_name: str | None = None,\n table_family: int | None = None,\n nsid: int | None = None,\n) -> Iterator[\"Table\"]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.iter_chains","title":"iter_chains","text":"<pre><code>iter_chains() -> Iterator[Chain]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.iter_sets","title":"iter_sets","text":"<pre><code>iter_sets() -> Iterator[Set]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.iter_flowtables","title":"iter_flowtables","text":"<pre><code>iter_flowtables() -> Iterator[Flowtable]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.iter_objects","title":"iter_objects","text":"<pre><code>iter_objects() -> Iterator[Object]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.nested_print","title":"nested_print","text":"<pre><code>nested_print(nested: int = 0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.print","title":"print","text":"<pre><code>print(print_nested: bool = True)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.get_hook_list_dev_names","title":"get_hook_list_dev_names <code>classmethod</code>","text":"<pre><code>get_hook_list_dev_names(hook_list: Value) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Table.print_fields","title":"print_fields","text":"<pre><code>print_fields(nested: int = 0, keys: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Nftables","title":"Nftables","text":"<pre><code>Nftables(addr: Value)\n</code></pre> <p>Methods:</p> <ul> <li> <code>find</code> \u2013 </li> <li> <code>iter_tables</code> \u2013 </li> <li> <code>print</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Nftables.find","title":"find <code>classmethod</code>","text":"<pre><code>find(nsid: int | None = None) -> 'Nftables' | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Nftables.iter_tables","title":"iter_tables","text":"<pre><code>iter_tables() -> Iterator[Table]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.Nftables.print","title":"print","text":"<pre><code>print()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.catch_error","title":"catch_error","text":"<pre><code>catch_error(func)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/nftables/#pwndbg.aglib.kernel.nftables.get_init_net_namespace","title":"get_init_net_namespace","text":"<pre><code>get_init_net_namespace() -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/","title":"pwndbg.aglib.kernel.rbtree","text":""},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree","title":"rbtree","text":"<p>Functions:</p> <ul> <li> <code>init</code> \u2013 </li> <li> <code>for_each_rb_entry</code> \u2013 </li> <li> <code>rb_first</code> \u2013 </li> <li> <code>rb_last</code> \u2013 </li> <li> <code>rb_parent</code> \u2013 </li> <li> <code>rb_empty_node</code> \u2013 </li> <li> <code>rb_next</code> \u2013 </li> <li> <code>rb_prev</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>rb_root_type</code> (<code>Type</code>) \u2013 </li> <li> <code>rb_node_type</code> (<code>Type</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_root_type","title":"rb_root_type <code>module-attribute</code>","text":"<pre><code>rb_root_type: Type = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_node_type","title":"rb_node_type <code>module-attribute</code>","text":"<pre><code>rb_node_type: Type = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.init","title":"init","text":"<pre><code>init()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.for_each_rb_entry","title":"for_each_rb_entry","text":"<pre><code>for_each_rb_entry(\n root: Value, typename: str, fieldname: str\n) -> Iterator[Value]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_first","title":"rb_first","text":"<pre><code>rb_first(root: Value) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_last","title":"rb_last","text":"<pre><code>rb_last(root: Value) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_parent","title":"rb_parent","text":"<pre><code>rb_parent(node: Value) -> Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_empty_node","title":"rb_empty_node","text":"<pre><code>rb_empty_node(node: Value) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_next","title":"rb_next","text":"<pre><code>rb_next(node: Value) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/#pwndbg.aglib.kernel.rbtree.rb_prev","title":"rb_prev","text":"<pre><code>rb_prev(node: Value) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/","title":"pwndbg.aglib.kernel.slab","text":""},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab","title":"slab","text":"<p>Classes:</p> <ul> <li> <code>Freelist</code> \u2013 </li> <li> <code>SlabCache</code> \u2013 </li> <li> <code>CpuCache</code> \u2013 </li> <li> <code>NodeCache</code> \u2013 </li> <li> <code>Slab</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>caches</code> \u2013 </li> <li> <code>get_cache</code> \u2013 </li> <li> <code>slab_struct_type</code> \u2013 </li> <li> <code>oo_order</code> \u2013 </li> <li> <code>oo_objects</code> \u2013 </li> <li> <code>get_flags_list</code> \u2013 </li> <li> <code>find_containing_slab_cache</code> \u2013 <p>Find the slab cache associated with the provided address.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>OO_SHIFT</code> \u2013 </li> <li> <code>OO_MASK</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.OO_SHIFT","title":"OO_SHIFT <code>module-attribute</code>","text":"<pre><code>OO_SHIFT = 16\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.OO_MASK","title":"OO_MASK <code>module-attribute</code>","text":"<pre><code>OO_MASK = 1 << OO_SHIFT - 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist","title":"Freelist","text":"<pre><code>Freelist(start_addr: int, offset: int, random: int = 0)\n</code></pre> <p>Methods:</p> <ul> <li> <code>__iter__</code> \u2013 </li> <li> <code>__int__</code> \u2013 </li> <li> <code>__len__</code> \u2013 </li> <li> <code>find_next</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>start_addr</code> \u2013 </li> <li> <code>offset</code> \u2013 </li> <li> <code>random</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.start_addr","title":"start_addr <code>instance-attribute</code>","text":"<pre><code>start_addr = start_addr\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.offset","title":"offset <code>instance-attribute</code>","text":"<pre><code>offset = offset\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.random","title":"random <code>instance-attribute</code>","text":"<pre><code>random = random\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.__iter__","title":"__iter__","text":"<pre><code>__iter__() -> Generator[int, None, None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.__len__","title":"__len__","text":"<pre><code>__len__() -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.find_next","title":"find_next","text":"<pre><code>find_next(addr: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache","title":"SlabCache","text":"<pre><code>SlabCache(slab_cache: Value)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>offset</code> (<code>int</code>) \u2013 </li> <li> <code>random</code> (<code>int</code>) \u2013 </li> <li> <code>size</code> (<code>int</code>) \u2013 </li> <li> <code>object_size</code> (<code>int</code>) \u2013 </li> <li> <code>align</code> (<code>int</code>) \u2013 </li> <li> <code>flags</code> (<code>list[str]</code>) \u2013 </li> <li> <code>cpu_cache</code> (<code>CpuCache</code>) \u2013 <p>returns cpu cache associated to current thread</p> </li> <li> <code>cpu_caches</code> (<code>Generator[CpuCache, None, None]</code>) \u2013 <p>returns cpu caches for all cpus</p> </li> <li> <code>node_caches</code> (<code>Generator[NodeCache, None, None]</code>) \u2013 <p>returns node caches for all NUMA nodes</p> </li> <li> <code>cpu_partial</code> (<code>int</code>) \u2013 </li> <li> <code>inuse</code> (<code>int</code>) \u2013 </li> <li> <code>oo_order</code> \u2013 </li> <li> <code>oo_objects</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.address","title":"address <code>property</code>","text":"<pre><code>address: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.name","title":"name <code>property</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.offset","title":"offset <code>property</code>","text":"<pre><code>offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.random","title":"random <code>property</code>","text":"<pre><code>random: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.size","title":"size <code>property</code>","text":"<pre><code>size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.object_size","title":"object_size <code>property</code>","text":"<pre><code>object_size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.align","title":"align <code>property</code>","text":"<pre><code>align: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.flags","title":"flags <code>property</code>","text":"<pre><code>flags: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.cpu_cache","title":"cpu_cache <code>property</code>","text":"<pre><code>cpu_cache: CpuCache\n</code></pre> <p>returns cpu cache associated to current thread</p>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.cpu_caches","title":"cpu_caches <code>property</code>","text":"<pre><code>cpu_caches: Generator[CpuCache, None, None]\n</code></pre> <p>returns cpu caches for all cpus</p>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.node_caches","title":"node_caches <code>property</code>","text":"<pre><code>node_caches: Generator[NodeCache, None, None]\n</code></pre> <p>returns node caches for all NUMA nodes</p>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.cpu_partial","title":"cpu_partial <code>property</code>","text":"<pre><code>cpu_partial: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.inuse","title":"inuse <code>property</code>","text":"<pre><code>inuse: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.__oo_x","title":"__oo_x <code>property</code>","text":"<pre><code>__oo_x: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.oo_order","title":"oo_order <code>property</code>","text":"<pre><code>oo_order\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.oo_objects","title":"oo_objects <code>property</code>","text":"<pre><code>oo_objects\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.CpuCache","title":"CpuCache","text":"<pre><code>CpuCache(cpu_cache: Value, slab_cache: SlabCache, cpu: int)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>slab_cache</code> \u2013 </li> <li> <code>cpu</code> \u2013 </li> <li> <code>address</code> (<code>int</code>) \u2013 </li> <li> <code>freelist</code> (<code>Freelist</code>) \u2013 </li> <li> <code>active_slab</code> (<code>Slab | None</code>) \u2013 </li> <li> <code>partial_slabs</code> (<code>list[Slab]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.CpuCache.slab_cache","title":"slab_cache <code>instance-attribute</code>","text":"<pre><code>slab_cache = slab_cache\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.CpuCache.cpu","title":"cpu <code>instance-attribute</code>","text":"<pre><code>cpu = cpu\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.CpuCache.address","title":"address <code>property</code>","text":"<pre><code>address: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.CpuCache.freelist","title":"freelist <code>property</code>","text":"<pre><code>freelist: Freelist\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.CpuCache.active_slab","title":"active_slab <code>property</code>","text":"<pre><code>active_slab: Slab | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.CpuCache.partial_slabs","title":"partial_slabs <code>property</code>","text":"<pre><code>partial_slabs: list[Slab]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.NodeCache","title":"NodeCache","text":"<pre><code>NodeCache(node_cache: Value, slab_cache: SlabCache, node: int)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>slab_cache</code> \u2013 </li> <li> <code>node</code> \u2013 </li> <li> <code>address</code> (<code>int</code>) \u2013 </li> <li> <code>partial_slabs</code> (<code>list[Slab]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.NodeCache.slab_cache","title":"slab_cache <code>instance-attribute</code>","text":"<pre><code>slab_cache = slab_cache\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.NodeCache.node","title":"node <code>instance-attribute</code>","text":"<pre><code>node = node\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.NodeCache.address","title":"address <code>property</code>","text":"<pre><code>address: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.NodeCache.partial_slabs","title":"partial_slabs <code>property</code>","text":"<pre><code>partial_slabs: list[Slab]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab","title":"Slab","text":"<pre><code>Slab(\n slab: Value,\n cpu_cache: CpuCache | None,\n slab_cache: SlabCache,\n is_partial: bool = False,\n)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>cpu_cache</code> \u2013 </li> <li> <code>slab_cache</code> \u2013 </li> <li> <code>is_partial</code> \u2013 </li> <li> <code>slab_address</code> (<code>int</code>) \u2013 </li> <li> <code>virt_address</code> (<code>int</code>) \u2013 </li> <li> <code>object_count</code> (<code>int</code>) \u2013 </li> <li> <code>objects</code> (<code>Generator[int, None, None]</code>) \u2013 </li> <li> <code>frozen</code> (<code>int</code>) \u2013 </li> <li> <code>inuse</code> (<code>int</code>) \u2013 </li> <li> <code>slabs</code> (<code>int</code>) \u2013 </li> <li> <code>pobjects</code> (<code>int</code>) \u2013 </li> <li> <code>freelist</code> (<code>Freelist</code>) \u2013 </li> <li> <code>freelists</code> (<code>list[Freelist]</code>) \u2013 </li> <li> <code>free_objects</code> (<code>set[int]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.cpu_cache","title":"cpu_cache <code>instance-attribute</code>","text":"<pre><code>cpu_cache = cpu_cache\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.slab_cache","title":"slab_cache <code>instance-attribute</code>","text":"<pre><code>slab_cache = slab_cache\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.is_partial","title":"is_partial <code>instance-attribute</code>","text":"<pre><code>is_partial = is_partial\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.slab_address","title":"slab_address <code>property</code>","text":"<pre><code>slab_address: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.virt_address","title":"virt_address <code>property</code>","text":"<pre><code>virt_address: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.object_count","title":"object_count <code>property</code>","text":"<pre><code>object_count: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.objects","title":"objects <code>property</code>","text":"<pre><code>objects: Generator[int, None, None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.frozen","title":"frozen <code>property</code>","text":"<pre><code>frozen: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.inuse","title":"inuse <code>property</code>","text":"<pre><code>inuse: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.slabs","title":"slabs <code>property</code>","text":"<pre><code>slabs: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.pobjects","title":"pobjects <code>property</code>","text":"<pre><code>pobjects: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.freelist","title":"freelist <code>property</code>","text":"<pre><code>freelist: Freelist\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.freelists","title":"freelists <code>property</code>","text":"<pre><code>freelists: list[Freelist]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.free_objects","title":"free_objects <code>property</code>","text":"<pre><code>free_objects: set[int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.caches","title":"caches","text":"<pre><code>caches() -> Generator[SlabCache, None, None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.get_cache","title":"get_cache","text":"<pre><code>get_cache(target_name: str) -> SlabCache | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.slab_struct_type","title":"slab_struct_type","text":"<pre><code>slab_struct_type() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.oo_order","title":"oo_order","text":"<pre><code>oo_order(x: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.oo_objects","title":"oo_objects","text":"<pre><code>oo_objects(x: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.get_flags_list","title":"get_flags_list","text":"<pre><code>get_flags_list(flags: int) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.find_containing_slab_cache","title":"find_containing_slab_cache","text":"<pre><code>find_containing_slab_cache(addr: int) -> SlabCache | None\n</code></pre> <p>Find the slab cache associated with the provided address.</p>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/","title":"pwndbg.aglib.kernel.vmmap","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap","title":"vmmap","text":"<p>Classes:</p> <ul> <li> <code>QemuMachine</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>kernel_vmmap_via_page_tables</code> \u2013 </li> <li> <code>kernel_vmmap_via_monitor_info_mem</code> \u2013 <p>Returns Linux memory maps information by parsing <code>monitor info mem</code> output</p> </li> <li> <code>kernel_vmmap</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>monitor_info_mem_not_warned</code> \u2013 </li> <li> <code>kernel_vmmap_mode</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.monitor_info_mem_not_warned","title":"monitor_info_mem_not_warned <code>module-attribute</code>","text":"<pre><code>monitor_info_mem_not_warned = True\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_mode","title":"kernel_vmmap_mode <code>module-attribute</code>","text":"<pre><code>kernel_vmmap_mode = add_param(\n \"kernel-vmmap\",\n \"page-tables\",\n \"the method to get vmmap information when debugging via QEMU kernel\",\n help_docstring=\"kernel-vmmap can be:\\npage-tables - read /proc/$qemu-pid/mem to parse kernel page tables to render vmmap\\nmonitor - use QEMU's `monitor info mem` to render vmmap\\nnone - disable vmmap rendering; useful if rendering is particularly slow\\n\\nNote that the page-tables method will require the QEMU kernel process to be on the same machine and within the same PID namespace. Running QEMU kernel and GDB in different Docker containers will not work. Consider running both containers with --pid=host (meaning they will see and so be able to interact with all processes on the machine).\\n\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"page-tables\", \"monitor\", \"none\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine","title":"QemuMachine","text":"<pre><code>QemuMachine()\n</code></pre> <p> Bases: <code>Machine</code></p> <p>Methods:</p> <ul> <li> <code>__del__</code> \u2013 </li> <li> <code>search_pids_for_file</code> \u2013 </li> <li> <code>get_qemu_pid</code> \u2013 </li> <li> <code>read_physical_memory</code> \u2013 </li> <li> <code>read_register</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pid</code> \u2013 </li> <li> <code>file</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine.pid","title":"pid <code>instance-attribute</code>","text":"<pre><code>pid = get_qemu_pid()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine.file","title":"file <code>instance-attribute</code>","text":"<pre><code>file = open(f'/proc/{pid}/mem', O_RDONLY)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine.__del__","title":"__del__","text":"<pre><code>__del__()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine.search_pids_for_file","title":"search_pids_for_file <code>staticmethod</code>","text":"<pre><code>search_pids_for_file(pids: list[str], filename: str) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine.get_qemu_pid","title":"get_qemu_pid <code>staticmethod</code>","text":"<pre><code>get_qemu_pid()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine.read_physical_memory","title":"read_physical_memory","text":"<pre><code>read_physical_memory(physical_address: int, length: int) -> bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.QemuMachine.read_register","title":"read_register","text":"<pre><code>read_register(register_name: str) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_page_tables","title":"kernel_vmmap_via_page_tables","text":"<pre><code>kernel_vmmap_via_page_tables() -> tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_monitor_info_mem","title":"kernel_vmmap_via_monitor_info_mem","text":"<pre><code>kernel_vmmap_via_monitor_info_mem() -> tuple[Page, ...]\n</code></pre> <p>Returns Linux memory maps information by parsing <code>monitor info mem</code> output from QEMU kernel GDB stub. Works only on X86/X64/RISC-V as this is what QEMU supports.</p> <p>Consider using the <code>kernel_vmmap_via_page_tables</code> method as it is probably more reliable/better.</p> <p>See also: !685 (TODO: revisit with future QEMU versions)</p>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_monitor_info_mem--example-output-from-the-command","title":"Example output from the command:","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_monitor_info_mem--pwndbg-monitor-info-mem","title":"pwndbg> monitor info mem","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_monitor_info_mem--ffff903580000000-ffff903580099000-0000000000099000-rw","title":"ffff903580000000-ffff903580099000 0000000000099000 -rw","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_monitor_info_mem--ffff903580099000-ffff90358009b000-0000000000002000-r-","title":"ffff903580099000-ffff90358009b000 0000000000002000 -r-","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_monitor_info_mem--ffff90358009b000-ffff903582200000-0000000002165000-rw","title":"ffff90358009b000-ffff903582200000 0000000002165000 -rw","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap_via_monitor_info_mem--ffff903582200000-ffff903582803000-0000000000603000-r-","title":"ffff903582200000-ffff903582803000 0000000000603000 -r-","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.kernel_vmmap","title":"kernel_vmmap","text":"<pre><code>kernel_vmmap() -> tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/","title":"pwndbg.aglib.memory","text":""},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory","title":"memory","text":"<p>Functions:</p> <ul> <li> <code>read</code> \u2013 <p>read(addr, count, partial=False) -> bytearray</p> </li> <li> <code>readtype</code> \u2013 <p>readtype(type, addr) -> int</p> </li> <li> <code>write</code> \u2013 <p>write(addr, data)</p> </li> <li> <code>peek</code> \u2013 <p>peek(address) -> bytearray</p> </li> <li> <code>is_readable_address</code> \u2013 <p>is_readable_address(address) -> bool</p> </li> <li> <code>poke</code> \u2013 <p>poke(address)</p> </li> <li> <code>string</code> \u2013 <p>Reads a null-terminated string from memory.</p> </li> <li> <code>byte</code> \u2013 <p>byte(addr) -> int</p> </li> <li> <code>uchar</code> \u2013 <p>uchar(addr) -> int</p> </li> <li> <code>ushort</code> \u2013 <p>ushort(addr) -> int</p> </li> <li> <code>uint</code> \u2013 <p>uint(addr) -> int</p> </li> <li> <code>pvoid</code> \u2013 <p>pvoid(addr) -> int</p> </li> <li> <code>u8</code> \u2013 <p>u8(addr) -> int</p> </li> <li> <code>u16</code> \u2013 <p>u16(addr) -> int</p> </li> <li> <code>u32</code> \u2013 <p>u32(addr) -> int</p> </li> <li> <code>u64</code> \u2013 <p>u64(addr) -> int</p> </li> <li> <code>u</code> \u2013 <p>u(addr, size=None) -> int</p> </li> <li> <code>s8</code> \u2013 <p>s8(addr) -> int</p> </li> <li> <code>s16</code> \u2013 <p>s16(addr) -> int</p> </li> <li> <code>s32</code> \u2013 <p>s32(addr) -> int</p> </li> <li> <code>s64</code> \u2013 <p>s64(addr) -> int</p> </li> <li> <code>cast_pointer</code> \u2013 <p>Create a Value containing given address and cast it to the pointer of specified type</p> </li> <li> <code>get_typed_pointer</code> \u2013 <p>Look up a type by name if necessary and return a Value of addr cast to that type</p> </li> <li> <code>get_typed_pointer_value</code> \u2013 <p>Read the pointer value of addr cast to type specified by type_name</p> </li> <li> <code>find_upper_boundary</code> \u2013 <p>find_upper_boundary(addr, max_pages=1024) -> int</p> </li> <li> <code>find_lower_boundary</code> \u2013 <p>find_lower_boundary(addr, max_pages=1024) -> int</p> </li> <li> <code>update_min_addr</code> \u2013 </li> <li> <code>fetch_struct_as_dictionary</code> \u2013 </li> <li> <code>pack_struct_into_dictionary</code> \u2013 </li> <li> <code>convert_pwndbg_value_to_python_value</code> \u2013 </li> <li> <code>resolve_renamed_struct_field</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>GdbDict</code> \u2013 </li> <li> <code>MMAP_MIN_ADDR</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.GdbDict","title":"GdbDict <code>module-attribute</code>","text":"<pre><code>GdbDict = Dict[str, Union['GdbDict', int]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.MMAP_MIN_ADDR","title":"MMAP_MIN_ADDR <code>module-attribute</code>","text":"<pre><code>MMAP_MIN_ADDR = 32768\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.read","title":"read","text":"<pre><code>read(addr: int, count: int, partial: bool = False) -> bytearray\n</code></pre> <p>read(addr, count, partial=False) -> bytearray</p> <p>Read memory from the program being debugged.</p> <p>Parameters:</p> <ul> <li> <code>addr</code> (<code>int</code>) \u2013 <p>Address to read</p> </li> <li> <code>count</code> (<code>int</code>) \u2013 <p>Number of bytes to read</p> </li> <li> <code>partial</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>Whether less than <code>count</code> bytes can be returned</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>bytearray</code> \u2013 <p><code>bytearray</code> The memory at the specified address,</p> </li> <li> <code>bytearray</code> \u2013 <p>or <code>None</code>.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.readtype","title":"readtype","text":"<pre><code>readtype(type: Type, addr: int) -> int\n</code></pre> <p>readtype(type, addr) -> int</p> <p>Reads an integer-type (e.g. <code>uint64</code>) and returns a Python native integer representation of the same.</p> <p>Parameters:</p> <ul> <li> <code>type</code> (<code>Type</code>) \u2013 <p>GDB type to read</p> </li> <li> <code>addr</code> (<code>int</code>) \u2013 <p>Address at which the value to be read resides</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>int</code> \u2013 <p><code>int</code></p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.write","title":"write","text":"<pre><code>write(addr: int, data: str | bytes | bytearray) -> None\n</code></pre> <p>write(addr, data)</p> <p>Writes data into the memory of the process being debugged.</p> <p>Parameters:</p> <ul> <li> <code>addr</code> (<code>int</code>) \u2013 <p>Address to write</p> </li> <li> <code>data</code> (<code>str | bytes | bytearray</code>) \u2013 <p>Data to write</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.peek","title":"peek","text":"<pre><code>peek(address: int) -> bytearray | None\n</code></pre> <p>peek(address) -> bytearray</p> <p>Read one byte from the specified address.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to read</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>bytearray | None</code> \u2013 <p><code>bytearray</code> A single byte of data, or <code>None</code> if the</p> </li> <li> <code>bytearray | None</code> \u2013 <p>address cannot be read.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.is_readable_address","title":"is_readable_address","text":"<pre><code>is_readable_address(address: int) -> bool\n</code></pre> <p>is_readable_address(address) -> bool</p> <p>Check if the address can be read by GDB.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to read</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>bool</code> \u2013 <p><code>bool</code>: Whether the address is readable.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.poke","title":"poke","text":"<pre><code>poke(address: int) -> bool\n</code></pre> <p>poke(address)</p> <p>Checks whether an address is writable.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to check</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>bool</code> \u2013 <p><code>bool</code>: Whether the address is writable.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.string","title":"string","text":"<pre><code>string(addr: int, max: int = 4096) -> bytearray\n</code></pre> <p>Reads a null-terminated string from memory.</p> <p>Parameters:</p> <ul> <li> <code>addr</code> (<code>int</code>) \u2013 <p>Address to read from</p> </li> <li> <code>max</code> (<code>int</code>, default: <code>4096</code> ) \u2013 <p>Maximum string length (default 4096)</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>bytearray</code> \u2013 <p>An empty bytearray, or a NULL-terminated bytearray.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.byte","title":"byte","text":"<pre><code>byte(addr: int) -> int\n</code></pre> <p>byte(addr) -> int</p> <p>Read one byte at the specified address</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.uchar","title":"uchar","text":"<pre><code>uchar(addr: int) -> int\n</code></pre> <p>uchar(addr) -> int</p> <p>Read one <code>unsigned char</code> at the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.ushort","title":"ushort","text":"<pre><code>ushort(addr: int) -> int\n</code></pre> <p>ushort(addr) -> int</p> <p>Read one <code>unisgned short</code> at the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.uint","title":"uint","text":"<pre><code>uint(addr: int) -> int\n</code></pre> <p>uint(addr) -> int</p> <p>Read one <code>unsigned int</code> at the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.pvoid","title":"pvoid","text":"<pre><code>pvoid(addr: int) -> int\n</code></pre> <p>pvoid(addr) -> int</p> <p>Read one pointer from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.u8","title":"u8","text":"<pre><code>u8(addr: int) -> int\n</code></pre> <p>u8(addr) -> int</p> <p>Read one <code>uint8_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.u16","title":"u16","text":"<pre><code>u16(addr: int) -> int\n</code></pre> <p>u16(addr) -> int</p> <p>Read one <code>uint16_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.u32","title":"u32","text":"<pre><code>u32(addr: int) -> int\n</code></pre> <p>u32(addr) -> int</p> <p>Read one <code>uint32_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.u64","title":"u64","text":"<pre><code>u64(addr: int) -> int\n</code></pre> <p>u64(addr) -> int</p> <p>Read one <code>uint64_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.u","title":"u","text":"<pre><code>u(addr: int, size: int | None = None) -> int\n</code></pre> <p>u(addr, size=None) -> int</p> <p>Read one <code>unsigned</code> integer from the specified address, with the bit-width specified by <code>size</code>, which defaults to the pointer width.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.s8","title":"s8","text":"<pre><code>s8(addr: int) -> int\n</code></pre> <p>s8(addr) -> int</p> <p>Read one <code>int8_t</code> from the specified address</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.s16","title":"s16","text":"<pre><code>s16(addr: int) -> int\n</code></pre> <p>s16(addr) -> int</p> <p>Read one <code>int16_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.s32","title":"s32","text":"<pre><code>s32(addr: int) -> int\n</code></pre> <p>s32(addr) -> int</p> <p>Read one <code>int32_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.s64","title":"s64","text":"<pre><code>s64(addr: int) -> int\n</code></pre> <p>s64(addr) -> int</p> <p>Read one <code>int64_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.cast_pointer","title":"cast_pointer","text":"<pre><code>cast_pointer(type: Type, addr: int | Value) -> Value\n</code></pre> <p>Create a Value containing given address and cast it to the pointer of specified type</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.get_typed_pointer","title":"get_typed_pointer","text":"<pre><code>get_typed_pointer(type: str | Type, addr: int | Value) -> Value\n</code></pre> <p>Look up a type by name if necessary and return a Value of addr cast to that type</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.get_typed_pointer_value","title":"get_typed_pointer_value","text":"<pre><code>get_typed_pointer_value(type_name: str | Type, addr: int | Value) -> Value\n</code></pre> <p>Read the pointer value of addr cast to type specified by type_name</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.find_upper_boundary","title":"find_upper_boundary","text":"<pre><code>find_upper_boundary(addr: int, max_pages: int = 1024) -> int\n</code></pre> <p>find_upper_boundary(addr, max_pages=1024) -> int</p> <p>Brute-force search the upper boundary of a memory mapping, by reading the first byte of each page, until an unmapped page is found.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.find_lower_boundary","title":"find_lower_boundary","text":"<pre><code>find_lower_boundary(addr: int, max_pages: int = 1024) -> int\n</code></pre> <p>find_lower_boundary(addr, max_pages=1024) -> int</p> <p>Brute-force search the lower boundary of a memory mapping, by reading the first byte of each page, until an unmapped page is found.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.update_min_addr","title":"update_min_addr","text":"<pre><code>update_min_addr() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.fetch_struct_as_dictionary","title":"fetch_struct_as_dictionary","text":"<pre><code>fetch_struct_as_dictionary(\n struct_name: str,\n struct_address: int | Value,\n include_only_fields: set[str] | None = None,\n exclude_fields: set[str] | None = None,\n) -> GdbDict\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.pack_struct_into_dictionary","title":"pack_struct_into_dictionary","text":"<pre><code>pack_struct_into_dictionary(\n fetched_struct: Value,\n include_only_fields: set[str] | None = None,\n exclude_fields: set[str] | None = None,\n) -> GdbDict\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.convert_pwndbg_value_to_python_value","title":"convert_pwndbg_value_to_python_value","text":"<pre><code>convert_pwndbg_value_to_python_value(dbg_value: Value) -> int | GdbDict\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.resolve_renamed_struct_field","title":"resolve_renamed_struct_field","text":"<pre><code>resolve_renamed_struct_field(\n struct_name: str, possible_field_names: set[str]\n) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/","title":"pwndbg.aglib.nearpc","text":""},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc","title":"nearpc","text":"<p>Functions:</p> <ul> <li> <code>ljust_padding</code> \u2013 </li> <li> <code>nearpc</code> \u2013 <p>Disassemble near a specified address.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>c</code> \u2013 </li> <li> <code>nearpc_branch_marker</code> \u2013 </li> <li> <code>nearpc_branch_marker_contiguous</code> \u2013 </li> <li> <code>nearpc_lines</code> \u2013 </li> <li> <code>show_args</code> \u2013 </li> <li> <code>show_comments</code> \u2013 </li> <li> <code>show_opcode_bytes</code> \u2013 </li> <li> <code>opcode_separator_bytes</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.c","title":"c <code>module-attribute</code>","text":"<pre><code>c = ColorConfig(\n \"nearpc\",\n [\n ColorParamSpec(\"symbol\", \"normal\", \"color for nearpc command (symbol)\"),\n ColorParamSpec(\n \"address\", \"normal\", \"color for nearpc command (address)\"\n ),\n ColorParamSpec(\n \"prefix\", \"none\", \"color for nearpc command (prefix marker)\"\n ),\n ColorParamSpec(\n \"breakpoint\", \"red\", \"color for nearpc command (breakpoint marker)\"\n ),\n ColorParamSpec(\n \"syscall-name\",\n \"red\",\n \"color for nearpc command (resolved syscall name)\",\n ),\n ColorParamSpec(\n \"argument\", \"bold\", \"color for nearpc command (target argument)\"\n ),\n ColorParamSpec(\n \"integration-comments\",\n \"bold\",\n \"color for nearpc command (integration comments)\",\n ),\n ColorParamSpec(\n \"branch-marker\",\n \"normal\",\n \"color for nearpc command (branch marker line)\",\n ),\n ],\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.nearpc_branch_marker","title":"nearpc_branch_marker <code>module-attribute</code>","text":"<pre><code>nearpc_branch_marker = add_param(\n \"nearpc-branch-marker\", \" \u2193\", \"branch marker line for nearpc command\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.nearpc_branch_marker_contiguous","title":"nearpc_branch_marker_contiguous <code>module-attribute</code>","text":"<pre><code>nearpc_branch_marker_contiguous = add_param(\n \"nearpc-branch-marker-contiguous\",\n \" \",\n \"contiguous branch marker line for nearpc command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.nearpc_lines","title":"nearpc_lines <code>module-attribute</code>","text":"<pre><code>nearpc_lines = add_param(\n \"nearpc-lines\",\n 10,\n \"number of additional lines to print for the nearpc command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.show_args","title":"show_args <code>module-attribute</code>","text":"<pre><code>show_args = add_param(\n \"nearpc-show-args\", True, \"whether to show call arguments below instruction\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.show_comments","title":"show_comments <code>module-attribute</code>","text":"<pre><code>show_comments = add_param(\n \"nearpc-integration-comments\",\n True,\n \"whether to show comments from integration provider\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.show_opcode_bytes","title":"show_opcode_bytes <code>module-attribute</code>","text":"<pre><code>show_opcode_bytes = add_param(\n \"nearpc-num-opcode-bytes\",\n 0,\n \"number of opcode bytes to print for each instruction\",\n param_class=PARAM_ZUINTEGER,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.opcode_separator_bytes","title":"opcode_separator_bytes <code>module-attribute</code>","text":"<pre><code>opcode_separator_bytes = add_param(\n \"nearpc-opcode-separator-bytes\",\n 1,\n \"number of spaces between opcode bytes\",\n param_class=PARAM_ZUINTEGER,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.ljust_padding","title":"ljust_padding","text":"<pre><code>ljust_padding(lst)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/#pwndbg.aglib.nearpc.nearpc","title":"nearpc","text":"<pre><code>nearpc(\n pc: int = None,\n lines: int = None,\n emulate=False,\n repeat=False,\n use_cache=False,\n linear=False,\n) -> list[str]\n</code></pre> <p>Disassemble near a specified address.</p> <p>The <code>linear</code> argument specifies if we should disassemble linearly in memory, or take jumps into account</p>"},{"location":"reference/pwndbg/aglib/next/","title":"pwndbg.aglib.next","text":""},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next","title":"next","text":"<p>Commands for setting temporary breakpoints on the next instruction of some type (call, branch, etc.)</p> <p>Functions:</p> <ul> <li> <code>next_int</code> \u2013 <p>If there is a syscall in the current basic black,</p> </li> <li> <code>next_branch</code> \u2013 </li> <li> <code>next_matching_until_branch</code> \u2013 <p>Finds the next instruction that matches the arguments between the given</p> </li> <li> <code>break_next_branch</code> \u2013 </li> <li> <code>break_next_interrupt</code> \u2013 </li> <li> <code>break_next_call</code> \u2013 </li> <li> <code>break_next_ret</code> \u2013 </li> <li> <code>break_on_next_matching_instruction</code> \u2013 <p>Breaks on next instuction that matches the arguments.</p> </li> <li> <code>break_on_program_code</code> \u2013 <p>Breaks on next instruction that belongs to process' objfile code</p> </li> <li> <code>break_on_next</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>interrupts</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.interrupts","title":"interrupts <code>module-attribute</code>","text":"<pre><code>interrupts = {CS_GRP_INT}\n</code></pre>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.next_int","title":"next_int","text":"<pre><code>next_int(address=None)\n</code></pre> <p>If there is a syscall in the current basic black, return the instruction of the one closest to $PC.</p> <p>Otherwise, return None.</p>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.next_branch","title":"next_branch","text":"<pre><code>next_branch(address=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.next_matching_until_branch","title":"next_matching_until_branch","text":"<pre><code>next_matching_until_branch(address=None, mnemonic=None, op_str=None)\n</code></pre> <p>Finds the next instruction that matches the arguments between the given address and the branch closest to it.</p>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_next_branch","title":"break_next_branch <code>async</code>","text":"<pre><code>break_next_branch(ec: ExecutionController, address=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_next_interrupt","title":"break_next_interrupt <code>async</code>","text":"<pre><code>break_next_interrupt(ec: ExecutionController, address=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_next_call","title":"break_next_call <code>async</code>","text":"<pre><code>break_next_call(ec: ExecutionController, symbol_regex=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_next_ret","title":"break_next_ret <code>async</code>","text":"<pre><code>break_next_ret(ec: ExecutionController, address=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_on_next_matching_instruction","title":"break_on_next_matching_instruction <code>async</code>","text":"<pre><code>break_on_next_matching_instruction(\n ec: ExecutionController, mnemonic=None, op_str=None\n) -> bool\n</code></pre> <p>Breaks on next instuction that matches the arguments.</p>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_on_program_code","title":"break_on_program_code <code>async</code>","text":"<pre><code>break_on_program_code(ec: ExecutionController) -> bool\n</code></pre> <p>Breaks on next instruction that belongs to process' objfile code</p> <p>:return: True for success, False when process ended or when pc is not at the code or if a signal occurred</p>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_on_next","title":"break_on_next <code>async</code>","text":"<pre><code>break_on_next(ec: ExecutionController, address=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/","title":"pwndbg.aglib.onegadget","text":""},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget","title":"onegadget","text":"<p>Classes:</p> <ul> <li> <code>CheckSatResult</code> \u2013 </li> <li> <code>Lambda</code> \u2013 <p>Modified from onegadget's Lambda class</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>colorize_reg</code> \u2013 </li> <li> <code>colorize_integer</code> \u2013 </li> <li> <code>colorize_psuedo_code</code> \u2013 <p>Colorize the pseudo code of onegadget</p> </li> <li> <code>compute_file_hash</code> \u2013 <p>Compute the MD5 hash of the file, return the hash</p> </li> <li> <code>run_onegadget</code> \u2013 <p>Run onegadget and return the output</p> </li> <li> <code>parse_expression</code> \u2013 <p>Parse expression, return the result, colorized string and error message</p> </li> <li> <code>check_stack_argv</code> \u2013 <p>Check argv that's on the stack, return the result and the message</p> </li> <li> <code>check_non_stack_argv</code> \u2013 <p>Check argv that's not on the stack, return the result and the message</p> </li> <li> <code>check_argv</code> \u2013 <p>Check argv, return the result and the message</p> </li> <li> <code>check_envp</code> \u2013 <p>Check envp, return the result and the message</p> </li> <li> <code>check_constraint</code> \u2013 <p>Parse constraint, return the result and the message</p> </li> <li> <code>check_gadget</code> \u2013 <p>Check status of each gadget, return the gadget's status</p> </li> <li> <code>find_gadgets</code> \u2013 <p>Find gadgets by parsing the output of onegadget, return there's any valid gadget</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>ADDRESS_WRITABLE_PATTERN</code> \u2013 </li> <li> <code>WRITABLE_COLON_PATTERN</code> \u2013 </li> <li> <code>EQUAL_NULL_PATTERN</code> \u2013 </li> <li> <code>VALID_POSIX_SPAWN_FILE_ACTIONS_PATTERN</code> \u2013 </li> <li> <code>VALID_ARGV_PATTERN</code> \u2013 </li> <li> <code>VALID_ENVP_PATTERN</code> \u2013 </li> <li> <code>IS_ALIGNED_PATTERN</code> \u2013 </li> <li> <code>IS_GOT_ADDRESS_PATTERN</code> \u2013 </li> <li> <code>CAST_PATTERN</code> \u2013 </li> <li> <code>XMM_SHIFT</code> \u2013 </li> <li> <code>CONSTRAINT_SEPARATOR</code> \u2013 </li> <li> <code>CAST_DEREF_MAPPING</code> \u2013 </li> <li> <code>CAST_MAPPING</code> \u2013 </li> <li> <code>ONEGADGET_COLOR</code> \u2013 </li> <li> <code>ONEGADGET_CACHEDIR</code> \u2013 </li> <li> <code>SAT</code> \u2013 </li> <li> <code>UNSAT</code> \u2013 </li> <li> <code>UNKNOWN</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.ADDRESS_WRITABLE_PATTERN","title":"ADDRESS_WRITABLE_PATTERN <code>module-attribute</code>","text":"<pre><code>ADDRESS_WRITABLE_PATTERN = compile('address(?:es)? (.*) (?:is|are) writable')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.WRITABLE_COLON_PATTERN","title":"WRITABLE_COLON_PATTERN <code>module-attribute</code>","text":"<pre><code>WRITABLE_COLON_PATTERN = compile('writable: (.*)')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.EQUAL_NULL_PATTERN","title":"EQUAL_NULL_PATTERN <code>module-attribute</code>","text":"<pre><code>EQUAL_NULL_PATTERN = compile('(.*) == NULL')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.VALID_POSIX_SPAWN_FILE_ACTIONS_PATTERN","title":"VALID_POSIX_SPAWN_FILE_ACTIONS_PATTERN <code>module-attribute</code>","text":"<pre><code>VALID_POSIX_SPAWN_FILE_ACTIONS_PATTERN = compile('(.*) <= 0')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.VALID_ARGV_PATTERN","title":"VALID_ARGV_PATTERN <code>module-attribute</code>","text":"<pre><code>VALID_ARGV_PATTERN = compile('(.+) is a valid argv')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.VALID_ENVP_PATTERN","title":"VALID_ENVP_PATTERN <code>module-attribute</code>","text":"<pre><code>VALID_ENVP_PATTERN = compile('(.+) is a valid envp')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.IS_ALIGNED_PATTERN","title":"IS_ALIGNED_PATTERN <code>module-attribute</code>","text":"<pre><code>IS_ALIGNED_PATTERN = compile('(.+) & 0xf == (\\\\d+)')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.IS_GOT_ADDRESS_PATTERN","title":"IS_GOT_ADDRESS_PATTERN <code>module-attribute</code>","text":"<pre><code>IS_GOT_ADDRESS_PATTERN = compile('(.+) is the GOT address of libc')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CAST_PATTERN","title":"CAST_PATTERN <code>module-attribute</code>","text":"<pre><code>CAST_PATTERN = compile('^\\\\([s|u]\\\\d+\\\\)')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.XMM_SHIFT","title":"XMM_SHIFT <code>module-attribute</code>","text":"<pre><code>XMM_SHIFT = ' >> '\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CONSTRAINT_SEPARATOR","title":"CONSTRAINT_SEPARATOR <code>module-attribute</code>","text":"<pre><code>CONSTRAINT_SEPARATOR = ' || '\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CAST_DEREF_MAPPING","title":"CAST_DEREF_MAPPING <code>module-attribute</code>","text":"<pre><code>CAST_DEREF_MAPPING = {\n \"(u16)\": u16,\n \"(s16)\": s16,\n \"(u32)\": u32,\n \"(s32)\": s32,\n \"(u64)\": u64,\n \"(s64)\": s64,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CAST_MAPPING","title":"CAST_MAPPING <code>module-attribute</code>","text":"<pre><code>CAST_MAPPING = {\n \"(u16)\": lambda x: value,\n \"(s16)\": lambda x: value,\n \"(u32)\": lambda x: value,\n \"(s32)\": lambda x: value,\n \"(u64)\": lambda x: value,\n \"(s64)\": lambda x: value,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.ONEGADGET_COLOR","title":"ONEGADGET_COLOR <code>module-attribute</code>","text":"<pre><code>ONEGADGET_COLOR = {\n \"light_green\": lambda x: colorize(x, \"\\x1b[38;5;82m\"),\n \"light_purple\": lambda x: colorize(x, \"\\x1b[38;5;153m\"),\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.ONEGADGET_CACHEDIR","title":"ONEGADGET_CACHEDIR <code>module-attribute</code>","text":"<pre><code>ONEGADGET_CACHEDIR = cachedir('onegadget')\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.SAT","title":"SAT <code>module-attribute</code>","text":"<pre><code>SAT = SAT\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.UNSAT","title":"UNSAT <code>module-attribute</code>","text":"<pre><code>UNSAT = UNSAT\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.UNKNOWN","title":"UNKNOWN <code>module-attribute</code>","text":"<pre><code>UNKNOWN = UNKNOWN\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult","title":"CheckSatResult","text":"<p> Bases: <code>Enum</code></p> <p>Methods:</p> <ul> <li> <code>__str__</code> \u2013 </li> <li> <code>__and__</code> \u2013 </li> <li> <code>__or__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>SAT</code> \u2013 </li> <li> <code>UNSAT</code> \u2013 </li> <li> <code>UNKNOWN</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.SAT","title":"SAT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SAT = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.UNSAT","title":"UNSAT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UNSAT = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.UNKNOWN","title":"UNKNOWN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UNKNOWN = -1\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.__and__","title":"__and__","text":"<pre><code>__and__(other: CheckSatResult) -> CheckSatResult\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.__or__","title":"__or__","text":"<pre><code>__or__(other: CheckSatResult) -> CheckSatResult\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda","title":"Lambda","text":"<pre><code>Lambda(obj: str | Lambda)\n</code></pre> <p>Modified from onegadget's Lambda class</p> <p>https://github.com/david942j/one_gadget/blob/65ce1dade70bf89e7496346ccf452ce5b2d139b3/lib/one_gadget/emulators/lambda.rb#L13</p> <p>Methods:</p> <ul> <li> <code>__add__</code> \u2013 </li> <li> <code>__sub__</code> \u2013 </li> <li> <code>__str__</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> <li> <code>deref</code> \u2013 </li> <li> <code>deref_</code> \u2013 </li> <li> <code>ref</code> \u2013 </li> <li> <code>evaluate</code> \u2013 </li> <li> <code>parse</code> \u2013 </li> <li> <code>mem_obj</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>immi</code> \u2013 </li> <li> <code>obj</code> \u2013 </li> <li> <code>deref_count</code> \u2013 </li> <li> <code>gdb_expr</code> (<code>str</code>) \u2013 </li> <li> <code>color_str</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.immi","title":"immi <code>instance-attribute</code>","text":"<pre><code>immi = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.obj","title":"obj <code>instance-attribute</code>","text":"<pre><code>obj = obj\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.deref_count","title":"deref_count <code>instance-attribute</code>","text":"<pre><code>deref_count = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.gdb_expr","title":"gdb_expr <code>property</code>","text":"<pre><code>gdb_expr: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.color_str","title":"color_str <code>property</code>","text":"<pre><code>color_str: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.__add__","title":"__add__","text":"<pre><code>__add__(other: int) -> Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.__sub__","title":"__sub__","text":"<pre><code>__sub__(other: int) -> Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.deref","title":"deref","text":"<pre><code>deref() -> Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.deref_","title":"deref_","text":"<pre><code>deref_() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.ref","title":"ref","text":"<pre><code>ref() -> Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.evaluate","title":"evaluate","text":"<pre><code>evaluate(context: dict[Any, Any]) -> int | Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.parse","title":"parse <code>staticmethod</code>","text":"<pre><code>parse(argument: str, predefined: dict[Any, Any] = {}) -> int | Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.mem_obj","title":"mem_obj <code>staticmethod</code>","text":"<pre><code>mem_obj(arg: str) -> tuple[str, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.colorize_reg","title":"colorize_reg","text":"<pre><code>colorize_reg(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.colorize_integer","title":"colorize_integer","text":"<pre><code>colorize_integer(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.colorize_psuedo_code","title":"colorize_psuedo_code","text":"<pre><code>colorize_psuedo_code(code: str) -> str\n</code></pre> <p>Colorize the pseudo code of onegadget</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.compute_file_hash","title":"compute_file_hash","text":"<pre><code>compute_file_hash(filename: str) -> str\n</code></pre> <p>Compute the MD5 hash of the file, return the hash</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.run_onegadget","title":"run_onegadget","text":"<pre><code>run_onegadget() -> str\n</code></pre> <p>Run onegadget and return the output</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.parse_expression","title":"parse_expression","text":"<pre><code>parse_expression(expr: str) -> tuple[int | None, str, str | None]\n</code></pre> <p>Parse expression, return the result, colorized string and error message</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.check_stack_argv","title":"check_stack_argv","text":"<pre><code>check_stack_argv(expr: str) -> tuple[CheckSatResult, str]\n</code></pre> <p>Check argv that's on the stack, return the result and the message</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.check_non_stack_argv","title":"check_non_stack_argv","text":"<pre><code>check_non_stack_argv(expr: str) -> tuple[CheckSatResult, str]\n</code></pre> <p>Check argv that's not on the stack, return the result and the message</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.check_argv","title":"check_argv","text":"<pre><code>check_argv(expr: str) -> tuple[CheckSatResult, str]\n</code></pre> <p>Check argv, return the result and the message</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.check_envp","title":"check_envp","text":"<pre><code>check_envp(expr: str) -> tuple[bool, str]\n</code></pre> <p>Check envp, return the result and the message</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.check_constraint","title":"check_constraint","text":"<pre><code>check_constraint(constraint: str) -> tuple[CheckSatResult, str]\n</code></pre> <p>Parse constraint, return the result and the message</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.check_gadget","title":"check_gadget","text":"<pre><code>check_gadget(\n gadget: str,\n show_unsat: bool = False,\n no_unknown: bool = False,\n verbose: bool = False,\n) -> CheckSatResult\n</code></pre> <p>Check status of each gadget, return the gadget's status</p>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.find_gadgets","title":"find_gadgets","text":"<pre><code>find_gadgets(\n show_unsat: bool = False, no_unknown: bool = False, verbose: bool = False\n) -> dict[CheckSatResult, int]\n</code></pre> <p>Find gadgets by parsing the output of onegadget, return there's any valid gadget</p>"},{"location":"reference/pwndbg/aglib/proc/","title":"pwndbg.aglib.proc","text":""},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc","title":"proc","text":"<p>Provides values which would be available from /proc which are not fulfilled by other modules and some process/gdb flow related information.</p> <p>Classes:</p> <ul> <li> <code>module</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>OnlyWhenRunning</code> \u2013 </li> <li> <code>OnlyWhenQemuKernel</code> \u2013 </li> <li> <code>OnlyWithArch</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>pid</code> (<code>int</code>) \u2013 </li> <li> <code>tid</code> (<code>int</code>) \u2013 </li> <li> <code>thread_id</code> (<code>int</code>) \u2013 </li> <li> <code>alive</code> (<code>bool</code>) \u2013 </li> <li> <code>stopped_with_signal</code> (<code>bool</code>) \u2013 </li> <li> <code>exe</code> (<code>str | None</code>) \u2013 </li> <li> <code>binary_base_addr</code> (<code>int</code>) \u2013 </li> <li> <code>binary_vmmap</code> (<code>tuple[Page, ...]</code>) \u2013 </li> <li> <code>tether</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.pid","title":"pid <code>module-attribute</code>","text":"<pre><code>pid: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.tid","title":"tid <code>module-attribute</code>","text":"<pre><code>tid: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.thread_id","title":"thread_id <code>module-attribute</code>","text":"<pre><code>thread_id: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.alive","title":"alive <code>module-attribute</code>","text":"<pre><code>alive: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.stopped_with_signal","title":"stopped_with_signal <code>module-attribute</code>","text":"<pre><code>stopped_with_signal: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.exe","title":"exe <code>module-attribute</code>","text":"<pre><code>exe: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.binary_base_addr","title":"binary_base_addr <code>module-attribute</code>","text":"<pre><code>binary_base_addr: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.binary_vmmap","title":"binary_vmmap <code>module-attribute</code>","text":"<pre><code>binary_vmmap: tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.tether","title":"tether <code>module-attribute</code>","text":"<pre><code>tether = modules[__name__]\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module","title":"module","text":"<p> Bases: <code>ModuleType</code></p> <p>Methods:</p> <ul> <li> <code>dump_elf_data_section</code> \u2013 <p>Dump .data section of current process's ELF file</p> </li> <li> <code>dump_relocations_by_section_name</code> \u2013 <p>Dump relocations of a section by section name of current process's ELF file</p> </li> <li> <code>get_section_address_by_name</code> \u2013 <p>Find section address of current process by section name</p> </li> <li> <code>OnlyWhenRunning</code> \u2013 </li> <li> <code>OnlyWhenQemuKernel</code> \u2013 </li> <li> <code>OnlyWithArch</code> \u2013 <p>Decorates function to work only with the specified archictectures.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>pid</code> (<code>int</code>) \u2013 </li> <li> <code>tid</code> (<code>int</code>) \u2013 </li> <li> <code>thread_id</code> (<code>int</code>) \u2013 </li> <li> <code>alive</code> (<code>bool</code>) \u2013 <p>Informs whether the process has a thread. However, note that it will</p> </li> <li> <code>stopped_with_signal</code> (<code>bool</code>) \u2013 <p>Returns whether the program has stopped with a signal</p> </li> <li> <code>exe</code> (<code>str | None</code>) \u2013 <p>Returns the executed file path.</p> </li> <li> <code>binary_base_addr</code> (<code>int</code>) \u2013 </li> <li> <code>binary_vmmap</code> (<code>tuple[Page, ...]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.pid","title":"pid <code>property</code>","text":"<pre><code>pid: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.tid","title":"tid <code>property</code>","text":"<pre><code>tid: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.thread_id","title":"thread_id <code>property</code>","text":"<pre><code>thread_id: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.alive","title":"alive <code>property</code>","text":"<pre><code>alive: bool\n</code></pre> <p>Informs whether the process has a thread. However, note that it will still return True for a segfaulted thread. To detect that, consider using the <code>stopped_with_signal</code> method.</p>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.stopped_with_signal","title":"stopped_with_signal <code>property</code>","text":"<pre><code>stopped_with_signal: bool\n</code></pre> <p>Returns whether the program has stopped with a signal</p> <p>Can be used to detect segfaults (but will also detect other signals)</p>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.exe","title":"exe <code>property</code>","text":"<pre><code>exe: str | None\n</code></pre> <p>Returns the executed file path.</p> <p>On remote targets, this path may not exist locally.</p> If you need the locally referenced file use <p><code>gdb.current_process().filename</code></p>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.binary_base_addr","title":"binary_base_addr <code>property</code>","text":"<pre><code>binary_base_addr: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.binary_vmmap","title":"binary_vmmap <code>property</code>","text":"<pre><code>binary_vmmap: tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.dump_elf_data_section","title":"dump_elf_data_section","text":"<pre><code>dump_elf_data_section() -> tuple[int, int, bytes] | None\n</code></pre> <p>Dump .data section of current process's ELF file</p>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.dump_relocations_by_section_name","title":"dump_relocations_by_section_name","text":"<pre><code>dump_relocations_by_section_name(\n section_name: str,\n) -> tuple[Relocation, ...] | None\n</code></pre> <p>Dump relocations of a section by section name of current process's ELF file</p>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.get_section_address_by_name","title":"get_section_address_by_name","text":"<pre><code>get_section_address_by_name(section_name: str) -> int\n</code></pre> <p>Find section address of current process by section name</p>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.OnlyWhenRunning","title":"OnlyWhenRunning","text":"<pre><code>OnlyWhenRunning(func: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.OnlyWhenQemuKernel","title":"OnlyWhenQemuKernel","text":"<pre><code>OnlyWhenQemuKernel(func: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.module.OnlyWithArch","title":"OnlyWithArch","text":"<pre><code>OnlyWithArch(\n arch_names: list[str],\n) -> Callable[[Callable[P, T]], Callable[P, T | None]]\n</code></pre> <p>Decorates function to work only with the specified archictectures.</p>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.OnlyWhenRunning","title":"OnlyWhenRunning","text":"<pre><code>OnlyWhenRunning(func: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.OnlyWhenQemuKernel","title":"OnlyWhenQemuKernel","text":"<pre><code>OnlyWhenQemuKernel(func: Callable[P, T]) -> Callable[P, T]\n</code></pre>"},{"location":"reference/pwndbg/aglib/proc/#pwndbg.aglib.proc.OnlyWithArch","title":"OnlyWithArch","text":"<pre><code>OnlyWithArch(\n arch_names: list[str],\n) -> Callable[[Callable[..., T]], Callable[..., T | None]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/qemu/","title":"pwndbg.aglib.qemu","text":""},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu","title":"qemu","text":"<p>Determine whether the target is being run under QEMU.</p> <p>Functions:</p> <ul> <li> <code>is_qemu</code> \u2013 </li> <li> <code>is_usermode</code> \u2013 </li> <li> <code>is_qemu_usermode</code> \u2013 <p>Returns <code>True</code> if the target remote is being run under</p> </li> <li> <code>is_qemu_kernel</code> \u2013 </li> <li> <code>is_old_qemu_user</code> \u2013 </li> <li> <code>exec_file_supported</code> \u2013 <p>Returns <code>True</code> if the remote target understands the 'qXfer:exec-file:read' packet.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu.is_qemu","title":"is_qemu","text":"<pre><code>is_qemu() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu.is_usermode","title":"is_usermode","text":"<pre><code>is_usermode() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu.is_qemu_usermode","title":"is_qemu_usermode","text":"<pre><code>is_qemu_usermode() -> bool\n</code></pre> <p>Returns <code>True</code> if the target remote is being run under QEMU usermode emulation.</p>"},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu.is_qemu_kernel","title":"is_qemu_kernel","text":"<pre><code>is_qemu_kernel() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu.is_old_qemu_user","title":"is_old_qemu_user","text":"<pre><code>is_old_qemu_user() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu.exec_file_supported","title":"exec_file_supported","text":"<pre><code>exec_file_supported() -> bool\n</code></pre> <p>Returns <code>True</code> if the remote target understands the 'qXfer:exec-file:read' packet. A check for this feature is done in vmmap code, to warn against running legacy Qemu versions.</p>"},{"location":"reference/pwndbg/aglib/regs/","title":"pwndbg.aglib.regs","text":""},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs","title":"regs","text":"<p>Reading register value from the inferior, and provides a standardized interface to registers like \"sp\" and \"pc\".</p> <p>Classes:</p> <ul> <li> <code>module</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>regs_in_frame</code> \u2013 </li> <li> <code>get_register</code> \u2013 </li> <li> <code>get_qemu_register</code> \u2013 </li> <li> <code>update_last</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>PTRACE_ARCH_PRCTL</code> \u2013 </li> <li> <code>ARCH_GET_FS</code> \u2013 </li> <li> <code>ARCH_GET_GS</code> \u2013 </li> <li> <code>gpr</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>common</code> (<code>list[str]</code>) \u2013 </li> <li> <code>frame</code> (<code>str | None</code>) \u2013 </li> <li> <code>retaddr</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>flags</code> (<code>dict[str, BitFlags]</code>) \u2013 </li> <li> <code>extra_flags</code> (<code>dict[str, BitFlags]</code>) \u2013 </li> <li> <code>stack</code> (<code>str</code>) \u2013 </li> <li> <code>retval</code> (<code>str | None</code>) \u2013 </li> <li> <code>all</code> (<code>list[str]</code>) \u2013 </li> <li> <code>changed</code> (<code>list[str]</code>) \u2013 </li> <li> <code>fsbase</code> (<code>int</code>) \u2013 </li> <li> <code>gsbase</code> (<code>int</code>) \u2013 </li> <li> <code>current</code> (<code>RegisterSet</code>) \u2013 </li> <li> <code>fix</code> (<code>Callable[[str], str]</code>) \u2013 </li> <li> <code>items</code> (<code>Callable[[], Generator[tuple[str, Any], None, None]]</code>) \u2013 </li> <li> <code>previous</code> (<code>dict[str, int]</code>) \u2013 </li> <li> <code>last</code> (<code>dict[str, int]</code>) \u2013 </li> <li> <code>pc</code> (<code>int | None</code>) \u2013 </li> <li> <code>tether</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.PTRACE_ARCH_PRCTL","title":"PTRACE_ARCH_PRCTL <code>module-attribute</code>","text":"<pre><code>PTRACE_ARCH_PRCTL = 30\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.ARCH_GET_FS","title":"ARCH_GET_FS <code>module-attribute</code>","text":"<pre><code>ARCH_GET_FS = 4099\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.ARCH_GET_GS","title":"ARCH_GET_GS <code>module-attribute</code>","text":"<pre><code>ARCH_GET_GS = 4100\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.gpr","title":"gpr <code>module-attribute</code>","text":"<pre><code>gpr: tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.common","title":"common <code>module-attribute</code>","text":"<pre><code>common: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.frame","title":"frame <code>module-attribute</code>","text":"<pre><code>frame: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.retaddr","title":"retaddr <code>module-attribute</code>","text":"<pre><code>retaddr: tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.flags","title":"flags <code>module-attribute</code>","text":"<pre><code>flags: dict[str, BitFlags]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.extra_flags","title":"extra_flags <code>module-attribute</code>","text":"<pre><code>extra_flags: dict[str, BitFlags]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.stack","title":"stack <code>module-attribute</code>","text":"<pre><code>stack: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.retval","title":"retval <code>module-attribute</code>","text":"<pre><code>retval: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.all","title":"all <code>module-attribute</code>","text":"<pre><code>all: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.changed","title":"changed <code>module-attribute</code>","text":"<pre><code>changed: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.fsbase","title":"fsbase <code>module-attribute</code>","text":"<pre><code>fsbase: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.gsbase","title":"gsbase <code>module-attribute</code>","text":"<pre><code>gsbase: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.current","title":"current <code>module-attribute</code>","text":"<pre><code>current: RegisterSet\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.fix","title":"fix <code>module-attribute</code>","text":"<pre><code>fix: Callable[[str], str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.items","title":"items <code>module-attribute</code>","text":"<pre><code>items: Callable[[], Generator[tuple[str, Any], None, None]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.previous","title":"previous <code>module-attribute</code>","text":"<pre><code>previous: dict[str, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.last","title":"last <code>module-attribute</code>","text":"<pre><code>last: dict[str, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.pc","title":"pc <code>module-attribute</code>","text":"<pre><code>pc: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.tether","title":"tether <code>module-attribute</code>","text":"<pre><code>tether = modules[__name__]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module","title":"module","text":"<p> Bases: <code>ModuleType</code></p> <p>Methods:</p> <ul> <li> <code>read_reg</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>__setattr__</code> \u2013 </li> <li> <code>__getitem__</code> \u2013 </li> <li> <code>__contains__</code> \u2013 </li> <li> <code>__iter__</code> \u2013 </li> <li> <code>fix</code> \u2013 </li> <li> <code>items</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>previous</code> (<code>dict[str, int]</code>) \u2013 </li> <li> <code>last</code> (<code>dict[str, int]</code>) \u2013 </li> <li> <code>current</code> (<code>RegisterSet</code>) \u2013 </li> <li> <code>gpr</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>common</code> (<code>list[str]</code>) \u2013 </li> <li> <code>frame</code> (<code>str | None</code>) \u2013 </li> <li> <code>retaddr</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>flags</code> (<code>dict[str, BitFlags]</code>) \u2013 </li> <li> <code>extra_flags</code> (<code>dict[str, BitFlags]</code>) \u2013 </li> <li> <code>stack</code> (<code>str</code>) \u2013 </li> <li> <code>retval</code> (<code>str | None</code>) \u2013 </li> <li> <code>all</code> (<code>set[str]</code>) \u2013 </li> <li> <code>reg_sets</code> \u2013 </li> <li> <code>changed</code> (<code>list[str]</code>) \u2013 </li> <li> <code>idt</code> (<code>int</code>) \u2013 </li> <li> <code>idt_limit</code> (<code>int</code>) \u2013 </li> <li> <code>fsbase</code> (<code>int</code>) \u2013 </li> <li> <code>gsbase</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.previous","title":"previous <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>previous: dict[str, int] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.last","title":"last <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>last: dict[str, int] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.current","title":"current <code>property</code>","text":"<pre><code>current: RegisterSet\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.gpr","title":"gpr <code>property</code>","text":"<pre><code>gpr: tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.common","title":"common <code>property</code>","text":"<pre><code>common: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.frame","title":"frame <code>property</code>","text":"<pre><code>frame: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.retaddr","title":"retaddr <code>property</code>","text":"<pre><code>retaddr: tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.flags","title":"flags <code>property</code>","text":"<pre><code>flags: dict[str, BitFlags]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.extra_flags","title":"extra_flags <code>property</code>","text":"<pre><code>extra_flags: dict[str, BitFlags]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.stack","title":"stack <code>property</code>","text":"<pre><code>stack: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.retval","title":"retval <code>property</code>","text":"<pre><code>retval: str | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.all","title":"all <code>property</code>","text":"<pre><code>all: set[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.reg_sets","title":"reg_sets <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>reg_sets = reg_sets\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.changed","title":"changed <code>property</code>","text":"<pre><code>changed: list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.idt","title":"idt <code>property</code>","text":"<pre><code>idt: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.idt_limit","title":"idt_limit <code>property</code>","text":"<pre><code>idt_limit: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.fsbase","title":"fsbase <code>property</code>","text":"<pre><code>fsbase: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.gsbase","title":"gsbase <code>property</code>","text":"<pre><code>gsbase: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.read_reg","title":"read_reg","text":"<pre><code>read_reg(reg: str, frame: Frame | None = None) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(attr: str) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__setattr__","title":"__setattr__","text":"<pre><code>__setattr__(attr: str, val: Any) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(item: Any) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__contains__","title":"__contains__","text":"<pre><code>__contains__(reg: str) -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__iter__","title":"__iter__","text":"<pre><code>__iter__() -> Iterator[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.fix","title":"fix","text":"<pre><code>fix(expression: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.items","title":"items","text":"<pre><code>items() -> Generator[tuple[str, Any], None, None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.regs_in_frame","title":"regs_in_frame","text":"<pre><code>regs_in_frame(frame: Frame) -> Registers\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.get_register","title":"get_register","text":"<pre><code>get_register(name: str, frame: Frame | None = None) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.get_qemu_register","title":"get_qemu_register","text":"<pre><code>get_qemu_register(name: str) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.update_last","title":"update_last","text":"<pre><code>update_last() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/remote/","title":"pwndbg.aglib.remote","text":""},{"location":"reference/pwndbg/aglib/remote/#pwndbg.aglib.remote","title":"remote","text":"<p>Information about whether the debuggee is local (under GDB) or remote (under GDBSERVER or QEMU stub).</p> <p>Functions:</p> <ul> <li> <code>is_remote</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/remote/#pwndbg.aglib.remote.is_remote","title":"is_remote","text":"<pre><code>is_remote() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/shellcode/","title":"pwndbg.aglib.shellcode","text":""},{"location":"reference/pwndbg/aglib/shellcode/#pwndbg.aglib.shellcode","title":"shellcode","text":"<p>Shellcode</p> <p>This module implements functionality that allows for the execution of a small amount of code in the context of the inferior.</p> <p>Functions:</p> <ul> <li> <code>exec_syscall</code> \u2013 <p>Tries executing the given syscall in the context of the inferior.</p> </li> <li> <code>exec_shellcode</code> \u2013 <p>Tries executing the given blob of machine code in the current context of the</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/shellcode/#pwndbg.aglib.shellcode.exec_syscall","title":"exec_syscall <code>async</code>","text":"<pre><code>exec_syscall(\n ec: ExecutionController,\n syscall,\n arg0=None,\n arg1=None,\n arg2=None,\n arg3=None,\n arg4=None,\n arg5=None,\n disable_breakpoints=False,\n)\n</code></pre> <p>Tries executing the given syscall in the context of the inferior.</p>"},{"location":"reference/pwndbg/aglib/shellcode/#pwndbg.aglib.shellcode.exec_shellcode","title":"exec_shellcode <code>async</code>","text":"<pre><code>exec_shellcode(\n ec: ExecutionController,\n blob,\n restore_context=True,\n disable_breakpoints=False,\n)\n</code></pre> <p>Tries executing the given blob of machine code in the current context of the inferior, optionally restoring the values of the registers as they were before the shellcode ran, as a means to allow for execution of the inferior to continue uninterrupted. The value of the program counter is always restored.</p> <p>Additionally, the caller may specify an object to be called before the context is restored, so that information stored in the registers after the shellcode finishes can be retrieved. The return value of that call will be returned by this function.</p>"},{"location":"reference/pwndbg/aglib/shellcode/#pwndbg.aglib.shellcode.exec_shellcode--safety","title":"Safety","text":"<p>Seeing as this function injects code directly into the inferior and runs it, the caller must be careful to inject code that will (1) terminate and (2) not cause the inferior to misbehave. Otherwise, it is fairly easy to crash or currupt the memory in the inferior.</p>"},{"location":"reference/pwndbg/aglib/stack/","title":"pwndbg.aglib.stack","text":""},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack","title":"stack","text":"<p>Helpers for finding address mappings which are used as a stack.</p> <p>Generally not needed, except under qemu-user and for when binaries do things to remap the stack (e.g. pwnies' postit).</p> <p>Functions:</p> <ul> <li> <code>find</code> \u2013 <p>Returns a pwndbg.lib.memory.Page object which corresponds to given address stack</p> </li> <li> <code>find_upper_stack_boundary</code> \u2013 </li> <li> <code>get</code> \u2013 <p>For each running thread, return the known address range for its stack</p> </li> <li> <code>current</code> \u2013 <p>Returns the bounds for the stack for the current thread.</p> </li> <li> <code>is_executable</code> \u2013 </li> <li> <code>callstack</code> \u2013 <p>Return the address of the return address for the current frame.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>auto_explore</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.auto_explore","title":"auto_explore <code>module-attribute</code>","text":"<pre><code>auto_explore = add_param(\n \"auto-explore-stack\",\n \"warn\",\n \"stack exploration; it may be really slow.\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"warn\", \"yes\", \"no\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.find","title":"find","text":"<pre><code>find(address: int) -> Page | None\n</code></pre> <p>Returns a pwndbg.lib.memory.Page object which corresponds to given address stack or None if it does not exist</p>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.find_upper_stack_boundary","title":"find_upper_stack_boundary","text":"<pre><code>find_upper_stack_boundary(stack_ptr: int, max_pages: int = 1024) -> int\n</code></pre>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.get","title":"get","text":"<pre><code>get() -> dict[int, Page]\n</code></pre> <p>For each running thread, return the known address range for its stack Returns a dict which should never be modified (since its cached)</p>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.current","title":"current","text":"<pre><code>current() -> Page | None\n</code></pre> <p>Returns the bounds for the stack for the current thread.</p>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.is_executable","title":"is_executable","text":"<pre><code>is_executable() -> bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.callstack","title":"callstack","text":"<pre><code>callstack() -> list[int]\n</code></pre> <p>Return the address of the return address for the current frame.</p>"},{"location":"reference/pwndbg/aglib/strings/","title":"pwndbg.aglib.strings","text":""},{"location":"reference/pwndbg/aglib/strings/#pwndbg.aglib.strings","title":"strings","text":"<p>Functionality for resolving ASCII printable strings within the debuggee's address space.</p> <p>Functions:</p> <ul> <li> <code>update_length</code> \u2013 <p>Unfortunately there's not a better way to get at this info.</p> </li> <li> <code>get</code> \u2013 <p>Returns a printable C-string from address.</p> </li> <li> <code>yield_in_page</code> \u2013 <p>Yields strings of length >= n found in a given vmmap page</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>length</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/strings/#pwndbg.aglib.strings.length","title":"length <code>module-attribute</code>","text":"<pre><code>length = 15\n</code></pre>"},{"location":"reference/pwndbg/aglib/strings/#pwndbg.aglib.strings.update_length","title":"update_length","text":"<pre><code>update_length() -> None\n</code></pre> <p>Unfortunately there's not a better way to get at this info.</p> <p>gdb.execute('show print elements', from_tty=False, to_string=True) 'Limit on string chars or array elements to print is 21.\\n'</p>"},{"location":"reference/pwndbg/aglib/strings/#pwndbg.aglib.strings.get","title":"get","text":"<pre><code>get(\n address: int, maxlen: int | None = None, maxread: int | None = None\n) -> str | None\n</code></pre> <p>Returns a printable C-string from address.</p> <p>Returns <code>None</code> if string contains non-printable chars or if the <code>maxlen</code> length data does not end up with a null byte.</p>"},{"location":"reference/pwndbg/aglib/strings/#pwndbg.aglib.strings.yield_in_page","title":"yield_in_page","text":"<pre><code>yield_in_page(page: Page, n=4) -> Iterator[str]\n</code></pre> <p>Yields strings of length >= n found in a given vmmap page</p>"},{"location":"reference/pwndbg/aglib/symbol/","title":"pwndbg.aglib.symbol","text":""},{"location":"reference/pwndbg/aglib/symbol/#pwndbg.aglib.symbol","title":"symbol","text":"<p>Looking up addresses for function names / symbols, and vice-versa.</p> <p>Functions:</p> <ul> <li> <code>lookup_symbol_addr</code> \u2013 </li> <li> <code>lookup_symbol_value</code> \u2013 </li> <li> <code>lookup_symbol</code> \u2013 <p>Returns the address of the given <code>symbol</code>, cast-ed to the appropriate symbol type.</p> </li> <li> <code>lookup_frame_symbol</code> \u2013 <p>Returns the address of the given <code>symbol</code>, cast-ed to the appropriate symbol type.</p> </li> <li> <code>resolve_addr</code> \u2013 <p>Resolves an address to its corresponding symbol name, if available.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/symbol/#pwndbg.aglib.symbol.lookup_symbol_addr","title":"lookup_symbol_addr","text":"<pre><code>lookup_symbol_addr(\n name: str,\n *,\n prefer_static: bool = False,\n type: SymbolLookupType = ANY,\n objfile_endswith: str | None = None,\n) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/symbol/#pwndbg.aglib.symbol.lookup_symbol_value","title":"lookup_symbol_value","text":"<pre><code>lookup_symbol_value(\n name: str,\n *,\n prefer_static: bool = False,\n type: SymbolLookupType = ANY,\n objfile_endswith: str | None = None,\n) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/symbol/#pwndbg.aglib.symbol.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(\n name: str,\n *,\n prefer_static: bool = False,\n type: SymbolLookupType = ANY,\n objfile_endswith: str | None = None,\n) -> Value | None\n</code></pre> <p>Returns the address of the given <code>symbol</code>, cast-ed to the appropriate symbol type.</p> <p>This function searches for (SymbolLookupType.ANY): - Function names - Variable names - (gdb only) Typedef names (if you need please use aglib.typeinfo.load) - (gdb only) Enum values (if you need please use aglib.typeinfo.enum_member)</p> <p>The lookup order is as follows (default): 1. Global scope within the current module 2. Global static scope within the current module 3. Global scope in other modules 4. Global static scope in other modules</p>"},{"location":"reference/pwndbg/aglib/symbol/#pwndbg.aglib.symbol.lookup_frame_symbol","title":"lookup_frame_symbol","text":"<pre><code>lookup_frame_symbol(name: str, *, type: SymbolLookupType = ANY) -> Value | None\n</code></pre> <p>Returns the address of the given <code>symbol</code>, cast-ed to the appropriate symbol type.</p> <p>This function searches for (SymbolLookupType.ANY): - Function names - Variable names - (gdb only, please don't use) Typedef names - (gdb only, please don't use) Enum values</p> <p>The lookup order is as follows: 1. Local scope 2. Global scope within the current module 3. Global static scope within the current module 4. Global scope in other modules 5. Global static scope in other modules</p>"},{"location":"reference/pwndbg/aglib/symbol/#pwndbg.aglib.symbol.resolve_addr","title":"resolve_addr","text":"<pre><code>resolve_addr(addr: int) -> str | None\n</code></pre> <p>Resolves an address to its corresponding symbol name, if available.</p> <p>Note: - This function does not resolve TLS (Thread-Local Storage) addresses or addresses with local scope.</p> <p>Resolution is performed in the following order: - Global scope symbols.</p>"},{"location":"reference/pwndbg/aglib/tls/","title":"pwndbg.aglib.tls","text":""},{"location":"reference/pwndbg/aglib/tls/#pwndbg.aglib.tls","title":"tls","text":"<p>Getting Thread Local Storage (TLS) information.</p> <p>Functions:</p> <ul> <li> <code>find_address_with_pthread_self</code> \u2013 <p>Get the base address of the Thread Local Storage (TLS) for the current thread using</p> </li> <li> <code>find_address_with_register</code> \u2013 <p>Get the base address of the Thread Local Storage (TLS) for the current thread using</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/tls/#pwndbg.aglib.tls.__call_pthread_self","title":"__call_pthread_self","text":"<pre><code>__call_pthread_self() -> int\n</code></pre> <p>Retrieve the address of the <code>struct pthread_t</code> for the current thread by calling pthread_self(). This address can be used to locate the base address of the Thread Local Storage (TLS).</p>"},{"location":"reference/pwndbg/aglib/tls/#pwndbg.aglib.tls.find_address_with_pthread_self","title":"find_address_with_pthread_self","text":"<pre><code>find_address_with_pthread_self() -> int\n</code></pre> <p>Get the base address of the Thread Local Storage (TLS) for the current thread using the pthread_self() function. The returned address points to the <code>struct tcbhead_t</code>, which serves as the header for TLS and thread-specific metadata.</p>"},{"location":"reference/pwndbg/aglib/tls/#pwndbg.aglib.tls.find_address_with_register","title":"find_address_with_register","text":"<pre><code>find_address_with_register() -> int\n</code></pre> <p>Get the base address of the Thread Local Storage (TLS) for the current thread using a CPU register. The returned address points to the <code>struct tcbhead_t</code>, which is the entry point for TLS and thread-specific metadata.</p>"},{"location":"reference/pwndbg/aglib/typeinfo/","title":"pwndbg.aglib.typeinfo","text":""},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo","title":"typeinfo","text":"<p>Common types.</p> <p>Functions:</p> <ul> <li> <code>lookup_types</code> \u2013 </li> <li> <code>update</code> \u2013 </li> <li> <code>load</code> \u2013 <p>Load a symbol; note that new symbols can be added with <code>add-symbol-file</code> functionality</p> </li> <li> <code>get_type</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>module</code> \u2013 </li> <li> <code>char</code> (<code>Type</code>) \u2013 </li> <li> <code>ulong</code> (<code>Type</code>) \u2013 </li> <li> <code>long</code> (<code>Type</code>) \u2013 </li> <li> <code>uchar</code> (<code>Type</code>) \u2013 </li> <li> <code>ushort</code> (<code>Type</code>) \u2013 </li> <li> <code>uint</code> (<code>Type</code>) \u2013 </li> <li> <code>void</code> (<code>Type</code>) \u2013 </li> <li> <code>uint8</code> (<code>Type</code>) \u2013 </li> <li> <code>uint16</code> (<code>Type</code>) \u2013 </li> <li> <code>uint32</code> (<code>Type</code>) \u2013 </li> <li> <code>uint64</code> (<code>Type</code>) \u2013 </li> <li> <code>unsigned</code> (<code>dict[int, Type]</code>) \u2013 </li> <li> <code>int8</code> (<code>Type</code>) \u2013 </li> <li> <code>int16</code> (<code>Type</code>) \u2013 </li> <li> <code>int32</code> (<code>Type</code>) \u2013 </li> <li> <code>int64</code> (<code>Type</code>) \u2013 </li> <li> <code>signed</code> (<code>dict[int, Type]</code>) \u2013 </li> <li> <code>pvoid</code> (<code>Type</code>) \u2013 </li> <li> <code>ppvoid</code> (<code>Type</code>) \u2013 </li> <li> <code>pchar</code> (<code>Type</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 </li> <li> <code>ptrdiff</code> (<code>Type</code>) \u2013 </li> <li> <code>size_t</code> (<code>Type</code>) \u2013 </li> <li> <code>ssize_t</code> (<code>Type</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.module","title":"module <code>module-attribute</code>","text":"<pre><code>module = modules[__name__]\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.char","title":"char <code>module-attribute</code>","text":"<pre><code>char: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.ulong","title":"ulong <code>module-attribute</code>","text":"<pre><code>ulong: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.long","title":"long <code>module-attribute</code>","text":"<pre><code>long: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.uchar","title":"uchar <code>module-attribute</code>","text":"<pre><code>uchar: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.ushort","title":"ushort <code>module-attribute</code>","text":"<pre><code>ushort: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.uint","title":"uint <code>module-attribute</code>","text":"<pre><code>uint: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.void","title":"void <code>module-attribute</code>","text":"<pre><code>void: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.uint8","title":"uint8 <code>module-attribute</code>","text":"<pre><code>uint8: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.uint16","title":"uint16 <code>module-attribute</code>","text":"<pre><code>uint16: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.uint32","title":"uint32 <code>module-attribute</code>","text":"<pre><code>uint32: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.uint64","title":"uint64 <code>module-attribute</code>","text":"<pre><code>uint64: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.unsigned","title":"unsigned <code>module-attribute</code>","text":"<pre><code>unsigned: dict[int, Type]\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.int8","title":"int8 <code>module-attribute</code>","text":"<pre><code>int8: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.int16","title":"int16 <code>module-attribute</code>","text":"<pre><code>int16: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.int32","title":"int32 <code>module-attribute</code>","text":"<pre><code>int32: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.int64","title":"int64 <code>module-attribute</code>","text":"<pre><code>int64: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.signed","title":"signed <code>module-attribute</code>","text":"<pre><code>signed: dict[int, Type]\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.pvoid","title":"pvoid <code>module-attribute</code>","text":"<pre><code>pvoid: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.ppvoid","title":"ppvoid <code>module-attribute</code>","text":"<pre><code>ppvoid: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.pchar","title":"pchar <code>module-attribute</code>","text":"<pre><code>pchar: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.ptrsize","title":"ptrsize <code>module-attribute</code>","text":"<pre><code>ptrsize: int = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.ptrdiff","title":"ptrdiff <code>module-attribute</code>","text":"<pre><code>ptrdiff: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.size_t","title":"size_t <code>module-attribute</code>","text":"<pre><code>size_t: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.ssize_t","title":"ssize_t <code>module-attribute</code>","text":"<pre><code>ssize_t: Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.lookup_types","title":"lookup_types","text":"<pre><code>lookup_types(*types: str) -> Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.update","title":"update","text":"<pre><code>update() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.load","title":"load","text":"<pre><code>load(name: str) -> Type | None\n</code></pre> <p>Load a symbol; note that new symbols can be added with <code>add-symbol-file</code> functionality</p>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.get_type","title":"get_type","text":"<pre><code>get_type(size: int) -> Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap/","title":"pwndbg.aglib.vmmap","text":""},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap","title":"vmmap","text":"<p>Functions:</p> <ul> <li> <code>get</code> \u2013 </li> <li> <code>find</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap.get","title":"get","text":"<pre><code>get() -> tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap.find","title":"find","text":"<pre><code>find(address: int | Value | None) -> Page | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/","title":"pwndbg.aglib.vmmap_custom","text":""},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom","title":"vmmap_custom","text":"<p>Functions:</p> <ul> <li> <code>clear_warn_cache</code> \u2013 </li> <li> <code>get_custom_pages</code> \u2013 <p>Returns a tuple of <code>Page</code> objects representing the memory mappings of the</p> </li> <li> <code>add_custom_page</code> \u2013 </li> <li> <code>clear_custom_page</code> \u2013 </li> <li> <code>explore</code> \u2013 <p>Given a potential address, check to see what permissions it has.</p> </li> <li> <code>get_memory_flags</code> \u2013 </li> <li> <code>find_boundaries</code> \u2013 <p>Given a single address, find all contiguous pages</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>explored_pages</code> (<code>list[Page]</code>) \u2013 </li> <li> <code>custom_pages</code> (<code>list[Page]</code>) \u2013 </li> <li> <code>auto_explore</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.explored_pages","title":"explored_pages <code>module-attribute</code>","text":"<pre><code>explored_pages: list[Page] = []\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.custom_pages","title":"custom_pages <code>module-attribute</code>","text":"<pre><code>custom_pages: list[Page] = []\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.auto_explore","title":"auto_explore <code>module-attribute</code>","text":"<pre><code>auto_explore = add_param(\n \"auto-explore-pages\",\n \"warn\",\n \"whether to try to infer page permissions when memory maps are missing\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"yes\", \"warn\", \"no\"],\n help_docstring=\"\\nThis command can cause errors.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.clear_warn_cache","title":"clear_warn_cache","text":"<pre><code>clear_warn_cache()\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.get_custom_pages","title":"get_custom_pages","text":"<pre><code>get_custom_pages() -> tuple[Page, ...]\n</code></pre> <p>Returns a tuple of <code>Page</code> objects representing the memory mappings of the target, sorted by virtual address ascending.</p>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.add_custom_page","title":"add_custom_page","text":"<pre><code>add_custom_page(page: Page) -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.clear_custom_page","title":"clear_custom_page","text":"<pre><code>clear_custom_page() -> None\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.explore","title":"explore","text":"<pre><code>explore(address_maybe: int) -> Page | None\n</code></pre> <p>Given a potential address, check to see what permissions it has.</p> <p>Returns:</p> <ul> <li> <code>Page | None</code> \u2013 <p>Page object</p> </li> </ul> Note <p>Adds the Page object to a persistent list of pages which are only reset when the process dies. This means pages which are added this way will not be removed when unmapped.</p> <p>Also assumes the entire contiguous section has the same permission.</p>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.get_memory_flags","title":"get_memory_flags","text":"<pre><code>get_memory_flags(address_maybe: int) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.find_boundaries","title":"find_boundaries","text":"<pre><code>find_boundaries(addr: int, name: str = '', min: int = 0) -> Page\n</code></pre> <p>Given a single address, find all contiguous pages which are mapped.</p>"},{"location":"reference/pwndbg/arguments/","title":"pwndbg.arguments","text":""},{"location":"reference/pwndbg/arguments/#pwndbg.arguments","title":"arguments","text":"<p>Allows describing functions, specifically enumerating arguments which may be passed in a combination of registers and stack values.</p> <p>Functions:</p> <ul> <li> <code>get</code> \u2013 <p>Returns an array containing the arguments to the current function,</p> </li> <li> <code>argname</code> \u2013 </li> <li> <code>argument</code> \u2013 <p>Returns the nth argument, as if $pc were a 'call' or 'bl' type</p> </li> <li> <code>arguments</code> \u2013 <p>Yields (arg_name, arg_value) tuples for arguments from a given ABI.</p> </li> <li> <code>format_args</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.get","title":"get","text":"<pre><code>get(instruction: PwndbgInstruction) -> list[tuple[Argument, int]]\n</code></pre> <p>Returns an array containing the arguments to the current function, if $pc is a 'call', 'bl', or 'jalr' type instruction.</p> <p>Otherwise, returns None.</p>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.argname","title":"argname","text":"<pre><code>argname(n: int, abi: ABI | None = None) -> str\n</code></pre>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.argument","title":"argument","text":"<pre><code>argument(n: int, abi: ABI | None = None) -> int\n</code></pre> <p>Returns the nth argument, as if $pc were a 'call' or 'bl' type instruction. Works only for ABIs that use registers for arguments.</p>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.arguments","title":"arguments","text":"<pre><code>arguments(abi: ABI | None = None)\n</code></pre> <p>Yields (arg_name, arg_value) tuples for arguments from a given ABI. Works only for ABIs that use registers for arguments.</p>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.format_args","title":"format_args","text":"<pre><code>format_args(instruction: PwndbgInstruction) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/auxv/","title":"pwndbg.auxv","text":""},{"location":"reference/pwndbg/auxv/#pwndbg.auxv","title":"auxv","text":"<p>Functions:</p> <ul> <li> <code>get</code> \u2013 </li> <li> <code>procfs_auxv</code> \u2013 </li> <li> <code>use_info_auxv</code> \u2013 </li> <li> <code>explore_stack_auxv</code> \u2013 </li> <li> <code>walk_stack2</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>auto_explore</code> \u2013 </li> <li> <code>example_info_auxv_linux</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.auto_explore","title":"auto_explore <code>module-attribute</code>","text":"<pre><code>auto_explore = add_param(\n \"auto-explore-auxv\",\n \"warn\",\n \"stack exploration for AUXV information; it may be really slow.\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"warn\", \"yes\", \"no\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.example_info_auxv_linux","title":"example_info_auxv_linux <code>module-attribute</code>","text":"<pre><code>example_info_auxv_linux = '\\n33 AT_SYSINFO_EHDR System-supplied DSO\\'s ELF header 0x7ffff7ffa000\\n16 AT_HWCAP Machine-dependent CPU capability hints 0xfabfbff\\n6 AT_PAGESZ System page size 4096\\n17 AT_CLKTCK Frequency of times() 100\\n3 AT_PHDR Program headers for program 0x400040\\n4 AT_PHENT Size of program header entry 56\\n5 AT_PHNUM Number of program headers 9\\n7 AT_BASE Base address of interpreter 0x7ffff7dda000\\n8 AT_FLAGS Flags 0x0\\n9 AT_ENTRY Entry point of program 0x42020b\\n11 AT_UID Real user ID 1000\\n12 AT_EUID Effective user ID 1000\\n13 AT_GID Real group ID 1000\\n14 AT_EGID Effective group ID 1000\\n23 AT_SECURE Boolean, was exec setuid-like? 0\\n25 AT_RANDOM Address of 16 random bytes 0x7fffffffdb39\\n31 AT_EXECFN File name of executable 0x7fffffffefee \"/bin/bash\"\\n15 AT_PLATFORM String identifying platform 0x7fffffffdb49 \"x86_64\"\\n0 AT_NULL End of vector 0x0\\n'\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.get","title":"get","text":"<pre><code>get() -> AUXV\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.procfs_auxv","title":"procfs_auxv","text":"<pre><code>procfs_auxv() -> AUXV | None\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.use_info_auxv","title":"use_info_auxv","text":"<pre><code>use_info_auxv() -> AUXV | None\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.explore_stack_auxv","title":"explore_stack_auxv","text":"<pre><code>explore_stack_auxv() -> AUXV | None\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.walk_stack2","title":"walk_stack2","text":"<pre><code>walk_stack2(offset: int = 0) -> AUXV\n</code></pre>"},{"location":"reference/pwndbg/chain/","title":"pwndbg.chain","text":""},{"location":"reference/pwndbg/chain/#pwndbg.chain","title":"chain","text":"<p>Functions:</p> <ul> <li> <code>get</code> \u2013 <p>Recursively dereferences an address. For bare metal, it will stop when the address is not in any of vmmap pages to avoid redundant dereference.</p> </li> <li> <code>format</code> \u2013 <p>Recursively dereferences an address into string representation, or convert the list representation</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>LIMIT</code> \u2013 </li> <li> <code>c</code> \u2013 </li> <li> <code>config_arrow_left</code> \u2013 </li> <li> <code>config_arrow_right</code> \u2013 </li> <li> <code>config_contiguous</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/chain/#pwndbg.chain.LIMIT","title":"LIMIT <code>module-attribute</code>","text":"<pre><code>LIMIT = add_param(\n \"dereference-limit\", 5, \"max number of pointers to dereference in a chain\"\n)\n</code></pre>"},{"location":"reference/pwndbg/chain/#pwndbg.chain.c","title":"c <code>module-attribute</code>","text":"<pre><code>c = ColorConfig(\n \"chain\",\n [\n ColorParamSpec(\"arrow\", \"normal\", \"color of chain formatting (arrow)\"),\n ColorParamSpec(\n \"contiguous-marker\",\n \"normal\",\n \"color of chain formatting (contiguous marker)\",\n ),\n ],\n)\n</code></pre>"},{"location":"reference/pwndbg/chain/#pwndbg.chain.config_arrow_left","title":"config_arrow_left <code>module-attribute</code>","text":"<pre><code>config_arrow_left = add_param(\n \"chain-arrow-left\", \"\u25c2\u2014\", \"left arrow of chain formatting\"\n)\n</code></pre>"},{"location":"reference/pwndbg/chain/#pwndbg.chain.config_arrow_right","title":"config_arrow_right <code>module-attribute</code>","text":"<pre><code>config_arrow_right = add_param(\n \"chain-arrow-right\", \"\u2014\u25b8\", \"right arrow of chain formatting\"\n)\n</code></pre>"},{"location":"reference/pwndbg/chain/#pwndbg.chain.config_contiguous","title":"config_contiguous <code>module-attribute</code>","text":"<pre><code>config_contiguous = add_param(\n \"chain-contiguous-marker\", \"...\", \"contiguous marker of chain formatting\"\n)\n</code></pre>"},{"location":"reference/pwndbg/chain/#pwndbg.chain.get","title":"get","text":"<pre><code>get(\n address: int | None,\n limit: int = LIMIT,\n offset: int = 0,\n hard_stop: int | None = None,\n hard_end: int = 0,\n include_start: bool = True,\n safe_linking: bool = False,\n) -> list[int] | None\n</code></pre> <p>Recursively dereferences an address. For bare metal, it will stop when the address is not in any of vmmap pages to avoid redundant dereference.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int | None</code>) \u2013 <p>the first address to begin dereferencing</p> </li> <li> <code>limit</code> (<code>int</code>, default: <code>LIMIT</code> ) \u2013 <p>number of valid pointers</p> </li> <li> <code>offset</code> (<code>int</code>, default: <code>0</code> ) \u2013 <p>offset into the address to get the next pointer</p> </li> <li> <code>hard_stop</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>address to stop at</p> </li> <li> <code>hard_end</code> (<code>int</code>, default: <code>0</code> ) \u2013 <p>value to append when hard_stop is reached</p> </li> <li> <code>include_start</code> (<code>bool</code>, default: <code>True</code> ) \u2013 <p>whether to include starting address or not</p> </li> <li> <code>safe_linking</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>whether this chain use safe-linking</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>list[int] | None</code> \u2013 <p>A list representing pointers of each <code>address</code> and reference</p> </li> </ul>"},{"location":"reference/pwndbg/chain/#pwndbg.chain.format","title":"format","text":"<pre><code>format(\n value: int | list[int] | None,\n limit: int = LIMIT,\n code: bool = True,\n offset: int = 0,\n hard_stop: int | None = None,\n hard_end: int = 0,\n safe_linking: bool = False,\n enhance_string_len: int | None = None,\n) -> str\n</code></pre> <p>Recursively dereferences an address into string representation, or convert the list representation of address dereferences into string representation.</p> <p>Parameters:</p> <ul> <li> <code>value</code> (<code>int | list[int] | None</code>) \u2013 <p>Either the starting address to be sent to get, or the result of get (a list)</p> </li> <li> <code>limit</code> (<code>int</code>, default: <code>LIMIT</code> ) \u2013 <p>Number of valid pointers</p> </li> <li> <code>code</code> (<code>bool</code>, default: <code>True</code> ) \u2013 <p>Hint that indicates the value may be an instruction</p> </li> <li> <code>offset</code> (<code>int</code>, default: <code>0</code> ) \u2013 <p>Offset into the address to get the next pointer</p> </li> <li> <code>hard_stop</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>Value to stop on</p> </li> <li> <code>hard_end</code> (<code>int</code>, default: <code>0</code> ) \u2013 <p>Value to append when hard_stop is reached: null, value of hard stop, a string.</p> </li> <li> <code>safe_linking</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>whether this chain use safe-linking</p> </li> <li> <code>enhance_string_len</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>The length of string to display for enhancement of the last pointer</p> </li> </ul> <p>Returns: A string representing pointers of each address and reference Strings format: 0x0804a10 \u2014\u25b8 0x08061000 \u25c2\u2014 0x41414141</p>"},{"location":"reference/pwndbg/color/","title":"pwndbg.color","text":""},{"location":"reference/pwndbg/color/#pwndbg.color","title":"color","text":"<p>Modules:</p> <ul> <li> <code>context</code> \u2013 </li> <li> <code>disasm</code> \u2013 </li> <li> <code>enhance</code> \u2013 </li> <li> <code>hexdump</code> \u2013 </li> <li> <code>memory</code> \u2013 </li> <li> <code>message</code> \u2013 </li> <li> <code>syntax_highlight</code> \u2013 </li> <li> <code>telescope</code> \u2013 </li> <li> <code>theme</code> \u2013 </li> </ul> <p>Classes:</p> <ul> <li> <code>ColorParamSpec</code> \u2013 </li> <li> <code>ColorConfig</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>normal</code> \u2013 </li> <li> <code>black</code> \u2013 </li> <li> <code>red</code> \u2013 </li> <li> <code>green</code> \u2013 </li> <li> <code>yellow</code> \u2013 </li> <li> <code>blue</code> \u2013 </li> <li> <code>purple</code> \u2013 </li> <li> <code>cyan</code> \u2013 </li> <li> <code>light_gray</code> \u2013 </li> <li> <code>foreground</code> \u2013 </li> <li> <code>gray</code> \u2013 </li> <li> <code>light_red</code> \u2013 </li> <li> <code>light_green</code> \u2013 </li> <li> <code>light_yellow</code> \u2013 </li> <li> <code>light_blue</code> \u2013 </li> <li> <code>light_purple</code> \u2013 </li> <li> <code>light_cyan</code> \u2013 </li> <li> <code>white</code> \u2013 </li> <li> <code>bold</code> \u2013 </li> <li> <code>underline</code> \u2013 </li> <li> <code>colorize</code> \u2013 </li> <li> <code>unstylize</code> \u2013 </li> <li> <code>generateColorFunctionInner</code> \u2013 </li> <li> <code>generateColorFunction</code> \u2013 </li> <li> <code>strip</code> \u2013 </li> <li> <code>terminateWith</code> \u2013 </li> <li> <code>ljust_colored</code> \u2013 </li> <li> <code>rjust_colored</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>NORMAL</code> \u2013 </li> <li> <code>BLACK</code> \u2013 </li> <li> <code>RED</code> \u2013 </li> <li> <code>GREEN</code> \u2013 </li> <li> <code>YELLOW</code> \u2013 </li> <li> <code>BLUE</code> \u2013 </li> <li> <code>PURPLE</code> \u2013 </li> <li> <code>CYAN</code> \u2013 </li> <li> <code>LIGHT_GREY</code> \u2013 </li> <li> <code>LIGHT_GRAY</code> \u2013 </li> <li> <code>FOREGROUND</code> \u2013 </li> <li> <code>GREY</code> \u2013 </li> <li> <code>GRAY</code> \u2013 </li> <li> <code>LIGHT_RED</code> \u2013 </li> <li> <code>LIGHT_GREEN</code> \u2013 </li> <li> <code>LIGHT_YELLOW</code> \u2013 </li> <li> <code>LIGHT_BLUE</code> \u2013 </li> <li> <code>LIGHT_PURPLE</code> \u2013 </li> <li> <code>LIGHT_CYAN</code> \u2013 </li> <li> <code>WHITE</code> \u2013 </li> <li> <code>BOLD</code> \u2013 </li> <li> <code>UNDERLINE</code> \u2013 </li> <li> <code>none</code> \u2013 </li> <li> <code>ansi_escape_8bit</code> \u2013 </li> <li> <code>disable_colors</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/#pwndbg.color.NORMAL","title":"NORMAL <code>module-attribute</code>","text":"<pre><code>NORMAL = '\\x1b[0m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.BLACK","title":"BLACK <code>module-attribute</code>","text":"<pre><code>BLACK = '\\x1b[30m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.RED","title":"RED <code>module-attribute</code>","text":"<pre><code>RED = '\\x1b[31m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.GREEN","title":"GREEN <code>module-attribute</code>","text":"<pre><code>GREEN = '\\x1b[32m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.YELLOW","title":"YELLOW <code>module-attribute</code>","text":"<pre><code>YELLOW = '\\x1b[33m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.BLUE","title":"BLUE <code>module-attribute</code>","text":"<pre><code>BLUE = '\\x1b[34m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.PURPLE","title":"PURPLE <code>module-attribute</code>","text":"<pre><code>PURPLE = '\\x1b[35m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.CYAN","title":"CYAN <code>module-attribute</code>","text":"<pre><code>CYAN = '\\x1b[36m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_GREY","title":"LIGHT_GREY <code>module-attribute</code>","text":"<pre><code>LIGHT_GREY = '\\x1b[37m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_GRAY","title":"LIGHT_GRAY <code>module-attribute</code>","text":"<pre><code>LIGHT_GRAY = '\\x1b[37m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.FOREGROUND","title":"FOREGROUND <code>module-attribute</code>","text":"<pre><code>FOREGROUND = '\\x1b[39m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.GREY","title":"GREY <code>module-attribute</code>","text":"<pre><code>GREY = '\\x1b[90m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.GRAY","title":"GRAY <code>module-attribute</code>","text":"<pre><code>GRAY = '\\x1b[90m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_RED","title":"LIGHT_RED <code>module-attribute</code>","text":"<pre><code>LIGHT_RED = '\\x1b[91m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_GREEN","title":"LIGHT_GREEN <code>module-attribute</code>","text":"<pre><code>LIGHT_GREEN = '\\x1b[92m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_YELLOW","title":"LIGHT_YELLOW <code>module-attribute</code>","text":"<pre><code>LIGHT_YELLOW = '\\x1b[93m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_BLUE","title":"LIGHT_BLUE <code>module-attribute</code>","text":"<pre><code>LIGHT_BLUE = '\\x1b[94m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_PURPLE","title":"LIGHT_PURPLE <code>module-attribute</code>","text":"<pre><code>LIGHT_PURPLE = '\\x1b[95m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.LIGHT_CYAN","title":"LIGHT_CYAN <code>module-attribute</code>","text":"<pre><code>LIGHT_CYAN = '\\x1b[96m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.WHITE","title":"WHITE <code>module-attribute</code>","text":"<pre><code>WHITE = '\\x1b[97m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.BOLD","title":"BOLD <code>module-attribute</code>","text":"<pre><code>BOLD = '\\x1b[1m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.UNDERLINE","title":"UNDERLINE <code>module-attribute</code>","text":"<pre><code>UNDERLINE = '\\x1b[4m'\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.none","title":"none <code>module-attribute</code>","text":"<pre><code>none = str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.ansi_escape_8bit","title":"ansi_escape_8bit <code>module-attribute</code>","text":"<pre><code>ansi_escape_8bit = compile(\n \"(?:\\\\x1B[@-Z\\\\\\\\-_]|[\\\\x80-\\\\x9A\\\\x9C-\\\\x9F]|(?:\\\\x1B\\\\[|\\\\x9B)[0-?]*[ -/]*[@-~])\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.disable_colors","title":"disable_colors <code>module-attribute</code>","text":"<pre><code>disable_colors = add_param(\n \"disable-colors\",\n bool(get(\"PWNDBG_DISABLE_COLORS\")),\n \"whether to color the output or not\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.ColorParamSpec","title":"ColorParamSpec","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>default</code> (<code>str</code>) \u2013 </li> <li> <code>doc</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/#pwndbg.color.ColorParamSpec.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.ColorParamSpec.default","title":"default <code>instance-attribute</code>","text":"<pre><code>default: str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.ColorParamSpec.doc","title":"doc <code>instance-attribute</code>","text":"<pre><code>doc: str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.ColorConfig","title":"ColorConfig","text":"<pre><code>ColorConfig(namespace: str, params: list[ColorParamSpec])\n</code></pre> <p>Methods:</p> <ul> <li> <code>__getattr__</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/#pwndbg.color.ColorConfig.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(attr: str) -> Callable[[str], str]\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.normal","title":"normal","text":"<pre><code>normal(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.black","title":"black","text":"<pre><code>black(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.red","title":"red","text":"<pre><code>red(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.green","title":"green","text":"<pre><code>green(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.yellow","title":"yellow","text":"<pre><code>yellow(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.blue","title":"blue","text":"<pre><code>blue(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.purple","title":"purple","text":"<pre><code>purple(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.cyan","title":"cyan","text":"<pre><code>cyan(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_gray","title":"light_gray","text":"<pre><code>light_gray(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.foreground","title":"foreground","text":"<pre><code>foreground(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.gray","title":"gray","text":"<pre><code>gray(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_red","title":"light_red","text":"<pre><code>light_red(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_green","title":"light_green","text":"<pre><code>light_green(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_yellow","title":"light_yellow","text":"<pre><code>light_yellow(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_blue","title":"light_blue","text":"<pre><code>light_blue(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_purple","title":"light_purple","text":"<pre><code>light_purple(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_cyan","title":"light_cyan","text":"<pre><code>light_cyan(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.white","title":"white","text":"<pre><code>white(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.bold","title":"bold","text":"<pre><code>bold(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.underline","title":"underline","text":"<pre><code>underline(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.colorize","title":"colorize","text":"<pre><code>colorize(x: str, color: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.unstylize","title":"unstylize","text":"<pre><code>unstylize(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.generateColorFunctionInner","title":"generateColorFunctionInner","text":"<pre><code>generateColorFunctionInner(\n old: Callable[[object], str], new: Callable[[str], str]\n) -> Callable[[object], str]\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.generateColorFunction","title":"generateColorFunction","text":"<pre><code>generateColorFunction(\n config: str | Parameter,\n _globals: dict[str, Callable[[str], str]] = globals(),\n) -> Callable[[object], str]\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.strip","title":"strip","text":"<pre><code>strip(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.terminateWith","title":"terminateWith","text":"<pre><code>terminateWith(x: str, color: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.ljust_colored","title":"ljust_colored","text":"<pre><code>ljust_colored(x: str, length: int, char: str = ' ') -> str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.rjust_colored","title":"rjust_colored","text":"<pre><code>rjust_colored(x: str, length: int, char: str = ' ')\n</code></pre>"},{"location":"reference/pwndbg/color/context/","title":"pwndbg.color.context","text":""},{"location":"reference/pwndbg/color/context/#pwndbg.color.context","title":"context","text":"<p>Functions:</p> <ul> <li> <code>prefix</code> \u2013 </li> <li> <code>highlight</code> \u2013 </li> <li> <code>register</code> \u2013 </li> <li> <code>register_changed</code> \u2013 </li> <li> <code>flag_bracket</code> \u2013 </li> <li> <code>flag_value</code> \u2013 </li> <li> <code>flag_set</code> \u2013 </li> <li> <code>flag_unset</code> \u2013 </li> <li> <code>flag_changed</code> \u2013 </li> <li> <code>banner</code> \u2013 </li> <li> <code>banner_title</code> \u2013 </li> <li> <code>comment</code> \u2013 </li> <li> <code>format_flags</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>config_prefix_color</code> \u2013 </li> <li> <code>config_highlight_color</code> \u2013 </li> <li> <code>config_register_color</code> \u2013 </li> <li> <code>config_flag_value_color</code> \u2013 </li> <li> <code>config_flag_bracket_color</code> \u2013 </li> <li> <code>config_flag_set_color</code> \u2013 </li> <li> <code>config_flag_unset_color</code> \u2013 </li> <li> <code>config_flag_changed_color</code> \u2013 </li> <li> <code>config_banner_color</code> \u2013 </li> <li> <code>config_banner_title</code> \u2013 </li> <li> <code>config_register_changed_color</code> \u2013 </li> <li> <code>config_register_changed_marker</code> \u2013 </li> <li> <code>config_comment</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_prefix_color","title":"config_prefix_color <code>module-attribute</code>","text":"<pre><code>config_prefix_color = add_color_param(\n \"code-prefix-color\",\n \"none\",\n \"color for 'context code' command (prefix marker)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_highlight_color","title":"config_highlight_color <code>module-attribute</code>","text":"<pre><code>config_highlight_color = add_color_param(\n \"highlight-color\", \"green,bold\", \"color added to highlights like source/pc\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_register_color","title":"config_register_color <code>module-attribute</code>","text":"<pre><code>config_register_color = add_color_param(\n \"context-register-color\", \"bold\", \"color for registers label\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_flag_value_color","title":"config_flag_value_color <code>module-attribute</code>","text":"<pre><code>config_flag_value_color = add_color_param(\n \"context-flag-value-color\",\n \"none\",\n \"color for flags register (register value)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_flag_bracket_color","title":"config_flag_bracket_color <code>module-attribute</code>","text":"<pre><code>config_flag_bracket_color = add_color_param(\n \"context-flag-bracket-color\", \"none\", \"color for flags register (bracket)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_flag_set_color","title":"config_flag_set_color <code>module-attribute</code>","text":"<pre><code>config_flag_set_color = add_color_param(\n \"context-flag-set-color\",\n \"green,bold\",\n \"color for flags register (flag set)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_flag_unset_color","title":"config_flag_unset_color <code>module-attribute</code>","text":"<pre><code>config_flag_unset_color = add_color_param(\n \"context-flag-unset-color\", \"red\", \"color for flags register (flag unset)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_flag_changed_color","title":"config_flag_changed_color <code>module-attribute</code>","text":"<pre><code>config_flag_changed_color = add_color_param(\n \"context-flag-changed-color\",\n \"underline\",\n \"color for flags register (flag changed)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_banner_color","title":"config_banner_color <code>module-attribute</code>","text":"<pre><code>config_banner_color = add_color_param(\n \"banner-color\", \"blue\", \"color for banner line\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_banner_title","title":"config_banner_title <code>module-attribute</code>","text":"<pre><code>config_banner_title = add_color_param(\n \"banner-title-color\", \"none\", \"color for banner title\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_register_changed_color","title":"config_register_changed_color <code>module-attribute</code>","text":"<pre><code>config_register_changed_color = add_color_param(\n \"context-register-changed-color\",\n \"red\",\n \"color for registers label (change marker)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_register_changed_marker","title":"config_register_changed_marker <code>module-attribute</code>","text":"<pre><code>config_register_changed_marker = add_param(\n \"context-register-changed-marker\", \"*\", \"change marker for registers label\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.config_comment","title":"config_comment <code>module-attribute</code>","text":"<pre><code>config_comment = add_color_param('comment-color', 'gray', 'color for comment')\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.prefix","title":"prefix","text":"<pre><code>prefix(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.highlight","title":"highlight","text":"<pre><code>highlight(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.register","title":"register","text":"<pre><code>register(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.register_changed","title":"register_changed","text":"<pre><code>register_changed(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_bracket","title":"flag_bracket","text":"<pre><code>flag_bracket(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_value","title":"flag_value","text":"<pre><code>flag_value(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_set","title":"flag_set","text":"<pre><code>flag_set(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_unset","title":"flag_unset","text":"<pre><code>flag_unset(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_changed","title":"flag_changed","text":"<pre><code>flag_changed(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.banner","title":"banner","text":"<pre><code>banner(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.banner_title","title":"banner_title","text":"<pre><code>banner_title(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.comment","title":"comment","text":"<pre><code>comment(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.format_flags","title":"format_flags","text":"<pre><code>format_flags(value: int | None, flags: BitFlags, last: int | None = None)\n</code></pre>"},{"location":"reference/pwndbg/color/disasm/","title":"pwndbg.color.disasm","text":""},{"location":"reference/pwndbg/color/disasm/#pwndbg.color.disasm","title":"disasm","text":"<p>Functions:</p> <ul> <li> <code>one_instruction</code> \u2013 </li> <li> <code>instructions_and_padding</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>c</code> \u2013 </li> <li> <code>MIN_SPACING</code> \u2013 </li> <li> <code>WHITESPACE_LIMIT</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/disasm/#pwndbg.color.disasm.c","title":"c <code>module-attribute</code>","text":"<pre><code>c = ColorConfig(\n \"disasm\",\n [\n ColorParamSpec(\n \"branch\", \"bold\", \"color for disasm (branch/call instruction)\"\n )\n ],\n)\n</code></pre>"},{"location":"reference/pwndbg/color/disasm/#pwndbg.color.disasm.MIN_SPACING","title":"MIN_SPACING <code>module-attribute</code>","text":"<pre><code>MIN_SPACING = 5\n</code></pre>"},{"location":"reference/pwndbg/color/disasm/#pwndbg.color.disasm.WHITESPACE_LIMIT","title":"WHITESPACE_LIMIT <code>module-attribute</code>","text":"<pre><code>WHITESPACE_LIMIT = 20\n</code></pre>"},{"location":"reference/pwndbg/color/disasm/#pwndbg.color.disasm.one_instruction","title":"one_instruction","text":"<pre><code>one_instruction(ins: PwndbgInstruction) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/disasm/#pwndbg.color.disasm.instructions_and_padding","title":"instructions_and_padding","text":"<pre><code>instructions_and_padding(instructions: list[PwndbgInstruction]) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/","title":"pwndbg.color.enhance","text":""},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance","title":"enhance","text":"<p>Functions:</p> <ul> <li> <code>integer</code> \u2013 </li> <li> <code>string</code> \u2013 </li> <li> <code>comment</code> \u2013 </li> <li> <code>unknown</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>config_integer_color</code> \u2013 </li> <li> <code>config_string_color</code> \u2013 </li> <li> <code>config_comment_color</code> \u2013 </li> <li> <code>config_unknown_color</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.config_integer_color","title":"config_integer_color <code>module-attribute</code>","text":"<pre><code>config_integer_color = add_color_param(\n \"enhance-integer-value-color\", \"none\", \"color of value enhance (integer)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.config_string_color","title":"config_string_color <code>module-attribute</code>","text":"<pre><code>config_string_color = add_color_param(\n \"enhance-string-value-color\", \"none\", \"color of value enhance (string)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.config_comment_color","title":"config_comment_color <code>module-attribute</code>","text":"<pre><code>config_comment_color = add_color_param(\n \"enhance-comment-color\", \"none\", \"color of value enhance (comment)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.config_unknown_color","title":"config_unknown_color <code>module-attribute</code>","text":"<pre><code>config_unknown_color = add_color_param(\n \"enhance-unknown-color\", \"none\", \"color of value enhance (unknown value)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.integer","title":"integer","text":"<pre><code>integer(x)\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.string","title":"string","text":"<pre><code>string(x)\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.comment","title":"comment","text":"<pre><code>comment(x)\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/#pwndbg.color.enhance.unknown","title":"unknown","text":"<pre><code>unknown(x)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/","title":"pwndbg.color.hexdump","text":""},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump","title":"hexdump","text":"<p>Functions:</p> <ul> <li> <code>normal</code> \u2013 </li> <li> <code>printable</code> \u2013 </li> <li> <code>zero</code> \u2013 </li> <li> <code>special</code> \u2013 </li> <li> <code>offset</code> \u2013 </li> <li> <code>address</code> \u2013 </li> <li> <code>separator</code> \u2013 </li> <li> <code>highlight_group_lsb</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>config_normal</code> \u2013 </li> <li> <code>config_printable</code> \u2013 </li> <li> <code>config_zero</code> \u2013 </li> <li> <code>config_special</code> \u2013 </li> <li> <code>config_offset</code> \u2013 </li> <li> <code>config_address</code> \u2013 </li> <li> <code>config_separator</code> \u2013 </li> <li> <code>config_highlight_group_lsb</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_normal","title":"config_normal <code>module-attribute</code>","text":"<pre><code>config_normal = add_color_param(\n \"hexdump-normal-color\", \"none\", \"color for hexdump command (normal bytes)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_printable","title":"config_printable <code>module-attribute</code>","text":"<pre><code>config_printable = add_color_param(\n \"hexdump-printable-color\",\n \"bold\",\n \"color for hexdump command (printable characters)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_zero","title":"config_zero <code>module-attribute</code>","text":"<pre><code>config_zero = add_color_param(\n \"hexdump-zero-color\", \"red\", \"color for hexdump command (zero bytes)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_special","title":"config_special <code>module-attribute</code>","text":"<pre><code>config_special = add_color_param(\n \"hexdump-special-color\",\n \"yellow\",\n \"color for hexdump command (special bytes)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_offset","title":"config_offset <code>module-attribute</code>","text":"<pre><code>config_offset = add_color_param(\n \"hexdump-offset-color\", \"none\", \"color for hexdump command (offset label)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_address","title":"config_address <code>module-attribute</code>","text":"<pre><code>config_address = add_color_param(\n \"hexdump-address-color\", \"none\", \"color for hexdump command (address label)\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_separator","title":"config_separator <code>module-attribute</code>","text":"<pre><code>config_separator = add_color_param(\n \"hexdump-separator-color\",\n \"none\",\n \"color for hexdump command (group separator)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.config_highlight_group_lsb","title":"config_highlight_group_lsb <code>module-attribute</code>","text":"<pre><code>config_highlight_group_lsb = add_param(\n \"hexdump-highlight-group-lsb\",\n \"underline\",\n \"highlight LSB of each group\",\n help_docstring=\"Applies only if hexdump-use-big-endian actually changes byte order.\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.normal","title":"normal","text":"<pre><code>normal(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.printable","title":"printable","text":"<pre><code>printable(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.zero","title":"zero","text":"<pre><code>zero(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.special","title":"special","text":"<pre><code>special(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.offset","title":"offset","text":"<pre><code>offset(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.address","title":"address","text":"<pre><code>address(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.separator","title":"separator","text":"<pre><code>separator(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.highlight_group_lsb","title":"highlight_group_lsb","text":"<pre><code>highlight_group_lsb(x: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/memory/","title":"pwndbg.color.memory","text":""},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory","title":"memory","text":"<p>Functions:</p> <ul> <li> <code>get_address_and_symbol</code> \u2013 <p>Convert and colorize address 0x7ffff7fcecd0 to string <code>0x7ffff7fcecd0 (_dl_fini)</code></p> </li> <li> <code>get_address_or_symbol</code> \u2013 <p>Convert and colorize address to symbol if it can be resolved, else return colorized address</p> </li> <li> <code>attempt_colorized_symbol</code> \u2013 <p>Convert address to colorized symbol (if symbol is there), else None</p> </li> <li> <code>get</code> \u2013 <p>Returns a colorized string representing the provided address.</p> </li> <li> <code>legend</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ColorFunction</code> \u2013 </li> <li> <code>c</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory.ColorFunction","title":"ColorFunction <code>module-attribute</code>","text":"<pre><code>ColorFunction = Callable[[str], str]\n</code></pre>"},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory.c","title":"c <code>module-attribute</code>","text":"<pre><code>c = ColorConfig(\n \"memory\",\n [\n ColorParamSpec(\"stack\", \"yellow\", \"color for stack memory\"),\n ColorParamSpec(\"heap\", \"blue\", \"color for heap memory\"),\n ColorParamSpec(\"code\", \"red\", \"color for executable memory\"),\n ColorParamSpec(\"data\", \"purple\", \"color for all other writable memory\"),\n ColorParamSpec(\"rodata\", \"normal\", \"color for all read only memory\"),\n ColorParamSpec(\"wx\", \"underline\", \"color added to all WX memory\"),\n ColorParamSpec(\n \"guard\", \"cyan\", \"color added to all guard pages (no perms)\"\n ),\n ],\n)\n</code></pre>"},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory.get_address_and_symbol","title":"get_address_and_symbol","text":"<pre><code>get_address_and_symbol(address: int) -> str\n</code></pre> <p>Convert and colorize address 0x7ffff7fcecd0 to string <code>0x7ffff7fcecd0 (_dl_fini)</code> If no symbol exists for the address, return colorized address</p>"},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory.get_address_or_symbol","title":"get_address_or_symbol","text":"<pre><code>get_address_or_symbol(address: int) -> str\n</code></pre> <p>Convert and colorize address to symbol if it can be resolved, else return colorized address</p>"},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory.attempt_colorized_symbol","title":"attempt_colorized_symbol","text":"<pre><code>attempt_colorized_symbol(address: int) -> str | None\n</code></pre> <p>Convert address to colorized symbol (if symbol is there), else None</p>"},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory.get","title":"get","text":"<pre><code>get(\n address: int | Value | Any,\n text: str | None = None,\n prefix: str | None = None,\n) -> str\n</code></pre> <p>Returns a colorized string representing the provided address.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int | Value | Any</code>) \u2013 <p>Address to look up</p> </li> <li> <code>text</code> (<code>str | None</code>, default: <code>None</code> ) \u2013 <p>Optional text to use in place of the address in the return value string.</p> </li> <li> <code>prefix</code> (<code>str | None</code>, default: <code>None</code> ) \u2013 <p>Optional text to set at beginning in the return value string.</p> </li> </ul>"},{"location":"reference/pwndbg/color/memory/#pwndbg.color.memory.legend","title":"legend","text":"<pre><code>legend()\n</code></pre>"},{"location":"reference/pwndbg/color/message/","title":"pwndbg.color.message","text":""},{"location":"reference/pwndbg/color/message/#pwndbg.color.message","title":"message","text":"<p>Functions:</p> <ul> <li> <code>on</code> \u2013 </li> <li> <code>off</code> \u2013 </li> <li> <code>notice</code> \u2013 </li> <li> <code>hint</code> \u2013 </li> <li> <code>success</code> \u2013 </li> <li> <code>debug</code> \u2013 </li> <li> <code>info</code> \u2013 </li> <li> <code>warn</code> \u2013 </li> <li> <code>error</code> \u2013 </li> <li> <code>system</code> \u2013 </li> <li> <code>exit</code> \u2013 </li> <li> <code>breakpoint</code> \u2013 </li> <li> <code>signal</code> \u2013 </li> <li> <code>prompt</code> \u2013 </li> <li> <code>alive_prompt</code> \u2013 </li> <li> <code>readline_escape</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>config_status_on_color</code> \u2013 </li> <li> <code>config_status_off_color</code> \u2013 </li> <li> <code>config_notice_color</code> \u2013 </li> <li> <code>config_hint_color</code> \u2013 </li> <li> <code>config_success_color</code> \u2013 </li> <li> <code>config_debug_color</code> \u2013 </li> <li> <code>config_info_color</code> \u2013 </li> <li> <code>config_warning_color</code> \u2013 </li> <li> <code>config_error_color</code> \u2013 </li> <li> <code>config_system_color</code> \u2013 </li> <li> <code>config_exit_color</code> \u2013 </li> <li> <code>config_breakpoint_color</code> \u2013 </li> <li> <code>config_signal_color</code> \u2013 </li> <li> <code>config_prompt_color</code> (<code>Parameter</code>) \u2013 </li> <li> <code>config_prompt_alive_color</code> (<code>Parameter</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_status_on_color","title":"config_status_on_color <code>module-attribute</code>","text":"<pre><code>config_status_on_color = add_color_param(\n \"message-status-on-color\", \"green\", \"color of on status messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_status_off_color","title":"config_status_off_color <code>module-attribute</code>","text":"<pre><code>config_status_off_color = add_color_param(\n \"message-status-off-color\", \"red\", \"color of off status messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_notice_color","title":"config_notice_color <code>module-attribute</code>","text":"<pre><code>config_notice_color = add_color_param(\n \"message-notice-color\", \"purple\", \"color of notice messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_hint_color","title":"config_hint_color <code>module-attribute</code>","text":"<pre><code>config_hint_color = add_color_param(\n \"message-hint-color\", \"yellow\", \"color of hint and marker messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_success_color","title":"config_success_color <code>module-attribute</code>","text":"<pre><code>config_success_color = add_color_param(\n \"message-success-color\", \"green\", \"color of success messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_debug_color","title":"config_debug_color <code>module-attribute</code>","text":"<pre><code>config_debug_color = add_color_param(\n \"message-debug-color\", \"blue\", \"color of debug messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_info_color","title":"config_info_color <code>module-attribute</code>","text":"<pre><code>config_info_color = add_color_param(\n \"message-info-color\", \"white\", \"color of info messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_warning_color","title":"config_warning_color <code>module-attribute</code>","text":"<pre><code>config_warning_color = add_color_param(\n \"message-warning-color\", \"yellow\", \"color of warning messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_error_color","title":"config_error_color <code>module-attribute</code>","text":"<pre><code>config_error_color = add_color_param(\n \"message-error-color\", \"red\", \"color of error messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_system_color","title":"config_system_color <code>module-attribute</code>","text":"<pre><code>config_system_color = add_color_param(\n \"message-system-color\", \"light-red\", \"color of system messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_exit_color","title":"config_exit_color <code>module-attribute</code>","text":"<pre><code>config_exit_color = add_color_param(\n \"message-exit-color\", \"red\", \"color of exit messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_breakpoint_color","title":"config_breakpoint_color <code>module-attribute</code>","text":"<pre><code>config_breakpoint_color = add_color_param(\n \"message-breakpoint-color\", \"yellow\", \"color of breakpoint messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_signal_color","title":"config_signal_color <code>module-attribute</code>","text":"<pre><code>config_signal_color = add_color_param(\n \"message-signal-color\", \"bold,red\", \"color of signal messages\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_prompt_color","title":"config_prompt_color <code>module-attribute</code>","text":"<pre><code>config_prompt_color: Parameter = add_color_param(\n \"prompt-color\", \"bold,red\", \"prompt color\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.config_prompt_alive_color","title":"config_prompt_alive_color <code>module-attribute</code>","text":"<pre><code>config_prompt_alive_color: Parameter = add_color_param(\n \"prompt-alive-color\", \"bold,green\", \"prompt alive color\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.on","title":"on","text":"<pre><code>on(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.off","title":"off","text":"<pre><code>off(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.notice","title":"notice","text":"<pre><code>notice(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.hint","title":"hint","text":"<pre><code>hint(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.success","title":"success","text":"<pre><code>success(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.debug","title":"debug","text":"<pre><code>debug(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.info","title":"info","text":"<pre><code>info(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.warn","title":"warn","text":"<pre><code>warn(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.error","title":"error","text":"<pre><code>error(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.system","title":"system","text":"<pre><code>system(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.exit","title":"exit","text":"<pre><code>exit(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.breakpoint","title":"breakpoint","text":"<pre><code>breakpoint(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.signal","title":"signal","text":"<pre><code>signal(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.prompt","title":"prompt","text":"<pre><code>prompt(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.alive_prompt","title":"alive_prompt","text":"<pre><code>alive_prompt(msg: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.readline_escape","title":"readline_escape","text":"<pre><code>readline_escape(func_message: Callable[[str], str], text: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/syntax_highlight/","title":"pwndbg.color.syntax_highlight","text":""},{"location":"reference/pwndbg/color/syntax_highlight/#pwndbg.color.syntax_highlight","title":"syntax_highlight","text":"<p>Functions:</p> <ul> <li> <code>check_style</code> \u2013 </li> <li> <code>syntax_highlight</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>style</code> \u2013 </li> <li> <code>formatter</code> \u2013 </li> <li> <code>pwntools_lexer</code> \u2013 </li> <li> <code>lexer_cache</code> (<code>dict[str, Any]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/syntax_highlight/#pwndbg.color.syntax_highlight.style","title":"style <code>module-attribute</code>","text":"<pre><code>style = add_param(\n \"syntax-highlight-style\",\n \"monokai\",\n \"source code / assembly syntax highlight stylename of pygments module\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/syntax_highlight/#pwndbg.color.syntax_highlight.formatter","title":"formatter <code>module-attribute</code>","text":"<pre><code>formatter = Terminal256Formatter(style=str(style))\n</code></pre>"},{"location":"reference/pwndbg/color/syntax_highlight/#pwndbg.color.syntax_highlight.pwntools_lexer","title":"pwntools_lexer <code>module-attribute</code>","text":"<pre><code>pwntools_lexer = PwntoolsLexer()\n</code></pre>"},{"location":"reference/pwndbg/color/syntax_highlight/#pwndbg.color.syntax_highlight.lexer_cache","title":"lexer_cache <code>module-attribute</code>","text":"<pre><code>lexer_cache: dict[str, Any] = {}\n</code></pre>"},{"location":"reference/pwndbg/color/syntax_highlight/#pwndbg.color.syntax_highlight.check_style","title":"check_style","text":"<pre><code>check_style() -> None\n</code></pre>"},{"location":"reference/pwndbg/color/syntax_highlight/#pwndbg.color.syntax_highlight.syntax_highlight","title":"syntax_highlight","text":"<pre><code>syntax_highlight(code: str, filename: str = '.asm') -> str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/","title":"pwndbg.color.telescope","text":""},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope","title":"telescope","text":"<p>Functions:</p> <ul> <li> <code>offset</code> \u2013 </li> <li> <code>register</code> \u2013 </li> <li> <code>separator</code> \u2013 </li> <li> <code>delimiter</code> \u2013 </li> <li> <code>repeating_marker</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>offset_color</code> \u2013 </li> <li> <code>register_color</code> \u2013 </li> <li> <code>offset_separator_color</code> \u2013 </li> <li> <code>offset_delimiter_color</code> \u2013 </li> <li> <code>repeating_marker_color</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.offset_color","title":"offset_color <code>module-attribute</code>","text":"<pre><code>offset_color = add_color_param(\n \"telescope-offset-color\",\n \"normal\",\n \"color of the telescope command (offset prefix)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.register_color","title":"register_color <code>module-attribute</code>","text":"<pre><code>register_color = add_color_param(\n \"telescope-register-color\",\n \"bold\",\n \"color of the telescope command (register)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.offset_separator_color","title":"offset_separator_color <code>module-attribute</code>","text":"<pre><code>offset_separator_color = add_color_param(\n \"telescope-offset-separator-color\",\n \"normal\",\n \"color of the telescope command (offset separator)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.offset_delimiter_color","title":"offset_delimiter_color <code>module-attribute</code>","text":"<pre><code>offset_delimiter_color = add_color_param(\n \"telescope-offset-delimiter-color\",\n \"normal\",\n \"color of the telescope command (offset delimiter)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.repeating_marker_color","title":"repeating_marker_color <code>module-attribute</code>","text":"<pre><code>repeating_marker_color = add_color_param(\n \"telescope-repeating-marker-color\",\n \"normal\",\n \"color of the telescope command (repeating values marker)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.offset","title":"offset","text":"<pre><code>offset(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.register","title":"register","text":"<pre><code>register(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.separator","title":"separator","text":"<pre><code>separator(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.delimiter","title":"delimiter","text":"<pre><code>delimiter(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.repeating_marker","title":"repeating_marker","text":"<pre><code>repeating_marker(x: object) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/","title":"pwndbg.color.theme","text":""},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme","title":"theme","text":"<p>Classes:</p> <ul> <li> <code>ColorParameter</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>add_param</code> \u2013 </li> <li> <code>add_color_param</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter","title":"ColorParameter","text":"<pre><code>ColorParameter(\n name: str,\n default: Any,\n set_show_doc: str,\n *,\n help_docstring: str = \"\",\n param_class: int | None = None,\n enum_sequence: Sequence[str] | None = None,\n scope: str = \"config\",\n)\n</code></pre> <p> Bases: <code>Parameter</code></p> <p>Methods:</p> <ul> <li> <code>add_update_listener</code> \u2013 </li> <li> <code>revert_default</code> \u2013 </li> <li> <code>attr_name</code> \u2013 <p>Returns the attribute name associated with this config option,</p> </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>pretty_val</code> \u2013 <p>Convert a value this object could contain to its pretty string representation.</p> </li> <li> <code>pretty</code> \u2013 </li> <li> <code>pretty_default</code> \u2013 </li> <li> <code>__int__</code> \u2013 </li> <li> <code>__str__</code> \u2013 </li> <li> <code>__bool__</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>__lt__</code> \u2013 </li> <li> <code>__add__</code> \u2013 </li> <li> <code>__radd__</code> \u2013 </li> <li> <code>__sub__</code> \u2013 </li> <li> <code>__rsub__</code> \u2013 </li> <li> <code>__mul__</code> \u2013 </li> <li> <code>__rmul__</code> \u2013 </li> <li> <code>__div__</code> \u2013 </li> <li> <code>__floordiv__</code> \u2013 </li> <li> <code>__pow__</code> \u2013 </li> <li> <code>__mod__</code> \u2013 </li> <li> <code>__len__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>name</code> \u2013 </li> <li> <code>default</code> \u2013 </li> <li> <code>param_class</code> \u2013 </li> <li> <code>set_show_doc</code> \u2013 </li> <li> <code>help_docstring</code> \u2013 </li> <li> <code>enum_sequence</code> \u2013 </li> <li> <code>scope</code> \u2013 </li> <li> <code>update_listeners</code> (<code>list[Callable[[Any], None]]</code>) \u2013 </li> <li> <code>value</code> (<code>Any</code>) \u2013 </li> <li> <code>is_changed</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name = name\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.default","title":"default <code>instance-attribute</code>","text":"<pre><code>default = default\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.param_class","title":"param_class <code>instance-attribute</code>","text":"<pre><code>param_class = param_class or PARAM_CLASSES[type(default)]\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.set_show_doc","title":"set_show_doc <code>instance-attribute</code>","text":"<pre><code>set_show_doc = strip()\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.help_docstring","title":"help_docstring <code>instance-attribute</code>","text":"<pre><code>help_docstring = strip()\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.enum_sequence","title":"enum_sequence <code>instance-attribute</code>","text":"<pre><code>enum_sequence = enum_sequence\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.scope","title":"scope <code>instance-attribute</code>","text":"<pre><code>scope = scope\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.update_listeners","title":"update_listeners <code>instance-attribute</code>","text":"<pre><code>update_listeners: list[Callable[[Any], None]] = []\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.value","title":"value <code>property</code> <code>writable</code>","text":"<pre><code>value: Any\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.is_changed","title":"is_changed <code>property</code>","text":"<pre><code>is_changed: bool\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.add_update_listener","title":"add_update_listener","text":"<pre><code>add_update_listener(listener: Callable[[Any], None]) -> None\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.revert_default","title":"revert_default","text":"<pre><code>revert_default() -> None\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.attr_name","title":"attr_name","text":"<pre><code>attr_name() -> str\n</code></pre> <p>Returns the attribute name associated with this config option, i.e. <code>my-config</code> has the attribute name <code>my_config</code></p>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.pretty_val","title":"pretty_val","text":"<pre><code>pretty_val(val: Any) -> str\n</code></pre> <p>Convert a value this object could contain to its pretty string representation.</p>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.pretty","title":"pretty","text":"<pre><code>pretty() -> str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.pretty_default","title":"pretty_default","text":"<pre><code>pretty_default() -> str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__bool__","title":"__bool__","text":"<pre><code>__bool__() -> bool\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__lt__","title":"__lt__","text":"<pre><code>__lt__(other: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__add__","title":"__add__","text":"<pre><code>__add__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__radd__","title":"__radd__","text":"<pre><code>__radd__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__sub__","title":"__sub__","text":"<pre><code>__sub__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__rsub__","title":"__rsub__","text":"<pre><code>__rsub__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__mul__","title":"__mul__","text":"<pre><code>__mul__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__rmul__","title":"__rmul__","text":"<pre><code>__rmul__(other: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__div__","title":"__div__","text":"<pre><code>__div__(other: float) -> float\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__floordiv__","title":"__floordiv__","text":"<pre><code>__floordiv__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__pow__","title":"__pow__","text":"<pre><code>__pow__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__mod__","title":"__mod__","text":"<pre><code>__mod__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__len__","title":"__len__","text":"<pre><code>__len__() -> int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.add_param","title":"add_param","text":"<pre><code>add_param(\n name: str,\n default: Any,\n set_show_doc: str,\n color_param: bool = False,\n *,\n help_docstring: str = \"\",\n) -> Parameter\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.add_color_param","title":"add_color_param","text":"<pre><code>add_color_param(name: str, default: Any, set_show_doc: str) -> Parameter\n</code></pre>"},{"location":"reference/pwndbg/commands/","title":"pwndbg.commands","text":""},{"location":"reference/pwndbg/commands/#pwndbg.commands","title":"commands","text":"<p>Modules:</p> <ul> <li> <code>ai</code> \u2013 <p>This command sends information on the current debugging context to OpenAI's</p> </li> <li> <code>argv</code> \u2013 </li> <li> <code>aslr</code> \u2013 </li> <li> <code>asm</code> \u2013 </li> <li> <code>attachp</code> \u2013 </li> <li> <code>auxv</code> \u2013 </li> <li> <code>binder</code> \u2013 </li> <li> <code>binja</code> \u2013 </li> <li> <code>binja_functions</code> \u2013 </li> <li> <code>branch</code> \u2013 </li> <li> <code>canary</code> \u2013 </li> <li> <code>checksec</code> \u2013 </li> <li> <code>comments</code> \u2013 </li> <li> <code>config</code> \u2013 <p>Dumps all pwndbg-specific configuration points.</p> </li> <li> <code>context</code> \u2013 </li> <li> <code>cpsr</code> \u2013 </li> <li> <code>cyclic</code> \u2013 </li> <li> <code>cymbol</code> \u2013 <p>Add, load, show, edit, or delete symbols for custom structures.</p> </li> <li> <code>dev</code> \u2013 </li> <li> <code>distance</code> \u2013 </li> <li> <code>dt</code> \u2013 </li> <li> <code>dumpargs</code> \u2013 </li> <li> <code>elf</code> \u2013 </li> <li> <code>flags</code> \u2013 </li> <li> <code>gdt</code> \u2013 </li> <li> <code>ghidra</code> \u2013 </li> <li> <code>godbg</code> \u2013 </li> <li> <code>got</code> \u2013 </li> <li> <code>got_tracking</code> \u2013 </li> <li> <code>hex2ptr</code> \u2013 </li> <li> <code>hexdump</code> \u2013 </li> <li> <code>hijack_fd</code> \u2013 </li> <li> <code>ida</code> \u2013 </li> <li> <code>ignore</code> \u2013 <p>Ignoring a breakpoint</p> </li> <li> <code>integration</code> \u2013 </li> <li> <code>ipython_interactive</code> \u2013 <p>Command to start an interactive IPython prompt.</p> </li> <li> <code>jemalloc</code> \u2013 </li> <li> <code>kbase</code> \u2013 </li> <li> <code>kchecksec</code> \u2013 </li> <li> <code>kcmdline</code> \u2013 </li> <li> <code>kconfig</code> \u2013 </li> <li> <code>killthreads</code> \u2013 </li> <li> <code>klookup</code> \u2013 </li> <li> <code>knft</code> \u2013 </li> <li> <code>kversion</code> \u2013 </li> <li> <code>leakfind</code> \u2013 <p>Find a chain of leaks given some starting address.</p> </li> <li> <code>libcinfo</code> \u2013 </li> <li> <code>linkmap</code> \u2013 </li> <li> <code>memoize</code> \u2013 </li> <li> <code>misc</code> \u2013 </li> <li> <code>mmap</code> \u2013 </li> <li> <code>mprotect</code> \u2013 </li> <li> <code>nearpc</code> \u2013 </li> <li> <code>next</code> \u2013 <p>Stepping until an event occurs</p> </li> <li> <code>onegadget</code> \u2013 </li> <li> <code>p2p</code> \u2013 </li> <li> <code>patch</code> \u2013 </li> <li> <code>pcplist</code> \u2013 </li> <li> <code>peda</code> \u2013 </li> <li> <code>pie</code> \u2013 </li> <li> <code>plist</code> \u2013 </li> <li> <code>probeleak</code> \u2013 </li> <li> <code>procinfo</code> \u2013 </li> <li> <code>profiler</code> \u2013 <p>Utilities for profiling pwndbg.</p> </li> <li> <code>ptmalloc2</code> \u2013 </li> <li> <code>ptmalloc2_tracking</code> \u2013 </li> <li> <code>radare2</code> \u2013 </li> <li> <code>reload</code> \u2013 </li> <li> <code>retaddr</code> \u2013 </li> <li> <code>rizin</code> \u2013 </li> <li> <code>rop</code> \u2013 </li> <li> <code>ropper</code> \u2013 </li> <li> <code>search</code> \u2013 </li> <li> <code>segments</code> \u2013 </li> <li> <code>shell</code> \u2013 <p>Wrapper for shell commands.</p> </li> <li> <code>sigreturn</code> \u2013 </li> <li> <code>slab</code> \u2013 <p>Commands for dealing with Linux kernel slab allocator. Currently, only SLUB is supported.</p> </li> <li> <code>spray</code> \u2013 </li> <li> <code>start</code> \u2013 <p>Launches the target process after setting a breakpoint at a convenient</p> </li> <li> <code>strings</code> \u2013 </li> <li> <code>telescope</code> \u2013 <p>Prints out pointer chains starting at some address in memory.</p> </li> <li> <code>tips</code> \u2013 </li> <li> <code>tls</code> \u2013 <p>Command to print the information of the current Thread Local Storage (TLS).</p> </li> <li> <code>valist</code> \u2013 </li> <li> <code>version</code> \u2013 <p>Implements version and bugreport commands.</p> </li> <li> <code>vmmap</code> \u2013 <p>Command to print the virtual memory map a la /proc/self/maps.</p> </li> <li> <code>windbg</code> \u2013 <p>Compatibility functionality for Windbg users.</p> </li> <li> <code>xinfo</code> \u2013 </li> <li> <code>xor</code> \u2013 </li> </ul> <p>Classes:</p> <ul> <li> <code>CommandCategory</code> \u2013 </li> <li> <code>Command</code> \u2013 <p>Generic command wrapper</p> </li> <li> <code>ArgparsedCommand</code> \u2013 <p>Adds documentation and offloads parsing for a Command via argparse</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>fix</code> \u2013 <p>Fix a single command-line argument coming from the CLI.</p> </li> <li> <code>fix_reraise</code> \u2013 </li> <li> <code>fix_reraise_arg</code> \u2013 <p>fix_reraise wrapper for evaluating command arguments</p> </li> <li> <code>fix_int</code> \u2013 </li> <li> <code>fix_int_reraise</code> \u2013 </li> <li> <code>fix_int_reraise_arg</code> \u2013 <p>fix_int_reraise wrapper for evaluating command arguments</p> </li> <li> <code>func_name</code> \u2013 </li> <li> <code>OnlyWhenLocal</code> \u2013 </li> <li> <code>OnlyWithFile</code> \u2013 </li> <li> <code>OnlyWhenQemuKernel</code> \u2013 </li> <li> <code>OnlyWhenUserspace</code> \u2013 </li> <li> <code>OnlyWithKernelDebugSyms</code> \u2013 </li> <li> <code>OnlyWhenPagingEnabled</code> \u2013 </li> <li> <code>OnlyWhenRunning</code> \u2013 </li> <li> <code>OnlyWithTcache</code> \u2013 </li> <li> <code>OnlyWhenHeapIsInitialized</code> \u2013 </li> <li> <code>OnlyWithResolvedHeapSyms</code> \u2013 </li> <li> <code>sloppy_gdb_parse</code> \u2013 <p>This function should be used as <code>argparse.ArgumentParser</code> .add_argument method's <code>type</code> helper.</p> </li> <li> <code>AddressExpr</code> \u2013 <p>Parses an address expression. Returns an int.</p> </li> <li> <code>HexOrAddressExpr</code> \u2013 <p>Parses string as hexadecimal int or an address expression. Returns an int.</p> </li> <li> <code>load_commands</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>log</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>P</code> \u2013 </li> <li> <code>commands</code> (<code>list[Command]</code>) \u2013 </li> <li> <code>command_names</code> (<code>set[str]</code>) \u2013 </li> <li> <code>GDB_BUILTIN_COMMANDS</code> \u2013 </li> <li> <code>pwndbg_is_reloading</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.log","title":"log <code>module-attribute</code>","text":"<pre><code>log = getLogger(__name__)\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.commands","title":"commands <code>module-attribute</code>","text":"<pre><code>commands: list[Command] = []\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.command_names","title":"command_names <code>module-attribute</code>","text":"<pre><code>command_names: set[str] = set()\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.GDB_BUILTIN_COMMANDS","title":"GDB_BUILTIN_COMMANDS <code>module-attribute</code>","text":"<pre><code>GDB_BUILTIN_COMMANDS = commands()\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.pwndbg_is_reloading","title":"pwndbg_is_reloading <code>module-attribute</code>","text":"<pre><code>pwndbg_is_reloading = False\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory","title":"CommandCategory","text":"<p> Bases: <code>str</code>, <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>START</code> \u2013 </li> <li> <code>NEXT</code> \u2013 </li> <li> <code>CONTEXT</code> \u2013 </li> <li> <code>PTMALLOC2</code> \u2013 </li> <li> <code>JEMALLOC</code> \u2013 </li> <li> <code>BREAKPOINT</code> \u2013 </li> <li> <code>MEMORY</code> \u2013 </li> <li> <code>STACK</code> \u2013 </li> <li> <code>REGISTER</code> \u2013 </li> <li> <code>PROCESS</code> \u2013 </li> <li> <code>LINUX</code> \u2013 </li> <li> <code>DISASS</code> \u2013 </li> <li> <code>MISC</code> \u2013 </li> <li> <code>KERNEL</code> \u2013 </li> <li> <code>INTEGRATIONS</code> \u2013 </li> <li> <code>WINDBG</code> \u2013 </li> <li> <code>PWNDBG</code> \u2013 </li> <li> <code>SHELL</code> \u2013 </li> <li> <code>DEV</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.START","title":"START <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>START = 'Start'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.NEXT","title":"NEXT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NEXT = 'Step/Next/Continue'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.CONTEXT","title":"CONTEXT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>CONTEXT = 'Context'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.PTMALLOC2","title":"PTMALLOC2 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PTMALLOC2 = 'GLibc ptmalloc2 Heap'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.JEMALLOC","title":"JEMALLOC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>JEMALLOC = 'jemalloc Heap'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.BREAKPOINT","title":"BREAKPOINT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>BREAKPOINT = 'Breakpoint'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.MEMORY","title":"MEMORY <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MEMORY = 'Memory'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.STACK","title":"STACK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STACK = 'Stack'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.REGISTER","title":"REGISTER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>REGISTER = 'Register'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.PROCESS","title":"PROCESS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PROCESS = 'Process'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.LINUX","title":"LINUX <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>LINUX = 'Linux/libc/ELF'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.DISASS","title":"DISASS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DISASS = 'Disassemble'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.MISC","title":"MISC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MISC = 'Misc'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.KERNEL","title":"KERNEL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNEL = 'Kernel'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.INTEGRATIONS","title":"INTEGRATIONS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INTEGRATIONS = 'Integrations'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.WINDBG","title":"WINDBG <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>WINDBG = 'WinDbg'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.PWNDBG","title":"PWNDBG <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PWNDBG = 'pwndbg'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.SHELL","title":"SHELL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHELL = 'Shell'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandCategory.DEV","title":"DEV <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DEV = 'Developer'\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command","title":"Command","text":"<pre><code>Command(\n function: Callable[..., str | None],\n prefix: bool = False,\n command_name: str | None = None,\n shell: bool = False,\n is_alias: bool = False,\n aliases: list[str] = [],\n category: CommandCategory = MISC,\n doc: str | None = None,\n)\n</code></pre> <p>Generic command wrapper</p> <p>Methods:</p> <ul> <li> <code>split_args</code> \u2013 <p>Split a command-line string from the user into arguments.</p> </li> <li> <code>invoke</code> \u2013 <p>Invoke the command with an argument string</p> </li> <li> <code>check_repeated</code> \u2013 <p>Keep a record of all commands which come from the TTY.</p> </li> <li> <code>__call__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>builtin_override_whitelist</code> (<code>set[str]</code>) \u2013 </li> <li> <code>history</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>is_alias</code> \u2013 </li> <li> <code>aliases</code> \u2013 </li> <li> <code>category</code> \u2013 </li> <li> <code>shell</code> \u2013 </li> <li> <code>doc</code> \u2013 </li> <li> <code>handle</code> \u2013 </li> <li> <code>function</code> \u2013 </li> <li> <code>__name__</code> \u2013 </li> <li> <code>repeat</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.builtin_override_whitelist","title":"builtin_override_whitelist <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>builtin_override_whitelist: set[str] = {\n \"up\",\n \"down\",\n \"search\",\n \"pwd\",\n \"start\",\n \"starti\",\n \"ignore\",\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.history","title":"history <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>history: dict[int, str] = {}\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.is_alias","title":"is_alias <code>instance-attribute</code>","text":"<pre><code>is_alias = is_alias\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.aliases","title":"aliases <code>instance-attribute</code>","text":"<pre><code>aliases = aliases\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.category","title":"category <code>instance-attribute</code>","text":"<pre><code>category = category\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.shell","title":"shell <code>instance-attribute</code>","text":"<pre><code>shell = shell\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.doc","title":"doc <code>instance-attribute</code>","text":"<pre><code>doc = doc\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle = add_command(command_name, _handler, doc)\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.function","title":"function <code>instance-attribute</code>","text":"<pre><code>function = function\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.__name__","title":"__name__ <code>instance-attribute</code>","text":"<pre><code>__name__ = command_name\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.repeat","title":"repeat <code>instance-attribute</code>","text":"<pre><code>repeat = False\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.split_args","title":"split_args","text":"<pre><code>split_args(argument: str) -> tuple[list[str], dict[Any, Any]]\n</code></pre> <p>Split a command-line string from the user into arguments.</p> <p>This is only used by pwndbg/commands/shell.py which is deprecated. Usually _ArgparsedCommand.split_args is called.</p> <p>Returns:</p> <ul> <li> <code>list[str]</code> \u2013 <p>A <code>(tuple, dict)</code>, in the form of <code>*args, **kwargs</code>.</p> </li> <li> <code>dict[Any, Any]</code> \u2013 <p>The contents of the tuple/dict are undefined.</p> </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.invoke","title":"invoke","text":"<pre><code>invoke(argument: str, from_tty: bool) -> None\n</code></pre> <p>Invoke the command with an argument string</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.check_repeated","title":"check_repeated","text":"<pre><code>check_repeated(argument: str, from_tty: bool) -> bool\n</code></pre> <p>Keep a record of all commands which come from the TTY.</p> <p>Returns:</p> <ul> <li> <code>bool</code> \u2013 <p>True if this command was executed by the user just hitting \"enter\".</p> </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.__call__","title":"__call__","text":"<pre><code>__call__(*args: Any, **kwargs: Any) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.ArgparsedCommand","title":"ArgparsedCommand","text":"<pre><code>ArgparsedCommand(\n parser_or_desc: str | ArgumentParser,\n category: CommandCategory,\n command_name: str | None = None,\n aliases: list[str] = [],\n only_debuggers: set[DebuggerType] = None,\n exclude_debuggers: set[DebuggerType] = None,\n)\n</code></pre> <p>Adds documentation and offloads parsing for a Command via argparse</p> <p>Methods:</p> <ul> <li> <code>__call__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>aliases</code> \u2013 </li> <li> <code>category</code> \u2013 </li> <li> <code>only_debuggers</code> \u2013 </li> <li> <code>exclude_debuggers</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.ArgparsedCommand.parser","title":"parser <code>instance-attribute</code>","text":"<pre><code>parser = ArgumentParser(description=parser_or_desc)\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.ArgparsedCommand.aliases","title":"aliases <code>instance-attribute</code>","text":"<pre><code>aliases = aliases\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.ArgparsedCommand.category","title":"category <code>instance-attribute</code>","text":"<pre><code>category = category\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.ArgparsedCommand.only_debuggers","title":"only_debuggers <code>instance-attribute</code>","text":"<pre><code>only_debuggers = only_debuggers\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.ArgparsedCommand.exclude_debuggers","title":"exclude_debuggers <code>instance-attribute</code>","text":"<pre><code>exclude_debuggers = exclude_debuggers\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.ArgparsedCommand.__call__","title":"__call__","text":"<pre><code>__call__(function: Callable[..., Any]) -> _ArgparsedCommand\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.fix","title":"fix","text":"<pre><code>fix(\n arg: str | Value,\n sloppy: bool = False,\n quiet: bool = True,\n reraise: bool = False,\n) -> str | Value | None\n</code></pre> <p>Fix a single command-line argument coming from the CLI.</p> <p>Parameters:</p> <ul> <li> <code>arg</code> (<code>str | Value</code>) \u2013 <p>Original string representation (e.g. '0', '$rax', '$rax+44')</p> </li> <li> <code>sloppy</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>If <code>arg</code> cannot be evaluated, return <code>arg</code>. (default: False)</p> </li> <li> <code>quiet</code> (<code>bool</code>, default: <code>True</code> ) \u2013 <p>If an error occurs, suppress it. (default: True)</p> </li> <li> <code>reraise</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>If an error occurs, raise the exception. (default: False)</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>str | Value | None</code> \u2013 <p>Ideally a <code>Value</code> object. May return a <code>str</code> if <code>sloppy==True</code>.</p> </li> <li> <code>str | Value | None</code> \u2013 <p>May return <code>None</code> if <code>sloppy == False and reraise == False</code>.</p> </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.fix_reraise","title":"fix_reraise","text":"<pre><code>fix_reraise(*a, **kw) -> str | Value | None\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.fix_reraise_arg","title":"fix_reraise_arg","text":"<pre><code>fix_reraise_arg(arg) -> Value\n</code></pre> <p>fix_reraise wrapper for evaluating command arguments</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.fix_int","title":"fix_int","text":"<pre><code>fix_int(*a, **kw) -> int\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.fix_int_reraise","title":"fix_int_reraise","text":"<pre><code>fix_int_reraise(*a, **kw) -> int\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.fix_int_reraise_arg","title":"fix_int_reraise_arg","text":"<pre><code>fix_int_reraise_arg(arg) -> int\n</code></pre> <p>fix_int_reraise wrapper for evaluating command arguments</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.func_name","title":"func_name","text":"<pre><code>func_name(function: Callable[P, T]) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenLocal","title":"OnlyWhenLocal","text":"<pre><code>OnlyWhenLocal(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithFile","title":"OnlyWithFile","text":"<pre><code>OnlyWithFile(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenQemuKernel","title":"OnlyWhenQemuKernel","text":"<pre><code>OnlyWhenQemuKernel(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenUserspace","title":"OnlyWhenUserspace","text":"<pre><code>OnlyWhenUserspace(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithKernelDebugSyms","title":"OnlyWithKernelDebugSyms","text":"<pre><code>OnlyWithKernelDebugSyms(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenPagingEnabled","title":"OnlyWhenPagingEnabled","text":"<pre><code>OnlyWhenPagingEnabled(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenRunning","title":"OnlyWhenRunning","text":"<pre><code>OnlyWhenRunning(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithTcache","title":"OnlyWithTcache","text":"<pre><code>OnlyWithTcache(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenHeapIsInitialized","title":"OnlyWhenHeapIsInitialized","text":"<pre><code>OnlyWhenHeapIsInitialized(\n function: Callable[P, T],\n) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithResolvedHeapSyms","title":"OnlyWithResolvedHeapSyms","text":"<pre><code>OnlyWithResolvedHeapSyms(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.sloppy_gdb_parse","title":"sloppy_gdb_parse","text":"<pre><code>sloppy_gdb_parse(s: str) -> int | str\n</code></pre> <p>This function should be used as <code>argparse.ArgumentParser</code> .add_argument method's <code>type</code> helper.</p> <p>This makes the type being parsed as gdb value and if that parsing fails, a string is returned.</p> <p>:param s: String. :return: Whatever gdb.parse_and_eval returns or string.</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.AddressExpr","title":"AddressExpr","text":"<pre><code>AddressExpr(s: str) -> int\n</code></pre> <p>Parses an address expression. Returns an int.</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.HexOrAddressExpr","title":"HexOrAddressExpr","text":"<pre><code>HexOrAddressExpr(s: str) -> int\n</code></pre> <p>Parses string as hexadecimal int or an address expression. Returns an int. (e.g. '1234' will return 0x1234)</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.load_commands","title":"load_commands","text":"<pre><code>load_commands() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/","title":"pwndbg.commands.ai","text":""},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai","title":"ai","text":"<p>This command sends information on the current debugging context to OpenAI's GPT-3 large language model and asks it a question supplied by the user. It then displays GPT-3's response to that question to the user.</p> <p>Functions:</p> <ul> <li> <code>set_dummy_mode</code> \u2013 </li> <li> <code>get_openai_api_key</code> \u2013 </li> <li> <code>get_anthropic_api_key</code> \u2013 </li> <li> <code>get_ollama_endpoint</code> \u2013 </li> <li> <code>build_prompt</code> \u2013 </li> <li> <code>flatten_prompt</code> \u2013 </li> <li> <code>build_context_prompt_body</code> \u2013 </li> <li> <code>build_command_prompt_body</code> \u2013 </li> <li> <code>query_openai_chat</code> \u2013 </li> <li> <code>query_openai_completions</code> \u2013 </li> <li> <code>query</code> \u2013 </li> <li> <code>query_anthropic</code> \u2013 </li> <li> <code>query_ollama</code> \u2013 </li> <li> <code>get_openai_models</code> \u2013 </li> <li> <code>ai</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>last_question</code> (<code>list[str]</code>) \u2013 </li> <li> <code>last_answer</code> (<code>list[str]</code>) \u2013 </li> <li> <code>last_pc</code> \u2013 </li> <li> <code>last_command</code> \u2013 </li> <li> <code>dummy</code> \u2013 </li> <li> <code>verbosity</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.last_question","title":"last_question <code>module-attribute</code>","text":"<pre><code>last_question: list[str] = []\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.last_answer","title":"last_answer <code>module-attribute</code>","text":"<pre><code>last_answer: list[str] = []\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.last_pc","title":"last_pc <code>module-attribute</code>","text":"<pre><code>last_pc = None\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.last_command","title":"last_command <code>module-attribute</code>","text":"<pre><code>last_command = None\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.dummy","title":"dummy <code>module-attribute</code>","text":"<pre><code>dummy = False\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.verbosity","title":"verbosity <code>module-attribute</code>","text":"<pre><code>verbosity = 0\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Ask GPT-3 a question about the current debugging context.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.set_dummy_mode","title":"set_dummy_mode","text":"<pre><code>set_dummy_mode(d=True) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.get_openai_api_key","title":"get_openai_api_key","text":"<pre><code>get_openai_api_key()\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.get_anthropic_api_key","title":"get_anthropic_api_key","text":"<pre><code>get_anthropic_api_key()\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.get_ollama_endpoint","title":"get_ollama_endpoint","text":"<pre><code>get_ollama_endpoint()\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.build_prompt","title":"build_prompt","text":"<pre><code>build_prompt(question, command=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.flatten_prompt","title":"flatten_prompt","text":"<pre><code>flatten_prompt(conversation)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.build_context_prompt_body","title":"build_context_prompt_body","text":"<pre><code>build_context_prompt_body()\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.build_command_prompt_body","title":"build_command_prompt_body","text":"<pre><code>build_command_prompt_body(command)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.query_openai_chat","title":"query_openai_chat","text":"<pre><code>query_openai_chat(\n prompt, model=\"gpt-3.5-turbo\", max_tokens=100, temperature=0.0\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.query_openai_completions","title":"query_openai_completions","text":"<pre><code>query_openai_completions(\n prompt, model=\"text-davinci-003\", max_tokens=100, temperature=0.0\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.query","title":"query","text":"<pre><code>query(prompt, model='text-davinci-003', max_tokens=100, temperature=0.0)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.query_anthropic","title":"query_anthropic","text":"<pre><code>query_anthropic(prompt, model='claude-v1', max_tokens=100, temperature=0.0)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.query_ollama","title":"query_ollama","text":"<pre><code>query_ollama(prompt, model='mistral', max_tokens=100, temperature=0.0)\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.get_openai_models","title":"get_openai_models","text":"<pre><code>get_openai_models()\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/#pwndbg.commands.ai.ai","title":"ai","text":"<pre><code>ai(\n question,\n model,\n temperature,\n max_tokens,\n verbose,\n list_models=False,\n command=None,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/argv/","title":"pwndbg.commands.argv","text":""},{"location":"reference/pwndbg/commands/argv/#pwndbg.commands.argv","title":"argv","text":"<p>Functions:</p> <ul> <li> <code>argc</code> \u2013 </li> <li> <code>argv</code> \u2013 </li> <li> <code>envp</code> \u2013 <p>Prints out the contents of the environment.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/argv/#pwndbg.commands.argv.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Prints out the contents of the environment.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/argv/#pwndbg.commands.argv.argc","title":"argc","text":"<pre><code>argc() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/argv/#pwndbg.commands.argv.argv","title":"argv","text":"<pre><code>argv(i: int = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/argv/#pwndbg.commands.argv.envp","title":"envp","text":"<pre><code>envp(name: str = None)\n</code></pre> <p>Prints out the contents of the environment.</p>"},{"location":"reference/pwndbg/commands/aslr/","title":"pwndbg.commands.aslr","text":""},{"location":"reference/pwndbg/commands/aslr/#pwndbg.commands.aslr","title":"aslr","text":"<p>Functions:</p> <ul> <li> <code>check_aslr</code> \u2013 <p>Detects the ASLR status. Returns True, False or None.</p> </li> <li> <code>aslr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>options</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/aslr/#pwndbg.commands.aslr.options","title":"options <code>module-attribute</code>","text":"<pre><code>options = {'on': 'off', 'off': 'on'}\n</code></pre>"},{"location":"reference/pwndbg/commands/aslr/#pwndbg.commands.aslr.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\nCheck the current ASLR status, or turn it on/off.\\n\\nDoes not take effect until the program is restarted.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/aslr/#pwndbg.commands.aslr.check_aslr","title":"check_aslr","text":"<pre><code>check_aslr() -> tuple[bool | None, str]\n</code></pre> <p>Detects the ASLR status. Returns True, False or None.</p> <p>None is returned when we can't detect ASLR.</p>"},{"location":"reference/pwndbg/commands/aslr/#pwndbg.commands.aslr.aslr","title":"aslr","text":"<pre><code>aslr(state=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/asm/","title":"pwndbg.commands.asm","text":""},{"location":"reference/pwndbg/commands/asm/#pwndbg.commands.asm","title":"asm","text":"<p>Functions:</p> <ul> <li> <code>asm</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>input_group</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/asm/#pwndbg.commands.asm.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Assemble shellcode into bytes')\n</code></pre>"},{"location":"reference/pwndbg/commands/asm/#pwndbg.commands.asm.input_group","title":"input_group <code>module-attribute</code>","text":"<pre><code>input_group = add_mutually_exclusive_group(required=True)\n</code></pre>"},{"location":"reference/pwndbg/commands/asm/#pwndbg.commands.asm.asm","title":"asm","text":"<pre><code>asm(shellcode, format, arch, avoid, infile) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/","title":"pwndbg.commands.attachp","text":""},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp","title":"attachp","text":"<p>Functions:</p> <ul> <li> <code>find_pids</code> \u2013 </li> <li> <code>attachp</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description='Attaches to a given pid, process name, process found with partial argv match or to a device file.\\n\\nThis command wraps the original GDB `attach` command to add the ability\\nto debug a process with a given name or partial name match. In such cases,\\nthe process identifier is fetched via the `pidof <name>` command first. If no\\nmatches are found, then it uses the `ps -eo pid,args` command to search for\\npartial name matches.\\n\\nOriginal GDB attach command help:\\n Attach to a process or file outside of GDB.\\n This command attaches to another target, of the same type as your last\\n \"target\" command (\"info files\" will show your target stack).\\n The command may take as argument a process id or a device file.\\n For a process id, you must have permission to send the process a signal,\\n and it must have the same effective uid as the debugger.\\n When using \"attach\" with a process id, the debugger finds the\\n program running in the process, looking first in the current working\\n directory, or (if not found there) using the source file search path\\n (see the \"directory\" command). You can also use the \"file\" command\\n to specify the program, and to load its symbol table.',\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.find_pids","title":"find_pids","text":"<pre><code>find_pids(target, user, exact, all)\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.attachp","title":"attachp","text":"<pre><code>attachp(target, no_truncate, retry, exact, all, user=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/auxv/","title":"pwndbg.commands.auxv","text":""},{"location":"reference/pwndbg/commands/auxv/#pwndbg.commands.auxv","title":"auxv","text":"<p>Functions:</p> <ul> <li> <code>auxv</code> \u2013 </li> <li> <code>auxv_explore</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/auxv/#pwndbg.commands.auxv.auxv","title":"auxv","text":"<pre><code>auxv() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/auxv/#pwndbg.commands.auxv.auxv_explore","title":"auxv_explore","text":"<pre><code>auxv_explore() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/","title":"pwndbg.commands.binder","text":""},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder","title":"binder","text":"<p>Classes:</p> <ul> <li> <code>IndentContextManager</code> \u2013 </li> <li> <code>BinderVisitor</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>for_each_transaction</code> \u2013 </li> <li> <code>for_each_hlist_entry</code> \u2013 </li> <li> <code>binder</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>log</code> \u2013 </li> <li> <code>addrc</code> \u2013 </li> <li> <code>fieldnamec</code> \u2013 </li> <li> <code>fieldvaluec</code> \u2013 </li> <li> <code>typenamec</code> \u2013 </li> <li> <code>node_types</code> \u2013 </li> <li> <code>entry_field_names</code> \u2013 </li> <li> <code>rb_node_field_names</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.log","title":"log <code>module-attribute</code>","text":"<pre><code>log = getLogger(__name__)\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.addrc","title":"addrc <code>module-attribute</code>","text":"<pre><code>addrc = green\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.fieldnamec","title":"fieldnamec <code>module-attribute</code>","text":"<pre><code>fieldnamec = blue\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.fieldvaluec","title":"fieldvaluec <code>module-attribute</code>","text":"<pre><code>fieldvaluec = yellow\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.typenamec","title":"typenamec <code>module-attribute</code>","text":"<pre><code>typenamec = red\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.node_types","title":"node_types <code>module-attribute</code>","text":"<pre><code>node_types = {\n \"waiting_threads\": \"struct binder_thread\",\n \"todo\": \"struct binder_work\",\n \"refs\": \"struct binder_ref\",\n \"threads\": \"struct binder_thread\",\n \"nodes\": \"struct binder_node\",\n \"refs_by_node\": \"struct binder_ref\",\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.entry_field_names","title":"entry_field_names <code>module-attribute</code>","text":"<pre><code>entry_field_names = {\n \"waiting_threads\": \"waiting_thread_node\",\n \"todo\": \"entry\",\n \"refs\": \"node_entry\",\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.rb_node_field_names","title":"rb_node_field_names <code>module-attribute</code>","text":"<pre><code>rb_node_field_names = {\n \"threads\": \"rb_node\",\n \"nodes\": \"rb_node\",\n \"refs_by_node\": \"rb_node_node\",\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Show Android Binder information')\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.IndentContextManager","title":"IndentContextManager","text":"<pre><code>IndentContextManager()\n</code></pre> <p>Methods:</p> <ul> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>indent</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.IndentContextManager.indent","title":"indent <code>instance-attribute</code>","text":"<pre><code>indent = 0\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.IndentContextManager.__enter__","title":"__enter__","text":"<pre><code>__enter__()\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.IndentContextManager.__exit__","title":"__exit__","text":"<pre><code>__exit__(exc_type, exc_value, exc_tb)\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor","title":"BinderVisitor","text":"<pre><code>BinderVisitor(procs_addr)\n</code></pre> <p>Methods:</p> <ul> <li> <code>format_rb_tree</code> \u2013 </li> <li> <code>format_list</code> \u2013 </li> <li> <code>visit</code> \u2013 </li> <li> <code>format_proc</code> \u2013 </li> <li> <code>format_thread</code> \u2013 </li> <li> <code>format_transaction</code> \u2013 </li> <li> <code>format_node</code> \u2013 </li> <li> <code>format_ref</code> \u2013 </li> <li> <code>format_work</code> \u2013 </li> <li> <code>print_object</code> \u2013 </li> <li> <code>format_spinlock</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>indent</code> \u2013 </li> <li> <code>addr</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.indent","title":"indent <code>instance-attribute</code>","text":"<pre><code>indent = IndentContextManager()\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr = get_typed_pointer_value('struct hlist_head', procs_addr)\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_rb_tree","title":"format_rb_tree","text":"<pre><code>format_rb_tree(field: str, value: Value) -> tuple[str, int]\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_list","title":"format_list","text":"<pre><code>format_list(field: str, value: Value, typename: str) -> tuple[str, int]\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.visit","title":"visit","text":"<pre><code>visit()\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_proc","title":"format_proc","text":"<pre><code>format_proc(proc: Value, only_heading=False)\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_thread","title":"format_thread","text":"<pre><code>format_thread(thread: Value, only_heading: bool = False) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_transaction","title":"format_transaction","text":"<pre><code>format_transaction(transaction: Value, only_heading: bool = False) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_node","title":"format_node","text":"<pre><code>format_node(node: Value) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_ref","title":"format_ref","text":"<pre><code>format_ref(ref: Value, only_heading: bool = False) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_work","title":"format_work","text":"<pre><code>format_work(work: Value) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.print_object","title":"print_object","text":"<pre><code>print_object(obj: Value)\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.BinderVisitor.format_spinlock","title":"format_spinlock","text":"<pre><code>format_spinlock(lock: Value) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.for_each_transaction","title":"for_each_transaction","text":"<pre><code>for_each_transaction(addr: Value, field: str) -> Iterator[Value]\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.for_each_hlist_entry","title":"for_each_hlist_entry","text":"<pre><code>for_each_hlist_entry(head: Value, typename, field) -> Iterator[Value]\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/#pwndbg.commands.binder.binder","title":"binder","text":"<pre><code>binder()\n</code></pre>"},{"location":"reference/pwndbg/commands/binja/","title":"pwndbg.commands.binja","text":""},{"location":"reference/pwndbg/commands/binja/#pwndbg.commands.binja","title":"binja","text":"<p>Functions:</p> <ul> <li> <code>bn_sync</code> \u2013 <p>Synchronize Binary Ninja's cursor with GDB</p> </li> </ul>"},{"location":"reference/pwndbg/commands/binja/#pwndbg.commands.binja.bn_sync","title":"bn_sync","text":"<pre><code>bn_sync(*args) -> None\n</code></pre> <p>Synchronize Binary Ninja's cursor with GDB</p>"},{"location":"reference/pwndbg/commands/binja_functions/","title":"pwndbg.commands.binja_functions","text":""},{"location":"reference/pwndbg/commands/binja_functions/#pwndbg.commands.binja_functions","title":"binja_functions","text":"<p>Functions:</p> <ul> <li> <code>bn_sym</code> \u2013 <p>Lookup a symbol's address by name from Binary Ninja.</p> </li> <li> <code>bn_var</code> \u2013 <p>Lookup a stack variable's address by name from Binary Ninja.</p> </li> <li> <code>bn_eval</code> \u2013 <p>Parse and evaluate a Binary Ninja expression.</p> </li> </ul>"},{"location":"reference/pwndbg/commands/binja_functions/#pwndbg.commands.binja_functions.bn_sym","title":"bn_sym","text":"<pre><code>bn_sym(name_val: Value) -> int | None\n</code></pre> <p>Lookup a symbol's address by name from Binary Ninja.</p>"},{"location":"reference/pwndbg/commands/binja_functions/#pwndbg.commands.binja_functions.bn_var","title":"bn_var","text":"<pre><code>bn_var(name_val: Value) -> int | None\n</code></pre> <p>Lookup a stack variable's address by name from Binary Ninja.</p>"},{"location":"reference/pwndbg/commands/binja_functions/#pwndbg.commands.binja_functions.bn_eval","title":"bn_eval","text":"<pre><code>bn_eval(expr: Value) -> int | None\n</code></pre> <p>Parse and evaluate a Binary Ninja expression.</p> <p>Docs: https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.parse_expression</p> <p>Adds all registers in the current register set as magic variables (e.g. $rip). Also adds a $piebase magic variable with the computed executable base.</p>"},{"location":"reference/pwndbg/commands/branch/","title":"pwndbg.commands.branch","text":""},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch","title":"branch","text":"<p>Classes:</p> <ul> <li> <code>BreakOnConditionalBranch</code> \u2013 <p>A breakpoint that only stops the inferior if a given branch is taken or not taken.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>break_if_taken</code> \u2013 </li> <li> <code>break_if_not_taken</code> \u2013 </li> <li> <code>install_breakpoint</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Breaks on a branch if it is not taken.')\n</code></pre>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.BreakOnConditionalBranch","title":"BreakOnConditionalBranch","text":"<pre><code>BreakOnConditionalBranch(instruction: PwndbgInstruction, taken: bool)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>A breakpoint that only stops the inferior if a given branch is taken or not taken.</p> <p>Methods:</p> <ul> <li> <code>should_stop</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>instruction</code> \u2013 </li> <li> <code>taken</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.BreakOnConditionalBranch.instruction","title":"instruction <code>instance-attribute</code>","text":"<pre><code>instruction = instruction\n</code></pre>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.BreakOnConditionalBranch.taken","title":"taken <code>instance-attribute</code>","text":"<pre><code>taken = taken\n</code></pre>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.BreakOnConditionalBranch.should_stop","title":"should_stop","text":"<pre><code>should_stop()\n</code></pre>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.BreakOnConditionalBranch.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.break_if_taken","title":"break_if_taken","text":"<pre><code>break_if_taken(branch) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.break_if_not_taken","title":"break_if_not_taken","text":"<pre><code>break_if_not_taken(branch) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/branch/#pwndbg.commands.branch.install_breakpoint","title":"install_breakpoint","text":"<pre><code>install_breakpoint(branch, taken: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/canary/","title":"pwndbg.commands.canary","text":""},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary","title":"canary","text":"<p>Functions:</p> <ul> <li> <code>canary_value</code> \u2013 </li> <li> <code>canary</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>DEFAULT_NUM_CANARIES_TO_DISPLAY</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary.DEFAULT_NUM_CANARIES_TO_DISPLAY","title":"DEFAULT_NUM_CANARIES_TO_DISPLAY <code>module-attribute</code>","text":"<pre><code>DEFAULT_NUM_CANARIES_TO_DISPLAY = 1\n</code></pre>"},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Print out the current stack canary.')\n</code></pre>"},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary.canary_value","title":"canary_value","text":"<pre><code>canary_value()\n</code></pre>"},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary.canary","title":"canary","text":"<pre><code>canary(all) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/checksec/","title":"pwndbg.commands.checksec","text":""},{"location":"reference/pwndbg/commands/checksec/#pwndbg.commands.checksec","title":"checksec","text":"<p>Functions:</p> <ul> <li> <code>checksec</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/checksec/#pwndbg.commands.checksec.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Prints out the binary security settings using `checksec`.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/checksec/#pwndbg.commands.checksec.checksec","title":"checksec","text":"<pre><code>checksec(file: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/comments/","title":"pwndbg.commands.comments","text":""},{"location":"reference/pwndbg/commands/comments/#pwndbg.commands.comments","title":"comments","text":"<p>Functions:</p> <ul> <li> <code>comm</code> \u2013 </li> <li> <code>init</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>file_lists</code> (<code>dict[str, dict[str, str]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/comments/#pwndbg.commands.comments.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Put comments in assembly code.')\n</code></pre>"},{"location":"reference/pwndbg/commands/comments/#pwndbg.commands.comments.file_lists","title":"file_lists <code>module-attribute</code>","text":"<pre><code>file_lists: dict[str, dict[str, str]] = {}\n</code></pre>"},{"location":"reference/pwndbg/commands/comments/#pwndbg.commands.comments.comm","title":"comm","text":"<pre><code>comm(addr=None, comment=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/comments/#pwndbg.commands.comments.init","title":"init","text":"<pre><code>init() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/","title":"pwndbg.commands.config","text":""},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config","title":"config","text":"<p>Dumps all pwndbg-specific configuration points.</p> <p>Functions:</p> <ul> <li> <code>print_row</code> \u2013 </li> <li> <code>extend_value_with_default</code> \u2013 </li> <li> <code>get_config_parameters</code> \u2013 </li> <li> <code>display_config</code> \u2013 </li> <li> <code>config</code> \u2013 </li> <li> <code>theme</code> \u2013 </li> <li> <code>configfile</code> \u2013 </li> <li> <code>themefile</code> \u2013 </li> <li> <code>configfile_print_scope</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>configfile_parser</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> <li> <code>themefile_parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.configfile_parser","title":"configfile_parser <code>module-attribute</code>","text":"<pre><code>configfile_parser = ArgumentParser(\n description=\"Generates a configuration file for the current pwndbg options.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Shows pwndbg-specific theme configuration.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.themefile_parser","title":"themefile_parser <code>module-attribute</code>","text":"<pre><code>themefile_parser = ArgumentParser(\n description=\"Generates a configuration file for the current pwndbg theme options.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.print_row","title":"print_row","text":"<pre><code>print_row(\n name: str,\n value: str,\n default: str,\n set_show_doc: str,\n ljust_optname: int,\n ljust_doc: int,\n empty_space: int = 2,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.extend_value_with_default","title":"extend_value_with_default","text":"<pre><code>extend_value_with_default(value, default)\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.get_config_parameters","title":"get_config_parameters","text":"<pre><code>get_config_parameters(scope, filter_pattern)\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.display_config","title":"display_config","text":"<pre><code>display_config(\n filter_pattern: str, scope: str, has_file_command: bool = True\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.config","title":"config","text":"<pre><code>config(filter_pattern) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.theme","title":"theme","text":"<pre><code>theme(filter_pattern) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.configfile","title":"configfile","text":"<pre><code>configfile(show_all=False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.themefile","title":"themefile","text":"<pre><code>themefile(show_all=False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.configfile_print_scope","title":"configfile_print_scope","text":"<pre><code>configfile_print_scope(scope: str, show_all: bool = False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/","title":"pwndbg.commands.context","text":""},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context","title":"context","text":"<p>Classes:</p> <ul> <li> <code>StdOutput</code> \u2013 <p>A context manager wrapper to give stdout</p> </li> <li> <code>FileOutput</code> \u2013 <p>A context manager wrapper to reopen files on enter</p> </li> <li> <code>CallOutput</code> \u2013 <p>A context manager which calls a function on write</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>clear_screen</code> \u2013 <p>Clear the screen by moving the cursor to top-left corner and</p> </li> <li> <code>reserve_lines_maybe</code> \u2013 <p>Scroll the terminal up a few lines to reduce shaking</p> </li> <li> <code>validate_context_sections</code> \u2013 </li> <li> <code>output</code> \u2013 <p>Creates a context manager corresponding to configured context output</p> </li> <li> <code>contextoutput</code> \u2013 </li> <li> <code>resetcontextoutput</code> \u2013 </li> <li> <code>history_size_changed</code> \u2013 </li> <li> <code>serve_context_history</code> \u2013 </li> <li> <code>history_handle_unchanged_contents</code> \u2013 </li> <li> <code>contextprev</code> \u2013 </li> <li> <code>contextnext</code> \u2013 </li> <li> <code>contextsearch</code> \u2013 </li> <li> <code>contextwatch</code> \u2013 </li> <li> <code>contextunwatch</code> \u2013 </li> <li> <code>context_expressions</code> \u2013 </li> <li> <code>context_ghidra</code> \u2013 <p>Print out the source of the current function decompiled by ghidra.</p> </li> <li> <code>context</code> \u2013 <p>Print out the current register, instruction, and stack context.</p> </li> <li> <code>calculate_padding_to_align</code> \u2013 <p>Calculates the number of spaces to append to reach the next alignment.</p> </li> <li> <code>compact_regs</code> \u2013 </li> <li> <code>context_regs</code> \u2013 </li> <li> <code>context_heap_tracker</code> \u2013 </li> <li> <code>regs</code> \u2013 <p>Print out all registers and enhance the information.</p> </li> <li> <code>get_regs</code> \u2013 </li> <li> <code>try_emulate_if_bug_disable</code> \u2013 </li> <li> <code>context_disasm</code> \u2013 </li> <li> <code>get_highlight_source</code> \u2013 </li> <li> <code>get_filename_and_formatted_source</code> \u2013 <p>Returns formatted, lines limited and highlighted source as list</p> </li> <li> <code>context_code</code> \u2013 </li> <li> <code>context_stack</code> \u2013 </li> <li> <code>context_backtrace</code> \u2013 </li> <li> <code>context_args</code> \u2013 </li> <li> <code>get_thread_status</code> \u2013 </li> <li> <code>context_threads</code> \u2013 </li> <li> <code>save_signal</code> \u2013 </li> <li> <code>context_last_signal</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>log</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>P</code> \u2013 </li> <li> <code>c</code> \u2013 </li> <li> <code>config_reserve_lines</code> \u2013 </li> <li> <code>config_clear_screen</code> \u2013 </li> <li> <code>config_output</code> \u2013 </li> <li> <code>config_context_sections</code> \u2013 </li> <li> <code>config_max_threads_display</code> \u2013 </li> <li> <code>outputs</code> (<code>dict[str, str]</code>) \u2013 </li> <li> <code>output_settings</code> (<code>DefaultDict[str, dict[str, Any]]</code>) \u2013 </li> <li> <code>banner_arg</code> \u2013 </li> <li> <code>context_history</code> (<code>DefaultDict[str, list[list[str]]]</code>) \u2013 </li> <li> <code>selected_history_index</code> (<code>int | None</code>) \u2013 </li> <li> <code>context_history_size</code> \u2013 </li> <li> <code>expressions</code> \u2013 </li> <li> <code>config_context_ghidra</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> <li> <code>disasm_lines</code> \u2013 </li> <li> <code>source_disasm_lines</code> \u2013 </li> <li> <code>should_decompile</code> \u2013 </li> <li> <code>stack_lines</code> \u2013 </li> <li> <code>backtrace_lines</code> \u2013 </li> <li> <code>backtrace_frame_label</code> \u2013 </li> <li> <code>last_signal</code> (<code>list[str]</code>) \u2013 </li> <li> <code>thread_status_messages</code> \u2013 </li> <li> <code>context_sections</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.log","title":"log <code>module-attribute</code>","text":"<pre><code>log = getLogger(__name__)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.c","title":"c <code>module-attribute</code>","text":"<pre><code>c = ColorConfig(\n \"backtrace\",\n [\n ColorParamSpec(\n \"prefix\", \"none\", \"color for prefix of current backtrace label\"\n ),\n ColorParamSpec(\"address\", \"none\", \"color for backtrace (address)\"),\n ColorParamSpec(\"symbol\", \"none\", \"color for backtrace (symbol)\"),\n ColorParamSpec(\n \"frame-label\", \"none\", \"color for backtrace (frame label)\"\n ),\n ],\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.config_reserve_lines","title":"config_reserve_lines <code>module-attribute</code>","text":"<pre><code>config_reserve_lines = add_param(\n \"context-reserve-lines\",\n \"if-ctx-fits\",\n \"when to reserve lines after the prompt to reduce context shake\",\n help_docstring='\\nThe \"if-ctx-fits\" setting only reserves lines if the whole context would still fit vertically in the current terminal window.\\nIt doesn\\'t take into account line-wrapping due to insufficient terminal width.\\n',\n param_class=PARAM_ENUM,\n enum_sequence=[\"never\", \"if-ctx-fits\", \"always\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.config_clear_screen","title":"config_clear_screen <code>module-attribute</code>","text":"<pre><code>config_clear_screen = add_param(\n \"context-clear-screen\",\n False,\n \"whether to clear the screen before printing the context\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.config_output","title":"config_output <code>module-attribute</code>","text":"<pre><code>config_output = add_param(\n \"context-output\",\n \"stdout\",\n 'where pwndbg should output (\"stdout\" or file/tty).',\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.config_context_sections","title":"config_context_sections <code>module-attribute</code>","text":"<pre><code>config_context_sections = add_param(\n \"context-sections\",\n \"regs disasm code ghidra stack backtrace expressions threads heap_tracker\",\n \"which context sections are displayed (controls order)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.config_max_threads_display","title":"config_max_threads_display <code>module-attribute</code>","text":"<pre><code>config_max_threads_display = add_param(\n \"context-max-threads\",\n 4,\n \"maximum number of threads displayed by the context command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.outputs","title":"outputs <code>module-attribute</code>","text":"<pre><code>outputs: dict[str, str] = {}\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.output_settings","title":"output_settings <code>module-attribute</code>","text":"<pre><code>output_settings: DefaultDict[str, dict[str, Any]] = defaultdict(dict)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.banner_arg","title":"banner_arg <code>module-attribute</code>","text":"<pre><code>banner_arg = add_argument(\n \"banner\",\n type=str,\n nargs=\"?\",\n default=\"both\",\n help=\"Where a banner should be placed: both, top , bottom, none\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_history","title":"context_history <code>module-attribute</code>","text":"<pre><code>context_history: DefaultDict[str, list[list[str]]] = defaultdict(list)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.selected_history_index","title":"selected_history_index <code>module-attribute</code>","text":"<pre><code>selected_history_index: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_history_size","title":"context_history_size <code>module-attribute</code>","text":"<pre><code>context_history_size = add_param(\n \"context-history-size\", 50, \"number of context history entries to store\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.expressions","title":"expressions <code>module-attribute</code>","text":"<pre><code>expressions = []\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.config_context_ghidra","title":"config_context_ghidra <code>module-attribute</code>","text":"<pre><code>config_context_ghidra = add_param(\n \"context-ghidra\",\n \"never\",\n \"when to try to decompile the current function with ghidra\",\n help_docstring=\"Doing this is slow and requires radare2/r2pipe or rizin/rzpipe.\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"always\", \"never\", \"if-no-source\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Print out all registers and enhance the information.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.disasm_lines","title":"disasm_lines <code>module-attribute</code>","text":"<pre><code>disasm_lines = add_param(\n \"context-disasm-lines\",\n 10,\n \"number of additional lines to print in the disasm context\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.source_disasm_lines","title":"source_disasm_lines <code>module-attribute</code>","text":"<pre><code>source_disasm_lines = add_param(\n \"context-code-lines\",\n 10,\n \"number of source code lines to print by the context command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.should_decompile","title":"should_decompile <code>module-attribute</code>","text":"<pre><code>should_decompile = add_param(\n \"context-integration-decompile\",\n True,\n \"whether context should fall back to decompilation with no source code\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.stack_lines","title":"stack_lines <code>module-attribute</code>","text":"<pre><code>stack_lines = add_param(\n \"context-stack-lines\", 8, \"number of lines to print in the stack context\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.backtrace_lines","title":"backtrace_lines <code>module-attribute</code>","text":"<pre><code>backtrace_lines = add_param(\n \"context-backtrace-lines\",\n 8,\n \"number of lines to print in the backtrace context\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.backtrace_frame_label","title":"backtrace_frame_label <code>module-attribute</code>","text":"<pre><code>backtrace_frame_label = add_param(\n \"backtrace-frame-label\", \"\", \"frame number label for backtrace\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.last_signal","title":"last_signal <code>module-attribute</code>","text":"<pre><code>last_signal: list[str] = []\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.thread_status_messages","title":"thread_status_messages <code>module-attribute</code>","text":"<pre><code>thread_status_messages = {\n \"running\": light_green(\"running\"),\n \"stopped\": yellow(\"stopped\"),\n \"exited\": gray(\"exited \"),\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_sections","title":"context_sections <code>module-attribute</code>","text":"<pre><code>context_sections = {\n \"a\": context_args,\n \"r\": context_regs,\n \"d\": context_disasm,\n \"s\": context_stack,\n \"b\": context_backtrace,\n \"c\": context_code,\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.StdOutput","title":"StdOutput","text":"<p>A context manager wrapper to give stdout</p> <p>Methods:</p> <ul> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 </li> <li> <code>__hash__</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.StdOutput.__enter__","title":"__enter__","text":"<pre><code>__enter__()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.StdOutput.__exit__","title":"__exit__","text":"<pre><code>__exit__(*args, **kwargs) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.StdOutput.__hash__","title":"__hash__","text":"<pre><code>__hash__()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.StdOutput.__eq__","title":"__eq__","text":"<pre><code>__eq__(other) -> bool\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.FileOutput","title":"FileOutput","text":"<pre><code>FileOutput(*args)\n</code></pre> <p>A context manager wrapper to reopen files on enter</p> <p>Methods:</p> <ul> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 </li> <li> <code>__hash__</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>args</code> \u2013 </li> <li> <code>handle</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.FileOutput.args","title":"args <code>instance-attribute</code>","text":"<pre><code>args = args\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.FileOutput.handle","title":"handle <code>instance-attribute</code>","text":"<pre><code>handle = None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.FileOutput.__enter__","title":"__enter__","text":"<pre><code>__enter__()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.FileOutput.__exit__","title":"__exit__","text":"<pre><code>__exit__(*args, **kwargs) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.FileOutput.__hash__","title":"__hash__","text":"<pre><code>__hash__()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.FileOutput.__eq__","title":"__eq__","text":"<pre><code>__eq__(other)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput","title":"CallOutput","text":"<pre><code>CallOutput(func)\n</code></pre> <p>A context manager which calls a function on write</p> <p>Methods:</p> <ul> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 </li> <li> <code>__hash__</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>write</code> \u2013 </li> <li> <code>writelines</code> \u2013 </li> <li> <code>flush</code> \u2013 </li> <li> <code>isatty</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>func</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.func","title":"func <code>instance-attribute</code>","text":"<pre><code>func = func\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.__enter__","title":"__enter__","text":"<pre><code>__enter__()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.__exit__","title":"__exit__","text":"<pre><code>__exit__(*args, **kwargs) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.__hash__","title":"__hash__","text":"<pre><code>__hash__()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.__eq__","title":"__eq__","text":"<pre><code>__eq__(other)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.write","title":"write","text":"<pre><code>write(data) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.writelines","title":"writelines","text":"<pre><code>writelines(lines_iterable) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.flush","title":"flush","text":"<pre><code>flush()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.isatty","title":"isatty","text":"<pre><code>isatty()\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.clear_screen","title":"clear_screen","text":"<pre><code>clear_screen(out=stdout) -> None\n</code></pre> <p>Clear the screen by moving the cursor to top-left corner and clearing the content. Different terminals may act differently</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.reserve_lines_maybe","title":"reserve_lines_maybe","text":"<pre><code>reserve_lines_maybe(cmd_lines: int) -> None\n</code></pre> <p>Scroll the terminal up a few lines to reduce shaking when repeatedly printing the context.</p> <p>Only do this if the context would still fit on the screen.</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.validate_context_sections","title":"validate_context_sections","text":"<pre><code>validate_context_sections() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.output","title":"output","text":"<pre><code>output(section: str)\n</code></pre> <p>Creates a context manager corresponding to configured context output</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextoutput","title":"contextoutput","text":"<pre><code>contextoutput(section, path, clearing, banner='both', width: int = None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.resetcontextoutput","title":"resetcontextoutput","text":"<pre><code>resetcontextoutput(section)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.history_size_changed","title":"history_size_changed","text":"<pre><code>history_size_changed() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.serve_context_history","title":"serve_context_history","text":"<pre><code>serve_context_history(\n function: Callable[P, list[str]],\n) -> Callable[P, list[str]]\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.history_handle_unchanged_contents","title":"history_handle_unchanged_contents","text":"<pre><code>history_handle_unchanged_contents() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextprev","title":"contextprev","text":"<pre><code>contextprev(count) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextnext","title":"contextnext","text":"<pre><code>contextnext(count) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextsearch","title":"contextsearch","text":"<pre><code>contextsearch(needle, section) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextwatch","title":"contextwatch","text":"<pre><code>contextwatch(expression, cmd) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextunwatch","title":"contextunwatch","text":"<pre><code>contextunwatch(num) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_expressions","title":"context_expressions","text":"<pre><code>context_expressions(target=stdout, with_banner=True, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_ghidra","title":"context_ghidra","text":"<pre><code>context_ghidra(target=stdout, with_banner=True, width=None)\n</code></pre> <p>Print out the source of the current function decompiled by ghidra.</p> <p>The context-ghidra config parameter is used to configure whether to always, never or only show the context if no source is available.</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context","title":"context","text":"<pre><code>context(subcontext=None, enabled=None) -> None\n</code></pre> <p>Print out the current register, instruction, and stack context.</p> <p>Accepts subcommands 'reg', 'disasm', 'code', 'stack', 'backtrace', 'ghidra', 'args', 'threads', 'heap_tracker', 'expressions', and/or 'last_signal'.</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.calculate_padding_to_align","title":"calculate_padding_to_align","text":"<pre><code>calculate_padding_to_align(length, align)\n</code></pre> <p>Calculates the number of spaces to append to reach the next alignment. The next alignment point is given by \"x * align >= length\".</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.compact_regs","title":"compact_regs","text":"<pre><code>compact_regs(regs, width=None, target=stdout)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_regs","title":"context_regs","text":"<pre><code>context_regs(target=stdout, with_banner=True, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_heap_tracker","title":"context_heap_tracker","text":"<pre><code>context_heap_tracker(target=stdout, with_banner=True, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.regs","title":"regs","text":"<pre><code>regs(regs=[]) -> None\n</code></pre> <p>Print out all registers and enhance the information.</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.get_regs","title":"get_regs","text":"<pre><code>get_regs(regs: list[str] = None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.try_emulate_if_bug_disable","title":"try_emulate_if_bug_disable","text":"<pre><code>try_emulate_if_bug_disable(handler: Callable[[], T]) -> T\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_disasm","title":"context_disasm","text":"<pre><code>context_disasm(target=stdout, with_banner=True, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.get_highlight_source","title":"get_highlight_source","text":"<pre><code>get_highlight_source(filename: str) -> tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.get_filename_and_formatted_source","title":"get_filename_and_formatted_source","text":"<pre><code>get_filename_and_formatted_source()\n</code></pre> <p>Returns formatted, lines limited and highlighted source as list or if it isn't there - an empty list</p>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_code","title":"context_code","text":"<pre><code>context_code(target=stdout, with_banner=True, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_stack","title":"context_stack","text":"<pre><code>context_stack(target=stdout, with_banner=True, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_backtrace","title":"context_backtrace","text":"<pre><code>context_backtrace(with_banner=True, target=stdout, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_args","title":"context_args","text":"<pre><code>context_args(with_banner=True, target=stdout, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.get_thread_status","title":"get_thread_status","text":"<pre><code>get_thread_status(thread)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_threads","title":"context_threads","text":"<pre><code>context_threads(with_banner=True, target=stdout, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.save_signal","title":"save_signal","text":"<pre><code>save_signal(signal) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.context_last_signal","title":"context_last_signal","text":"<pre><code>context_last_signal(with_banner=True, target=stdout, width=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/cpsr/","title":"pwndbg.commands.cpsr","text":""},{"location":"reference/pwndbg/commands/cpsr/#pwndbg.commands.cpsr","title":"cpsr","text":"<p>Functions:</p> <ul> <li> <code>cpsr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/cpsr/#pwndbg.commands.cpsr.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Print out ARM CPSR or xPSR register.')\n</code></pre>"},{"location":"reference/pwndbg/commands/cpsr/#pwndbg.commands.cpsr.cpsr","title":"cpsr","text":"<pre><code>cpsr(cpsr_value=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cyclic/","title":"pwndbg.commands.cyclic","text":""},{"location":"reference/pwndbg/commands/cyclic/#pwndbg.commands.cyclic","title":"cyclic","text":"<p>Functions:</p> <ul> <li> <code>cyclic_cmd</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>group</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/cyclic/#pwndbg.commands.cyclic.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Cyclic pattern creator/finder.')\n</code></pre>"},{"location":"reference/pwndbg/commands/cyclic/#pwndbg.commands.cyclic.group","title":"group <code>module-attribute</code>","text":"<pre><code>group = add_mutually_exclusive_group(required=False)\n</code></pre>"},{"location":"reference/pwndbg/commands/cyclic/#pwndbg.commands.cyclic.cyclic_cmd","title":"cyclic_cmd","text":"<pre><code>cyclic_cmd(\n alphabet, length: int | None, lookup, count=100, filename=\"\"\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/","title":"pwndbg.commands.cymbol","text":""},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol","title":"cymbol","text":"<p>Add, load, show, edit, or delete symbols for custom structures.</p> <p>For the generation of the symbols g++/gcc is being used under the hood.</p> <p>In case of remote debugging a binary which is not native to your architecture it is advised to configure the 'gcc-config-path' config parameter to your own cross-platform gnu gcc compiled toolchain for your target architecture.</p> <p>You are advised to configure the 'cymbol-editor' config parameter to the path of your favorite text editor. Otherwise cymbol exapnds $EDITOR and $VISUAL environment variables to find the path to the default text editor.</p> <p>Functions:</p> <ul> <li> <code>unload_loaded_symbol</code> \u2013 </li> <li> <code>OnlyWhenStructFileExists</code> \u2013 </li> <li> <code>generate_debug_symbols</code> \u2013 </li> <li> <code>add_custom_structure</code> \u2013 </li> <li> <code>add_structure_from_header</code> \u2013 </li> <li> <code>edit_custom_structure</code> \u2013 </li> <li> <code>remove_custom_structure</code> \u2013 </li> <li> <code>load_custom_structure</code> \u2013 </li> <li> <code>show_custom_structure</code> \u2013 </li> <li> <code>cymbol</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>gcc_compiler_path</code> \u2013 </li> <li> <code>cymbol_editor</code> \u2013 </li> <li> <code>loaded_symbols</code> (<code>dict[str, str]</code>) \u2013 </li> <li> <code>pwndbg_cachedir</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.gcc_compiler_path","title":"gcc_compiler_path <code>module-attribute</code>","text":"<pre><code>gcc_compiler_path = add_param(\n \"gcc-compiler-path\",\n \"\",\n \"path to the gcc/g++ toolchain for generating imported symbols\",\n param_class=PARAM_OPTIONAL_FILENAME,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.cymbol_editor","title":"cymbol_editor <code>module-attribute</code>","text":"<pre><code>cymbol_editor = add_param(\n \"cymbol-editor\",\n \"\",\n \"path to the editor for editing custom structures\",\n param_class=PARAM_OPTIONAL_FILENAME,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.loaded_symbols","title":"loaded_symbols <code>module-attribute</code>","text":"<pre><code>loaded_symbols: dict[str, str] = {}\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.pwndbg_cachedir","title":"pwndbg_cachedir <code>module-attribute</code>","text":"<pre><code>pwndbg_cachedir = cachedir('custom-symbols')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Add, show, load, edit, or delete custom structures in plain C.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.unload_loaded_symbol","title":"unload_loaded_symbol","text":"<pre><code>unload_loaded_symbol(custom_structure_name: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.OnlyWhenStructFileExists","title":"OnlyWhenStructFileExists","text":"<pre><code>OnlyWhenStructFileExists(\n func: _OnlyWhenStructFileExists,\n) -> _OnlyWhenStructFileExists\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.generate_debug_symbols","title":"generate_debug_symbols","text":"<pre><code>generate_debug_symbols(\n custom_structure_path: str,\n pwndbg_debug_symbols_output_file: str | None = None,\n) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.add_custom_structure","title":"add_custom_structure","text":"<pre><code>add_custom_structure(custom_structure_name: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.add_structure_from_header","title":"add_structure_from_header","text":"<pre><code>add_structure_from_header(\n header_file: str, custom_structure_name: str = None\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.edit_custom_structure","title":"edit_custom_structure","text":"<pre><code>edit_custom_structure(\n custom_structure_name: str, custom_structure_path: str = \"\"\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.remove_custom_structure","title":"remove_custom_structure","text":"<pre><code>remove_custom_structure(\n custom_structure_name: str, custom_structure_path: str = \"\"\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.load_custom_structure","title":"load_custom_structure","text":"<pre><code>load_custom_structure(\n custom_structure_name: str, custom_structure_path: str = \"\"\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.show_custom_structure","title":"show_custom_structure","text":"<pre><code>show_custom_structure(\n custom_structure_name: str, custom_structure_path: str = \"\"\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.cymbol","title":"cymbol","text":"<pre><code>cymbol(\n add: str, file: str, remove: str, edit: str, load: str, show: str\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/dev/","title":"pwndbg.commands.dev","text":""},{"location":"reference/pwndbg/commands/dev/#pwndbg.commands.dev","title":"dev","text":"<p>Functions:</p> <ul> <li> <code>dev_dump_instruction</code> \u2013 </li> <li> <code>log_level</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/dev/#pwndbg.commands.dev.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Set the log level.')\n</code></pre>"},{"location":"reference/pwndbg/commands/dev/#pwndbg.commands.dev.dev_dump_instruction","title":"dev_dump_instruction","text":"<pre><code>dev_dump_instruction(\n address=None, force_emulate=False, no_emulate=False\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/dev/#pwndbg.commands.dev.log_level","title":"log_level","text":"<pre><code>log_level(level: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/distance/","title":"pwndbg.commands.distance","text":""},{"location":"reference/pwndbg/commands/distance/#pwndbg.commands.distance","title":"distance","text":"<p>Functions:</p> <ul> <li> <code>distance</code> \u2013 <p>Print the distance between the two arguments</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/distance/#pwndbg.commands.distance.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Print the distance between the two arguments, or print the offset to the address's page base.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/distance/#pwndbg.commands.distance.distance","title":"distance","text":"<pre><code>distance(a, b) -> None\n</code></pre> <p>Print the distance between the two arguments</p>"},{"location":"reference/pwndbg/commands/dt/","title":"pwndbg.commands.dt","text":""},{"location":"reference/pwndbg/commands/dt/#pwndbg.commands.dt","title":"dt","text":"<p>Functions:</p> <ul> <li> <code>dt</code> \u2013 <p>Dump out information on a type (e.g. ucontext_t).</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/dt/#pwndbg.commands.dt.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\n Dump out information on a type (e.g. ucontext_t).\\n\\n Optionally overlay that information at an address.\\n \",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/dt/#pwndbg.commands.dt.dt","title":"dt","text":"<pre><code>dt(typename: str, address: int | None = None) -> None\n</code></pre> <p>Dump out information on a type (e.g. ucontext_t).</p> <p>Optionally overlay that information at an address.</p>"},{"location":"reference/pwndbg/commands/dumpargs/","title":"pwndbg.commands.dumpargs","text":""},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs","title":"dumpargs","text":"<p>Functions:</p> <ul> <li> <code>dumpargs</code> \u2013 </li> <li> <code>call_args</code> \u2013 <p>Returns list of resolved call argument strings for display.</p> </li> <li> <code>all_args</code> \u2013 <p>Returns list of all argument strings for display.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Prints determined arguments for call instruction.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs.dumpargs","title":"dumpargs","text":"<pre><code>dumpargs(force: bool = False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs.call_args","title":"call_args","text":"<pre><code>call_args() -> list[str]\n</code></pre> <p>Returns list of resolved call argument strings for display. Attempts to resolve the target and determine the number of arguments. Should be used only when being on a call instruction.</p>"},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs.all_args","title":"all_args","text":"<pre><code>all_args() -> list[str]\n</code></pre> <p>Returns list of all argument strings for display.</p>"},{"location":"reference/pwndbg/commands/elf/","title":"pwndbg.commands.elf","text":""},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf","title":"elf","text":"<p>Functions:</p> <ul> <li> <code>elfsections</code> \u2013 </li> <li> <code>gotplt</code> \u2013 </li> <li> <code>plt</code> \u2013 </li> <li> <code>get_section_bounds</code> \u2013 </li> <li> <code>print_symbols_in_section</code> \u2013 </li> <li> <code>get_symbols_in_region</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.elfsections","title":"elfsections","text":"<pre><code>elfsections() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.gotplt","title":"gotplt","text":"<pre><code>gotplt() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.plt","title":"plt","text":"<pre><code>plt() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.get_section_bounds","title":"get_section_bounds","text":"<pre><code>get_section_bounds(section_name)\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.print_symbols_in_section","title":"print_symbols_in_section","text":"<pre><code>print_symbols_in_section(section_name, filter_text='') -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.get_symbols_in_region","title":"get_symbols_in_region","text":"<pre><code>get_symbols_in_region(start, end, filter_text='')\n</code></pre>"},{"location":"reference/pwndbg/commands/flags/","title":"pwndbg.commands.flags","text":""},{"location":"reference/pwndbg/commands/flags/#pwndbg.commands.flags","title":"flags","text":"<p>Functions:</p> <ul> <li> <code>setflag</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>description</code> \u2013 </li> <li> <code>epilog</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/flags/#pwndbg.commands.flags.description","title":"description <code>module-attribute</code>","text":"<pre><code>description = 'Modify the flags register.'\n</code></pre>"},{"location":"reference/pwndbg/commands/flags/#pwndbg.commands.flags.epilog","title":"epilog <code>module-attribute</code>","text":"<pre><code>epilog = \"Examples:\\n On X86/X64:\\n setflag ZF 1 -- set zero flag\\n setflag CF 0 -- unset carry flag\\n\\n On ARM:\\n setflag Z 0 -- unset the Z cpsr/xpsr flag\\n\\n To see flags registers:\\n info reg eflags -- on x86/x64\\n info reg cpsr/xpsr -- on ARM (specific register may vary)\\n\\n(This command supports flags registers that are defined for architectures in the pwndbg/regs.py file)\\n \"\n</code></pre>"},{"location":"reference/pwndbg/commands/flags/#pwndbg.commands.flags.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=description, epilog=epilog, formatter_class=RawTextHelpFormatter\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/flags/#pwndbg.commands.flags.setflag","title":"setflag","text":"<pre><code>setflag(flag: str, value: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/gdt/","title":"pwndbg.commands.gdt","text":""},{"location":"reference/pwndbg/commands/gdt/#pwndbg.commands.gdt","title":"gdt","text":"<p>Functions:</p> <ul> <li> <code>gdt</code> \u2013 </li> <li> <code>decode_gdt_entry</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/gdt/#pwndbg.commands.gdt.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Decode X86-64 GDT entries at address\\n\\nSee also:\\n* https://wiki.osdev.org/Global_Descriptor_Table\\n* https://wiki.osdev.org/GDT_Tutorial\\n\\nNote:\\nIn 64-bit mode, the Base and Limit values are ignored, each descriptor covers the entire linear address space regardless of what they are set to.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/gdt/#pwndbg.commands.gdt.gdt","title":"gdt","text":"<pre><code>gdt(address, count) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/gdt/#pwndbg.commands.gdt.decode_gdt_entry","title":"decode_gdt_entry","text":"<pre><code>decode_gdt_entry(value)\n</code></pre>"},{"location":"reference/pwndbg/commands/ghidra/","title":"pwndbg.commands.ghidra","text":""},{"location":"reference/pwndbg/commands/ghidra/#pwndbg.commands.ghidra","title":"ghidra","text":"<p>Functions:</p> <ul> <li> <code>ghidra</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ghidra/#pwndbg.commands.ghidra.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Decompile a given function using Ghidra.')\n</code></pre>"},{"location":"reference/pwndbg/commands/ghidra/#pwndbg.commands.ghidra.ghidra","title":"ghidra","text":"<pre><code>ghidra(func) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/godbg/","title":"pwndbg.commands.godbg","text":""},{"location":"reference/pwndbg/commands/godbg/#pwndbg.commands.godbg","title":"godbg","text":"<p>Functions:</p> <ul> <li> <code>go_dump</code> \u2013 </li> <li> <code>go_type</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/godbg/#pwndbg.commands.godbg.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Dumps a Go runtime reflection type at a specified address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/godbg/#pwndbg.commands.godbg.go_dump","title":"go_dump","text":"<pre><code>go_dump(\n ty: str,\n address: int,\n hex: bool,\n decimals: int | None,\n debug: bool,\n pretty: bool,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/godbg/#pwndbg.commands.godbg.go_type","title":"go_type","text":"<pre><code>go_type(address: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/got/","title":"pwndbg.commands.got","text":""},{"location":"reference/pwndbg/commands/got/#pwndbg.commands.got","title":"got","text":"<p>Functions:</p> <ul> <li> <code>got</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>group</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/got/#pwndbg.commands.got.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Show the state of the Global Offset Table.\\n\\nExamples:\\n got\\n got puts\\n got -p libc\\n got -a\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/got/#pwndbg.commands.got.group","title":"group <code>module-attribute</code>","text":"<pre><code>group = add_mutually_exclusive_group()\n</code></pre>"},{"location":"reference/pwndbg/commands/got/#pwndbg.commands.got.got","title":"got","text":"<pre><code>got(\n path_filter: str, all_: bool, accept_readonly: bool, symbol_filter: str\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/","title":"pwndbg.commands.got_tracking","text":""},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking","title":"got_tracking","text":"<p>Functions:</p> <ul> <li> <code>columns</code> \u2013 <p>Print data formatted into distinct columns.</p> </li> <li> <code>track_got</code> \u2013 </li> <li> <code>got_report</code> \u2013 <p>Prints out a report of the current status of the GOT tracker.</p> </li> <li> <code>got_tracking_status</code> \u2013 <p>Prints out information about a single GOT tracking entry.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>subparsers</code> \u2013 </li> <li> <code>enable</code> \u2013 </li> <li> <code>disable</code> \u2013 </li> <li> <code>report</code> \u2013 </li> <li> <code>status</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Controls GOT tracking')\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.subparsers","title":"subparsers <code>module-attribute</code>","text":"<pre><code>subparsers = add_subparsers(\n required=True,\n description=\"Used to disable and query information about the tracker\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.enable","title":"enable <code>module-attribute</code>","text":"<pre><code>enable = add_parser('enable', help='Enable GOT parsing')\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.disable","title":"disable <code>module-attribute</code>","text":"<pre><code>disable = add_parser('disable', help='Disable GOT tracking')\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.report","title":"report <code>module-attribute</code>","text":"<pre><code>report = add_parser('info', help='Give an overview of the GOT tracker')\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.status","title":"status <code>module-attribute</code>","text":"<pre><code>status = add_parser(\n \"query\",\n help=\"Queries detailed tracking information about a single entry in the GOT\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.columns","title":"columns","text":"<pre><code>columns(rows, colors=None) -> None\n</code></pre> <p>Print data formatted into distinct columns.</p>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.track_got","title":"track_got","text":"<pre><code>track_got(mode=None, soname=None, writable=False, fnname=None, address=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.got_report","title":"got_report","text":"<pre><code>got_report(soname='.*', writable=False, fnname='.*') -> None\n</code></pre> <p>Prints out a report of the current status of the GOT tracker.</p>"},{"location":"reference/pwndbg/commands/got_tracking/#pwndbg.commands.got_tracking.got_tracking_status","title":"got_tracking_status","text":"<pre><code>got_tracking_status(address) -> None\n</code></pre> <p>Prints out information about a single GOT tracking entry.</p>"},{"location":"reference/pwndbg/commands/hex2ptr/","title":"pwndbg.commands.hex2ptr","text":""},{"location":"reference/pwndbg/commands/hex2ptr/#pwndbg.commands.hex2ptr","title":"hex2ptr","text":"<p>Functions:</p> <ul> <li> <code>hex2ptr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/hex2ptr/#pwndbg.commands.hex2ptr.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Converts a space-separated hex string to a little-endian address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/hex2ptr/#pwndbg.commands.hex2ptr.hex2ptr","title":"hex2ptr","text":"<pre><code>hex2ptr(hex_string) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/hexdump/","title":"pwndbg.commands.hexdump","text":""},{"location":"reference/pwndbg/commands/hexdump/#pwndbg.commands.hexdump","title":"hexdump","text":"<p>Functions:</p> <ul> <li> <code>address_or_module_name</code> \u2013 </li> <li> <code>hexdump</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/hexdump/#pwndbg.commands.hexdump.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Hexdumps data at the specified address or module name.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/hexdump/#pwndbg.commands.hexdump.address_or_module_name","title":"address_or_module_name","text":"<pre><code>address_or_module_name(s) -> int\n</code></pre>"},{"location":"reference/pwndbg/commands/hexdump/#pwndbg.commands.hexdump.hexdump","title":"hexdump","text":"<pre><code>hexdump(address, count=hexdump_bytes) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/","title":"pwndbg.commands.hijack_fd","text":""},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd","title":"hijack_fd","text":"<p>Classes:</p> <ul> <li> <code>ShellcodeRegs</code> \u2013 </li> <li> <code>ParsedSocket</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>get_shellcode_regs</code> \u2013 </li> <li> <code>stack_size_alignment</code> \u2013 </li> <li> <code>asm_replace_file</code> \u2013 </li> <li> <code>asm_replace_socket</code> \u2013 </li> <li> <code>exec_shellcode_with_stack</code> \u2013 </li> <li> <code>parse_socket</code> \u2013 </li> <li> <code>parse_file_or_socket</code> \u2013 </li> <li> <code>hijack_fd</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>PARSED_FILE_ARG</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Replace a file descriptor of a debugged process.\\n\\nThe new file descriptor can point to:\\n- a file\\n- a pipe\\n- a socket\\n- a device, etc.\\n\\nExamples:\\n1. Redirect STDOUT to a file:\\n `hijack-fd 1 /dev/null`\\n\\n2. Redirect STDERR to a socket:\\n `hijack-fd 2 tcp://localhost:8888`\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.PARSED_FILE_ARG","title":"PARSED_FILE_ARG <code>module-attribute</code>","text":"<pre><code>PARSED_FILE_ARG = Tuple[Optional[ParsedSocket], Optional[str]]\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ShellcodeRegs","title":"ShellcodeRegs","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>newfd</code> (<code>str</code>) \u2013 </li> <li> <code>syscall_ret</code> (<code>str</code>) \u2013 </li> <li> <code>stack</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ShellcodeRegs.newfd","title":"newfd <code>instance-attribute</code>","text":"<pre><code>newfd: str\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ShellcodeRegs.syscall_ret","title":"syscall_ret <code>instance-attribute</code>","text":"<pre><code>syscall_ret: str\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ShellcodeRegs.stack","title":"stack <code>instance-attribute</code>","text":"<pre><code>stack: str\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ParsedSocket","title":"ParsedSocket","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>protocol</code> (<code>Literal['tcp', 'udp']</code>) \u2013 </li> <li> <code>ip_version</code> (<code>Literal['ipv4', 'ipv6']</code>) \u2013 </li> <li> <code>address</code> (<code>str</code>) \u2013 </li> <li> <code>port</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ParsedSocket.protocol","title":"protocol <code>instance-attribute</code>","text":"<pre><code>protocol: Literal['tcp', 'udp']\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ParsedSocket.ip_version","title":"ip_version <code>instance-attribute</code>","text":"<pre><code>ip_version: Literal['ipv4', 'ipv6']\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ParsedSocket.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address: str\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.ParsedSocket.port","title":"port <code>instance-attribute</code>","text":"<pre><code>port: int\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.get_shellcode_regs","title":"get_shellcode_regs","text":"<pre><code>get_shellcode_regs() -> ShellcodeRegs\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.stack_size_alignment","title":"stack_size_alignment","text":"<pre><code>stack_size_alignment(s: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.asm_replace_file","title":"asm_replace_file","text":"<pre><code>asm_replace_file(replace_fd: int, filename: str) -> tuple[int, str]\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.asm_replace_socket","title":"asm_replace_socket","text":"<pre><code>asm_replace_socket(\n replace_fd: int, socket_data: ParsedSocket\n) -> tuple[int, str]\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.exec_shellcode_with_stack","title":"exec_shellcode_with_stack <code>async</code>","text":"<pre><code>exec_shellcode_with_stack(ec: ExecutionController, blob, stack_size: int)\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.parse_socket","title":"parse_socket","text":"<pre><code>parse_socket(url: str) -> ParsedSocket\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.parse_file_or_socket","title":"parse_file_or_socket","text":"<pre><code>parse_file_or_socket(s: str) -> PARSED_FILE_ARG\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/#pwndbg.commands.hijack_fd.hijack_fd","title":"hijack_fd","text":"<pre><code>hijack_fd(fdnum: int, newfile: PARSED_FILE_ARG) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ida/","title":"pwndbg.commands.ida","text":""},{"location":"reference/pwndbg/commands/ida/#pwndbg.commands.ida","title":"ida","text":"<p>Functions:</p> <ul> <li> <code>j</code> \u2013 <p>Synchronize IDA's cursor with GDB</p> </li> <li> <code>up</code> \u2013 <p>Select and print stack frame that called this one.</p> </li> <li> <code>down</code> \u2013 <p>Select and print stack frame called by this one.</p> </li> <li> <code>save_ida</code> \u2013 <p>Save the IDA database</p> </li> <li> <code>ida</code> \u2013 <p>Evaluate ida.LocByName() on the supplied value.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ida/#pwndbg.commands.ida.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Select and print stack frame called by this one.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ida/#pwndbg.commands.ida.j","title":"j","text":"<pre><code>j(*args) -> None\n</code></pre> <p>Synchronize IDA's cursor with GDB</p>"},{"location":"reference/pwndbg/commands/ida/#pwndbg.commands.ida.up","title":"up","text":"<pre><code>up(n=1) -> None\n</code></pre> <p>Select and print stack frame that called this one.</p>"},{"location":"reference/pwndbg/commands/ida/#pwndbg.commands.ida.down","title":"down","text":"<pre><code>down(n=1) -> None\n</code></pre> <p>Select and print stack frame called by this one.</p>"},{"location":"reference/pwndbg/commands/ida/#pwndbg.commands.ida.save_ida","title":"save_ida","text":"<pre><code>save_ida() -> None\n</code></pre> <p>Save the IDA database</p>"},{"location":"reference/pwndbg/commands/ida/#pwndbg.commands.ida.ida","title":"ida","text":"<pre><code>ida(name)\n</code></pre> <p>Evaluate ida.LocByName() on the supplied value.</p>"},{"location":"reference/pwndbg/commands/ignore/","title":"pwndbg.commands.ignore","text":""},{"location":"reference/pwndbg/commands/ignore/#pwndbg.commands.ignore","title":"ignore","text":"<p>Ignoring a breakpoint</p> <p>Functions:</p> <ul> <li> <code>ignore</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ignore/#pwndbg.commands.ignore.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Set ignore-count of breakpoint number N to COUNT.\\n\\nWhile the ignore count is positive, execution will not stop on the breakpoint.\\n\\nBy default, if `N' is ommitted, the last breakpoint (i.e. greatest breakpoint number) will be used.\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ignore/#pwndbg.commands.ignore.ignore","title":"ignore","text":"<pre><code>ignore(bpnum, count) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/integration/","title":"pwndbg.commands.integration","text":""},{"location":"reference/pwndbg/commands/integration/#pwndbg.commands.integration","title":"integration","text":"<p>Functions:</p> <ul> <li> <code>decomp</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/integration/#pwndbg.commands.integration.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Use the current integration to decompile code near an address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/integration/#pwndbg.commands.integration.decomp","title":"decomp","text":"<pre><code>decomp(addr: int | None, lines: int | None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ipython_interactive/","title":"pwndbg.commands.ipython_interactive","text":""},{"location":"reference/pwndbg/commands/ipython_interactive/#pwndbg.commands.ipython_interactive","title":"ipython_interactive","text":"<p>Command to start an interactive IPython prompt.</p> <p>Functions:</p> <ul> <li> <code>switch_to_ipython_env</code> \u2013 <p>We need to change stdout/stderr to the default ones, otherwise we can't use tab or autocomplete</p> </li> <li> <code>ipi</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ipython_interactive/#pwndbg.commands.ipython_interactive.switch_to_ipython_env","title":"switch_to_ipython_env","text":"<pre><code>switch_to_ipython_env()\n</code></pre> <p>We need to change stdout/stderr to the default ones, otherwise we can't use tab or autocomplete</p>"},{"location":"reference/pwndbg/commands/ipython_interactive/#pwndbg.commands.ipython_interactive.ipi","title":"ipi","text":"<pre><code>ipi() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/jemalloc/","title":"pwndbg.commands.jemalloc","text":""},{"location":"reference/pwndbg/commands/jemalloc/#pwndbg.commands.jemalloc","title":"jemalloc","text":"<p>Functions:</p> <ul> <li> <code>jemalloc_find_extent</code> \u2013 </li> <li> <code>jemalloc_extent_info</code> \u2013 </li> <li> <code>jemalloc_heap</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/jemalloc/#pwndbg.commands.jemalloc.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Prints all extents information')\n</code></pre>"},{"location":"reference/pwndbg/commands/jemalloc/#pwndbg.commands.jemalloc.jemalloc_find_extent","title":"jemalloc_find_extent","text":"<pre><code>jemalloc_find_extent(addr) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/jemalloc/#pwndbg.commands.jemalloc.jemalloc_extent_info","title":"jemalloc_extent_info","text":"<pre><code>jemalloc_extent_info(addr, verbose=False, header=True) -> bool\n</code></pre>"},{"location":"reference/pwndbg/commands/jemalloc/#pwndbg.commands.jemalloc.jemalloc_heap","title":"jemalloc_heap","text":"<pre><code>jemalloc_heap() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/kbase/","title":"pwndbg.commands.kbase","text":""},{"location":"reference/pwndbg/commands/kbase/#pwndbg.commands.kbase","title":"kbase","text":"<p>Functions:</p> <ul> <li> <code>kbase</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kbase/#pwndbg.commands.kbase.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Finds the kernel virtual base address.')\n</code></pre>"},{"location":"reference/pwndbg/commands/kbase/#pwndbg.commands.kbase.kbase","title":"kbase","text":"<pre><code>kbase(rebase=False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/kchecksec/","title":"pwndbg.commands.kchecksec","text":""},{"location":"reference/pwndbg/commands/kchecksec/#pwndbg.commands.kchecksec","title":"kchecksec","text":"<p>Classes:</p> <ul> <li> <code>Option</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>kchecksec</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kchecksec/#pwndbg.commands.kchecksec.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Checks for kernel hardening configuration options.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/kchecksec/#pwndbg.commands.kchecksec.Option","title":"Option","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>desired</code> (<code>bool</code>) \u2013 </li> <li> <code>cmdline_option</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kchecksec/#pwndbg.commands.kchecksec.Option.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/commands/kchecksec/#pwndbg.commands.kchecksec.Option.desired","title":"desired <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>desired: bool = True\n</code></pre>"},{"location":"reference/pwndbg/commands/kchecksec/#pwndbg.commands.kchecksec.Option.cmdline_option","title":"cmdline_option <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>cmdline_option: str = None\n</code></pre>"},{"location":"reference/pwndbg/commands/kchecksec/#pwndbg.commands.kchecksec.kchecksec","title":"kchecksec","text":"<pre><code>kchecksec() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/kcmdline/","title":"pwndbg.commands.kcmdline","text":""},{"location":"reference/pwndbg/commands/kcmdline/#pwndbg.commands.kcmdline","title":"kcmdline","text":"<p>Functions:</p> <ul> <li> <code>kcmdline</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kcmdline/#pwndbg.commands.kcmdline.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Return the kernel commandline (/proc/cmdline).\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/kcmdline/#pwndbg.commands.kcmdline.kcmdline","title":"kcmdline","text":"<pre><code>kcmdline() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/kconfig/","title":"pwndbg.commands.kconfig","text":""},{"location":"reference/pwndbg/commands/kconfig/#pwndbg.commands.kconfig","title":"kconfig","text":"<p>Functions:</p> <ul> <li> <code>kconfig</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kconfig/#pwndbg.commands.kconfig.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Outputs the kernel config (requires CONFIG_IKCONFIG).\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/kconfig/#pwndbg.commands.kconfig.kconfig","title":"kconfig","text":"<pre><code>kconfig(config_name=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/killthreads/","title":"pwndbg.commands.killthreads","text":""},{"location":"reference/pwndbg/commands/killthreads/#pwndbg.commands.killthreads","title":"killthreads","text":"<p>Functions:</p> <ul> <li> <code>killthreads</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/killthreads/#pwndbg.commands.killthreads.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Kill all or given threads.\\n\\nSwitches to given threads and calls pthread_exit(0) on them.\\nThis is performed with scheduler-locking to prevent other threads from operating at the same time.\\n\\nKilling all other threads may be useful to use GDB checkpoints, e.g., to test given input & restart the execution to the point of interest (checkpoint).\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/killthreads/#pwndbg.commands.killthreads.killthreads","title":"killthreads","text":"<pre><code>killthreads(thread_ids: list[int] | None = None, all: bool = False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/klookup/","title":"pwndbg.commands.klookup","text":""},{"location":"reference/pwndbg/commands/klookup/#pwndbg.commands.klookup","title":"klookup","text":"<p>Functions:</p> <ul> <li> <code>klookup</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/klookup/#pwndbg.commands.klookup.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Lookup kernel symbols')\n</code></pre>"},{"location":"reference/pwndbg/commands/klookup/#pwndbg.commands.klookup.klookup","title":"klookup","text":"<pre><code>klookup(symbol: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/","title":"pwndbg.commands.knft","text":""},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft","title":"knft","text":"<p>Functions:</p> <ul> <li> <code>parse_nft_family</code> \u2013 </li> <li> <code>knft_dump</code> \u2013 </li> <li> <code>knft_list_tables</code> \u2013 </li> <li> <code>knft_list_chains</code> \u2013 </li> <li> <code>knft_list_rules</code> \u2013 </li> <li> <code>knft_list_exprs</code> \u2013 </li> <li> <code>knft_list_sets</code> \u2013 </li> <li> <code>knft_list_objects</code> \u2013 </li> <li> <code>knft_list_flowtables</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Dump netfilter flowtables from a specific table\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.parse_nft_family","title":"parse_nft_family","text":"<pre><code>parse_nft_family(s: str) -> int\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_dump","title":"knft_dump","text":"<pre><code>knft_dump(nsid: int | None = None)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_list_tables","title":"knft_list_tables","text":"<pre><code>knft_list_tables(nsid: int | None = None)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_list_chains","title":"knft_list_chains","text":"<pre><code>knft_list_chains(\n table_family: int | None = None,\n table_name: str | None = None,\n nsid: int | None = None,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_list_rules","title":"knft_list_rules","text":"<pre><code>knft_list_rules(\n table_family: int | None = None,\n table_name: str | None = None,\n chain_name: str | None = None,\n nsid: int | None = None,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_list_exprs","title":"knft_list_exprs","text":"<pre><code>knft_list_exprs(\n table_family: int | None = None,\n table_name: str | None = None,\n chain_name: str | None = None,\n rule_id: int | None = None,\n nsid: int | None = None,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_list_sets","title":"knft_list_sets","text":"<pre><code>knft_list_sets(\n table_family: int | None = None,\n table_name: str | None = None,\n nsid: int | None = None,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_list_objects","title":"knft_list_objects","text":"<pre><code>knft_list_objects(\n table_family: int | None = None,\n table_name: str | None = None,\n nsid: int | None = None,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/#pwndbg.commands.knft.knft_list_flowtables","title":"knft_list_flowtables","text":"<pre><code>knft_list_flowtables(\n table_family: int | None = None,\n table_name: str | None = None,\n nsid: int | None = None,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/kversion/","title":"pwndbg.commands.kversion","text":""},{"location":"reference/pwndbg/commands/kversion/#pwndbg.commands.kversion","title":"kversion","text":"<p>Functions:</p> <ul> <li> <code>kversion</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kversion/#pwndbg.commands.kversion.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Outputs the kernel version (/proc/version).\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/kversion/#pwndbg.commands.kversion.kversion","title":"kversion","text":"<pre><code>kversion() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/leakfind/","title":"pwndbg.commands.leakfind","text":""},{"location":"reference/pwndbg/commands/leakfind/#pwndbg.commands.leakfind","title":"leakfind","text":"<p>Find a chain of leaks given some starting address.</p> <p>Functions:</p> <ul> <li> <code>get_rec_addr_string</code> \u2013 </li> <li> <code>dbg_print_map</code> \u2013 </li> <li> <code>leakfind</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/leakfind/#pwndbg.commands.leakfind.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\nAttempt to find a leak chain given a starting address.\\nScans memory near the given address, looks for pointers, and continues that process to attempt to find leaks.\\n\\nExample: leakfind $rsp --page_name=filename --max_offset=0x48 --max_depth=6. This would look for any chains of leaks that point to a section in filename which begin near $rsp, are never 0x48 bytes further from a known pointer, and are a maximum length of 6.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/leakfind/#pwndbg.commands.leakfind.get_rec_addr_string","title":"get_rec_addr_string","text":"<pre><code>get_rec_addr_string(addr, visited_map)\n</code></pre>"},{"location":"reference/pwndbg/commands/leakfind/#pwndbg.commands.leakfind.dbg_print_map","title":"dbg_print_map","text":"<pre><code>dbg_print_map(maps) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/leakfind/#pwndbg.commands.leakfind.leakfind","title":"leakfind","text":"<pre><code>leakfind(\n address=None,\n page_name=None,\n max_offset: int = 64,\n max_depth: int = 4,\n step: int = 1,\n negative_offset: int = 0,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/libcinfo/","title":"pwndbg.commands.libcinfo","text":""},{"location":"reference/pwndbg/commands/libcinfo/#pwndbg.commands.libcinfo","title":"libcinfo","text":"<p>Functions:</p> <ul> <li> <code>libcinfo</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/libcinfo/#pwndbg.commands.libcinfo.libcinfo","title":"libcinfo","text":"<pre><code>libcinfo()\n</code></pre>"},{"location":"reference/pwndbg/commands/linkmap/","title":"pwndbg.commands.linkmap","text":""},{"location":"reference/pwndbg/commands/linkmap/#pwndbg.commands.linkmap","title":"linkmap","text":"<p>Functions:</p> <ul> <li> <code>linkmap</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/linkmap/#pwndbg.commands.linkmap.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Show the state of the Link Map')\n</code></pre>"},{"location":"reference/pwndbg/commands/linkmap/#pwndbg.commands.linkmap.linkmap","title":"linkmap","text":"<pre><code>linkmap() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/memoize/","title":"pwndbg.commands.memoize","text":""},{"location":"reference/pwndbg/commands/memoize/#pwndbg.commands.memoize","title":"memoize","text":"<p>Functions:</p> <ul> <li> <code>memoize</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/memoize/#pwndbg.commands.memoize.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\nToggles memoization (caching).\\n\\nUseful for diagnosing caching-related bugs. Decreases performance.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/memoize/#pwndbg.commands.memoize.memoize","title":"memoize","text":"<pre><code>memoize() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/","title":"pwndbg.commands.misc","text":""},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc","title":"misc","text":"<p>Functions:</p> <ul> <li> <code>errno_</code> \u2013 </li> <li> <code>pwndbg_</code> \u2013 </li> <li> <code>list_and_filter_commands</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>group</code> \u2013 </li> <li> <code>cat_group</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description=\"Prints out a list of all pwndbg commands.\")\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc.group","title":"group <code>module-attribute</code>","text":"<pre><code>group = add_mutually_exclusive_group()\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc.cat_group","title":"cat_group <code>module-attribute</code>","text":"<pre><code>cat_group = add_mutually_exclusive_group()\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc.errno_","title":"errno_","text":"<pre><code>errno_(err) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc.pwndbg_","title":"pwndbg_","text":"<pre><code>pwndbg_(filter_pattern, shell, all_, category_, list_categories) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc.list_and_filter_commands","title":"list_and_filter_commands","text":"<pre><code>list_and_filter_commands(filter_str, pwndbg_cmds=True, shell_cmds=False)\n</code></pre>"},{"location":"reference/pwndbg/commands/mmap/","title":"pwndbg.commands.mmap","text":""},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap","title":"mmap","text":"<p>Functions:</p> <ul> <li> <code>prot_str_to_val</code> \u2013 <p>Heuristic to convert PROT_EXEC|PROT_WRITE to integer value.</p> </li> <li> <code>flag_str_to_val</code> \u2013 <p>Heuristic to convert MAP_SHARED|MAP_FIXED to integer value.</p> </li> <li> <code>parse_str_or_int</code> \u2013 <p>Try parsing a string with one of the parsers above or by converting it to</p> </li> <li> <code>mmap</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>prot_dict</code> \u2013 </li> <li> <code>flag_dict</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\nCalls the mmap syscall and prints its resulting address.\\n\\nNote that the mmap syscall may fail for various reasons\\n(see `man mmap`) and, in case of failure, its return value\\nwill not be a valid pointer.\\n\\nPROT values: NONE (0), READ (1), WRITE (2), EXEC (4)\\nMAP values: SHARED (1), PRIVATE (2), SHARED_VALIDATE (3), FIXED (0x10),\\n ANONYMOUS (0x20)\\n\\nFlags and protection values can be either a string containing the names of the\\nflags or permissions or a single number corresponding to the bitwise OR of the\\nprotection and flag numbers.\\n\\nExamples:\\n mmap 0x0 4096 PROT_READ|PROT_WRITE|PROT_EXEC MAP_PRIVATE|MAP_ANONYMOUS -1 0\\n - Maps a new private+anonymous page with RWX permissions at a location\\n decided by the kernel.\\n\\n mmap 0x0 4096 PROT_READ MAP_PRIVATE 10 0\\n - Maps 4096 bytes of the file pointed to by file descriptor number 10 with\\n read permission at a location decided by the kernel.\\n\\n mmap 0xdeadbeef 0x1000\\n - Maps a new private+anonymous page with RWX permissions at a page boundary\\n near 0xdeadbeef.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap.prot_dict","title":"prot_dict <code>module-attribute</code>","text":"<pre><code>prot_dict = {'PROT_NONE': 0, 'PROT_READ': 1, 'PROT_WRITE': 2, 'PROT_EXEC': 4}\n</code></pre>"},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap.flag_dict","title":"flag_dict <code>module-attribute</code>","text":"<pre><code>flag_dict = {\n \"MAP_SHARED\": 1,\n \"MAP_PRIVATE\": 2,\n \"MAP_SHARED_VALIDATE\": 3,\n \"MAP_FIXED\": 16,\n \"MAP_ANONYMOUS\": 32,\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap.prot_str_to_val","title":"prot_str_to_val","text":"<pre><code>prot_str_to_val(protstr)\n</code></pre> <p>Heuristic to convert PROT_EXEC|PROT_WRITE to integer value.</p>"},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap.flag_str_to_val","title":"flag_str_to_val","text":"<pre><code>flag_str_to_val(flagstr)\n</code></pre> <p>Heuristic to convert MAP_SHARED|MAP_FIXED to integer value.</p>"},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap.parse_str_or_int","title":"parse_str_or_int","text":"<pre><code>parse_str_or_int(val: str | int, parser)\n</code></pre> <p>Try parsing a string with one of the parsers above or by converting it to an int, or passes the value through if it is already an integer.</p>"},{"location":"reference/pwndbg/commands/mmap/#pwndbg.commands.mmap.mmap","title":"mmap","text":"<pre><code>mmap(\n addr, length, prot=7, flags=34, fd=-1, offset=0, quiet=False, force=False\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/mprotect/","title":"pwndbg.commands.mprotect","text":""},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect","title":"mprotect","text":"<p>Functions:</p> <ul> <li> <code>prot_str_to_val</code> \u2013 <p>Converts a protection string to an integer. Formats include:</p> </li> <li> <code>prot_val_to_str</code> \u2013 </li> <li> <code>mprotect</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>SYS_MPROTECT</code> \u2013 </li> <li> <code>prot_dict</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\nCalls the mprotect syscall and prints its result value.\\n\\nNote that the mprotect syscall may fail for various reasons\\n(see `man mprotect`) and a non-zero error return value\\ncan be decoded with the `errno <value>` command.\\n\\nExamples:\\n mprotect $rsp 4096 PROT_READ|PROT_WRITE|PROT_EXEC\\n mprotect $rsp 4096 rwx\\n mprotect $rsp 4096 7\\n mprotect some_symbol 0x1000 PROT_NONE\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect.SYS_MPROTECT","title":"SYS_MPROTECT <code>module-attribute</code>","text":"<pre><code>SYS_MPROTECT = 125\n</code></pre>"},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect.prot_dict","title":"prot_dict <code>module-attribute</code>","text":"<pre><code>prot_dict = {'PROT_NONE': 0, 'PROT_READ': 1, 'PROT_WRITE': 2, 'PROT_EXEC': 4}\n</code></pre>"},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect.prot_str_to_val","title":"prot_str_to_val","text":"<pre><code>prot_str_to_val(protstr: str) -> int\n</code></pre> <p>Converts a protection string to an integer. Formats include: - A positive integer, like 3 - A combination of r, w, and x, like rw - A combination of PROT_READ, PROT_WRITE, and PROT_EXEC, like PROT_READ|PROT_WRITE</p>"},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect.prot_val_to_str","title":"prot_val_to_str","text":"<pre><code>prot_val_to_str(protval: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect.mprotect","title":"mprotect","text":"<pre><code>mprotect(addr, length, prot) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/nearpc/","title":"pwndbg.commands.nearpc","text":""},{"location":"reference/pwndbg/commands/nearpc/#pwndbg.commands.nearpc","title":"nearpc","text":"<p>Functions:</p> <ul> <li> <code>nearpc</code> \u2013 <p>Disassemble near a specified address.</p> </li> <li> <code>emulate</code> \u2013 <p>Like nearpc, but will emulate instructions from the current $PC forward.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/nearpc/#pwndbg.commands.nearpc.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Like nearpc, but will emulate instructions from the current $PC forward.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/nearpc/#pwndbg.commands.nearpc.nearpc","title":"nearpc","text":"<pre><code>nearpc(\n pc=None, lines=None, emulate=False, use_cache=False, linear=True\n) -> None\n</code></pre> <p>Disassemble near a specified address.</p>"},{"location":"reference/pwndbg/commands/nearpc/#pwndbg.commands.nearpc.emulate","title":"emulate","text":"<pre><code>emulate(pc=None, lines=None, emulate_=True) -> None\n</code></pre> <p>Like nearpc, but will emulate instructions from the current $PC forward.</p>"},{"location":"reference/pwndbg/commands/next/","title":"pwndbg.commands.next","text":""},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next","title":"next","text":"<p>Stepping until an event occurs</p> <p>Functions:</p> <ul> <li> <code>nextjmp</code> \u2013 <p>Breaks at the next jump instruction</p> </li> <li> <code>nextcall</code> \u2013 <p>Breaks at the next call instruction</p> </li> <li> <code>nextret</code> \u2013 <p>Breaks at next return-like instruction</p> </li> <li> <code>stepret</code> \u2013 <p>Breaks at next return-like instruction by 'stepping' to it</p> </li> <li> <code>nextproginstr</code> \u2013 </li> <li> <code>stepover</code> \u2013 <p>Sets a breakpoint on the instruction after this one</p> </li> <li> <code>nextsyscall</code> \u2013 <p>Breaks at the next syscall not taking branches.</p> </li> <li> <code>stepsyscall</code> \u2013 <p>Breaks at the next syscall by taking branches.</p> </li> <li> <code>stepuntilasm</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Breaks on the next matching instruction.')\n</code></pre>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.nextjmp","title":"nextjmp","text":"<pre><code>nextjmp() -> None\n</code></pre> <p>Breaks at the next jump instruction</p>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.nextcall","title":"nextcall","text":"<pre><code>nextcall(symbol_regex=None) -> None\n</code></pre> <p>Breaks at the next call instruction</p>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.nextret","title":"nextret","text":"<pre><code>nextret() -> None\n</code></pre> <p>Breaks at next return-like instruction</p>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.stepret","title":"stepret","text":"<pre><code>stepret() -> None\n</code></pre> <p>Breaks at next return-like instruction by 'stepping' to it</p>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.nextproginstr","title":"nextproginstr","text":"<pre><code>nextproginstr() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.stepover","title":"stepover","text":"<pre><code>stepover(addr=None) -> None\n</code></pre> <p>Sets a breakpoint on the instruction after this one</p>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.nextsyscall","title":"nextsyscall","text":"<pre><code>nextsyscall() -> None\n</code></pre> <p>Breaks at the next syscall not taking branches.</p>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.stepsyscall","title":"stepsyscall","text":"<pre><code>stepsyscall() -> None\n</code></pre> <p>Breaks at the next syscall by taking branches.</p>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.stepuntilasm","title":"stepuntilasm","text":"<pre><code>stepuntilasm(mnemonic, op_str) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/onegadget/","title":"pwndbg.commands.onegadget","text":""},{"location":"reference/pwndbg/commands/onegadget/#pwndbg.commands.onegadget","title":"onegadget","text":"<p>Functions:</p> <ul> <li> <code>onegadget</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/onegadget/#pwndbg.commands.onegadget.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\nFind gadgets which single-handedly give code execution.\\n\\nUses the onegadget tool by david942j.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/onegadget/#pwndbg.commands.onegadget.onegadget","title":"onegadget","text":"<pre><code>onegadget(\n show_unsat: bool = False, no_unknown: bool = False, verbose: bool = False\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/","title":"pwndbg.commands.p2p","text":""},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p","title":"p2p","text":"<p>Classes:</p> <ul> <li> <code>AddrRange</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>get_addrrange_any_named</code> \u2013 </li> <li> <code>address_range_explicit</code> \u2013 </li> <li> <code>address_range</code> \u2013 </li> <li> <code>maybe_points_to_ranges</code> \u2013 </li> <li> <code>p2p_walk</code> \u2013 </li> <li> <code>p2p</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ts</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.ts","title":"ts <code>module-attribute</code>","text":"<pre><code>ts = telescope\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Pointer to pointer chain search. Searches given mapping for all pointers that point to specified mapping.\\n\\nAny chain length greater than 0 is valid. If only one mapping is given it just looks for any pointers in that mapping.\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.AddrRange","title":"AddrRange","text":"<pre><code>AddrRange(begin: int, end: int)\n</code></pre> <p>Methods:</p> <ul> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>begin</code> \u2013 </li> <li> <code>end</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.AddrRange.begin","title":"begin <code>instance-attribute</code>","text":"<pre><code>begin = begin\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.AddrRange.end","title":"end <code>instance-attribute</code>","text":"<pre><code>end = end\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.AddrRange.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.get_addrrange_any_named","title":"get_addrrange_any_named","text":"<pre><code>get_addrrange_any_named() -> list[AddrRange]\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.address_range_explicit","title":"address_range_explicit","text":"<pre><code>address_range_explicit(section: str) -> AddrRange\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.address_range","title":"address_range","text":"<pre><code>address_range(section: str) -> list[AddrRange] | tuple[int, int] | None\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.maybe_points_to_ranges","title":"maybe_points_to_ranges","text":"<pre><code>maybe_points_to_ranges(ptr: int, rs: list[AddrRange])\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.p2p_walk","title":"p2p_walk","text":"<pre><code>p2p_walk(\n addr: int, ranges: list[list[AddrRange]], current_level: int\n) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.p2p","title":"p2p","text":"<pre><code>p2p(mapping_names: list[list[AddrRange]] | None = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/","title":"pwndbg.commands.patch","text":""},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch","title":"patch","text":"<p>Functions:</p> <ul> <li> <code>patch</code> \u2013 </li> <li> <code>patch_revert</code> \u2013 </li> <li> <code>patch_list</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>patches</code> (<code>dict[int, tuple[bytearray, bytearray]]</code>) \u2013 </li> <li> <code>parser</code> \u2013 </li> <li> <code>parser2</code> \u2013 </li> <li> <code>parser3</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.patches","title":"patches <code>module-attribute</code>","text":"<pre><code>patches: dict[int, tuple[bytearray, bytearray]] = {}\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Patches given instruction with given code or bytes.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.parser2","title":"parser2 <code>module-attribute</code>","text":"<pre><code>parser2 = ArgumentParser(description='Revert patch at given address.')\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.parser3","title":"parser3 <code>module-attribute</code>","text":"<pre><code>parser3 = ArgumentParser(description='List all patches.')\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.patch","title":"patch","text":"<pre><code>patch(address: int, ins: str, quiet: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.patch_revert","title":"patch_revert","text":"<pre><code>patch_revert(address: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.patch_list","title":"patch_list","text":"<pre><code>patch_list() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/pcplist/","title":"pwndbg.commands.pcplist","text":""},{"location":"reference/pwndbg/commands/pcplist/#pwndbg.commands.pcplist","title":"pcplist","text":"<p>Functions:</p> <ul> <li> <code>print_zone</code> \u2013 </li> <li> <code>pcplist</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>log</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/pcplist/#pwndbg.commands.pcplist.log","title":"log <code>module-attribute</code>","text":"<pre><code>log = getLogger(__name__)\n</code></pre>"},{"location":"reference/pwndbg/commands/pcplist/#pwndbg.commands.pcplist.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Print Per-CPU page list')\n</code></pre>"},{"location":"reference/pwndbg/commands/pcplist/#pwndbg.commands.pcplist.print_zone","title":"print_zone","text":"<pre><code>print_zone(zone: int, list_num=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/pcplist/#pwndbg.commands.pcplist.pcplist","title":"pcplist","text":"<pre><code>pcplist(zone: int = None, list_num: int = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/peda/","title":"pwndbg.commands.peda","text":""},{"location":"reference/pwndbg/commands/peda/#pwndbg.commands.peda","title":"peda","text":"<p>Functions:</p> <ul> <li> <code>getfile</code> \u2013 </li> <li> <code>xuntil</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/peda/#pwndbg.commands.peda.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Continue execution until an address or expression.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/peda/#pwndbg.commands.peda.getfile","title":"getfile","text":"<pre><code>getfile() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/peda/#pwndbg.commands.peda.xuntil","title":"xuntil","text":"<pre><code>xuntil(target) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/pie/","title":"pwndbg.commands.pie","text":""},{"location":"reference/pwndbg/commands/pie/#pwndbg.commands.pie","title":"pie","text":"<p>Functions:</p> <ul> <li> <code>translate_addr</code> \u2013 </li> <li> <code>piebase</code> \u2013 </li> <li> <code>breakrva</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/pie/#pwndbg.commands.pie.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Calculate VA of RVA from PIE base.')\n</code></pre>"},{"location":"reference/pwndbg/commands/pie/#pwndbg.commands.pie.translate_addr","title":"translate_addr","text":"<pre><code>translate_addr(offset, module)\n</code></pre>"},{"location":"reference/pwndbg/commands/pie/#pwndbg.commands.pie.piebase","title":"piebase","text":"<pre><code>piebase(offset=None, module=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/pie/#pwndbg.commands.pie.breakrva","title":"breakrva","text":"<pre><code>breakrva(offset=0, module=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/plist/","title":"pwndbg.commands.plist","text":""},{"location":"reference/pwndbg/commands/plist/#pwndbg.commands.plist","title":"plist","text":"<p>Functions:</p> <ul> <li> <code>plist</code> \u2013 </li> <li> <code>bit_offset_of_field</code> \u2013 </li> <li> <code>get_byte_offset</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/plist/#pwndbg.commands.plist.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Dumps the elements of a linked list.\\n\\nThis command traverses the linked list beginning at a given element, dumping its\\ncontents and the contents of all the elements that come after it in the list.\\nTraversal is configurable and can handle multiple types of linked lists, but will\\nalways stop when a cycle is detected.\\n\\nThe path to the first element can be any GDB expression that evaluates to either\\nthe first element directly, or a to pointer to it. The next element is the name\\nof the field containing the next pointer, in either the structure itself or in\\nthe structure given by --inner.\\n\\nAn address value may be given with --sentinel that signals the end of the list.\\nBy default, the value used is NULL (0).\\n\\nIf only one field inside each node is desired, it can be printed exclusively by\\nspecifying its name with --field.\\n\\nThis command supports traversing three types of linked lists, classified by how\\nthe next pointer can be found in the structure and what type it is:\\n 1 - Next pointer is field of structure, type is the same as structure.\\n 2 - Next pointer is field of inner nested structure, pointed to type is the\\n same as outer structure.\\n 3 - Next pointer is field of inner nested structure, pointed to type is the\\n same as inner structure.\\nTypes 2 and 3 require --inner to be specified.\\n\\nExample 1:\\n\\n```\\nstruct node {\\n int value;\\n struct node *next;\\n};\\nstruct node node_c = { 2, NULL };\\nstruct node node_b = { 1, &node_c };\\nstruct node node_a = { 0, &node_b };\\n```\\n\\npwndbg> plist node_a next\\n0x4000011050 <node_a>: {\\n value = 0,\\n next = 0x4000011040 <node_b>\\n}\\n0x4000011040 <node_b>: {\\n value = 1,\\n next = 0x4000011010 <node_c>\\n}\\n0x4000011010 <node_c>: {\\n value = 2,\\n next = 0x0\\n}\\n\\nExample 2:\\n\\n```\\nstruct node_inner_a {\\n struct node_inner_a *next;\\n};\\nstruct inner_a_node {\\n int value;\\n struct node_inner_a inner;\\n};\\nstruct inner_a_node inner_a_node_c = { 2, { NULL } };\\nstruct inner_a_node inner_a_node_b = { 1, { &inner_a_node_c.inner } };\\nstruct inner_a_node inner_a_node_a = { 0, { &inner_a_node_b.inner } };\\n```\\n\\npwndbg> plist inner_a_node_a -i inner next\\n0x4000011070 <inner_a_node_a>: {\\n value = 0,\\n inner = {\\n next = 0x4000011068 <inner_a_node_b+8>\\n }\\n}\\n0x4000011060 <inner_a_node_b>: {\\n value = 1,\\n inner = {\\n next = 0x4000011028 <inner_a_node_c+8>\\n }\\n}\\n0x4000011020 <inner_a_node_c>: {\\n value = 2,\\n inner = {\\n next = 0x0\\n }\\n}\\n\\nExample 3:\\n\\n```\\nstruct inner_b_node;\\nstruct node_inner_b {\\n struct inner_b_node *next;\\n};\\nstruct inner_b_node {\\n int value;\\n struct node_inner_b inner;\\n};\\nstruct inner_b_node inner_b_node_c = { 2, { NULL } };\\nstruct inner_b_node inner_b_node_b = { 1, { &inner_b_node_c } };\\nstruct inner_b_node inner_b_node_a = { 0, { &inner_b_node_b } };\\n```\\n\\npwndbg> plist inner_b_node_a -i inner next\\n0x4000011090 <inner_b_node_a>: {\\n value = 0,\\n inner = {\\n next = 0x4000011080 <inner_b_node_b>\\n }\\n}\\n0x4000011080 <inner_b_node_b>: {\\n value = 1,\\n inner = {\\n next = 0x4000011030 <inner_b_node_c>\\n }\\n}\\n0x4000011030 <inner_b_node_c>: {\\n value = 2,\\n inner = {\\n next = 0x0\\n }\\n}\\n\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/plist/#pwndbg.commands.plist.plist","title":"plist","text":"<pre><code>plist(\n path: str,\n next: str,\n sentinel: int,\n inner_name: str | None,\n field_name: str | None,\n offset: int,\n count: int | None = None,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/plist/#pwndbg.commands.plist.bit_offset_of_field","title":"bit_offset_of_field","text":"<pre><code>bit_offset_of_field(struct, field_name, inner_name=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/plist/#pwndbg.commands.plist.get_byte_offset","title":"get_byte_offset","text":"<pre><code>get_byte_offset(bit_offset)\n</code></pre>"},{"location":"reference/pwndbg/commands/probeleak/","title":"pwndbg.commands.probeleak","text":""},{"location":"reference/pwndbg/commands/probeleak/#pwndbg.commands.probeleak","title":"probeleak","text":"<p>Functions:</p> <ul> <li> <code>find_module</code> \u2013 </li> <li> <code>satisfied_flags</code> \u2013 </li> <li> <code>flags_str2int</code> \u2013 </li> <li> <code>probeleak</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/probeleak/#pwndbg.commands.probeleak.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"\\nPointer scan for possible offset leaks.\\nExamples:\\n probeleak $rsp 0x64 - leaks 0x64 bytes starting at stack pointer and search for valid pointers\\n probeleak $rsp 0x64 --max-dist 0x10 - as above, but pointers may point 0x10 bytes outside of memory page\\n probeleak $rsp 0x64 --point-to libc --max-ptrs 1 --flags rwx - leaks 0x64 bytes starting at stack pointer and search for one valid pointer which points to a libc rwx page\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/probeleak/#pwndbg.commands.probeleak.find_module","title":"find_module","text":"<pre><code>find_module(addr, max_distance)\n</code></pre>"},{"location":"reference/pwndbg/commands/probeleak/#pwndbg.commands.probeleak.satisfied_flags","title":"satisfied_flags","text":"<pre><code>satisfied_flags(require_flags, flags)\n</code></pre>"},{"location":"reference/pwndbg/commands/probeleak/#pwndbg.commands.probeleak.flags_str2int","title":"flags_str2int","text":"<pre><code>flags_str2int(flags_s)\n</code></pre>"},{"location":"reference/pwndbg/commands/probeleak/#pwndbg.commands.probeleak.probeleak","title":"probeleak","text":"<pre><code>probeleak(\n address=None,\n count=64,\n max_distance=0,\n point_to=None,\n max_ptrs=0,\n flags=None,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/","title":"pwndbg.commands.procinfo","text":""},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo","title":"procinfo","text":"<p>Classes:</p> <ul> <li> <code>Process</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>tcp</code> \u2013 <p>It will first list all listening TCP sockets, and next list all established</p> </li> <li> <code>unix</code> \u2013 </li> <li> <code>netlink</code> \u2013 </li> <li> <code>pid</code> \u2013 </li> <li> <code>procinfo</code> \u2013 <p>Display information about the running process.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>capabilities</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.capabilities","title":"capabilities <code>module-attribute</code>","text":"<pre><code>capabilities = {\n 0: \"CAP_CHOWN\",\n 1: \"CAP_DAC_OVERRIDE\",\n 2: \"CAP_DAC_READ_SEARCH\",\n 3: \"CAP_FOWNER\",\n 4: \"CAP_FSETID\",\n 5: \"CAP_KILL\",\n 6: \"CAP_SETGID\",\n 7: \"CAP_SETUID\",\n 8: \"CAP_SETPCAP\",\n 9: \"CAP_LINUX_IMMUTABLE\",\n 10: \"CAP_NET_BIND_SERVICE\",\n 11: \"CAP_NET_BROADCAST\",\n 12: \"CAP_NET_ADMIN\",\n 13: \"CAP_NET_RAW\",\n 14: \"CAP_IPC_LOCK\",\n 15: \"CAP_IPC_OWNER\",\n 16: \"CAP_SYS_MODULE\",\n 17: \"CAP_SYS_RAWIO\",\n 18: \"CAP_SYS_CHROOT\",\n 19: \"CAP_SYS_PTRACE\",\n 20: \"CAP_SYS_PACCT\",\n 21: \"CAP_SYS_ADMIN\",\n 22: \"CAP_SYS_BOOT\",\n 23: \"CAP_SYS_NICE\",\n 24: \"CAP_SYS_RESOURCE\",\n 25: \"CAP_SYS_TIME\",\n 26: \"CAP_SYS_TTY_CONFIG\",\n 27: \"CAP_MKNOD\",\n 28: \"CAP_LEASE\",\n 29: \"CAP_AUDIT_WRITE\",\n 30: \"CAP_AUDIT_CONTROL\",\n 31: \"CAP_SETFCAP\",\n 32: \"CAP_MAC_OVERRIDE\",\n 33: \"CAP_MAC_ADMIN\",\n 34: \"CAP_SYSLOG\",\n 35: \"CAP_WAKE_ALARM\",\n 36: \"CAP_BLOCK_SUSPEND\",\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process","title":"Process","text":"<pre><code>Process(pid=None, tid=None)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>pid</code> \u2013 </li> <li> <code>tid</code> \u2013 </li> <li> <code>selinux</code> (<code>str</code>) \u2013 </li> <li> <code>cmdline</code> \u2013 </li> <li> <code>cwd</code> (<code>str</code>) \u2013 </li> <li> <code>status</code> \u2013 </li> <li> <code>open_files</code> \u2013 </li> <li> <code>connections</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.pid","title":"pid <code>instance-attribute</code>","text":"<pre><code>pid = pid\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.tid","title":"tid <code>instance-attribute</code>","text":"<pre><code>tid = tid\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.selinux","title":"selinux <code>property</code>","text":"<pre><code>selinux: str\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.cmdline","title":"cmdline <code>property</code>","text":"<pre><code>cmdline\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.cwd","title":"cwd <code>property</code>","text":"<pre><code>cwd: str\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.status","title":"status <code>property</code>","text":"<pre><code>status\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.open_files","title":"open_files <code>property</code>","text":"<pre><code>open_files\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.Process.connections","title":"connections <code>property</code>","text":"<pre><code>connections\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.tcp","title":"tcp","text":"<pre><code>tcp()\n</code></pre> <p>It will first list all listening TCP sockets, and next list all established TCP connections. A typical entry of /proc/net/tcp would look like this (split up into 3 parts because of the length of the line):</p>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.unix","title":"unix","text":"<pre><code>unix()\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.netlink","title":"netlink","text":"<pre><code>netlink()\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.pid","title":"pid","text":"<pre><code>pid() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.procinfo","title":"procinfo","text":"<pre><code>procinfo() -> None\n</code></pre> <p>Display information about the running process.</p>"},{"location":"reference/pwndbg/commands/profiler/","title":"pwndbg.commands.profiler","text":""},{"location":"reference/pwndbg/commands/profiler/#pwndbg.commands.profiler","title":"profiler","text":"<p>Utilities for profiling pwndbg.</p> <p>Functions:</p> <ul> <li> <code>profiler</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>subparsers</code> \u2013 </li> <li> <code>parser_start</code> \u2013 </li> <li> <code>parser_stop</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/profiler/#pwndbg.commands.profiler.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Utilities for profiling pwndbg.')\n</code></pre>"},{"location":"reference/pwndbg/commands/profiler/#pwndbg.commands.profiler.subparsers","title":"subparsers <code>module-attribute</code>","text":"<pre><code>subparsers = add_subparsers(dest='command')\n</code></pre>"},{"location":"reference/pwndbg/commands/profiler/#pwndbg.commands.profiler.parser_start","title":"parser_start <code>module-attribute</code>","text":"<pre><code>parser_start = add_parser('start', prog='profiler start')\n</code></pre>"},{"location":"reference/pwndbg/commands/profiler/#pwndbg.commands.profiler.parser_stop","title":"parser_stop <code>module-attribute</code>","text":"<pre><code>parser_stop = add_parser('stop', prog='profiler stop')\n</code></pre>"},{"location":"reference/pwndbg/commands/profiler/#pwndbg.commands.profiler.profiler","title":"profiler","text":"<pre><code>profiler(command, file='pwndbg.pstats') -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/","title":"pwndbg.commands.ptmalloc2","text":""},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2","title":"ptmalloc2","text":"<p>Functions:</p> <ul> <li> <code>read_chunk</code> \u2013 <p>Read a chunk's metadata.</p> </li> <li> <code>format_bin</code> \u2013 </li> <li> <code>print_no_arena_found_error</code> \u2013 </li> <li> <code>print_no_tcache_bins_found_error</code> \u2013 </li> <li> <code>heap</code> \u2013 <p>Iteratively print chunks on a heap, default to the current thread's</p> </li> <li> <code>hi</code> \u2013 </li> <li> <code>arena</code> \u2013 <p>Print the contents of an arena, default to the current thread's arena.</p> </li> <li> <code>arenas</code> \u2013 <p>Lists this process's arenas.</p> </li> <li> <code>tcache</code> \u2013 <p>Print a thread's tcache contents, default to the current thread's</p> </li> <li> <code>mp</code> \u2013 <p>Print the mp_ struct's contents.</p> </li> <li> <code>top_chunk</code> \u2013 <p>Print relevant information about an arena's top chunk, default to the</p> </li> <li> <code>malloc_chunk</code> \u2013 <p>Print a malloc_chunk struct's contents.</p> </li> <li> <code>bins</code> \u2013 <p>Print the contents of all an arena's bins and a thread's tcache,</p> </li> <li> <code>fastbins</code> \u2013 <p>Print the contents of an arena's fastbins, default to the current</p> </li> <li> <code>unsortedbin</code> \u2013 <p>Print the contents of an arena's unsortedbin, default to the current</p> </li> <li> <code>smallbins</code> \u2013 <p>Print the contents of an arena's smallbins, default to the current</p> </li> <li> <code>largebins</code> \u2013 <p>Print the contents of an arena's largebins, default to the current</p> </li> <li> <code>tcachebins</code> \u2013 <p>Print the contents of a tcache, default to the current thread's tcache.</p> </li> <li> <code>find_fake_fast</code> \u2013 <p>Find candidate fake fast chunks overlapping the specified address.</p> </li> <li> <code>vis_heap_chunks</code> \u2013 <p>Visualize chunks on a heap, default to the current arena's active heap.</p> </li> <li> <code>bin_ascii</code> \u2013 </li> <li> <code>bin_labels_mapping</code> \u2013 <p>Returns all potential bin labels for all potential addresses</p> </li> <li> <code>try_free</code> \u2013 </li> <li> <code>try_unlink</code> \u2013 </li> <li> <code>heap_config</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>group</code> \u2013 </li> <li> <code>VALID_CHARS</code> \u2013 </li> <li> <code>try_free_parser</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.group","title":"group <code>module-attribute</code>","text":"<pre><code>group = add_mutually_exclusive_group()\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.VALID_CHARS","title":"VALID_CHARS <code>module-attribute</code>","text":"<pre><code>VALID_CHARS = list(map(ord, set(printable) - set('\\t\\r\\n\\x0c\\x0b')))\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.try_free_parser","title":"try_free_parser <code>module-attribute</code>","text":"<pre><code>try_free_parser = ArgumentParser(\n description=\"Check what would happen if free was called with given address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Shows heap related configuration.')\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.read_chunk","title":"read_chunk","text":"<pre><code>read_chunk(addr: int) -> dict[str, int]\n</code></pre> <p>Read a chunk's metadata.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.format_bin","title":"format_bin","text":"<pre><code>format_bin(\n bins: Bins, verbose: bool = False, offset: int | None = None\n) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.print_no_arena_found_error","title":"print_no_arena_found_error","text":"<pre><code>print_no_arena_found_error(tid=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.print_no_tcache_bins_found_error","title":"print_no_tcache_bins_found_error","text":"<pre><code>print_no_tcache_bins_found_error(tid: int | None = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.heap","title":"heap","text":"<pre><code>heap(\n addr: int | None = None, verbose: bool = False, simple: bool = False\n) -> None\n</code></pre> <p>Iteratively print chunks on a heap, default to the current thread's active heap.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.hi","title":"hi","text":"<pre><code>hi(\n addr: int, verbose: bool = False, simple: bool = False, fake: bool = False\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.arena","title":"arena","text":"<pre><code>arena(addr: int | None = None) -> None\n</code></pre> <p>Print the contents of an arena, default to the current thread's arena.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.arenas","title":"arenas","text":"<pre><code>arenas() -> None\n</code></pre> <p>Lists this process's arenas.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.tcache","title":"tcache","text":"<pre><code>tcache(addr: int | None = None) -> None\n</code></pre> <p>Print a thread's tcache contents, default to the current thread's tcache.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.mp","title":"mp","text":"<pre><code>mp() -> None\n</code></pre> <p>Print the mp_ struct's contents.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.top_chunk","title":"top_chunk","text":"<pre><code>top_chunk(addr: int | None = None) -> None\n</code></pre> <p>Print relevant information about an arena's top chunk, default to the current thread's arena.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.malloc_chunk","title":"malloc_chunk","text":"<pre><code>malloc_chunk(\n addr: int,\n fake: bool = False,\n verbose: bool = False,\n simple: bool = False,\n next: int = 0,\n dump: bool = False,\n) -> None\n</code></pre> <p>Print a malloc_chunk struct's contents.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.bins","title":"bins","text":"<pre><code>bins(addr: int | None = None, tcache_addr: int | None = None) -> None\n</code></pre> <p>Print the contents of all an arena's bins and a thread's tcache, default to the current thread's arena and tcache.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.fastbins","title":"fastbins","text":"<pre><code>fastbins(addr: int | None = None, verbose: bool = False) -> None\n</code></pre> <p>Print the contents of an arena's fastbins, default to the current thread's arena.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.unsortedbin","title":"unsortedbin","text":"<pre><code>unsortedbin(addr: int | None = None, verbose: bool = False) -> None\n</code></pre> <p>Print the contents of an arena's unsortedbin, default to the current thread's arena.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.smallbins","title":"smallbins","text":"<pre><code>smallbins(addr: int | None = None, verbose: bool = False) -> None\n</code></pre> <p>Print the contents of an arena's smallbins, default to the current thread's arena.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.largebins","title":"largebins","text":"<pre><code>largebins(addr: int | None = None, verbose: bool = False) -> None\n</code></pre> <p>Print the contents of an arena's largebins, default to the current thread's arena.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.tcachebins","title":"tcachebins","text":"<pre><code>tcachebins(addr: int | None = None, verbose: bool = False) -> None\n</code></pre> <p>Print the contents of a tcache, default to the current thread's tcache.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.find_fake_fast","title":"find_fake_fast","text":"<pre><code>find_fake_fast(\n target_address: int,\n max_candidate_size: int | None = None,\n align: bool = False,\n glibc_fastbin_bug: bool = False,\n partial_overwrite: bool = False,\n) -> None\n</code></pre> <p>Find candidate fake fast chunks overlapping the specified address.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.vis_heap_chunks","title":"vis_heap_chunks","text":"<pre><code>vis_heap_chunks(\n addr: int | None = None,\n count: int | None = None,\n beyond_top: bool = False,\n no_truncate: bool = False,\n all_chunks: bool = False,\n) -> None\n</code></pre> <p>Visualize chunks on a heap, default to the current arena's active heap.</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.bin_ascii","title":"bin_ascii","text":"<pre><code>bin_ascii(bs)\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.bin_labels_mapping","title":"bin_labels_mapping","text":"<pre><code>bin_labels_mapping(collections)\n</code></pre> <p>Returns all potential bin labels for all potential addresses We precompute all of them because doing this on demand was too slow and inefficient See #1675 for more details</p>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.try_free","title":"try_free","text":"<pre><code>try_free(addr: str | int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.try_unlink","title":"try_unlink","text":"<pre><code>try_unlink(addr: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.heap_config","title":"heap_config","text":"<pre><code>heap_config(filter_pattern: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/","title":"pwndbg.commands.ptmalloc2_tracking","text":""},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/#pwndbg.commands.ptmalloc2_tracking","title":"ptmalloc2_tracking","text":"<p>Functions:</p> <ul> <li> <code>track_heap</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>subparsers</code> \u2013 </li> <li> <code>enable</code> \u2013 </li> <li> <code>disable</code> \u2013 </li> <li> <code>toggle_break</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/#pwndbg.commands.ptmalloc2_tracking.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Manages the heap tracker.\\n\\nThe heap tracker is a module that tracks usage of the GLibc heap and looks for\\nuser errors such as double frees and use after frees.\\n\\nCurrently, the following errors can be detected:\\n - Use After Free\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/#pwndbg.commands.ptmalloc2_tracking.subparsers","title":"subparsers <code>module-attribute</code>","text":"<pre><code>subparsers = add_subparsers(\n required=True,\n description=\"Used to enable, disable and query information about the tracker\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/#pwndbg.commands.ptmalloc2_tracking.enable","title":"enable <code>module-attribute</code>","text":"<pre><code>enable = add_parser('enable', help='Enable heap tracking')\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/#pwndbg.commands.ptmalloc2_tracking.disable","title":"disable <code>module-attribute</code>","text":"<pre><code>disable = add_parser('disable', help='Disable heap tracking')\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/#pwndbg.commands.ptmalloc2_tracking.toggle_break","title":"toggle_break <code>module-attribute</code>","text":"<pre><code>toggle_break = add_parser(\n \"toggle-break\",\n help=\"Toggles whether possible UAF conditions will pause execution\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/#pwndbg.commands.ptmalloc2_tracking.track_heap","title":"track_heap","text":"<pre><code>track_heap(mode=None, use_hardware_breakpoints=False)\n</code></pre>"},{"location":"reference/pwndbg/commands/radare2/","title":"pwndbg.commands.radare2","text":""},{"location":"reference/pwndbg/commands/radare2/#pwndbg.commands.radare2","title":"radare2","text":"<p>Functions:</p> <ul> <li> <code>r2</code> \u2013 </li> <li> <code>r2pipe</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/radare2/#pwndbg.commands.radare2.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Execute stateful radare2 commands through r2pipe.\",\n epilog=\"Example: r2pipe pdf sym.main\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/radare2/#pwndbg.commands.radare2.r2","title":"r2","text":"<pre><code>r2(arguments, no_seek=False, no_rebase=False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/radare2/#pwndbg.commands.radare2.r2pipe","title":"r2pipe","text":"<pre><code>r2pipe(arguments) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/reload/","title":"pwndbg.commands.reload","text":""},{"location":"reference/pwndbg/commands/reload/#pwndbg.commands.reload","title":"reload","text":"<p>Functions:</p> <ul> <li> <code>rreload</code> \u2013 <p>Recursively reload modules.</p> </li> <li> <code>reload</code> \u2013 </li> <li> <code>reinit_pwndbg</code> \u2013 <p>Makes pwndbg reinitialize all state.</p> </li> </ul>"},{"location":"reference/pwndbg/commands/reload/#pwndbg.commands.reload.rreload","title":"rreload","text":"<pre><code>rreload(module, _exclude_mods=None) -> None\n</code></pre> <p>Recursively reload modules. Impl based on https://stackoverflow.com/a/66661311/1508881</p>"},{"location":"reference/pwndbg/commands/reload/#pwndbg.commands.reload.reload","title":"reload","text":"<pre><code>reload(*a) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/reload/#pwndbg.commands.reload.reinit_pwndbg","title":"reinit_pwndbg","text":"<pre><code>reinit_pwndbg() -> None\n</code></pre> <p>Makes pwndbg reinitialize all state.</p>"},{"location":"reference/pwndbg/commands/retaddr/","title":"pwndbg.commands.retaddr","text":""},{"location":"reference/pwndbg/commands/retaddr/#pwndbg.commands.retaddr","title":"retaddr","text":"<p>Functions:</p> <ul> <li> <code>retaddr</code> \u2013 </li> <li> <code>stack_explore</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/retaddr/#pwndbg.commands.retaddr.retaddr","title":"retaddr","text":"<pre><code>retaddr() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/retaddr/#pwndbg.commands.retaddr.stack_explore","title":"stack_explore","text":"<pre><code>stack_explore() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/rizin/","title":"pwndbg.commands.rizin","text":""},{"location":"reference/pwndbg/commands/rizin/#pwndbg.commands.rizin","title":"rizin","text":"<p>Functions:</p> <ul> <li> <code>rz</code> \u2013 </li> <li> <code>rzpipe</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/rizin/#pwndbg.commands.rizin.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Execute stateful rizin commands through rzpipe.\",\n epilog=\"Example: rzpipe pdf sym.main\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/rizin/#pwndbg.commands.rizin.rz","title":"rz","text":"<pre><code>rz(arguments, no_seek=False, no_rebase=False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/rizin/#pwndbg.commands.rizin.rzpipe","title":"rzpipe","text":"<pre><code>rzpipe(arguments) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/","title":"pwndbg.commands.rop","text":""},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop","title":"rop","text":"<p>Classes:</p> <ul> <li> <code>RawMemoryBinary</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>split_range_to_chunks</code> \u2013 </li> <li> <code>parse_size</code> \u2013 </li> <li> <code>iterate_over_pages</code> \u2013 </li> <li> <code>rop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Dump ROP gadgets with Jon Salwan's ROPgadget tool.\",\n epilog=\"Example: rop --grep 'pop rdi' -- --nojop\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary","title":"RawMemoryBinary","text":"<pre><code>RawMemoryBinary(options, start_addr: int)\n</code></pre> <p> Bases: <code>object</code></p> <p>Methods:</p> <ul> <li> <code>getBinary</code> \u2013 </li> <li> <code>getFileName</code> \u2013 </li> <li> <code>getRawBinary</code> \u2013 </li> <li> <code>getEntryPoint</code> \u2013 </li> <li> <code>getExecSections</code> \u2013 </li> <li> <code>getDataSections</code> \u2013 </li> <li> <code>getArch</code> \u2013 </li> <li> <code>getArchMode</code> \u2013 </li> <li> <code>getEndian</code> \u2013 </li> <li> <code>getFormat</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>start_addr</code> \u2013 </li> <li> <code>cs</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.start_addr","title":"start_addr <code>instance-attribute</code>","text":"<pre><code>start_addr = start_addr\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.__fileName","title":"__fileName <code>instance-attribute</code>","text":"<pre><code>__fileName = binary\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.cs","title":"cs <code>instance-attribute</code>","text":"<pre><code>cs = get_disassembler(pc)\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.__rawBinary","title":"__rawBinary <code>instance-attribute</code>","text":"<pre><code>__rawBinary = read()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getBinary","title":"getBinary","text":"<pre><code>getBinary()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getFileName","title":"getFileName","text":"<pre><code>getFileName()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getRawBinary","title":"getRawBinary","text":"<pre><code>getRawBinary()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getEntryPoint","title":"getEntryPoint","text":"<pre><code>getEntryPoint()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getExecSections","title":"getExecSections","text":"<pre><code>getExecSections()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getDataSections","title":"getDataSections","text":"<pre><code>getDataSections()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getArch","title":"getArch","text":"<pre><code>getArch()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getArchMode","title":"getArchMode","text":"<pre><code>getArchMode()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getEndian","title":"getEndian","text":"<pre><code>getEndian()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.RawMemoryBinary.getFormat","title":"getFormat","text":"<pre><code>getFormat()\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.split_range_to_chunks","title":"split_range_to_chunks","text":"<pre><code>split_range_to_chunks(\n range_start: int, range_end: int, chunk_size: int = 10 * 1024 * 1024\n) -> Iterator[tuple[int, int, int, int]]\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.parse_size","title":"parse_size","text":"<pre><code>parse_size(size_str: str) -> int\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.iterate_over_pages","title":"iterate_over_pages","text":"<pre><code>iterate_over_pages(mem_limit: int) -> Iterator[tuple[str, Page | None]]\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/#pwndbg.commands.rop.rop","title":"rop","text":"<pre><code>rop(grep: str | None, memlimit: str, argument: list[str]) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/ropper/","title":"pwndbg.commands.ropper","text":""},{"location":"reference/pwndbg/commands/ropper/#pwndbg.commands.ropper","title":"ropper","text":"<p>Functions:</p> <ul> <li> <code>ropper</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ropper/#pwndbg.commands.ropper.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"ROP gadget search with ropper.\",\n epilog=\"Example: ropper -- --console; ropper -- --search 'mov e?x'\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ropper/#pwndbg.commands.ropper.ropper","title":"ropper","text":"<pre><code>ropper(argument) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/search/","title":"pwndbg.commands.search","text":""},{"location":"reference/pwndbg/commands/search/#pwndbg.commands.search","title":"search","text":"<p>Functions:</p> <ul> <li> <code>print_search_hit</code> \u2013 <p>Prints out a single search hit.</p> </li> <li> <code>search</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>saved</code> (<code>set[int]</code>) \u2013 </li> <li> <code>auto_save</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/search/#pwndbg.commands.search.saved","title":"saved <code>module-attribute</code>","text":"<pre><code>saved: set[int] = set()\n</code></pre>"},{"location":"reference/pwndbg/commands/search/#pwndbg.commands.search.auto_save","title":"auto_save <code>module-attribute</code>","text":"<pre><code>auto_save = add_param(\n \"auto-save-search\", False, 'automatically pass --save to \"search\" command'\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/search/#pwndbg.commands.search.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"Search memory for byte sequences, strings, pointers, and integer values.\\n\\nBy default search results are cached. If you want to cache all results, but only print a subset, use --trunc-out. If you want to cache only a subset of results, and print the results immediately, use --limit. The latter is specially useful if you're searching a huge section of memory.\\n\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/search/#pwndbg.commands.search.print_search_hit","title":"print_search_hit","text":"<pre><code>print_search_hit(address: int) -> None\n</code></pre> <p>Prints out a single search hit.</p> <p>Parameters:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 <p>Address to print</p> </li> </ul>"},{"location":"reference/pwndbg/commands/search/#pwndbg.commands.search.search","title":"search","text":"<pre><code>search(\n type,\n arch,\n asmbp,\n hex,\n executable,\n writable,\n step,\n limit,\n aligned,\n value,\n mapping_name,\n save,\n next,\n trunc_out,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/segments/","title":"pwndbg.commands.segments","text":""},{"location":"reference/pwndbg/commands/segments/#pwndbg.commands.segments","title":"segments","text":"<p>Classes:</p> <ul> <li> <code>segment</code> \u2013 <p>Get the flat address of memory based off of the named segment register.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>fsbase</code> \u2013 <p>Prints out the FS base address. See also $fsbase.</p> </li> <li> <code>gsbase</code> \u2013 <p>Prints out the GS base address. See also $gsbase.</p> </li> </ul>"},{"location":"reference/pwndbg/commands/segments/#pwndbg.commands.segments.segment","title":"segment","text":"<pre><code>segment(name: str)\n</code></pre> <p> Bases: <code>Function</code></p> <p>Get the flat address of memory based off of the named segment register.</p> <p>Methods:</p> <ul> <li> <code>invoke</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>name</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/segments/#pwndbg.commands.segments.segment.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name = name\n</code></pre>"},{"location":"reference/pwndbg/commands/segments/#pwndbg.commands.segments.segment.invoke","title":"invoke","text":"<pre><code>invoke(arg: Value = Value(0), *args: Value) -> int\n</code></pre>"},{"location":"reference/pwndbg/commands/segments/#pwndbg.commands.segments.fsbase","title":"fsbase","text":"<pre><code>fsbase() -> None\n</code></pre> <p>Prints out the FS base address. See also $fsbase.</p>"},{"location":"reference/pwndbg/commands/segments/#pwndbg.commands.segments.gsbase","title":"gsbase","text":"<pre><code>gsbase() -> None\n</code></pre> <p>Prints out the GS base address. See also $gsbase.</p>"},{"location":"reference/pwndbg/commands/shell/","title":"pwndbg.commands.shell","text":""},{"location":"reference/pwndbg/commands/shell/#pwndbg.commands.shell","title":"shell","text":"<p>Wrapper for shell commands.</p> <p>Functions:</p> <ul> <li> <code>register_shell_function</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pwncmd_names</code> \u2013 </li> <li> <code>shellcmd_names</code> \u2013 </li> <li> <code>pwncmds</code> \u2013 </li> <li> <code>shellcmds</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/shell/#pwndbg.commands.shell.pwncmd_names","title":"pwncmd_names <code>module-attribute</code>","text":"<pre><code>pwncmd_names = ['constgrep', 'disasm', 'pwn', 'unhex']\n</code></pre>"},{"location":"reference/pwndbg/commands/shell/#pwndbg.commands.shell.shellcmd_names","title":"shellcmd_names <code>module-attribute</code>","text":"<pre><code>shellcmd_names = [\n \"awk\",\n \"bash\",\n \"cat\",\n \"chattr\",\n \"chmod\",\n \"chown\",\n \"cp\",\n \"date\",\n \"diff\",\n \"egrep\",\n \"grep\",\n \"htop\",\n \"id\",\n \"less\",\n \"ls\",\n \"man\",\n \"mkdir\",\n \"mktemp\",\n \"more\",\n \"mv\",\n \"nano\",\n \"nc\",\n \"ping\",\n \"pkill\",\n \"ps\",\n \"pstree\",\n \"pwd\",\n \"rm\",\n \"sed\",\n \"sh\",\n \"sort\",\n \"ssh\",\n \"sudo\",\n \"tail\",\n \"top\",\n \"touch\",\n \"uniq\",\n \"vi\",\n \"vim\",\n \"w\",\n \"wget\",\n \"who\",\n \"whoami\",\n \"zsh\",\n]\n</code></pre>"},{"location":"reference/pwndbg/commands/shell/#pwndbg.commands.shell.pwncmds","title":"pwncmds <code>module-attribute</code>","text":"<pre><code>pwncmds = list(filter(which, pwncmd_names))\n</code></pre>"},{"location":"reference/pwndbg/commands/shell/#pwndbg.commands.shell.shellcmds","title":"shellcmds <code>module-attribute</code>","text":"<pre><code>shellcmds = list(filter(which, shellcmd_names))\n</code></pre>"},{"location":"reference/pwndbg/commands/shell/#pwndbg.commands.shell.register_shell_function","title":"register_shell_function","text":"<pre><code>register_shell_function(cmd, deprecated=False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/sigreturn/","title":"pwndbg.commands.sigreturn","text":""},{"location":"reference/pwndbg/commands/sigreturn/#pwndbg.commands.sigreturn","title":"sigreturn","text":"<p>Functions:</p> <ul> <li> <code>sigreturn</code> \u2013 </li> <li> <code>print_value</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>SIGRETURN_FRAME_LAYOUTS</code> (<code>dict[str, list[tuple[int, str]]]</code>) \u2013 </li> <li> <code>SIGRETURN_CORE_REGISTER</code> (<code>dict[str, set[str]]</code>) \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/sigreturn/#pwndbg.commands.sigreturn.SIGRETURN_FRAME_LAYOUTS","title":"SIGRETURN_FRAME_LAYOUTS <code>module-attribute</code>","text":"<pre><code>SIGRETURN_FRAME_LAYOUTS: dict[str, list[tuple[int, str]]] = {\n \"x86-64\": sorted([(-8, \"&pretcode\")] + list(items())),\n \"i386\": sorted(items()),\n \"aarch64\": sorted(items()),\n \"arm\": sorted(items()),\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/sigreturn/#pwndbg.commands.sigreturn.SIGRETURN_CORE_REGISTER","title":"SIGRETURN_CORE_REGISTER <code>module-attribute</code>","text":"<pre><code>SIGRETURN_CORE_REGISTER: dict[str, set[str]] = {\n \"x86-64\": {*gpr, frame, stack, pc},\n \"i386\": {*gpr, frame, stack, pc},\n \"aarch64\": {*gpr, \"sp\", \"pc\"},\n \"arm\": {*gpr, \"fp\", \"ip\", \"sp\", \"lr\", \"pc\"},\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/sigreturn/#pwndbg.commands.sigreturn.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Display the SigreturnFrame at the specific address\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/sigreturn/#pwndbg.commands.sigreturn.sigreturn","title":"sigreturn","text":"<pre><code>sigreturn(address: int = None, display_all=False, print_address=False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/sigreturn/#pwndbg.commands.sigreturn.print_value","title":"print_value","text":"<pre><code>print_value(string: str, address: int, print_address) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/","title":"pwndbg.commands.slab","text":""},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab","title":"slab","text":"<p>Commands for dealing with Linux kernel slab allocator. Currently, only SLUB is supported.</p> <p>Some of the code here was inspired from NeatMonster/slabdbg Some of the code here was inspired from osandov/drgn</p> <p>Classes:</p> <ul> <li> <code>IndentContextManager</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>slab</code> \u2013 </li> <li> <code>print_slab</code> \u2013 </li> <li> <code>print_cpu_cache</code> \u2013 </li> <li> <code>print_node_cache</code> \u2013 </li> <li> <code>slab_info</code> \u2013 </li> <li> <code>slab_list</code> \u2013 </li> <li> <code>slab_contains</code> \u2013 <p>prints the slab_cache associated with the provided address</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>subparsers</code> \u2013 </li> <li> <code>parser_list</code> \u2013 </li> <li> <code>parser_info</code> \u2013 </li> <li> <code>parser_contains</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Prints information about the slab allocator\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.subparsers","title":"subparsers <code>module-attribute</code>","text":"<pre><code>subparsers = add_subparsers(dest='command')\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.parser_list","title":"parser_list <code>module-attribute</code>","text":"<pre><code>parser_list = add_parser('list', prog='slab list')\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.parser_info","title":"parser_info <code>module-attribute</code>","text":"<pre><code>parser_info = add_parser('info', prog='slab info')\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.parser_contains","title":"parser_contains <code>module-attribute</code>","text":"<pre><code>parser_contains = add_parser('contains', prog='slab contains')\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.IndentContextManager","title":"IndentContextManager","text":"<pre><code>IndentContextManager()\n</code></pre> <p>Methods:</p> <ul> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 </li> <li> <code>print</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>indent</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.IndentContextManager.indent","title":"indent <code>instance-attribute</code>","text":"<pre><code>indent = 0\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.IndentContextManager.__enter__","title":"__enter__","text":"<pre><code>__enter__() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.IndentContextManager.__exit__","title":"__exit__","text":"<pre><code>__exit__(\n exc_type: type[BaseException] | None,\n exc_value: BaseException | None,\n exc_tb: TracebackType | None,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.IndentContextManager.print","title":"print","text":"<pre><code>print(*a, **kw) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.slab","title":"slab","text":"<pre><code>slab(command, filter_=None, names=None, verbose=False, addresses=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.print_slab","title":"print_slab","text":"<pre><code>print_slab(slab: Slab, indent, verbose: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.print_cpu_cache","title":"print_cpu_cache","text":"<pre><code>print_cpu_cache(cpu_cache: CpuCache, verbose: bool, indent) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.print_node_cache","title":"print_node_cache","text":"<pre><code>print_node_cache(node_cache: NodeCache, verbose: bool, indent) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.slab_info","title":"slab_info","text":"<pre><code>slab_info(name: str, verbose: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.slab_list","title":"slab_list","text":"<pre><code>slab_list(filter_) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.slab_contains","title":"slab_contains","text":"<pre><code>slab_contains(address: str) -> None\n</code></pre> <p>prints the slab_cache associated with the provided address</p>"},{"location":"reference/pwndbg/commands/spray/","title":"pwndbg.commands.spray","text":""},{"location":"reference/pwndbg/commands/spray/#pwndbg.commands.spray","title":"spray","text":"<p>Functions:</p> <ul> <li> <code>spray</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/spray/#pwndbg.commands.spray.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Spray memory with cyclic() generated values\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/spray/#pwndbg.commands.spray.spray","title":"spray","text":"<pre><code>spray(addr, length, value, only_funcptrs) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/start/","title":"pwndbg.commands.start","text":""},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start","title":"start","text":"<p>Launches the target process after setting a breakpoint at a convenient entry point.</p> <p>Functions:</p> <ul> <li> <code>breakpoint_at_entry</code> \u2013 </li> <li> <code>start</code> \u2013 </li> <li> <code>entry</code> \u2013 </li> <li> <code>sstart</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description='\\nStart the debugged program stopping at its entrypoint address.\\n\\nNote that the entrypoint may not be the first instruction executed\\nby the program. If you want to stop on the first executed instruction,\\nuse the GDB\\'s `starti` command.\\n\\nArgs may include \"*\", or \"[...]\"; they are expanded using the\\nshell that will start the program (specified by the \"$SHELL\" environment\\nvariable). Input and output redirection with \">\", \"<\", or \">>\"\\nare also allowed.\\n\\nWith no arguments, uses arguments last specified (with \"run\" or\\n\"set args\"). To cancel previous arguments and run with no arguments,\\nuse \"set args\" without arguments.\\n\\nTo start the inferior without using a shell, use \"set startup-with-shell off\".\\n',\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start.breakpoint_at_entry","title":"breakpoint_at_entry","text":"<pre><code>breakpoint_at_entry()\n</code></pre>"},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start.start","title":"start","text":"<pre><code>start(args=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start.entry","title":"entry","text":"<pre><code>entry(args=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start.sstart","title":"sstart","text":"<pre><code>sstart() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/strings/","title":"pwndbg.commands.strings","text":""},{"location":"reference/pwndbg/commands/strings/#pwndbg.commands.strings","title":"strings","text":"<p>Functions:</p> <ul> <li> <code>strings</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/strings/#pwndbg.commands.strings.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Extracts and displays ASCII strings from readable memory pages of the debugged process.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/strings/#pwndbg.commands.strings.strings","title":"strings","text":"<pre><code>strings(n: int = 4, page_names: list[str] = [], save_as: str = None)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/","title":"pwndbg.commands.telescope","text":""},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope","title":"telescope","text":"<p>Prints out pointer chains starting at some address in memory.</p> <p>Generally used to print out the stack or register values.</p> <p>Functions:</p> <ul> <li> <code>telescope</code> \u2013 <p>Recursively dereferences pointers starting at the specified address</p> </li> <li> <code>regs_or_frame_offset</code> \u2013 </li> <li> <code>stack</code> \u2013 </li> <li> <code>stackf</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>telescope_lines</code> \u2013 </li> <li> <code>skip_repeating_values</code> \u2013 </li> <li> <code>skip_repeating_values_minimum</code> \u2013 </li> <li> <code>print_framepointer_offset</code> \u2013 </li> <li> <code>print_retaddr_in_frame</code> \u2013 </li> <li> <code>dont_skip_registers</code> \u2013 </li> <li> <code>offset_separator</code> \u2013 </li> <li> <code>offset_delimiter</code> \u2013 </li> <li> <code>repeating_marker</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.telescope_lines","title":"telescope_lines <code>module-attribute</code>","text":"<pre><code>telescope_lines = add_param(\n \"telescope-lines\", 8, \"number of lines to printed by the telescope command\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.skip_repeating_values","title":"skip_repeating_values <code>module-attribute</code>","text":"<pre><code>skip_repeating_values = add_param(\n \"telescope-skip-repeating-val\",\n True,\n \"whether to skip repeating values of the telescope command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.skip_repeating_values_minimum","title":"skip_repeating_values_minimum <code>module-attribute</code>","text":"<pre><code>skip_repeating_values_minimum = add_param(\n \"telescope-skip-repeating-val-min\",\n 3,\n \"minimum amount of repeated values before skipping lines\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.print_framepointer_offset","title":"print_framepointer_offset <code>module-attribute</code>","text":"<pre><code>print_framepointer_offset = add_param(\n \"telescope-framepointer-offset\",\n True,\n \"print offset to framepointer for each address, if sufficiently small\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.print_retaddr_in_frame","title":"print_retaddr_in_frame <code>module-attribute</code>","text":"<pre><code>print_retaddr_in_frame = add_param(\n \"telescope-frame-print-retaddr\",\n True,\n \"print one pointer past the stack frame\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.dont_skip_registers","title":"dont_skip_registers <code>module-attribute</code>","text":"<pre><code>dont_skip_registers = add_param(\n \"telescope-dont-skip-registers\",\n True,\n \"don't skip a repeated line if a registers points to it\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.offset_separator","title":"offset_separator <code>module-attribute</code>","text":"<pre><code>offset_separator = add_param(\n \"telescope-offset-separator\",\n \"\u2502\",\n \"offset separator of the telescope command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.offset_delimiter","title":"offset_delimiter <code>module-attribute</code>","text":"<pre><code>offset_delimiter = add_param(\n \"telescope-offset-delimiter\",\n \":\",\n \"offset delimiter of the telescope command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.repeating_marker","title":"repeating_marker <code>module-attribute</code>","text":"<pre><code>repeating_marker = add_param(\n \"telescope-repeating-marker\",\n \"... \u2193\",\n \"repeating values marker of the telescope command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Dereferences on stack data, printing the entire stack frame with specified count and offset .\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.telescope","title":"telescope","text":"<pre><code>telescope(\n address=None,\n count=telescope_lines,\n to_string=False,\n reverse=False,\n frame=False,\n inverse=False,\n)\n</code></pre> <p>Recursively dereferences pointers starting at the specified address ($sp by default)</p>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.regs_or_frame_offset","title":"regs_or_frame_offset","text":"<pre><code>regs_or_frame_offset(\n addr: int, bp: int | None, regs: dict[int, str], longest_regs: int\n) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.stack","title":"stack","text":"<pre><code>stack(count, offset, frame, inverse) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.stackf","title":"stackf","text":"<pre><code>stackf(count, offset) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/tips/","title":"pwndbg.commands.tips","text":""},{"location":"reference/pwndbg/commands/tips/#pwndbg.commands.tips","title":"tips","text":"<p>Functions:</p> <ul> <li> <code>tips</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/tips/#pwndbg.commands.tips.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Shows tips.')\n</code></pre>"},{"location":"reference/pwndbg/commands/tips/#pwndbg.commands.tips.tips","title":"tips","text":"<pre><code>tips(all: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/tls/","title":"pwndbg.commands.tls","text":""},{"location":"reference/pwndbg/commands/tls/#pwndbg.commands.tls","title":"tls","text":"<p>Command to print the information of the current Thread Local Storage (TLS).</p> <p>Functions:</p> <ul> <li> <code>tls</code> \u2013 </li> <li> <code>threads</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>group</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/tls/#pwndbg.commands.tls.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n formatter_class=RawTextHelpFormatter,\n description=\"List all threads belonging to the selected inferior.\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/tls/#pwndbg.commands.tls.group","title":"group <code>module-attribute</code>","text":"<pre><code>group = add_mutually_exclusive_group()\n</code></pre>"},{"location":"reference/pwndbg/commands/tls/#pwndbg.commands.tls.tls","title":"tls","text":"<pre><code>tls(pthread_self=False, all: bool = False) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/tls/#pwndbg.commands.tls.threads","title":"threads","text":"<pre><code>threads(num_threads, respect_config) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/valist/","title":"pwndbg.commands.valist","text":""},{"location":"reference/pwndbg/commands/valist/#pwndbg.commands.valist","title":"valist","text":"<p>Functions:</p> <ul> <li> <code>valist</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/valist/#pwndbg.commands.valist.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Dumps the arguments of a va_list.')\n</code></pre>"},{"location":"reference/pwndbg/commands/valist/#pwndbg.commands.valist.valist","title":"valist","text":"<pre><code>valist(addr: int, count: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/version/","title":"pwndbg.commands.version","text":""},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version","title":"version","text":"<p>Implements version and bugreport commands.</p> <p>Functions:</p> <ul> <li> <code>os_info</code> \u2013 </li> <li> <code>module_version</code> \u2013 </li> <li> <code>debugger_version</code> \u2013 </li> <li> <code>all_versions</code> \u2013 </li> <li> <code>get_target_arch</code> \u2013 </li> <li> <code>get_terminal_size</code> \u2013 </li> <li> <code>version_impl</code> \u2013 <p>Implementation of the <code>version</code> command.</p> </li> <li> <code>version</code> \u2013 </li> <li> <code>bugreport</code> \u2013 </li> <li> <code>get_debugger_configuration</code> \u2013 </li> <li> <code>get_debugger_session_history</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>bugreport_parser</code> \u2013 </li> <li> <code>bugreport_group</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.bugreport_parser","title":"bugreport_parser <code>module-attribute</code>","text":"<pre><code>bugreport_parser = ArgumentParser(description='Generate a bug report.')\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.bugreport_group","title":"bugreport_group <code>module-attribute</code>","text":"<pre><code>bugreport_group = add_mutually_exclusive_group()\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.os_info","title":"os_info","text":"<pre><code>os_info()\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.module_version","title":"module_version","text":"<pre><code>module_version(module)\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.debugger_version","title":"debugger_version","text":"<pre><code>debugger_version()\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.all_versions","title":"all_versions","text":"<pre><code>all_versions()\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.get_target_arch","title":"get_target_arch","text":"<pre><code>get_target_arch()\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.get_terminal_size","title":"get_terminal_size","text":"<pre><code>get_terminal_size()\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.version_impl","title":"version_impl","text":"<pre><code>version_impl() -> None\n</code></pre> <p>Implementation of the <code>version</code> command.</p>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.version","title":"version","text":"<pre><code>version() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.bugreport","title":"bugreport","text":"<pre><code>bugreport(run_browser=False, use_gh=False)\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.get_debugger_configuration","title":"get_debugger_configuration","text":"<pre><code>get_debugger_configuration()\n</code></pre>"},{"location":"reference/pwndbg/commands/version/#pwndbg.commands.version.get_debugger_session_history","title":"get_debugger_session_history","text":"<pre><code>get_debugger_session_history()\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/","title":"pwndbg.commands.vmmap","text":""},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap","title":"vmmap","text":"<p>Command to print the virtual memory map a la /proc/self/maps.</p> <p>Functions:</p> <ul> <li> <code>pages_filter</code> \u2013 </li> <li> <code>print_vmmap_table_header</code> \u2013 <p>Prints the table header for the vmmap command.</p> </li> <li> <code>print_vmmap_gaps_table_header</code> \u2013 <p>Prints the table header for the vmmap --gaps command.</p> </li> <li> <code>calculate_total_memory</code> \u2013 </li> <li> <code>gap_text</code> \u2013 </li> <li> <code>print_map</code> \u2013 </li> <li> <code>print_adjacent_map</code> \u2013 </li> <li> <code>print_guard</code> \u2013 </li> <li> <code>print_gap</code> \u2013 </li> <li> <code>print_vmmap_gaps</code> \u2013 <p>Indicates the size of adjacent memory regions and unmapped gaps between them in process memory</p> </li> <li> <code>vmmap</code> \u2013 </li> <li> <code>vmmap_add</code> \u2013 </li> <li> <code>vmmap_explore</code> \u2013 </li> <li> <code>vmmap_clear</code> \u2013 </li> <li> <code>vmmap_load</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>integer_types</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.integer_types","title":"integer_types <code>module-attribute</code>","text":"<pre><code>integer_types = (int, Value)\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Load virtual memory map pages from ELF file.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.pages_filter","title":"pages_filter","text":"<pre><code>pages_filter(gdbval_or_str)\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_vmmap_table_header","title":"print_vmmap_table_header","text":"<pre><code>print_vmmap_table_header() -> None\n</code></pre> <p>Prints the table header for the vmmap command.</p>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_vmmap_gaps_table_header","title":"print_vmmap_gaps_table_header","text":"<pre><code>print_vmmap_gaps_table_header() -> None\n</code></pre> <p>Prints the table header for the vmmap --gaps command.</p>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.calculate_total_memory","title":"calculate_total_memory","text":"<pre><code>calculate_total_memory(pages: tuple[Page, ...]) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.gap_text","title":"gap_text","text":"<pre><code>gap_text(page: Page) -> str\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_map","title":"print_map","text":"<pre><code>print_map(page: Page) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_adjacent_map","title":"print_adjacent_map","text":"<pre><code>print_adjacent_map(map_start: Page, map_end: Page) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_guard","title":"print_guard","text":"<pre><code>print_guard(page: Page) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_gap","title":"print_gap","text":"<pre><code>print_gap(current: Page, last_map: Page)\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_vmmap_gaps","title":"print_vmmap_gaps","text":"<pre><code>print_vmmap_gaps(pages: tuple[Page, ...]) -> None\n</code></pre> <p>Indicates the size of adjacent memory regions and unmapped gaps between them in process memory</p>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap","title":"vmmap","text":"<pre><code>vmmap(\n gdbval_or_str=None,\n writable=False,\n executable=False,\n lines_after=1,\n lines_before=1,\n context=None,\n gaps=False,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap_add","title":"vmmap_add","text":"<pre><code>vmmap_add(start: int, size: int, flags: str, offset: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap_explore","title":"vmmap_explore","text":"<pre><code>vmmap_explore(address: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap_clear","title":"vmmap_clear","text":"<pre><code>vmmap_clear() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap_load","title":"vmmap_load","text":"<pre><code>vmmap_load(filename) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/","title":"pwndbg.commands.windbg","text":""},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg","title":"windbg","text":"<p>Compatibility functionality for Windbg users.</p> <p>Functions:</p> <ul> <li> <code>enhex</code> \u2013 </li> <li> <code>db</code> \u2013 <p>Starting at the specified address, dump N bytes</p> </li> <li> <code>dw</code> \u2013 <p>Starting at the specified address, dump N words</p> </li> <li> <code>dd</code> \u2013 <p>Starting at the specified address, dump N dwords</p> </li> <li> <code>dq</code> \u2013 <p>Starting at the specified address, dump N qwords</p> </li> <li> <code>dc</code> \u2013 </li> <li> <code>dX</code> \u2013 <p>Traditionally, windbg will display 16 bytes of data per line.</p> </li> <li> <code>eb</code> \u2013 <p>Write hex bytes at the specified address.</p> </li> <li> <code>ew</code> \u2013 <p>Write hex words at the specified address.</p> </li> <li> <code>ed</code> \u2013 <p>Write hex dwords at the specified address.</p> </li> <li> <code>eq</code> \u2013 <p>Write hex qwords at the specified address.</p> </li> <li> <code>ez</code> \u2013 <p>Write a character at the specified address.</p> </li> <li> <code>eza</code> \u2013 <p>Write a string at the specified address.</p> </li> <li> <code>eX</code> \u2013 <p>This relies on windbg's default hex encoding being enforced</p> </li> <li> <code>dds</code> \u2013 <p>Dump pointers and symbols at the specified address.</p> </li> <li> <code>da</code> \u2013 </li> <li> <code>ds</code> \u2013 </li> <li> <code>bl</code> \u2013 <p>List breakpoints</p> </li> <li> <code>bd</code> \u2013 <p>Disable the breakpoint with the specified index.</p> </li> <li> <code>be</code> \u2013 <p>Enable the breakpoint with the specified index.</p> </li> <li> <code>bc</code> \u2013 <p>Clear the breakpoint with the specified index.</p> </li> <li> <code>bp</code> \u2013 </li> <li> <code>k</code> \u2013 <p>Print a backtrace (alias 'bt')</p> </li> <li> <code>go</code> \u2013 <p>Windbg compatibility alias for 'continue' command.</p> </li> <li> <code>ln</code> \u2013 <p>List the symbols nearest to the provided value.</p> </li> <li> <code>peb</code> \u2013 </li> <li> <code>pc</code> \u2013 <p>Windbg compatibility alias for 'nextcall' command.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>da_parser</code> \u2013 </li> <li> <code>ds_parser</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.da_parser","title":"da_parser <code>module-attribute</code>","text":"<pre><code>da_parser = ArgumentParser(\n description=\"Dump a string at the specified address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.ds_parser","title":"ds_parser <code>module-attribute</code>","text":"<pre><code>ds_parser = ArgumentParser(\n description=\"Dump a string at the specified address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"List the symbols nearest to the provided value.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.enhex","title":"enhex","text":"<pre><code>enhex(size, value)\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.db","title":"db","text":"<pre><code>db(address, count=64)\n</code></pre> <p>Starting at the specified address, dump N bytes (default 64).</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.dw","title":"dw","text":"<pre><code>dw(address, count=32)\n</code></pre> <p>Starting at the specified address, dump N words (default 32).</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.dd","title":"dd","text":"<pre><code>dd(address, count=16)\n</code></pre> <p>Starting at the specified address, dump N dwords (default 16).</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.dq","title":"dq","text":"<pre><code>dq(address, count=8)\n</code></pre> <p>Starting at the specified address, dump N qwords (default 8).</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.dc","title":"dc","text":"<pre><code>dc(address, count=8)\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.dX","title":"dX","text":"<pre><code>dX(size, address, count, to_string=False, repeat=False)\n</code></pre> <p>Traditionally, windbg will display 16 bytes of data per line.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.eb","title":"eb","text":"<pre><code>eb(address, data)\n</code></pre> <p>Write hex bytes at the specified address.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.ew","title":"ew","text":"<pre><code>ew(address, data)\n</code></pre> <p>Write hex words at the specified address.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.ed","title":"ed","text":"<pre><code>ed(address, data)\n</code></pre> <p>Write hex dwords at the specified address.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.eq","title":"eq","text":"<pre><code>eq(address, data)\n</code></pre> <p>Write hex qwords at the specified address.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.ez","title":"ez","text":"<pre><code>ez(address, data)\n</code></pre> <p>Write a character at the specified address.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.eza","title":"eza","text":"<pre><code>eza(address, data)\n</code></pre> <p>Write a string at the specified address.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.eX","title":"eX","text":"<pre><code>eX(size, address, data, hex=True) -> None\n</code></pre> <p>This relies on windbg's default hex encoding being enforced</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.dds","title":"dds","text":"<pre><code>dds(addr)\n</code></pre> <p>Dump pointers and symbols at the specified address.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.da","title":"da","text":"<pre><code>da(address, max) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.ds","title":"ds","text":"<pre><code>ds(address, max) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.bl","title":"bl","text":"<pre><code>bl() -> None\n</code></pre> <p>List breakpoints</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.bd","title":"bd","text":"<pre><code>bd(which='*') -> None\n</code></pre> <p>Disable the breakpoint with the specified index.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.be","title":"be","text":"<pre><code>be(which='*') -> None\n</code></pre> <p>Enable the breakpoint with the specified index.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.bc","title":"bc","text":"<pre><code>bc(which='*') -> None\n</code></pre> <p>Clear the breakpoint with the specified index.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.bp","title":"bp","text":"<pre><code>bp(where) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.k","title":"k","text":"<pre><code>k() -> None\n</code></pre> <p>Print a backtrace (alias 'bt')</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.go","title":"go","text":"<pre><code>go() -> None\n</code></pre> <p>Windbg compatibility alias for 'continue' command.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.ln","title":"ln","text":"<pre><code>ln(value: int = None) -> None\n</code></pre> <p>List the symbols nearest to the provided value.</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.peb","title":"peb","text":"<pre><code>peb() -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.pc","title":"pc","text":"<pre><code>pc()\n</code></pre> <p>Windbg compatibility alias for 'nextcall' command.</p>"},{"location":"reference/pwndbg/commands/xinfo/","title":"pwndbg.commands.xinfo","text":""},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo","title":"xinfo","text":"<p>Functions:</p> <ul> <li> <code>print_line</code> \u2013 </li> <li> <code>xinfo_stack</code> \u2013 </li> <li> <code>xinfo_mmap_file</code> \u2013 </li> <li> <code>xinfo_default</code> \u2013 </li> <li> <code>xinfo</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Shows offsets of the specified address from various useful locations.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo.print_line","title":"print_line","text":"<pre><code>print_line(name, addr, first, second, op, width=20) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo.xinfo_stack","title":"xinfo_stack","text":"<pre><code>xinfo_stack(page: Page, addr: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo.xinfo_mmap_file","title":"xinfo_mmap_file","text":"<pre><code>xinfo_mmap_file(page: Page, addr: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo.xinfo_default","title":"xinfo_default","text":"<pre><code>xinfo_default(page: Page, addr: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo.xinfo","title":"xinfo","text":"<pre><code>xinfo(address=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/xor/","title":"pwndbg.commands.xor","text":""},{"location":"reference/pwndbg/commands/xor/#pwndbg.commands.xor","title":"xor","text":"<p>Functions:</p> <ul> <li> <code>xor_memory</code> \u2013 <p>Helper function for xorring memory in gdb</p> </li> <li> <code>xor</code> \u2013 </li> <li> <code>memfrob</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/xor/#pwndbg.commands.xor.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Memfrobs a region of memory (xor with '*').\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/xor/#pwndbg.commands.xor.xor_memory","title":"xor_memory","text":"<pre><code>xor_memory(address, key, count)\n</code></pre> <p>Helper function for xorring memory in gdb</p>"},{"location":"reference/pwndbg/commands/xor/#pwndbg.commands.xor.xor","title":"xor","text":"<pre><code>xor(address, key, count) -> None\n</code></pre>"},{"location":"reference/pwndbg/commands/xor/#pwndbg.commands.xor.memfrob","title":"memfrob","text":"<pre><code>memfrob(address, count)\n</code></pre>"},{"location":"reference/pwndbg/dbg/","title":"pwndbg.dbg","text":""},{"location":"reference/pwndbg/dbg/#pwndbg.dbg","title":"dbg","text":"<p>The abstracted debugger interface.</p> <p>Modules:</p> <ul> <li> <code>gdb</code> \u2013 </li> <li> <code>lldb</code> \u2013 </li> </ul> <p>Classes:</p> <ul> <li> <code>Error</code> \u2013 </li> <li> <code>DisassembledInstruction</code> \u2013 </li> <li> <code>DebuggerType</code> \u2013 </li> <li> <code>Arch</code> \u2013 <p>The definition of an architecture.</p> </li> <li> <code>StopPoint</code> \u2013 <p>The handle to either an insalled breakpoint or watchpoint.</p> </li> <li> <code>BreakpointLocation</code> \u2013 <p>This is the location specification for a breakpoint.</p> </li> <li> <code>WatchpointLocation</code> \u2013 <p>This is the location specification for a watchpoint.</p> </li> <li> <code>Registers</code> \u2013 <p>A handle to the register values in a frame.</p> </li> <li> <code>SymbolLookupType</code> \u2013 <p>Enum representing types of symbol lookups for filtering symbol searches.</p> </li> <li> <code>Frame</code> \u2013 </li> <li> <code>Thread</code> \u2013 </li> <li> <code>MemoryMap</code> \u2013 <p>A wrapper around a sequence of memory ranges</p> </li> <li> <code>ExecutionController</code> \u2013 </li> <li> <code>Process</code> \u2013 </li> <li> <code>TypeCode</code> \u2013 <p>Broad categories of types.</p> </li> <li> <code>TypeField</code> \u2013 <p>The fields in a structured type.</p> </li> <li> <code>Type</code> \u2013 <p>Class representing a type in the context of an inferior process.</p> </li> <li> <code>Value</code> \u2013 <p>Class representing a value in the context of an inferior process.</p> </li> <li> <code>CommandHandle</code> \u2013 <p>An opaque handle to an installed command.</p> </li> <li> <code>EventType</code> \u2013 <p>Events that can be listened for and reacted to in a debugger.</p> </li> <li> <code>Debugger</code> \u2013 <p>The base class representing a debugger.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>selection</code> \u2013 <p>Debuggers have global state. Many of our queries require that we select a</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>dbg</code> (<code>Debugger</code>) \u2013 </li> <li> <code>T</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.dbg","title":"dbg <code>module-attribute</code>","text":"<pre><code>dbg: Debugger = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Error","title":"Error","text":"<p> Bases: <code>Exception</code></p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.DisassembledInstruction","title":"DisassembledInstruction","text":"<p> Bases: <code>TypedDict</code></p> <p>Attributes:</p> <ul> <li> <code>addr</code> (<code>int</code>) \u2013 </li> <li> <code>asm</code> (<code>str</code>) \u2013 </li> <li> <code>length</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.DisassembledInstruction.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.DisassembledInstruction.asm","title":"asm <code>instance-attribute</code>","text":"<pre><code>asm: str\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.DisassembledInstruction.length","title":"length <code>instance-attribute</code>","text":"<pre><code>length: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.DebuggerType","title":"DebuggerType","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>GDB</code> \u2013 </li> <li> <code>LLDB</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.DebuggerType.GDB","title":"GDB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>GDB = 1\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.DebuggerType.LLDB","title":"LLDB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>LLDB = 2\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Arch","title":"Arch","text":"<p>The definition of an architecture.</p> <p>Attributes:</p> <ul> <li> <code>endian</code> (<code>Literal['little', 'big']</code>) \u2013 <p>Wether code in this module is little or big.</p> </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 <p>Name of the architecture.</p> </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Length of the pointer in this module.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Arch.endian","title":"endian <code>property</code>","text":"<pre><code>endian: Literal['little', 'big']\n</code></pre> <p>Wether code in this module is little or big.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Arch.name","title":"name <code>property</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE\n</code></pre> <p>Name of the architecture.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Arch.ptrsize","title":"ptrsize <code>property</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Length of the pointer in this module.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.StopPoint","title":"StopPoint","text":"<p>The handle to either an insalled breakpoint or watchpoint.</p> <p>May be used in a <code>with</code> statement, in which case the stop point is automatically removed at the end of the statement. This allows for easy implementation of temporary breakpoints.</p> <p>Methods:</p> <ul> <li> <code>remove</code> \u2013 <p>Removes the breakpoint associated with this handle.</p> </li> <li> <code>set_enabled</code> \u2013 <p>Enables or disables this breakpoint.</p> </li> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 <p>Automatic breakpoint removal.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.StopPoint.remove","title":"remove","text":"<pre><code>remove() -> None\n</code></pre> <p>Removes the breakpoint associated with this handle.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.StopPoint.set_enabled","title":"set_enabled","text":"<pre><code>set_enabled(enabled: bool) -> None\n</code></pre> <p>Enables or disables this breakpoint.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.StopPoint.__enter__","title":"__enter__","text":"<pre><code>__enter__() -> StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.StopPoint.__exit__","title":"__exit__","text":"<pre><code>__exit__(exc_type, exc_value, traceback) -> None\n</code></pre> <p>Automatic breakpoint removal.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.BreakpointLocation","title":"BreakpointLocation","text":"<pre><code>BreakpointLocation(address: int)\n</code></pre> <p>This is the location specification for a breakpoint.</p> <p>Methods:</p> <ul> <li> <code>__eq__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.BreakpointLocation.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address: int = address\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.BreakpointLocation.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.WatchpointLocation","title":"WatchpointLocation","text":"<pre><code>WatchpointLocation(\n address: int, size: int, watch_read: bool, watch_write: bool\n)\n</code></pre> <p>This is the location specification for a watchpoint.</p> <p>Attributes:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 </li> <li> <code>size</code> (<code>int</code>) \u2013 </li> <li> <code>watch_read</code> (<code>bool</code>) \u2013 </li> <li> <code>watch_write</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.WatchpointLocation.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address: int = address\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.WatchpointLocation.size","title":"size <code>instance-attribute</code>","text":"<pre><code>size: int = size\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.WatchpointLocation.watch_read","title":"watch_read <code>instance-attribute</code>","text":"<pre><code>watch_read: bool = watch_read\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.WatchpointLocation.watch_write","title":"watch_write <code>instance-attribute</code>","text":"<pre><code>watch_write: bool = watch_write\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Registers","title":"Registers","text":"<p>A handle to the register values in a frame.</p> <p>Methods:</p> <ul> <li> <code>by_name</code> \u2013 <p>Gets the value of a register if it exists, None otherwise.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Registers.by_name","title":"by_name","text":"<pre><code>by_name(name: str) -> Value | None\n</code></pre> <p>Gets the value of a register if it exists, None otherwise.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.SymbolLookupType","title":"SymbolLookupType","text":"<p> Bases: <code>Enum</code></p> <p>Enum representing types of symbol lookups for filtering symbol searches.</p> <p>Attributes: - ANY: Represents searching for any symbol type (default). - FUNCTION: Represents searching specifically for function symbols. - VARIABLE: Represents searching specifically for variable symbols.</p> <p>Attributes:</p> <ul> <li> <code>ANY</code> \u2013 </li> <li> <code>FUNCTION</code> \u2013 </li> <li> <code>VARIABLE</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.SymbolLookupType.ANY","title":"ANY <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ANY = 1\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.SymbolLookupType.FUNCTION","title":"FUNCTION <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FUNCTION = 2\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.SymbolLookupType.VARIABLE","title":"VARIABLE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VARIABLE = 3\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame","title":"Frame","text":"<p>Methods:</p> <ul> <li> <code>lookup_symbol</code> \u2013 <p>Looks up and returns the address of a symbol in current frame by its name.</p> </li> <li> <code>evaluate_expression</code> \u2013 <p>Evaluate the given expression in the context of this frame, and</p> </li> <li> <code>regs</code> \u2013 <p>Access the values of the registers in this frame.</p> </li> <li> <code>reg_write</code> \u2013 <p>Sets the value of the register with the given name to the given value.</p> </li> <li> <code>pc</code> \u2013 <p>The value of the program counter for this frame.</p> </li> <li> <code>sp</code> \u2013 <p>The value of the stack pointer for this frame.</p> </li> <li> <code>parent</code> \u2013 <p>The parent frame of this frame, if it exists.</p> </li> <li> <code>child</code> \u2013 <p>The child frame of this frame, if it exists.</p> </li> <li> <code>sal</code> \u2013 <p>The filename of the source code file associated with this frame, and the</p> </li> <li> <code>__eq__</code> \u2013 <p>Whether this frame is the same as the given frame. Two frames are the</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(name: str, *, type: SymbolLookupType = ANY) -> Value | None\n</code></pre> <p>Looks up and returns the address of a symbol in current frame by its name.</p> <p>Parameters: - name (str): The name of the symbol to look up. - type (SymbolLookupType, optional): The type of symbol to search for. Defaults to SymbolLookupType.ANY.</p> <p>Returns: - pwndbg.dbg_mod.Value | None: The value of the symbol if found, or None if not found.</p> <p>Raises: - pwndbg.dbg_mod.Error: If symbol name contains invalid characters</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.evaluate_expression","title":"evaluate_expression","text":"<pre><code>evaluate_expression(expression: str, lock_scheduler: bool = False) -> Value\n</code></pre> <p>Evaluate the given expression in the context of this frame, and return a <code>Value</code>.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.evaluate_expression--lock_scheduler","title":"<code>lock_scheduler</code>","text":"<p>Additionally, callers of this function might specify that they want to enable scheduler locking during the evaluation of this expression. This is a GDB-only option, and is intended for cases in which the result would be incorrect without it enabled, when running in GDB. Other debuggers should ignore this parameter.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.regs","title":"regs","text":"<pre><code>regs() -> Registers\n</code></pre> <p>Access the values of the registers in this frame.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.reg_write","title":"reg_write","text":"<pre><code>reg_write(name: str, val: int) -> bool\n</code></pre> <p>Sets the value of the register with the given name to the given value. Returns true if the register exists, false othewise. Throws an exception if the register exists but cannot be written to.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.pc","title":"pc","text":"<pre><code>pc() -> int\n</code></pre> <p>The value of the program counter for this frame.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.sp","title":"sp","text":"<pre><code>sp() -> int\n</code></pre> <p>The value of the stack pointer for this frame.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.parent","title":"parent","text":"<pre><code>parent() -> Frame | None\n</code></pre> <p>The parent frame of this frame, if it exists.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.child","title":"child","text":"<pre><code>child() -> Frame | None\n</code></pre> <p>The child frame of this frame, if it exists.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.sal","title":"sal","text":"<pre><code>sal() -> tuple[str, int] | None\n</code></pre> <p>The filename of the source code file associated with this frame, and the line number associated with it, if available.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Frame.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -> bool\n</code></pre> <p>Whether this frame is the same as the given frame. Two frames are the same if they point to the same stack frame and have the same execution context.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Thread","title":"Thread","text":"<p>Methods:</p> <ul> <li> <code>bottom_frame</code> \u2013 <p>Frame at the bottom of the call stack for this thread.</p> </li> <li> <code>ptid</code> \u2013 <p>The PTID of this thread, if available.</p> </li> <li> <code>index</code> \u2013 <p>The unique index of this thread from the perspective of the debugger.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Thread.bottom_frame","title":"bottom_frame","text":"<pre><code>bottom_frame() -> Iterator[Frame]\n</code></pre> <p>Frame at the bottom of the call stack for this thread.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Thread.ptid","title":"ptid","text":"<pre><code>ptid() -> int | None\n</code></pre> <p>The PTID of this thread, if available.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Thread.index","title":"index","text":"<pre><code>index() -> int\n</code></pre> <p>The unique index of this thread from the perspective of the debugger.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.MemoryMap","title":"MemoryMap","text":"<p>A wrapper around a sequence of memory ranges</p> <p>Methods:</p> <ul> <li> <code>is_qemu</code> \u2013 <p>Returns whether this memory map was generated from a QEMU target.</p> </li> <li> <code>ranges</code> \u2013 <p>Returns all ranges in this memory map.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.MemoryMap.is_qemu","title":"is_qemu","text":"<pre><code>is_qemu() -> bool\n</code></pre> <p>Returns whether this memory map was generated from a QEMU target.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.MemoryMap.ranges","title":"ranges","text":"<pre><code>ranges() -> Sequence[Page]\n</code></pre> <p>Returns all ranges in this memory map.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.ExecutionController","title":"ExecutionController","text":"<p>Methods:</p> <ul> <li> <code>single_step</code> \u2013 <p>Steps to the next instruction.</p> </li> <li> <code>cont</code> \u2013 <p>Continues execution until the given breakpoint or whatchpoint is hit.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.ExecutionController.single_step","title":"single_step","text":"<pre><code>single_step() -> Awaitable[None]\n</code></pre> <p>Steps to the next instruction.</p> <p>Throws <code>CancelledError</code> if a breakpoint or watchpoint is hit, the program exits, or if any other unexpected event that diverts execution happens while fulfulling the step.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.ExecutionController.cont","title":"cont","text":"<pre><code>cont(until: StopPoint) -> Awaitable[None]\n</code></pre> <p>Continues execution until the given breakpoint or whatchpoint is hit.</p> <p>Throws <code>CancelledError</code> if a breakpoint or watchpoint is hit that is not the one given in <code>until</code>, the program exits, or if any other unexpected event happens.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process","title":"Process","text":"<p>Methods:</p> <ul> <li> <code>threads</code> \u2013 <p>Returns a list containing the threads in this process.</p> </li> <li> <code>pid</code> \u2013 <p>Returns the process ID of this process if it is alive.</p> </li> <li> <code>alive</code> \u2013 <p>Returns whether this process is alive.</p> </li> <li> <code>stopped_with_signal</code> \u2013 <p>Returns whether this process was stopped by a signal.</p> </li> <li> <code>evaluate_expression</code> \u2013 <p>Evaluate the given expression in the context of the current process, and</p> </li> <li> <code>vmmap</code> \u2013 <p>Returns the virtual memory map of this process.</p> </li> <li> <code>read_memory</code> \u2013 <p>Reads the requested number of bytes from the address given in the memory</p> </li> <li> <code>write_memory</code> \u2013 <p>Writes as many bytes from the given data buffer as possible into the</p> </li> <li> <code>find_in_memory</code> \u2013 <p>Searches for a bit pattern in the memory space of the process. The bit</p> </li> <li> <code>is_remote</code> \u2013 <p>Returns whether this process is a remote process connected to using the</p> </li> <li> <code>send_remote</code> \u2013 <p>Sends the given packet to the GDB remote debugging protocol server.</p> </li> <li> <code>send_monitor</code> \u2013 <p>Sends the given monitor command to the GDB remote debugging protocol</p> </li> <li> <code>download_remote_file</code> \u2013 <p>Downloads the given file from the remote host and saves it to the local</p> </li> <li> <code>create_value</code> \u2013 <p>Create a new value in the context of this process, with the given value</p> </li> <li> <code>symbol_name_at_address</code> \u2013 <p>Returns the name of the symbol at the given address in the program, if</p> </li> <li> <code>lookup_symbol</code> \u2013 <p>Looks up and returns the address of a symbol by its name.</p> </li> <li> <code>types_with_name</code> \u2013 <p>Returns a list of all types in this process that match the given name.</p> </li> <li> <code>arch</code> \u2013 <p>The default architecture of this process.</p> </li> <li> <code>break_at</code> \u2013 <p>Install a breakpoint or watchpoint at the given location.</p> </li> <li> <code>is_linux</code> \u2013 <p>Returns whether the current ABI is GNU/Linux.</p> </li> <li> <code>disasm</code> \u2013 <p>Returns the disassembled instruction at the given address in the address</p> </li> <li> <code>module_section_locations</code> \u2013 <p>Return a list of (address, size, section_name, module_name) tuples for</p> </li> <li> <code>main_module_name</code> \u2013 <p>Returns the name of the main module.</p> </li> <li> <code>main_module_entry</code> \u2013 <p>Returns the entry point of the main module.</p> </li> <li> <code>is_dynamically_linked</code> \u2013 <p>Returns whether this process makes use of dynamically linked libraries.</p> </li> <li> <code>dispatch_execution_controller</code> \u2013 <p>Queues up the given execution controller-based coroutine for execution,</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.threads","title":"threads","text":"<pre><code>threads() -> list[Thread]\n</code></pre> <p>Returns a list containing the threads in this process.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.pid","title":"pid","text":"<pre><code>pid() -> int | None\n</code></pre> <p>Returns the process ID of this process if it is alive.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.alive","title":"alive","text":"<pre><code>alive() -> bool\n</code></pre> <p>Returns whether this process is alive.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.stopped_with_signal","title":"stopped_with_signal","text":"<pre><code>stopped_with_signal() -> bool\n</code></pre> <p>Returns whether this process was stopped by a signal.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.evaluate_expression","title":"evaluate_expression","text":"<pre><code>evaluate_expression(expression: str) -> Value\n</code></pre> <p>Evaluate the given expression in the context of the current process, and return a <code>Value</code>.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.vmmap","title":"vmmap","text":"<pre><code>vmmap() -> MemoryMap\n</code></pre> <p>Returns the virtual memory map of this process.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.read_memory","title":"read_memory","text":"<pre><code>read_memory(address: int, size: int, partial: bool = False) -> bytearray\n</code></pre> <p>Reads the requested number of bytes from the address given in the memory space of this process. Will read as many bytes as possible starting at that location, and returns how many were read.</p> <p>Throws an exception if reading fails and partial is False.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.write_memory","title":"write_memory","text":"<pre><code>write_memory(address: int, data: bytearray, partial: bool = False) -> int\n</code></pre> <p>Writes as many bytes from the given data buffer as possible into the given address in the memory space of this process.</p> <p>Throws an exception if writing fails and partial is False.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.find_in_memory","title":"find_in_memory","text":"<pre><code>find_in_memory(\n pattern: bytearray,\n start: int,\n size: int,\n align: int,\n max_matches: int = -1,\n step: int = -1,\n) -> Generator[int, None, None]\n</code></pre> <p>Searches for a bit pattern in the memory space of the process. The bit pattern can be searched for in a given memory range, and with a given alignment. The maximum number of matches that will be generated is given by <code>max_matches</code>. A value of <code>max_matches</code> of <code>-1</code> will generate all matches.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.is_remote","title":"is_remote","text":"<pre><code>is_remote() -> bool\n</code></pre> <p>Returns whether this process is a remote process connected to using the GDB remote debugging protocol.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.send_remote","title":"send_remote","text":"<pre><code>send_remote(packet: str) -> bytes\n</code></pre> <p>Sends the given packet to the GDB remote debugging protocol server. Should only be called if <code>is_remote()</code> is true.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.send_monitor","title":"send_monitor","text":"<pre><code>send_monitor(cmd: str) -> str\n</code></pre> <p>Sends the given monitor command to the GDB remote debugging protocol server. Should only be called if <code>is_remote()</code> is true.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.download_remote_file","title":"download_remote_file","text":"<pre><code>download_remote_file(remote_path: str, local_path: str) -> None\n</code></pre> <p>Downloads the given file from the remote host and saves it to the local given path. Should only be called if <code>is_remote()</code> is true.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.create_value","title":"create_value","text":"<pre><code>create_value(value: int, type: Type | None = None) -> Value\n</code></pre> <p>Create a new value in the context of this process, with the given value and, optionally, type. If no type is provided, one will be chosen automatically.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.symbol_name_at_address","title":"symbol_name_at_address","text":"<pre><code>symbol_name_at_address(address: int) -> str | None\n</code></pre> <p>Returns the name of the symbol at the given address in the program, if one exists.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(\n name: str,\n *,\n prefer_static: bool = False,\n type: SymbolLookupType = ANY,\n objfile_endswith: str | None = None,\n) -> Value | None\n</code></pre> <p>Looks up and returns the address of a symbol by its name.</p> <p>Parameters: - name (str): The name of the symbol to look up. - prefer_static (bool, optional): If True, prioritize symbols in the static block, if supported by the debugger. Defaults to False. - type (SymbolLookupType, optional): The type of symbol to search for. Defaults to SymbolLookupType.ANY. - objfile_endswith (str | None, optional): If specified, limits the search to the first object file whose name ends with the provided string.</p> <p>Returns: - pwndbg.dbg_mod.Value | None: The value of the symbol if found, or None if not found.</p> <p>Raises: - pwndbg.dbg_mod.Error: If no object file matching the <code>objfile_endswith</code> pattern is found.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.types_with_name","title":"types_with_name","text":"<pre><code>types_with_name(name: str) -> Sequence[Type]\n</code></pre> <p>Returns a list of all types in this process that match the given name.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.arch","title":"arch","text":"<pre><code>arch() -> Arch\n</code></pre> <p>The default architecture of this process.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.break_at","title":"break_at","text":"<pre><code>break_at(\n location: BreakpointLocation | WatchpointLocation,\n stop_handler: Callable[[StopPoint], bool] | None = None,\n internal: bool = False,\n) -> StopPoint\n</code></pre> <p>Install a breakpoint or watchpoint at the given location.</p> <p>The type of the location determines whether the newly created object is a watchpoint or a breakpoint. <code>BreakpointLocation</code> locations yield breakpoints, while <code>WatchpointLocation</code> locations yield watchpoints.</p> <p>Aditionally, one may specify a stop handler function, to be run when the breakpoint or whatchpoint is hit, and that determines whether execution should stop. With a return value of <code>True</code> being interpreted as a signal to stop, and a return value of <code>False</code> being interpreted as a signal to continue execution. The extent of the actions that may be taken during the stop handler is determined by the debugger.</p> <p>Marking a breakpoint or watchpoint as <code>internal</code> hints to the implementation that the created breakpoint or watchpoint should not be directly nameable by the user, and that it should not print any messages upon being triggered. Implementations should try to honor this hint, but they are not required to in case honoring it is either not possible or comes at a significant impact to performance.</p> <p>This function returns a handle to the newly created breakpoint or watchpoint.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.is_linux","title":"is_linux","text":"<pre><code>is_linux() -> bool\n</code></pre> <p>Returns whether the current ABI is GNU/Linux.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.disasm","title":"disasm","text":"<pre><code>disasm(address: int) -> DisassembledInstruction | None\n</code></pre> <p>Returns the disassembled instruction at the given address in the address space of the running process, or <code>None</code> if there's no valid instruction at that address.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.module_section_locations","title":"module_section_locations","text":"<pre><code>module_section_locations() -> list[tuple[int, int, str, str]]\n</code></pre> <p>Return a list of (address, size, section_name, module_name) tuples for the loaded sections in every module of this process.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.main_module_name","title":"main_module_name","text":"<pre><code>main_module_name() -> str | None\n</code></pre> <p>Returns the name of the main module.</p> <p>On remote targets, this may be prefixed with \"target:\" string.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.main_module_entry","title":"main_module_entry","text":"<pre><code>main_module_entry() -> int | None\n</code></pre> <p>Returns the entry point of the main module.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.is_dynamically_linked","title":"is_dynamically_linked","text":"<pre><code>is_dynamically_linked() -> bool\n</code></pre> <p>Returns whether this process makes use of dynamically linked libraries.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.is_dynamically_linked--dynamically-linked","title":"<code>\"dynamically linked\"</code>","text":"<p>What exactly it means to be \"dynamically linked\" here is a little ill-defined. Ideally, this function should return true if the process uses the default dynamic linker for the system, as that would better reflect whether the process uses dynamic linking.</p> <p>Currently, though, Pwndbg expects it to behave the same as a check for the string \"No shared libraries loaded at this time.\" in the output of the <code>info dll</code> GDB command, which checks for the presence of other modules in the address space of the process, rather than whether or not the dynamic linker is used.</p> <p>We should probably sort this out in the future.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.dispatch_execution_controller","title":"dispatch_execution_controller","text":"<pre><code>dispatch_execution_controller(\n procedure: Callable[[ExecutionController], Coroutine[Any, Any, None]],\n)\n</code></pre> <p>Queues up the given execution controller-based coroutine for execution, sometime between the calling of this function and the</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode","title":"TypeCode","text":"<p> Bases: <code>Enum</code></p> <p>Broad categories of types.</p> <p>Attributes:</p> <ul> <li> <code>INVALID</code> \u2013 </li> <li> <code>POINTER</code> \u2013 </li> <li> <code>ARRAY</code> \u2013 </li> <li> <code>STRUCT</code> \u2013 </li> <li> <code>TYPEDEF</code> \u2013 </li> <li> <code>UNION</code> \u2013 </li> <li> <code>INT</code> \u2013 </li> <li> <code>ENUM</code> \u2013 </li> <li> <code>FUNC</code> \u2013 </li> <li> <code>BOOL</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.INVALID","title":"INVALID <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INVALID = -1\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.POINTER","title":"POINTER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>POINTER = 1\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.ARRAY","title":"ARRAY <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ARRAY = 2\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.STRUCT","title":"STRUCT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STRUCT = 3\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.TYPEDEF","title":"TYPEDEF <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>TYPEDEF = 4\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.UNION","title":"UNION <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>UNION = 5\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.INT","title":"INT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>INT = 6\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.ENUM","title":"ENUM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ENUM = 7\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.FUNC","title":"FUNC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FUNC = 8\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeCode.BOOL","title":"BOOL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>BOOL = 9\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField","title":"TypeField","text":"<pre><code>TypeField(\n bitpos: int,\n name: str | None,\n type: Type,\n parent_type,\n enumval: int | None = None,\n artificial: bool = False,\n is_base_class: bool = False,\n bitsize: int = 0,\n)\n</code></pre> <p>The fields in a structured type.</p> <p>Currently this is just a mirror of <code>gdb.Field</code>.</p> <p>Attributes:</p> <ul> <li> <code>bitpos</code> \u2013 </li> <li> <code>name</code> \u2013 </li> <li> <code>type</code> \u2013 </li> <li> <code>parent_type</code> \u2013 </li> <li> <code>enumval</code> \u2013 </li> <li> <code>artificial</code> \u2013 </li> <li> <code>is_base_class</code> \u2013 </li> <li> <code>bitsize</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.bitpos","title":"bitpos <code>instance-attribute</code>","text":"<pre><code>bitpos = bitpos\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name = name\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.type","title":"type <code>instance-attribute</code>","text":"<pre><code>type = type\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.parent_type","title":"parent_type <code>instance-attribute</code>","text":"<pre><code>parent_type = parent_type\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.enumval","title":"enumval <code>instance-attribute</code>","text":"<pre><code>enumval = enumval\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.artificial","title":"artificial <code>instance-attribute</code>","text":"<pre><code>artificial = artificial\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.is_base_class","title":"is_base_class <code>instance-attribute</code>","text":"<pre><code>is_base_class = is_base_class\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.TypeField.bitsize","title":"bitsize <code>instance-attribute</code>","text":"<pre><code>bitsize = bitsize\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type","title":"Type","text":"<p>Class representing a type in the context of an inferior process.</p> <p>Methods:</p> <ul> <li> <code>func_arguments</code> \u2013 <p>Returns a list of function arguments type.</p> </li> <li> <code>fields</code> \u2013 <p>List of all fields in this type, if it is a structured type.</p> </li> <li> <code>has_field</code> \u2013 <p>Whether this type has a field with the given name.</p> </li> <li> <code>array</code> \u2013 <p>Return a type that corresponds to an array whose elements have this type.</p> </li> <li> <code>pointer</code> \u2013 <p>Return a pointer type that has this type as its pointee.</p> </li> <li> <code>strip_typedefs</code> \u2013 <p>Return a type that corresponds to the base type after a typedef chain,</p> </li> <li> <code>target</code> \u2013 <p>Return the target of this reference type, if this is a reference type.</p> </li> <li> <code>keys</code> \u2013 <p>Returns a list containing all the field names of this type.</p> </li> <li> <code>enum_member</code> \u2013 <p>Retrieve the integer value of an enum member.</p> </li> <li> <code>offsetof</code> \u2013 <p>Calculate the byte offset of a field within a struct or union.</p> </li> <li> <code>__eq__</code> \u2013 <p>Returns True if types are the same</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>name_identifier</code> (<code>str | None</code>) \u2013 <p>Returns the identifier of this type, eg:</p> </li> <li> <code>name_to_human_readable</code> (<code>str</code>) \u2013 <p>Returns the human friendly name of this type, eg:</p> </li> <li> <code>sizeof</code> (<code>int</code>) \u2013 <p>The size of this type, in bytes.</p> </li> <li> <code>alignof</code> (<code>int</code>) \u2013 <p>The alignment of this type, in bytes.</p> </li> <li> <code>code</code> (<code>TypeCode</code>) \u2013 <p>What category of type this object belongs to.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.name_identifier","title":"name_identifier <code>property</code>","text":"<pre><code>name_identifier: str | None\n</code></pre> <p>Returns the identifier of this type, eg: - someStructName - someEnumName - someTypedefName</p> <p>Returns None if the type is anonymous or does not have a name, such as: - Anonymous structs - Anonymous Typedefs - Basic types like char[], void, etc.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.name_to_human_readable","title":"name_to_human_readable <code>property</code>","text":"<pre><code>name_to_human_readable: str\n</code></pre> <p>Returns the human friendly name of this type, eg: - char [16] - int - char * - void * - fooStructName - barEnumName - barTypedefName</p> <p>This function is not standardized, may return different names in gdb/lldb, eg: gdb: <code>char [16]</code> or <code>char [50]</code> or <code>struct {...}</code> lldb: <code>char[16]</code> or <code>char[]</code> or <code>(anonymous struct)</code></p> <p>You should not use this function. Only for human eyes.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.sizeof","title":"sizeof <code>property</code>","text":"<pre><code>sizeof: int\n</code></pre> <p>The size of this type, in bytes.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.alignof","title":"alignof <code>property</code>","text":"<pre><code>alignof: int\n</code></pre> <p>The alignment of this type, in bytes.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.code","title":"code <code>property</code>","text":"<pre><code>code: TypeCode\n</code></pre> <p>What category of type this object belongs to.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.func_arguments","title":"func_arguments","text":"<pre><code>func_arguments() -> list[Type] | None\n</code></pre> <p>Returns a list of function arguments type.</p> <p>Returns:</p> <ul> <li> <code>list[Type] | None</code> \u2013 <p>List[Type] | None: The function arguments type, or None if debug information is missing.</p> </li> </ul> <p>Raises:</p> <ul> <li> <code>TypeError</code> \u2013 <p>If called on an unsupported type.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.fields","title":"fields","text":"<pre><code>fields() -> list[TypeField]\n</code></pre> <p>List of all fields in this type, if it is a structured type.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.has_field","title":"has_field","text":"<pre><code>has_field(name: str) -> bool\n</code></pre> <p>Whether this type has a field with the given name.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.array","title":"array","text":"<pre><code>array(count: int) -> Type\n</code></pre> <p>Return a type that corresponds to an array whose elements have this type.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.pointer","title":"pointer","text":"<pre><code>pointer() -> Type\n</code></pre> <p>Return a pointer type that has this type as its pointee.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.strip_typedefs","title":"strip_typedefs","text":"<pre><code>strip_typedefs() -> Type\n</code></pre> <p>Return a type that corresponds to the base type after a typedef chain, if this is a typedef. Returns the type itself otherwise.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.target","title":"target","text":"<pre><code>target() -> Type\n</code></pre> <p>Return the target of this reference type, if this is a reference type.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.keys","title":"keys","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Returns a list containing all the field names of this type.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.enum_member","title":"enum_member","text":"<pre><code>enum_member(field_name: str) -> int | None\n</code></pre> <p>Retrieve the integer value of an enum member.</p> <p>It returns: - integer value, when found field - returns None, If the field does not exist</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.offsetof","title":"offsetof","text":"<pre><code>offsetof(field_name: str) -> int | None\n</code></pre> <p>Calculate the byte offset of a field within a struct or union.</p> <p>This method recursively traverses nested structures and unions, and it computes the byte-aligned offset for the specified field.</p> <p>It returns: - offset in bytes if found - None if the field doesn't exist or if an unsupported alignment/bit-field is encountered</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Type.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -> bool\n</code></pre> <p>Returns True if types are the same</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value","title":"Value","text":"<p>Class representing a value in the context of an inferior process.</p> <p>Methods:</p> <ul> <li> <code>dereference</code> \u2013 <p>If this is a poitner value, dereferences the pointer and returns a new</p> </li> <li> <code>string</code> \u2013 <p>If this value is a string, then this method converts it to a Python string.</p> </li> <li> <code>value_to_human_readable</code> \u2013 <pre><code> Converts a Value to a human-readable string representation.\n</code></pre> </li> <li> <code>fetch_lazy</code> \u2013 <p>Fetches the value if it is lazy, does nothing otherwise.</p> </li> <li> <code>__int__</code> \u2013 <p>Converts this value to an integer, if possible.</p> </li> <li> <code>cast</code> \u2013 <p>Returns a new value with the same value as this object, but of the</p> </li> <li> <code>__add__</code> \u2013 <p>Adds an integer to this value, if that makes sense. Throws an exception</p> </li> <li> <code>__sub__</code> \u2013 <p>Subtract an integer from this value, if that makes sense. Throws an</p> </li> <li> <code>__getitem__</code> \u2013 <p>Gets the value with the given name that belongs to this value. For</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>address</code> (<code>Value | None</code>) \u2013 <p>The address of this value, in memory, if addressable, otherwise <code>None</code>.</p> </li> <li> <code>is_optimized_out</code> (<code>bool</code>) \u2013 <p>Whether this value is present in debugging information, but has been</p> </li> <li> <code>type</code> (<code>Type</code>) \u2013 <p>The type associated with this value.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.address","title":"address <code>property</code>","text":"<pre><code>address: Value | None\n</code></pre> <p>The address of this value, in memory, if addressable, otherwise <code>None</code>.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.is_optimized_out","title":"is_optimized_out <code>property</code>","text":"<pre><code>is_optimized_out: bool\n</code></pre> <p>Whether this value is present in debugging information, but has been optimized out of the actual program.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.type","title":"type <code>property</code>","text":"<pre><code>type: Type\n</code></pre> <p>The type associated with this value.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.dereference","title":"dereference","text":"<pre><code>dereference() -> Value\n</code></pre> <p>If this is a poitner value, dereferences the pointer and returns a new instance of Value, containing the value pointed to by this pointer.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.string","title":"string","text":"<pre><code>string() -> str\n</code></pre> <p>If this value is a string, then this method converts it to a Python string.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre> <pre><code> Converts a Value to a human-readable string representation.\n\n The format is similar to what is produced by the `str()` function for gdb.Value,\n displaying nested fields and pointers in a user-friendly way.\n\n **Usage Notes:**\n - This function is intended solely for displaying results to the user.\n - The output format may differ between debugger implementations (e.g., GDB vs LLDB),\n as each debugger may format values differently. For instance:\n - GDB might produce: '{\n</code></pre> <p>value = 0, inner = { next = 0x555555558098 } }' - LLDB might produce: '(inner_a_node) *$PWNDBG_CREATED_VALUE_0 = { value = 0 inner = { next = 0x0000555555558098 } }' - As such, this function should not be relied upon for parsing or programmatic use."},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.fetch_lazy","title":"fetch_lazy","text":"<pre><code>fetch_lazy() -> None\n</code></pre> <p>Fetches the value if it is lazy, does nothing otherwise.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre> <p>Converts this value to an integer, if possible.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.cast","title":"cast","text":"<pre><code>cast(type: Type | Any) -> Value\n</code></pre> <p>Returns a new value with the same value as this object, but of the given type.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.__add__","title":"__add__","text":"<pre><code>__add__(rhs: int) -> Value\n</code></pre> <p>Adds an integer to this value, if that makes sense. Throws an exception otherwise.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.__sub__","title":"__sub__","text":"<pre><code>__sub__(rhs: int) -> Value\n</code></pre> <p>Subtract an integer from this value, if that makes sense. Throws an exception otherwise.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Value.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(idx: int | str) -> Value\n</code></pre> <p>Gets the value with the given name that belongs to this value. For structure types, this is the field with the given name. For array types, this is the field at the given index. For pointer types, this is the value of <code>*(ptr+idx)</code>.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.CommandHandle","title":"CommandHandle","text":"<p>An opaque handle to an installed command.</p> <p>Methods:</p> <ul> <li> <code>remove</code> \u2013 <p>Removes this command from the command palette of the debugger.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.CommandHandle.remove","title":"remove","text":"<pre><code>remove() -> None\n</code></pre> <p>Removes this command from the command palette of the debugger.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType","title":"EventType","text":"<p> Bases: <code>Enum</code></p> <p>Events that can be listened for and reacted to in a debugger.</p> The events types listed here are defined as follows <ul> <li><code>START</code>: This event is fired some time between the creation of or attachment to the process to be debugged, and the start of its execution.</li> <li><code>STOP</code>: This event is fired after execution of the process has been suspended, but before control is returned to the user for interactive debugging.</li> <li><code>EXIT</code>: This event is fired after the process being debugged has been detached from or has finished executing.</li> <li><code>MEMORY_CHANGED</code>: This event is fired when the user interactively makes changes to the memory of the process being debugged.</li> <li><code>REGISTER_CHANGED</code>: Like <code>MEMORY_CHANGED</code>, but for registers.</li> <li><code>CONTINUE</code>: This event is fired after the user has requested for process execution to continue after it had been previously suspended.</li> <li><code>NEW_MODULE</code>: This event is fired when a new application module has been encountered by the debugger. This usually happens when a new application module is loaded into the memory space of the process being debugged. In GDB terminology, these are called <code>objfile</code>s.</li> </ul> <p>Attributes:</p> <ul> <li> <code>START</code> \u2013 </li> <li> <code>STOP</code> \u2013 </li> <li> <code>EXIT</code> \u2013 </li> <li> <code>MEMORY_CHANGED</code> \u2013 </li> <li> <code>REGISTER_CHANGED</code> \u2013 </li> <li> <code>CONTINUE</code> \u2013 </li> <li> <code>NEW_MODULE</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType.START","title":"START <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>START = 0\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType.STOP","title":"STOP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STOP = 1\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType.EXIT","title":"EXIT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EXIT = 2\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType.MEMORY_CHANGED","title":"MEMORY_CHANGED <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MEMORY_CHANGED = 3\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType.REGISTER_CHANGED","title":"REGISTER_CHANGED <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>REGISTER_CHANGED = 4\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType.CONTINUE","title":"CONTINUE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>CONTINUE = 5\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.EventType.NEW_MODULE","title":"NEW_MODULE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NEW_MODULE = 6\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger","title":"Debugger","text":"<p>The base class representing a debugger.</p> <p>Methods:</p> <ul> <li> <code>setup</code> \u2013 <p>Perform debugger-specific initialization.</p> </li> <li> <code>history</code> \u2013 <p>The command history of the interactive session in this debugger.</p> </li> <li> <code>lex_args</code> \u2013 <p>Lexes the given command line into a list of arguments, according to the</p> </li> <li> <code>selected_inferior</code> \u2013 <p>The inferior process currently being focused on in this interactive session.</p> </li> <li> <code>selected_thread</code> \u2013 <p>The thread currently being focused on in this interactive session.</p> </li> <li> <code>selected_frame</code> \u2013 <p>The stack frame currently being focused on in this interactive session.</p> </li> <li> <code>commands</code> \u2013 <p>List the commands available in this session.</p> </li> <li> <code>add_command</code> \u2013 <p>Adds a command with the given name to the debugger, that invokes the</p> </li> <li> <code>has_event_type</code> \u2013 <p>Whether the given event type is supported by this debugger. Indicates</p> </li> <li> <code>event_handler</code> \u2013 <p>Sets up the given function to be called when an event of the given type</p> </li> <li> <code>suspend_events</code> \u2013 <p>Suspend delivery of all events of the given type until it is resumed</p> </li> <li> <code>resume_events</code> \u2013 <p>Resume the delivery of all events of the given type, if previously</p> </li> <li> <code>set_sysroot</code> \u2013 <p>Sets the system root for this debugger.</p> </li> <li> <code>x86_disassembly_flavor</code> \u2013 <p>The flavor of disassembly to use for x86 targets.</p> </li> <li> <code>supports_breakpoint_creation_during_stop_handler</code> \u2013 <p>Whether breakpoint or watchpoint creation through <code>break_at</code> is</p> </li> <li> <code>breakpoint_locations</code> \u2013 <p>Returns a list of all breakpoint locations that are currently</p> </li> <li> <code>name</code> \u2013 <p>The type of the current debugger.</p> </li> <li> <code>is_gdblib_available</code> \u2013 <p>Whether gdblib is available under this debugger.</p> </li> <li> <code>string_limit</code> \u2013 <p>The maximum size of a string.</p> </li> <li> <code>addrsz</code> \u2013 <p>Format the given address value.</p> </li> <li> <code>get_cmd_window_size</code> \u2013 <p>The size of the command window, in characters, if available.</p> </li> <li> <code>set_python_diagnostics</code> \u2013 <p>Enables or disables Python diagnostic messages for this debugger.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>pre_ctx_lines</code> (<code>int</code>) \u2013 <p>Our prediction on how many lines of text will be printed as</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.pre_ctx_lines","title":"pre_ctx_lines <code>property</code>","text":"<pre><code>pre_ctx_lines: int\n</code></pre> <p>Our prediction on how many lines of text will be printed as a preamble (right after the prompt, and before the context) the next time the context is printed.</p> <p>This includes any lines the underlying debugger generates.</p> <p>The user never sees these lines when context-clear-screen is enabled.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.setup","title":"setup","text":"<pre><code>setup(*args: Any) -> None\n</code></pre> <p>Perform debugger-specific initialization.</p> <p>This method should be run immediately after <code>pwndbg.dbg</code> is set to an instance of this class, and, as such, is allowed to run code that depends on it being set.</p> <p>Because we can't really know what a given debugger object will need as part of its setup process, we allow for as many arguments as desired to be passed in, and leave it up to the implementations to decide what they need. This shouldn't be a problem, seeing as, unlike other methods in this class, this should only be called as part of the debugger-specific bringup code.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.history","title":"history","text":"<pre><code>history(last: int = 10) -> list[tuple[int, str]]\n</code></pre> <p>The command history of the interactive session in this debugger.</p> <p>This function returns the last <code>last</code> items in the command history, as an oldest-to-youngest-sorted list of tuples, where the first element in each tuple is the index of the command in the history, and the second element is a string giving the command itself.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.lex_args","title":"lex_args","text":"<pre><code>lex_args(command_line: str) -> list[str]\n</code></pre> <p>Lexes the given command line into a list of arguments, according to the conventions of the debugger being used and of the interactive session.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.selected_inferior","title":"selected_inferior","text":"<pre><code>selected_inferior() -> Process | None\n</code></pre> <p>The inferior process currently being focused on in this interactive session.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.selected_thread","title":"selected_thread","text":"<pre><code>selected_thread() -> Thread | None\n</code></pre> <p>The thread currently being focused on in this interactive session.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.selected_frame","title":"selected_frame","text":"<pre><code>selected_frame() -> Frame | None\n</code></pre> <p>The stack frame currently being focused on in this interactive session.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.commands","title":"commands","text":"<pre><code>commands() -> list[str]\n</code></pre> <p>List the commands available in this session.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.add_command","title":"add_command","text":"<pre><code>add_command(\n name: str, handler: Callable[[Debugger, str, bool], None], doc: str | None\n) -> CommandHandle\n</code></pre> <p>Adds a command with the given name to the debugger, that invokes the given function every time it is called.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.has_event_type","title":"has_event_type","text":"<pre><code>has_event_type(ty: EventType) -> bool\n</code></pre> <p>Whether the given event type is supported by this debugger. Indicates that a user either can or cannot register an event handler of this type.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.event_handler","title":"event_handler","text":"<pre><code>event_handler(\n ty: EventType,\n) -> Callable[[Callable[..., T]], Callable[..., T]]\n</code></pre> <p>Sets up the given function to be called when an event of the given type gets fired. Returns a callable that corresponds to the wrapped function. This function my be used as a decorator.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.suspend_events","title":"suspend_events","text":"<pre><code>suspend_events(ty: EventType) -> None\n</code></pre> <p>Suspend delivery of all events of the given type until it is resumed through a call to <code>resume_events</code>.</p> <p>Events triggered during a suspension will be ignored, and will not be delived, even after delivery is resumed.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.resume_events","title":"resume_events","text":"<pre><code>resume_events(ty: EventType) -> None\n</code></pre> <p>Resume the delivery of all events of the given type, if previously suspeded through a call to <code>suspend_events</code>. Does nothing if the delivery has not been previously suspeded.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.set_sysroot","title":"set_sysroot","text":"<pre><code>set_sysroot(sysroot: str) -> bool\n</code></pre> <p>Sets the system root for this debugger.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.x86_disassembly_flavor","title":"x86_disassembly_flavor","text":"<pre><code>x86_disassembly_flavor() -> Literal['att', 'intel']\n</code></pre> <p>The flavor of disassembly to use for x86 targets.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.supports_breakpoint_creation_during_stop_handler","title":"supports_breakpoint_creation_during_stop_handler","text":"<pre><code>supports_breakpoint_creation_during_stop_handler() -> bool\n</code></pre> <p>Whether breakpoint or watchpoint creation through <code>break_at</code> is supported during breakpoint stop handlers.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.breakpoint_locations","title":"breakpoint_locations","text":"<pre><code>breakpoint_locations() -> list[BreakpointLocation]\n</code></pre> <p>Returns a list of all breakpoint locations that are currently installed and enabled in the focused process.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.name","title":"name","text":"<pre><code>name() -> DebuggerType\n</code></pre> <p>The type of the current debugger.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.is_gdblib_available","title":"is_gdblib_available","text":"<pre><code>is_gdblib_available() -> bool\n</code></pre> <p>Whether gdblib is available under this debugger.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.string_limit","title":"string_limit","text":"<pre><code>string_limit() -> int\n</code></pre> <p>The maximum size of a string.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.addrsz","title":"addrsz","text":"<pre><code>addrsz(address: Any) -> str\n</code></pre> <p>Format the given address value.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.get_cmd_window_size","title":"get_cmd_window_size","text":"<pre><code>get_cmd_window_size() -> tuple[int, int]\n</code></pre> <p>The size of the command window, in characters, if available.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.set_python_diagnostics","title":"set_python_diagnostics","text":"<pre><code>set_python_diagnostics(enabled: bool) -> None\n</code></pre> <p>Enables or disables Python diagnostic messages for this debugger.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.selection","title":"selection","text":"<pre><code>selection(\n target: T, get_current: Callable[[], T], select: Callable[[T], None]\n)\n</code></pre> <p>Debuggers have global state. Many of our queries require that we select a given object globally before we make them. When doing that, we must always be careful to return selection to its previous state before exiting. This class automatically manages the selection of a single object type.</p> <p>Upon entrace to the <code>with</code> block, the element given by <code>target</code> will be compared to the object returned by calling <code>get_current</code>. If they compare different, the value previously returned by <code>get_current</code> is saved, and the element given by <code>target</code> will be selected by passing it as an argument to <code>select</code>, and, after execution leaves the <code>with</code> block, the previously saved element will be selected in the same fashion as the first element.</p> <p>If the elements don't compare different, this is a no-op.</p>"},{"location":"reference/pwndbg/dbg/gdb/","title":"pwndbg.dbg.gdb","text":""},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb","title":"gdb","text":"<p>Modules:</p> <ul> <li> <code>debug_sym</code> \u2013 </li> <li> <code>symbol</code> \u2013 <p>Looking up addresses for function names / symbols, and</p> </li> </ul> <p>Classes:</p> <ul> <li> <code>GDBArch</code> \u2013 </li> <li> <code>GDBRegisters</code> \u2013 </li> <li> <code>GDBFrame</code> \u2013 </li> <li> <code>GDBThread</code> \u2013 </li> <li> <code>GDBMemoryMap</code> \u2013 </li> <li> <code>BreakpointAdapter</code> \u2013 </li> <li> <code>GDBStopPoint</code> \u2013 </li> <li> <code>GDBProcess</code> \u2013 </li> <li> <code>GDBExecutionController</code> \u2013 </li> <li> <code>GDBCommand</code> \u2013 </li> <li> <code>GDBCommandHandle</code> \u2013 </li> <li> <code>GDBType</code> \u2013 </li> <li> <code>GDBValue</code> \u2013 </li> <li> <code>GDB</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>parse_and_eval</code> \u2013 <p>Same as <code>gdb.parse_and_eval</code>, but only uses <code>global_context</code> if it is</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>T</code> \u2013 </li> <li> <code>gdb_architecture_name_fixup_list</code> \u2013 </li> <li> <code>BPWP_DEFERRED_DELETE</code> (<code>Set[GDBStopPoint]</code>) \u2013 </li> <li> <code>BPWP_DEFERRED_ENABLE</code> (<code>Set[GDBStopPoint]</code>) \u2013 </li> <li> <code>BPWP_DEFERRED_DISABLE</code> (<code>Set[GDBStopPoint]</code>) \u2013 </li> <li> <code>EXECUTION_CONTROLLER</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.gdb_architecture_name_fixup_list","title":"gdb_architecture_name_fixup_list <code>module-attribute</code>","text":"<pre><code>gdb_architecture_name_fixup_list = (\n \"x86-64\",\n \"i386\",\n \"i8086\",\n \"aarch64\",\n \"mips\",\n \"rs6000\",\n \"powerpc\",\n \"sparc\",\n \"arm\",\n \"iwmmxt\",\n \"iwmmxt2\",\n \"xscale\",\n \"riscv:rv32\",\n \"riscv:rv64\",\n \"riscv\",\n \"loongarch64\",\n)\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.BPWP_DEFERRED_DELETE","title":"BPWP_DEFERRED_DELETE <code>module-attribute</code>","text":"<pre><code>BPWP_DEFERRED_DELETE: Set[GDBStopPoint] = set()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.BPWP_DEFERRED_ENABLE","title":"BPWP_DEFERRED_ENABLE <code>module-attribute</code>","text":"<pre><code>BPWP_DEFERRED_ENABLE: Set[GDBStopPoint] = set()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.BPWP_DEFERRED_DISABLE","title":"BPWP_DEFERRED_DISABLE <code>module-attribute</code>","text":"<pre><code>BPWP_DEFERRED_DISABLE: Set[GDBStopPoint] = set()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.EXECUTION_CONTROLLER","title":"EXECUTION_CONTROLLER <code>module-attribute</code>","text":"<pre><code>EXECUTION_CONTROLLER = GDBExecutionController()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBArch","title":"GDBArch","text":"<pre><code>GDBArch(\n endian: Literal[\"little\", \"big\"],\n name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,\n ptrsize: int,\n)\n</code></pre> <p> Bases: <code>Arch</code></p> <p>Attributes:</p> <ul> <li> <code>endian</code> (<code>Literal['little', 'big']</code>) \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBArch.endian","title":"endian <code>property</code>","text":"<pre><code>endian: Literal['little', 'big']\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBArch.name","title":"name <code>property</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBArch.ptrsize","title":"ptrsize <code>property</code>","text":"<pre><code>ptrsize: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBRegisters","title":"GDBRegisters","text":"<pre><code>GDBRegisters(frame: GDBFrame)\n</code></pre> <p> Bases: <code>Registers</code></p> <p>Methods:</p> <ul> <li> <code>by_name</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>frame</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBRegisters.frame","title":"frame <code>instance-attribute</code>","text":"<pre><code>frame = frame\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBRegisters.by_name","title":"by_name","text":"<pre><code>by_name(name: str) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame","title":"GDBFrame","text":"<pre><code>GDBFrame(inner: Frame)\n</code></pre> <p> Bases: <code>Frame</code></p> <p>Methods:</p> <ul> <li> <code>lookup_symbol</code> \u2013 </li> <li> <code>evaluate_expression</code> \u2013 </li> <li> <code>regs</code> \u2013 </li> <li> <code>reg_write</code> \u2013 </li> <li> <code>pc</code> \u2013 </li> <li> <code>sp</code> \u2013 </li> <li> <code>parent</code> \u2013 </li> <li> <code>child</code> \u2013 </li> <li> <code>sal</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(name: str, *, type: SymbolLookupType = ANY) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.evaluate_expression","title":"evaluate_expression","text":"<pre><code>evaluate_expression(expression: str, lock_scheduler: bool = False) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.regs","title":"regs","text":"<pre><code>regs() -> Registers\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.reg_write","title":"reg_write","text":"<pre><code>reg_write(name: str, val: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.pc","title":"pc","text":"<pre><code>pc() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.sp","title":"sp","text":"<pre><code>sp() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.parent","title":"parent","text":"<pre><code>parent() -> Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.child","title":"child","text":"<pre><code>child() -> Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.sal","title":"sal","text":"<pre><code>sal() -> tuple[str, int] | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBThread","title":"GDBThread","text":"<pre><code>GDBThread(inner: InferiorThread)\n</code></pre> <p> Bases: <code>Thread</code></p> <p>Methods:</p> <ul> <li> <code>bottom_frame</code> \u2013 </li> <li> <code>ptid</code> \u2013 </li> <li> <code>index</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBThread.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBThread.bottom_frame","title":"bottom_frame","text":"<pre><code>bottom_frame() -> Iterator[Frame]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBThread.ptid","title":"ptid","text":"<pre><code>ptid() -> int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBThread.index","title":"index","text":"<pre><code>index() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap","title":"GDBMemoryMap","text":"<pre><code>GDBMemoryMap(qemu: bool, pages: Sequence[Page])\n</code></pre> <p> Bases: <code>MemoryMap</code></p> <p>Methods:</p> <ul> <li> <code>is_qemu</code> \u2013 </li> <li> <code>ranges</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>qemu</code> \u2013 </li> <li> <code>pages</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap.qemu","title":"qemu <code>instance-attribute</code>","text":"<pre><code>qemu = qemu\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap.pages","title":"pages <code>instance-attribute</code>","text":"<pre><code>pages = pages\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap.is_qemu","title":"is_qemu","text":"<pre><code>is_qemu() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap.ranges","title":"ranges","text":"<pre><code>ranges() -> Sequence[Page]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.BreakpointAdapter","title":"BreakpointAdapter","text":"<p> Bases: <code>Breakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>stop_handler</code> (<code>Callable[[], bool]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.BreakpointAdapter.stop_handler","title":"stop_handler <code>instance-attribute</code>","text":"<pre><code>stop_handler: Callable[[], bool]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.BreakpointAdapter.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint","title":"GDBStopPoint","text":"<pre><code>GDBStopPoint(inner: Breakpoint, proc: GDBProcess)\n</code></pre> <p> Bases: <code>StopPoint</code></p> <p>Methods:</p> <ul> <li> <code>set_enabled</code> \u2013 </li> <li> <code>remove</code> \u2013 </li> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 <p>Automatic breakpoint removal.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>Breakpoint</code>) \u2013 </li> <li> <code>proc</code> (<code>GDBProcess</code>) \u2013 </li> <li> <code>inner_stop</code> (<code>Callable[[], bool] | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: Breakpoint = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.proc","title":"proc <code>instance-attribute</code>","text":"<pre><code>proc: GDBProcess = proc\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.inner_stop","title":"inner_stop <code>instance-attribute</code>","text":"<pre><code>inner_stop: Callable[[], bool] | None = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.set_enabled","title":"set_enabled","text":"<pre><code>set_enabled(enabled: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.remove","title":"remove","text":"<pre><code>remove() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.__enter__","title":"__enter__","text":"<pre><code>__enter__() -> StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.__exit__","title":"__exit__","text":"<pre><code>__exit__(exc_type, exc_value, traceback) -> None\n</code></pre> <p>Automatic breakpoint removal.</p>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess","title":"GDBProcess","text":"<pre><code>GDBProcess(inner: Inferior)\n</code></pre> <p> Bases: <code>Process</code></p> <p>Methods:</p> <ul> <li> <code>threads</code> \u2013 </li> <li> <code>pid</code> \u2013 </li> <li> <code>alive</code> \u2013 </li> <li> <code>stopped_with_signal</code> \u2013 </li> <li> <code>evaluate_expression</code> \u2013 </li> <li> <code>vmmap</code> \u2013 </li> <li> <code>read_memory</code> \u2013 </li> <li> <code>write_memory</code> \u2013 </li> <li> <code>find_in_memory</code> \u2013 </li> <li> <code>is_remote</code> \u2013 </li> <li> <code>send_remote</code> \u2013 </li> <li> <code>send_monitor</code> \u2013 </li> <li> <code>download_remote_file</code> \u2013 </li> <li> <code>create_value</code> \u2013 </li> <li> <code>symbol_name_at_address</code> \u2013 </li> <li> <code>lookup_symbol</code> \u2013 </li> <li> <code>types_with_name</code> \u2013 </li> <li> <code>arch</code> \u2013 </li> <li> <code>break_at</code> \u2013 </li> <li> <code>is_linux</code> \u2013 </li> <li> <code>disasm</code> \u2013 </li> <li> <code>module_section_locations</code> \u2013 </li> <li> <code>main_module_name</code> \u2013 </li> <li> <code>main_module_entry</code> \u2013 </li> <li> <code>is_dynamically_linked</code> \u2013 </li> <li> <code>dispatch_execution_controller</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> \u2013 </li> <li> <code>in_bpwp_stop_handler</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.in_bpwp_stop_handler","title":"in_bpwp_stop_handler <code>instance-attribute</code>","text":"<pre><code>in_bpwp_stop_handler: bool = False\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.threads","title":"threads","text":"<pre><code>threads() -> list[Thread]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.pid","title":"pid","text":"<pre><code>pid() -> int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.alive","title":"alive","text":"<pre><code>alive() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.stopped_with_signal","title":"stopped_with_signal","text":"<pre><code>stopped_with_signal() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.evaluate_expression","title":"evaluate_expression","text":"<pre><code>evaluate_expression(expression: str) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.vmmap","title":"vmmap","text":"<pre><code>vmmap() -> MemoryMap\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.read_memory","title":"read_memory","text":"<pre><code>read_memory(address: int, size: int, partial: bool = False) -> bytearray\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.write_memory","title":"write_memory","text":"<pre><code>write_memory(address: int, data: bytearray, partial: bool = False) -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.find_in_memory","title":"find_in_memory","text":"<pre><code>find_in_memory(\n pattern: bytearray,\n start: int,\n size: int,\n align: int,\n max_matches: int = -1,\n step: int = -1,\n) -> Generator[int, None, None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.is_remote","title":"is_remote","text":"<pre><code>is_remote() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.send_remote","title":"send_remote","text":"<pre><code>send_remote(packet: str) -> bytes\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.send_monitor","title":"send_monitor","text":"<pre><code>send_monitor(cmd: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.download_remote_file","title":"download_remote_file","text":"<pre><code>download_remote_file(remote_path: str, local_path: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.create_value","title":"create_value","text":"<pre><code>create_value(value: int, type: Type | None = None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.symbol_name_at_address","title":"symbol_name_at_address","text":"<pre><code>symbol_name_at_address(address: int) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(\n name: str,\n *,\n prefer_static: bool = False,\n type: SymbolLookupType = ANY,\n objfile_endswith: str | None = None,\n) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.types_with_name","title":"types_with_name","text":"<pre><code>types_with_name(name: str) -> Sequence[Type]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.arch","title":"arch","text":"<pre><code>arch() -> Arch\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.break_at","title":"break_at","text":"<pre><code>break_at(\n location: BreakpointLocation | WatchpointLocation,\n stop_handler: Callable[[StopPoint], bool] | None = None,\n internal: bool = False,\n) -> StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.is_linux","title":"is_linux","text":"<pre><code>is_linux() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.disasm","title":"disasm","text":"<pre><code>disasm(address: int) -> DisassembledInstruction | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.module_section_locations","title":"module_section_locations","text":"<pre><code>module_section_locations() -> list[tuple[int, int, str, str]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.main_module_name","title":"main_module_name","text":"<pre><code>main_module_name() -> str | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.main_module_entry","title":"main_module_entry","text":"<pre><code>main_module_entry() -> int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.is_dynamically_linked","title":"is_dynamically_linked","text":"<pre><code>is_dynamically_linked() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.dispatch_execution_controller","title":"dispatch_execution_controller","text":"<pre><code>dispatch_execution_controller(\n procedure: Callable[[ExecutionController], Coroutine[Any, Any, None]],\n)\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBExecutionController","title":"GDBExecutionController","text":"<p> Bases: <code>ExecutionController</code></p> <p>Methods:</p> <ul> <li> <code>single_step</code> \u2013 </li> <li> <code>cont</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBExecutionController.single_step","title":"single_step <code>async</code>","text":"<pre><code>single_step()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBExecutionController.cont","title":"cont <code>async</code>","text":"<pre><code>cont(until: StopPoint)\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommand","title":"GDBCommand","text":"<pre><code>GDBCommand(\n debugger: GDB,\n name: str,\n handler: Callable[[Debugger, str, bool], None],\n doc: str | None,\n)\n</code></pre> <p> Bases: <code>Command</code></p> <p>Methods:</p> <ul> <li> <code>invoke</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>debugger</code> \u2013 </li> <li> <code>handler</code> \u2013 </li> <li> <code>__doc__</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommand.debugger","title":"debugger <code>instance-attribute</code>","text":"<pre><code>debugger = debugger\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommand.handler","title":"handler <code>instance-attribute</code>","text":"<pre><code>handler = handler\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommand.__doc__","title":"__doc__ <code>instance-attribute</code>","text":"<pre><code>__doc__ = doc\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommand.invoke","title":"invoke","text":"<pre><code>invoke(args: str, from_tty: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommandHandle","title":"GDBCommandHandle","text":"<pre><code>GDBCommandHandle(command: Command)\n</code></pre> <p> Bases: <code>CommandHandle</code></p> <p>Methods:</p> <ul> <li> <code>remove</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>command</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommandHandle.command","title":"command <code>instance-attribute</code>","text":"<pre><code>command = command\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBCommandHandle.remove","title":"remove","text":"<pre><code>remove() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType","title":"GDBType","text":"<pre><code>GDBType(inner: Type)\n</code></pre> <p> Bases: <code>Type</code></p> <p>Methods:</p> <ul> <li> <code>__eq__</code> \u2013 </li> <li> <code>func_arguments</code> \u2013 </li> <li> <code>fields</code> \u2013 </li> <li> <code>has_field</code> \u2013 </li> <li> <code>array</code> \u2013 </li> <li> <code>pointer</code> \u2013 </li> <li> <code>strip_typedefs</code> \u2013 </li> <li> <code>target</code> \u2013 </li> <li> <code>keys</code> \u2013 </li> <li> <code>offsetof</code> \u2013 </li> <li> <code>enum_member</code> \u2013 <p>Retrieve the integer value of an enum member.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>CODE_MAPPING</code> \u2013 </li> <li> <code>inner</code> \u2013 </li> <li> <code>name_identifier</code> (<code>str | None</code>) \u2013 </li> <li> <code>name_to_human_readable</code> (<code>str</code>) \u2013 </li> <li> <code>sizeof</code> (<code>int</code>) \u2013 </li> <li> <code>alignof</code> (<code>int</code>) \u2013 </li> <li> <code>code</code> (<code>TypeCode</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.CODE_MAPPING","title":"CODE_MAPPING <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>CODE_MAPPING = {\n TYPE_CODE_BOOL: BOOL,\n TYPE_CODE_INT: INT,\n TYPE_CODE_UNION: UNION,\n TYPE_CODE_STRUCT: STRUCT,\n TYPE_CODE_ENUM: ENUM,\n TYPE_CODE_TYPEDEF: TYPEDEF,\n TYPE_CODE_PTR: POINTER,\n TYPE_CODE_ARRAY: ARRAY,\n TYPE_CODE_FUNC: FUNC,\n TYPE_CODE_METHOD: FUNC,\n}\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.name_identifier","title":"name_identifier <code>property</code>","text":"<pre><code>name_identifier: str | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.name_to_human_readable","title":"name_to_human_readable <code>property</code>","text":"<pre><code>name_to_human_readable: str\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.sizeof","title":"sizeof <code>property</code>","text":"<pre><code>sizeof: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.alignof","title":"alignof <code>property</code>","text":"<pre><code>alignof: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.code","title":"code <code>property</code>","text":"<pre><code>code: TypeCode\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.func_arguments","title":"func_arguments","text":"<pre><code>func_arguments() -> list[Type] | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.fields","title":"fields","text":"<pre><code>fields() -> list[TypeField]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.has_field","title":"has_field","text":"<pre><code>has_field(name: str) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.array","title":"array","text":"<pre><code>array(count: int) -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.pointer","title":"pointer","text":"<pre><code>pointer() -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.strip_typedefs","title":"strip_typedefs","text":"<pre><code>strip_typedefs() -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.target","title":"target","text":"<pre><code>target() -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.keys","title":"keys","text":"<pre><code>keys() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.offsetof","title":"offsetof","text":"<pre><code>offsetof(field_name: str) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.enum_member","title":"enum_member","text":"<pre><code>enum_member(field_name: str) -> int | None\n</code></pre> <p>Retrieve the integer value of an enum member.</p> <p>It returns: - integer value, when found field - returns None, If the field does not exist</p>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue","title":"GDBValue","text":"<pre><code>GDBValue(inner: Value)\n</code></pre> <p> Bases: <code>Value</code></p> <p>Methods:</p> <ul> <li> <code>dereference</code> \u2013 </li> <li> <code>string</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 </li> <li> <code>fetch_lazy</code> \u2013 </li> <li> <code>__int__</code> \u2013 </li> <li> <code>cast</code> \u2013 </li> <li> <code>__add__</code> \u2013 </li> <li> <code>__sub__</code> \u2013 </li> <li> <code>__getitem__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> \u2013 </li> <li> <code>address</code> (<code>Value | None</code>) \u2013 </li> <li> <code>is_optimized_out</code> (<code>bool</code>) \u2013 </li> <li> <code>type</code> (<code>Type</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.address","title":"address <code>property</code>","text":"<pre><code>address: Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.is_optimized_out","title":"is_optimized_out <code>property</code>","text":"<pre><code>is_optimized_out: bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.type","title":"type <code>property</code>","text":"<pre><code>type: Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.dereference","title":"dereference","text":"<pre><code>dereference() -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.string","title":"string","text":"<pre><code>string() -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.fetch_lazy","title":"fetch_lazy","text":"<pre><code>fetch_lazy() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.cast","title":"cast","text":"<pre><code>cast(type: Type | Any) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__add__","title":"__add__","text":"<pre><code>__add__(rhs: int) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__sub__","title":"__sub__","text":"<pre><code>__sub__(rhs: int) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str | int) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB","title":"GDB","text":"<p> Bases: <code>Debugger</code></p> <p>Methods:</p> <ul> <li> <code>setup</code> \u2013 </li> <li> <code>add_command</code> \u2013 </li> <li> <code>history</code> \u2013 </li> <li> <code>lex_args</code> \u2013 </li> <li> <code>selected_thread</code> \u2013 </li> <li> <code>selected_frame</code> \u2013 </li> <li> <code>commands</code> \u2013 </li> <li> <code>selected_inferior</code> \u2013 </li> <li> <code>is_gdblib_available</code> \u2013 </li> <li> <code>has_event_type</code> \u2013 </li> <li> <code>event_handler</code> \u2013 </li> <li> <code>suspend_events</code> \u2013 </li> <li> <code>resume_events</code> \u2013 </li> <li> <code>set_sysroot</code> \u2013 </li> <li> <code>supports_breakpoint_creation_during_stop_handler</code> \u2013 </li> <li> <code>breakpoint_locations</code> \u2013 </li> <li> <code>name</code> \u2013 </li> <li> <code>x86_disassembly_flavor</code> \u2013 </li> <li> <code>string_limit</code> \u2013 </li> <li> <code>addrsz</code> \u2013 </li> <li> <code>get_cmd_window_size</code> \u2013 <p>Get the size of the command window.</p> </li> <li> <code>set_python_diagnostics</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pre_ctx_lines</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.pre_ctx_lines","title":"pre_ctx_lines <code>property</code>","text":"<pre><code>pre_ctx_lines: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.setup","title":"setup","text":"<pre><code>setup()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.add_command","title":"add_command","text":"<pre><code>add_command(\n name: str, handler: Callable[[Debugger, str, bool], None], doc: str | None\n) -> CommandHandle\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.history","title":"history","text":"<pre><code>history(last: int = 10) -> list[tuple[int, str]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.lex_args","title":"lex_args","text":"<pre><code>lex_args(command_line: str) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.selected_thread","title":"selected_thread","text":"<pre><code>selected_thread() -> Thread | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.selected_frame","title":"selected_frame","text":"<pre><code>selected_frame() -> Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.commands","title":"commands","text":"<pre><code>commands()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.selected_inferior","title":"selected_inferior","text":"<pre><code>selected_inferior() -> Process | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.is_gdblib_available","title":"is_gdblib_available","text":"<pre><code>is_gdblib_available()\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.has_event_type","title":"has_event_type","text":"<pre><code>has_event_type(ty: EventType) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.event_handler","title":"event_handler","text":"<pre><code>event_handler(\n ty: EventType,\n) -> Callable[[Callable[..., T]], Callable[..., T]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.suspend_events","title":"suspend_events","text":"<pre><code>suspend_events(ty: EventType) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.resume_events","title":"resume_events","text":"<pre><code>resume_events(ty: EventType) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.set_sysroot","title":"set_sysroot","text":"<pre><code>set_sysroot(sysroot: str) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.supports_breakpoint_creation_during_stop_handler","title":"supports_breakpoint_creation_during_stop_handler","text":"<pre><code>supports_breakpoint_creation_during_stop_handler() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.breakpoint_locations","title":"breakpoint_locations","text":"<pre><code>breakpoint_locations() -> list[BreakpointLocation]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.name","title":"name","text":"<pre><code>name() -> DebuggerType\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.x86_disassembly_flavor","title":"x86_disassembly_flavor","text":"<pre><code>x86_disassembly_flavor() -> Literal['att', 'intel']\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.string_limit","title":"string_limit","text":"<pre><code>string_limit() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.addrsz","title":"addrsz","text":"<pre><code>addrsz(address: Any) -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.get_cmd_window_size","title":"get_cmd_window_size","text":"<pre><code>get_cmd_window_size() -> tuple[int | None, int | None]\n</code></pre> <p>Get the size of the command window.</p> <p>GDB keeps these parameters up to date with the actual window size of the command output. This is the full terminal size in CLI mode or the size of the cmd window in TUI mode.</p> <p>When the window size is set to be unlimited (0), the parameter is None.</p>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.set_python_diagnostics","title":"set_python_diagnostics","text":"<pre><code>set_python_diagnostics(enabled: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.parse_and_eval","title":"parse_and_eval","text":"<pre><code>parse_and_eval(expression: str, global_context: bool) -> Value\n</code></pre> <p>Same as <code>gdb.parse_and_eval</code>, but only uses <code>global_context</code> if it is supported by the current version of GDB.</p> <p><code>global_context</code> was introduced in GDB 14.</p>"},{"location":"reference/pwndbg/dbg/gdb/debug_sym/","title":"pwndbg.dbg.gdb.debug_sym","text":""},{"location":"reference/pwndbg/dbg/gdb/debug_sym/#pwndbg.dbg.gdb.debug_sym","title":"debug_sym","text":""},{"location":"reference/pwndbg/dbg/gdb/symbol/","title":"pwndbg.dbg.gdb.symbol","text":""},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol","title":"symbol","text":"<p>Looking up addresses for function names / symbols, and vice-versa.</p> <p>Classes:</p> <ul> <li> <code>Domain</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>resolve_addr</code> \u2013 <p>Retrieve the name for the symbol located at <code>address</code></p> </li> <li> <code>lookup_symbol</code> \u2013 <p>Get the address for <code>symbol</code></p> </li> <li> <code>lookup_frame_symbol</code> \u2013 <p>Get the address for local <code>symbol</code> from frame, in most time you don't need it</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>skipped_exceptions</code> \u2013 </li> <li> <code>DOMAIN_MAPPING</code> \u2013 </li> <li> <code>order_prefs</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.skipped_exceptions","title":"skipped_exceptions <code>module-attribute</code>","text":"<pre><code>skipped_exceptions = ('No frame selected', 'Cannot find thread-local')\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.DOMAIN_MAPPING","title":"DOMAIN_MAPPING <code>module-attribute</code>","text":"<pre><code>DOMAIN_MAPPING = {\n ANY: SYMBOL_VAR_DOMAIN,\n VARIABLE: SYMBOL_VAR_DOMAIN,\n FUNCTION: SYMBOL_FUNCTION_DOMAIN,\n}\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.order_prefs","title":"order_prefs <code>module-attribute</code>","text":"<pre><code>order_prefs = {\n True: (\n _global_static_symbol_to_address,\n _global_exported_symbol_to_address,\n ),\n False: (\n _global_exported_symbol_to_address,\n _global_static_symbol_to_address,\n ),\n}\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.Domain","title":"Domain","text":"<p> Bases: <code>Enum</code></p> <p>Methods:</p> <ul> <li> <code>validate</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ANY</code> \u2013 </li> <li> <code>VARIABLE</code> \u2013 </li> <li> <code>FUNCTION</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.Domain.ANY","title":"ANY <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ANY = 1\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.Domain.VARIABLE","title":"VARIABLE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VARIABLE = 2\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.Domain.FUNCTION","title":"FUNCTION <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FUNCTION = 3\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.Domain.validate","title":"validate","text":"<pre><code>validate(sym: Symbol) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.resolve_addr","title":"resolve_addr","text":"<pre><code>resolve_addr(address: int) -> str\n</code></pre> <p>Retrieve the name for the symbol located at <code>address</code> Empty string if no symbol</p>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(\n name: str,\n *,\n prefer_static: bool = False,\n domain: Domain = ANY,\n objfile_endswith: str | None = None,\n) -> Value | None\n</code></pre> <p>Get the address for <code>symbol</code></p>"},{"location":"reference/pwndbg/dbg/gdb/symbol/#pwndbg.dbg.gdb.symbol.lookup_frame_symbol","title":"lookup_frame_symbol","text":"<pre><code>lookup_frame_symbol(name: str, *, domain: Domain = ANY) -> Value | None\n</code></pre> <p>Get the address for local <code>symbol</code> from frame, in most time you don't need it</p>"},{"location":"reference/pwndbg/dbg/lldb/","title":"pwndbg.dbg.lldb","text":""},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb","title":"lldb","text":"<p>Modules:</p> <ul> <li> <code>hooks</code> \u2013 <p>Code that sets up hooks for LLDB events.</p> </li> <li> <code>pset</code> \u2013 </li> <li> <code>repl</code> \u2013 <p>The Pwndbg REPL that is the interface to all debugging on LLDB.</p> </li> <li> <code>util</code> \u2013 </li> </ul> <p>Classes:</p> <ul> <li> <code>LLDBArch</code> \u2013 </li> <li> <code>LLDBRegisters</code> \u2013 </li> <li> <code>LLDBFrame</code> \u2013 </li> <li> <code>LLDBThread</code> \u2013 </li> <li> <code>LLDBType</code> \u2013 </li> <li> <code>LLDBValue</code> \u2013 </li> <li> <code>LLDBMemoryMap</code> \u2013 </li> <li> <code>LLDBStopPoint</code> \u2013 </li> <li> <code>OneShotAwaitable</code> \u2013 <p>Used as part of the logic for the execution controller. This is an Awaitable</p> </li> <li> <code>YieldContinue</code> \u2013 <p>Continues execution of the process until the breakpoint or watchpoint given</p> </li> <li> <code>YieldSingleStep</code> \u2013 <p>Moves execution of the process being debugged forward by one instruction.</p> </li> <li> <code>LLDBExecutionController</code> \u2013 </li> <li> <code>LLDBProcess</code> \u2013 </li> <li> <code>LLDBCommand</code> \u2013 </li> <li> <code>LLDB</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>rename_register</code> \u2013 <p>Some register names differ between Pwndbg/GDB and LLDB. This function takes</p> </li> <li> <code>map_type_code</code> \u2013 <p>Determines the type code of a given LLDB SBType.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>T</code> \u2013 </li> <li> <code>LLDB_VERSION</code> (<code>tuple[int, int]</code>) \u2013 </li> <li> <code>EXECUTION_CONTROLLER</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB_VERSION","title":"LLDB_VERSION <code>module-attribute</code>","text":"<pre><code>LLDB_VERSION: tuple[int, int] = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.EXECUTION_CONTROLLER","title":"EXECUTION_CONTROLLER <code>module-attribute</code>","text":"<pre><code>EXECUTION_CONTROLLER = LLDBExecutionController()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBArch","title":"LLDBArch","text":"<pre><code>LLDBArch(\n name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,\n ptrsize: int,\n endian: Literal[\"little\", \"big\"],\n)\n</code></pre> <p> Bases: <code>Arch</code></p> <p>Attributes:</p> <ul> <li> <code>endian</code> (<code>Literal['little', 'big']</code>) \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBArch.endian","title":"endian <code>property</code>","text":"<pre><code>endian: Literal['little', 'big']\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBArch.name","title":"name <code>property</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBArch.ptrsize","title":"ptrsize <code>property</code>","text":"<pre><code>ptrsize: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBRegisters","title":"LLDBRegisters","text":"<pre><code>LLDBRegisters(groups: SBValueList, proc: LLDBProcess)\n</code></pre> <p> Bases: <code>Registers</code></p> <p>Methods:</p> <ul> <li> <code>by_name</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>groups</code> (<code>SBValueList</code>) \u2013 </li> <li> <code>proc</code> (<code>LLDBProcess</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBRegisters.groups","title":"groups <code>instance-attribute</code>","text":"<pre><code>groups: SBValueList = groups\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBRegisters.proc","title":"proc <code>instance-attribute</code>","text":"<pre><code>proc: LLDBProcess = proc\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBRegisters.by_name","title":"by_name","text":"<pre><code>by_name(name: str) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame","title":"LLDBFrame","text":"<pre><code>LLDBFrame(inner: SBFrame, proc: LLDBProcess)\n</code></pre> <p> Bases: <code>Frame</code></p> <p>Methods:</p> <ul> <li> <code>lookup_symbol</code> \u2013 </li> <li> <code>evaluate_expression</code> \u2013 </li> <li> <code>regs</code> \u2013 </li> <li> <code>reg_write</code> \u2013 </li> <li> <code>pc</code> \u2013 </li> <li> <code>sp</code> \u2013 </li> <li> <code>parent</code> \u2013 </li> <li> <code>child</code> \u2013 </li> <li> <code>sal</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>SBFrame</code>) \u2013 </li> <li> <code>proc</code> (<code>LLDBProcess</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: SBFrame = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.proc","title":"proc <code>instance-attribute</code>","text":"<pre><code>proc: LLDBProcess = proc\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(name: str, *, type: SymbolLookupType = ANY) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.evaluate_expression","title":"evaluate_expression","text":"<pre><code>evaluate_expression(expression: str, lock_scheduler: bool = False) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.regs","title":"regs","text":"<pre><code>regs() -> Registers\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.reg_write","title":"reg_write","text":"<pre><code>reg_write(name: str, val: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.pc","title":"pc","text":"<pre><code>pc() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.sp","title":"sp","text":"<pre><code>sp() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.parent","title":"parent","text":"<pre><code>parent() -> Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.child","title":"child","text":"<pre><code>child() -> Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.sal","title":"sal","text":"<pre><code>sal() -> tuple[str, int] | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread","title":"LLDBThread","text":"<pre><code>LLDBThread(inner: SBThread, proc: LLDBProcess)\n</code></pre> <p> Bases: <code>Thread</code></p> <p>Methods:</p> <ul> <li> <code>bottom_frame</code> \u2013 </li> <li> <code>ptid</code> \u2013 </li> <li> <code>index</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>SBThread</code>) \u2013 </li> <li> <code>proc</code> (<code>LLDBProcess</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: SBThread = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread.proc","title":"proc <code>instance-attribute</code>","text":"<pre><code>proc: LLDBProcess = proc\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread.bottom_frame","title":"bottom_frame","text":"<pre><code>bottom_frame() -> Iterator[Frame]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread.ptid","title":"ptid","text":"<pre><code>ptid() -> int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread.index","title":"index","text":"<pre><code>index() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType","title":"LLDBType","text":"<pre><code>LLDBType(inner: SBType)\n</code></pre> <p> Bases: <code>Type</code></p> <p>Methods:</p> <ul> <li> <code>__eq__</code> \u2013 </li> <li> <code>func_arguments</code> \u2013 </li> <li> <code>fields</code> \u2013 </li> <li> <code>array</code> \u2013 </li> <li> <code>pointer</code> \u2013 </li> <li> <code>strip_typedefs</code> \u2013 </li> <li> <code>target</code> \u2013 </li> <li> <code>has_field</code> \u2013 <p>Whether this type has a field with the given name.</p> </li> <li> <code>keys</code> \u2013 <p>Returns a list containing all the field names of this type.</p> </li> <li> <code>enum_member</code> \u2013 <p>Retrieve the integer value of an enum member.</p> </li> <li> <code>offsetof</code> \u2013 <p>Calculate the byte offset of a field within a struct or union.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>SBType</code>) \u2013 </li> <li> <code>name_identifier</code> (<code>str | None</code>) \u2013 </li> <li> <code>name_to_human_readable</code> (<code>str</code>) \u2013 </li> <li> <code>sizeof</code> (<code>int</code>) \u2013 </li> <li> <code>alignof</code> (<code>int</code>) \u2013 </li> <li> <code>code</code> (<code>TypeCode</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: SBType = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.name_identifier","title":"name_identifier <code>property</code>","text":"<pre><code>name_identifier: str | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.name_to_human_readable","title":"name_to_human_readable <code>property</code>","text":"<pre><code>name_to_human_readable: str\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.sizeof","title":"sizeof <code>property</code>","text":"<pre><code>sizeof: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.alignof","title":"alignof <code>property</code>","text":"<pre><code>alignof: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.code","title":"code <code>property</code>","text":"<pre><code>code: TypeCode\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.func_arguments","title":"func_arguments","text":"<pre><code>func_arguments() -> list[Type] | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.fields","title":"fields","text":"<pre><code>fields() -> list[TypeField]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.array","title":"array","text":"<pre><code>array(count: int) -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.pointer","title":"pointer","text":"<pre><code>pointer() -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.strip_typedefs","title":"strip_typedefs","text":"<pre><code>strip_typedefs() -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.target","title":"target","text":"<pre><code>target() -> Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.has_field","title":"has_field","text":"<pre><code>has_field(name: str) -> bool\n</code></pre> <p>Whether this type has a field with the given name.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.keys","title":"keys","text":"<pre><code>keys() -> list[str]\n</code></pre> <p>Returns a list containing all the field names of this type.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.enum_member","title":"enum_member","text":"<pre><code>enum_member(field_name: str) -> int | None\n</code></pre> <p>Retrieve the integer value of an enum member.</p> <p>It returns: - integer value, when found field - returns None, If the field does not exist</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.offsetof","title":"offsetof","text":"<pre><code>offsetof(field_name: str) -> int | None\n</code></pre> <p>Calculate the byte offset of a field within a struct or union.</p> <p>This method recursively traverses nested structures and unions, and it computes the byte-aligned offset for the specified field.</p> <p>It returns: - offset in bytes if found - None if the field doesn't exist or if an unsupported alignment/bit-field is encountered</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue","title":"LLDBValue","text":"<pre><code>LLDBValue(inner: SBValue, proc: LLDBProcess)\n</code></pre> <p> Bases: <code>Value</code></p> <p>Methods:</p> <ul> <li> <code>dereference</code> \u2013 </li> <li> <code>string</code> \u2013 </li> <li> <code>value_to_human_readable</code> \u2013 </li> <li> <code>fetch_lazy</code> \u2013 </li> <li> <code>__int__</code> \u2013 </li> <li> <code>cast</code> \u2013 </li> <li> <code>__add__</code> \u2013 </li> <li> <code>__sub__</code> \u2013 </li> <li> <code>__getitem__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>proc</code> \u2013 </li> <li> <code>inner</code> \u2013 </li> <li> <code>address</code> (<code>Value | None</code>) \u2013 </li> <li> <code>is_optimized_out</code> (<code>bool</code>) \u2013 </li> <li> <code>type</code> (<code>Type</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.proc","title":"proc <code>instance-attribute</code>","text":"<pre><code>proc = proc\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.address","title":"address <code>property</code>","text":"<pre><code>address: Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.is_optimized_out","title":"is_optimized_out <code>property</code>","text":"<pre><code>is_optimized_out: bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.type","title":"type <code>property</code>","text":"<pre><code>type: Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.dereference","title":"dereference","text":"<pre><code>dereference() -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.string","title":"string","text":"<pre><code>string() -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.value_to_human_readable","title":"value_to_human_readable","text":"<pre><code>value_to_human_readable() -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.fetch_lazy","title":"fetch_lazy","text":"<pre><code>fetch_lazy() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.cast","title":"cast","text":"<pre><code>cast(type: Type | Any) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__add__","title":"__add__","text":"<pre><code>__add__(rhs: int) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__sub__","title":"__sub__","text":"<pre><code>__sub__(rhs: int) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str | int) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap","title":"LLDBMemoryMap","text":"<pre><code>LLDBMemoryMap(pages: list[Page])\n</code></pre> <p> Bases: <code>MemoryMap</code></p> <p>Methods:</p> <ul> <li> <code>is_qemu</code> \u2013 </li> <li> <code>ranges</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pages</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap.pages","title":"pages <code>instance-attribute</code>","text":"<pre><code>pages = pages\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap.is_qemu","title":"is_qemu","text":"<pre><code>is_qemu() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap.ranges","title":"ranges","text":"<pre><code>ranges() -> list[Page]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint","title":"LLDBStopPoint","text":"<pre><code>LLDBStopPoint(\n inner: SBBreakpoint | SBWatchpoint,\n proc: LLDBProcess,\n stop_handler_name: str | None,\n)\n</code></pre> <p> Bases: <code>StopPoint</code></p> <p>Methods:</p> <ul> <li> <code>remove</code> \u2013 </li> <li> <code>set_enabled</code> \u2013 </li> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 <p>Automatic breakpoint removal.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>SBBreakpoint | SBWatchpoint</code>) \u2013 </li> <li> <code>proc</code> (<code>LLDBProcess</code>) \u2013 </li> <li> <code>stop_handler_name</code> (<code>str | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: SBBreakpoint | SBWatchpoint = inner\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.proc","title":"proc <code>instance-attribute</code>","text":"<pre><code>proc: LLDBProcess = proc\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.stop_handler_name","title":"stop_handler_name <code>instance-attribute</code>","text":"<pre><code>stop_handler_name: str | None = stop_handler_name\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.remove","title":"remove","text":"<pre><code>remove() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.set_enabled","title":"set_enabled","text":"<pre><code>set_enabled(enabled: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.__enter__","title":"__enter__","text":"<pre><code>__enter__() -> StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.__exit__","title":"__exit__","text":"<pre><code>__exit__(exc_type, exc_value, traceback) -> None\n</code></pre> <p>Automatic breakpoint removal.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.OneShotAwaitable","title":"OneShotAwaitable","text":"<pre><code>OneShotAwaitable(value: Any)\n</code></pre> <p>Used as part of the logic for the execution controller. This is an Awaitable object that yields the value passed to its constructor exactly once.</p> <p>Methods:</p> <ul> <li> <code>__await__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>value</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.OneShotAwaitable.value","title":"value <code>instance-attribute</code>","text":"<pre><code>value = value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.OneShotAwaitable.__await__","title":"__await__","text":"<pre><code>__await__() -> Generator[Any, Any, Any]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.YieldContinue","title":"YieldContinue","text":"<pre><code>YieldContinue(target: LLDBStopPoint)\n</code></pre> <p>Continues execution of the process until the breakpoint or watchpoint given in the constructor is hit or the operation is cancelled.</p> <p>This class is part of the execution controller system, so it is intented to be yielded by the async function with access to an execution controller, and caught and hanlded by the event loop in the LLDB Pwndbg CLI.</p> <p>Attributes:</p> <ul> <li> <code>target</code> (<code>LLDBStopPoint</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.YieldContinue.target","title":"target <code>instance-attribute</code>","text":"<pre><code>target: LLDBStopPoint = target\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.YieldSingleStep","title":"YieldSingleStep","text":"<p>Moves execution of the process being debugged forward by one instruction.</p> <p>This class is part of the execution controller system, so it is intented to be yielded by the async function with access to an execution controller, and caught and hanlded by the event loop in the LLDB Pwndbg CLI.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBExecutionController","title":"LLDBExecutionController","text":"<p> Bases: <code>ExecutionController</code></p> <p>Methods:</p> <ul> <li> <code>single_step</code> \u2013 </li> <li> <code>cont</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBExecutionController.single_step","title":"single_step","text":"<pre><code>single_step() -> Awaitable[None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBExecutionController.cont","title":"cont","text":"<pre><code>cont(target: StopPoint) -> Awaitable[None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess","title":"LLDBProcess","text":"<pre><code>LLDBProcess(\n dbg: LLDB, process: SBProcess, target: SBTarget, is_gdb_remote: bool\n)\n</code></pre> <p> Bases: <code>Process</code></p> <p>Methods:</p> <ul> <li> <code>threads</code> \u2013 </li> <li> <code>pid</code> \u2013 </li> <li> <code>alive</code> \u2013 </li> <li> <code>stopped_with_signal</code> \u2013 </li> <li> <code>evaluate_expression</code> \u2013 </li> <li> <code>get_known_pages</code> \u2013 </li> <li> <code>vmmap</code> \u2013 </li> <li> <code>find_largest_range_len</code> \u2013 <p>Finds the largest memory range given a minimum and a maximum value</p> </li> <li> <code>read_memory</code> \u2013 </li> <li> <code>write_memory</code> \u2013 </li> <li> <code>find_in_memory</code> \u2013 </li> <li> <code>is_remote</code> \u2013 </li> <li> <code>send_remote</code> \u2013 </li> <li> <code>send_monitor</code> \u2013 </li> <li> <code>download_remote_file</code> \u2013 </li> <li> <code>create_value</code> \u2013 </li> <li> <code>symbol_name_at_address</code> \u2013 </li> <li> <code>lookup_symbol</code> \u2013 </li> <li> <code>types_with_name</code> \u2013 </li> <li> <code>arch</code> \u2013 </li> <li> <code>break_at</code> \u2013 </li> <li> <code>disasm</code> \u2013 </li> <li> <code>is_linux</code> \u2013 </li> <li> <code>module_section_locations</code> \u2013 </li> <li> <code>main_module_name</code> \u2013 </li> <li> <code>main_module_entry</code> \u2013 </li> <li> <code>is_dynamically_linked</code> \u2013 </li> <li> <code>dispatch_execution_controller</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>dbg</code> \u2013 </li> <li> <code>process</code> \u2013 </li> <li> <code>target</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.dbg","title":"dbg <code>instance-attribute</code>","text":"<pre><code>dbg = dbg\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.process","title":"process <code>instance-attribute</code>","text":"<pre><code>process = process\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.target","title":"target <code>instance-attribute</code>","text":"<pre><code>target = target\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.threads","title":"threads","text":"<pre><code>threads() -> list[Thread]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.pid","title":"pid","text":"<pre><code>pid() -> int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.alive","title":"alive","text":"<pre><code>alive() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.stopped_with_signal","title":"stopped_with_signal","text":"<pre><code>stopped_with_signal() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.evaluate_expression","title":"evaluate_expression","text":"<pre><code>evaluate_expression(expression: str) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.get_known_pages","title":"get_known_pages","text":"<pre><code>get_known_pages() -> list[Page]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.vmmap","title":"vmmap","text":"<pre><code>vmmap() -> MemoryMap\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.find_largest_range_len","title":"find_largest_range_len","text":"<pre><code>find_largest_range_len(\n min_search: int, max_search: int, test: Callable[[int], bool]\n) -> int\n</code></pre> <p>Finds the largest memory range given a minimum and a maximum value for the size of the rage. This is a binary search, so it should do on the order of log2(max_search - min_search) attempts before it arrives at an answer.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.read_memory","title":"read_memory","text":"<pre><code>read_memory(address: int, size: int, partial: bool = False) -> bytearray\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.write_memory","title":"write_memory","text":"<pre><code>write_memory(address: int, data: bytearray, partial: bool = False) -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.find_in_memory","title":"find_in_memory","text":"<pre><code>find_in_memory(\n pattern: bytearray,\n start: int,\n size: int,\n align: int,\n max_matches: int = -1,\n step: int = -1,\n) -> Generator[int, None, None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.is_remote","title":"is_remote","text":"<pre><code>is_remote() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.send_remote","title":"send_remote","text":"<pre><code>send_remote(packet: str) -> bytes\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.send_monitor","title":"send_monitor","text":"<pre><code>send_monitor(cmd: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.download_remote_file","title":"download_remote_file","text":"<pre><code>download_remote_file(remote_path: str, local_path: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.create_value","title":"create_value","text":"<pre><code>create_value(value: int, type: Type | None = None) -> Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.symbol_name_at_address","title":"symbol_name_at_address","text":"<pre><code>symbol_name_at_address(address: int) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.lookup_symbol","title":"lookup_symbol","text":"<pre><code>lookup_symbol(\n name: str,\n *,\n prefer_static: bool = False,\n type: SymbolLookupType = ANY,\n objfile_endswith: str | None = None,\n) -> Value | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.types_with_name","title":"types_with_name","text":"<pre><code>types_with_name(name: str) -> Sequence[Type]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.arch","title":"arch","text":"<pre><code>arch() -> Arch\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.break_at","title":"break_at","text":"<pre><code>break_at(\n location: BreakpointLocation | WatchpointLocation,\n stop_handler: Callable[[StopPoint], bool] | None = None,\n internal: bool = False,\n) -> StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.disasm","title":"disasm","text":"<pre><code>disasm(address: int) -> DisassembledInstruction | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.is_linux","title":"is_linux","text":"<pre><code>is_linux() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.module_section_locations","title":"module_section_locations","text":"<pre><code>module_section_locations() -> list[tuple[int, int, str, str]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.main_module_name","title":"main_module_name","text":"<pre><code>main_module_name() -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.main_module_entry","title":"main_module_entry","text":"<pre><code>main_module_entry() -> int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.is_dynamically_linked","title":"is_dynamically_linked","text":"<pre><code>is_dynamically_linked() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.dispatch_execution_controller","title":"dispatch_execution_controller","text":"<pre><code>dispatch_execution_controller(\n procedure: Callable[[ExecutionController], Coroutine[Any, Any, None]],\n)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBCommand","title":"LLDBCommand","text":"<pre><code>LLDBCommand(handler_name: str, command_name: str)\n</code></pre> <p> Bases: <code>CommandHandle</code></p> <p>Methods:</p> <ul> <li> <code>remove</code> \u2013 <p>Removes this command from the command palette of the debugger.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>handler_name</code> \u2013 </li> <li> <code>command_name</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBCommand.handler_name","title":"handler_name <code>instance-attribute</code>","text":"<pre><code>handler_name = handler_name\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBCommand.command_name","title":"command_name <code>instance-attribute</code>","text":"<pre><code>command_name = command_name\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBCommand.remove","title":"remove","text":"<pre><code>remove() -> None\n</code></pre> <p>Removes this command from the command palette of the debugger.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB","title":"LLDB","text":"<p> Bases: <code>Debugger</code></p> <p>Methods:</p> <ul> <li> <code>setup</code> \u2013 </li> <li> <code>add_command</code> \u2013 </li> <li> <code>history</code> \u2013 </li> <li> <code>commands</code> \u2013 </li> <li> <code>lex_args</code> \u2013 </li> <li> <code>selected_inferior</code> \u2013 </li> <li> <code>selected_thread</code> \u2013 </li> <li> <code>selected_frame</code> \u2013 </li> <li> <code>has_event_type</code> \u2013 </li> <li> <code>event_handler</code> \u2013 </li> <li> <code>suspend_events</code> \u2013 </li> <li> <code>resume_events</code> \u2013 </li> <li> <code>set_sysroot</code> \u2013 </li> <li> <code>supports_breakpoint_creation_during_stop_handler</code> \u2013 </li> <li> <code>breakpoint_locations</code> \u2013 </li> <li> <code>name</code> \u2013 </li> <li> <code>x86_disassembly_flavor</code> \u2013 </li> <li> <code>string_limit</code> \u2013 </li> <li> <code>get_cmd_window_size</code> \u2013 </li> <li> <code>is_gdblib_available</code> \u2013 </li> <li> <code>addrsz</code> \u2013 </li> <li> <code>set_python_diagnostics</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>exec_states</code> (<code>list[SBExecutionState]</code>) \u2013 </li> <li> <code>event_handlers</code> (<code>dict[EventType, list[Callable[..., T]]]</code>) \u2013 </li> <li> <code>suspended_events</code> (<code>dict[EventType, bool]</code>) \u2013 </li> <li> <code>prompt_hook</code> (<code>Callable[[], None]</code>) \u2013 </li> <li> <code>controllers</code> (<code>list[tuple[LLDBProcess, Coroutine[Any, Any, None]]]</code>) \u2013 </li> <li> <code>pre_ctx_lines</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.exec_states","title":"exec_states <code>instance-attribute</code>","text":"<pre><code>exec_states: list[SBExecutionState]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.event_handlers","title":"event_handlers <code>instance-attribute</code>","text":"<pre><code>event_handlers: dict[EventType, list[Callable[..., T]]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.suspended_events","title":"suspended_events <code>instance-attribute</code>","text":"<pre><code>suspended_events: dict[EventType, bool]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.prompt_hook","title":"prompt_hook <code>instance-attribute</code>","text":"<pre><code>prompt_hook: Callable[[], None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.controllers","title":"controllers <code>instance-attribute</code>","text":"<pre><code>controllers: list[tuple[LLDBProcess, Coroutine[Any, Any, None]]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.pre_ctx_lines","title":"pre_ctx_lines <code>property</code>","text":"<pre><code>pre_ctx_lines: int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.setup","title":"setup","text":"<pre><code>setup(*args, **kwargs)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.add_command","title":"add_command","text":"<pre><code>add_command(\n command_name: str,\n handler: Callable[[Debugger, str, bool], None],\n doc: str | None,\n) -> CommandHandle\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.history","title":"history","text":"<pre><code>history(last: int = 10) -> list[tuple[int, str]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.commands","title":"commands","text":"<pre><code>commands() -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.lex_args","title":"lex_args","text":"<pre><code>lex_args(command_line: str) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.selected_inferior","title":"selected_inferior","text":"<pre><code>selected_inferior() -> Process | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.selected_thread","title":"selected_thread","text":"<pre><code>selected_thread() -> Thread | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.selected_frame","title":"selected_frame","text":"<pre><code>selected_frame() -> Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.has_event_type","title":"has_event_type","text":"<pre><code>has_event_type(ty: EventType) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.event_handler","title":"event_handler","text":"<pre><code>event_handler(\n ty: EventType,\n) -> Callable[[Callable[..., T]], Callable[..., T]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.suspend_events","title":"suspend_events","text":"<pre><code>suspend_events(ty: EventType) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.resume_events","title":"resume_events","text":"<pre><code>resume_events(ty: EventType) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.set_sysroot","title":"set_sysroot","text":"<pre><code>set_sysroot(sysroot: str) -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.supports_breakpoint_creation_during_stop_handler","title":"supports_breakpoint_creation_during_stop_handler","text":"<pre><code>supports_breakpoint_creation_during_stop_handler() -> bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.breakpoint_locations","title":"breakpoint_locations","text":"<pre><code>breakpoint_locations() -> list[BreakpointLocation]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.name","title":"name","text":"<pre><code>name() -> DebuggerType\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.x86_disassembly_flavor","title":"x86_disassembly_flavor","text":"<pre><code>x86_disassembly_flavor() -> Literal['att', 'intel']\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.string_limit","title":"string_limit","text":"<pre><code>string_limit() -> int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.get_cmd_window_size","title":"get_cmd_window_size","text":"<pre><code>get_cmd_window_size() -> tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.is_gdblib_available","title":"is_gdblib_available","text":"<pre><code>is_gdblib_available()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.addrsz","title":"addrsz","text":"<pre><code>addrsz(address: Any) -> str\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.set_python_diagnostics","title":"set_python_diagnostics","text":"<pre><code>set_python_diagnostics(enabled: bool) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.rename_register","title":"rename_register","text":"<pre><code>rename_register(name: str, proc: LLDBProcess) -> str\n</code></pre> <p>Some register names differ between Pwndbg/GDB and LLDB. This function takes in a register name in the Pwndbg/GDB convention and returns the equivalent LLDB name for the register.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.map_type_code","title":"map_type_code","text":"<pre><code>map_type_code(type: SBType) -> TypeCode\n</code></pre> <p>Determines the type code of a given LLDB SBType.</p>"},{"location":"reference/pwndbg/dbg/lldb/hooks/","title":"pwndbg.dbg.lldb.hooks","text":""},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks","title":"hooks","text":"<p>Code that sets up hooks for LLDB events.</p> <p>Functions:</p> <ul> <li> <code>update_typeinfo</code> \u2013 </li> <li> <code>reset_config</code> \u2013 </li> <li> <code>on_start</code> \u2013 </li> <li> <code>on_stop</code> \u2013 </li> <li> <code>on_exit</code> \u2013 </li> <li> <code>renew_show_context</code> \u2013 </li> <li> <code>prompt_hook</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>should_show_context</code> \u2013 </li> <li> <code>dbg</code> (<code>LLDB</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.should_show_context","title":"should_show_context <code>module-attribute</code>","text":"<pre><code>should_show_context = False\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.dbg","title":"dbg <code>module-attribute</code>","text":"<pre><code>dbg: LLDB = dbg\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.update_typeinfo","title":"update_typeinfo","text":"<pre><code>update_typeinfo() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.reset_config","title":"reset_config","text":"<pre><code>reset_config() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.on_start","title":"on_start","text":"<pre><code>on_start() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.on_stop","title":"on_stop","text":"<pre><code>on_stop() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.on_exit","title":"on_exit","text":"<pre><code>on_exit() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.renew_show_context","title":"renew_show_context","text":"<pre><code>renew_show_context()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.prompt_hook","title":"prompt_hook","text":"<pre><code>prompt_hook()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/pset/","title":"pwndbg.dbg.lldb.pset","text":""},{"location":"reference/pwndbg/dbg/lldb/pset/#pwndbg.dbg.lldb.pset","title":"pset","text":"<p>Classes:</p> <ul> <li> <code>InvalidParse</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>pset</code> \u2013 <p>Parses and sets a Pwndbg configuration value.</p> </li> <li> <code>parse_value</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/pset/#pwndbg.dbg.lldb.pset.InvalidParse","title":"InvalidParse","text":"<p> Bases: <code>Exception</code></p>"},{"location":"reference/pwndbg/dbg/lldb/pset/#pwndbg.dbg.lldb.pset.pset","title":"pset","text":"<pre><code>pset(name: str, value: str) -> bool\n</code></pre> <p>Parses and sets a Pwndbg configuration value.</p>"},{"location":"reference/pwndbg/dbg/lldb/pset/#pwndbg.dbg.lldb.pset.parse_value","title":"parse_value","text":"<pre><code>parse_value(param: Parameter, expression: str) -> Any\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/","title":"pwndbg.dbg.lldb.repl","text":""},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl","title":"repl","text":"<p>The Pwndbg REPL that is the interface to all debugging on LLDB.</p> <p>Pwndbg has an event system that allows it to react to events in the process being debugged, such as when new executable modules get added to the its address space, when the value of memory and registers change, and pretty much all possible changes to its execution state. We'd like to have the event system work the same way under LLDB as it does under GDB.</p> <p>Fortunately for us, the events types that are native to LLDB map really well to the event types in GDB and Pwndbg. Very, very unfortunately for us, however, that's basically where our luck ends.</p> <p>LLDB, as of version 18, only provides two ways to capture events: registering directly with the broadcaster, or registering globally. The former is not available to us in the standard LLDB REPL, as we don't get access to the process object until after it's been launched1. Likewise for the latter, as the interactive debugger will register to receive the global process state change events before everyone else, and LLDB doesn't allow for multiple listeners for the same event bits in the same event class2.</p> <p>This leaves us with handling process management ourselves as the only option we really have to implement event dispatch in Pwndbg. Easy, right? We can just hijack the commands that deal with target and process creation, and leave everything else untouched. Unfortunately for us, again, shadowing builtin commands is simply not allowed3.</p> <p>So, really, all that's left for us is either implement our own REPL, or get rid of the event system.</p> <p>Modules:</p> <ul> <li> <code>io</code> \u2013 <p>For our REPL, we need to drive our own I/O with the process being debugged. This</p> </li> <li> <code>proc</code> \u2013 </li> <li> <code>readline</code> \u2013 <p>Readline interface for the Pwndbg LLDB REPL.</p> </li> </ul> <p>Classes:</p> <ul> <li> <code>EventRelay</code> \u2013 <p>The event system that is sensible for the REPL process driver to use isn't</p> </li> <li> <code>YieldExecDirect</code> \u2013 <p>Execute the given command directly, on behalf of the user.</p> </li> <li> <code>YieldInteractive</code> \u2013 <p>Prompt the user for the next command.</p> </li> <li> <code>PwndbgController</code> \u2013 <p>Class providing interfaces for a client to control the behavior of Pwndbg</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>lex_args</code> \u2013 <p>Splits the arguments, respecting quotation marks.</p> </li> <li> <code>show_greeting</code> \u2013 <p>Show the Pwndbg greeting, the same way the GDB version of Pwndbg would. This</p> </li> <li> <code>run</code> \u2013 <p>Runs the Pwndbg CLI through the given asynchronous controller.</p> </li> <li> <code>exec_repl_command</code> \u2013 <p>Parses and runs the given command, returning whether the event loop should continue.</p> </li> <li> <code>parse</code> \u2013 <p>Parses a list of string arguments into an object containing the parsed</p> </li> <li> <code>run_ipython_shell</code> \u2013 </li> <li> <code>target_create</code> \u2013 <p>Creates a new target, registers it with the Pwndbg LLDB implementation, and</p> </li> <li> <code>process_launch</code> \u2013 <p>Launches a process with the given arguments.</p> </li> <li> <code>process_attach</code> \u2013 <p>Attaches to a process with the given arguments.</p> </li> <li> <code>attach</code> \u2013 <p>Attaches to a process with the given name or pid based on regex match.</p> </li> <li> <code>process_connect</code> \u2013 <p>Connects to the given remote process.</p> </li> <li> <code>gdb_remote</code> \u2013 <p>Like <code>process_connect</code>, but more lenient with the remote URL format.</p> </li> <li> <code>continue_process</code> \u2013 <p>Continues the execution of a process.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>show_tip</code> \u2013 </li> <li> <code>LLDB_EXCLUSIVE</code> \u2013 </li> <li> <code>target_create_ap</code> \u2013 </li> <li> <code>target_create_unsupported</code> \u2013 </li> <li> <code>process_launch_ap</code> \u2013 </li> <li> <code>process_launch_unsupported</code> \u2013 </li> <li> <code>process_attach_ap</code> \u2013 </li> <li> <code>process_attach_unsupported</code> \u2013 </li> <li> <code>process_connect_ap</code> \u2013 </li> <li> <code>gdb_remote_ap</code> \u2013 </li> <li> <code>continue_ap</code> \u2013 </li> <li> <code>continue_unsupported</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.show_tip","title":"show_tip <code>module-attribute</code>","text":"<pre><code>show_tip = add_param(\n \"show-tips\", True, \"whether to display the tip of the day on startup\"\n)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.LLDB_EXCLUSIVE","title":"LLDB_EXCLUSIVE <code>module-attribute</code>","text":"<pre><code>LLDB_EXCLUSIVE = [\n (\"script\", lambda cmd: startswith(\"sc\") and startswith(cmd)),\n (\"expression\", lambda cmd: startswith(\"e\") and startswith(cmd)),\n]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.target_create_ap","title":"target_create_ap <code>module-attribute</code>","text":"<pre><code>target_create_ap = ArgumentParser(add_help=False)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.target_create_unsupported","title":"target_create_unsupported <code>module-attribute</code>","text":"<pre><code>target_create_unsupported = [\n \"build\",\n \"core\",\n \"no-dependents\",\n \"remote-file\",\n \"symfile\",\n \"version\",\n]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_launch_ap","title":"process_launch_ap <code>module-attribute</code>","text":"<pre><code>process_launch_ap = ArgumentParser(add_help=False)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_launch_unsupported","title":"process_launch_unsupported <code>module-attribute</code>","text":"<pre><code>process_launch_unsupported = [\n \"disable-aslr\",\n \"script-class\",\n \"environment\",\n \"plugin\",\n \"shell-expand-args\",\n \"arch\",\n \"shell\",\n \"stderr\",\n \"stdin\",\n \"structured-data-key\",\n \"no-stdio\",\n \"stdout\",\n \"tty\",\n \"structured-data-value\",\n \"working-dir\",\n]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_attach_ap","title":"process_attach_ap <code>module-attribute</code>","text":"<pre><code>process_attach_ap = ArgumentParser(add_help=False)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_attach_unsupported","title":"process_attach_unsupported <code>module-attribute</code>","text":"<pre><code>process_attach_unsupported = [\n \"python-class\",\n \"plugin\",\n \"structured-data-key\",\n \"structured-data-value\",\n]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_connect_ap","title":"process_connect_ap <code>module-attribute</code>","text":"<pre><code>process_connect_ap = ArgumentParser(add_help=False)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.gdb_remote_ap","title":"gdb_remote_ap <code>module-attribute</code>","text":"<pre><code>gdb_remote_ap = ArgumentParser(add_help=False)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.continue_ap","title":"continue_ap <code>module-attribute</code>","text":"<pre><code>continue_ap = ArgumentParser(add_help=False)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.continue_unsupported","title":"continue_unsupported <code>module-attribute</code>","text":"<pre><code>continue_unsupported = ['ignore-count']\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay","title":"EventRelay","text":"<pre><code>EventRelay(dbg: LLDB)\n</code></pre> <p> Bases: <code>EventHandler</code></p> <p>The event system that is sensible for the REPL process driver to use isn't an exact match with the one used by the rest of Pwndbg. They're close, but there's a bit of work we have to do to properly convey certain events.</p> <p>Methods:</p> <ul> <li> <code>created</code> \u2013 </li> <li> <code>suspended</code> \u2013 </li> <li> <code>resumed</code> \u2013 </li> <li> <code>exited</code> \u2013 </li> <li> <code>modules_loaded</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>dbg</code> \u2013 </li> <li> <code>ignore_resumed</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay.dbg","title":"dbg <code>instance-attribute</code>","text":"<pre><code>dbg = dbg\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay.ignore_resumed","title":"ignore_resumed <code>instance-attribute</code>","text":"<pre><code>ignore_resumed = 0\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay.created","title":"created","text":"<pre><code>created()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay.suspended","title":"suspended","text":"<pre><code>suspended()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay.resumed","title":"resumed","text":"<pre><code>resumed()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay.exited","title":"exited","text":"<pre><code>exited()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.EventRelay.modules_loaded","title":"modules_loaded","text":"<pre><code>modules_loaded()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.YieldExecDirect","title":"YieldExecDirect","text":"<pre><code>YieldExecDirect(command: str, capture: bool, prompt_silent: bool)\n</code></pre> <p>Execute the given command directly, on behalf of the user.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.YieldInteractive","title":"YieldInteractive","text":"<p>Prompt the user for the next command.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.PwndbgController","title":"PwndbgController","text":"<p>Class providing interfaces for a client to control the behavior of Pwndbg asynchronously.</p> <p>Methods:</p> <ul> <li> <code>interactive</code> \u2013 <p>Runs a single interactive round, in which the user is prompted for a</p> </li> <li> <code>execute</code> \u2013 <p>Runs the given command, and displays its output to the user.</p> </li> <li> <code>execute_and_capture</code> \u2013 <p>Runs the given command, and captures its output as a byte string.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.PwndbgController.interactive","title":"interactive","text":"<pre><code>interactive() -> Awaitable[None]\n</code></pre> <p>Runs a single interactive round, in which the user is prompted for a command from standard input and <code>readline</code>, and whatever command they type in is executed.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.PwndbgController.execute","title":"execute","text":"<pre><code>execute(command: str) -> Awaitable[None]\n</code></pre> <p>Runs the given command, and displays its output to the user.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.PwndbgController.execute--interactivity","title":"Interactivity","text":"<p>Some commands - such as <code>lldb</code> and <code>ipi</code> - start interactive prompts when they are run, and issuing them through this command will not change that behavior.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.PwndbgController.execute_and_capture","title":"execute_and_capture","text":"<pre><code>execute_and_capture(command: str) -> Awaitable[bytes]\n</code></pre> <p>Runs the given command, and captures its output as a byte string.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.PwndbgController.execute_and_capture--interactivity","title":"Interactivity","text":"<p>Same caveats apply as in <code>execute</code>.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.PwndbgController.execute_and_capture--reliabily-of-capture","title":"Reliabily of Capture","text":"<p>Some Pwndbg commands currently do not have their outputs captured, even when run through this command. It is expected that this will be improved in the future, but, as as general rule, clients should not rely on the output of the command being available.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.lex_args","title":"lex_args","text":"<pre><code>lex_args(args: str) -> list[str]\n</code></pre> <p>Splits the arguments, respecting quotation marks.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.show_greeting","title":"show_greeting","text":"<pre><code>show_greeting() -> None\n</code></pre> <p>Show the Pwndbg greeting, the same way the GDB version of Pwndbg would. This one is considerably simpler than the GDB version, however, as we control the lifetime of the program, we know exactly when the greeting needs to be shown, so we don't bother with any of the lifetime checks.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.run","title":"run","text":"<pre><code>run(\n controller: Callable[[PwndbgController], Coroutine[Any, Any, None]],\n debug: bool = False,\n) -> None\n</code></pre> <p>Runs the Pwndbg CLI through the given asynchronous controller.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.exec_repl_command","title":"exec_repl_command","text":"<pre><code>exec_repl_command(\n line: str,\n lldb_out_target: BinaryIO,\n dbg: LLDB,\n driver: ProcessDriver,\n relay: EventRelay,\n) -> bool\n</code></pre> <p>Parses and runs the given command, returning whether the event loop should continue.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.parse","title":"parse","text":"<pre><code>parse(\n args: list[str], parser: ArgumentParser, unsupported: list[str]\n) -> Any | None\n</code></pre> <p>Parses a list of string arguments into an object containing the parsed data.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.run_ipython_shell","title":"run_ipython_shell","text":"<pre><code>run_ipython_shell()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.target_create","title":"target_create","text":"<pre><code>target_create(args: list[str], dbg: LLDB) -> None\n</code></pre> <p>Creates a new target, registers it with the Pwndbg LLDB implementation, and sets up listeners for it.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_launch","title":"process_launch","text":"<pre><code>process_launch(\n driver: ProcessDriver, relay: EventRelay, args: list[str], dbg: LLDB\n) -> None\n</code></pre> <p>Launches a process with the given arguments.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_attach","title":"process_attach","text":"<pre><code>process_attach(\n driver: ProcessDriver, relay: EventRelay, args: list[str], dbg: LLDB\n) -> None\n</code></pre> <p>Attaches to a process with the given arguments.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.attach","title":"attach","text":"<pre><code>attach(\n driver: ProcessDriver, relay: EventRelay, args: list[str], dbg: LLDB\n) -> None\n</code></pre> <p>Attaches to a process with the given name or pid based on regex match. Used for <code>_regexp-attach <pid|name></code> (alias for <code>attach <pid|name></code>) Note: for some reason, <code>attach</code> does not really take a regex for process name.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.process_connect","title":"process_connect","text":"<pre><code>process_connect(\n driver: ProcessDriver, relay: EventRelay, args: list[str], dbg: LLDB\n) -> None\n</code></pre> <p>Connects to the given remote process.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.gdb_remote","title":"gdb_remote","text":"<pre><code>gdb_remote(\n driver: ProcessDriver, relay: EventRelay, args: list[str], dbg: LLDB\n) -> None\n</code></pre> <p>Like <code>process_connect</code>, but more lenient with the remote URL format.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.continue_process","title":"continue_process","text":"<pre><code>continue_process(driver: ProcessDriver, args: list[str], dbg: LLDB) -> None\n</code></pre> <p>Continues the execution of a process.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/","title":"pwndbg.dbg.lldb.repl.io","text":""},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io","title":"io","text":"<p>For our REPL, we need to drive our own I/O with the process being debugged. This module contains all the strategies we have for doing that.</p> <p>Classes:</p> <ul> <li> <code>OpportunisticTerminalControl</code> \u2013 <p>Handles optional terminal control for a given file descriptor. Crucially,</p> </li> <li> <code>IODriver</code> \u2013 </li> <li> <code>IODriverPlainText</code> \u2013 <p>Plaintext-based I/O driver. It simply copies input from our standard input</p> </li> <li> <code>IODriverPseudoTerminal</code> \u2013 <p>pty-based I/O driver. Forwards input from standard input and has support for</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>get_io_driver</code> \u2013 <p>Instances a new IODriver using the best strategy available in the current</p> </li> <li> <code>make_pty</code> \u2013 <p>We need to make a pseudo-terminal ourselves if we want the process to handle</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>TERM_CONTROL_AVAILABLE</code> \u2013 </li> <li> <code>SELECT_AVAILABLE</code> \u2013 </li> <li> <code>PTY_AVAILABLE</code> \u2013 </li> <li> <code>TC_LFLAG</code> \u2013 </li> <li> <code>LIVE_PSEUDO_TERMINAL_OBJECTS</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.TERM_CONTROL_AVAILABLE","title":"TERM_CONTROL_AVAILABLE <code>module-attribute</code>","text":"<pre><code>TERM_CONTROL_AVAILABLE = True\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.SELECT_AVAILABLE","title":"SELECT_AVAILABLE <code>module-attribute</code>","text":"<pre><code>SELECT_AVAILABLE = True\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.PTY_AVAILABLE","title":"PTY_AVAILABLE <code>module-attribute</code>","text":"<pre><code>PTY_AVAILABLE = True\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.TC_LFLAG","title":"TC_LFLAG <code>module-attribute</code>","text":"<pre><code>TC_LFLAG = 3\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.LIVE_PSEUDO_TERMINAL_OBJECTS","title":"LIVE_PSEUDO_TERMINAL_OBJECTS <code>module-attribute</code>","text":"<pre><code>LIVE_PSEUDO_TERMINAL_OBJECTS = False\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.OpportunisticTerminalControl","title":"OpportunisticTerminalControl","text":"<pre><code>OpportunisticTerminalControl(fd: int = -1)\n</code></pre> <p>Handles optional terminal control for a given file descriptor. Crucially, all the functions in this class should work regardless of whether terminal control is actually supported on not, but should do nothing in case it is not supported.</p> <p>'/dev/tty', and use that.</p> <p>Methods:</p> <ul> <li> <code>get_line_buffering</code> \u2013 <p>Gets the current state of line buffering for this terminal.</p> </li> <li> <code>set_line_buffering</code> \u2013 <p>Enables or disables line buffering for this terminal.</p> </li> <li> <code>get_echo</code> \u2013 <p>Gets the current state of echoing for this terminal.</p> </li> <li> <code>set_echo</code> \u2013 <p>Enables or disables echoing for this terminal.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>fd</code> (<code>int</code>) \u2013 </li> <li> <code>supported</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.OpportunisticTerminalControl.fd","title":"fd <code>instance-attribute</code>","text":"<pre><code>fd: int = fd\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.OpportunisticTerminalControl.supported","title":"supported <code>instance-attribute</code>","text":"<pre><code>supported: bool = True\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.OpportunisticTerminalControl.get_line_buffering","title":"get_line_buffering","text":"<pre><code>get_line_buffering() -> bool\n</code></pre> <p>Gets the current state of line buffering for this terminal.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.OpportunisticTerminalControl.set_line_buffering","title":"set_line_buffering","text":"<pre><code>set_line_buffering(enabled: bool) -> None\n</code></pre> <p>Enables or disables line buffering for this terminal.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.OpportunisticTerminalControl.get_echo","title":"get_echo","text":"<pre><code>get_echo() -> bool\n</code></pre> <p>Gets the current state of echoing for this terminal.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.OpportunisticTerminalControl.set_echo","title":"set_echo","text":"<pre><code>set_echo(enabled: bool) -> None\n</code></pre> <p>Enables or disables echoing for this terminal.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriver","title":"IODriver","text":"<p>Methods:</p> <ul> <li> <code>stdio</code> \u2013 <p>The names for the stdin, stdout and stderr files, respectively. These</p> </li> <li> <code>start</code> \u2013 <p>Starts the handling of I/O by this driver on the given process.</p> </li> <li> <code>stop</code> \u2013 <p>Stops the handling of I/O by this driver.</p> </li> <li> <code>on_output_event</code> \u2013 <p>Hints that there might be data in either the standard output or the</p> </li> <li> <code>on_process_start</code> \u2013 <p>Allow the I/O driver an opportunity to change aspects of the process</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriver.stdio","title":"stdio","text":"<pre><code>stdio() -> tuple[str | None, str | None, str | None]\n</code></pre> <p>The names for the stdin, stdout and stderr files, respectively. These will get passed as arguments to <code>SBTarget.Launch</code></p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriver.start","title":"start","text":"<pre><code>start(process: Process) -> None\n</code></pre> <p>Starts the handling of I/O by this driver on the given process.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriver.stop","title":"stop","text":"<pre><code>stop() -> None\n</code></pre> <p>Stops the handling of I/O by this driver.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriver.on_output_event","title":"on_output_event","text":"<pre><code>on_output_event() -> None\n</code></pre> <p>Hints that there might be data in either the standard output or the standard error streams. This should be called when an <code>eBroadcastBitSTDOUT</code> or <code>eBroadcastBitSTDERR</code> is encountered by the event loop.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriver.on_process_start","title":"on_process_start","text":"<pre><code>on_process_start(proc: SBProcess) -> None\n</code></pre> <p>Allow the I/O driver an opportunity to change aspects of the process after it has been launched, but before it has started executing, if it so wishes.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText","title":"IODriverPlainText","text":"<pre><code>IODriverPlainText()\n</code></pre> <p> Bases: <code>IODriver</code></p> <p>Plaintext-based I/O driver. It simply copies input from our standard input to the standard input of a given process, and copies output from the standard output of a given process to out standard output.</p> <p>Methods:</p> <ul> <li> <code>stdio</code> \u2013 </li> <li> <code>on_output_event</code> \u2013 </li> <li> <code>on_process_start</code> \u2013 </li> <li> <code>start</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>in_thr</code> (<code>Thread</code>) \u2013 </li> <li> <code>out_thr</code> (<code>Thread</code>) \u2013 </li> <li> <code>likely_output</code> (<code>BoundedSemaphore</code>) \u2013 </li> <li> <code>process</code> (<code>SBProcess</code>) \u2013 </li> <li> <code>stop_requested</code> (<code>Event</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.in_thr","title":"in_thr <code>instance-attribute</code>","text":"<pre><code>in_thr: Thread\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.out_thr","title":"out_thr <code>instance-attribute</code>","text":"<pre><code>out_thr: Thread\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.likely_output","title":"likely_output <code>instance-attribute</code>","text":"<pre><code>likely_output: BoundedSemaphore = BoundedSemaphore(1)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.process","title":"process <code>instance-attribute</code>","text":"<pre><code>process: SBProcess = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.stop_requested","title":"stop_requested <code>instance-attribute</code>","text":"<pre><code>stop_requested: Event = Event()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.stdio","title":"stdio","text":"<pre><code>stdio() -> tuple[str | None, str | None, str | None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.on_output_event","title":"on_output_event","text":"<pre><code>on_output_event() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.on_process_start","title":"on_process_start","text":"<pre><code>on_process_start(proc: SBProcess) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.start","title":"start","text":"<pre><code>start(process: Process) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.stop","title":"stop","text":"<pre><code>stop() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal","title":"IODriverPseudoTerminal","text":"<pre><code>IODriverPseudoTerminal(manager: int, worker: str)\n</code></pre> <p> Bases: <code>IODriver</code></p> <p>pty-based I/O driver. Forwards input from standard input and has support for terminal width and height, and for terminal-based file operations on the program being debugged.</p> <p>Methods:</p> <ul> <li> <code>stdio</code> \u2013 </li> <li> <code>start</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> <li> <code>on_output_event</code> \u2013 </li> <li> <code>on_process_start</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>io_thread</code> (<code>Thread</code>) \u2013 </li> <li> <code>has_terminal_control</code> (<code>bool</code>) \u2013 </li> <li> <code>manager</code> (<code>int</code>) \u2013 </li> <li> <code>worker</code> (<code>str</code>) \u2013 </li> <li> <code>termcontrol</code> (<code>OpportunisticTerminalControl</code>) \u2013 </li> <li> <code>stop_requested</code> (<code>Event</code>) \u2013 </li> <li> <code>input_buffer</code> (<code>bytes</code>) \u2013 </li> <li> <code>process</code> (<code>SBProcess</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.io_thread","title":"io_thread <code>instance-attribute</code>","text":"<pre><code>io_thread: Thread\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.has_terminal_control","title":"has_terminal_control <code>instance-attribute</code>","text":"<pre><code>has_terminal_control: bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.manager","title":"manager <code>instance-attribute</code>","text":"<pre><code>manager: int = manager\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.worker","title":"worker <code>instance-attribute</code>","text":"<pre><code>worker: str = worker\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.termcontrol","title":"termcontrol <code>instance-attribute</code>","text":"<pre><code>termcontrol: OpportunisticTerminalControl = OpportunisticTerminalControl()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.stop_requested","title":"stop_requested <code>instance-attribute</code>","text":"<pre><code>stop_requested: Event = Event()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.input_buffer","title":"input_buffer <code>instance-attribute</code>","text":"<pre><code>input_buffer: bytes = b''\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.process","title":"process <code>instance-attribute</code>","text":"<pre><code>process: SBProcess = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.stdio","title":"stdio","text":"<pre><code>stdio() -> tuple[str | None, str | None, str | None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.start","title":"start","text":"<pre><code>start(process: Process) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.stop","title":"stop","text":"<pre><code>stop() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.on_output_event","title":"on_output_event","text":"<pre><code>on_output_event() -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.on_process_start","title":"on_process_start","text":"<pre><code>on_process_start(proc: SBProcess) -> None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.get_io_driver","title":"get_io_driver","text":"<pre><code>get_io_driver() -> IODriver\n</code></pre> <p>Instances a new IODriver using the best strategy available in the current system. Meaning a PTY on Unix and plain text on Windows.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.make_pty","title":"make_pty","text":"<pre><code>make_pty() -> tuple[str, int] | None\n</code></pre> <p>We need to make a pseudo-terminal ourselves if we want the process to handle naturally for the user. Returns a tuple with the path of the worker device and the file descriptor of the manager device if successful.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/","title":"pwndbg.dbg.lldb.repl.proc","text":""},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc","title":"proc","text":"<p>Classes:</p> <ul> <li> <code>EventHandler</code> \u2013 <p>The event types that make sense for us to track in the process driver aren't</p> </li> <li> <code>ProcessDriver</code> \u2013 <p>Drives the execution of a process, responding to its events and handling its</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.EventHandler","title":"EventHandler","text":"<p>The event types that make sense for us to track in the process driver aren't the same as the ones in the rest of Pwndbg, so we just expose the native events in process driver, and let the rest of the REPL deal with any complexities that might arise from the translation.</p> <p>This is mostly intended to keep the complexity of generating the START and NEW_THREAD events correctly out of the process driver.</p> <p>Methods:</p> <ul> <li> <code>created</code> \u2013 <p>This function is called when a process is created or attached to.</p> </li> <li> <code>suspended</code> \u2013 <p>This function is called when the execution of a process is suspended.</p> </li> <li> <code>resumed</code> \u2013 <p>This function is called when the execution of a process is resumed.</p> </li> <li> <code>exited</code> \u2013 <p>This function is called when a process terminates or is detached from.</p> </li> <li> <code>modules_loaded</code> \u2013 <p>This function is called when a new modules have been loaded.</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.EventHandler.created","title":"created","text":"<pre><code>created()\n</code></pre> <p>This function is called when a process is created or attached to.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.EventHandler.suspended","title":"suspended","text":"<pre><code>suspended()\n</code></pre> <p>This function is called when the execution of a process is suspended.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.EventHandler.resumed","title":"resumed","text":"<pre><code>resumed()\n</code></pre> <p>This function is called when the execution of a process is resumed.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.EventHandler.exited","title":"exited","text":"<pre><code>exited()\n</code></pre> <p>This function is called when a process terminates or is detached from.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.EventHandler.modules_loaded","title":"modules_loaded","text":"<pre><code>modules_loaded()\n</code></pre> <p>This function is called when a new modules have been loaded.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver","title":"ProcessDriver","text":"<pre><code>ProcessDriver(event_handler: EventHandler, debug=False)\n</code></pre> <p>Drives the execution of a process, responding to its events and handling its I/O, and exposes a simple synchronous interface to the REPL interface.</p> <p>Methods:</p> <ul> <li> <code>has_process</code> \u2013 <p>Whether there's an active process in this driver.</p> </li> <li> <code>has_connection</code> \u2013 <p>Whether this driver's connected to a target. All drivers that have an</p> </li> <li> <code>cancel</code> \u2013 <p>Request that a currently ongoing operation be cancelled.</p> </li> <li> <code>interrupt</code> \u2013 <p>Interrupts the currently running process.</p> </li> <li> <code>cont</code> \u2013 <p>Continues execution of the process this object is driving, and returns</p> </li> <li> <code>run_lldb_command</code> \u2013 <p>Runs the given LLDB command and ataches I/O if necessary.</p> </li> <li> <code>run_coroutine</code> \u2013 <p>Runs the given coroutine and allows it to control the execution of the</p> </li> <li> <code>launch</code> \u2013 <p>Launches the process and handles startup events. Always stops on first</p> </li> <li> <code>attach</code> \u2013 <p>Attach to a process and handles startup events. Always stops on first</p> </li> <li> <code>connect</code> \u2013 <p>Connects to a remote proces with the given URL using the plugin with the</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>io</code> (<code>IODriver</code>) \u2013 </li> <li> <code>process</code> (<code>SBProcess</code>) \u2013 </li> <li> <code>listener</code> (<code>SBListener</code>) \u2013 </li> <li> <code>debug</code> (<code>bool</code>) \u2013 </li> <li> <code>eh</code> (<code>EventHandler</code>) \u2013 </li> <li> <code>cancellation_requested</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.io","title":"io <code>instance-attribute</code>","text":"<pre><code>io: IODriver = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.process","title":"process <code>instance-attribute</code>","text":"<pre><code>process: SBProcess = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.listener","title":"listener <code>instance-attribute</code>","text":"<pre><code>listener: SBListener = None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.debug","title":"debug <code>instance-attribute</code>","text":"<pre><code>debug: bool = debug\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.eh","title":"eh <code>instance-attribute</code>","text":"<pre><code>eh: EventHandler = event_handler\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.cancellation_requested","title":"cancellation_requested <code>instance-attribute</code>","text":"<pre><code>cancellation_requested: bool = False\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.has_process","title":"has_process","text":"<pre><code>has_process() -> bool\n</code></pre> <p>Whether there's an active process in this driver.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.has_connection","title":"has_connection","text":"<pre><code>has_connection() -> bool\n</code></pre> <p>Whether this driver's connected to a target. All drivers that have an active process also must necessarily be connected.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.cancel","title":"cancel","text":"<pre><code>cancel() -> None\n</code></pre> <p>Request that a currently ongoing operation be cancelled.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.interrupt","title":"interrupt","text":"<pre><code>interrupt() -> None\n</code></pre> <p>Interrupts the currently running process.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.cont","title":"cont","text":"<pre><code>cont() -> None\n</code></pre> <p>Continues execution of the process this object is driving, and returns whenever the process stops.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.run_lldb_command","title":"run_lldb_command","text":"<pre><code>run_lldb_command(command: str, target: BinaryIO) -> None\n</code></pre> <p>Runs the given LLDB command and ataches I/O if necessary.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.run_coroutine","title":"run_coroutine","text":"<pre><code>run_coroutine(coroutine: Coroutine[Any, Any, None]) -> bool\n</code></pre> <p>Runs the given coroutine and allows it to control the execution of the process in this driver. Returns <code>True</code> if the coroutine ran to completion, and <code>False</code> if it was cancelled.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.launch","title":"launch","text":"<pre><code>launch(\n target: SBTarget,\n io: IODriver,\n env: list[str],\n args: list[str],\n working_dir: str,\n) -> SBError\n</code></pre> <p>Launches the process and handles startup events. Always stops on first opportunity, and returns immediately after the process has stopped.</p> <p>Fires the created() event.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.attach","title":"attach","text":"<pre><code>attach(target: SBTarget, io: IODriver, info: SBAttachInfo) -> SBError\n</code></pre> <p>Attach to a process and handles startup events. Always stops on first opportunity, and returns immediately after the process has stopped.</p> <p>Fires the created() event.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.ProcessDriver.connect","title":"connect","text":"<pre><code>connect(target: SBTarget, io: IODriver, url: str, plugin: str) -> SBError\n</code></pre> <p>Connects to a remote proces with the given URL using the plugin with the given name. This might cause the process to launch in some implementations, or it might require a call to <code>launch()</code>, in implementations that require a further call to <code>SBProcess::RemoteLaunch()</code>.</p> <p>Fires the created() event if a process is automatically attached to or launched when a connection succeeds.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/","title":"pwndbg.dbg.lldb.repl.readline","text":""},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline","title":"readline","text":"<p>Readline interface for the Pwndbg LLDB REPL.</p> <p>Mostly concerns itself with argument completion.</p> <p>Functions:</p> <ul> <li> <code>complete</code> \u2013 <p>Runs the tab autocompletion function for readline based on the values</p> </li> <li> <code>display_completions</code> \u2013 <p>Display the completions found by <code>complete</code> in the style of LLDB.</p> </li> <li> <code>wrap_with_history</code> \u2013 </li> <li> <code>ctx_with_history</code> \u2013 </li> <li> <code>enable_readline</code> \u2013 <p>Enables the readline functionality.</p> </li> <li> <code>disable_readline</code> \u2013 <p>Disables the readline functionality.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>PROMPT</code> \u2013 </li> <li> <code>HISTORY_FILE</code> \u2013 </li> <li> <code>complete_values</code> \u2013 </li> <li> <code>complete_descrs</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.PROMPT","title":"PROMPT <code>module-attribute</code>","text":"<pre><code>PROMPT = readline_escape(prompt, 'pwndbg-lldb> ')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.HISTORY_FILE","title":"HISTORY_FILE <code>module-attribute</code>","text":"<pre><code>HISTORY_FILE = expanduser('~/.pwndbg_history')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.complete_values","title":"complete_values <code>module-attribute</code>","text":"<pre><code>complete_values = SBStringList()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.complete_descrs","title":"complete_descrs <code>module-attribute</code>","text":"<pre><code>complete_descrs = SBStringList()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.complete","title":"complete","text":"<pre><code>complete(dbg: LLDB, text: str, state: int) -> str | None\n</code></pre> <p>Runs the tab autocompletion function for readline based on the values returned by <code>SBCommandInterpreter.HandleCompletion</code>.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.display_completions","title":"display_completions","text":"<pre><code>display_completions(substitutions, matches, longest_match_len)\n</code></pre> <p>Display the completions found by <code>complete</code> in the style of LLDB.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.wrap_with_history","title":"wrap_with_history","text":"<pre><code>wrap_with_history(function: Callable[P, T]) -> Callable[P, T]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.ctx_with_history","title":"ctx_with_history","text":"<pre><code>ctx_with_history()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.enable_readline","title":"enable_readline","text":"<pre><code>enable_readline(dbg: LLDB)\n</code></pre> <p>Enables the readline functionality.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/readline/#pwndbg.dbg.lldb.repl.readline.disable_readline","title":"disable_readline","text":"<pre><code>disable_readline()\n</code></pre> <p>Disables the readline functionality.</p>"},{"location":"reference/pwndbg/dbg/lldb/util/","title":"pwndbg.dbg.lldb.util","text":""},{"location":"reference/pwndbg/dbg/lldb/util/#pwndbg.dbg.lldb.util","title":"util","text":"<p>Functions:</p> <ul> <li> <code>system_decode</code> \u2013 <p>LLDB requires Python strings in many places where it makes sense to accept</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/util/#pwndbg.dbg.lldb.util.system_decode","title":"system_decode","text":"<pre><code>system_decode(b: bytes) -> str\n</code></pre> <p>LLDB requires Python strings in many places where it makes sense to accept bytes values. This is mostly an artifact of how Swig maps C <code>char*</code> to <code>str</code> in Python, but since Swig will refuse bytes objects, we have to figure out a way to pass this data as a regular string object, even if that's nonsensical in Python terms.</p> <p>This function tries its best to resolve that by decoding it with the same decoder the filesystem uses, and, failing that, ASCII.</p>"},{"location":"reference/pwndbg/decorators/","title":"pwndbg.decorators","text":""},{"location":"reference/pwndbg/decorators/#pwndbg.decorators","title":"decorators","text":"<p>Functions:</p> <ul> <li> <code>only_after_first_prompt</code> \u2013 <p>Decorator to prevent a function from running before the first prompt was displayed.</p> </li> <li> <code>suppress_errors</code> \u2013 <p>Decorator to make a function return a fallback value when it would otherwise error.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>first_prompt</code> \u2013 </li> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>K</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/decorators/#pwndbg.decorators.first_prompt","title":"first_prompt <code>module-attribute</code>","text":"<pre><code>first_prompt = False\n</code></pre>"},{"location":"reference/pwndbg/decorators/#pwndbg.decorators.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/decorators/#pwndbg.decorators.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/decorators/#pwndbg.decorators.K","title":"K <code>module-attribute</code>","text":"<pre><code>K = TypeVar('K')\n</code></pre>"},{"location":"reference/pwndbg/decorators/#pwndbg.decorators.only_after_first_prompt","title":"only_after_first_prompt","text":"<pre><code>only_after_first_prompt(\n value_before: T | None = None,\n) -> Callable[[Callable[P, T]], Callable[P, T | None]]\n</code></pre> <p>Decorator to prevent a function from running before the first prompt was displayed. The 'value_before' parameter can be used to specify the value that is returned if the function is called before the first prompt was displayed.</p>"},{"location":"reference/pwndbg/decorators/#pwndbg.decorators.suppress_errors","title":"suppress_errors","text":"<pre><code>suppress_errors(\n fallback: K = None, should_warn: bool = True\n) -> Callable[[Callable[P, T]], Callable[P, T | K]]\n</code></pre> <p>Decorator to make a function return a fallback value when it would otherwise error. The 'fallback' parameter can be used to specify the fallback value. If the 'should_warn' parameter is set, a warning will be printed whenever an error is suppressed.</p>"},{"location":"reference/pwndbg/emu/","title":"pwndbg.emu","text":""},{"location":"reference/pwndbg/emu/#pwndbg.emu","title":"emu","text":"<p>Modules:</p> <ul> <li> <code>emulator</code> \u2013 <p>Emulation assistance from Unicorn.</p> </li> </ul>"},{"location":"reference/pwndbg/emu/emulator/","title":"pwndbg.emu.emulator","text":""},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator","title":"emulator","text":"<p>Emulation assistance from Unicorn.</p> <p>Classes:</p> <ul> <li> <code>InstructionExecutedResult</code> \u2013 </li> <li> <code>Emulator</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>parse_consts</code> \u2013 <p>Unicorn \"consts\" is a python module consisting of a variable definition</p> </li> <li> <code>create_reg_to_const_map</code> \u2013 </li> <li> <code>debug</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>arch_to_UC</code> \u2013 </li> <li> <code>arch_to_UC_consts</code> \u2013 </li> <li> <code>arch_to_reg_const_map</code> \u2013 </li> <li> <code>DEBUG</code> \u2013 </li> <li> <code>arch_to_SYSCALL</code> \u2013 </li> <li> <code>ARM_BANNED_INSTRUCTIONS</code> \u2013 </li> <li> <code>BANNED_INSTRUCTIONS</code> \u2013 </li> <li> <code>blacklisted_regs</code> \u2013 <p>e = pwndbg.emu.emulator.Emulator()</p> </li> </ul>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.arch_to_UC","title":"arch_to_UC <code>module-attribute</code>","text":"<pre><code>arch_to_UC = {\n \"i386\": UC_ARCH_X86,\n \"x86-64\": UC_ARCH_X86,\n \"mips\": UC_ARCH_MIPS,\n \"sparc\": UC_ARCH_SPARC,\n \"arm\": UC_ARCH_ARM,\n \"armcm\": UC_ARCH_ARM,\n \"aarch64\": UC_ARCH_ARM64,\n \"rv32\": UC_ARCH_RISCV,\n \"rv64\": UC_ARCH_RISCV,\n}\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.arch_to_UC_consts","title":"arch_to_UC_consts <code>module-attribute</code>","text":"<pre><code>arch_to_UC_consts = {\n \"i386\": parse_consts(x86_const),\n \"x86-64\": parse_consts(x86_const),\n \"mips\": parse_consts(mips_const),\n \"sparc\": parse_consts(sparc_const),\n \"arm\": parse_consts(arm_const),\n \"armcm\": parse_consts(arm_const),\n \"aarch64\": parse_consts(arm64_const),\n \"rv32\": parse_consts(riscv_const),\n \"rv64\": parse_consts(riscv_const),\n}\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.arch_to_reg_const_map","title":"arch_to_reg_const_map <code>module-attribute</code>","text":"<pre><code>arch_to_reg_const_map = {\n \"i386\": create_reg_to_const_map(arch_to_UC_consts[\"i386\"]),\n \"x86-64\": create_reg_to_const_map(\n arch_to_UC_consts[\"x86-64\"],\n {\"FSBASE\": UC_X86_REG_FS_BASE, \"GSBASE\": UC_X86_REG_GS_BASE},\n ),\n \"mips\": create_reg_to_const_map(arch_to_UC_consts[\"mips\"]),\n \"sparc\": create_reg_to_const_map(arch_to_UC_consts[\"sparc\"]),\n \"arm\": create_reg_to_const_map(arch_to_UC_consts[\"arm\"]),\n \"armcm\": create_reg_to_const_map(arch_to_UC_consts[\"armcm\"]),\n \"aarch64\": create_reg_to_const_map(\n arch_to_UC_consts[\"aarch64\"], {\"CPSR\": UC_ARM64_REG_NZCV}\n ),\n \"rv32\": create_reg_to_const_map(arch_to_UC_consts[\"rv32\"]),\n \"rv64\": create_reg_to_const_map(arch_to_UC_consts[\"rv64\"]),\n}\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.DEBUG","title":"DEBUG <code>module-attribute</code>","text":"<pre><code>DEBUG = NO_DEBUG\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.arch_to_SYSCALL","title":"arch_to_SYSCALL <code>module-attribute</code>","text":"<pre><code>arch_to_SYSCALL = {\n UC_ARCH_X86: [\n X86_INS_SYSCALL,\n X86_INS_SYSENTER,\n X86_INS_SYSEXIT,\n X86_INS_SYSRET,\n X86_INS_IRET,\n X86_INS_IRETD,\n X86_INS_IRETQ,\n X86_INS_INT,\n X86_INS_INT1,\n X86_INS_INT3,\n ],\n UC_ARCH_MIPS: [MIPS_INS_SYSCALL],\n UC_ARCH_SPARC: [SPARC_INS_T],\n UC_ARCH_ARM: [ARM_INS_SVC],\n UC_ARCH_ARM64: [ARM64_INS_SVC],\n UC_ARCH_PPC: [PPC_INS_SC],\n UC_ARCH_RISCV: [RISCV_INS_ECALL],\n}\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.ARM_BANNED_INSTRUCTIONS","title":"ARM_BANNED_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>ARM_BANNED_INSTRUCTIONS = {\n ARM_INS_MRC,\n ARM_INS_MRRC,\n ARM_INS_MRC2,\n ARM_INS_MRRC2,\n}\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.BANNED_INSTRUCTIONS","title":"BANNED_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>BANNED_INSTRUCTIONS = {\n \"mips\": {MIPS_INS_RDHWR},\n \"arm\": ARM_BANNED_INSTRUCTIONS,\n \"armcm\": ARM_BANNED_INSTRUCTIONS,\n \"aarch64\": {ARM64_INS_MRS},\n}\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.blacklisted_regs","title":"blacklisted_regs <code>module-attribute</code>","text":"<pre><code>blacklisted_regs = ['ip', 'cs', 'ds', 'es', 'fs', 'gs', 'ss']\n</code></pre> <p>e = pwndbg.emu.emulator.Emulator() e.until_jump()</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.InstructionExecutedResult","title":"InstructionExecutedResult","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>address</code> (<code>int</code>) \u2013 </li> <li> <code>size</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.InstructionExecutedResult.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address: int\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.InstructionExecutedResult.size","title":"size <code>instance-attribute</code>","text":"<pre><code>size: int\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator","title":"Emulator","text":"<pre><code>Emulator()\n</code></pre> <p>Methods:</p> <ul> <li> <code>read_register</code> \u2013 </li> <li> <code>read_memory</code> \u2013 </li> <li> <code>telescope</code> \u2013 </li> <li> <code>format_telescope</code> \u2013 </li> <li> <code>format_telescope_list</code> \u2013 </li> <li> <code>telescope_enhance</code> \u2013 </li> <li> <code>memory_read_string</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>update_pc</code> \u2013 </li> <li> <code>read_thumb_bit</code> \u2013 <p>Return 0 or 1, representing the status of the Thumb bit in the current Arm architecture</p> </li> <li> <code>get_uc_mode</code> \u2013 <p>Retrieve the mode used by Unicorn for the current architecture.</p> </li> <li> <code>map_page</code> \u2013 </li> <li> <code>hook_mem_invalid</code> \u2013 </li> <li> <code>hook_intr</code> \u2013 <p>We never want to emulate through an interrupt. Just stop.</p> </li> <li> <code>get_reg_enum</code> \u2013 <p>Returns the Unicorn Emulator enum code for the named register.</p> </li> <li> <code>hook_add</code> \u2013 </li> <li> <code>hook_del</code> \u2013 </li> <li> <code>emu_start</code> \u2013 </li> <li> <code>emu_stop</code> \u2013 </li> <li> <code>emulate_with_hook</code> \u2013 </li> <li> <code>mem_read</code> \u2013 </li> <li> <code>until_jump</code> \u2013 <p>Emulates instructions starting at the specified address until the</p> </li> <li> <code>until_jump_hook_code</code> \u2013 </li> <li> <code>until_call</code> \u2013 </li> <li> <code>until_syscall</code> \u2013 <p>Emulates instructions starting at the specified address until the program</p> </li> <li> <code>until_syscall_hook_code</code> \u2013 </li> <li> <code>single_step</code> \u2013 <p>Steps one instruction.</p> </li> <li> <code>single_step_iter</code> \u2013 </li> <li> <code>single_step_hook_code</code> \u2013 </li> <li> <code>dumpregs</code> \u2013 </li> <li> <code>trace_hook</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>arch</code> \u2013 </li> <li> <code>const_regs</code> \u2013 </li> <li> <code>uc_mode</code> \u2013 </li> <li> <code>uc</code> \u2013 </li> <li> <code>regs</code> (<code>RegisterSet</code>) \u2013 </li> <li> <code>valid</code> \u2013 </li> <li> <code>last_pc</code> \u2013 </li> <li> <code>last_single_step_result</code> \u2013 </li> <li> <code>last_step_succeeded</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.arch","title":"arch <code>instance-attribute</code>","text":"<pre><code>arch = name\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.const_regs","title":"const_regs <code>instance-attribute</code>","text":"<pre><code>const_regs = arch_to_reg_const_map[arch]\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.uc_mode","title":"uc_mode <code>instance-attribute</code>","text":"<pre><code>uc_mode = get_uc_mode()\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.uc","title":"uc <code>instance-attribute</code>","text":"<pre><code>uc = Uc(arch_to_UC[arch], uc_mode)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.regs","title":"regs <code>instance-attribute</code>","text":"<pre><code>regs: RegisterSet = current\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.valid","title":"valid <code>instance-attribute</code>","text":"<pre><code>valid = True\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.last_pc","title":"last_pc <code>instance-attribute</code>","text":"<pre><code>last_pc = None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.last_single_step_result","title":"last_single_step_result <code>instance-attribute</code>","text":"<pre><code>last_single_step_result = InstructionExecutedResult(None, None)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.last_step_succeeded","title":"last_step_succeeded <code>property</code>","text":"<pre><code>last_step_succeeded: bool\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.read_register","title":"read_register","text":"<pre><code>read_register(name: str)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.read_memory","title":"read_memory","text":"<pre><code>read_memory(address: int, size: int) -> bytes | None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.telescope","title":"telescope","text":"<pre><code>telescope(address: int, limit: int, read_size: int = None) -> list[int]\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.format_telescope","title":"format_telescope","text":"<pre><code>format_telescope(address: int, limit: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.format_telescope_list","title":"format_telescope_list","text":"<pre><code>format_telescope_list(\n chain: list[int], limit: int, enhance_string_len: int = None\n) -> str\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.telescope_enhance","title":"telescope_enhance","text":"<pre><code>telescope_enhance(\n value: int, code: bool = True, enhance_string_len: int = None\n)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.memory_read_string","title":"memory_read_string","text":"<pre><code>memory_read_string(\n address: int, max_string_len=None, max_read=None\n) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.update_pc","title":"update_pc","text":"<pre><code>update_pc(pc=None) -> None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -> int\n</code></pre> <p>Return 0 or 1, representing the status of the Thumb bit in the current Arm architecture</p> <p>This reads from the emulator itself, meaning this can be read to determine a state transitions between non-Thumb and Thumb mode</p> <p>Return None if the Thumb bit is not relevent to the current architecture</p> <p>Mimics the <code>read_thumb_bit</code> function defined in aglib/arch.py</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.get_uc_mode","title":"get_uc_mode","text":"<pre><code>get_uc_mode()\n</code></pre> <p>Retrieve the mode used by Unicorn for the current architecture.</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.map_page","title":"map_page","text":"<pre><code>map_page(page) -> bool\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.hook_mem_invalid","title":"hook_mem_invalid","text":"<pre><code>hook_mem_invalid(uc, access, address, size: int, value, user_data) -> bool\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.hook_intr","title":"hook_intr","text":"<pre><code>hook_intr(uc, intno, user_data) -> None\n</code></pre> <p>We never want to emulate through an interrupt. Just stop.</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.get_reg_enum","title":"get_reg_enum","text":"<pre><code>get_reg_enum(reg: str) -> int | None\n</code></pre> <p>Returns the Unicorn Emulator enum code for the named register.</p> <p>Also supports general registers like 'sp' and 'pc'.</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.hook_add","title":"hook_add","text":"<pre><code>hook_add(*a, **kw)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.hook_del","title":"hook_del","text":"<pre><code>hook_del(*a, **kw)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.emu_start","title":"emu_start","text":"<pre><code>emu_start(*a, **kw)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.emu_stop","title":"emu_stop","text":"<pre><code>emu_stop(*a, **kw)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.emulate_with_hook","title":"emulate_with_hook","text":"<pre><code>emulate_with_hook(hook, count=512) -> None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.mem_read","title":"mem_read","text":"<pre><code>mem_read(*a, **kw)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.until_jump","title":"until_jump","text":"<pre><code>until_jump(pc: int = None)\n</code></pre> <p>Emulates instructions starting at the specified address until the program counter is set to an address which does not linearly follow the previously-emulated instruction.</p> <p>Parameters:</p> <ul> <li> <code>pc</code> (<code>int</code>, default: <code>None</code> ) \u2013 <p>Address to start at. If <code>None</code>, uses the current instruction.</p> </li> </ul> Return <p>Returns a tuple containing the address of the jump instruction, and its target in the format (address, target).</p> <p>If emulation is forced to stop (e.g., because of a syscall or invalid memory access) then address is the instruction which could not be emulated through, and target will be None.</p> Notes <p>This routine does not consider 'call $+5'</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.until_jump_hook_code","title":"until_jump_hook_code","text":"<pre><code>until_jump_hook_code(_uc, address, instruction_size: int, _user_data) -> None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.until_call","title":"until_call","text":"<pre><code>until_call(pc=None)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.until_syscall","title":"until_syscall","text":"<pre><code>until_syscall(pc=None)\n</code></pre> <p>Emulates instructions starting at the specified address until the program counter points at a syscall instruction (int 0x80, svc, etc.).</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.until_syscall_hook_code","title":"until_syscall_hook_code","text":"<pre><code>until_syscall_hook_code(uc, address, size: int, user_data) -> None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.single_step","title":"single_step","text":"<pre><code>single_step(pc=None) -> tuple[int, int]\n</code></pre> <p>Steps one instruction.</p> <p>Yields:</p> <ul> <li> <code>int</code> \u2013 <p>Each iteration, yields a tuple of (address_just_executed, instruction_size).</p> </li> <li> <code>int</code> \u2013 <p>Returns (None, None) upon failure to execute the instruction</p> </li> </ul>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.single_step_iter","title":"single_step_iter","text":"<pre><code>single_step_iter(pc=None)\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.single_step_hook_code","title":"single_step_hook_code","text":"<pre><code>single_step_hook_code(\n _uc, address: int, instruction_size: int, _user_data\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.dumpregs","title":"dumpregs","text":"<pre><code>dumpregs() -> None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.trace_hook","title":"trace_hook","text":"<pre><code>trace_hook(_uc, address, instruction_size: int, _user_data) -> None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.parse_consts","title":"parse_consts","text":"<pre><code>parse_consts(u_consts) -> dict[str, int]\n</code></pre> <p>Unicorn \"consts\" is a python module consisting of a variable definition for each known entity. We repack it here as a dict for performance.</p> <p>Maps \"UC_*\" -> integer value of the constant</p>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.create_reg_to_const_map","title":"create_reg_to_const_map","text":"<pre><code>create_reg_to_const_map(\n base_consts: dict[str, int], additional_mapping: dict[str, int] = None\n) -> dict[str, int]\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.debug","title":"debug","text":"<pre><code>debug(debug_type, fmt, args=()) -> None\n</code></pre>"},{"location":"reference/pwndbg/enhance/","title":"pwndbg.enhance","text":""},{"location":"reference/pwndbg/enhance/#pwndbg.enhance","title":"enhance","text":"<p>Given an address in memory which does not contain a pointer elsewhere into memory, attempt to describe the data as best as possible.</p> <p>Currently prints out code, integers, or strings, in a best-effort manner dependent on page permissions, the contents of the data, and any supplemental information sources (e.g. active IDA Pro connection).</p> <p>Functions:</p> <ul> <li> <code>format_small_int</code> \u2013 </li> <li> <code>format_small_int_pair</code> \u2013 </li> <li> <code>int_str</code> \u2013 </li> <li> <code>enhance</code> \u2013 <p>Given the last pointer in a chain, attempt to characterize</p> </li> </ul>"},{"location":"reference/pwndbg/enhance/#pwndbg.enhance.format_small_int","title":"format_small_int","text":"<pre><code>format_small_int(value: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/enhance/#pwndbg.enhance.format_small_int_pair","title":"format_small_int_pair","text":"<pre><code>format_small_int_pair(first: int, second: int) -> tuple[str, str]\n</code></pre>"},{"location":"reference/pwndbg/enhance/#pwndbg.enhance.int_str","title":"int_str","text":"<pre><code>int_str(value: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/enhance/#pwndbg.enhance.enhance","title":"enhance","text":"<pre><code>enhance(\n value: int,\n code: bool = True,\n safe_linking: bool = False,\n attempt_dereference=True,\n enhance_string_len: int = None,\n) -> str\n</code></pre> <p>Given the last pointer in a chain, attempt to characterize</p> <p>Note that 'the last pointer in a chain' may not at all actually be a pointer.</p> <p>Additionally, optimizations are made based on various sources of data for 'value'. For example, if it is set to RWX, we try to get information on whether it resides on the stack, or in a RW section that happens to be RWX, to determine which order to print the fields.</p> <p>Parameters:</p> <ul> <li> <code>value</code> (<code>int</code>) \u2013 <p>Value to enhance</p> </li> <li> <code>code</code> (<code>bool</code>, default: <code>True</code> ) \u2013 <p>Hint that indicates the value may be an instruction</p> </li> <li> <code>safe_linking</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>Whether this chain use safe-linking</p> </li> <li> <code>enhance_string_len</code> (<code>int</code>, default: <code>None</code> ) \u2013 <p>The length of string to display for enhancement of the last pointer</p> </li> </ul>"},{"location":"reference/pwndbg/exception/","title":"pwndbg.exception","text":""},{"location":"reference/pwndbg/exception/#pwndbg.exception","title":"exception","text":"<p>Functions:</p> <ul> <li> <code>print_exception</code> \u2013 </li> <li> <code>inform_unmet_dependencies</code> \u2013 <p>Informs user about unmet dependencies</p> </li> <li> <code>inform_report_issue</code> \u2013 <p>Informs user that he can report an issue.</p> </li> <li> <code>inform_verbose_and_debug</code> \u2013 </li> <li> <code>handle</code> \u2013 <p>Displays an exception to the user, optionally displaying a full traceback</p> </li> <li> <code>set_trace</code> \u2013 <p>Enable sane debugging in Pwndbg by switching to the \"real\" stdio.</p> </li> <li> <code>update</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>verbose</code> \u2013 </li> <li> <code>debug</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.verbose","title":"verbose <code>module-attribute</code>","text":"<pre><code>verbose = add_param(\n \"exception-verbose\",\n False,\n \"print a full stacktrace for exceptions raised in pwndbg commands\",\n)\n</code></pre>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.debug","title":"debug <code>module-attribute</code>","text":"<pre><code>debug = add_param(\n \"exception-debugger\",\n False,\n \"whether to debug exceptions raised in Pwndbg commands\",\n)\n</code></pre>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.print_exception","title":"print_exception","text":"<pre><code>print_exception(exception_msg) -> None\n</code></pre>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.inform_unmet_dependencies","title":"inform_unmet_dependencies","text":"<pre><code>inform_unmet_dependencies(errors) -> None\n</code></pre> <p>Informs user about unmet dependencies</p>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.inform_report_issue","title":"inform_report_issue","text":"<pre><code>inform_report_issue(exception_msg) -> None\n</code></pre> <p>Informs user that he can report an issue. The use of caching makes it reporting only once for a given exception message.</p>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.inform_verbose_and_debug","title":"inform_verbose_and_debug","text":"<pre><code>inform_verbose_and_debug() -> None\n</code></pre>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.handle","title":"handle","text":"<pre><code>handle(name='Error')\n</code></pre> <p>Displays an exception to the user, optionally displaying a full traceback and spawning an interactive post-moretem debugger.</p> Notes <ul> <li><code>set exception-verbose on</code> enables stack traces.</li> <li><code>set exception-debugger on</code> enables the post-mortem debugger.</li> </ul>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.set_trace","title":"set_trace","text":"<pre><code>set_trace() -> None\n</code></pre> <p>Enable sane debugging in Pwndbg by switching to the \"real\" stdio.</p>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.update","title":"update","text":"<pre><code>update() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/","title":"pwndbg.gdblib","text":""},{"location":"reference/pwndbg/gdblib/#pwndbg.gdblib","title":"gdblib","text":"<p>Modules:</p> <ul> <li> <code>bpoint</code> \u2013 </li> <li> <code>config</code> \u2013 <p>Dynamic configuration system for pwndbg, using GDB's built-in Parameter</p> </li> <li> <code>events</code> \u2013 <p>Enables callbacks into functions to be automatically invoked</p> </li> <li> <code>functions</code> \u2013 <p>Put all functions defined for gdb in here.</p> </li> <li> <code>got</code> \u2013 <p>Global Offset Table Tracker</p> </li> <li> <code>hooks</code> \u2013 </li> <li> <code>info</code> \u2013 <p>Runs a few useful commands which are available under \"info\".</p> </li> <li> <code>prompt</code> \u2013 </li> <li> <code>ptmalloc2_tracking</code> \u2013 <p>Heap Tracking</p> </li> <li> <code>scheduler</code> \u2013 </li> <li> <code>shellcode</code> \u2013 <p>Shellcode</p> </li> <li> <code>symbol</code> \u2013 <p>Looking up addresses for function names / symbols, and</p> </li> <li> <code>tui</code> \u2013 </li> <li> <code>vmmap</code> \u2013 <p>Routines to enumerate mapped memory, and attempt to associate</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>load_gdblib</code> \u2013 <p>Import all gdblib modules that need to run code on import</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>regs</code> \u2013 </li> <li> <code>__all__</code> \u2013 </li> <li> <code>gdb_version</code> \u2013 </li> <li> <code>msg</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/#pwndbg.gdblib.regs","title":"regs <code>module-attribute</code>","text":"<pre><code>regs = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/#pwndbg.gdblib.__all__","title":"__all__ <code>module-attribute</code>","text":"<pre><code>__all__ = ()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/#pwndbg.gdblib.gdb_version","title":"gdb_version <code>module-attribute</code>","text":"<pre><code>gdb_version = tuple(map(int, groups()))\n</code></pre>"},{"location":"reference/pwndbg/gdblib/#pwndbg.gdblib.msg","title":"msg <code>module-attribute</code>","text":"<pre><code>msg = 'Unsupported GDB version, pwndbg only support GDB12+'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/#pwndbg.gdblib.load_gdblib","title":"load_gdblib","text":"<pre><code>load_gdblib() -> None\n</code></pre> <p>Import all gdblib modules that need to run code on import</p>"},{"location":"reference/pwndbg/gdblib/bpoint/","title":"pwndbg.gdblib.bpoint","text":""},{"location":"reference/pwndbg/gdblib/bpoint/#pwndbg.gdblib.bpoint","title":"bpoint","text":"<p>Classes:</p> <ul> <li> <code>Breakpoint</code> \u2013 <p>Breakpoint class, similar to gdb.Breakpoint, but clears the caches</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/bpoint/#pwndbg.gdblib.bpoint.Breakpoint","title":"Breakpoint","text":"<p> Bases: <code>Breakpoint</code></p> <p>Breakpoint class, similar to gdb.Breakpoint, but clears the caches associated with the stop event before determining whether it should stop the inferior or not.</p> <p>Unlike gdb.Breakpoint, users of this class should override <code>should_stop()</code>, instead of <code>stop()</code>, as the latter is used to do cache invalidation.</p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> <li> <code>should_stop</code> \u2013 <p>This function is called whenever this breakpoint is hit in the code and</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/bpoint/#pwndbg.gdblib.bpoint.Breakpoint.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/bpoint/#pwndbg.gdblib.bpoint.Breakpoint.should_stop","title":"should_stop","text":"<pre><code>should_stop() -> bool\n</code></pre> <p>This function is called whenever this breakpoint is hit in the code and its return value determines whether the inferior will be stopped.</p>"},{"location":"reference/pwndbg/gdblib/config/","title":"pwndbg.gdblib.config","text":""},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config","title":"config","text":"<p>Dynamic configuration system for pwndbg, using GDB's built-in Parameter mechanism.</p> <p>To create a new pwndbg configuration point, call <code>pwndbg.config.add_param</code>.</p> <p>Parameters should be declared in the module in which they are primarily used, or in this module for general-purpose parameters.</p> <p>All pwndbg Parameter types are accessible via property access on this module, for example:</p> <pre><code>>>> pwndbg.config.add_param('example-value', 7, 'an example')\n>>> int(pwndbg.config.example_value)\n7\n</code></pre> <p>Classes:</p> <ul> <li> <code>Parameter</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>init_params</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>CLASS_MAPPING</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.CLASS_MAPPING","title":"CLASS_MAPPING <code>module-attribute</code>","text":"<pre><code>CLASS_MAPPING = {\n PARAM_BOOLEAN: PARAM_BOOLEAN,\n PARAM_AUTO_BOOLEAN: PARAM_AUTO_BOOLEAN,\n PARAM_ZINTEGER: PARAM_ZINTEGER,\n PARAM_STRING: PARAM_STRING,\n PARAM_ZUINTEGER: PARAM_ZUINTEGER,\n PARAM_ENUM: PARAM_ENUM,\n PARAM_OPTIONAL_FILENAME: PARAM_OPTIONAL_FILENAME,\n PARAM_ZUINTEGER_UNLIMITED: PARAM_ZUINTEGER_UNLIMITED,\n PARAM_INTEGER: PARAM_INTEGER,\n PARAM_UINTEGER: PARAM_UINTEGER,\n}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter","title":"Parameter","text":"<pre><code>Parameter(param: Parameter)\n</code></pre> <p> Bases: <code>Parameter</code></p> <p>Methods:</p> <ul> <li> <code>init_super</code> \u2013 <p>Initializes the super class for GDB >= 9</p> </li> <li> <code>on_change</code> \u2013 <p>Called when the value of the pwndbg.lib.config.Parameter changes</p> </li> <li> <code>get_set_string</code> \u2013 <p>Handles the GDB <code>set <param></code></p> </li> <li> <code>get_show_string</code> \u2013 <p>Handles the GDB <code>show <param></code></p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>set_doc</code> \u2013 </li> <li> <code>show_doc</code> \u2013 </li> <li> <code>__doc__</code> \u2013 </li> <li> <code>param</code> \u2013 </li> <li> <code>value</code> \u2013 </li> <li> <code>native_value</code> \u2013 </li> <li> <code>native_default</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.set_doc","title":"set_doc <code>instance-attribute</code>","text":"<pre><code>set_doc = 'Set ' + set_show_doc + '.'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.show_doc","title":"show_doc <code>instance-attribute</code>","text":"<pre><code>show_doc = 'Show ' + set_show_doc + '.'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.__doc__","title":"__doc__ <code>instance-attribute</code>","text":"<pre><code>__doc__ = help_docstring or None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.param","title":"param <code>instance-attribute</code>","text":"<pre><code>param = param\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.value","title":"value <code>instance-attribute</code>","text":"<pre><code>value = value\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.native_value","title":"native_value <code>property</code>","text":"<pre><code>native_value\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.native_default","title":"native_default <code>property</code>","text":"<pre><code>native_default\n</code></pre>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.init_super","title":"init_super","text":"<pre><code>init_super(param: Parameter) -> None\n</code></pre> <p>Initializes the super class for GDB >= 9</p>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.on_change","title":"on_change","text":"<pre><code>on_change(value: Any) -> None\n</code></pre> <p>Called when the value of the pwndbg.lib.config.Parameter changes Transfer the value to the GDB parameter to keep them in sync.</p>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.get_set_string","title":"get_set_string","text":"<pre><code>get_set_string() -> str\n</code></pre> <p>Handles the GDB <code>set <param></code></p>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.get_show_string","title":"get_show_string","text":"<pre><code>get_show_string(svalue: str) -> str\n</code></pre> <p>Handles the GDB <code>show <param></code></p>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.init_params","title":"init_params","text":"<pre><code>init_params() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/","title":"pwndbg.gdblib.events","text":""},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events","title":"events","text":"<p>Enables callbacks into functions to be automatically invoked when various events occur to the debuggee (e.g. STOP on SIGINT) by using a decorator.</p> <p>Classes:</p> <ul> <li> <code>StartEvent</code> \u2013 </li> <li> <code>HandlerPriority</code> \u2013 <p>A priority level for an event handler, ordered from highest to lowest priority.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>wrap_safe_event_handler</code> \u2013 <p>Wraps an event handler to ensure it is only executed when the event is safe.</p> </li> <li> <code>pause</code> \u2013 </li> <li> <code>unpause</code> \u2013 </li> <li> <code>connect</code> \u2013 </li> <li> <code>exit</code> \u2013 </li> <li> <code>cont</code> \u2013 </li> <li> <code>new_objfile</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> <li> <code>start</code> \u2013 </li> <li> <code>thread</code> \u2013 </li> <li> <code>before_prompt</code> \u2013 </li> <li> <code>reg_changed</code> \u2013 </li> <li> <code>mem_changed</code> \u2013 </li> <li> <code>log_objfiles</code> \u2013 </li> <li> <code>invoke_event</code> \u2013 </li> <li> <code>after_reload</code> \u2013 </li> <li> <code>on_reload</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>debug</code> \u2013 </li> <li> <code>gdb_workaround_stop_event</code> \u2013 </li> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>queued_events</code> (<code>Deque[Callable[..., Any]]</code>) \u2013 </li> <li> <code>executing_event</code> \u2013 </li> <li> <code>registered</code> (<code>dict[Any, dict[HandlerPriority, list[Callable[..., Any]]]]</code>) \u2013 </li> <li> <code>connected</code> \u2013 </li> <li> <code>paused</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.debug","title":"debug <code>module-attribute</code>","text":"<pre><code>debug = add_param(\n \"debug-events\", False, \"display internal event debugging info\"\n)\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.gdb_workaround_stop_event","title":"gdb_workaround_stop_event <code>module-attribute</code>","text":"<pre><code>gdb_workaround_stop_event = add_param(\n \"gdb-workaround-stop-event\",\n 0,\n \"asynchronous stop events to improve 'commands' functionality.\",\n help_docstring=\"\\nNote: This may cause unexpected behavior with pwndbg or gdb.execute.\\n\\nValues:\\n0 - Disable the workaround (default).\\n1 - Enable asynchronous stop events; gdb.execute may behave unexpectedly(asynchronously).\\n2 - Disable only deadlock detection; deadlocks may still occur.\\n \",\n)\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.queued_events","title":"queued_events <code>module-attribute</code>","text":"<pre><code>queued_events: Deque[Callable[..., Any]] = deque()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.executing_event","title":"executing_event <code>module-attribute</code>","text":"<pre><code>executing_event = False\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.registered","title":"registered <code>module-attribute</code>","text":"<pre><code>registered: dict[Any, dict[HandlerPriority, list[Callable[..., Any]]]] = {\n exited: {},\n cont: {},\n new_objfile: {},\n stop: {},\n start: {},\n new_thread: {},\n before_prompt: {},\n memory_changed: {},\n register_changed: {},\n}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.connected","title":"connected <code>module-attribute</code>","text":"<pre><code>connected = {}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.paused","title":"paused <code>module-attribute</code>","text":"<pre><code>paused = defaultdict(bool)\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent","title":"StartEvent","text":"<pre><code>StartEvent()\n</code></pre> <p>Methods:</p> <ul> <li> <code>connect</code> \u2013 </li> <li> <code>disconnect</code> \u2013 </li> <li> <code>on_new_objfile</code> \u2013 </li> <li> <code>on_exited</code> \u2013 </li> <li> <code>on_stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>registered</code> (<code>list[Callable[..., Any]]</code>) \u2013 </li> <li> <code>running</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.registered","title":"registered <code>instance-attribute</code>","text":"<pre><code>registered: list[Callable[..., Any]] = []\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.running","title":"running <code>instance-attribute</code>","text":"<pre><code>running = False\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.connect","title":"connect","text":"<pre><code>connect(function: Callable[..., Any]) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.disconnect","title":"disconnect","text":"<pre><code>disconnect(function: Callable[..., Any]) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.on_new_objfile","title":"on_new_objfile","text":"<pre><code>on_new_objfile() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.on_exited","title":"on_exited","text":"<pre><code>on_exited() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.on_stop","title":"on_stop","text":"<pre><code>on_stop() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.HandlerPriority","title":"HandlerPriority","text":"<p> Bases: <code>Enum</code></p> <p>A priority level for an event handler, ordered from highest to lowest priority.</p> <p>Attributes:</p> <ul> <li> <code>CACHE_CLEAR</code> \u2013 </li> <li> <code>LOW</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.HandlerPriority.CACHE_CLEAR","title":"CACHE_CLEAR <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>CACHE_CLEAR = auto()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.HandlerPriority.LOW","title":"LOW <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>LOW = auto()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.wrap_safe_event_handler","title":"wrap_safe_event_handler","text":"<pre><code>wrap_safe_event_handler(\n event_handler: Callable[P, T], event_type: Any\n) -> Callable[P, T]\n</code></pre> <p>Wraps an event handler to ensure it is only executed when the event is safe. Invalid events are queued and executed later when safe.</p> <p>Note: Avoid using <code>gdb.post_event</code> because of another bug in gdbserver where the <code>gdb.newest_frame</code> function may not work properly.</p> <p>Workaround to fix bug in gdbserver (gdb.events.new_objfile): #2576 Workaround to fix bug in gdb (gdb.events.stop): #425</p>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.pause","title":"pause","text":"<pre><code>pause(event_registry) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.unpause","title":"unpause","text":"<pre><code>unpause(event_registry) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.connect","title":"connect","text":"<pre><code>connect(\n func: Callable[[], T],\n event_handler: Any,\n name: str = \"\",\n priority: HandlerPriority = LOW,\n) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.exit","title":"exit","text":"<pre><code>exit(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.cont","title":"cont","text":"<pre><code>cont(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.new_objfile","title":"new_objfile","text":"<pre><code>new_objfile(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.stop","title":"stop","text":"<pre><code>stop(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.start","title":"start","text":"<pre><code>start(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.thread","title":"thread","text":"<pre><code>thread(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.before_prompt","title":"before_prompt","text":"<pre><code>before_prompt(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.reg_changed","title":"reg_changed","text":"<pre><code>reg_changed(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.mem_changed","title":"mem_changed","text":"<pre><code>mem_changed(func: Callable[[], T], **kwargs: Any) -> Callable[[], T]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.log_objfiles","title":"log_objfiles","text":"<pre><code>log_objfiles(ofile: NewObjFileEvent | None = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.invoke_event","title":"invoke_event","text":"<pre><code>invoke_event(event: Any, *args: Any, **kwargs: Any) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.after_reload","title":"after_reload","text":"<pre><code>after_reload(fire_start: bool = True) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.on_reload","title":"on_reload","text":"<pre><code>on_reload() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/functions/","title":"pwndbg.gdblib.functions","text":""},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions","title":"functions","text":"<p>Put all functions defined for gdb in here.</p> <p>This file might be changed into a module in the future.</p> <p>Functions:</p> <ul> <li> <code>GdbFunction</code> \u2013 </li> <li> <code>rebase</code> \u2013 <p>Return rebased address.</p> </li> <li> <code>base</code> \u2013 <p>Return base address of the first memory mapping containing the given name.</p> </li> <li> <code>hex2ptr</code> \u2013 <p>Converts a hex string to a little-endian address and returns the address.</p> </li> <li> <code>argv</code> \u2013 <p>Evaluate argv on the supplied value.</p> </li> <li> <code>envp</code> \u2013 <p>Evaluate envp on the supplied value.</p> </li> <li> <code>argc</code> \u2013 <p>Evaluates to argc.</p> </li> <li> <code>environ</code> \u2013 <p>Evaluate getenv() on the supplied value.</p> </li> <li> <code>dbg_value_to_gdb</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>functions</code> (<code>list[_GdbFunction]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.functions","title":"functions <code>module-attribute</code>","text":"<pre><code>functions: list[_GdbFunction] = []\n</code></pre>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.GdbFunction","title":"GdbFunction","text":"<pre><code>GdbFunction(only_when_running: bool = False) -> Callable[..., Any]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.rebase","title":"rebase","text":"<pre><code>rebase(addr: int | Value) -> int\n</code></pre> <p>Return rebased address.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.base","title":"base","text":"<pre><code>base(name_pattern: str | Value) -> int\n</code></pre> <p>Return base address of the first memory mapping containing the given name.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.hex2ptr","title":"hex2ptr","text":"<pre><code>hex2ptr(hex_string: str | Value) -> int\n</code></pre> <p>Converts a hex string to a little-endian address and returns the address. Example usage: $hex2ptr(\"00 70 75 c1 cd ef 59 00\")</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.argv","title":"argv","text":"<pre><code>argv(number_value: Value) -> Value\n</code></pre> <p>Evaluate argv on the supplied value.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.envp","title":"envp","text":"<pre><code>envp(number_value: Value) -> Value\n</code></pre> <p>Evaluate envp on the supplied value.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.argc","title":"argc","text":"<pre><code>argc(*args) -> int\n</code></pre> <p>Evaluates to argc.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.environ","title":"environ","text":"<pre><code>environ(name_value: Value) -> Value\n</code></pre> <p>Evaluate getenv() on the supplied value.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.dbg_value_to_gdb","title":"dbg_value_to_gdb","text":"<pre><code>dbg_value_to_gdb(d: Value) -> Value\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/","title":"pwndbg.gdblib.got","text":""},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got","title":"got","text":"<p>Global Offset Table Tracker</p> <p>Subsystem for tracking accesses to external function calls made through pointers in an inferior's Global Offset Table, such as those made by the stubs in the Procedure Linkage Table.</p> <p>Currently, it does this by attatching watchpoints to the entries in the GOT and taking note of where the call came from, but it could be done much faster by injecting our own code into the program space to track this.</p> <p>Classes:</p> <ul> <li> <code>RelocTypes</code> \u2013 <p>This class contains all the relocation type constants so that one may</p> </li> <li> <code>TrapAllocator</code> \u2013 <p>Utility that allocates and manages executable addresses in the space of the</p> </li> <li> <code>Patcher</code> \u2013 <p>Watches for changes made by program code to the GOT and fixes them up.</p> </li> <li> <code>Tracker</code> \u2013 <p>Class that tracks the accesses made to the entries in the GOT.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>is_mmap_error</code> \u2013 <p>Checks whether the return value of an mmap of indicates an error.</p> </li> <li> <code>display_name</code> \u2013 <p>Return the display name for a symbol or objfile.</p> </li> <li> <code>all_tracked_entries</code> \u2013 <p>Return an iterator over all of the GOT whose accesses are being tracked.</p> </li> <li> <code>tracked_entry_by_address</code> \u2013 <p>Return the tracker associated with the entry at the given address, if any.</p> </li> <li> <code>enable_got_call_tracking</code> \u2013 <p>Enable the analysis of calls made through the GOT.</p> </li> <li> <code>disable_got_call_tracking</code> \u2013 <p>Disable the analysis of calls made through the GOT.</p> </li> <li> <code>jump_slots_for</code> \u2013 <p>Returns the jump slot addresses described by the given dynamic section.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>JUMP_SLOTS</code> \u2013 </li> <li> <code>IRELATIVE_SLOTS</code> \u2013 </li> <li> <code>TRAP_ALLOCATOR</code> \u2013 </li> <li> <code>GOT_TRACKING</code> \u2013 </li> <li> <code>INSTALLED_WATCHPOINTS</code> (<code>dict[int, tuple[Tracker, Patcher]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.JUMP_SLOTS","title":"JUMP_SLOTS <code>module-attribute</code>","text":"<pre><code>JUMP_SLOTS = {\n \"x86-64\": {R_X86_64_JUMP_SLOT},\n \"i386\": {R_386_JMP_SLOT},\n \"aarch64\": {R_AARCH64_JUMP_SLOT},\n \"mips\": {R_MIPS_JUMP_SLOT},\n \"powerpc\": {R_PPC_JMP_SLOT},\n \"sparc\": {R_SPARC_JMP_SLOT},\n \"arm\": {R_ARM_JUMP_SLOT},\n \"armcm\": {R_ARM_JUMP_SLOT},\n \"rv32\": {R_RISCV_JUMP_SLOT},\n \"rv64\": {R_RISCV_JUMP_SLOT},\n}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.IRELATIVE_SLOTS","title":"IRELATIVE_SLOTS <code>module-attribute</code>","text":"<pre><code>IRELATIVE_SLOTS = {\n \"x86-64\": {R_X86_64_IRELATIVE},\n \"i386\": {R_386_IRELATIVE},\n \"aarch64\": {R_AARCH64_P32_IRELATIVE, R_AARCH64_IRELATIVE},\n \"mips\": set(),\n \"powerpc\": {R_PPC_IRELATIVE},\n \"sparc\": {R_SPARC_IRELATIVE},\n \"arm\": {R_ARM_IRELATIVE},\n \"armcm\": {R_ARM_IRELATIVE},\n \"rv32\": {R_RISCV_IRELATIVE},\n \"rv64\": {R_RISCV_IRELATIVE},\n}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.TRAP_ALLOCATOR","title":"TRAP_ALLOCATOR <code>module-attribute</code>","text":"<pre><code>TRAP_ALLOCATOR = TrapAllocator()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.GOT_TRACKING","title":"GOT_TRACKING <code>module-attribute</code>","text":"<pre><code>GOT_TRACKING = False\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.INSTALLED_WATCHPOINTS","title":"INSTALLED_WATCHPOINTS <code>module-attribute</code>","text":"<pre><code>INSTALLED_WATCHPOINTS: dict[int, tuple[Tracker, Patcher]] = {}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes","title":"RelocTypes","text":"<p>This class contains all the relocation type constants so that one may interpret the relocations types present in the DYNAMIC segment. These constants are defined in each of the processors' SystemV R4 psABI document, or equivalent, and should stay the same across all implementations of libc on systems that adhere to that ABI, such as Linux.</p> <p>Most of these were sourced from GLibc, which conveniently lists all of the relocations types in a single file1.</p> <p>Attributes:</p> <ul> <li> <code>R_RISCV_JUMP_SLOT</code> \u2013 </li> <li> <code>R_X86_64_JUMP_SLOT</code> \u2013 </li> <li> <code>R_386_JMP_SLOT</code> \u2013 </li> <li> <code>R_CRIS_JUMP_SLOT</code> \u2013 </li> <li> <code>R_390_JMP_SLOT</code> \u2013 </li> <li> <code>R_CKCORE_JUMP_SLOT</code> \u2013 </li> <li> <code>R_TILEPRO_JMP_SLOT</code> \u2013 </li> <li> <code>R_MICROBLAZE_JUMP_SLOT</code> \u2013 </li> <li> <code>R_TILEGX_JMP_SLOT</code> \u2013 </li> <li> <code>R_OR1K_JMP_SLOT</code> \u2013 </li> <li> <code>R_68K_JMP_SLOT</code> \u2013 </li> <li> <code>R_SPARC_JMP_SLOT</code> \u2013 </li> <li> <code>R_PPC_JMP_SLOT</code> \u2013 </li> <li> <code>R_PPC64_JMP_SLOT</code> \u2013 </li> <li> <code>R_ARM_JUMP_SLOT</code> \u2013 </li> <li> <code>R_MN10300_JMP_SLOT</code> \u2013 </li> <li> <code>R_ALPHA_JMP_SLOT</code> \u2013 </li> <li> <code>R_NIOS2_JUMP_SLOT</code> \u2013 </li> <li> <code>R_NDS32_JMP_SLOT</code> \u2013 </li> <li> <code>R_METAG_JMP_SLOT</code> \u2013 </li> <li> <code>R_M32R_JMP_SLOT</code> \u2013 </li> <li> <code>R_ARC_JMP_SLOT</code> \u2013 </li> <li> <code>R_MIPS_JUMP_SLOT</code> \u2013 </li> <li> <code>R_SH_JMP_SLOT</code> \u2013 </li> <li> <code>R_AARCH64_JUMP_SLOT</code> \u2013 </li> <li> <code>R_X86_64_IRELATIVE</code> \u2013 </li> <li> <code>R_386_IRELATIVE</code> \u2013 </li> <li> <code>R_RISCV_IRELATIVE</code> \u2013 </li> <li> <code>R_390_IRELATIVE</code> \u2013 </li> <li> <code>R_ARM_IRELATIVE</code> \u2013 </li> <li> <code>R_AARCH64_P32_IRELATIVE</code> \u2013 </li> <li> <code>R_PPC_IRELATIVE</code> \u2013 </li> <li> <code>R_PPC64_IRELATIVE</code> \u2013 </li> <li> <code>R_SPARC_IRELATIVE</code> \u2013 </li> <li> <code>R_AARCH64_IRELATIVE</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_RISCV_JUMP_SLOT","title":"R_RISCV_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_RISCV_JUMP_SLOT = 5\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_X86_64_JUMP_SLOT","title":"R_X86_64_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_X86_64_JUMP_SLOT = 7\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_386_JMP_SLOT","title":"R_386_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_386_JMP_SLOT = 7\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_CRIS_JUMP_SLOT","title":"R_CRIS_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_CRIS_JUMP_SLOT = 11\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_390_JMP_SLOT","title":"R_390_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_390_JMP_SLOT = 11\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_CKCORE_JUMP_SLOT","title":"R_CKCORE_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_CKCORE_JUMP_SLOT = 12\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_TILEPRO_JMP_SLOT","title":"R_TILEPRO_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_TILEPRO_JMP_SLOT = 12\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_MICROBLAZE_JUMP_SLOT","title":"R_MICROBLAZE_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_MICROBLAZE_JUMP_SLOT = 17\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_TILEGX_JMP_SLOT","title":"R_TILEGX_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_TILEGX_JMP_SLOT = 18\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_OR1K_JMP_SLOT","title":"R_OR1K_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_OR1K_JMP_SLOT = 20\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_68K_JMP_SLOT","title":"R_68K_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_68K_JMP_SLOT = 21\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_SPARC_JMP_SLOT","title":"R_SPARC_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_SPARC_JMP_SLOT = 21\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_PPC_JMP_SLOT","title":"R_PPC_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_PPC_JMP_SLOT = 21\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_PPC64_JMP_SLOT","title":"R_PPC64_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_PPC64_JMP_SLOT = 21\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_ARM_JUMP_SLOT","title":"R_ARM_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_ARM_JUMP_SLOT = 22\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_MN10300_JMP_SLOT","title":"R_MN10300_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_MN10300_JMP_SLOT = 22\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_ALPHA_JMP_SLOT","title":"R_ALPHA_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_ALPHA_JMP_SLOT = 26\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_NIOS2_JUMP_SLOT","title":"R_NIOS2_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_NIOS2_JUMP_SLOT = 38\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_NDS32_JMP_SLOT","title":"R_NDS32_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_NDS32_JMP_SLOT = 41\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_METAG_JMP_SLOT","title":"R_METAG_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_METAG_JMP_SLOT = 44\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_M32R_JMP_SLOT","title":"R_M32R_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_M32R_JMP_SLOT = 52\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_ARC_JMP_SLOT","title":"R_ARC_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_ARC_JMP_SLOT = 55\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_MIPS_JUMP_SLOT","title":"R_MIPS_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_MIPS_JUMP_SLOT = 127\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_SH_JMP_SLOT","title":"R_SH_JMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_SH_JMP_SLOT = 164\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_AARCH64_JUMP_SLOT","title":"R_AARCH64_JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_AARCH64_JUMP_SLOT = 1026\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_X86_64_IRELATIVE","title":"R_X86_64_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_X86_64_IRELATIVE = 37\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_386_IRELATIVE","title":"R_386_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_386_IRELATIVE = 42\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_RISCV_IRELATIVE","title":"R_RISCV_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_RISCV_IRELATIVE = 58\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_390_IRELATIVE","title":"R_390_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_390_IRELATIVE = 61\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_ARM_IRELATIVE","title":"R_ARM_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_ARM_IRELATIVE = 160\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_AARCH64_P32_IRELATIVE","title":"R_AARCH64_P32_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_AARCH64_P32_IRELATIVE = 188\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_PPC_IRELATIVE","title":"R_PPC_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_PPC_IRELATIVE = 248\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_PPC64_IRELATIVE","title":"R_PPC64_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_PPC64_IRELATIVE = 248\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_SPARC_IRELATIVE","title":"R_SPARC_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_SPARC_IRELATIVE = 249\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.RelocTypes.R_AARCH64_IRELATIVE","title":"R_AARCH64_IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>R_AARCH64_IRELATIVE = 1032\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.TrapAllocator","title":"TrapAllocator","text":"<pre><code>TrapAllocator()\n</code></pre> <p>Utility that allocates and manages executable addresses in the space of the executing program that we can trap.</p> <p>Methods:</p> <ul> <li> <code>alloc</code> \u2013 <p>Allocates a new address to where program execution can be diverted.</p> </li> <li> <code>free</code> \u2013 <p>Indicates that an address obtained from alloc() can be recycled.</p> </li> <li> <code>clear</code> \u2013 <p>Deletes all memory mappings and frees all addresses.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>block_capacity</code> \u2013 </li> <li> <code>slot_size</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.TrapAllocator.block_capacity","title":"block_capacity <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>block_capacity = 4096\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.TrapAllocator.slot_size","title":"slot_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>slot_size = 8\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.TrapAllocator.alloc","title":"alloc","text":"<pre><code>alloc()\n</code></pre> <p>Allocates a new address to where program execution can be diverted.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.TrapAllocator.free","title":"free","text":"<pre><code>free(address) -> None\n</code></pre> <p>Indicates that an address obtained from alloc() can be recycled.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.TrapAllocator.clear","title":"clear","text":"<pre><code>clear()\n</code></pre> <p>Deletes all memory mappings and frees all addresses.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher","title":"Patcher","text":"<pre><code>Patcher(entry, tracker)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Watches for changes made by program code to the GOT and fixes them up.</p> <p>This class is paired with Tracker, and instances of both classes always function together.</p> <p>Methods:</p> <ul> <li> <code>should_stop</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>silent</code> \u2013 </li> <li> <code>entry</code> \u2013 </li> <li> <code>tracker</code> \u2013 </li> <li> <code>init</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher.silent","title":"silent <code>instance-attribute</code>","text":"<pre><code>silent = True\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher.entry","title":"entry <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>entry = entry\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher.tracker","title":"tracker <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher.init","title":"init <code>instance-attribute</code>","text":"<pre><code>init = True\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher.should_stop","title":"should_stop","text":"<pre><code>should_stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker","title":"Tracker","text":"<pre><code>Tracker()\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Class that tracks the accesses made to the entries in the GOT.</p> <p>This class is paired with Patcher, and instances of both classes always function together.</p> <p>Methods:</p> <ul> <li> <code>delete</code> \u2013 </li> <li> <code>should_stop</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>total_hits</code> \u2013 </li> <li> <code>target</code> \u2013 </li> <li> <code>dynamic_section</code> \u2013 </li> <li> <code>relocation_fn</code> \u2013 </li> <li> <code>relocation_index</code> \u2013 </li> <li> <code>link_map_entry</code> \u2013 </li> <li> <code>trapped_address</code> \u2013 </li> <li> <code>hits</code> (<code>dict[tuple[int, ...], int]</code>) \u2013 </li> <li> <code>silent</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.total_hits","title":"total_hits <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>total_hits = 0\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.target","title":"target <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>target = 0\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.dynamic_section","title":"dynamic_section <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>dynamic_section = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.relocation_fn","title":"relocation_fn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>relocation_fn = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.relocation_index","title":"relocation_index <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>relocation_index = 0\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.link_map_entry","title":"link_map_entry <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>link_map_entry = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.trapped_address","title":"trapped_address <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>trapped_address = alloc()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.hits","title":"hits <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>hits: dict[tuple[int, ...], int] = {}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.silent","title":"silent <code>instance-attribute</code>","text":"<pre><code>silent = True\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.delete","title":"delete","text":"<pre><code>delete() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.should_stop","title":"should_stop","text":"<pre><code>should_stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.is_mmap_error","title":"is_mmap_error","text":"<pre><code>is_mmap_error(ptr: int)\n</code></pre> <p>Checks whether the return value of an mmap of indicates an error.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.display_name","title":"display_name","text":"<pre><code>display_name(name, basename=False)\n</code></pre> <p>Return the display name for a symbol or objfile.</p> <p>Ideally, we'd like to display all of the names of the symbols as text, but there is really nothing stopping symbol names from being stored in some fairly wacky encoding or really from having names that aren't text at all.</p> <p>We should try our best to turn whatever the symbol name is into text, but not so much that non-text entries or entries in unknown encodings become unrecognizable.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.all_tracked_entries","title":"all_tracked_entries","text":"<pre><code>all_tracked_entries()\n</code></pre> <p>Return an iterator over all of the GOT whose accesses are being tracked.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.tracked_entry_by_address","title":"tracked_entry_by_address","text":"<pre><code>tracked_entry_by_address(address)\n</code></pre> <p>Return the tracker associated with the entry at the given address, if any.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.enable_got_call_tracking","title":"enable_got_call_tracking","text":"<pre><code>enable_got_call_tracking(disable_hardware_whatchpoints=True) -> None\n</code></pre> <p>Enable the analysis of calls made through the GOT.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.disable_got_call_tracking","title":"disable_got_call_tracking","text":"<pre><code>disable_got_call_tracking() -> None\n</code></pre> <p>Disable the analysis of calls made through the GOT.</p>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.jump_slots_for","title":"jump_slots_for","text":"<pre><code>jump_slots_for(dynamic)\n</code></pre> <p>Returns the jump slot addresses described by the given dynamic section.</p>"},{"location":"reference/pwndbg/gdblib/hooks/","title":"pwndbg.gdblib.hooks","text":""},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks","title":"hooks","text":"<p>Functions:</p> <ul> <li> <code>update_typeinfo</code> \u2013 </li> <li> <code>update_arch</code> \u2013 </li> <li> <code>reset_config</code> \u2013 </li> <li> <code>on_start</code> \u2013 </li> <li> <code>on_stop</code> \u2013 </li> <li> <code>on_exit</code> \u2013 </li> <li> <code>init</code> \u2013 <p>Calls all GDB hook functions that need to be called when GDB/pwndbg</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.update_typeinfo","title":"update_typeinfo","text":"<pre><code>update_typeinfo() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.update_arch","title":"update_arch","text":"<pre><code>update_arch() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.reset_config","title":"reset_config","text":"<pre><code>reset_config() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.on_start","title":"on_start","text":"<pre><code>on_start() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.on_stop","title":"on_stop","text":"<pre><code>on_stop() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.on_exit","title":"on_exit","text":"<pre><code>on_exit() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.init","title":"init","text":"<pre><code>init() -> None\n</code></pre> <p>Calls all GDB hook functions that need to be called when GDB/pwndbg itself is loaded, as opposed to when an actual hook event occurs</p>"},{"location":"reference/pwndbg/gdblib/info/","title":"pwndbg.gdblib.info","text":""},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info","title":"info","text":"<p>Runs a few useful commands which are available under \"info\".</p> <p>Functions:</p> <ul> <li> <code>proc_mappings</code> \u2013 </li> <li> <code>auxv</code> \u2013 </li> <li> <code>files</code> \u2013 </li> <li> <code>target</code> \u2013 </li> <li> <code>sharedlibrary</code> \u2013 </li> <li> <code>parsed_sharedlibrary</code> \u2013 <p>Returns a dictionary of shared libraries with their .text section from and to addresses.</p> </li> <li> <code>sharedlibrary_paths</code> \u2013 <p>Get the paths of all shared libraries loaded in the process by parsing the output of \"info sharedlibrary\".</p> </li> <li> <code>address</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.proc_mappings","title":"proc_mappings","text":"<pre><code>proc_mappings() -> str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.auxv","title":"auxv","text":"<pre><code>auxv() -> str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.files","title":"files","text":"<pre><code>files() -> str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.target","title":"target","text":"<pre><code>target() -> str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.sharedlibrary","title":"sharedlibrary","text":"<pre><code>sharedlibrary() -> str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.parsed_sharedlibrary","title":"parsed_sharedlibrary","text":"<pre><code>parsed_sharedlibrary() -> dict[str, tuple[int, int]]\n</code></pre> <p>Returns a dictionary of shared libraries with their .text section from and to addresses.</p>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.sharedlibrary_paths","title":"sharedlibrary_paths","text":"<pre><code>sharedlibrary_paths() -> list[str]\n</code></pre> <p>Get the paths of all shared libraries loaded in the process by parsing the output of \"info sharedlibrary\".</p>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.address","title":"address","text":"<pre><code>address(symbol: str) -> int | None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/","title":"pwndbg.gdblib.prompt","text":""},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt","title":"prompt","text":"<p>Functions:</p> <ul> <li> <code>initial_hook</code> \u2013 </li> <li> <code>show_hint</code> \u2013 </li> <li> <code>thread_is_stopped</code> \u2013 <p>This detects whether selected thread is stopped.</p> </li> <li> <code>prompt_hook</code> \u2013 </li> <li> <code>reset_context_shown</code> \u2013 </li> <li> <code>set_prompt</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>show_tip</code> \u2013 </li> <li> <code>cur</code> (<code>tuple[Inferior, InferiorThread] | None</code>) \u2013 </li> <li> <code>context_shown</code> \u2013 </li> <li> <code>last_alive_state</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.show_tip","title":"show_tip <code>module-attribute</code>","text":"<pre><code>show_tip = add_param(\n \"show-tips\", True, \"whether to display the tip of the day on startup\"\n)\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.cur","title":"cur <code>module-attribute</code>","text":"<pre><code>cur: tuple[Inferior, InferiorThread] | None = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.context_shown","title":"context_shown <code>module-attribute</code>","text":"<pre><code>context_shown = False\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.last_alive_state","title":"last_alive_state <code>module-attribute</code>","text":"<pre><code>last_alive_state = False\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.initial_hook","title":"initial_hook","text":"<pre><code>initial_hook(*a: Any) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.show_hint","title":"show_hint","text":"<pre><code>show_hint() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.thread_is_stopped","title":"thread_is_stopped","text":"<pre><code>thread_is_stopped() -> bool\n</code></pre> <p>This detects whether selected thread is stopped. It is not stopped in situations when gdb is executing commands that are attached to a breakpoint by <code>command</code> command.</p> <p>For more info see issue #229 ( #299 ) :return: Whether gdb executes commands attached to bp with <code>command</code> command.</p>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.prompt_hook","title":"prompt_hook","text":"<pre><code>prompt_hook(*a: Any) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.reset_context_shown","title":"reset_context_shown","text":"<pre><code>reset_context_shown(*a: Any) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.set_prompt","title":"set_prompt","text":"<pre><code>set_prompt() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/","title":"pwndbg.gdblib.ptmalloc2_tracking","text":""},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking","title":"ptmalloc2_tracking","text":"<p>Heap Tracking</p> <p>This module implements runtime tracking of the heap, allowing pwndbg to detect heap related misbehavior coming from an inferior in real time, which lets us catch UAF bugs, double frees (and more), and report them to the user.</p>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking--approach","title":"Approach","text":"<p>The approach used starting with using breakpoints to hook into the following libc symbols: <code>malloc</code>, <code>free</code>, <code>calloc</code>, and <code>realloc</code>. Each hook has a reference to a shared instance of the <code>Tracker</code> class, which is responsible for handling the tracking of the chunks of memory from the heap.</p> <p>The tracker keeps two sorted maps of chunks, for freed and in use chunks, keyed by their base address. Newly allocated chunks are added to the map of in use chunks right before an allocating call returns, and newly freed chunks are moved from the map of in use chunks to the map of free ones right before a freeing call returns. The tracker is also responsible for installing watchpoints for free chunks when they're added to the free chunk map and deleting them when their corresponding chunks are removed from the map.</p> <p>Additionally, because going through the data structures inside of libc to determine whether a chunk is free or not is, more often than not, a fairly slow operation, this module will only do so when it determines its view of the chunks has diverged from the one in libc in a way that would affect behavior. When such a diffence is detected, this module will rebuild the chunk maps in the range it determines to have been affected.</p> <p>Currently, the way it does this is by deleting and querying from libc the new status of all chunks that overlap the region of a new allocation when it detects that allocation overlaps chunks it previously considered free.</p> <p>This approach lets us avoid a lot of the following linked lists that comes with trying to answer the allocation status of a chunk, by keeping at hand as much known-good information as possible about them. Keep in mind that, although it is much faster than going to libc every time we need to know the allocation status of a chunk, this approach does have drawbacks when it comes to memory usage.</p>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking--compatibility","title":"Compatibility","text":"<p>Currently module assumes the inferior is using GLibc.</p> <p>There are points along the code in this module where the assumptions it makes are explicitly documented and checked to be valid for the current inferior, so that it may be immediately clear to the user that something has gone wrong if they happen to not be valid. However, be aware that there may be assumptions that were not made explicit.</p> <p>Classes:</p> <ul> <li> <code>FreeChunkWatchpoint</code> \u2013 </li> <li> <code>AllocChunkWatchpoint</code> \u2013 </li> <li> <code>Chunk</code> \u2013 </li> <li> <code>Tracker</code> \u2013 </li> <li> <code>MallocEnterBreakpoint</code> \u2013 </li> <li> <code>CallocEnterBreakpoint</code> \u2013 </li> <li> <code>AllocExitBreakpoint</code> \u2013 </li> <li> <code>ReallocEnterBreakpoint</code> \u2013 </li> <li> <code>ReallocExitBreakpoint</code> \u2013 </li> <li> <code>FreeEnterBreakpoint</code> \u2013 </li> <li> <code>FreeExitBreakpoint</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>is_enabled</code> \u2013 <p>Whether the heap tracker in enabled.</p> </li> <li> <code>resolve_address</code> \u2013 <p>Checks whether a given symbol is available and part of libc, and returns its</p> </li> <li> <code>get_chunk</code> \u2013 <p>Reads a chunk from a given address.</p> </li> <li> <code>in_program_code_stack</code> \u2013 </li> <li> <code>install</code> \u2013 </li> <li> <code>uninstall</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>LIBC_NAME</code> \u2013 </li> <li> <code>MALLOC_NAME</code> \u2013 </li> <li> <code>CALLOC_NAME</code> \u2013 </li> <li> <code>REALLOC_NAME</code> \u2013 </li> <li> <code>FREE_NAME</code> \u2013 </li> <li> <code>last_issue</code> (<code>str | None</code>) \u2013 </li> <li> <code>PRINT_DEBUG</code> \u2013 </li> <li> <code>DEFERED_DELETE</code> (<code>list[Breakpoint]</code>) \u2013 </li> <li> <code>malloc_enter</code> \u2013 </li> <li> <code>calloc_enter</code> \u2013 </li> <li> <code>realloc_enter</code> \u2013 </li> <li> <code>free_enter</code> \u2013 </li> <li> <code>stop_on_error</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.LIBC_NAME","title":"LIBC_NAME <code>module-attribute</code>","text":"<pre><code>LIBC_NAME = 'libc.so.6'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.MALLOC_NAME","title":"MALLOC_NAME <code>module-attribute</code>","text":"<pre><code>MALLOC_NAME = 'malloc'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.CALLOC_NAME","title":"CALLOC_NAME <code>module-attribute</code>","text":"<pre><code>CALLOC_NAME = 'calloc'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.REALLOC_NAME","title":"REALLOC_NAME <code>module-attribute</code>","text":"<pre><code>REALLOC_NAME = 'realloc'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FREE_NAME","title":"FREE_NAME <code>module-attribute</code>","text":"<pre><code>FREE_NAME = 'free'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.last_issue","title":"last_issue <code>module-attribute</code>","text":"<pre><code>last_issue: str | None = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.PRINT_DEBUG","title":"PRINT_DEBUG <code>module-attribute</code>","text":"<pre><code>PRINT_DEBUG = False\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.DEFERED_DELETE","title":"DEFERED_DELETE <code>module-attribute</code>","text":"<pre><code>DEFERED_DELETE: list[Breakpoint] = []\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.malloc_enter","title":"malloc_enter <code>module-attribute</code>","text":"<pre><code>malloc_enter = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.calloc_enter","title":"calloc_enter <code>module-attribute</code>","text":"<pre><code>calloc_enter = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.realloc_enter","title":"realloc_enter <code>module-attribute</code>","text":"<pre><code>realloc_enter = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.free_enter","title":"free_enter <code>module-attribute</code>","text":"<pre><code>free_enter = None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.stop_on_error","title":"stop_on_error <code>module-attribute</code>","text":"<pre><code>stop_on_error = True\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeChunkWatchpoint","title":"FreeChunkWatchpoint","text":"<pre><code>FreeChunkWatchpoint(chunk: Chunk, tracker: Tracker)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>chunk</code> \u2013 </li> <li> <code>tracker</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeChunkWatchpoint.chunk","title":"chunk <code>instance-attribute</code>","text":"<pre><code>chunk = chunk\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeChunkWatchpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeChunkWatchpoint.stop","title":"stop","text":"<pre><code>stop()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocChunkWatchpoint","title":"AllocChunkWatchpoint","text":"<pre><code>AllocChunkWatchpoint(chunk: Chunk)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>chunk</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocChunkWatchpoint.chunk","title":"chunk <code>instance-attribute</code>","text":"<pre><code>chunk = chunk\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocChunkWatchpoint.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Chunk","title":"Chunk","text":"<pre><code>Chunk(address: int, size: int, requested_size: int, flags: int)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>address</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>requested_size</code> \u2013 </li> <li> <code>flags</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Chunk.address","title":"address <code>instance-attribute</code>","text":"<pre><code>address = address\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Chunk.size","title":"size <code>instance-attribute</code>","text":"<pre><code>size = size\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Chunk.requested_size","title":"requested_size <code>instance-attribute</code>","text":"<pre><code>requested_size = requested_size\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Chunk.flags","title":"flags <code>instance-attribute</code>","text":"<pre><code>flags = flags\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker","title":"Tracker","text":"<pre><code>Tracker()\n</code></pre> <p>Methods:</p> <ul> <li> <code>is_performing_memory_management</code> \u2013 </li> <li> <code>enter_memory_management</code> \u2013 </li> <li> <code>exit_memory_management</code> \u2013 </li> <li> <code>malloc</code> \u2013 </li> <li> <code>free</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>free_chunks</code> (<code>SortedDict[int, Chunk]</code>) \u2013 </li> <li> <code>alloc_chunks</code> (<code>SortedDict[int, Chunk]</code>) \u2013 </li> <li> <code>free_watchpoints</code> (<code>dict[int, FreeChunkWatchpoint]</code>) \u2013 </li> <li> <code>memory_management_calls</code> (<code>dict[int, bool]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.free_chunks","title":"free_chunks <code>instance-attribute</code>","text":"<pre><code>free_chunks: SortedDict[int, Chunk] = SortedDict()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.alloc_chunks","title":"alloc_chunks <code>instance-attribute</code>","text":"<pre><code>alloc_chunks: SortedDict[int, Chunk] = SortedDict()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.free_watchpoints","title":"free_watchpoints <code>instance-attribute</code>","text":"<pre><code>free_watchpoints: dict[int, FreeChunkWatchpoint] = {}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.memory_management_calls","title":"memory_management_calls <code>instance-attribute</code>","text":"<pre><code>memory_management_calls: dict[int, bool] = {}\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.is_performing_memory_management","title":"is_performing_memory_management","text":"<pre><code>is_performing_memory_management()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.enter_memory_management","title":"enter_memory_management","text":"<pre><code>enter_memory_management(name: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.exit_memory_management","title":"exit_memory_management","text":"<pre><code>exit_memory_management() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.malloc","title":"malloc","text":"<pre><code>malloc(chunk: Chunk) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.free","title":"free","text":"<pre><code>free(address: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.MallocEnterBreakpoint","title":"MallocEnterBreakpoint","text":"<pre><code>MallocEnterBreakpoint(address, tracker)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>tracker</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.MallocEnterBreakpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.MallocEnterBreakpoint.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.CallocEnterBreakpoint","title":"CallocEnterBreakpoint","text":"<pre><code>CallocEnterBreakpoint(address, tracker)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>tracker</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.CallocEnterBreakpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.CallocEnterBreakpoint.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocExitBreakpoint","title":"AllocExitBreakpoint","text":"<pre><code>AllocExitBreakpoint(tracker, requested_size, name)\n</code></pre> <p> Bases: <code>FinishBreakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> <li> <code>out_of_scope</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>requested_size</code> \u2013 </li> <li> <code>tracker</code> \u2013 </li> <li> <code>name</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocExitBreakpoint.requested_size","title":"requested_size <code>instance-attribute</code>","text":"<pre><code>requested_size = requested_size\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocExitBreakpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocExitBreakpoint.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name = name\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocExitBreakpoint.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.AllocExitBreakpoint.out_of_scope","title":"out_of_scope","text":"<pre><code>out_of_scope() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocEnterBreakpoint","title":"ReallocEnterBreakpoint","text":"<pre><code>ReallocEnterBreakpoint(address, tracker)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>tracker</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocEnterBreakpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocEnterBreakpoint.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocExitBreakpoint","title":"ReallocExitBreakpoint","text":"<pre><code>ReallocExitBreakpoint(tracker, freed_ptr, requested_size)\n</code></pre> <p> Bases: <code>FinishBreakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> <li> <code>out_of_scope</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>freed_ptr</code> \u2013 </li> <li> <code>requested_size</code> \u2013 </li> <li> <code>tracker</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocExitBreakpoint.freed_ptr","title":"freed_ptr <code>instance-attribute</code>","text":"<pre><code>freed_ptr = freed_ptr\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocExitBreakpoint.requested_size","title":"requested_size <code>instance-attribute</code>","text":"<pre><code>requested_size = requested_size\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocExitBreakpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocExitBreakpoint.stop","title":"stop","text":"<pre><code>stop()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.ReallocExitBreakpoint.out_of_scope","title":"out_of_scope","text":"<pre><code>out_of_scope() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeEnterBreakpoint","title":"FreeEnterBreakpoint","text":"<pre><code>FreeEnterBreakpoint(address, tracker)\n</code></pre> <p> Bases: <code>Breakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>tracker</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeEnterBreakpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeEnterBreakpoint.stop","title":"stop","text":"<pre><code>stop() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeExitBreakpoint","title":"FreeExitBreakpoint","text":"<pre><code>FreeExitBreakpoint(tracker, ptr)\n</code></pre> <p> Bases: <code>FinishBreakpoint</code></p> <p>Methods:</p> <ul> <li> <code>stop</code> \u2013 </li> <li> <code>out_of_scope</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ptr</code> \u2013 </li> <li> <code>tracker</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeExitBreakpoint.ptr","title":"ptr <code>instance-attribute</code>","text":"<pre><code>ptr = ptr\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeExitBreakpoint.tracker","title":"tracker <code>instance-attribute</code>","text":"<pre><code>tracker = tracker\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeExitBreakpoint.stop","title":"stop","text":"<pre><code>stop()\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.FreeExitBreakpoint.out_of_scope","title":"out_of_scope","text":"<pre><code>out_of_scope() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.is_enabled","title":"is_enabled","text":"<pre><code>is_enabled() -> bool\n</code></pre> <p>Whether the heap tracker in enabled.</p>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.resolve_address","title":"resolve_address","text":"<pre><code>resolve_address(name: str) -> int | None\n</code></pre> <p>Checks whether a given symbol is available and part of libc, and returns its address.</p>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.get_chunk","title":"get_chunk","text":"<pre><code>get_chunk(address, requested_size)\n</code></pre> <p>Reads a chunk from a given address.</p>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.in_program_code_stack","title":"in_program_code_stack","text":"<pre><code>in_program_code_stack() -> bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.install","title":"install","text":"<pre><code>install(disable_hardware_watchpoints=True) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.uninstall","title":"uninstall","text":"<pre><code>uninstall() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/scheduler/","title":"pwndbg.gdblib.scheduler","text":""},{"location":"reference/pwndbg/gdblib/scheduler/#pwndbg.gdblib.scheduler","title":"scheduler","text":"<p>Functions:</p> <ul> <li> <code>lock_scheduler</code> \u2013 <p>This context manager can be used to run GDB commands with threads scheduling</p> </li> <li> <code>parse_and_eval_with_scheduler_lock</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/scheduler/#pwndbg.gdblib.scheduler.lock_scheduler","title":"lock_scheduler","text":"<pre><code>lock_scheduler() -> Iterator[None]\n</code></pre> <p>This context manager can be used to run GDB commands with threads scheduling being locked which means that other threads will be stopped during execution.</p> <p>This is useful to prevent bugs where e.g.: gdb.parse_and_eval(\"(int)foo()\") would execute foo() on the current debugee thread but would also unlock other threads for being executed and those other threads may for example hit a breakpoint we set previously which would be confusing for the user.</p> <p>See also: https://sourceware.org/gdb/onlinedocs/gdb/All_002dStop-Mode.html</p>"},{"location":"reference/pwndbg/gdblib/scheduler/#pwndbg.gdblib.scheduler.parse_and_eval_with_scheduler_lock","title":"parse_and_eval_with_scheduler_lock","text":"<pre><code>parse_and_eval_with_scheduler_lock(expr: str) -> Value\n</code></pre>"},{"location":"reference/pwndbg/gdblib/shellcode/","title":"pwndbg.gdblib.shellcode","text":""},{"location":"reference/pwndbg/gdblib/shellcode/#pwndbg.gdblib.shellcode","title":"shellcode","text":"<p>Shellcode</p> <p>This module implements functionality that allows for the execution of a small amount of code in the context of the inferior.</p> <p>Functions:</p> <ul> <li> <code>exec_syscall</code> \u2013 <p>Tries executing the given syscall in the context of the inferior.</p> </li> <li> <code>exec_shellcode</code> \u2013 <p>Tries executing the given blob of machine code in the current context of the</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/shellcode/#pwndbg.gdblib.shellcode.exec_syscall","title":"exec_syscall","text":"<pre><code>exec_syscall(\n syscall,\n arg0=None,\n arg1=None,\n arg2=None,\n arg3=None,\n arg4=None,\n arg5=None,\n arg6=None,\n disable_breakpoints=False,\n)\n</code></pre> <p>Tries executing the given syscall in the context of the inferior.</p>"},{"location":"reference/pwndbg/gdblib/shellcode/#pwndbg.gdblib.shellcode.exec_shellcode","title":"exec_shellcode","text":"<pre><code>exec_shellcode(\n blob, restore_context=True, capture=None, disable_breakpoints=False\n)\n</code></pre> <p>Tries executing the given blob of machine code in the current context of the inferior, optionally restoring the values of the registers as they were before the shellcode ran, as a means to allow for execution of the inferior to continue uninterrupted. The value of the program counter is always restored.</p> <p>Additionally, the caller may specify an object to be called before the context is restored, so that information stored in the registers after the shellcode finishes can be retrieved. The return value of that call will be returned by this function.</p>"},{"location":"reference/pwndbg/gdblib/shellcode/#pwndbg.gdblib.shellcode.exec_shellcode--safety","title":"Safety","text":"<p>Seeing as this function injects code directly into the inferior and runs it, the caller must be careful to inject code that will (1) terminate and (2) not cause the inferior to misbehave. Otherwise, it is fairly easy to crash or currupt the memory in the inferior.</p>"},{"location":"reference/pwndbg/gdblib/symbol/","title":"pwndbg.gdblib.symbol","text":""},{"location":"reference/pwndbg/gdblib/symbol/#pwndbg.gdblib.symbol","title":"symbol","text":"<p>Looking up addresses for function names / symbols, and vice-versa.</p> <p>Uses IDA when available if there isn't sufficient symbol information available.</p> <p>Functions:</p> <ul> <li> <code>selected_frame_source_absolute_filename</code> \u2013 <p>Retrieve the symbol table\u2019s source absolute file name from the selected frame.</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/symbol/#pwndbg.gdblib.symbol.selected_frame_source_absolute_filename","title":"selected_frame_source_absolute_filename","text":"<pre><code>selected_frame_source_absolute_filename()\n</code></pre> <p>Retrieve the symbol table\u2019s source absolute file name from the selected frame.</p> <p>In case of missing symbol table or frame information, None is returned.</p>"},{"location":"reference/pwndbg/gdblib/tui/","title":"pwndbg.gdblib.tui","text":""},{"location":"reference/pwndbg/gdblib/tui/#pwndbg.gdblib.tui","title":"tui","text":"<p>Modules:</p> <ul> <li> <code>context</code> \u2013 </li> <li> <code>control</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>setup</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/tui/#pwndbg.gdblib.tui.setup","title":"setup","text":"<pre><code>setup() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/","title":"pwndbg.gdblib.tui.context","text":""},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context","title":"context","text":"<p>Classes:</p> <ul> <li> <code>ContextTUIWindow</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>sections</code> \u2013 </li> <li> <code>target_func</code> (<code>Callable[..., _Window]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.sections","title":"sections <code>module-attribute</code>","text":"<pre><code>sections = ['legend'] + [replace('context_', '') for section in values()]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.target_func","title":"target_func <code>module-attribute</code>","text":"<pre><code>target_func: Callable[..., _Window] = (\n lambda window, section_name=section_name: ContextTUIWindow(\n window, section_name\n )\n)\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow","title":"ContextTUIWindow","text":"<pre><code>ContextTUIWindow(tui_window: 'gdb.TuiWindow', section: str)\n</code></pre> <p>Methods:</p> <ul> <li> <code>close</code> \u2013 </li> <li> <code>render</code> \u2013 </li> <li> <code>hscroll</code> \u2013 </li> <li> <code>vscroll</code> \u2013 </li> <li> <code>click</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.close","title":"close","text":"<pre><code>close() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.render","title":"render","text":"<pre><code>render() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.hscroll","title":"hscroll","text":"<pre><code>hscroll(num: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.vscroll","title":"vscroll","text":"<pre><code>vscroll(num: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.click","title":"click","text":"<pre><code>click(x: int, y: int, button: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/","title":"pwndbg.gdblib.tui.control","text":""},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control","title":"control","text":"<p>Classes:</p> <ul> <li> <code>ControlTUIWindow</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow","title":"ControlTUIWindow","text":"<pre><code>ControlTUIWindow(tui_window: 'gdb.TuiWindow')\n</code></pre> <p>Methods:</p> <ul> <li> <code>close</code> \u2013 </li> <li> <code>render</code> \u2013 </li> <li> <code>hscroll</code> \u2013 </li> <li> <code>vscroll</code> \u2013 </li> <li> <code>click</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.close","title":"close","text":"<pre><code>close() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.render","title":"render","text":"<pre><code>render() -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.hscroll","title":"hscroll","text":"<pre><code>hscroll(num: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.vscroll","title":"vscroll","text":"<pre><code>vscroll(num: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.click","title":"click","text":"<pre><code>click(x: int, y: int, button: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/vmmap/","title":"pwndbg.gdblib.vmmap","text":""},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap","title":"vmmap","text":"<p>Routines to enumerate mapped memory, and attempt to associate address ranges with various ELF files and permissions.</p> <p>The reason that we need robustness is that not every operating system has /proc/$$/maps, which backs 'info proc mapping'.</p> <p>Functions:</p> <ul> <li> <code>is_corefile</code> \u2013 <p>For example output use:</p> </li> <li> <code>get_known_maps</code> \u2013 <p>Similar to <code>vmmap.get()</code>, except only returns maps in cases where</p> </li> <li> <code>coredump_maps</code> \u2013 <p>Parses <code>info proc mappings</code> and <code>maintenance info sections</code></p> </li> <li> <code>parse_info_proc_mappings_line</code> \u2013 <p>Parse a line from <code>info proc mappings</code> and return a pwndbg.lib.memory.Page</p> </li> <li> <code>info_proc_maps</code> \u2013 <p>Parse the result of info proc mappings.</p> </li> <li> <code>proc_tid_maps</code> \u2013 <p>Parse the contents of /proc/$TID/maps on the server.</p> </li> <li> <code>info_sharedlibrary</code> \u2013 <p>Parses the output of <code>info sharedlibrary</code>.</p> </li> <li> <code>info_files</code> \u2013 </li> <li> <code>info_auxv</code> \u2013 <p>Extracts the name of the executable from the output of the command</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.is_corefile","title":"is_corefile","text":"<pre><code>is_corefile() -> bool\n</code></pre> For example output use <p>gdb ./tests/binaries/crash_simple.out -ex run -ex 'generate-core-file ./core' -ex 'quit'</p> And then use <p>gdb ./tests/binaries/crash_simple.out -core ./core -ex 'info target'</p> <p>And: gdb -core ./core</p> <p>As the two differ in output slighty.</p>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.get_known_maps","title":"get_known_maps","text":"<pre><code>get_known_maps() -> tuple[Page, ...] | None\n</code></pre> <p>Similar to <code>vmmap.get()</code>, except only returns maps in cases where the mappings are known, like if it's a coredump, or if process mappings are available.</p>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.coredump_maps","title":"coredump_maps","text":"<pre><code>coredump_maps() -> tuple[Page, ...]\n</code></pre> <p>Parses <code>info proc mappings</code> and <code>maintenance info sections</code> and tries to make sense out of the result :)</p>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.parse_info_proc_mappings_line","title":"parse_info_proc_mappings_line","text":"<pre><code>parse_info_proc_mappings_line(\n line: str, perms_available: bool, parse_flags: bool\n) -> Page | None\n</code></pre> <p>Parse a line from <code>info proc mappings</code> and return a pwndbg.lib.memory.Page object if the line is valid.</p> Example lines <p>0x4c3000 0x4c5000 0x2000 0xc2000 rw-p /root/hello_world/main 0x4c5000 0x4cb000 0x6000 0x0 rw-p</p> <p>The objfile column might be empty, and the permissions column is only present in GDB versions >= 12.1 bminor/binutils-gdb@29ef4c0</p> <p>Parameters:</p> <ul> <li> <code>line</code> (<code>str</code>) \u2013 <p>A line from <code>info proc mappings</code>.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>Page | None</code> \u2013 <p>A pwndbg.lib.memory.Page object or None.</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.info_proc_maps","title":"info_proc_maps","text":"<pre><code>info_proc_maps(parse_flags=True) -> tuple[Page, ...]\n</code></pre> <p>Parse the result of info proc mappings.</p> <p>Example output:</p> <pre><code> Start Addr End Addr Size Offset Perms objfile\n 0x400000 0x401000 0x1000 0x0 r--p /root/hello_world/main\n 0x401000 0x497000 0x96000 0x1000 r-xp /root/hello_world/main\n 0x497000 0x4be000 0x27000 0x97000 r--p /root/hello_world/main\n 0x4be000 0x4c3000 0x5000 0xbd000 r--p /root/hello_world/main\n 0x4c3000 0x4c5000 0x2000 0xc2000 rw-p /root/hello_world/main\n 0x4c5000 0x4cb000 0x6000 0x0 rw-p\n 0x4cb000 0x4ed000 0x22000 0x0 rw-p [heap]\n0x7ffff7ff9000 0x7ffff7ffd000 0x4000 0x0 r--p [vvar]\n0x7ffff7ffd000 0x7ffff7fff000 0x2000 0x0 r-xp [vdso]\n0x7ffffffde000 0x7ffffffff000 0x21000 0x0 rw-p [stack]\n</code></pre> <p>0xffffffffff600000 0xffffffffff601000 0x1000 0x0 --xp [vsyscall]</p> <p>Note: this may return no pages due to a bug/behavior of GDB. See https://sourceware.org/bugzilla/show_bug.cgi?id=31207 for more information.</p> <p>Returns:</p> <ul> <li> <code>Page</code> \u2013 <p>A tuple of pwndbg.lib.memory.Page objects or an empty tuple if</p> </li> <li> <code>...</code> \u2013 <p>info proc mapping is not supported on the target.</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.proc_tid_maps","title":"proc_tid_maps","text":"<pre><code>proc_tid_maps() -> tuple[Page, ...] | None\n</code></pre> <p>Parse the contents of /proc/$TID/maps on the server. (TID == Thread Identifier. We do not use PID since it may not be correct)</p> <p>Returns:</p> <ul> <li> <code>tuple[Page, ...] | None</code> \u2013 <p>A tuple of pwndbg.lib.memory.Page objects or None if</p> </li> <li> <code>tuple[Page, ...] | None</code> \u2013 <p>/proc/$tid/maps doesn't exist or when we debug a qemu-user target</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.info_sharedlibrary","title":"info_sharedlibrary","text":"<pre><code>info_sharedlibrary() -> tuple[Page, ...]\n</code></pre> <p>Parses the output of <code>info sharedlibrary</code>.</p> <p>Specifically, all we really want is any valid pointer into each library, and the path to the library on disk.</p> <p>With this information, we can use the ELF parser to get all of the page permissions for every mapped page in the ELF.</p> <p>Returns:</p> <ul> <li> <code>tuple[Page, ...]</code> \u2013 <p>A list of pwndbg.lib.memory.Page objects.</p> </li> </ul>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.info_files","title":"info_files","text":"<pre><code>info_files() -> tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/vmmap/#pwndbg.gdblib.vmmap.info_auxv","title":"info_auxv","text":"<pre><code>info_auxv(skip_exe: bool = False) -> tuple[Page, ...]\n</code></pre> <p>Extracts the name of the executable from the output of the command \"info auxv\". Note that if the executable path is a symlink, it is not dereferenced by <code>info auxv</code> and we also don't dereference it.</p> <p>Parameters:</p> <ul> <li> <code>skip_exe</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>Do not return any mappings that belong to the exe.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>tuple[Page, ...]</code> \u2013 <p>A list of pwndbg.lib.memory.Page objects.</p> </li> </ul>"},{"location":"reference/pwndbg/ghidra/","title":"pwndbg.ghidra","text":""},{"location":"reference/pwndbg/ghidra/#pwndbg.ghidra","title":"ghidra","text":"<p>Functions:</p> <ul> <li> <code>set_r2decompiler</code> \u2013 </li> <li> <code>decompile</code> \u2013 <p>Return the source of the given function decompiled by ghidra.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>r2decompiler</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/ghidra/#pwndbg.ghidra.r2decompiler","title":"r2decompiler <code>module-attribute</code>","text":"<pre><code>r2decompiler = add_param(\n \"r2decompiler\",\n \"radare2\",\n \"framework that your ghidra plugin installed\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"radare2\", \"rizin\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/ghidra/#pwndbg.ghidra.set_r2decompiler","title":"set_r2decompiler","text":"<pre><code>set_r2decompiler() -> None\n</code></pre>"},{"location":"reference/pwndbg/ghidra/#pwndbg.ghidra.decompile","title":"decompile","text":"<pre><code>decompile(func=None)\n</code></pre> <p>Return the source of the given function decompiled by ghidra.</p> <p>If no function is given, decompile the function within the current pc. This function requires radare2, r2pipe and r2ghidra, or their related rizin counterparts.</p> <p>Raises Exception if any fatal error occurs.</p>"},{"location":"reference/pwndbg/glibc/","title":"pwndbg.glibc","text":""},{"location":"reference/pwndbg/glibc/#pwndbg.glibc","title":"glibc","text":"<p>Get information about the GLibc</p> <p>Functions:</p> <ul> <li> <code>set_glibc_version</code> \u2013 </li> <li> <code>get_version</code> \u2013 </li> <li> <code>get_libc_filename_from_info_sharedlibrary</code> \u2013 <p>Get the filename of the libc by parsing the output of <code>info sharedlibrary</code>.</p> </li> <li> <code>dump_elf_data_section</code> \u2013 <p>Dump .data section of libc ELF file</p> </li> <li> <code>dump_relocations_by_section_name</code> \u2013 <p>Dump relocations of a section by section name of libc ELF file</p> </li> <li> <code>get_section_address_by_name</code> \u2013 <p>Find section address of libc by section name</p> </li> <li> <code>OnlyWhenGlibcLoaded</code> \u2013 </li> <li> <code>check_safe_linking</code> \u2013 <p>Safe-linking is a glibc 2.32 mitigation; see:</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>safe_lnk</code> \u2013 </li> <li> <code>glibc_version</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.safe_lnk","title":"safe_lnk <code>module-attribute</code>","text":"<pre><code>safe_lnk = add_param(\n \"safe-linking\",\n None,\n \"whether glibc uses safe-linking\",\n param_class=PARAM_AUTO_BOOLEAN,\n)\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.glibc_version","title":"glibc_version <code>module-attribute</code>","text":"<pre><code>glibc_version = add_param(\n \"glibc\",\n \"\",\n \"GLIBC version for heap heuristics resolution (e.g. 2.31)\",\n scope=\"heap\",\n)\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.set_glibc_version","title":"set_glibc_version","text":"<pre><code>set_glibc_version() -> None\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.get_version","title":"get_version","text":"<pre><code>get_version() -> tuple[int, ...] | None\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.get_libc_filename_from_info_sharedlibrary","title":"get_libc_filename_from_info_sharedlibrary","text":"<pre><code>get_libc_filename_from_info_sharedlibrary() -> str | None\n</code></pre> <p>Get the filename of the libc by parsing the output of <code>info sharedlibrary</code>.</p>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.dump_elf_data_section","title":"dump_elf_data_section","text":"<pre><code>dump_elf_data_section() -> tuple[int, int, bytes] | None\n</code></pre> <p>Dump .data section of libc ELF file</p>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.dump_relocations_by_section_name","title":"dump_relocations_by_section_name","text":"<pre><code>dump_relocations_by_section_name(\n section_name: str,\n) -> tuple[Relocation, ...] | None\n</code></pre> <p>Dump relocations of a section by section name of libc ELF file</p>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.get_section_address_by_name","title":"get_section_address_by_name","text":"<pre><code>get_section_address_by_name(section_name: str) -> int\n</code></pre> <p>Find section address of libc by section name</p>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.OnlyWhenGlibcLoaded","title":"OnlyWhenGlibcLoaded","text":"<pre><code>OnlyWhenGlibcLoaded(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.check_safe_linking","title":"check_safe_linking","text":"<pre><code>check_safe_linking() -> bool\n</code></pre> <p>Safe-linking is a glibc 2.32 mitigation; see: - https://lanph3re.blogspot.com/2020/08/blog-post.html - https://research.checkpoint.com/2020/safe-linking-eliminating-a-20-year-old-malloc-exploit-primitive/</p>"},{"location":"reference/pwndbg/hexdump/","title":"pwndbg.hexdump","text":""},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump","title":"hexdump","text":"<p>Hexdump implementation, ~= stolen from pwntools.</p> <p>Functions:</p> <ul> <li> <code>groupby</code> \u2013 </li> <li> <code>load_color_scheme</code> \u2013 </li> <li> <code>hexdump</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>color_scheme</code> \u2013 </li> <li> <code>printable</code> \u2013 </li> <li> <code>config_colorize_ascii</code> \u2013 </li> <li> <code>config_separator</code> \u2013 </li> <li> <code>config_byte_separator</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.color_scheme","title":"color_scheme <code>module-attribute</code>","text":"<pre><code>color_scheme = None\n</code></pre>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.printable","title":"printable <code>module-attribute</code>","text":"<pre><code>printable = None\n</code></pre>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.config_colorize_ascii","title":"config_colorize_ascii <code>module-attribute</code>","text":"<pre><code>config_colorize_ascii = add_param(\n \"hexdump-colorize-ascii\",\n True,\n \"whether to colorize the hexdump command ascii section\",\n)\n</code></pre>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.config_separator","title":"config_separator <code>module-attribute</code>","text":"<pre><code>config_separator = add_param(\n \"hexdump-ascii-block-separator\",\n \"\u2502\",\n \"block separator char of the hexdump command\",\n)\n</code></pre>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.config_byte_separator","title":"config_byte_separator <code>module-attribute</code>","text":"<pre><code>config_byte_separator = add_param(\n \"hexdump-byte-separator\",\n \" \",\n \"separator of single bytes in hexdump (does NOT affect group separator)\",\n)\n</code></pre>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.groupby","title":"groupby","text":"<pre><code>groupby(width: int, array, fill=None)\n</code></pre>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.load_color_scheme","title":"load_color_scheme","text":"<pre><code>load_color_scheme() -> None\n</code></pre>"},{"location":"reference/pwndbg/hexdump/#pwndbg.hexdump.hexdump","title":"hexdump","text":"<pre><code>hexdump(\n data: bytes,\n address: int = 0,\n width: int = 16,\n group_width: int = 4,\n flip_group_endianness: bool = False,\n skip: bool = True,\n offset: int = 0,\n size: int = 0,\n count: int = 0,\n repeat: bool = False,\n dX_call: bool = False,\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/","title":"pwndbg.integration","text":""},{"location":"reference/pwndbg/integration/#pwndbg.integration","title":"integration","text":"<p>Modules:</p> <ul> <li> <code>binja</code> \u2013 <p>Talks to an XMLRPC server running inside of an active Binary Ninja instance,</p> </li> <li> <code>ida</code> \u2013 <p>Talks to an XMLRPC server running inside of an active IDA Pro instance,</p> </li> </ul> <p>Classes:</p> <ul> <li> <code>IntegrationProvider</code> \u2013 <p>A class representing an integration that provides intelligence external to GDB.</p> </li> <li> <code>ConfigurableProvider</code> \u2013 <p>A wrapper around an IntegrationProvider that skips calling functions if disabled in config.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>switch_providers</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>provider_name</code> \u2013 </li> <li> <code>symbol_lookup</code> \u2013 </li> <li> <code>smart_enhance</code> \u2013 </li> <li> <code>function_lookup</code> \u2013 </li> <li> <code>provider</code> (<code>IntegrationProvider</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.provider_name","title":"provider_name <code>module-attribute</code>","text":"<pre><code>provider_name = add_param(\n \"integration-provider\",\n \"none\",\n \"which provider to use for integration features\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"none\", \"binja\", \"ida\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.symbol_lookup","title":"symbol_lookup <code>module-attribute</code>","text":"<pre><code>symbol_lookup = add_param(\n \"integration-symbol-lookup\",\n True,\n \"whether to use integration to look up unknown symbols\",\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.smart_enhance","title":"smart_enhance <code>module-attribute</code>","text":"<pre><code>smart_enhance = add_param(\n \"integration-smart-enhance\",\n True,\n \"use integration to determine when to disassemble during enhancing\",\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.function_lookup","title":"function_lookup <code>module-attribute</code>","text":"<pre><code>function_lookup = add_param(\n \"integration-function-lookup\",\n True,\n \"use integration to look up function type signatures\",\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.provider","title":"provider <code>module-attribute</code>","text":"<pre><code>provider: IntegrationProvider = IntegrationProvider()\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider","title":"IntegrationProvider","text":"<p>A class representing an integration that provides intelligence external to GDB.</p> <p>Methods:</p> <ul> <li> <code>get_symbol</code> \u2013 <p>Get a symbol at an address, or an offset from a symbol.</p> </li> <li> <code>get_versions</code> \u2013 <p>Gets any version strings relevant to the integration,</p> </li> <li> <code>is_in_function</code> \u2013 <p>Checks if integration thinks that an address is in a function,</p> </li> <li> <code>get_comment_lines</code> \u2013 <p>Gets any comments attached to an instruction.</p> </li> <li> <code>decompile</code> \u2013 <p>Decompiles the code near an address given a line count.</p> </li> <li> <code>get_func_type</code> \u2013 <p>Gets the type signature of a function, used for argument labeling.</p> </li> <li> <code>get_stack_var_name</code> \u2013 <p>Gets the name of a stack variable based on only the address of the variable.</p> </li> </ul>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider.get_symbol","title":"get_symbol","text":"<pre><code>get_symbol(addr: int) -> str | None\n</code></pre> <p>Get a symbol at an address, or an offset from a symbol.</p>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider.get_versions","title":"get_versions","text":"<pre><code>get_versions() -> tuple[str, ...]\n</code></pre> <p>Gets any version strings relevant to the integration, which are used when displaying the <code>version</code> command.</p>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider.is_in_function","title":"is_in_function","text":"<pre><code>is_in_function(addr: int) -> bool\n</code></pre> <p>Checks if integration thinks that an address is in a function, which is used to determine if <code>tel</code> should try to disassemble something.</p> <p>If uncertain, it's better to default to True than to False.</p>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider.get_comment_lines","title":"get_comment_lines","text":"<pre><code>get_comment_lines(addr: int) -> list[str]\n</code></pre> <p>Gets any comments attached to an instruction.</p>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider.decompile","title":"decompile","text":"<pre><code>decompile(addr: int, lines: int) -> list[str] | None\n</code></pre> <p>Decompiles the code near an address given a line count.</p>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider.get_func_type","title":"get_func_type","text":"<pre><code>get_func_type(addr: int) -> Function | None\n</code></pre> <p>Gets the type signature of a function, used for argument labeling.</p>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.IntegrationProvider.get_stack_var_name","title":"get_stack_var_name","text":"<pre><code>get_stack_var_name(addr: int) -> str | None\n</code></pre> <p>Gets the name of a stack variable based on only the address of the variable.</p>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider","title":"ConfigurableProvider <code>dataclass</code>","text":"<pre><code>ConfigurableProvider(inner: IntegrationProvider)\n</code></pre> <p> Bases: <code>IntegrationProvider</code></p> <p>A wrapper around an IntegrationProvider that skips calling functions if disabled in config.</p> <p>Methods:</p> <ul> <li> <code>get_symbol</code> \u2013 </li> <li> <code>get_versions</code> \u2013 </li> <li> <code>is_in_function</code> \u2013 </li> <li> <code>get_comment_lines</code> \u2013 </li> <li> <code>decompile</code> \u2013 </li> <li> <code>get_func_type</code> \u2013 </li> <li> <code>get_stack_var_name</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>inner</code> (<code>IntegrationProvider</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.inner","title":"inner <code>instance-attribute</code>","text":"<pre><code>inner: IntegrationProvider\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.get_symbol","title":"get_symbol","text":"<pre><code>get_symbol(addr: int) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.get_versions","title":"get_versions","text":"<pre><code>get_versions() -> tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.is_in_function","title":"is_in_function","text":"<pre><code>is_in_function(addr: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.get_comment_lines","title":"get_comment_lines","text":"<pre><code>get_comment_lines(addr: int) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.decompile","title":"decompile","text":"<pre><code>decompile(addr: int, lines: int) -> list[str] | None\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.get_func_type","title":"get_func_type","text":"<pre><code>get_func_type(addr: int) -> Function | None\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.get_stack_var_name","title":"get_stack_var_name","text":"<pre><code>get_stack_var_name(addr: int) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.switch_providers","title":"switch_providers","text":"<pre><code>switch_providers()\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/","title":"pwndbg.integration.binja","text":""},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja","title":"binja","text":"<p>Talks to an XMLRPC server running inside of an active Binary Ninja instance, in order to query it about the database. Allows symbol resolution and interactive debugging.</p> <p>Classes:</p> <ul> <li> <code>DarkTheme</code> \u2013 </li> <li> <code>LightTheme</code> \u2013 </li> <li> <code>BinjaProvider</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>init_bn_rpc_client</code> \u2013 </li> <li> <code>with_bn</code> \u2013 </li> <li> <code>available</code> \u2013 </li> <li> <code>can_connect</code> \u2013 </li> <li> <code>l2r</code> \u2013 </li> <li> <code>r2l</code> \u2013 </li> <li> <code>base</code> \u2013 </li> <li> <code>auto_update_pc</code> \u2013 </li> <li> <code>auto_update_bp</code> \u2013 </li> <li> <code>auto_clear_pc</code> \u2013 </li> <li> <code>navigate_to</code> \u2013 </li> <li> <code>bn_to_pygment_tok</code> \u2013 </li> <li> <code>bn_to_pygment_theme</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>bn_rpc_host</code> \u2013 </li> <li> <code>bn_rpc_port</code> \u2013 </li> <li> <code>bn_timeout</code> \u2013 </li> <li> <code>bn_autosync</code> \u2013 </li> <li> <code>bn_il_level</code> \u2013 </li> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>K</code> \u2013 </li> <li> <code>themes</code> \u2013 </li> <li> <code>style</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.bn_rpc_host","title":"bn_rpc_host <code>module-attribute</code>","text":"<pre><code>bn_rpc_host = add_param(\n \"bn-rpc-host\", \"127.0.0.1\", \"Binary Ninja XML-RPC server host\"\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.bn_rpc_port","title":"bn_rpc_port <code>module-attribute</code>","text":"<pre><code>bn_rpc_port = add_param(\n \"bn-rpc-port\", 31337, \"Binary Ninja XML-RPC server port\"\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.bn_timeout","title":"bn_timeout <code>module-attribute</code>","text":"<pre><code>bn_timeout = add_param(\n \"bn-timeout\", 2, \"time to wait for Binary Ninja XML-RPC, in seconds\"\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.bn_autosync","title":"bn_autosync <code>module-attribute</code>","text":"<pre><code>bn_autosync = add_param(\n \"bn-autosync\", False, \"whether to automatically run bn-sync every step\"\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.bn_il_level","title":"bn_il_level <code>module-attribute</code>","text":"<pre><code>bn_il_level = add_param(\n \"bn-il-level\",\n \"hlil\",\n \"the IL level to use when displaying Binary Ninja decompilation\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"disasm\", \"llil\", \"mlil\", \"hlil\"],\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.K","title":"K <code>module-attribute</code>","text":"<pre><code>K = TypeVar('K')\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.themes","title":"themes <code>module-attribute</code>","text":"<pre><code>themes = {}\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.style","title":"style <code>module-attribute</code>","text":"<pre><code>style = add_param(\n \"bn-decomp-style\",\n \"dark\",\n \"decompilation highlight theme for Binary Ninja\",\n help_docstring=f\"Valid values: {join(keys())})\",\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.DarkTheme","title":"DarkTheme","text":"<p> Bases: <code>Style</code></p> <p>Attributes:</p> <ul> <li> <code>styles</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.DarkTheme.styles","title":"styles <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>styles = bn_to_pygment_theme(\n {\n \"TextToken\": \"#e0e0e0\",\n \"InstructionToken\": \"#eddfb3\",\n \"OperandSeparatorToken\": \"#e0e0e0\",\n \"RegisterToken\": \"#e0e0e0\",\n \"IntegerToken\": \"#a2d9af\",\n \"PossibleAddressToken\": \"#a2d9af\",\n \"BeginMemoryOperandToken\": \"#e0e0e0\",\n \"EndMemoryOperandToken\": \"#e0e0e0\",\n \"FloatingPointToken\": \"#a2d9af\",\n \"AnnotationToken\": \"#dac4d1\",\n \"CodeRelativeAddressToken\": \"#a2d9af\",\n \"ArgumentNameToken\": \"#e0e0e0\",\n \"HexDumpByteValueToken\": \"#e0e0e0\",\n \"HexDumpSkippedByteToken\": \"#e0e0e0\",\n \"HexDumpInvalidByteToken\": \"#909090\",\n \"HexDumpTextToken\": \"#e0e0e0\",\n \"OpcodeToken\": \"#909090\",\n \"StringToken\": \"#dac4d1\",\n \"CharacterConstantToken\": \"#dac4d1\",\n \"KeywordToken\": \"#eddfb3\",\n \"TypeNameToken\": \"#edbd81\",\n \"FieldNameToken\": \"#b0dde4\",\n \"NameSpaceToken\": \"#80c6e9\",\n \"NameSpaceSeparatorToken\": \"#80c6e9\",\n \"TagToken\": \"#e0e0e0\",\n \"StructOffsetToken\": \"#b0dde4\",\n \"StructOffsetByteValueToken\": \"#e0e0e0\",\n \"StructureHexDumpTextToken\": \"#e0e0e0\",\n \"GotoLabelToken\": \"#80c6e9\",\n \"CommentToken\": \"#dac4d1\",\n \"PossibleValueToken\": \"#e0e0e0\",\n \"PossibleValueTypeToken\": \"#e0e0e0\",\n \"ArrayIndexToken\": \"#a2d9af\",\n \"IndentationToken\": \"#5d5d5d\",\n \"UnknownMemoryToken\": \"#909090\",\n \"EnumerationMemberToken\": \"#eddfb3\",\n \"OperationToken\": \"#89a4b1\",\n \"BaseStructureNameToken\": \"#dac4d1\",\n \"BaseStructureSeparatorToken\": \"#dac4d1\",\n \"BraceToken\": \"#e0e0e0\",\n \"CodeSymbolToken\": \"#80c6e9\",\n \"DataSymbolToken\": \"#8ee6ed\",\n \"LocalVariableToken\": \"#e0e0e0\",\n \"ImportToken\": \"#edbd81\",\n \"AddressDisplayToken\": \"#a2d9af\",\n \"IndirectImportToken\": \"#edbd81\",\n \"ExternalSymbolToken\": \"#edbd81\",\n \"StackVariableToken\": \"#c1dcc7\",\n \"AddressSeparatorToken\": \"#e0e0e0\",\n }\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.LightTheme","title":"LightTheme","text":"<p> Bases: <code>Style</code></p> <p>Attributes:</p> <ul> <li> <code>styles</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.LightTheme.styles","title":"styles <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>styles = bn_to_pygment_theme(\n {\n \"TextToken\": \"#1f1f1f\",\n \"InstructionToken\": \"#8d8d2d\",\n \"OperandSeparatorToken\": \"#1f1f1f\",\n \"RegisterToken\": \"#1f1f1f\",\n \"IntegerToken\": \"#30820d\",\n \"PossibleAddressToken\": \"#30820d\",\n \"BeginMemoryOperandToken\": \"#1f1f1f\",\n \"EndMemoryOperandToken\": \"#1f1f1f\",\n \"FloatingPointToken\": \"#30820d\",\n \"AnnotationToken\": \"#bf2624\",\n \"CodeRelativeAddressToken\": \"#30820d\",\n \"ArgumentNameToken\": \"#1f1f1f\",\n \"HexDumpByteValueToken\": \"#1f1f1f\",\n \"HexDumpSkippedByteToken\": \"#1f1f1f\",\n \"HexDumpInvalidByteToken\": \"#7a7a7a\",\n \"HexDumpTextToken\": \"#1f1f1f\",\n \"OpcodeToken\": \"#7a7a7a\",\n \"StringToken\": \"#203635\",\n \"CharacterConstantToken\": \"#203635\",\n \"KeywordToken\": \"#8d8d2d\",\n \"TypeNameToken\": \"#e07c35\",\n \"FieldNameToken\": \"#35dae0\",\n \"NameSpaceToken\": \"#00a4c7\",\n \"NameSpaceSeparatorToken\": \"#00a4c7\",\n \"TagToken\": \"#1f1f1f\",\n \"StructOffsetToken\": \"#35dae0\",\n \"StructOffsetByteValueToken\": \"#1f1f1f\",\n \"StructureHexDumpTextToken\": \"#1f1f1f\",\n \"GotoLabelToken\": \"#00a4c7\",\n \"CommentToken\": \"#bf2624\",\n \"PossibleValueToken\": \"#1f1f1f\",\n \"PossibleValueTypeToken\": \"#1f1f1f\",\n \"ArrayIndexToken\": \"#30820d\",\n \"IndentationToken\": \"#bcbcbc\",\n \"UnknownMemoryToken\": \"#7a7a7a\",\n \"EnumerationMemberToken\": \"#8d8d2d\",\n \"OperationToken\": \"#5b848d\",\n \"BaseStructureNameToken\": \"#bf2624\",\n \"BaseStructureSeparatorToken\": \"#bf2624\",\n \"BraceToken\": \"#1f1f1f\",\n \"CodeSymbolToken\": \"#00a4c7\",\n \"DataSymbolToken\": \"#278cad\",\n \"LocalVariableToken\": \"#1f1f1f\",\n \"ImportToken\": \"#e07c35\",\n \"AddressDisplayToken\": \"#30820d\",\n \"IndirectImportToken\": \"#e07c35\",\n \"ExternalSymbolToken\": \"#e07c35\",\n \"StackVariableToken\": \"#275016\",\n \"AddressSeparatorToken\": \"#1f1f1f\",\n }\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider","title":"BinjaProvider","text":"<p> Bases: <code>IntegrationProvider</code></p> <p>Methods:</p> <ul> <li> <code>get_symbol</code> \u2013 </li> <li> <code>get_versions</code> \u2013 </li> <li> <code>is_in_function</code> \u2013 </li> <li> <code>get_comment_lines</code> \u2013 </li> <li> <code>decompile</code> \u2013 </li> <li> <code>get_func_type</code> \u2013 </li> <li> <code>get_stack_var_name</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.get_symbol","title":"get_symbol","text":"<pre><code>get_symbol(addr: int) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.get_versions","title":"get_versions","text":"<pre><code>get_versions() -> tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.is_in_function","title":"is_in_function","text":"<pre><code>is_in_function(addr: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.get_comment_lines","title":"get_comment_lines","text":"<pre><code>get_comment_lines(addr: int) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.decompile","title":"decompile","text":"<pre><code>decompile(addr: int, lines: int) -> list[str] | None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.get_func_type","title":"get_func_type","text":"<pre><code>get_func_type(addr: int) -> Function | None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.get_stack_var_name","title":"get_stack_var_name","text":"<pre><code>get_stack_var_name(addr: int) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.init_bn_rpc_client","title":"init_bn_rpc_client","text":"<pre><code>init_bn_rpc_client() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.with_bn","title":"with_bn","text":"<pre><code>with_bn(\n fallback: K = None,\n) -> Callable[[Callable[P, T]], Callable[P, T | K]]\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.available","title":"available","text":"<pre><code>available() -> bool\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.can_connect","title":"can_connect","text":"<pre><code>can_connect() -> bool\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.l2r","title":"l2r","text":"<pre><code>l2r(addr: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.r2l","title":"r2l","text":"<pre><code>r2l(addr: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.base","title":"base","text":"<pre><code>base()\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.auto_update_pc","title":"auto_update_pc","text":"<pre><code>auto_update_pc() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.auto_update_bp","title":"auto_update_bp","text":"<pre><code>auto_update_bp() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.auto_clear_pc","title":"auto_clear_pc","text":"<pre><code>auto_clear_pc() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.navigate_to","title":"navigate_to","text":"<pre><code>navigate_to(addr: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.bn_to_pygment_tok","title":"bn_to_pygment_tok","text":"<pre><code>bn_to_pygment_tok(tok: str) -> Any\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.bn_to_pygment_theme","title":"bn_to_pygment_theme","text":"<pre><code>bn_to_pygment_theme(theme: dict[str, str]) -> dict[Any, str]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/","title":"pwndbg.integration.ida","text":""},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida","title":"ida","text":"<p>Talks to an XMLRPC server running inside of an active IDA Pro instance, in order to query it about the database. Allows symbol resolution and interactive debugging.</p> <p>Classes:</p> <ul> <li> <code>IDC</code> \u2013 </li> <li> <code>IdaProvider</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>init_ida_rpc_client</code> \u2013 </li> <li> <code>withIDA</code> \u2013 </li> <li> <code>withHexrays</code> \u2013 </li> <li> <code>takes_address</code> \u2013 </li> <li> <code>returns_address</code> \u2013 </li> <li> <code>available</code> \u2013 </li> <li> <code>can_connect</code> \u2013 </li> <li> <code>l2r</code> \u2013 </li> <li> <code>r2l</code> \u2013 </li> <li> <code>remote</code> \u2013 <p>Runs the provided function in IDA's interpreter.</p> </li> <li> <code>base</code> \u2013 </li> <li> <code>Comment</code> \u2013 </li> <li> <code>Name</code> \u2013 </li> <li> <code>GetFuncOffset</code> \u2013 </li> <li> <code>GetType</code> \u2013 </li> <li> <code>here</code> \u2013 </li> <li> <code>Jump</code> \u2013 </li> <li> <code>Anterior</code> \u2013 </li> <li> <code>GetBreakpoints</code> \u2013 </li> <li> <code>GetBptQty</code> \u2013 </li> <li> <code>GetBptEA</code> \u2013 </li> <li> <code>UpdateBreakpoints</code> \u2013 </li> <li> <code>SetColor</code> \u2013 </li> <li> <code>Auto_Color_PC</code> \u2013 </li> <li> <code>Auto_UnColor_PC</code> \u2013 </li> <li> <code>LocByName</code> \u2013 </li> <li> <code>PrevHead</code> \u2013 </li> <li> <code>NextHead</code> \u2013 </li> <li> <code>GetFunctionName</code> \u2013 </li> <li> <code>GetFlags</code> \u2013 </li> <li> <code>isASCII</code> \u2013 </li> <li> <code>ArgCount</code> \u2013 </li> <li> <code>SaveBase</code> \u2013 </li> <li> <code>GetIdbPath</code> \u2013 </li> <li> <code>has_cached_cfunc</code> \u2013 </li> <li> <code>decompile</code> \u2013 </li> <li> <code>decompile_context</code> \u2013 </li> <li> <code>get_ida_versions</code> \u2013 </li> <li> <code>GetStrucQty</code> \u2013 </li> <li> <code>GetStrucId</code> \u2013 </li> <li> <code>GetStrucName</code> \u2013 </li> <li> <code>GetStrucSize</code> \u2013 </li> <li> <code>GetMemberQty</code> \u2013 </li> <li> <code>GetMemberSize</code> \u2013 </li> <li> <code>GetMemberId</code> \u2013 </li> <li> <code>GetMemberName</code> \u2013 </li> <li> <code>GetMemberFlag</code> \u2013 </li> <li> <code>GetStrucNextOff</code> \u2013 </li> <li> <code>print_member</code> \u2013 </li> <li> <code>print_structs</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ida_rpc_host</code> \u2013 </li> <li> <code>ida_rpc_port</code> \u2013 </li> <li> <code>ida_timeout</code> \u2013 </li> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> <li> <code>colored_pc</code> \u2013 </li> <li> <code>idc</code> \u2013 </li> <li> <code>ida_replacements</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.ida_rpc_host","title":"ida_rpc_host <code>module-attribute</code>","text":"<pre><code>ida_rpc_host = add_param(\n \"ida-rpc-host\", \"127.0.0.1\", \"ida xmlrpc server address\"\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.ida_rpc_port","title":"ida_rpc_port <code>module-attribute</code>","text":"<pre><code>ida_rpc_port = add_param('ida-rpc-port', 31337, 'ida xmlrpc server port')\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.ida_timeout","title":"ida_timeout <code>module-attribute</code>","text":"<pre><code>ida_timeout = add_param(\n \"ida-timeout\", 2, \"time to wait for ida xmlrpc in seconds\"\n)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.colored_pc","title":"colored_pc <code>module-attribute</code>","text":"<pre><code>colored_pc = None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.idc","title":"idc <code>module-attribute</code>","text":"<pre><code>idc = IDC()\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.ida_replacements","title":"ida_replacements <code>module-attribute</code>","text":"<pre><code>ida_replacements = {\n \"__int64\": \"signed long long int\",\n \"__int32\": \"signed int\",\n \"__int16\": \"signed short\",\n \"__int8\": \"signed char\",\n \"__uint64\": \"unsigned long long int\",\n \"__uint32\": \"unsigned int\",\n \"__uint16\": \"unsigned short\",\n \"__uint8\": \"unsigned char\",\n \"_BOOL_1\": \"unsigned char\",\n \"_BOOL_2\": \"unsigned short\",\n \"_BOOL_4\": \"unsigned int\",\n \"_BYTE\": \"unsigned char\",\n \"_WORD\": \"unsigned short\",\n \"_DWORD\": \"unsigned int\",\n \"_QWORD\": \"unsigned long long\",\n \"__pure\": \"\",\n \"__hidden\": \"\",\n \"__return_ptr\": \"\",\n \"__struct_ptr\": \"\",\n \"__array_ptr\": \"\",\n \"__fastcall\": \"\",\n \"__cdecl\": \"\",\n \"__thiscall\": \"\",\n \"__userpurge\": \"\",\n}\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IDC","title":"IDC","text":"<pre><code>IDC()\n</code></pre> <p>Attributes:</p> <ul> <li> <code>query</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IDC.query","title":"query <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>query = \"{k:v for k,v in globals()['idc'].__dict__.items() if type(v) in (int,long)}\"\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider","title":"IdaProvider","text":"<p> Bases: <code>IntegrationProvider</code></p> <p>Methods:</p> <ul> <li> <code>get_symbol</code> \u2013 </li> <li> <code>get_versions</code> \u2013 </li> <li> <code>is_in_function</code> \u2013 </li> <li> <code>get_comment_lines</code> \u2013 </li> <li> <code>decompile</code> \u2013 </li> <li> <code>get_func_type</code> \u2013 </li> <li> <code>get_stack_var_name</code> \u2013 <p>Gets the name of a stack variable based on only the address of the variable.</p> </li> </ul>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.get_symbol","title":"get_symbol","text":"<pre><code>get_symbol(addr: int) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.get_versions","title":"get_versions","text":"<pre><code>get_versions() -> tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.is_in_function","title":"is_in_function","text":"<pre><code>is_in_function(addr: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.get_comment_lines","title":"get_comment_lines","text":"<pre><code>get_comment_lines(addr: int) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.decompile","title":"decompile","text":"<pre><code>decompile(addr: int, lines: int) -> list[str] | None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.get_func_type","title":"get_func_type","text":"<pre><code>get_func_type(addr: int) -> Function | None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.get_stack_var_name","title":"get_stack_var_name","text":"<pre><code>get_stack_var_name(addr: int) -> str | None\n</code></pre> <p>Gets the name of a stack variable based on only the address of the variable.</p>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.init_ida_rpc_client","title":"init_ida_rpc_client","text":"<pre><code>init_ida_rpc_client() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.withIDA","title":"withIDA","text":"<pre><code>withIDA(func: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.withHexrays","title":"withHexrays","text":"<pre><code>withHexrays(func: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.takes_address","title":"takes_address","text":"<pre><code>takes_address(\n function: Callable[Concatenate[int, P], T],\n) -> Callable[Concatenate[int, P], T]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.returns_address","title":"returns_address","text":"<pre><code>returns_address(function: Callable[P, int]) -> Callable[P, int]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.available","title":"available","text":"<pre><code>available() -> bool\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.can_connect","title":"can_connect","text":"<pre><code>can_connect() -> bool\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.l2r","title":"l2r","text":"<pre><code>l2r(addr: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.r2l","title":"r2l","text":"<pre><code>r2l(addr: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.remote","title":"remote","text":"<pre><code>remote(function) -> None\n</code></pre> <p>Runs the provided function in IDA's interpreter.</p> <p>The function must be self-contained and not reference any global variables.</p>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.base","title":"base","text":"<pre><code>base()\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.Comment","title":"Comment","text":"<pre><code>Comment(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.Name","title":"Name","text":"<pre><code>Name(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetFuncOffset","title":"GetFuncOffset","text":"<pre><code>GetFuncOffset(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetType","title":"GetType","text":"<pre><code>GetType(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.here","title":"here","text":"<pre><code>here() -> int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.Jump","title":"Jump","text":"<pre><code>Jump(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.Anterior","title":"Anterior","text":"<pre><code>Anterior(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetBreakpoints","title":"GetBreakpoints","text":"<pre><code>GetBreakpoints()\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetBptQty","title":"GetBptQty","text":"<pre><code>GetBptQty()\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetBptEA","title":"GetBptEA","text":"<pre><code>GetBptEA(i: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.UpdateBreakpoints","title":"UpdateBreakpoints","text":"<pre><code>UpdateBreakpoints() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.SetColor","title":"SetColor","text":"<pre><code>SetColor(pc, color)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.Auto_Color_PC","title":"Auto_Color_PC","text":"<pre><code>Auto_Color_PC() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.Auto_UnColor_PC","title":"Auto_UnColor_PC","text":"<pre><code>Auto_UnColor_PC() -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.LocByName","title":"LocByName","text":"<pre><code>LocByName(name) -> int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.PrevHead","title":"PrevHead","text":"<pre><code>PrevHead(addr)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.NextHead","title":"NextHead","text":"<pre><code>NextHead(addr)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetFunctionName","title":"GetFunctionName","text":"<pre><code>GetFunctionName(addr)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetFlags","title":"GetFlags","text":"<pre><code>GetFlags(addr)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.isASCII","title":"isASCII","text":"<pre><code>isASCII(flags)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.ArgCount","title":"ArgCount","text":"<pre><code>ArgCount(address) -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.SaveBase","title":"SaveBase","text":"<pre><code>SaveBase(path: str)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetIdbPath","title":"GetIdbPath","text":"<pre><code>GetIdbPath()\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.has_cached_cfunc","title":"has_cached_cfunc","text":"<pre><code>has_cached_cfunc(addr)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.decompile","title":"decompile","text":"<pre><code>decompile(addr)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.decompile_context","title":"decompile_context","text":"<pre><code>decompile_context(pc, context_lines)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.get_ida_versions","title":"get_ida_versions","text":"<pre><code>get_ida_versions() -> dict[str, str]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetStrucQty","title":"GetStrucQty","text":"<pre><code>GetStrucQty()\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetStrucId","title":"GetStrucId","text":"<pre><code>GetStrucId(idx)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetStrucName","title":"GetStrucName","text":"<pre><code>GetStrucName(sid)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetStrucSize","title":"GetStrucSize","text":"<pre><code>GetStrucSize(sid)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetMemberQty","title":"GetMemberQty","text":"<pre><code>GetMemberQty(sid)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetMemberSize","title":"GetMemberSize","text":"<pre><code>GetMemberSize(sid, offset)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetMemberId","title":"GetMemberId","text":"<pre><code>GetMemberId(sid, offset)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetMemberName","title":"GetMemberName","text":"<pre><code>GetMemberName(sid, offset)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetMemberFlag","title":"GetMemberFlag","text":"<pre><code>GetMemberFlag(sid, offset)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.GetStrucNextOff","title":"GetStrucNextOff","text":"<pre><code>GetStrucNextOff(sid, offset)\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.print_member","title":"print_member","text":"<pre><code>print_member(sid, offset) -> None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.print_structs","title":"print_structs","text":"<pre><code>print_structs() -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/","title":"pwndbg.lib","text":""},{"location":"reference/pwndbg/lib/#pwndbg.lib","title":"lib","text":"<p>Modules:</p> <ul> <li> <code>abi</code> \u2013 </li> <li> <code>android</code> \u2013 </li> <li> <code>arch</code> \u2013 </li> <li> <code>cache</code> \u2013 <p>Caches return values until some event in the inferior happens,</p> </li> <li> <code>common</code> \u2013 </li> <li> <code>config</code> \u2013 </li> <li> <code>disasm</code> \u2013 </li> <li> <code>elftypes</code> \u2013 </li> <li> <code>funcparser</code> \u2013 </li> <li> <code>functions</code> \u2013 </li> <li> <code>functions_data</code> \u2013 </li> <li> <code>gcc</code> \u2013 <p>Functions for determining the architecture-dependent path to</p> </li> <li> <code>heap</code> \u2013 </li> <li> <code>kernel</code> \u2013 </li> <li> <code>memory</code> \u2013 <p>Reading, writing, and describing memory.</p> </li> <li> <code>net</code> \u2013 <p>Re-implements some psutil functionality to be able to get information from</p> </li> <li> <code>regs</code> \u2013 <p>Reading register value from the inferior, and provides a</p> </li> <li> <code>stdio</code> \u2013 <p>Provides functionality to circumvent GDB's hooks on sys.stdin and sys.stdout</p> </li> <li> <code>strings</code> \u2013 </li> <li> <code>tempfile</code> \u2013 <p>Common helper and cache for pwndbg tempdir</p> </li> <li> <code>tips</code> \u2013 </li> <li> <code>version</code> \u2013 </li> <li> <code>which</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/abi/","title":"pwndbg.lib.abi","text":""},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi","title":"abi","text":"<p>Classes:</p> <ul> <li> <code>ABI</code> \u2013 <p>Encapsulates information about a calling convention.</p> </li> <li> <code>SyscallABI</code> \u2013 <p>The syscall ABI treats the syscall number as the zeroth argument,</p> </li> <li> <code>SigreturnABI</code> \u2013 <p>The sigreturn ABI is similar to the syscall ABI, except that</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>linux_i386</code> \u2013 </li> <li> <code>linux_amd64</code> \u2013 </li> <li> <code>linux_arm</code> \u2013 </li> <li> <code>linux_aarch64</code> \u2013 </li> <li> <code>linux_mips</code> \u2013 </li> <li> <code>linux_mips64</code> \u2013 </li> <li> <code>linux_ppc</code> \u2013 </li> <li> <code>linux_ppc64</code> \u2013 </li> <li> <code>linux_riscv32</code> \u2013 </li> <li> <code>linux_riscv64</code> \u2013 </li> <li> <code>linux_i386_syscall</code> \u2013 </li> <li> <code>linux_amd64_syscall</code> \u2013 </li> <li> <code>linux_arm_syscall</code> \u2013 </li> <li> <code>linux_aarch64_syscall</code> \u2013 </li> <li> <code>linux_mips_syscall</code> \u2013 </li> <li> <code>linux_mips64_syscall</code> \u2013 </li> <li> <code>linux_ppc_syscall</code> \u2013 </li> <li> <code>linux_ppc64_syscall</code> \u2013 </li> <li> <code>linux_riscv32_syscall</code> \u2013 </li> <li> <code>linux_riscv64_syscall</code> \u2013 </li> <li> <code>linux_i386_sigreturn</code> \u2013 </li> <li> <code>linux_amd64_sigreturn</code> \u2013 </li> <li> <code>linux_arm_sigreturn</code> \u2013 </li> <li> <code>linux_i386_srop</code> \u2013 </li> <li> <code>linux_amd64_srop</code> \u2013 </li> <li> <code>linux_arm_srop</code> \u2013 </li> <li> <code>DEFAULT_ABIS</code> (<code>dict[tuple[int, str, str], ABI]</code>) \u2013 </li> <li> <code>SYSCALL_ABIS</code> (<code>dict[tuple[int, str, str], SyscallABI]</code>) \u2013 </li> <li> <code>SIGRETURN_ABIS</code> (<code>dict[tuple[int, str, str], SigreturnABI]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_i386","title":"linux_i386 <code>module-attribute</code>","text":"<pre><code>linux_i386 = ABI([], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_amd64","title":"linux_amd64 <code>module-attribute</code>","text":"<pre><code>linux_amd64 = ABI(['rdi', 'rsi', 'rdx', 'rcx', 'r8', 'r9'], 8, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_arm","title":"linux_arm <code>module-attribute</code>","text":"<pre><code>linux_arm = ABI(['r0', 'r1', 'r2', 'r3'], 8, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_aarch64","title":"linux_aarch64 <code>module-attribute</code>","text":"<pre><code>linux_aarch64 = ABI(['x0', 'x1', 'x2', 'x3'], 16, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_mips","title":"linux_mips <code>module-attribute</code>","text":"<pre><code>linux_mips = ABI(['$a0', '$a1', '$a2', '$a3'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_mips64","title":"linux_mips64 <code>module-attribute</code>","text":"<pre><code>linux_mips64 = ABI(\n [\"$a0\", \"$a1\", \"$a2\", \"$a3\", \"$a4\", \"$a5\", \"$a6\", \"$a7\"], 8, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_ppc","title":"linux_ppc <code>module-attribute</code>","text":"<pre><code>linux_ppc = ABI(['r3', 'r4', 'r5', 'r6', 'r7', 'r8', 'r9', 'r10'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_ppc64","title":"linux_ppc64 <code>module-attribute</code>","text":"<pre><code>linux_ppc64 = ABI(['r3', 'r4', 'r5', 'r6', 'r7', 'r8', 'r9', 'r10'], 8, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_riscv32","title":"linux_riscv32 <code>module-attribute</code>","text":"<pre><code>linux_riscv32 = ABI(['a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_riscv64","title":"linux_riscv64 <code>module-attribute</code>","text":"<pre><code>linux_riscv64 = ABI(['a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7'], 8, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_i386_syscall","title":"linux_i386_syscall <code>module-attribute</code>","text":"<pre><code>linux_i386_syscall = SyscallABI(\n [\"eax\", \"ebx\", \"ecx\", \"edx\", \"esi\", \"edi\", \"ebp\"], 4, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_amd64_syscall","title":"linux_amd64_syscall <code>module-attribute</code>","text":"<pre><code>linux_amd64_syscall = SyscallABI(\n [\"rax\", \"rdi\", \"rsi\", \"rdx\", \"r10\", \"r8\", \"r9\"], 8, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_arm_syscall","title":"linux_arm_syscall <code>module-attribute</code>","text":"<pre><code>linux_arm_syscall = SyscallABI(\n [\"r7\", \"r0\", \"r1\", \"r2\", \"r3\", \"r4\", \"r5\", \"r6\"], 4, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_aarch64_syscall","title":"linux_aarch64_syscall <code>module-attribute</code>","text":"<pre><code>linux_aarch64_syscall = SyscallABI(\n [\"x8\", \"x0\", \"x1\", \"x2\", \"x3\", \"x4\", \"x5\"], 16, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_mips_syscall","title":"linux_mips_syscall <code>module-attribute</code>","text":"<pre><code>linux_mips_syscall = SyscallABI(['$v0', '$a0', '$a1', '$a2', '$a3'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_mips64_syscall","title":"linux_mips64_syscall <code>module-attribute</code>","text":"<pre><code>linux_mips64_syscall = SyscallABI(\n [\"$v0\", \"$a0\", \"$a1\", \"$a2\", \"$a3\", \"$a4\", \"$a5\"], 4, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_ppc_syscall","title":"linux_ppc_syscall <code>module-attribute</code>","text":"<pre><code>linux_ppc_syscall = SyscallABI(\n [\"r0\", \"r3\", \"r4\", \"r5\", \"r6\", \"r7\", \"r8\", \"r9\"], 4, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_ppc64_syscall","title":"linux_ppc64_syscall <code>module-attribute</code>","text":"<pre><code>linux_ppc64_syscall = SyscallABI(\n [\"r0\", \"r3\", \"r4\", \"r5\", \"r6\", \"r7\", \"r8\"], 8, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_riscv32_syscall","title":"linux_riscv32_syscall <code>module-attribute</code>","text":"<pre><code>linux_riscv32_syscall = SyscallABI(\n [\"a7\", \"a0\", \"a1\", \"a2\", \"a3\", \"a4\", \"a5\", \"a6\"], 4, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_riscv64_syscall","title":"linux_riscv64_syscall <code>module-attribute</code>","text":"<pre><code>linux_riscv64_syscall = SyscallABI(\n [\"a7\", \"a0\", \"a1\", \"a2\", \"a3\", \"a4\", \"a5\", \"a6\"], 8, 0\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_i386_sigreturn","title":"linux_i386_sigreturn <code>module-attribute</code>","text":"<pre><code>linux_i386_sigreturn = SigreturnABI(['eax'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_amd64_sigreturn","title":"linux_amd64_sigreturn <code>module-attribute</code>","text":"<pre><code>linux_amd64_sigreturn = SigreturnABI(['rax'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_arm_sigreturn","title":"linux_arm_sigreturn <code>module-attribute</code>","text":"<pre><code>linux_arm_sigreturn = SigreturnABI(['r7'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_i386_srop","title":"linux_i386_srop <code>module-attribute</code>","text":"<pre><code>linux_i386_srop = ABI(['eax'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_amd64_srop","title":"linux_amd64_srop <code>module-attribute</code>","text":"<pre><code>linux_amd64_srop = ABI(['rax'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.linux_arm_srop","title":"linux_arm_srop <code>module-attribute</code>","text":"<pre><code>linux_arm_srop = ABI(['r7'], 4, 0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.DEFAULT_ABIS","title":"DEFAULT_ABIS <code>module-attribute</code>","text":"<pre><code>DEFAULT_ABIS: dict[tuple[int, str, str], ABI] = {\n (32, \"i386\", \"linux\"): linux_i386,\n (64, \"x86-64\", \"linux\"): linux_amd64,\n (64, \"aarch64\", \"linux\"): linux_aarch64,\n (32, \"arm\", \"linux\"): linux_arm,\n (32, \"thumb\", \"linux\"): linux_arm,\n (32, \"mips\", \"linux\"): linux_mips,\n (64, \"mips\", \"linux\"): linux_mips64,\n (32, \"powerpc\", \"linux\"): linux_ppc,\n (64, \"powerpc\", \"linux\"): linux_ppc64,\n (32, \"rv32\", \"linux\"): linux_riscv32,\n (64, \"rv64\", \"linux\"): linux_riscv64,\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SYSCALL_ABIS","title":"SYSCALL_ABIS <code>module-attribute</code>","text":"<pre><code>SYSCALL_ABIS: dict[tuple[int, str, str], SyscallABI] = {\n (32, \"i386\", \"linux\"): linux_i386_syscall,\n (64, \"x86-64\", \"linux\"): linux_amd64_syscall,\n (64, \"aarch64\", \"linux\"): linux_aarch64_syscall,\n (32, \"arm\", \"linux\"): linux_arm_syscall,\n (32, \"thumb\", \"linux\"): linux_arm_syscall,\n (32, \"mips\", \"linux\"): linux_mips_syscall,\n (64, \"mips\", \"linux\"): linux_mips64_syscall,\n (32, \"powerpc\", \"linux\"): linux_ppc_syscall,\n (64, \"powerpc\", \"linux\"): linux_ppc64_syscall,\n (32, \"rv32\", \"linux\"): linux_riscv32_syscall,\n (64, \"rv64\", \"linux\"): linux_riscv64_syscall,\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SIGRETURN_ABIS","title":"SIGRETURN_ABIS <code>module-attribute</code>","text":"<pre><code>SIGRETURN_ABIS: dict[tuple[int, str, str], SigreturnABI] = {\n (32, \"i386\", \"linux\"): linux_i386_sigreturn,\n (64, \"x86-64\", \"linux\"): linux_amd64_sigreturn,\n (32, \"arm\", \"linux\"): linux_arm_sigreturn,\n (32, \"thumb\", \"linux\"): linux_arm_sigreturn,\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI","title":"ABI","text":"<pre><code>ABI(regs: list[str], align: int, minimum: int)\n</code></pre> <p>Encapsulates information about a calling convention.</p> <p>Methods:</p> <ul> <li> <code>default</code> \u2013 </li> <li> <code>syscall</code> \u2013 </li> <li> <code>sigreturn</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>returns</code> \u2013 </li> <li> <code>register_arguments</code> (<code>list[str]</code>) \u2013 </li> <li> <code>arg_alignment</code> \u2013 </li> <li> <code>stack_minimum</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI.returns","title":"returns <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>returns = True\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI.register_arguments","title":"register_arguments <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>register_arguments: list[str] = regs\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI.arg_alignment","title":"arg_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>arg_alignment = align\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI.stack_minimum","title":"stack_minimum <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>stack_minimum = minimum\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI.default","title":"default <code>staticmethod</code>","text":"<pre><code>default() -> ABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI.syscall","title":"syscall <code>staticmethod</code>","text":"<pre><code>syscall() -> SyscallABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.ABI.sigreturn","title":"sigreturn <code>staticmethod</code>","text":"<pre><code>sigreturn() -> SigreturnABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI","title":"SyscallABI","text":"<pre><code>SyscallABI(register_arguments: list[str], *a: Any, **kw: Any)\n</code></pre> <p> Bases: <code>ABI</code></p> <p>The syscall ABI treats the syscall number as the zeroth argument, which must be loaded into the specified register.</p> <p>Methods:</p> <ul> <li> <code>default</code> \u2013 </li> <li> <code>syscall</code> \u2013 </li> <li> <code>sigreturn</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>syscall_register</code> \u2013 </li> <li> <code>register_arguments</code> (<code>list[str]</code>) \u2013 </li> <li> <code>arg_alignment</code> \u2013 </li> <li> <code>stack_minimum</code> \u2013 </li> <li> <code>returns</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.syscall_register","title":"syscall_register <code>instance-attribute</code>","text":"<pre><code>syscall_register = pop(0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.register_arguments","title":"register_arguments <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>register_arguments: list[str] = regs\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.arg_alignment","title":"arg_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>arg_alignment = align\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.stack_minimum","title":"stack_minimum <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>stack_minimum = minimum\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.returns","title":"returns <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>returns = True\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.default","title":"default <code>staticmethod</code>","text":"<pre><code>default() -> ABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.syscall","title":"syscall <code>staticmethod</code>","text":"<pre><code>syscall() -> SyscallABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SyscallABI.sigreturn","title":"sigreturn <code>staticmethod</code>","text":"<pre><code>sigreturn() -> SigreturnABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI","title":"SigreturnABI","text":"<pre><code>SigreturnABI(register_arguments: list[str], *a: Any, **kw: Any)\n</code></pre> <p> Bases: <code>SyscallABI</code></p> <p>The sigreturn ABI is similar to the syscall ABI, except that both PC and SP are loaded from the stack. Because of this, there is no 'return' slot necessary on the stack.</p> <p>Methods:</p> <ul> <li> <code>default</code> \u2013 </li> <li> <code>syscall</code> \u2013 </li> <li> <code>sigreturn</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>returns</code> \u2013 </li> <li> <code>register_arguments</code> (<code>list[str]</code>) \u2013 </li> <li> <code>arg_alignment</code> \u2013 </li> <li> <code>stack_minimum</code> \u2013 </li> <li> <code>syscall_register</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.returns","title":"returns <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>returns = False\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.register_arguments","title":"register_arguments <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>register_arguments: list[str] = regs\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.arg_alignment","title":"arg_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>arg_alignment = align\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.stack_minimum","title":"stack_minimum <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>stack_minimum = minimum\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.syscall_register","title":"syscall_register <code>instance-attribute</code>","text":"<pre><code>syscall_register = pop(0)\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.default","title":"default <code>staticmethod</code>","text":"<pre><code>default() -> ABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.syscall","title":"syscall <code>staticmethod</code>","text":"<pre><code>syscall() -> SyscallABI\n</code></pre>"},{"location":"reference/pwndbg/lib/abi/#pwndbg.lib.abi.SigreturnABI.sigreturn","title":"sigreturn <code>staticmethod</code>","text":"<pre><code>sigreturn() -> SigreturnABI\n</code></pre>"},{"location":"reference/pwndbg/lib/android/","title":"pwndbg.lib.android","text":""},{"location":"reference/pwndbg/lib/android/#pwndbg.lib.android","title":"android","text":"<p>Functions:</p> <ul> <li> <code>aid_name</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>KNOWN_AIDS</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/android/#pwndbg.lib.android.KNOWN_AIDS","title":"KNOWN_AIDS <code>module-attribute</code>","text":"<pre><code>KNOWN_AIDS = {\n 0: \"AID_ROOT\",\n 1000: \"AID_SYSTEM\",\n 1001: \"AID_RADIO\",\n 1002: \"AID_BLUETOOTH\",\n 1003: \"AID_GRAPHICS\",\n 1004: \"AID_INPUT\",\n 1005: \"AID_AUDIO\",\n 1006: \"AID_CAMERA\",\n 1007: \"AID_LOG\",\n 1008: \"AID_COMPASS\",\n 1009: \"AID_MOUNT\",\n 1010: \"AID_WIFI\",\n 1011: \"AID_ADB\",\n 1012: \"AID_INSTALL\",\n 1013: \"AID_MEDIA\",\n 1014: \"AID_DHCP\",\n 1015: \"AID_SDCARD_RW\",\n 1016: \"AID_VPN\",\n 1017: \"AID_KEYSTORE\",\n 1018: \"AID_USB\",\n 1019: \"AID_DRM\",\n 1020: \"AID_MDNSR\",\n 1021: \"AID_GPS\",\n 1022: \"AID_UNUSED1\",\n 1023: \"AID_MEDIA_RW\",\n 1024: \"AID_MTP\",\n 1025: \"AID_UNUSED2\",\n 1026: \"AID_DRMRPC\",\n 1027: \"AID_NFC\",\n 1028: \"AID_SDCARD_R\",\n 1029: \"AID_CLAT\",\n 1030: \"AID_LOOP_RADIO\",\n 1031: \"AID_MEDIA_DRM\",\n 1032: \"AID_PACKAGE_INFO\",\n 1033: \"AID_SDCARD_PICS\",\n 1034: \"AID_SDCARD_AV\",\n 1035: \"AID_SDCARD_ALL\",\n 1036: \"AID_LOGD\",\n 1037: \"AID_SHARED_RELRO\",\n 1038: \"AID_DBUS\",\n 1039: \"AID_TLSDATE\",\n 1040: \"AID_MEDIA_EX\",\n 1041: \"AID_AUDIOSERVER\",\n 1042: \"AID_METRICS_COLL\",\n 1043: \"AID_METRICSD\",\n 1044: \"AID_WEBSERV\",\n 1045: \"AID_DEBUGGERD\",\n 1046: \"AID_MEDIA_CODEC\",\n 1047: \"AID_CAMERASERVER\",\n 1048: \"AID_FIREWALL\",\n 1049: \"AID_TRUNKS\",\n 1050: \"AID_NVRAM\",\n 2001: \"AID_CACHE\",\n 2002: \"AID_DIAG\",\n 2900: \"AID_OEM_RESERVED_START\",\n 2999: \"AID_OEM_RESERVED_END\",\n 3001: \"AID_NET_BT_ADMIN\",\n 3002: \"AID_NET_BT\",\n 3003: \"AID_INET\",\n 3004: \"AID_NET_RAW\",\n 3005: \"AID_NET_ADMIN\",\n 3006: \"AID_NET_BW_STATS\",\n 3007: \"AID_NET_BW_ACCT\",\n 3008: \"AID_NET_BT_STACK\",\n 3009: \"AID_READPROC\",\n 3010: \"AID_WAKELOCK\",\n 5000: \"AID_OEM_RESERVED_2_START\",\n 5999: \"AID_OEM_RESERVED_2_END\",\n 9997: \"AID_EVERYBODY\",\n 9998: \"AID_MISC\",\n 9999: \"AID_NOBODY\",\n 10000: \"AID_APP\",\n 50000: \"AID_SHARED_GID_START\",\n 59999: \"AID_SHARED_GID_END\",\n 99000: \"AID_ISOLATED_START\",\n 99999: \"AID_ISOLATED_END\",\n 100000: \"AID_USER\",\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/android/#pwndbg.lib.android.aid_name","title":"aid_name","text":"<pre><code>aid_name(uid: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/","title":"pwndbg.lib.arch","text":""},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch","title":"arch","text":"<p>Classes:</p> <ul> <li> <code>Arch</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code> \u2013 </li> <li> <code>PWNDBG_SUPPORTED_ARCHITECTURES</code> (<code>list[PWNDBG_SUPPORTED_ARCHITECTURES_TYPE]</code>) \u2013 </li> <li> <code>PWNLIB_ARCH_MAPPINGS</code> \u2013 </li> <li> <code>FMT_LITTLE_ENDIAN</code> \u2013 </li> <li> <code>FMT_BIG_ENDIAN</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.PWNDBG_SUPPORTED_ARCHITECTURES_TYPE","title":"PWNDBG_SUPPORTED_ARCHITECTURES_TYPE <code>module-attribute</code>","text":"<pre><code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = Literal[\n \"x86-64\",\n \"i386\",\n \"i8086\",\n \"mips\",\n \"aarch64\",\n \"arm\",\n \"armcm\",\n \"rv32\",\n \"rv64\",\n \"sparc\",\n \"powerpc\",\n \"loongarch64\",\n]\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.PWNDBG_SUPPORTED_ARCHITECTURES","title":"PWNDBG_SUPPORTED_ARCHITECTURES <code>module-attribute</code>","text":"<pre><code>PWNDBG_SUPPORTED_ARCHITECTURES: list[PWNDBG_SUPPORTED_ARCHITECTURES_TYPE] = (\n list(get_args(PWNDBG_SUPPORTED_ARCHITECTURES_TYPE))\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.PWNLIB_ARCH_MAPPINGS","title":"PWNLIB_ARCH_MAPPINGS <code>module-attribute</code>","text":"<pre><code>PWNLIB_ARCH_MAPPINGS = {\n \"x86-64\": \"amd64\",\n \"i386\": \"i386\",\n \"i8086\": \"none\",\n \"mips\": \"mips\",\n \"aarch64\": \"aarch64\",\n \"arm\": \"arm\",\n \"armcm\": \"thumb\",\n \"rv32\": \"riscv32\",\n \"rv64\": \"riscv64\",\n \"powerpc\": \"powerpc\",\n \"sparc\": \"sparc\",\n \"loongarch64\": \"none\",\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.FMT_LITTLE_ENDIAN","title":"FMT_LITTLE_ENDIAN <code>module-attribute</code>","text":"<pre><code>FMT_LITTLE_ENDIAN = {1: 'B', 2: '<H', 4: '<I', 8: '<Q'}\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.FMT_BIG_ENDIAN","title":"FMT_BIG_ENDIAN <code>module-attribute</code>","text":"<pre><code>FMT_BIG_ENDIAN = {1: 'B', 2: '>H', 4: '>I', 8: '>Q'}\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Arch","title":"Arch","text":"<pre><code>Arch(\n arch_name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,\n ptrsize: int,\n endian: Literal[\"little\", \"big\"],\n)\n</code></pre> <p>Methods:</p> <ul> <li> <code>update</code> \u2013 </li> <li> <code>pack</code> \u2013 </li> <li> <code>unpack</code> \u2013 </li> <li> <code>pack_size</code> \u2013 </li> <li> <code>unpack_size</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>native_endian</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Arch.native_endian","title":"native_endian <code>instance-attribute</code>","text":"<pre><code>native_endian = str(byteorder)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Arch.update","title":"update","text":"<pre><code>update(\n arch_name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,\n ptrsize: int,\n endian: Literal[\"little\", \"big\"],\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -> bytes\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -> bytes\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/","title":"pwndbg.lib.cache","text":""},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache","title":"cache","text":"<p>Caches return values until some event in the inferior happens, e.g. execution stops because of a SIGINT or breakpoint, or a new library/objfile are loaded, etc.</p> <p>Classes:</p> <ul> <li> <code>DebugCacheDict</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>connect_clear_caching_events</code> \u2013 <p>Connect given debugger event hooks to correspoonding _CacheUntilEvent instances</p> </li> <li> <code>cache_until</code> \u2013 </li> <li> <code>clear_caches</code> \u2013 </li> <li> <code>clear_cache</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>T</code> \u2013 </li> <li> <code>P</code> \u2013 </li> <li> <code>debug</code> \u2013 </li> <li> <code>debug_name</code> \u2013 </li> <li> <code>Cache</code> \u2013 </li> <li> <code>IS_CACHING</code> \u2013 </li> <li> <code>IS_CACHING_DISABLED_FOR</code> (<code>dict[str, bool]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.debug","title":"debug <code>module-attribute</code>","text":"<pre><code>debug = NO_DEBUG\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.debug_name","title":"debug_name <code>module-attribute</code>","text":"<pre><code>debug_name = 'regs'\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.Cache","title":"Cache <code>module-attribute</code>","text":"<pre><code>Cache = Union[Dict[Tuple[Any, ...], Any], DebugCacheDict]\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.IS_CACHING","title":"IS_CACHING <code>module-attribute</code>","text":"<pre><code>IS_CACHING = True\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.IS_CACHING_DISABLED_FOR","title":"IS_CACHING_DISABLED_FOR <code>module-attribute</code>","text":"<pre><code>IS_CACHING_DISABLED_FOR: dict[str, bool] = {\n \"stop\": False,\n \"exit\": False,\n \"objfile\": False,\n \"start\": False,\n \"cont\": False,\n \"thread\": False,\n \"prompt\": False,\n \"forever\": False,\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict","title":"DebugCacheDict","text":"<pre><code>DebugCacheDict(func: Callable[P, T], *args: Any, **kwargs: Any)\n</code></pre> <p> Bases: <code>UserDict</code></p> <p>Methods:</p> <ul> <li> <code>__getitem__</code> \u2013 </li> <li> <code>__setitem__</code> \u2013 </li> <li> <code>clear</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>hits</code> \u2013 </li> <li> <code>misses</code> \u2013 </li> <li> <code>func</code> \u2013 </li> <li> <code>name</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.hits","title":"hits <code>instance-attribute</code>","text":"<pre><code>hits = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.misses","title":"misses <code>instance-attribute</code>","text":"<pre><code>misses = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.func","title":"func <code>instance-attribute</code>","text":"<pre><code>func = func\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name = f'{split('.')[-1]}.{__name__}'\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: tuple[Any, ...]) -> Any\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.__setitem__","title":"__setitem__","text":"<pre><code>__setitem__(key: tuple[Any, ...], value: Any) -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.clear","title":"clear","text":"<pre><code>clear() -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.connect_clear_caching_events","title":"connect_clear_caching_events","text":"<pre><code>connect_clear_caching_events(\n event_dicts: dict[str, tuple[Any, ...]], **kwargs: Any\n) -> None\n</code></pre> <p>Connect given debugger event hooks to correspoonding _CacheUntilEvent instances</p>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.cache_until","title":"cache_until","text":"<pre><code>cache_until(\n *event_names: str,\n) -> Callable[[Callable[P, T]], Callable[P, T]]\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.clear_caches","title":"clear_caches","text":"<pre><code>clear_caches() -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.clear_cache","title":"clear_cache","text":"<pre><code>clear_cache(cache_name: str) -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/common/","title":"pwndbg.lib.common","text":""},{"location":"reference/pwndbg/lib/common/#pwndbg.lib.common","title":"common","text":"<p>Functions:</p> <ul> <li> <code>hex2ptr_common</code> \u2013 <p>Converts a hex string to a little-endian integer address.</p> </li> </ul>"},{"location":"reference/pwndbg/lib/common/#pwndbg.lib.common.hex2ptr_common","title":"hex2ptr_common","text":"<pre><code>hex2ptr_common(arg: str) -> int\n</code></pre> <p>Converts a hex string to a little-endian integer address.</p>"},{"location":"reference/pwndbg/lib/config/","title":"pwndbg.lib.config","text":""},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config","title":"config","text":"<p>Classes:</p> <ul> <li> <code>Parameter</code> \u2013 </li> <li> <code>Config</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>T</code> \u2013 </li> <li> <code>PARAM_BOOLEAN</code> \u2013 </li> <li> <code>PARAM_ZINTEGER</code> \u2013 </li> <li> <code>PARAM_STRING</code> \u2013 </li> <li> <code>PARAM_ZUINTEGER</code> \u2013 </li> <li> <code>PARAM_ENUM</code> \u2013 </li> <li> <code>PARAM_OPTIONAL_FILENAME</code> \u2013 </li> <li> <code>PARAM_AUTO_BOOLEAN</code> \u2013 </li> <li> <code>PARAM_ZUINTEGER_UNLIMITED</code> \u2013 </li> <li> <code>PARAM_INTEGER</code> \u2013 </li> <li> <code>PARAM_UINTEGER</code> \u2013 </li> <li> <code>PARAM_CLASSES</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_BOOLEAN","title":"PARAM_BOOLEAN <code>module-attribute</code>","text":"<pre><code>PARAM_BOOLEAN = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_ZINTEGER","title":"PARAM_ZINTEGER <code>module-attribute</code>","text":"<pre><code>PARAM_ZINTEGER = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_STRING","title":"PARAM_STRING <code>module-attribute</code>","text":"<pre><code>PARAM_STRING = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_ZUINTEGER","title":"PARAM_ZUINTEGER <code>module-attribute</code>","text":"<pre><code>PARAM_ZUINTEGER = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_ENUM","title":"PARAM_ENUM <code>module-attribute</code>","text":"<pre><code>PARAM_ENUM = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_OPTIONAL_FILENAME","title":"PARAM_OPTIONAL_FILENAME <code>module-attribute</code>","text":"<pre><code>PARAM_OPTIONAL_FILENAME = 5\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_AUTO_BOOLEAN","title":"PARAM_AUTO_BOOLEAN <code>module-attribute</code>","text":"<pre><code>PARAM_AUTO_BOOLEAN = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_ZUINTEGER_UNLIMITED","title":"PARAM_ZUINTEGER_UNLIMITED <code>module-attribute</code>","text":"<pre><code>PARAM_ZUINTEGER_UNLIMITED = 7\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_INTEGER","title":"PARAM_INTEGER <code>module-attribute</code>","text":"<pre><code>PARAM_INTEGER = 8\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_UINTEGER","title":"PARAM_UINTEGER <code>module-attribute</code>","text":"<pre><code>PARAM_UINTEGER = 9\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.PARAM_CLASSES","title":"PARAM_CLASSES <code>module-attribute</code>","text":"<pre><code>PARAM_CLASSES = {bool: PARAM_BOOLEAN, int: PARAM_ZINTEGER, str: PARAM_STRING}\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter","title":"Parameter","text":"<pre><code>Parameter(\n name: str,\n default: Any,\n set_show_doc: str,\n *,\n help_docstring: str = \"\",\n param_class: int | None = None,\n enum_sequence: Sequence[str] | None = None,\n scope: str = \"config\",\n)\n</code></pre> <p>Methods:</p> <ul> <li> <code>add_update_listener</code> \u2013 </li> <li> <code>revert_default</code> \u2013 </li> <li> <code>attr_name</code> \u2013 <p>Returns the attribute name associated with this config option,</p> </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>pretty_val</code> \u2013 <p>Convert a value this object could contain to its pretty string representation.</p> </li> <li> <code>pretty</code> \u2013 </li> <li> <code>pretty_default</code> \u2013 </li> <li> <code>__int__</code> \u2013 </li> <li> <code>__str__</code> \u2013 </li> <li> <code>__bool__</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>__lt__</code> \u2013 </li> <li> <code>__add__</code> \u2013 </li> <li> <code>__radd__</code> \u2013 </li> <li> <code>__sub__</code> \u2013 </li> <li> <code>__rsub__</code> \u2013 </li> <li> <code>__mul__</code> \u2013 </li> <li> <code>__rmul__</code> \u2013 </li> <li> <code>__div__</code> \u2013 </li> <li> <code>__floordiv__</code> \u2013 </li> <li> <code>__pow__</code> \u2013 </li> <li> <code>__mod__</code> \u2013 </li> <li> <code>__len__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>name</code> \u2013 </li> <li> <code>default</code> \u2013 </li> <li> <code>param_class</code> \u2013 </li> <li> <code>set_show_doc</code> \u2013 </li> <li> <code>help_docstring</code> \u2013 </li> <li> <code>enum_sequence</code> \u2013 </li> <li> <code>scope</code> \u2013 </li> <li> <code>update_listeners</code> (<code>list[Callable[[Any], None]]</code>) \u2013 </li> <li> <code>value</code> (<code>Any</code>) \u2013 </li> <li> <code>is_changed</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name = name\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.default","title":"default <code>instance-attribute</code>","text":"<pre><code>default = default\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.param_class","title":"param_class <code>instance-attribute</code>","text":"<pre><code>param_class = param_class or PARAM_CLASSES[type(default)]\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.set_show_doc","title":"set_show_doc <code>instance-attribute</code>","text":"<pre><code>set_show_doc = strip()\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.help_docstring","title":"help_docstring <code>instance-attribute</code>","text":"<pre><code>help_docstring = strip()\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.enum_sequence","title":"enum_sequence <code>instance-attribute</code>","text":"<pre><code>enum_sequence = enum_sequence\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.scope","title":"scope <code>instance-attribute</code>","text":"<pre><code>scope = scope\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.update_listeners","title":"update_listeners <code>instance-attribute</code>","text":"<pre><code>update_listeners: list[Callable[[Any], None]] = []\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.value","title":"value <code>property</code> <code>writable</code>","text":"<pre><code>value: Any\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.is_changed","title":"is_changed <code>property</code>","text":"<pre><code>is_changed: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.add_update_listener","title":"add_update_listener","text":"<pre><code>add_update_listener(listener: Callable[[Any], None]) -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.revert_default","title":"revert_default","text":"<pre><code>revert_default() -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.attr_name","title":"attr_name","text":"<pre><code>attr_name() -> str\n</code></pre> <p>Returns the attribute name associated with this config option, i.e. <code>my-config</code> has the attribute name <code>my_config</code></p>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.pretty_val","title":"pretty_val","text":"<pre><code>pretty_val(val: Any) -> str\n</code></pre> <p>Convert a value this object could contain to its pretty string representation.</p>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.pretty","title":"pretty","text":"<pre><code>pretty() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.pretty_default","title":"pretty_default","text":"<pre><code>pretty_default() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__int__","title":"__int__","text":"<pre><code>__int__() -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__bool__","title":"__bool__","text":"<pre><code>__bool__() -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__lt__","title":"__lt__","text":"<pre><code>__lt__(other: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__add__","title":"__add__","text":"<pre><code>__add__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__radd__","title":"__radd__","text":"<pre><code>__radd__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__sub__","title":"__sub__","text":"<pre><code>__sub__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__rsub__","title":"__rsub__","text":"<pre><code>__rsub__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__mul__","title":"__mul__","text":"<pre><code>__mul__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__rmul__","title":"__rmul__","text":"<pre><code>__rmul__(other: int) -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__div__","title":"__div__","text":"<pre><code>__div__(other: float) -> float\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__floordiv__","title":"__floordiv__","text":"<pre><code>__floordiv__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__pow__","title":"__pow__","text":"<pre><code>__pow__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__mod__","title":"__mod__","text":"<pre><code>__mod__(other: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__len__","title":"__len__","text":"<pre><code>__len__() -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config","title":"Config","text":"<pre><code>Config()\n</code></pre> <p>Methods:</p> <ul> <li> <code>add_param</code> \u2013 </li> <li> <code>add_param_obj</code> \u2013 </li> <li> <code>trigger</code> \u2013 </li> <li> <code>get_params</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>__setattr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>params</code> (<code>dict[str, Parameter]</code>) \u2013 </li> <li> <code>triggers</code> (<code>DefaultDict[str, list[Callable[..., Any]]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.params","title":"params <code>instance-attribute</code>","text":"<pre><code>params: dict[str, Parameter] = {}\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.triggers","title":"triggers <code>instance-attribute</code>","text":"<pre><code>triggers: DefaultDict[str, list[Callable[..., Any]]] = defaultdict(list)\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.add_param","title":"add_param","text":"<pre><code>add_param(\n name: str,\n default: Any,\n set_show_doc: str,\n *,\n help_docstring: str = \"\",\n param_class: int | None = None,\n enum_sequence: Sequence[str] | None = None,\n scope: str = \"config\",\n) -> Parameter\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.add_param_obj","title":"add_param_obj","text":"<pre><code>add_param_obj(p: Parameter) -> Parameter\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.trigger","title":"trigger","text":"<pre><code>trigger(*params: Parameter) -> Callable[[Callable[..., T]], Callable[..., T]]\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.get_params","title":"get_params","text":"<pre><code>get_params(scope: str) -> list[Parameter]\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str) -> Parameter\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.__setattr__","title":"__setattr__","text":"<pre><code>__setattr__(attr, val)\n</code></pre>"},{"location":"reference/pwndbg/lib/disasm/","title":"pwndbg.lib.disasm","text":""},{"location":"reference/pwndbg/lib/disasm/#pwndbg.lib.disasm","title":"disasm","text":"<p>Modules:</p> <ul> <li> <code>helpers</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/disasm/helpers/","title":"pwndbg.lib.disasm.helpers","text":""},{"location":"reference/pwndbg/lib/disasm/helpers/#pwndbg.lib.disasm.helpers","title":"helpers","text":"<p>Functions:</p> <ul> <li> <code>to_signed</code> \u2013 <p>Returns the signed number associated with the two's-complement binary representation of <code>unsigned</code></p> </li> <li> <code>logical_shift_left</code> \u2013 </li> <li> <code>logical_shift_right</code> \u2013 <p><code>n</code> is truncated to the width of <code>bit_width</code> before the operation takes place.</p> </li> <li> <code>rotate_right</code> \u2013 <p><code>n</code> is truncated to the width of <code>bit_width</code> before the operation takes place.</p> </li> <li> <code>arithmetic_shift_right</code> \u2013 <p>This returns the value represented by the two's-complement binary representation of the final result.</p> </li> </ul>"},{"location":"reference/pwndbg/lib/disasm/helpers/#pwndbg.lib.disasm.helpers.to_signed","title":"to_signed","text":"<pre><code>to_signed(unsigned: int, bit_width: int)\n</code></pre> <p>Returns the signed number associated with the two's-complement binary representation of <code>unsigned</code></p>"},{"location":"reference/pwndbg/lib/disasm/helpers/#pwndbg.lib.disasm.helpers.logical_shift_left","title":"logical_shift_left","text":"<pre><code>logical_shift_left(n: int, shift_amt: int, bit_width: int)\n</code></pre>"},{"location":"reference/pwndbg/lib/disasm/helpers/#pwndbg.lib.disasm.helpers.logical_shift_right","title":"logical_shift_right","text":"<pre><code>logical_shift_right(n: int, shift_amt: int, bit_width: int)\n</code></pre> <p><code>n</code> is truncated to the width of <code>bit_width</code> before the operation takes place.</p>"},{"location":"reference/pwndbg/lib/disasm/helpers/#pwndbg.lib.disasm.helpers.rotate_right","title":"rotate_right","text":"<pre><code>rotate_right(n: int, shift_amt: int, bit_width: int)\n</code></pre> <p><code>n</code> is truncated to the width of <code>bit_width</code> before the operation takes place.</p>"},{"location":"reference/pwndbg/lib/disasm/helpers/#pwndbg.lib.disasm.helpers.arithmetic_shift_right","title":"arithmetic_shift_right","text":"<pre><code>arithmetic_shift_right(n: int, shift_amt: int, bit_width: int)\n</code></pre> <p>This returns the value represented by the two's-complement binary representation of the final result. This means the result could be negative (if the top bit of the input is negative)</p> <p><code>n</code> is truncated to the width of <code>bit_width</code> before the operation takes place.</p>"},{"location":"reference/pwndbg/lib/elftypes/","title":"pwndbg.lib.elftypes","text":""},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes","title":"elftypes","text":"<p>Classes:</p> <ul> <li> <code>constants</code> \u2013 </li> <li> <code>Elf32_Ehdr</code> \u2013 </li> <li> <code>Elf64_Ehdr</code> \u2013 </li> <li> <code>Elf32_Phdr</code> \u2013 </li> <li> <code>Elf64_Phdr</code> \u2013 </li> <li> <code>AUXV</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>Elf32_Addr</code> \u2013 </li> <li> <code>Elf32_Half</code> \u2013 </li> <li> <code>Elf32_Off</code> \u2013 </li> <li> <code>Elf32_Sword</code> \u2013 </li> <li> <code>Elf32_Word</code> \u2013 </li> <li> <code>Elf64_Addr</code> \u2013 </li> <li> <code>Elf64_Half</code> \u2013 </li> <li> <code>Elf64_SHalf</code> \u2013 </li> <li> <code>Elf64_Off</code> \u2013 </li> <li> <code>Elf64_Sword</code> \u2013 </li> <li> <code>Elf64_Word</code> \u2013 </li> <li> <code>Elf64_Xword</code> \u2013 </li> <li> <code>Elf64_Sxword</code> \u2013 </li> <li> <code>AT_CONSTANTS</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>AT_CONSTANT_NAMES</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf32_Addr","title":"Elf32_Addr <code>module-attribute</code>","text":"<pre><code>Elf32_Addr = c_uint32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf32_Half","title":"Elf32_Half <code>module-attribute</code>","text":"<pre><code>Elf32_Half = c_uint16\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf32_Off","title":"Elf32_Off <code>module-attribute</code>","text":"<pre><code>Elf32_Off = c_uint32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf32_Sword","title":"Elf32_Sword <code>module-attribute</code>","text":"<pre><code>Elf32_Sword = c_int32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf32_Word","title":"Elf32_Word <code>module-attribute</code>","text":"<pre><code>Elf32_Word = c_uint32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Addr","title":"Elf64_Addr <code>module-attribute</code>","text":"<pre><code>Elf64_Addr = c_uint64\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Half","title":"Elf64_Half <code>module-attribute</code>","text":"<pre><code>Elf64_Half = c_uint16\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_SHalf","title":"Elf64_SHalf <code>module-attribute</code>","text":"<pre><code>Elf64_SHalf = c_int16\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Off","title":"Elf64_Off <code>module-attribute</code>","text":"<pre><code>Elf64_Off = c_uint64\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Sword","title":"Elf64_Sword <code>module-attribute</code>","text":"<pre><code>Elf64_Sword = c_int32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Word","title":"Elf64_Word <code>module-attribute</code>","text":"<pre><code>Elf64_Word = c_uint32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Xword","title":"Elf64_Xword <code>module-attribute</code>","text":"<pre><code>Elf64_Xword = c_uint64\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Sxword","title":"Elf64_Sxword <code>module-attribute</code>","text":"<pre><code>Elf64_Sxword = c_int64\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AT_CONSTANTS","title":"AT_CONSTANTS <code>module-attribute</code>","text":"<pre><code>AT_CONSTANTS: dict[int, str] = {\n 0: \"AT_NULL\",\n 1: \"AT_IGNORE\",\n 2: \"AT_EXECFD\",\n 3: \"AT_PHDR\",\n 4: \"AT_PHENT\",\n 5: \"AT_PHNUM\",\n 6: \"AT_PAGESZ\",\n 7: \"AT_BASE\",\n 8: \"AT_FLAGS\",\n 9: \"AT_ENTRY\",\n 10: \"AT_NOTELF\",\n 11: \"AT_UID\",\n 12: \"AT_EUID\",\n 13: \"AT_GID\",\n 14: \"AT_EGID\",\n 15: \"AT_PLATFORM\",\n 16: \"AT_HWCAP\",\n 17: \"AT_CLKTCK\",\n 18: \"AT_FPUCW\",\n 19: \"AT_DCACHEBSIZE\",\n 20: \"AT_ICACHEBSIZE\",\n 21: \"AT_UCACHEBSIZE\",\n 22: \"AT_IGNOREPPC\",\n 23: \"AT_SECURE\",\n 24: \"AT_BASE_PLATFORM\",\n 25: \"AT_RANDOM\",\n 26: \"AT_HWCAP2\",\n 27: \"AT_RSEQ_FEATURE_SIZE\",\n 28: \"AT_RSEQ_ALIGN\",\n 29: \"AT_HWCAP3\",\n 30: \"AT_HWCAP4\",\n 31: \"AT_EXECFN\",\n 32: \"AT_SYSINFO\",\n 33: \"AT_SYSINFO_EHDR\",\n 34: \"AT_L1I_CACHESHAPE\",\n 35: \"AT_L1D_CACHESHAPE\",\n 36: \"AT_L2_CACHESHAPE\",\n 37: \"AT_L3_CACHESHAPE\",\n 40: \"AT_L1I_CACHESIZE\",\n 41: \"AT_L1I_CACHEGEOMETRY\",\n 42: \"AT_L1D_CACHESIZE\",\n 43: \"AT_L1D_CACHEGEOMETRY\",\n 44: \"AT_L2_CACHESIZE\",\n 45: \"AT_L2_CACHEGEOMETRY\",\n 46: \"AT_L3_CACHESIZE\",\n 47: \"AT_L3_CACHEGEOMETRY\",\n 51: \"AT_MINSIGSTKSZ\",\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AT_CONSTANT_NAMES","title":"AT_CONSTANT_NAMES <code>module-attribute</code>","text":"<pre><code>AT_CONSTANT_NAMES = {v: _Dfor (k, v) in items()}\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants","title":"constants","text":"<p>Attributes:</p> <ul> <li> <code>EI_MAG0</code> \u2013 </li> <li> <code>EI_MAG1</code> \u2013 </li> <li> <code>EI_MAG2</code> \u2013 </li> <li> <code>EI_MAG3</code> \u2013 </li> <li> <code>EI_CLASS</code> \u2013 </li> <li> <code>EI_DATA</code> \u2013 </li> <li> <code>EI_VERSION</code> \u2013 </li> <li> <code>EI_OSABI</code> \u2013 </li> <li> <code>EI_ABIVERSION</code> \u2013 </li> <li> <code>EI_PAD</code> \u2013 </li> <li> <code>EI_NIDENT</code> \u2013 </li> <li> <code>ELFMAG0</code> \u2013 </li> <li> <code>ELFMAG1</code> \u2013 </li> <li> <code>ELFMAG2</code> \u2013 </li> <li> <code>ELFMAG3</code> \u2013 </li> <li> <code>ELFCLASSNONE</code> \u2013 </li> <li> <code>ELFCLASS32</code> \u2013 </li> <li> <code>ELFCLASS64</code> \u2013 </li> <li> <code>ELFDATANONE</code> \u2013 </li> <li> <code>ELFDATA2LSB</code> \u2013 </li> <li> <code>ELFDATA2MSB</code> \u2013 </li> <li> <code>PT_NULL</code> \u2013 </li> <li> <code>PT_LOAD</code> \u2013 </li> <li> <code>PT_DYNAMIC</code> \u2013 </li> <li> <code>PT_INTERP</code> \u2013 </li> <li> <code>PT_NOTE</code> \u2013 </li> <li> <code>PT_SHLIB</code> \u2013 </li> <li> <code>PT_PHDR</code> \u2013 </li> <li> <code>PT_TLS</code> \u2013 </li> <li> <code>ET_NONE</code> \u2013 </li> <li> <code>ET_REL</code> \u2013 </li> <li> <code>ET_EXEC</code> \u2013 </li> <li> <code>ET_DYN</code> \u2013 </li> <li> <code>ET_CORE</code> \u2013 </li> <li> <code>DT_NULL</code> \u2013 </li> <li> <code>DT_NEEDED</code> \u2013 </li> <li> <code>DT_PLTRELSZ</code> \u2013 </li> <li> <code>DT_PLTGOT</code> \u2013 </li> <li> <code>DT_HASH</code> \u2013 </li> <li> <code>DT_STRTAB</code> \u2013 </li> <li> <code>DT_SYMTAB</code> \u2013 </li> <li> <code>DT_RELA</code> \u2013 </li> <li> <code>DT_RELASZ</code> \u2013 </li> <li> <code>DT_RELAENT</code> \u2013 </li> <li> <code>DT_STRSZ</code> \u2013 </li> <li> <code>DT_SYMENT</code> \u2013 </li> <li> <code>DT_INIT</code> \u2013 </li> <li> <code>DT_FINI</code> \u2013 </li> <li> <code>DT_SONAME</code> \u2013 </li> <li> <code>DT_RPATH</code> \u2013 </li> <li> <code>DT_SYMBOLIC</code> \u2013 </li> <li> <code>DT_REL</code> \u2013 </li> <li> <code>DT_RELSZ</code> \u2013 </li> <li> <code>DT_RELENT</code> \u2013 </li> <li> <code>DT_PLTREL</code> \u2013 </li> <li> <code>DT_DEBUG</code> \u2013 </li> <li> <code>DT_TEXTREL</code> \u2013 </li> <li> <code>DT_JMPREL</code> \u2013 </li> <li> <code>DT_ENCODING</code> \u2013 </li> <li> <code>SHT_NULL</code> \u2013 </li> <li> <code>SHT_PROGBITS</code> \u2013 </li> <li> <code>SHT_SYMTAB</code> \u2013 </li> <li> <code>SHT_STRTAB</code> \u2013 </li> <li> <code>SHT_RELA</code> \u2013 </li> <li> <code>SHT_HASH</code> \u2013 </li> <li> <code>SHT_DYNAMIC</code> \u2013 </li> <li> <code>SHT_NOTE</code> \u2013 </li> <li> <code>SHT_NOBITS</code> \u2013 </li> <li> <code>SHT_REL</code> \u2013 </li> <li> <code>SHT_SHLIB</code> \u2013 </li> <li> <code>SHT_DYNSYM</code> \u2013 </li> <li> <code>SHT_NUM</code> \u2013 </li> <li> <code>STT_NOTYPE</code> \u2013 </li> <li> <code>STT_OBJECT</code> \u2013 </li> <li> <code>STT_FUNC</code> \u2013 </li> <li> <code>STT_SECTION</code> \u2013 </li> <li> <code>STT_FILE</code> \u2013 </li> <li> <code>STT_COMMON</code> \u2013 </li> <li> <code>STT_TLS</code> \u2013 </li> <li> <code>NT_PRSTATUS</code> \u2013 </li> <li> <code>NT_PRFPREG</code> \u2013 </li> <li> <code>NT_PRPSINFO</code> \u2013 </li> <li> <code>NT_TASKSTRUCT</code> \u2013 </li> <li> <code>NT_AUXV</code> \u2013 </li> <li> <code>NT_SIGINFO</code> \u2013 </li> <li> <code>NT_FILE</code> \u2013 </li> <li> <code>NT_PRXFPREG</code> \u2013 </li> <li> <code>NT_PPC_VMX</code> \u2013 </li> <li> <code>NT_PPC_SPE</code> \u2013 </li> <li> <code>NT_PPC_VSX</code> \u2013 </li> <li> <code>NT_386_TLS</code> \u2013 </li> <li> <code>NT_386_IOPERM</code> \u2013 </li> <li> <code>NT_X86_XSTATE</code> \u2013 </li> <li> <code>NT_S390_HIGH_GPRS</code> \u2013 </li> <li> <code>NT_S390_TIMER</code> \u2013 </li> <li> <code>NT_S390_TODCMP</code> \u2013 </li> <li> <code>NT_S390_TODPREG</code> \u2013 </li> <li> <code>NT_S390_CTRS</code> \u2013 </li> <li> <code>NT_S390_PREFIX</code> \u2013 </li> <li> <code>NT_S390_LAST_BREAK</code> \u2013 </li> <li> <code>NT_S390_SYSTEM_CALL</code> \u2013 </li> <li> <code>NT_S390_TDB</code> \u2013 </li> <li> <code>NT_ARM_VFP</code> \u2013 </li> <li> <code>NT_ARM_TLS</code> \u2013 </li> <li> <code>NT_ARM_HW_BREAK</code> \u2013 </li> <li> <code>NT_ARM_HW_WATCH</code> \u2013 </li> <li> <code>NT_METAG_CBUF</code> \u2013 </li> <li> <code>NT_METAG_RPIPE</code> \u2013 </li> <li> <code>NT_METAG_TLS</code> \u2013 </li> <li> <code>AT_NULL</code> \u2013 </li> <li> <code>AT_IGNORE</code> \u2013 </li> <li> <code>AT_EXECFD</code> \u2013 </li> <li> <code>AT_PHDR</code> \u2013 </li> <li> <code>AT_PHENT</code> \u2013 </li> <li> <code>AT_PHNUM</code> \u2013 </li> <li> <code>AT_PAGESZ</code> \u2013 </li> <li> <code>AT_BASE</code> \u2013 </li> <li> <code>AT_FLAGS</code> \u2013 </li> <li> <code>AT_ENTRY</code> \u2013 </li> <li> <code>AT_NOTELF</code> \u2013 </li> <li> <code>AT_UID</code> \u2013 </li> <li> <code>AT_EUID</code> \u2013 </li> <li> <code>AT_GID</code> \u2013 </li> <li> <code>AT_EGID</code> \u2013 </li> <li> <code>AT_PLATFORM</code> \u2013 </li> <li> <code>AT_HWCAP</code> \u2013 </li> <li> <code>AT_CLKTCK</code> \u2013 </li> <li> <code>AT_FPUCW</code> \u2013 </li> <li> <code>AT_DCACHEBSIZE</code> \u2013 </li> <li> <code>AT_ICACHEBSIZE</code> \u2013 </li> <li> <code>AT_UCACHEBSIZE</code> \u2013 </li> <li> <code>AT_IGNOREPPC</code> \u2013 </li> <li> <code>AT_SECURE</code> \u2013 </li> <li> <code>AT_BASE_PLATFORM</code> \u2013 </li> <li> <code>AT_RANDOM</code> \u2013 </li> <li> <code>AT_EXECFN</code> \u2013 </li> <li> <code>AT_SYSINFO</code> \u2013 </li> <li> <code>AT_SYSINFO_EHDR</code> \u2013 </li> <li> <code>AT_L1I_CACHESHAPE</code> \u2013 </li> <li> <code>AT_L1D_CACHESHAPE</code> \u2013 </li> <li> <code>AT_L2_CACHESHAPE</code> \u2013 </li> <li> <code>AT_L3_CACHESHAPE</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_MAG0","title":"EI_MAG0 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_MAG0 = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_MAG1","title":"EI_MAG1 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_MAG1 = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_MAG2","title":"EI_MAG2 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_MAG2 = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_MAG3","title":"EI_MAG3 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_MAG3 = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_CLASS","title":"EI_CLASS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_CLASS = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_DATA","title":"EI_DATA <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_DATA = 5\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_VERSION","title":"EI_VERSION <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_VERSION = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_OSABI","title":"EI_OSABI <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_OSABI = 7\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_ABIVERSION","title":"EI_ABIVERSION <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_ABIVERSION = 8\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_PAD","title":"EI_PAD <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_PAD = 9\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.EI_NIDENT","title":"EI_NIDENT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>EI_NIDENT = 16\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFMAG0","title":"ELFMAG0 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFMAG0 = 127\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFMAG1","title":"ELFMAG1 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFMAG1 = ord('E')\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFMAG2","title":"ELFMAG2 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFMAG2 = ord('L')\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFMAG3","title":"ELFMAG3 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFMAG3 = ord('F')\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFCLASSNONE","title":"ELFCLASSNONE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFCLASSNONE = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFCLASS32","title":"ELFCLASS32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFCLASS32 = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFCLASS64","title":"ELFCLASS64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFCLASS64 = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFDATANONE","title":"ELFDATANONE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFDATANONE = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFDATA2LSB","title":"ELFDATA2LSB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFDATA2LSB = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ELFDATA2MSB","title":"ELFDATA2MSB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ELFDATA2MSB = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_NULL","title":"PT_NULL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_NULL = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_LOAD","title":"PT_LOAD <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_LOAD = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_DYNAMIC","title":"PT_DYNAMIC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_DYNAMIC = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_INTERP","title":"PT_INTERP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_INTERP = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_NOTE","title":"PT_NOTE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_NOTE = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_SHLIB","title":"PT_SHLIB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_SHLIB = 5\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_PHDR","title":"PT_PHDR <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_PHDR = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.PT_TLS","title":"PT_TLS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PT_TLS = 7\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ET_NONE","title":"ET_NONE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ET_NONE = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ET_REL","title":"ET_REL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ET_REL = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ET_EXEC","title":"ET_EXEC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ET_EXEC = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ET_DYN","title":"ET_DYN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ET_DYN = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.ET_CORE","title":"ET_CORE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ET_CORE = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_NULL","title":"DT_NULL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_NULL = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_NEEDED","title":"DT_NEEDED <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_NEEDED = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_PLTRELSZ","title":"DT_PLTRELSZ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_PLTRELSZ = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_PLTGOT","title":"DT_PLTGOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_PLTGOT = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_HASH","title":"DT_HASH <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_HASH = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_STRTAB","title":"DT_STRTAB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_STRTAB = 5\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_SYMTAB","title":"DT_SYMTAB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_SYMTAB = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_RELA","title":"DT_RELA <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_RELA = 7\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_RELASZ","title":"DT_RELASZ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_RELASZ = 8\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_RELAENT","title":"DT_RELAENT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_RELAENT = 9\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_STRSZ","title":"DT_STRSZ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_STRSZ = 10\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_SYMENT","title":"DT_SYMENT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_SYMENT = 11\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_INIT","title":"DT_INIT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_INIT = 12\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_FINI","title":"DT_FINI <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_FINI = 13\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_SONAME","title":"DT_SONAME <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_SONAME = 14\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_RPATH","title":"DT_RPATH <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_RPATH = 15\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_SYMBOLIC","title":"DT_SYMBOLIC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_SYMBOLIC = 16\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_REL","title":"DT_REL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_REL = 17\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_RELSZ","title":"DT_RELSZ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_RELSZ = 18\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_RELENT","title":"DT_RELENT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_RELENT = 19\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_PLTREL","title":"DT_PLTREL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_PLTREL = 20\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_DEBUG","title":"DT_DEBUG <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_DEBUG = 21\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_TEXTREL","title":"DT_TEXTREL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_TEXTREL = 22\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_JMPREL","title":"DT_JMPREL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_JMPREL = 23\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.DT_ENCODING","title":"DT_ENCODING <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DT_ENCODING = 32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_NULL","title":"SHT_NULL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_NULL = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_PROGBITS","title":"SHT_PROGBITS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_PROGBITS = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_SYMTAB","title":"SHT_SYMTAB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_SYMTAB = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_STRTAB","title":"SHT_STRTAB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_STRTAB = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_RELA","title":"SHT_RELA <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_RELA = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_HASH","title":"SHT_HASH <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_HASH = 5\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_DYNAMIC","title":"SHT_DYNAMIC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_DYNAMIC = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_NOTE","title":"SHT_NOTE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_NOTE = 7\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_NOBITS","title":"SHT_NOBITS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_NOBITS = 8\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_REL","title":"SHT_REL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_REL = 9\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_SHLIB","title":"SHT_SHLIB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_SHLIB = 10\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_DYNSYM","title":"SHT_DYNSYM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_DYNSYM = 11\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.SHT_NUM","title":"SHT_NUM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SHT_NUM = 12\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.STT_NOTYPE","title":"STT_NOTYPE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STT_NOTYPE = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.STT_OBJECT","title":"STT_OBJECT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STT_OBJECT = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.STT_FUNC","title":"STT_FUNC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STT_FUNC = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.STT_SECTION","title":"STT_SECTION <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STT_SECTION = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.STT_FILE","title":"STT_FILE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STT_FILE = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.STT_COMMON","title":"STT_COMMON <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STT_COMMON = 5\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.STT_TLS","title":"STT_TLS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>STT_TLS = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_PRSTATUS","title":"NT_PRSTATUS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_PRSTATUS = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_PRFPREG","title":"NT_PRFPREG <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_PRFPREG = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_PRPSINFO","title":"NT_PRPSINFO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_PRPSINFO = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_TASKSTRUCT","title":"NT_TASKSTRUCT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_TASKSTRUCT = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_AUXV","title":"NT_AUXV <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_AUXV = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_SIGINFO","title":"NT_SIGINFO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_SIGINFO = 1397311305\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_FILE","title":"NT_FILE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_FILE = 1179208773\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_PRXFPREG","title":"NT_PRXFPREG <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_PRXFPREG = 1189489535\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_PPC_VMX","title":"NT_PPC_VMX <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_PPC_VMX = 256\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_PPC_SPE","title":"NT_PPC_SPE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_PPC_SPE = 257\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_PPC_VSX","title":"NT_PPC_VSX <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_PPC_VSX = 258\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_386_TLS","title":"NT_386_TLS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_386_TLS = 512\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_386_IOPERM","title":"NT_386_IOPERM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_386_IOPERM = 513\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_X86_XSTATE","title":"NT_X86_XSTATE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_X86_XSTATE = 514\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_HIGH_GPRS","title":"NT_S390_HIGH_GPRS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_HIGH_GPRS = 768\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_TIMER","title":"NT_S390_TIMER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_TIMER = 769\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_TODCMP","title":"NT_S390_TODCMP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_TODCMP = 770\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_TODPREG","title":"NT_S390_TODPREG <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_TODPREG = 771\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_CTRS","title":"NT_S390_CTRS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_CTRS = 772\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_PREFIX","title":"NT_S390_PREFIX <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_PREFIX = 773\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_LAST_BREAK","title":"NT_S390_LAST_BREAK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_LAST_BREAK = 774\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_SYSTEM_CALL","title":"NT_S390_SYSTEM_CALL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_SYSTEM_CALL = 775\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_S390_TDB","title":"NT_S390_TDB <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_S390_TDB = 776\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_ARM_VFP","title":"NT_ARM_VFP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_ARM_VFP = 1024\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_ARM_TLS","title":"NT_ARM_TLS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_ARM_TLS = 1025\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_ARM_HW_BREAK","title":"NT_ARM_HW_BREAK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_ARM_HW_BREAK = 1026\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_ARM_HW_WATCH","title":"NT_ARM_HW_WATCH <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_ARM_HW_WATCH = 1027\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_METAG_CBUF","title":"NT_METAG_CBUF <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_METAG_CBUF = 1280\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_METAG_RPIPE","title":"NT_METAG_RPIPE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_METAG_RPIPE = 1281\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.NT_METAG_TLS","title":"NT_METAG_TLS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>NT_METAG_TLS = 1282\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_NULL","title":"AT_NULL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_NULL = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_IGNORE","title":"AT_IGNORE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_IGNORE = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_EXECFD","title":"AT_EXECFD <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_EXECFD = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_PHDR","title":"AT_PHDR <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_PHDR = 3\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_PHENT","title":"AT_PHENT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_PHENT = 4\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_PHNUM","title":"AT_PHNUM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_PHNUM = 5\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_PAGESZ","title":"AT_PAGESZ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_PAGESZ = 6\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_BASE","title":"AT_BASE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_BASE = 7\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_FLAGS","title":"AT_FLAGS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_FLAGS = 8\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_ENTRY","title":"AT_ENTRY <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_ENTRY = 9\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_NOTELF","title":"AT_NOTELF <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_NOTELF = 10\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_UID","title":"AT_UID <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_UID = 11\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_EUID","title":"AT_EUID <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_EUID = 12\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_GID","title":"AT_GID <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_GID = 13\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_EGID","title":"AT_EGID <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_EGID = 14\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_PLATFORM","title":"AT_PLATFORM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_PLATFORM = 15\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_HWCAP","title":"AT_HWCAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_HWCAP = 16\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_CLKTCK","title":"AT_CLKTCK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_CLKTCK = 17\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_FPUCW","title":"AT_FPUCW <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_FPUCW = 18\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_DCACHEBSIZE","title":"AT_DCACHEBSIZE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_DCACHEBSIZE = 19\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_ICACHEBSIZE","title":"AT_ICACHEBSIZE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_ICACHEBSIZE = 20\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_UCACHEBSIZE","title":"AT_UCACHEBSIZE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_UCACHEBSIZE = 21\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_IGNOREPPC","title":"AT_IGNOREPPC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_IGNOREPPC = 22\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_SECURE","title":"AT_SECURE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_SECURE = 23\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_BASE_PLATFORM","title":"AT_BASE_PLATFORM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_BASE_PLATFORM = 24\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_RANDOM","title":"AT_RANDOM <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_RANDOM = 25\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_EXECFN","title":"AT_EXECFN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_EXECFN = 31\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_SYSINFO","title":"AT_SYSINFO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_SYSINFO = 32\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_SYSINFO_EHDR","title":"AT_SYSINFO_EHDR <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_SYSINFO_EHDR = 33\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_L1I_CACHESHAPE","title":"AT_L1I_CACHESHAPE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_L1I_CACHESHAPE = 34\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_L1D_CACHESHAPE","title":"AT_L1D_CACHESHAPE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_L1D_CACHESHAPE = 35\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_L2_CACHESHAPE","title":"AT_L2_CACHESHAPE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_L2_CACHESHAPE = 36\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.constants.AT_L3_CACHESHAPE","title":"AT_L3_CACHESHAPE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AT_L3_CACHESHAPE = 37\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf32_Ehdr","title":"Elf32_Ehdr","text":"<p> Bases: <code>Structure</code></p>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Ehdr","title":"Elf64_Ehdr","text":"<p> Bases: <code>Structure</code></p>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf32_Phdr","title":"Elf32_Phdr","text":"<p> Bases: <code>Structure</code></p>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.Elf64_Phdr","title":"Elf64_Phdr","text":"<p> Bases: <code>Structure</code></p>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV","title":"AUXV","text":"<p> Bases: <code>dict[str, int | str]</code></p> <p>Methods:</p> <ul> <li> <code>set</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> <li> <code>__str__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>AT_PHDR</code> (<code>int | None</code>) \u2013 </li> <li> <code>AT_BASE</code> (<code>int | None</code>) \u2013 </li> <li> <code>AT_PLATFORM</code> (<code>str | None</code>) \u2013 </li> <li> <code>AT_BASE_PLATFORM</code> (<code>str | None</code>) \u2013 </li> <li> <code>AT_ENTRY</code> (<code>int | None</code>) \u2013 </li> <li> <code>AT_RANDOM</code> (<code>int | None</code>) \u2013 </li> <li> <code>AT_EXECFN</code> (<code>str | None</code>) \u2013 </li> <li> <code>AT_SYSINFO</code> (<code>int | None</code>) \u2013 </li> <li> <code>AT_SYSINFO_EHDR</code> (<code>int | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_PHDR","title":"AT_PHDR <code>instance-attribute</code>","text":"<pre><code>AT_PHDR: int | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_BASE","title":"AT_BASE <code>instance-attribute</code>","text":"<pre><code>AT_BASE: int | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_PLATFORM","title":"AT_PLATFORM <code>instance-attribute</code>","text":"<pre><code>AT_PLATFORM: str | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_BASE_PLATFORM","title":"AT_BASE_PLATFORM <code>instance-attribute</code>","text":"<pre><code>AT_BASE_PLATFORM: str | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_ENTRY","title":"AT_ENTRY <code>instance-attribute</code>","text":"<pre><code>AT_ENTRY: int | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_RANDOM","title":"AT_RANDOM <code>instance-attribute</code>","text":"<pre><code>AT_RANDOM: int | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_EXECFN","title":"AT_EXECFN <code>instance-attribute</code>","text":"<pre><code>AT_EXECFN: str | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_SYSINFO","title":"AT_SYSINFO <code>instance-attribute</code>","text":"<pre><code>AT_SYSINFO: int | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.AT_SYSINFO_EHDR","title":"AT_SYSINFO_EHDR <code>instance-attribute</code>","text":"<pre><code>AT_SYSINFO_EHDR: int | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.set","title":"set","text":"<pre><code>set(const: int, value: int) -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(attr: str) -> int | str | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/","title":"pwndbg.lib.funcparser","text":""},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser","title":"funcparser","text":"<p>Functions:</p> <ul> <li> <code>extractTypeAndName</code> \u2013 </li> <li> <code>Stringify</code> \u2013 </li> <li> <code>ExtractFuncDecl</code> \u2013 </li> <li> <code>ExtractAllFuncDecls</code> \u2013 </li> <li> <code>ExtractFuncDeclFromSource</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>CAstNode</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser.CAstNode","title":"CAstNode <code>module-attribute</code>","text":"<pre><code>CAstNode = Union[\n EllipsisParam, PtrDecl, ArrayDecl, FuncDecl, Struct, Union, Enum\n]\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser.extractTypeAndName","title":"extractTypeAndName","text":"<pre><code>extractTypeAndName(\n n: CAstNode, defaultName: str | None = None\n) -> tuple[str, int, str] | None\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser.Stringify","title":"Stringify","text":"<pre><code>Stringify(X: Function | Argument) -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser.ExtractFuncDecl","title":"ExtractFuncDecl","text":"<pre><code>ExtractFuncDecl(node: CAstNode, verbose: bool = False) -> Function | None\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser.ExtractAllFuncDecls","title":"ExtractAllFuncDecls","text":"<pre><code>ExtractAllFuncDecls(ast: CAstNode, verbose: bool = False)\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser.ExtractFuncDeclFromSource","title":"ExtractFuncDeclFromSource","text":"<pre><code>ExtractFuncDeclFromSource(source: str) -> Function | None\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/","title":"pwndbg.lib.functions","text":""},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions","title":"functions","text":"<p>Classes:</p> <ul> <li> <code>Function</code> \u2013 </li> <li> <code>Argument</code> \u2013 </li> <li> <code>Flag</code> \u2013 </li> <li> <code>LazyFunctions</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>format_flags_argument</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>functions</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.functions","title":"functions <code>module-attribute</code>","text":"<pre><code>functions = LazyFunctions()\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Function","title":"Function","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>type</code> (<code>str</code>) \u2013 </li> <li> <code>derefcnt</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>args</code> (<code>list[Argument]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Function.type","title":"type <code>instance-attribute</code>","text":"<pre><code>type: str\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Function.derefcnt","title":"derefcnt <code>instance-attribute</code>","text":"<pre><code>derefcnt: int\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Function.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Function.args","title":"args <code>instance-attribute</code>","text":"<pre><code>args: list[Argument]\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Argument","title":"Argument","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>type</code> (<code>str</code>) \u2013 </li> <li> <code>derefcnt</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>flags</code> (<code>tuple[Flag, ...] | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Argument.type","title":"type <code>instance-attribute</code>","text":"<pre><code>type: str\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Argument.derefcnt","title":"derefcnt <code>instance-attribute</code>","text":"<pre><code>derefcnt: int\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Argument.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Argument.flags","title":"flags <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>flags: tuple[Flag, ...] | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Flag","title":"Flag","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>value</code> (<code>int</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Flag.value","title":"value <code>instance-attribute</code>","text":"<pre><code>value: int\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.Flag.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.LazyFunctions","title":"LazyFunctions","text":"<pre><code>LazyFunctions(*args, **kw)\n</code></pre> <p> Bases: <code>Mapping[str, Function]</code></p> <p>Methods:</p> <ul> <li> <code>__getitem__</code> \u2013 </li> <li> <code>__iter__</code> \u2013 </li> <li> <code>__len__</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.LazyFunctions.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key)\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.LazyFunctions.__iter__","title":"__iter__","text":"<pre><code>__iter__()\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.LazyFunctions.__len__","title":"__len__","text":"<pre><code>__len__()\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/#pwndbg.lib.functions.format_flags_argument","title":"format_flags_argument","text":"<pre><code>format_flags_argument(flags: tuple[Flag, ...], value: int)\n</code></pre>"},{"location":"reference/pwndbg/lib/functions_data/","title":"pwndbg.lib.functions_data","text":""},{"location":"reference/pwndbg/lib/functions_data/#pwndbg.lib.functions_data","title":"functions_data","text":"<p>Functions:</p> <ul> <li> <code>load_functions</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/functions_data/#pwndbg.lib.functions_data.load_functions","title":"load_functions","text":"<pre><code>load_functions()\n</code></pre>"},{"location":"reference/pwndbg/lib/gcc/","title":"pwndbg.lib.gcc","text":""},{"location":"reference/pwndbg/lib/gcc/#pwndbg.lib.gcc","title":"gcc","text":"<p>Functions for determining the architecture-dependent path to GCC and any flags it should be executed with.</p> <p>Functions:</p> <ul> <li> <code>which</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>printed_message</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/gcc/#pwndbg.lib.gcc.printed_message","title":"printed_message <code>module-attribute</code>","text":"<pre><code>printed_message = False\n</code></pre>"},{"location":"reference/pwndbg/lib/gcc/#pwndbg.lib.gcc.which","title":"which","text":"<pre><code>which(arch: Arch) -> list[str]\n</code></pre>"},{"location":"reference/pwndbg/lib/heap/","title":"pwndbg.lib.heap","text":""},{"location":"reference/pwndbg/lib/heap/#pwndbg.lib.heap","title":"heap","text":"<p>Modules:</p> <ul> <li> <code>helpers</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/heap/helpers/","title":"pwndbg.lib.heap.helpers","text":""},{"location":"reference/pwndbg/lib/heap/helpers/#pwndbg.lib.heap.helpers","title":"helpers","text":"<p>Functions:</p> <ul> <li> <code>find_fastbin_size</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/heap/helpers/#pwndbg.lib.heap.helpers.find_fastbin_size","title":"find_fastbin_size","text":"<pre><code>find_fastbin_size(\n mem: bytes, max_size: int, step: int\n) -> Generator[int, None, None]\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/","title":"pwndbg.lib.kernel","text":""},{"location":"reference/pwndbg/lib/kernel/#pwndbg.lib.kernel","title":"kernel","text":"<p>Modules:</p> <ul> <li> <code>kconfig</code> \u2013 </li> <li> <code>structs</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/kernel/kconfig/","title":"pwndbg.lib.kernel.kconfig","text":""},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig","title":"kconfig","text":"<p>Classes:</p> <ul> <li> <code>Kconfig</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>parse_config</code> \u2013 </li> <li> <code>parse_compresed_config</code> \u2013 </li> <li> <code>config_to_key</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig","title":"Kconfig","text":"<pre><code>Kconfig(compressed_config: bytes, *args: Any, **kwargs: Any)\n</code></pre> <p> Bases: <code>UserDict</code></p> <p>Methods:</p> <ul> <li> <code>get_key</code> \u2013 </li> <li> <code>__getitem__</code> \u2013 </li> <li> <code>__contains__</code> \u2013 </li> <li> <code>__getattr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>data</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.data","title":"data <code>instance-attribute</code>","text":"<pre><code>data = parse_compresed_config(compressed_config)\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.get_key","title":"get_key","text":"<pre><code>get_key(name: str) -> str | None\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.__contains__","title":"__contains__","text":"<pre><code>__contains__(name: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str)\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.parse_config","title":"parse_config","text":"<pre><code>parse_config(config_text: bytes) -> dict[str, str]\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.parse_compresed_config","title":"parse_compresed_config","text":"<pre><code>parse_compresed_config(compressed_config: bytes) -> dict[str, str]\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.config_to_key","title":"config_to_key","text":"<pre><code>config_to_key(name: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/structs/","title":"pwndbg.lib.kernel.structs","text":""},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs","title":"structs","text":"<p>Classes:</p> <ul> <li> <code>IDTEntry</code> \u2013 <p>Represents an entry in the Interrupt Descriptor Table (IDT)</p> </li> </ul>"},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs.IDTEntry","title":"IDTEntry","text":"<pre><code>IDTEntry(entry)\n</code></pre> <p>Represents an entry in the Interrupt Descriptor Table (IDT)</p> <p>The IDTEntry class stores information about an IDT entry, including its index, offset, segment selector, descriptor privilege level (DPL), gate type, and interrupt stack table (IST) index.</p> <p>https://wiki.osdev.org/Interrupt_Descriptor_Table</p> <p>Attributes:</p> <ul> <li> <code>offset</code> \u2013 </li> <li> <code>segment</code> \u2013 </li> <li> <code>dpl</code> \u2013 </li> <li> <code>type</code> \u2013 </li> <li> <code>ist</code> \u2013 </li> <li> <code>present</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs.IDTEntry.offset","title":"offset <code>instance-attribute</code>","text":"<pre><code>offset = None\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs.IDTEntry.segment","title":"segment <code>instance-attribute</code>","text":"<pre><code>segment = None\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs.IDTEntry.dpl","title":"dpl <code>instance-attribute</code>","text":"<pre><code>dpl = None\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs.IDTEntry.type","title":"type <code>instance-attribute</code>","text":"<pre><code>type = None\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs.IDTEntry.ist","title":"ist <code>instance-attribute</code>","text":"<pre><code>ist = None\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/structs/#pwndbg.lib.kernel.structs.IDTEntry.present","title":"present <code>instance-attribute</code>","text":"<pre><code>present = None\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/","title":"pwndbg.lib.memory","text":""},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory","title":"memory","text":"<p>Reading, writing, and describing memory.</p> <p>Classes:</p> <ul> <li> <code>Page</code> \u2013 <p>Represents the address space and page permissions of at least</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>round_down</code> \u2013 <p>round_down(address, align) -> int</p> </li> <li> <code>round_up</code> \u2013 <p>round_up(address, align) -> int</p> </li> <li> <code>page_align</code> \u2013 <p>page_align(address) -> int</p> </li> <li> <code>page_size_align</code> \u2013 </li> <li> <code>page_offset</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>PAGE_SIZE</code> \u2013 </li> <li> <code>PAGE_MASK</code> \u2013 </li> <li> <code>align_down</code> \u2013 </li> <li> <code>align_up</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.PAGE_SIZE","title":"PAGE_SIZE <code>module-attribute</code>","text":"<pre><code>PAGE_SIZE = 4096\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.PAGE_MASK","title":"PAGE_MASK <code>module-attribute</code>","text":"<pre><code>PAGE_MASK = ~PAGE_SIZE - 1\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.align_down","title":"align_down <code>module-attribute</code>","text":"<pre><code>align_down = round_down\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.align_up","title":"align_up <code>module-attribute</code>","text":"<pre><code>align_up = round_up\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page","title":"Page","text":"<pre><code>Page(start: int, size: int, flags: int, offset: int, objfile: str = '')\n</code></pre> <p>Represents the address space and page permissions of at least one page of memory.</p> <p>Methods:</p> <ul> <li> <code>__str__</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> <li> <code>__contains__</code> \u2013 </li> <li> <code>__eq__</code> \u2013 </li> <li> <code>__lt__</code> \u2013 </li> <li> <code>__hash__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>vaddr</code> \u2013 </li> <li> <code>memsz</code> \u2013 </li> <li> <code>flags</code> \u2013 </li> <li> <code>offset</code> \u2013 </li> <li> <code>objfile</code> \u2013 <p>Possible non-empty values of <code>objfile</code>:</p> </li> <li> <code>start</code> (<code>int</code>) \u2013 <p>Mapping start address.</p> </li> <li> <code>end</code> (<code>int</code>) \u2013 <p>Address beyond mapping. So the last effective address is self.end-1</p> </li> <li> <code>is_stack</code> (<code>bool</code>) \u2013 </li> <li> <code>is_memory_mapped_file</code> (<code>bool</code>) \u2013 </li> <li> <code>read</code> (<code>bool</code>) \u2013 </li> <li> <code>write</code> (<code>bool</code>) \u2013 </li> <li> <code>execute</code> (<code>bool</code>) \u2013 </li> <li> <code>rw</code> (<code>bool</code>) \u2013 </li> <li> <code>wx</code> (<code>bool</code>) \u2013 </li> <li> <code>rwx</code> (<code>bool</code>) \u2013 </li> <li> <code>is_guard</code> (<code>bool</code>) \u2013 </li> <li> <code>permstr</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.vaddr","title":"vaddr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>vaddr = start\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.memsz","title":"memsz <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>memsz = size\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.flags","title":"flags <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>flags = flags\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.offset","title":"offset <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>offset = offset\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.objfile","title":"objfile <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>objfile = objfile\n</code></pre> <p>Possible non-empty values of <code>objfile</code>: - Contains square brackets \"[]\" if it's not a memory mapped file. Examples: [stack], [vsyscall], [heap], [vdso] - A path to a file, such as <code>/usr/lib/libc.so.6</code></p>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.start","title":"start <code>property</code>","text":"<pre><code>start: int\n</code></pre> <p>Mapping start address.</p>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.end","title":"end <code>property</code>","text":"<pre><code>end: int\n</code></pre> <p>Address beyond mapping. So the last effective address is self.end-1 It is the same as displayed in /proc//maps"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.is_stack","title":"is_stack <code>property</code>","text":"<pre><code>is_stack: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.is_memory_mapped_file","title":"is_memory_mapped_file <code>property</code>","text":"<pre><code>is_memory_mapped_file: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.read","title":"read <code>property</code>","text":"<pre><code>read: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.write","title":"write <code>property</code>","text":"<pre><code>write: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.execute","title":"execute <code>property</code>","text":"<pre><code>execute: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.rw","title":"rw <code>property</code>","text":"<pre><code>rw: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.wx","title":"wx <code>property</code>","text":"<pre><code>wx: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.rwx","title":"rwx <code>property</code>","text":"<pre><code>rwx: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.is_guard","title":"is_guard <code>property</code>","text":"<pre><code>is_guard: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.permstr","title":"permstr <code>property</code>","text":"<pre><code>permstr: str\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__contains__","title":"__contains__","text":"<pre><code>__contains__(addr: int) -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__lt__","title":"__lt__","text":"<pre><code>__lt__(other: object) -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__hash__","title":"__hash__","text":"<pre><code>__hash__() -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.round_down","title":"round_down","text":"<pre><code>round_down(address: int, align: int) -> int\n</code></pre> <p>round_down(address, align) -> int</p> <p>Round down <code>address</code> to the nearest increment of <code>align</code>.</p>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.round_up","title":"round_up","text":"<pre><code>round_up(address: int, align: int) -> int\n</code></pre> <p>round_up(address, align) -> int</p> <p>Round up <code>address</code> to the nearest increment of <code>align</code>.</p>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.page_align","title":"page_align","text":"<pre><code>page_align(address: int) -> int\n</code></pre> <p>page_align(address) -> int</p> <p>Round down <code>address</code> to the nearest page boundary.</p>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.page_size_align","title":"page_size_align","text":"<pre><code>page_size_align(address: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.page_offset","title":"page_offset","text":"<pre><code>page_offset(address: int) -> int\n</code></pre>"},{"location":"reference/pwndbg/lib/net/","title":"pwndbg.lib.net","text":""},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net","title":"net","text":"<p>Re-implements some psutil functionality to be able to get information from remote debugging sessions.</p> <p>Classes:</p> <ul> <li> <code>inode</code> \u2013 </li> <li> <code>Connection</code> \u2013 </li> <li> <code>UnixSocket</code> \u2013 </li> <li> <code>Netlink</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>tcp</code> \u2013 <p>It will first list all listening TCP sockets, and next list all established</p> </li> <li> <code>unix</code> \u2013 </li> <li> <code>netlink</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>TCP_STATUSES</code> \u2013 </li> <li> <code>NETLINK_TYPES</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.TCP_STATUSES","title":"TCP_STATUSES <code>module-attribute</code>","text":"<pre><code>TCP_STATUSES = {\n \"01\": \"established\",\n \"02\": \"syn_sent\",\n \"03\": \"syn_recv\",\n \"04\": \"fin_wait1\",\n \"05\": \"fin_wait2\",\n \"06\": \"time_wait\",\n \"07\": \"close\",\n \"08\": \"close_wait\",\n \"09\": \"last_ack\",\n \"0A\": \"listen\",\n \"0B\": \"closing\",\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.NETLINK_TYPES","title":"NETLINK_TYPES <code>module-attribute</code>","text":"<pre><code>NETLINK_TYPES = {\n 0: \"NETLINK_ROUTE\",\n 1: \"NETLINK_UNUSED\",\n 2: \"NETLINK_USERSOCK\",\n 3: \"NETLINK_FIREWALL\",\n 4: \"NETLINK_SOCK_DIAG\",\n 5: \"NETLINK_NFLOG\",\n 6: \"NETLINK_XFRM\",\n 7: \"NETLINK_SELINUX\",\n 8: \"NETLINK_ISCSI\",\n 9: \"NETLINK_AUDIT\",\n 10: \"NETLINK_FIB_LOOKUP\",\n 11: \"NETLINK_CONNECTOR\",\n 12: \"NETLINK_NETFILTER\",\n 13: \"NETLINK_IP6_FW\",\n 14: \"NETLINK_DNRTMSG\",\n 15: \"NETLINK_KOBJECT_UEVENT\",\n 16: \"NETLINK_GENERIC\",\n 18: \"NETLINK_SCSITRANSPORT\",\n 19: \"NETLINK_ECRYPTFS\",\n 20: \"NETLINK_RDMA\",\n 21: \"NETLINK_CRYPTO\",\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.inode","title":"inode","text":"<p>Attributes:</p> <ul> <li> <code>inode</code> (<code>int | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.inode.inode","title":"inode <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>inode: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection","title":"Connection","text":"<p> Bases: <code>inode</code></p> <p>Methods:</p> <ul> <li> <code>__str__</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>rhost</code> (<code>str | None</code>) \u2013 </li> <li> <code>lhost</code> (<code>str | None</code>) \u2013 </li> <li> <code>rport</code> (<code>int | None</code>) \u2013 </li> <li> <code>lport</code> (<code>int | None</code>) \u2013 </li> <li> <code>inode</code> (<code>int | None</code>) \u2013 </li> <li> <code>status</code> (<code>str | None</code>) \u2013 </li> <li> <code>family</code> (<code>str | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.rhost","title":"rhost <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rhost: str | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.lhost","title":"lhost <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>lhost: str | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.rport","title":"rport <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>rport: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.lport","title":"lport <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>lport: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.inode","title":"inode <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>inode: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.status","title":"status <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>status: str | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.family","title":"family <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>family: str | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.UnixSocket","title":"UnixSocket","text":"<p> Bases: <code>inode</code></p> <p>Methods:</p> <ul> <li> <code>__str__</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>path</code> \u2013 </li> <li> <code>inode</code> (<code>int | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.UnixSocket.path","title":"path <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>path = '(anonymous)'\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.UnixSocket.inode","title":"inode <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>inode: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.UnixSocket.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.UnixSocket.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Netlink","title":"Netlink","text":"<p> Bases: <code>inode</code></p> <p>Methods:</p> <ul> <li> <code>__str__</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>eth</code> (<code>int</code>) \u2013 </li> <li> <code>pid</code> (<code>int | None</code>) \u2013 </li> <li> <code>inode</code> (<code>int | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Netlink.eth","title":"eth <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>eth: int = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Netlink.pid","title":"pid <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pid: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Netlink.inode","title":"inode <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>inode: int | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Netlink.__str__","title":"__str__","text":"<pre><code>__str__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Netlink.__repr__","title":"__repr__","text":"<pre><code>__repr__() -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.tcp","title":"tcp","text":"<pre><code>tcp(data: str) -> list[Connection]\n</code></pre> <p>It will first list all listening TCP sockets, and next list all established TCP connections. A typical entry of /proc/net/tcp would look like this (split up into 3 parts because of the length of the line):</p>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.unix","title":"unix","text":"<pre><code>unix(data: str) -> list[UnixSocket]\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.netlink","title":"netlink","text":"<pre><code>netlink(data: str) -> list[Netlink]\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/","title":"pwndbg.lib.regs","text":""},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs","title":"regs","text":"<p>Reading register value from the inferior, and provides a standardized interface to registers like \"sp\" and \"pc\".</p> <p>Classes:</p> <ul> <li> <code>RegisterSet</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>BitFlags</code> \u2013 </li> <li> <code>arm_cpsr_flags</code> \u2013 </li> <li> <code>arm_xpsr_flags</code> \u2013 </li> <li> <code>aarch64_cpsr_flags</code> \u2013 </li> <li> <code>aarch64_sctlr_flags</code> \u2013 </li> <li> <code>aarch64_scr_flags</code> \u2013 </li> <li> <code>arm</code> \u2013 </li> <li> <code>armcm</code> \u2013 </li> <li> <code>aarch64</code> \u2013 </li> <li> <code>x86flags</code> \u2013 </li> <li> <code>amd64</code> \u2013 </li> <li> <code>i386</code> \u2013 </li> <li> <code>powerpc</code> \u2013 </li> <li> <code>sparc</code> \u2013 </li> <li> <code>mips</code> \u2013 </li> <li> <code>riscv</code> \u2013 </li> <li> <code>loongarch64</code> \u2013 </li> <li> <code>reg_sets</code> (<code>dict[PWNDBG_SUPPORTED_ARCHITECTURES_TYPE, RegisterSet]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags","title":"BitFlags <code>module-attribute</code>","text":"<pre><code>BitFlags = OrderedDict[str, Union[int, Tuple[int, int]]]\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.arm_cpsr_flags","title":"arm_cpsr_flags <code>module-attribute</code>","text":"<pre><code>arm_cpsr_flags = BitFlags(\n [\n (\"N\", 31),\n (\"Z\", 30),\n (\"C\", 29),\n (\"V\", 28),\n (\"Q\", 27),\n (\"J\", 24),\n (\"T\", 5),\n (\"E\", 9),\n (\"A\", 8),\n (\"I\", 7),\n (\"F\", 6),\n ]\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.arm_xpsr_flags","title":"arm_xpsr_flags <code>module-attribute</code>","text":"<pre><code>arm_xpsr_flags = BitFlags(\n [(\"N\", 31), (\"Z\", 30), (\"C\", 29), (\"V\", 28), (\"Q\", 27), (\"T\", 24)]\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.aarch64_cpsr_flags","title":"aarch64_cpsr_flags <code>module-attribute</code>","text":"<pre><code>aarch64_cpsr_flags = BitFlags(\n [\n (\"N\", 31),\n (\"Z\", 30),\n (\"C\", 29),\n (\"V\", 28),\n (\"Q\", 27),\n (\"PAN\", 22),\n (\"IL\", 20),\n (\"D\", 9),\n (\"A\", 8),\n (\"I\", 7),\n (\"F\", 6),\n (\"EL\", (2, 2)),\n (\"SP\", 0),\n ]\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.aarch64_sctlr_flags","title":"aarch64_sctlr_flags <code>module-attribute</code>","text":"<pre><code>aarch64_sctlr_flags = BitFlags(\n [\n (\"TIDCP\", 63),\n (\"SPINTMASK\", 62),\n (\"NMI\", 61),\n (\"EPAN\", 57),\n (\"ATA0\", 43),\n (\"ATA0\", 42),\n (\"TCF\", (40, 2)),\n (\"TCF0\", (38, 2)),\n (\"ITFSB\", 37),\n (\"BT1\", 36),\n (\"BT0\", 35),\n (\"EnIA\", 31),\n (\"EnIB\", 30),\n (\"EnDA\", 27),\n (\"UCI\", 26),\n (\"EE\", 25),\n (\"E0E\", 24),\n (\"SPAN\", 23),\n (\"TSCXT\", 20),\n (\"WXN\", 19),\n (\"nTWE\", 18),\n (\"nTWI\", 16),\n (\"UCT\", 15),\n (\"DZE\", 14),\n (\"EnDB\", 13),\n (\"I\", 12),\n (\"UMA\", 9),\n (\"SED\", 8),\n (\"ITD\", 7),\n (\"nAA\", 6),\n (\"CP15BEN\", 5),\n (\"SA0\", 4),\n (\"SA\", 3),\n (\"C\", 2),\n (\"A\", 1),\n (\"M\", 0),\n ]\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.aarch64_scr_flags","title":"aarch64_scr_flags <code>module-attribute</code>","text":"<pre><code>aarch64_scr_flags = BitFlags(\n [(\"HCE\", 8), (\"SMD\", 7), (\"EA\", 3), (\"FIQ\", 2), (\"IRQ\", 1), (\"NS\", 0)]\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.arm","title":"arm <code>module-attribute</code>","text":"<pre><code>arm = RegisterSet(\n retaddr=(\"lr\",),\n flags={\"cpsr\": arm_cpsr_flags},\n gpr=(\n \"r0\",\n \"r1\",\n \"r2\",\n \"r3\",\n \"r4\",\n \"r5\",\n \"r6\",\n \"r7\",\n \"r8\",\n \"r9\",\n \"r10\",\n \"r11\",\n \"r12\",\n ),\n args=(\"r0\", \"r1\", \"r2\", \"r3\"),\n retval=\"r0\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.armcm","title":"armcm <code>module-attribute</code>","text":"<pre><code>armcm = RegisterSet(\n retaddr=(\"lr\",),\n flags={\"xpsr\": arm_xpsr_flags},\n gpr=(\n \"r0\",\n \"r1\",\n \"r2\",\n \"r3\",\n \"r4\",\n \"r5\",\n \"r6\",\n \"r7\",\n \"r8\",\n \"r9\",\n \"r10\",\n \"r11\",\n \"r12\",\n ),\n args=(\"r0\", \"r1\", \"r2\", \"r3\"),\n retval=\"r0\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.aarch64","title":"aarch64 <code>module-attribute</code>","text":"<pre><code>aarch64 = RegisterSet(\n retaddr=(\"lr\",),\n flags={\"cpsr\": aarch64_cpsr_flags},\n extra_flags={\n \"scr_el3\": aarch64_scr_flags,\n \"sctlr\": aarch64_sctlr_flags,\n \"sctlr_el2\": aarch64_sctlr_flags,\n \"sctlr_el3\": aarch64_sctlr_flags,\n \"spsr_el1\": aarch64_cpsr_flags,\n \"spsr_el2\": aarch64_cpsr_flags,\n \"spsr_el3\": aarch64_cpsr_flags,\n },\n gpr=(\n \"x0\",\n \"x1\",\n \"x2\",\n \"x3\",\n \"x4\",\n \"x5\",\n \"x6\",\n \"x7\",\n \"x8\",\n \"x9\",\n \"x10\",\n \"x11\",\n \"x12\",\n \"x13\",\n \"x14\",\n \"x15\",\n \"x16\",\n \"x17\",\n \"x18\",\n \"x19\",\n \"x20\",\n \"x21\",\n \"x22\",\n \"x23\",\n \"x24\",\n \"x25\",\n \"x26\",\n \"x27\",\n \"x28\",\n \"x29\",\n ),\n misc=(\n \"w0\",\n \"w1\",\n \"w2\",\n \"w3\",\n \"w4\",\n \"w5\",\n \"w6\",\n \"w7\",\n \"w8\",\n \"w9\",\n \"w10\",\n \"w11\",\n \"w12\",\n \"w13\",\n \"w14\",\n \"w15\",\n \"w16\",\n \"w17\",\n \"w18\",\n \"w19\",\n \"w20\",\n \"w21\",\n \"w22\",\n \"w23\",\n \"w24\",\n \"w25\",\n \"w26\",\n \"w27\",\n \"w28\",\n ),\n args=(\"x0\", \"x1\", \"x2\", \"x3\"),\n retval=\"x0\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.x86flags","title":"x86flags <code>module-attribute</code>","text":"<pre><code>x86flags = {\n \"eflags\": BitFlags(\n [\n (\"CF\", 0),\n (\"PF\", 2),\n (\"AF\", 4),\n (\"ZF\", 6),\n (\"SF\", 7),\n (\"IF\", 9),\n (\"DF\", 10),\n (\"OF\", 11),\n ]\n )\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.amd64","title":"amd64 <code>module-attribute</code>","text":"<pre><code>amd64 = RegisterSet(\n pc=\"rip\",\n stack=\"rsp\",\n frame=\"rbp\",\n flags=x86flags,\n gpr=(\n \"rax\",\n \"rbx\",\n \"rcx\",\n \"rdx\",\n \"rdi\",\n \"rsi\",\n \"r8\",\n \"r9\",\n \"r10\",\n \"r11\",\n \"r12\",\n \"r13\",\n \"r14\",\n \"r15\",\n ),\n misc=(\n \"cs\",\n \"ss\",\n \"ds\",\n \"es\",\n \"fs\",\n \"gs\",\n \"fsbase\",\n \"gsbase\",\n \"ax\",\n \"ah\",\n \"al\",\n \"bx\",\n \"bh\",\n \"bl\",\n \"cx\",\n \"ch\",\n \"cl\",\n \"dx\",\n \"dh\",\n \"dl\",\n \"dil\",\n \"sil\",\n \"spl\",\n \"bpl\",\n \"di\",\n \"si\",\n \"bp\",\n \"sp\",\n \"ip\",\n ),\n args=(\"rdi\", \"rsi\", \"rdx\", \"rcx\", \"r8\", \"r9\"),\n retval=\"rax\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.i386","title":"i386 <code>module-attribute</code>","text":"<pre><code>i386 = RegisterSet(\n pc=\"eip\",\n stack=\"esp\",\n frame=\"ebp\",\n flags=x86flags,\n gpr=(\"eax\", \"ebx\", \"ecx\", \"edx\", \"edi\", \"esi\"),\n misc=(\n \"cs\",\n \"ss\",\n \"ds\",\n \"es\",\n \"fs\",\n \"gs\",\n \"fsbase\",\n \"gsbase\",\n \"ax\",\n \"ah\",\n \"al\",\n \"bx\",\n \"bh\",\n \"bl\",\n \"cx\",\n \"ch\",\n \"cl\",\n \"dx\",\n \"dh\",\n \"dl\",\n \"di\",\n \"si\",\n \"bp\",\n \"sp\",\n \"ip\",\n ),\n retval=\"eax\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.powerpc","title":"powerpc <code>module-attribute</code>","text":"<pre><code>powerpc = RegisterSet(\n retaddr=(\"lr\",),\n flags={\"msr\": BitFlags(), \"xer\": BitFlags()},\n gpr=(\n \"r0\",\n \"r1\",\n \"r2\",\n \"r3\",\n \"r4\",\n \"r5\",\n \"r6\",\n \"r7\",\n \"r8\",\n \"r9\",\n \"r10\",\n \"r11\",\n \"r12\",\n \"r13\",\n \"r14\",\n \"r15\",\n \"r16\",\n \"r17\",\n \"r18\",\n \"r19\",\n \"r20\",\n \"r21\",\n \"r22\",\n \"r23\",\n \"r24\",\n \"r25\",\n \"r26\",\n \"r27\",\n \"r28\",\n \"r29\",\n \"r30\",\n \"r31\",\n \"cr\",\n \"ctr\",\n ),\n args=(\"r3\", \"r4\", \"r5\", \"r6\", \"r7\", \"r8\", \"r9\", \"r10\"),\n retval=\"r3\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.sparc","title":"sparc <code>module-attribute</code>","text":"<pre><code>sparc = RegisterSet(\n stack=\"sp\",\n frame=\"fp\",\n retaddr=(\"i7\",),\n flags={\"psr\": BitFlags()},\n gpr=(\n \"g1\",\n \"g2\",\n \"g3\",\n \"g4\",\n \"g5\",\n \"g6\",\n \"g7\",\n \"o0\",\n \"o1\",\n \"o2\",\n \"o3\",\n \"o4\",\n \"o5\",\n \"o7\",\n \"l0\",\n \"l1\",\n \"l2\",\n \"l3\",\n \"l4\",\n \"l5\",\n \"l6\",\n \"l7\",\n \"i0\",\n \"i1\",\n \"i2\",\n \"i3\",\n \"i4\",\n \"i5\",\n ),\n args=(\"i0\", \"i1\", \"i2\", \"i3\", \"i4\", \"i5\"),\n retval=\"o0\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.mips","title":"mips <code>module-attribute</code>","text":"<pre><code>mips = RegisterSet(\n frame=\"fp\",\n retaddr=(\"ra\",),\n gpr=(\n \"v0\",\n \"v1\",\n \"a0\",\n \"a1\",\n \"a2\",\n \"a3\",\n \"t0\",\n \"t1\",\n \"t2\",\n \"t3\",\n \"t4\",\n \"t5\",\n \"t6\",\n \"t7\",\n \"t8\",\n \"t9\",\n \"s0\",\n \"s1\",\n \"s2\",\n \"s3\",\n \"s4\",\n \"s5\",\n \"s6\",\n \"s7\",\n \"s8\",\n \"gp\",\n ),\n args=(\"a0\", \"a1\", \"a2\", \"a3\"),\n retval=\"v0\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.riscv","title":"riscv <code>module-attribute</code>","text":"<pre><code>riscv = RegisterSet(\n pc=\"pc\",\n stack=\"sp\",\n retaddr=(\"ra\",),\n gpr=(\n \"gp\",\n \"tp\",\n \"t0\",\n \"t1\",\n \"t2\",\n \"s0\",\n \"s1\",\n \"a0\",\n \"a1\",\n \"a2\",\n \"a3\",\n \"a4\",\n \"a5\",\n \"a6\",\n \"a7\",\n \"s2\",\n \"s3\",\n \"s4\",\n \"s5\",\n \"s6\",\n \"s7\",\n \"s8\",\n \"s9\",\n \"s10\",\n \"s11\",\n \"t3\",\n \"t4\",\n \"t5\",\n \"t6\",\n ),\n args=(\"a0\", \"a1\", \"a2\", \"a3\", \"a4\", \"a5\", \"a6\", \"a7\"),\n retval=\"a0\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.loongarch64","title":"loongarch64 <code>module-attribute</code>","text":"<pre><code>loongarch64 = RegisterSet(\n pc=\"pc\",\n stack=\"sp\",\n frame=\"fp\",\n retaddr=(\"ra\",),\n gpr=(\n \"a0\",\n \"a1\",\n \"a2\",\n \"a3\",\n \"a4\",\n \"a5\",\n \"a6\",\n \"a7\",\n \"t0\",\n \"t1\",\n \"t2\",\n \"t3\",\n \"t4\",\n \"t5\",\n \"t6\",\n \"t7\",\n \"t8\",\n \"s0\",\n \"s1\",\n \"s2\",\n \"s3\",\n \"s4\",\n \"s5\",\n \"s6\",\n \"s7\",\n \"s8\",\n ),\n args=(\"a0\", \"a1\", \"a2\", \"a3\", \"a4\", \"a5\", \"a6\", \"a7\"),\n misc=(\"tp\", \"r21\"),\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.reg_sets","title":"reg_sets <code>module-attribute</code>","text":"<pre><code>reg_sets: dict[PWNDBG_SUPPORTED_ARCHITECTURES_TYPE, RegisterSet] = {\n \"i386\": i386,\n \"i8086\": i386,\n \"x86-64\": amd64,\n \"rv32\": riscv,\n \"rv64\": riscv,\n \"mips\": mips,\n \"sparc\": sparc,\n \"arm\": arm,\n \"armcm\": armcm,\n \"aarch64\": aarch64,\n \"powerpc\": powerpc,\n \"loongarch64\": loongarch64,\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet","title":"RegisterSet","text":"<pre><code>RegisterSet(\n pc: str = \"pc\",\n stack: str = \"sp\",\n frame: str | None = None,\n retaddr: tuple[str, ...] = (),\n flags: dict[str, BitFlags] = {},\n extra_flags: dict[str, BitFlags] = {},\n gpr: tuple[str, ...] = (),\n misc: tuple[str, ...] = (),\n args: tuple[str, ...] = (),\n retval: str | None = None,\n)\n</code></pre> <p>Methods:</p> <ul> <li> <code>__contains__</code> \u2013 </li> <li> <code>__iter__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pc</code> (<code>str</code>) \u2013 </li> <li> <code>stack</code> (<code>str</code>) \u2013 </li> <li> <code>frame</code> (<code>str | None</code>) \u2013 </li> <li> <code>retaddr</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>flags</code> (<code>dict[str, BitFlags]</code>) \u2013 </li> <li> <code>extra_flags</code> \u2013 </li> <li> <code>gpr</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>misc</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>args</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>retval</code> (<code>str | None</code>) \u2013 </li> <li> <code>common</code> (<code>list[str]</code>) \u2013 </li> <li> <code>emulated_regs_order</code> (<code>list[str]</code>) \u2013 </li> <li> <code>all</code> (<code>set[str]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.pc","title":"pc <code>instance-attribute</code>","text":"<pre><code>pc: str = pc\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.stack","title":"stack <code>instance-attribute</code>","text":"<pre><code>stack: str = stack\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.frame","title":"frame <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>frame: str | None = frame\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.retaddr","title":"retaddr <code>instance-attribute</code>","text":"<pre><code>retaddr: tuple[str, ...] = retaddr\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.flags","title":"flags <code>instance-attribute</code>","text":"<pre><code>flags: dict[str, BitFlags] = flags\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.extra_flags","title":"extra_flags <code>instance-attribute</code>","text":"<pre><code>extra_flags = extra_flags\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.gpr","title":"gpr <code>instance-attribute</code>","text":"<pre><code>gpr: tuple[str, ...] = gpr\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.misc","title":"misc <code>instance-attribute</code>","text":"<pre><code>misc: tuple[str, ...] = misc\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.args","title":"args <code>instance-attribute</code>","text":"<pre><code>args: tuple[str, ...] = args\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.retval","title":"retval <code>instance-attribute</code>","text":"<pre><code>retval: str | None = retval\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.common","title":"common <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>common: list[str] = []\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.emulated_regs_order","title":"emulated_regs_order <code>instance-attribute</code>","text":"<pre><code>emulated_regs_order: list[str] = []\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.all","title":"all <code>instance-attribute</code>","text":"<pre><code>all: set[str] = (\n set(misc) | set(flags) | set(extra_flags) | set(retaddr) | set(common)\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.__contains__","title":"__contains__","text":"<pre><code>__contains__(reg: str) -> bool\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.__iter__","title":"__iter__","text":"<pre><code>__iter__() -> Iterator[str]\n</code></pre>"},{"location":"reference/pwndbg/lib/stdio/","title":"pwndbg.lib.stdio","text":""},{"location":"reference/pwndbg/lib/stdio/#pwndbg.lib.stdio","title":"stdio","text":"<p>Provides functionality to circumvent GDB's hooks on sys.stdin and sys.stdout which prevent output from appearing on-screen inside of certain event handlers.</p> <p>Classes:</p> <ul> <li> <code>Stdio</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>stdio</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/stdio/#pwndbg.lib.stdio.stdio","title":"stdio <code>module-attribute</code>","text":"<pre><code>stdio = Stdio()\n</code></pre>"},{"location":"reference/pwndbg/lib/stdio/#pwndbg.lib.stdio.Stdio","title":"Stdio","text":"<p>Methods:</p> <ul> <li> <code>__enter__</code> \u2013 </li> <li> <code>__exit__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>queue</code> (<code>list[tuple[TextIO, TextIO, TextIO]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/stdio/#pwndbg.lib.stdio.Stdio.queue","title":"queue <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>queue: list[tuple[TextIO, TextIO, TextIO]] = []\n</code></pre>"},{"location":"reference/pwndbg/lib/stdio/#pwndbg.lib.stdio.Stdio.__enter__","title":"__enter__","text":"<pre><code>__enter__(*a: Any, **kw: Any) -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/stdio/#pwndbg.lib.stdio.Stdio.__exit__","title":"__exit__","text":"<pre><code>__exit__(\n exc_type: type[BaseException] | None,\n exc_value: BaseException | None,\n traceback: TracebackType | None,\n) -> None\n</code></pre>"},{"location":"reference/pwndbg/lib/strings/","title":"pwndbg.lib.strings","text":""},{"location":"reference/pwndbg/lib/strings/#pwndbg.lib.strings","title":"strings","text":"<p>Functions:</p> <ul> <li> <code>strip_colors</code> \u2013 <p>Remove all ANSI color codes from the text</p> </li> </ul>"},{"location":"reference/pwndbg/lib/strings/#pwndbg.lib.strings.strip_colors","title":"strip_colors","text":"<pre><code>strip_colors(text)\n</code></pre> <p>Remove all ANSI color codes from the text</p>"},{"location":"reference/pwndbg/lib/tempfile/","title":"pwndbg.lib.tempfile","text":""},{"location":"reference/pwndbg/lib/tempfile/#pwndbg.lib.tempfile","title":"tempfile","text":"<p>Common helper and cache for pwndbg tempdir</p> <p>Functions:</p> <ul> <li> <code>tempdir</code> \u2013 <p>Returns a safe and unpredictable temporary directory with pwndbg prefix.</p> </li> <li> <code>cachedir</code> \u2013 <p>Returns and potentially creates a persistent safe cachedir location</p> </li> </ul>"},{"location":"reference/pwndbg/lib/tempfile/#pwndbg.lib.tempfile.tempdir","title":"tempdir","text":"<pre><code>tempdir() -> str\n</code></pre> <p>Returns a safe and unpredictable temporary directory with pwndbg prefix.</p>"},{"location":"reference/pwndbg/lib/tempfile/#pwndbg.lib.tempfile.cachedir","title":"cachedir","text":"<pre><code>cachedir(namespace: str | None = None) -> str\n</code></pre> <p>Returns and potentially creates a persistent safe cachedir location based on XDG_CACHE_HOME or ~/.cache</p> <p>Optionally creates a sub namespace inside the pwndbg cache folder.</p>"},{"location":"reference/pwndbg/lib/tips/","title":"pwndbg.lib.tips","text":""},{"location":"reference/pwndbg/lib/tips/#pwndbg.lib.tips","title":"tips","text":"<p>Functions:</p> <ul> <li> <code>get_tip_of_the_day</code> \u2013 <p>Returns a random tip based on the current debugger type.</p> </li> <li> <code>get_all_tips</code> \u2013 <p>Returns all tips applicable to the current debugger.</p> </li> <li> <code>color_tip</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>GDB_TIPS</code> (<code>list[str]</code>) \u2013 </li> <li> <code>PWNDBG_TIPS</code> (<code>list[str]</code>) \u2013 </li> <li> <code>LLDB_TIPS</code> (<code>list[str]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/tips/#pwndbg.lib.tips.GDB_TIPS","title":"GDB_TIPS <code>module-attribute</code>","text":"<pre><code>GDB_TIPS: list[str] = [\n \"GDB's `apropos <topic>` command displays all registered commands that are related to the given <topic>\",\n \"GDB's `follow-fork-mode` parameter can be used to set whether to trace parent or child after fork() calls. Pwndbg sets it to child by default\",\n 'Use GDB\\'s `dprintf` command to print all calls to given function. E.g. `dprintf malloc, \"malloc(%p)\\\\n\", (void*)$rdi` will print all malloc calls',\n \"Use GDB's `pi` command to run an interactive Python console where you can use Pwndbg APIs like `pwndbg.aglib.memory.read(addr, len)`, `pwndbg.aglib.memory.write(addr, data)`, `pwndbg.aglib.vmmap.get()` and so on!\",\n \"GDB's `set directories <path>` parameter can be used to debug e.g. glibc sources like the malloc/free functions!\",\n \"If you have debugging symbols the `info args` command shows current frame's function arguments (use `up` and `down` to switch between frames)\",\n 'Calling functions like `call (void)puts(\"hello world\")` will run all other target threads for the time the function runs. Use `set scheduler-locking on` to lock the execution to current thread when calling functions',\n \"Use the `pipe <cmd> | <prog>` command to pass output of a GDB/Pwndbg command to a shell program, e.g. `pipe elfsections | grep bss`. This can also be shortened to: `| <cmd> | <prog>`\",\n]\n</code></pre>"},{"location":"reference/pwndbg/lib/tips/#pwndbg.lib.tips.PWNDBG_TIPS","title":"PWNDBG_TIPS <code>module-attribute</code>","text":"<pre><code>PWNDBG_TIPS: list[str] = [\n \"If you want Pwndbg to clear screen on each command (but still save previous output in history) use `set context-clear-screen on`\",\n \"The `set show-flags on` setting will display CPU flags register in the regs context panel\",\n \"GDB and Pwndbg parameters can be shown or set with `show <param>` and `set <param> <value>` GDB commands\",\n \"Use Pwndbg's `config` and `theme` commands to tune its configuration and theme colors!\",\n \"Pwndbg mirrors some of Windbg commands like `eq`, `ew`, `ed`, `eb`, `es`, `dq`, `dw`, `dd`, `db`, `ds` for writing and reading memory\",\n \"Pwndbg resolves kernel memory maps by parsing page tables (default) or via `monitor info mem` QEMU gdbstub command (use `set kernel-vmmap-via-page-tables off` for that)\",\n \"Use the `vmmap` command for a better & colored memory maps display (than the GDB's `info proc mappings`)\",\n \"Use the `telescope` command to dereference a given address/pointer multiple times (if the dereferenced value is a valid ptr; see `config telescope` to configure its behavior)\",\n \"Use the `context` (or `ctx`) command to display the context once again. You can reconfigure the context layout with `set context-section <sections>` or forward the output to a file/tty via `set context-output <file>`. See also `config context` to configure it further!\",\n \"Disable Pwndbg context information display with `set context-sections ''`\",\n \"Pwndbg context displays where the program branches to thanks to emulating few instructions into the future. You can disable this with `set emulate off` which may also speed up debugging\",\n \"Use the `canary` command to see all stack canary/cookie values on the stack (based on the *usual* stack canary value initialized by glibc)\",\n \"Use the `procinfo` command for better process introspection (than the GDB's `info proc` command)\",\n \"Want to display each context panel in a separate tmux window? See https://github.com/pwndbg/pwndbg/blob/dev/FEATURES.md#splitting--layouting-context\",\n 'Use `$base(\"heap\")` to get the start address of a [heap] memory page',\n \"Use the `errno` (or `errno <number>`) command to see the name of the last or provided (libc) error\",\n \"Pwndbg sets the SIGLARM, SIGBUS, SIGPIPE and SIGSEGV signals so they are not passed to the app; see `info signals` for full GDB signals configuration\",\n \"Use `vmmap -A|-B <number> <filter>` to display <number> of maps after/before filtered ones\",\n \"Use the `killall` command to kill all specified threads (via their ids)\",\n \"Use the `spray` command to spray memory with cyclic pattern or specified value\",\n \"Use `patch <address> '<assembly>'` to patch an address with given assembly code\",\n \"Want to NOP some instructions? Use `patch <address> 'nop; nop; nop'`\",\n \"`heap-config` shows heap related configuration\",\n \"`break-if-taken` and `break-if-not-taken` commands sets breakpoints after a given jump instruction was taken or not\",\n \"`stepuntilasm <assembly-instruction [operands]>` steps program forward until matching instruction occures\",\n \"Use `plist` command to dump elements of linked list\",\n \"If your program has multiple threads they will be displayed in the context display or using the `context threads` command\",\n \"Use `track-got enable|info|query` to track GOT accesses - useful for hijacking control flow via writable GOT/PLT\",\n \"Need to `mmap` or `mprotect` memory in the debugee? Use commands with the same name to inject and run such syscalls\",\n \"Use `hi` to see if a an address belongs to a glibc heap chunk\",\n \"Use `contextprev` and `contextnext` to display a previous context output again without scrolling\",\n \"Try splitting the context output into multiple TUI windows using `layout pwndbg` (`tui disable` or `ctrl-x + a` to go back to CLI mode)\",\n]\n</code></pre>"},{"location":"reference/pwndbg/lib/tips/#pwndbg.lib.tips.LLDB_TIPS","title":"LLDB_TIPS <code>module-attribute</code>","text":"<pre><code>LLDB_TIPS: list[str] = [\n \"Use LLDB's `help <command>` to get detailed help on any command\",\n \"LLDB's `expr` command lets you evaluate expressions in the current frame context\",\n \"Use `frame variable` (or `fr v`) to show all variables in the current frame\",\n \"The `watchpoint set` command allows you to stop execution when a variable changes\",\n \"Use `process launch --stop-at-entry` to stop at the program entry point\",\n \"LLDB's `memory read` (or `m read`) command displays memory contents at a specified address\",\n \"Use `thread backtrace all` to see backtraces of all threads\",\n \"The `breakpoint set --func-regex <regex>` command sets breakpoints on functions matching a regular expression\",\n \"Use `target modules list` to see all loaded modules in your process\",\n \"LLDB's `image lookup` command helps find symbols, addresses, and files in the executable and loaded libraries\",\n \"Use `command alias` to create custom shortcuts for frequently used commands\",\n \"LLDB's `register read` shows the contents of registers in the selected frame\",\n \"The `disassemble` command shows assembly instructions for the current function\",\n \"Use `thread step-inst` (or `si`) to step one instruction\",\n \"LLDB's Python API can be accessed with the `script` command to extend debugging capabilities\",\n \"Use `process attach --pid <pid>` to attach to a running process\",\n \"The `breakpoint command add` lets you run commands when a breakpoint is hit\",\n \"Use `memory find` to search for a value in the process's memory\",\n \"LLDB's `settings set` command allows you to customize debugger behavior\",\n \"The `platform list` command shows all available platforms for remote debugging\",\n]\n</code></pre>"},{"location":"reference/pwndbg/lib/tips/#pwndbg.lib.tips.get_tip_of_the_day","title":"get_tip_of_the_day","text":"<pre><code>get_tip_of_the_day() -> str\n</code></pre> <p>Returns a random tip based on the current debugger type.</p>"},{"location":"reference/pwndbg/lib/tips/#pwndbg.lib.tips.get_all_tips","title":"get_all_tips","text":"<pre><code>get_all_tips() -> list[str]\n</code></pre> <p>Returns all tips applicable to the current debugger.</p>"},{"location":"reference/pwndbg/lib/tips/#pwndbg.lib.tips.color_tip","title":"color_tip","text":"<pre><code>color_tip(tip: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/lib/version/","title":"pwndbg.lib.version","text":""},{"location":"reference/pwndbg/lib/version/#pwndbg.lib.version","title":"version","text":"<p>Functions:</p> <ul> <li> <code>build_id</code> \u2013 <p>Returns pwndbg commit id if git is available.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>__version__</code> \u2013 </li> <li> <code>b_id</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/version/#pwndbg.lib.version.__version__","title":"__version__ <code>module-attribute</code>","text":"<pre><code>__version__ = '2025.04.18'\n</code></pre>"},{"location":"reference/pwndbg/lib/version/#pwndbg.lib.version.b_id","title":"b_id <code>module-attribute</code>","text":"<pre><code>b_id = build_id()\n</code></pre>"},{"location":"reference/pwndbg/lib/version/#pwndbg.lib.version.build_id","title":"build_id","text":"<pre><code>build_id() -> str\n</code></pre> <p>Returns pwndbg commit id if git is available.</p>"},{"location":"reference/pwndbg/lib/which/","title":"pwndbg.lib.which","text":""},{"location":"reference/pwndbg/lib/which/#pwndbg.lib.which","title":"which","text":"<p>Functions:</p> <ul> <li> <code>which</code> \u2013 <p>which(name, flags = os.X_OK, all = False) -> str or str set</p> </li> </ul>"},{"location":"reference/pwndbg/lib/which/#pwndbg.lib.which.which","title":"which","text":"<pre><code>which(name: str, all: bool = False) -> str | set[str] | None\n</code></pre> <p>which(name, flags = os.X_OK, all = False) -> str or str set</p> <p>Works as the system command <code>which</code>; searches $PATH for <code>name</code> and returns a full path if found.</p> <p>If <code>all</code> is <code>True</code> the set of all found locations is returned, else the first occurrence or <code>None</code> is returned.</p> <p>Parameters:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 <p>The file to search for.</p> </li> <li> <code>all</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>Whether to return all locations where <code>name</code> was found.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>str | set[str] | None</code> \u2013 <p>If <code>all</code> is <code>True</code> the set of all locations where <code>name</code> was found,</p> </li> <li> <code>str | set[str] | None</code> \u2013 <p>else the first location or <code>None</code> if not found.</p> </li> </ul> Example <p>which('sh') '/bin/sh'</p>"},{"location":"reference/pwndbg/log/","title":"pwndbg.log","text":""},{"location":"reference/pwndbg/log/#pwndbg.log","title":"log","text":"<p>Classes:</p> <ul> <li> <code>ColorFormatter</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/log/#pwndbg.log.ColorFormatter","title":"ColorFormatter","text":"<p> Bases: <code>Formatter</code></p> <p>Methods:</p> <ul> <li> <code>format</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>log_funcs</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/log/#pwndbg.log.ColorFormatter.log_funcs","title":"log_funcs <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>log_funcs = {\n DEBUG: debug,\n INFO: info,\n WARNING: warn,\n ERROR: error,\n CRITICAL: error,\n}\n</code></pre>"},{"location":"reference/pwndbg/log/#pwndbg.log.ColorFormatter.format","title":"format","text":"<pre><code>format(record)\n</code></pre>"},{"location":"reference/pwndbg/profiling/","title":"pwndbg.profiling","text":""},{"location":"reference/pwndbg/profiling/#pwndbg.profiling","title":"profiling","text":"<p>Classes:</p> <ul> <li> <code>Profiler</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>init</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>profiler</code> (<code>Profiler | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.profiler","title":"profiler <code>module-attribute</code>","text":"<pre><code>profiler: Profiler | None = None\n</code></pre>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.Profiler","title":"Profiler","text":"<pre><code>Profiler(p: Profile)\n</code></pre> <p>Methods:</p> <ul> <li> <code>print_time_elapsed</code> \u2013 </li> <li> <code>start</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.Profiler.print_time_elapsed","title":"print_time_elapsed","text":"<pre><code>print_time_elapsed() -> None\n</code></pre>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.Profiler.start","title":"start","text":"<pre><code>start() -> None\n</code></pre>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.Profiler.stop","title":"stop","text":"<pre><code>stop(filename: str | None = None) -> None\n</code></pre>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.init","title":"init","text":"<pre><code>init(p: Profile, _start_time: float | None) -> None\n</code></pre>"},{"location":"reference/pwndbg/radare2/","title":"pwndbg.radare2","text":""},{"location":"reference/pwndbg/radare2/#pwndbg.radare2","title":"radare2","text":"<p>Functions:</p> <ul> <li> <code>r2pipe</code> \u2013 <p>Spawn and return a r2pipe handle for the current process file.</p> </li> </ul>"},{"location":"reference/pwndbg/radare2/#pwndbg.radare2.r2pipe","title":"r2pipe","text":"<pre><code>r2pipe()\n</code></pre> <p>Spawn and return a r2pipe handle for the current process file.</p> <p>This function requires a radare2 installation plus the r2pipe python library. The base address is automatically set for PIE when loading the binary. After opening the handle, the binary is automatically analyzed.</p> <p>Raises ImportError if r2pipe python library is not available. Raises Exception if anything goes fatally wrong.</p> <p>Returns a r2pipe.open handle.</p>"},{"location":"reference/pwndbg/rizin/","title":"pwndbg.rizin","text":""},{"location":"reference/pwndbg/rizin/#pwndbg.rizin","title":"rizin","text":"<p>Functions:</p> <ul> <li> <code>rzpipe</code> \u2013 <p>Spawn and return a rzpipe handle for the current process file.</p> </li> </ul>"},{"location":"reference/pwndbg/rizin/#pwndbg.rizin.rzpipe","title":"rzpipe","text":"<pre><code>rzpipe()\n</code></pre> <p>Spawn and return a rzpipe handle for the current process file. This function requires a rizin installation plus the rzpipe python library. The base address is automatically set for PIE when loading the binary. After opening the handle, the binary is automatically analyzed. Raises ImportError if rzpipe python library is not available. Raises Exception if anything goes fatally wrong. Returns a rzpipe.open handle.</p>"},{"location":"reference/pwndbg/search/","title":"pwndbg.search","text":""},{"location":"reference/pwndbg/search/#pwndbg.search","title":"search","text":"<p>Search the address space for byte patterns.</p> <p>Functions:</p> <ul> <li> <code>search</code> \u2013 <p>Search inferior memory for a byte sequence.</p> </li> </ul>"},{"location":"reference/pwndbg/search/#pwndbg.search.search","title":"search","text":"<pre><code>search(\n searchfor: bytes,\n mappings: Collection[Page] | None = None,\n start: int | None = None,\n end: int | None = None,\n step: int | None = None,\n aligned: int | None = None,\n limit: int | None = None,\n executable: bool = False,\n writable: bool = False,\n) -> Generator[int, None, None]\n</code></pre> <p>Search inferior memory for a byte sequence.</p> <p>Parameters:</p> <ul> <li> <code>searchfor</code> (<code>bytes</code>) \u2013 <p>Byte sequence to find</p> </li> <li> <code>mappings</code> (<code>Collection[Page] | None</code>, default: <code>None</code> ) \u2013 <p>List of pwndbg.lib.memory.Page objects to search By default, uses all available mappings.</p> </li> <li> <code>start</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>First address to search, inclusive.</p> </li> <li> <code>end</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>Last address to search, exclusive.</p> </li> <li> <code>step</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>Size of memory region to skip each result</p> </li> <li> <code>aligned</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>Strict byte alignment for search result</p> </li> <li> <code>limit</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>Maximum number of results to return</p> </li> <li> <code>executable</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>Restrict search to executable pages</p> </li> <li> <code>writable</code> (<code>bool</code>, default: <code>False</code> ) \u2013 <p>Restrict search to writable pages</p> </li> </ul> <p>Yields:</p> <ul> <li> <code>int</code> \u2013 <p>An iterator on the address matches</p> </li> </ul>"},{"location":"reference/pwndbg/ui/","title":"pwndbg.ui","text":""},{"location":"reference/pwndbg/ui/#pwndbg.ui","title":"ui","text":"<p>A few helpers for making things print pretty-like.</p> <p>Functions:</p> <ul> <li> <code>check_title_position</code> \u2013 </li> <li> <code>banner</code> \u2013 </li> <li> <code>addrsz</code> \u2013 </li> <li> <code>get_window_size</code> \u2013 </li> <li> <code>get_cmd_window_size</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>title_position</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/ui/#pwndbg.ui.title_position","title":"title_position <code>module-attribute</code>","text":"<pre><code>title_position = add_param(\n \"banner-title-position\", \"center\", \"banner title position\"\n)\n</code></pre>"},{"location":"reference/pwndbg/ui/#pwndbg.ui.check_title_position","title":"check_title_position","text":"<pre><code>check_title_position() -> None\n</code></pre>"},{"location":"reference/pwndbg/ui/#pwndbg.ui.banner","title":"banner","text":"<pre><code>banner(title, target=stdout, width=None, extra='')\n</code></pre>"},{"location":"reference/pwndbg/ui/#pwndbg.ui.addrsz","title":"addrsz","text":"<pre><code>addrsz(address) -> str\n</code></pre>"},{"location":"reference/pwndbg/ui/#pwndbg.ui.get_window_size","title":"get_window_size","text":"<pre><code>get_window_size(target=stdout)\n</code></pre>"},{"location":"reference/pwndbg/ui/#pwndbg.ui.get_cmd_window_size","title":"get_cmd_window_size","text":"<pre><code>get_cmd_window_size()\n</code></pre>"},{"location":"reference/pwndbg/wrappers/","title":"pwndbg.wrappers","text":""},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers","title":"wrappers","text":"<p>Modules:</p> <ul> <li> <code>checksec</code> \u2013 </li> <li> <code>readelf</code> \u2013 </li> </ul> <p>Classes:</p> <ul> <li> <code>OnlyWithCommand</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>call_cmd</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>P</code> \u2013 </li> <li> <code>T</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.OnlyWithCommand","title":"OnlyWithCommand","text":"<pre><code>OnlyWithCommand(*commands: str | list[str])\n</code></pre> <p>Methods:</p> <ul> <li> <code>__call__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>all_cmds</code> (<code>list[str]</code>) \u2013 </li> <li> <code>cmd</code> (<code>list[str]</code>) \u2013 </li> <li> <code>cmd_path</code> (<code>str | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.OnlyWithCommand.all_cmds","title":"all_cmds <code>instance-attribute</code>","text":"<pre><code>all_cmds: list[str] = [\n cmd[0] if isinstance(cmd, list) else cmd for cmd in commands\n]\n</code></pre>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.OnlyWithCommand.cmd","title":"cmd <code>instance-attribute</code>","text":"<pre><code>cmd: list[str] = command if isinstance(command, list) else [command]\n</code></pre>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.OnlyWithCommand.cmd_path","title":"cmd_path <code>instance-attribute</code>","text":"<pre><code>cmd_path: str | None = which(cmd[0])\n</code></pre>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.OnlyWithCommand.__call__","title":"__call__","text":"<pre><code>__call__(function: Callable[P, T]) -> Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers.call_cmd","title":"call_cmd","text":"<pre><code>call_cmd(cmd: str | list[str]) -> str\n</code></pre>"},{"location":"reference/pwndbg/wrappers/checksec/","title":"pwndbg.wrappers.checksec","text":""},{"location":"reference/pwndbg/wrappers/checksec/#pwndbg.wrappers.checksec","title":"checksec","text":"<p>Functions:</p> <ul> <li> <code>monkeypatch_pwnlib_term_text</code> \u2013 </li> <li> <code>get_raw_out</code> \u2013 </li> <li> <code>relro_status</code> \u2013 </li> <li> <code>pie_status</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/wrappers/checksec/#pwndbg.wrappers.checksec.monkeypatch_pwnlib_term_text","title":"monkeypatch_pwnlib_term_text","text":"<pre><code>monkeypatch_pwnlib_term_text() -> Iterator[None]\n</code></pre>"},{"location":"reference/pwndbg/wrappers/checksec/#pwndbg.wrappers.checksec.get_raw_out","title":"get_raw_out","text":"<pre><code>get_raw_out(local_path: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/wrappers/checksec/#pwndbg.wrappers.checksec.relro_status","title":"relro_status","text":"<pre><code>relro_status(local_path: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/wrappers/checksec/#pwndbg.wrappers.checksec.pie_status","title":"pie_status","text":"<pre><code>pie_status(local_path: str) -> str\n</code></pre>"},{"location":"reference/pwndbg/wrappers/readelf/","title":"pwndbg.wrappers.readelf","text":""},{"location":"reference/pwndbg/wrappers/readelf/#pwndbg.wrappers.readelf","title":"readelf","text":"<p>Classes:</p> <ul> <li> <code>RelocationType</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>get_got_entry</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>cmd_name</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/wrappers/readelf/#pwndbg.wrappers.readelf.cmd_name","title":"cmd_name <code>module-attribute</code>","text":"<pre><code>cmd_name = 'readelf'\n</code></pre>"},{"location":"reference/pwndbg/wrappers/readelf/#pwndbg.wrappers.readelf.RelocationType","title":"RelocationType","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>JUMP_SLOT</code> \u2013 </li> <li> <code>GLOB_DAT</code> \u2013 </li> <li> <code>IRELATIVE</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/wrappers/readelf/#pwndbg.wrappers.readelf.RelocationType.JUMP_SLOT","title":"JUMP_SLOT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>JUMP_SLOT = 1\n</code></pre>"},{"location":"reference/pwndbg/wrappers/readelf/#pwndbg.wrappers.readelf.RelocationType.GLOB_DAT","title":"GLOB_DAT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>GLOB_DAT = 2\n</code></pre>"},{"location":"reference/pwndbg/wrappers/readelf/#pwndbg.wrappers.readelf.RelocationType.IRELATIVE","title":"IRELATIVE <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>IRELATIVE = 3\n</code></pre>"},{"location":"reference/pwndbg/wrappers/readelf/#pwndbg.wrappers.readelf.get_got_entry","title":"get_got_entry","text":"<pre><code>get_got_entry(local_path: str) -> dict[RelocationType, list[str]]\n</code></pre>"},{"location":"blog/archive/2022/","title":"2022","text":""}]} |