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.
pwndbg/2025.10.20/search/search_index.json

1 line
2.2 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 our Features page and CHEATSHEET (feel free to print it!). If you have any questions you may read the documentation or asks us in our Discord server.</p>"},{"location":"#why","title":"Why?","text":"<p>Vanilla GDB and LLDB are terrible to use for reverse engineering and exploit development. Typing <code>x/30gx $rsp</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> <p>Pwndbg is a Python module which can be loaded into GDB or run as a REPL interface for 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>"},{"location":"#installation","title":"Installation","text":"<p>See installation instructions.</p>"},{"location":"#what-about","title":"What about ...?","text":"<p>Many past (gdbinit, PEDA) and present projects (GEF, bata24/GEF) offer great features, but are hard to extend and are packaged as large single files (103KB, 195KB, 423KB, 4.12MB). Pwndbg aims to replace them with a faster, cleaner, and more robust implementation.</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":"#contributing","title":"Contributing","text":"<p>Pull requests are welcome \u2764\ufe0f. Check out the Contributing Guide.</p>"},{"location":"#acknowledgements","title":"Acknowledgements","text":"<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>"},{"location":"features/","title":"Features","text":""},{"location":"features/#features","title":"Features","text":"<p>Pwndbg has a great deal of useful features. You can a see all available commands at any time by typing the <code>pwndbg</code> command or by checking the Commands section of the documentation. For configuration and theming see the Configuration section. Below is a subset of commands which are easy to capture in screenshots.</p>"},{"location":"features/#disassembly-and-emulation","title":"Disassembly and Emulation","text":"<p>Pwndbg leverages the capstone and unicorn engines, along with its own instrospection, to display, annotate and emulate instructions.</p> <p>Operands of instructions are resolved, conditions evaluated, and only the instructions that will actually be executed are shown.</p> <p></p> <p>This is incredibly useful when stepping through jump tables, PLT entries, and ROPping.</p> <p></p>"},{"location":"features/#context","title":"Context","text":"<p>A useful summary of the current execution context is printed every time the debugger stops (e.g. breakpoint or single-step), displaying all registers, the stack, call frames, disassembly, and additionally recursively dereferencing all pointers. All memory addresses are color-coded to the type of memory they represent.</p> <p></p> <p>A history of previous context output is kept which can be accessed using the <code>contextprev</code> and <code>contextnext</code> commands.</p>"},{"location":"features/#arguments","title":"Arguments","text":"<p>All function call sites are annotated with the arguments to those functions. This works best with debugging symbols, but also works in the most common case where an imported function (e.g. libc function via GOT or PLT) is used.</p> <p> </p>"},{"location":"features/#splitting-layouting-context","title":"Splitting / Layouting Context","text":"<p>The context sections can be distributed among different tty by using the <code>contextoutput</code> command. Thus, if you want to make better use of some of the empty space in the default Pwndbg output, you can split the panes in your terminal and redirect the various contexts among them.</p> <p></p> <p>See Splitting the Context for more information.</p>"},{"location":"features/#gdb-tui","title":"GDB TUI","text":"<p>The context sections are available as native GDB TUI windows named <code>pwndbg_[sectionname]</code>. There are some predefined layouts coming with Pwndbg which you can select using <code>layout pwndbg</code> or <code>layout pwndbg_code</code>.</p> <p></p> <p>See GDB TUI for more information.</p>"},{"location":"features/#watch-expressions","title":"Watch Expressions","text":"<p>You can add expressions to be watched by the context. Those expressions are evaluated and shown on every context refresh. For instance by doing <code>contextwatch execute \"info args\"</code> we can see the arguments of every function we are in (here we are in <code>mmap</code>):</p> <p></p> <p>See <code>contextwatch</code> for more information.</p>"},{"location":"features/#integrations","title":"Integrations","text":""},{"location":"features/#ghidra","title":"Ghidra","text":"<p>With the help of radare2 or rizin it is possible to show the decompiled source code of the ghidra decompiler.</p> <p>See Ghidra Integration for more information.</p>"},{"location":"features/#ida-probinary-ninja","title":"IDA Pro/Binary Ninja","text":"<p>Pwndbg is capable of integrating with IDA Pro or Binary Ninja by installing an XMLRPC server in the decompiler as a plugin, and then querying it for information.</p> <p>This allows extraction of comments, decompiled lines of source, breakpoints, symbols, and synchronized debugging (single-steps update the cursor in the decompiler).</p> <p></p> <p>See Binary Ninja Integration or IDA Integration for setup information.</p>"},{"location":"features/#heap-inspection","title":"Heap Inspection","text":"<p>Pwndbg provides commands for inspecting the heap and the allocator's state. Currently supported are:</p> <ul> <li>glibc malloc</li> <li>jemalloc</li> <li>linux's buddy allocator</li> <li>linux's SLUB allocator</li> </ul> <p>See some of the commands for glibc malloc: </p>"},{"location":"features/#lldb","title":"LLDB","text":"<p>While most other GDB plugins are well GDB plugins, Pwndbg's implementation is debugger-agnostic. You can use Pwndbg with LLDB!</p> <p></p>"},{"location":"features/#windbg-compatibility","title":"WinDbg Compatibility","text":"<p>For those coming from a Windows background, Pwndbg has a complete WinDbg compatibility layer. You can <code>dd</code>, <code>dps</code>, <code>eq</code>, and even <code>eb $rip 90</code> to your heart's content.</p> <p></p>"},{"location":"features/#go-debugging","title":"Go Debugging","text":"<p>Pwndbg has support for dumping complex Go values like maps and slices, including automatically parsing out type layouts in certain cases.</p> <p>See the Go debugging guide for more information.</p>"},{"location":"features/#so-many-commands","title":"So many commands","text":"<p>Go take a look at Commands! Here is some cool stuff you can do to get you started.</p>"},{"location":"features/#process-state-inspection","title":"Process State Inspection","text":"<p>Use the <code>procinfo</code> command in order to inspect the current process state, like UID, GID, Groups, SELinux context, and open file descriptors! Pwndbg works particularly well with remote GDB debugging like with Android phones.</p> <p> </p>"},{"location":"features/#rop-gadgets","title":"ROP Gadgets","text":"<p>Tools for finding rop gadgets statically don't know about everything that will be loaded into the address space and they can make mistakes about which addresses will actually end up executable. You can now rop at runtime with Pwndbg's <code>rop</code> and <code>ropper</code>.</p> <p></p>"},{"location":"features/#search","title":"Search","text":"<p>Pwndbg makes <code>search</code>ing the target memory space easy, with a complete and easy-to-use interface. Whether you're searching for bytes, strings, or various sizes of integer values or pointers, it's a simple command away.</p> <p></p>"},{"location":"features/#finding-leaks","title":"Finding Leaks","text":"<p>Finding leak chains can be done using the <code>leakfind</code> and <code>probeleak</code> commands. They recursively inspect address ranges for pointers, and report on all pointers found.</p> <p> </p>"},{"location":"features/#telescope","title":"Telescope","text":"<p>Inspecting memory dumps is easy with the <code>telescope</code> command. It recursively dereferences a range of memory, letting you see everything at once. As an added bonus, Pwndbg checks all of the available registers to see if they point into the memory range.</p> <p></p>"},{"location":"features/#virtual-memory-maps","title":"Virtual Memory Maps","text":"<p>Pwndbg enhances the standard memory map listing and allows easy searching with <code>vmmap</code>.</p> <p> </p>"},{"location":"features/#tracking-glibc-heap-allocations","title":"Tracking glibc heap allocations","text":"<p>It can be very useful to see allocations happening in real time. It can give us a good idea of what the allocation pattern of a program looks like, and allows us to make informed decisions on how to optimize or attack it. The <code>track-heap</code> command does just that.</p>"},{"location":"features/#tracking-the-got","title":"Tracking the GOT","text":"<p>The Procedure Linkage Table (PLT) and Global Offset Table (GOT) are very interesting exploitation targets since they contain many often-accessed function pointers. You can track how your program goes through the GOT using the <code>track-got</code> command.</p>"},{"location":"features/#attach-to-a-process-by-name","title":"Attach to a process by name","text":"<p>The days of running pidof in a different terminal are over. Use <code>attachp</code> to attach to any process by name, pid, arguments or device file!</p> <p></p>"},{"location":"setup/","title":"Setup","text":"<p>There are multiple ways to install Pwndbg, depending on whether you want to use it with GDB, with LLDB, use a portable release, or install it from source.</p>"},{"location":"setup/#installing-pwndbg-gdb","title":"Installing pwndbg-gdb","text":"<p>Install via curl/sh (Linux/macOS) <pre><code>curl -qsL 'https://install.pwndbg.re' | sh -s -- -t pwndbg-gdb\n</code></pre> Install via Homebrew (macOS) <pre><code>brew install pwndbg/tap/pwndbg-gdb\n</code></pre> Install via the Nix package manager (Linux/macOS) <pre><code>nix shell github:pwndbg/pwndbg\n</code></pre></p>"},{"location":"setup/#official-pwndbg-packages","title":"Official Pwndbg packages","text":"<p>When installing with GDB, you may also download a package to install through your package manager of choice. Download the package from the releases page and pick the appropriate download from the second table.</p> <p>RPM-based Systems (CentOS/Alma/Rocky/RHEL): <pre><code>dnf install ./pwndbg-2025.10.20.x86_64.rpm\n</code></pre> DEB-based Systems (Debian/Ubuntu/Kali): <pre><code>apt install ./pwndbg_2025.10.20_amd64.deb\n</code></pre> Alpine: <pre><code>apk add --allow-untrusted ./pwndbg_2025.10.20_x86_64.apk\n</code></pre> Arch Linux: <pre><code>pacman -U ./pwndbg-2025.10.20-1-x86_64.pkg.tar.zst\n</code></pre></p>"},{"location":"setup/#distro-packages","title":"Distro packages","text":"<p>You may want to install Pwndbg through your distribution's package manager. This installation method is not officially supported because we cannot control the versions of the python dependencies Pwndbg uses in this case. Please use any other installation method when reproducing bug reports (portable package is probably simplest in this case). If a bug reproduces with a distro package but not with any of the supported installation methods, please report it to the package maintainer; if the problem cannot be fixed, let us know and we will add it to a list of known issues below.</p> ArchGentoo <p><pre><code>sudo pacman -S pwndbg\n</code></pre> You will also need to source Pwndbg from your <code>~/.gdbinit</code>. Add this line to the beginning of that file: <pre><code>source /usr/share/pwndbg/gdbinit.py\n</code></pre> Pwndbg will be started every time you invoke <code>gdb</code> now.</p> <pre><code>sudo emerge --ask dev-debug/pwndbg\n</code></pre>"},{"location":"setup/#installing-pwndbg-lldb","title":"Installing pwndbg-lldb","text":"<p>These installation methods provide the <pre><code>pwndbg-lldb ./your-binary\n</code></pre> command.</p> <p>Install via curl/sh (Linux/macOS) <pre><code>curl -qsL 'https://install.pwndbg.re' | sh -s -- -t pwndbg-lldb\n</code></pre> Install via Homebrew (macOS) <pre><code>brew install pwndbg/tap/pwndbg-lldb\n</code></pre> Install via the Nix package manager (Linux/macOS): <pre><code>nix shell github:pwndbg/pwndbg#pwndbg-lldb\n</code></pre></p>"},{"location":"setup/#download-the-portable-version","title":"Download the Portable Version","text":"<p>You can download a portable release on the Pwndbg releases page. There are seperate releases for GDB and LLDB. Use the first table to pick the appropriate download for your system architecture. You can then unpack the archive with: <pre><code>tar -v -xf &lt;archive-name&gt;\n</code></pre> And run Pwndbg with <pre><code>./pwndbg/bin/pwndbg\n</code></pre> or <pre><code>./pwndbg/bin/pwndbg-lldb\n</code></pre> depending on which version you installed. You may add the appropriate file to your shell's PATH.</p>"},{"location":"setup/#removing-quarantine-flags-macos","title":"Removing Quarantine Flags (macOS)","text":"<p>When first setting up the portable version of Pwndbg in macOS, Gatekeeper will normally try to prevent any code in the extracted files from running until the user explicitly allows each file to be run. As we ship many files which would require this, the process of manually granting permission for each one to be run can get quite tiresome.</p> <p>In order to do this to all files at once, you may choose to run the following command, which removes the quarantine flag from all extracted files at once:</p> <pre><code>xattr -rd com.apple.quarantine pwndbg\n</code></pre> <p>Assuming that the files were extracted to a folder called <code>pwndbg</code>.</p>"},{"location":"setup/#installing-from-source","title":"Installing from source","text":"<p>See contributing/Installing Pwndbg from source, you do not need the \"The development environment\" section.</p>"},{"location":"blog/","title":"Blog","text":""},{"location":"blog/2022/08/21/pwndbg-coding-sprints-report/","title":"Pwndbg coding sprints report","text":"<p>(originally posted on https://disconnect3d.pl/2022/08/21/pwndbg-coding-sprints/)</p> <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 &lt;stdio.h&gt;\n#include &lt;string.h&gt;\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 ***: &lt;unknown&gt; 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 currently enabled context sections.</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/#darwinlibsystemmach-o","title":"Darwin/libsystem/Mach-O","text":"<ul> <li>commpage - Dumps all values from the macOS commpage.</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 - 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>buddydump - Displays metadata and freelists of the buddy allocator.</li> <li>kbase - Finds the kernel virtual base address.</li> <li>kbpf - Prints information about the linux kernel bpf progs and maps.</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.</li> <li>kdmabuf - Prints DMA buf info</li> <li>kdmesg - Displays the kernel ring buffer (dmesg) contents.</li> <li>klookup - Lookup kernel symbols</li> <li>kmod - Displays the loaded Linux kernel modules.</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>ksyscalls - Displays Linux syscall table, including names and addresses of syscalls.</li> <li>ktask - Displays information about kernel tasks.</li> <li>kversion - Outputs the kernel version (/proc/version).</li> <li>msr - Read or write to Model Specific Register (MSR)</li> <li>p2v - Translate physical address to its corresponding virtual address.</li> <li>pageinfo - Convert a pointer to a <code>struct page</code> to its corresponding virtual address.</li> <li>pagewalk - Performs pagewalk.</li> <li>slab - Prints information about the linux kernel's slab allocator SLUB.</li> <li>v2p - Translate virtual address to its corresponding physmap address.</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>parse-seccomp - Parse a struct sock_fprog from memory and dump its filter</li> <li>piebase - Calculate VA of RVA from PIE base.</li> <li>plt - Prints any symbols found in Procedure Linkage Table sections if any exist.</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>dump-register-frame - Display the registers saved to memory for a certain frame type</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>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 - Manage custom C structures in pwndbg. Supports project-specific auto-loading from .gdbinit.</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/syscall 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/#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>heap-config - Shows heap related configuration.</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/#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/#musl","title":"musl","text":"<ul> <li>mallocng-dump - Dump the mallocng heap.</li> <li>mallocng-explain - Gives a quick explanation of musl's mallocng allocator.</li> <li>mallocng-find - Find slot which contains the given address.</li> <li>mallocng-group - Print out information about a mallocng group at the given address.</li> <li>mallocng-malloc-context - Print out the mallocng __malloc_context (ctx) object.</li> <li>mallocng-meta-area - Print out a mallocng meta_area object at the given address.</li> <li>mallocng-meta - Print out information about a mallocng group given the address of its meta.</li> <li>mallocng-slot-start - Dump information about a mallocng slot, given its start address.</li> <li>mallocng-slot-user - Dump information about a mallocng slot, given its user address.</li> <li>mallocng-visualize-slots - Visualize slots in a group.</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":"<p>(only in GDB)</p> <pre><code>usage: break-if-not-taken [-h] branch\n</code></pre> <p>Breaks on a branch if it is not taken.</p>"},{"location":"commands/breakpoint/break-if-not-taken/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help branch The branch instruction to break on."},{"location":"commands/breakpoint/break-if-not-taken/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<p>(only in GDB)</p> <pre><code>usage: break-if-taken [-h] branch\n</code></pre> <p>Breaks on a branch if it is taken.</p>"},{"location":"commands/breakpoint/break-if-taken/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help branch The branch instruction to break on."},{"location":"commands/breakpoint/break-if-taken/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/breakpoint/breakrva/","title":"Breakrva","text":""},{"location":"commands/breakpoint/breakrva/#breakrva","title":"breakrva","text":"<p>(only in GDB)</p> <pre><code>usage: breakrva [-h] [offset] [module]\n</code></pre> <p>Break at RVA from PIE base.</p> <p>Alias: brva</p>"},{"location":"commands/breakpoint/breakrva/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help offset Offset to add. (default: 0) module Module to choose as base. Defaults to the target executable. (default: '')"},{"location":"commands/breakpoint/breakrva/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/breakpoint/ignore/","title":"Ignore","text":""},{"location":"commands/breakpoint/ignore/#ignore","title":"ignore","text":"<p>(only in GDB)</p> <pre><code>usage: ignore [-h] [N] COUNT\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help bpnum The breakpoint number N. count The number to set COUNT."},{"location":"commands/breakpoint/ignore/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/context/context/","title":"Context","text":""},{"location":"commands/context/context/#context","title":"context","text":"<pre><code>usage: context [-h] [--on] [--off] [subcontext ...]\n</code></pre> <p>Print out the currently enabled context sections.</p> <p>This is the text that gets printed on every stop. It can be useful to run this command manually when you change some process/debugger state but don't want to step/continue (e.g. after using the <code>down</code> and <code>up</code> commands).</p> <p>Alias: ctx</p>"},{"location":"commands/context/context/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help subcontext 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 Help -h --help show this help message and exit --on Show the section(s) in subsequent context commands again. The section(s) have to be in the 'context-sections' list. --off Do not show the section(s) in subsequent context commands even though they might be in the 'context-sections' list."},{"location":"commands/context/context/#notes","title":"Notes","text":"<p>To see more commands related to context control run: <pre><code>pwndbg -c context\n</code></pre> To see context configuration run: <pre><code>config context\n</code></pre></p>"},{"location":"commands/context/context/#usage-example","title":"Usage example","text":""},{"location":"commands/context/contextnext/","title":"Contextnext","text":""},{"location":"commands/context/contextnext/#contextnext","title":"contextnext","text":"<pre><code>usage: contextnext [-h] [count]\n</code></pre> <p>Select next entry in context history.</p> <p>Alias: ctxn</p>"},{"location":"commands/context/contextnext/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help count The number of entries to go forward in history (default: 1)"},{"location":"commands/context/contextnext/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/context/contextoutput/","title":"Contextoutput","text":""},{"location":"commands/context/contextoutput/#contextoutput","title":"contextoutput","text":"<pre><code>usage: contextoutput [-h] section path clearing [banner] [width]\n</code></pre> <p>Sets the output of a context section.</p> <p>Alias: ctx-out</p>"},{"location":"commands/context/contextoutput/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help section The section which is to be configured. ('regs', 'disasm', 'code', 'stack', 'backtrace', 'ghidra', 'args', 'threads', 'heap_tracker', 'expressions', and/or 'last_signal') path The path to which the output is written clearing Indicates whether to clear the output banner Where a banner should be placed: both, top , bottom, none (default: 'both') width Sets a fixed width (used for banner). Set to None for auto"},{"location":"commands/context/contextoutput/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/context/contextprev/","title":"Contextprev","text":""},{"location":"commands/context/contextprev/#contextprev","title":"contextprev","text":"<pre><code>usage: contextprev [-h] [count]\n</code></pre> <p>Select previous entry in context history.</p> <p>Alias: ctxp</p>"},{"location":"commands/context/contextprev/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help count The number of entries to go back in history (default: 1)"},{"location":"commands/context/contextprev/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/context/contextsearch/","title":"Contextsearch","text":""},{"location":"commands/context/contextsearch/#contextsearch","title":"contextsearch","text":"<pre><code>usage: contextsearch [-h] needle [section]\n</code></pre> <p>Search for a string in the context history and select that entry.</p> <p>Alias: ctxsearch</p>"},{"location":"commands/context/contextsearch/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help needle The string to search for in the context history section The section to search in. If not provided, search in all sections"},{"location":"commands/context/contextsearch/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/context/contextunwatch/","title":"Contextunwatch","text":""},{"location":"commands/context/contextunwatch/#contextunwatch","title":"contextunwatch","text":"<pre><code>usage: contextunwatch [-h] num\n</code></pre> <p>Removes an expression previously added to be watched.</p> <p>Aliases: ctx-unwatch, cunwatch</p>"},{"location":"commands/context/contextunwatch/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help num The expression number to be removed from context"},{"location":"commands/context/contextunwatch/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/context/contextwatch/","title":"Contextwatch","text":""},{"location":"commands/context/contextwatch/#contextwatch","title":"contextwatch","text":"<pre><code>usage: contextwatch [-h] [{eval,execute}] expression\n</code></pre> <p>Adds an expression to be shown on context.</p> <p>To remove an expression, see <code>cunwatch</code>.</p> <p>Aliases: ctx-watch, cwatch</p>"},{"location":"commands/context/contextwatch/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help cmd 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: 'eval') expression The expression to be evaluated and shown in context"},{"location":"commands/context/contextwatch/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/context/contextwatch/#examples","title":"Examples","text":"<pre><code>For watching variables/expressions:\n cwatch BUF\n cwatch ITEMS[0]\n\nFor running commands:\n cwatch execute \"ds BUF\"\n cwatch execute \"x/20x $rsp\"\n cwatch execute \"info args\"\n</code></pre>"},{"location":"commands/context/regs/","title":"Regs","text":""},{"location":"commands/context/regs/#regs","title":"regs","text":"<pre><code>usage: regs [-h] [regs ...]\n</code></pre> <p>Print out all registers and enhance the information.</p>"},{"location":"commands/context/regs/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help regs Registers to be shown"},{"location":"commands/context/regs/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/darwin_libsystem_mach-o/commpage/","title":"Commpage","text":""},{"location":"commands/darwin_libsystem_mach-o/commpage/#commpage","title":"commpage","text":"<pre><code>usage: commpage [-h] [-v]\n</code></pre> <p>Dumps all values from the macOS commpage.</p>"},{"location":"commands/darwin_libsystem_mach-o/commpage/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Print detailed information."},{"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":"<pre><code>usage: dev-dump-instruction [-h] [-e] [-n] [address]\n</code></pre> <p>Dump internal PwndbgInstruction attributes.</p> <p>Useful for debugging the disassembly and annotation subsystems in Pwndbg. See https://pwndbg.re/dev/contributing/improving-annotations/#bug-root-cause for more information.</p>"},{"location":"commands/developer/dev-dump-instruction/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address 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 Help -h --help show this help message and exit -e --emulate Force the use of emulation when enhancing the instruction, regardless of global 'emulate' setting. -n --no-emulate Disable the use of emulation when enhancing the instruction, regardless of global 'emulate' setting."},{"location":"commands/developer/log-level/","title":"Log level","text":""},{"location":"commands/developer/log-level/#log-level","title":"log-level","text":"<pre><code>usage: log-level [-h] [{debug,info,warning,error,critical}]\n</code></pre> <p>Set the log level.</p>"},{"location":"commands/developer/log-level/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help level The log level to set. (default: 'warning')"},{"location":"commands/developer/log-level/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/disassemble/emulate/","title":"Emulate","text":""},{"location":"commands/disassemble/emulate/#emulate","title":"emulate","text":"<pre><code>usage: emulate [-h] [pc] [lines]\n</code></pre> <p>Like nearpc, but will emulate instructions from the current $PC forward.</p>"},{"location":"commands/disassemble/emulate/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help pc Address to emulate near. lines Number of lines to show on either side of the address."},{"location":"commands/disassemble/emulate/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/disassemble/nearpc/","title":"Nearpc","text":""},{"location":"commands/disassemble/nearpc/#nearpc","title":"nearpc","text":"<pre><code>usage: nearpc [-h] [-e] [pc] [lines]\n</code></pre> <p>Disassemble near a specified address.</p> <p>Aliases: pdisass, u</p>"},{"location":"commands/disassemble/nearpc/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help pc Address to disassemble near. If this is the only argument and the value provided is small enough, it is interpreted as lines instead. lines Number of lines to show on either side of the address."},{"location":"commands/disassemble/nearpc/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -e --emulate Whether to emulate instructions to find the next ones or just linearly disassemble."},{"location":"commands/glibc_ptmalloc2_heap/arena/","title":"Arena","text":""},{"location":"commands/glibc_ptmalloc2_heap/arena/#arena","title":"arena","text":"<pre><code>usage: arena [-h] [addr]\n</code></pre> <p>Print the contents of an arena.</p> <p>Default to the current thread's arena.</p>"},{"location":"commands/glibc_ptmalloc2_heap/arena/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/arena/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: arenas [-h]\n</code></pre> <p>List this process's arenas.</p>"},{"location":"commands/glibc_ptmalloc2_heap/arenas/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: bins [-h] [addr] [tcache_addr]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the arena. tcache_addr Address of the tcache."},{"location":"commands/glibc_ptmalloc2_heap/bins/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: fastbins [-h] [-v] [addr]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/fastbins/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Show all fastbins, including empty ones"},{"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":"<pre><code>usage: find-fake-fast [-h] [--align] [--glibc-fastbin-bug]\n [--partial-overwrite]\n target_address [max_candidate_size]\n</code></pre> <p>Find candidate fake fast or tcache chunks overlapping the specified address.</p>"},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help target_address Address of the word-sized value to overlap. max_candidate_size Maximum size of fake chunks to find."},{"location":"commands/glibc_ptmalloc2_heap/find-fake-fast/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --align 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 -b --glibc-fastbin-bug Does the GLIBC fastbin size field bug affect the candidate size field width? -p --partial-overwrite Consider partial overwrite candidates, default behavior only shows word-size overwrites."},{"location":"commands/glibc_ptmalloc2_heap/heap/","title":"Heap","text":""},{"location":"commands/glibc_ptmalloc2_heap/heap/#heap","title":"heap","text":"<pre><code>usage: heap [-h] [-v] [-s] [addr]\n</code></pre> <p>Iteratively print chunks on a heap.</p> <p>Default to the current thread's active heap.</p>"},{"location":"commands/glibc_ptmalloc2_heap/heap/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr 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 Help -h --help show this help message and exit -v --verbose Print all chunk fields, even unused ones. -s --simple Simply print malloc_chunk struct's contents."},{"location":"commands/glibc_ptmalloc2_heap/hi/","title":"Hi","text":""},{"location":"commands/glibc_ptmalloc2_heap/hi/#hi","title":"hi","text":"<pre><code>usage: hi [-h] [-v] [-s] [-f] addr\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the interest."},{"location":"commands/glibc_ptmalloc2_heap/hi/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Print all chunk fields, even unused ones. -s --simple Simply print malloc_chunk struct's contents. -f --fake Allow fake chunks. If set, displays any memory as a heap chunk (even if its not a real chunk)."},{"location":"commands/glibc_ptmalloc2_heap/largebins/","title":"Largebins","text":""},{"location":"commands/glibc_ptmalloc2_heap/largebins/#largebins","title":"largebins","text":"<pre><code>usage: largebins [-h] [-v] [addr]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/largebins/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Show all largebins, including empty ones"},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/","title":"Malloc chunk","text":""},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/#malloc-chunk","title":"malloc-chunk","text":"<pre><code>usage: malloc-chunk [-h] [-f] [-v] [-s] [-d] [-n NEXT] addr\n</code></pre> <p>Print a chunk.</p>"},{"location":"commands/glibc_ptmalloc2_heap/malloc-chunk/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr 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 Help -h --help show this help message and exit -f --fake Is this a fake chunk? -v --verbose Print all chunk fields, even unused ones. -s --simple Simply print malloc_chunk struct's contents. -d --dump Print a hexdump of the chunk. -n --next Print the next N chunks after the specified address. (default: 0)"},{"location":"commands/glibc_ptmalloc2_heap/mp/","title":"Mp","text":""},{"location":"commands/glibc_ptmalloc2_heap/mp/#mp","title":"mp","text":"<pre><code>usage: mp [-h]\n</code></pre> <p>Print the mp_ struct's contents.</p>"},{"location":"commands/glibc_ptmalloc2_heap/mp/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: smallbins [-h] [-v] [addr]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/smallbins/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Show all smallbins, including empty ones"},{"location":"commands/glibc_ptmalloc2_heap/tcache/","title":"Tcache","text":""},{"location":"commands/glibc_ptmalloc2_heap/tcache/#tcache","title":"tcache","text":"<pre><code>usage: tcache [-h] [addr]\n</code></pre> <p>Print a thread's tcache contents.</p> <p>Default to the current thread's tcache.</p>"},{"location":"commands/glibc_ptmalloc2_heap/tcache/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the tcache."},{"location":"commands/glibc_ptmalloc2_heap/tcache/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: tcachebins [-h] [-v] [addr]\n</code></pre> <p>Print the contents of a tcache.</p> <p>Default to the current thread's tcache.</p>"},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr The address of the tcache bins."},{"location":"commands/glibc_ptmalloc2_heap/tcachebins/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Show all tcachebins, including empty ones"},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/","title":"Top chunk","text":""},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/#top-chunk","title":"top-chunk","text":"<pre><code>usage: top-chunk [-h] [addr]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/top-chunk/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: try-free [-h] addr\n</code></pre> <p>Check what would happen if free was called with given address.</p>"},{"location":"commands/glibc_ptmalloc2_heap/try-free/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address passed to free"},{"location":"commands/glibc_ptmalloc2_heap/try-free/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: unsortedbin [-h] [-v] [addr]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the arena."},{"location":"commands/glibc_ptmalloc2_heap/unsortedbin/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Show the \"all\" bin even if it's empty"},{"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":"<pre><code>usage: vis-heap-chunks [-h] [--beyond_top] [--no_truncate] [--all_chunks]\n [count] [addr]\n</code></pre> <p>Visualize chunks on a heap.</p> <p>Default to the current arena's active heap.</p> <p>Alias: vis</p>"},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help count Number of chunks to visualize. If the value is big enough and addr isn't provided, this is interpreted as addr instead. (default: 10) addr Address of the first chunk."},{"location":"commands/glibc_ptmalloc2_heap/vis-heap-chunks/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -b --beyond_top Attempt to keep printing beyond the top chunk. -n --no_truncate Display all the chunk contents (Ignore the <code>max-visualize-chunk-size</code> configuration). -a --all_chunks Display all chunks (Ignore the default-visualize-chunk-number configuration)."},{"location":"commands/integrations/ai/","title":"Ai","text":""},{"location":"commands/integrations/ai/#ai","title":"ai","text":"<p>(only in GDB)</p> <pre><code>usage: ai [-h] [-M MODEL] [-t TEMPERATURE] [-m MAX_TOKENS] [-v] [-L]\n [-c COMMAND]\n [question ...]\n</code></pre> <p>Ask GPT-3 a question about the current debugging context.</p>"},{"location":"commands/integrations/ai/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help question The question to ask."},{"location":"commands/integrations/ai/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -M --model The OpenAI model to use. -t --temperature The temperature to use. -m --max-tokens The maximum number of tokens to generate. -v --verbose Print the prompt and response. -L --list-models List the available models. -c --command 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":"<pre><code>usage: bn-sync [-h]\n</code></pre> <p>Synchronize Binary Ninja's cursor with GDB.</p> <p>Alias: bns</p>"},{"location":"commands/integrations/bn-sync/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/integrations/decomp/","title":"Decomp","text":""},{"location":"commands/integrations/decomp/#decomp","title":"decomp","text":"<pre><code>usage: decomp [-h] [addr] [lines]\n</code></pre> <p>Use the current integration to decompile code near an address.</p>"},{"location":"commands/integrations/decomp/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address to decompile near. lines Number of lines of decompilation to show."},{"location":"commands/integrations/decomp/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/integrations/j/","title":"J","text":""},{"location":"commands/integrations/j/#j","title":"j","text":"<p>(only in GDB)</p> <pre><code>usage: j [-h]\n</code></pre> <p>Synchronize IDA's cursor with GDB.</p>"},{"location":"commands/integrations/j/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/integrations/r2/","title":"R2","text":""},{"location":"commands/integrations/r2/#r2","title":"r2","text":"<pre><code>usage: r2 [-h] [--no-seek] [--no-rebase] [arguments ...]\n</code></pre> <p>Launches radare2.</p> <p>Alias: radare2</p>"},{"location":"commands/integrations/r2/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help arguments Arguments to pass to radare"},{"location":"commands/integrations/r2/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --no-seek Do not seek to current pc --no-rebase Do not set the base address for PIE according to the current mapping"},{"location":"commands/integrations/r2/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; r2 -- -S -AA\nWARN: Relocs has not been applied. Please use `-e bin.relocs.apply=true` or `-e bin.cache=true` next time\nINFO: Analyze all flags starting with sym. and entry0 (aa)\n[...]\nINFO: Debugger commands disabled in sandbox mode\n[0x0001d3d0]&gt; help\n\nWelcome to radare2!\n[...]\n</code></pre>"},{"location":"commands/integrations/r2pipe/","title":"R2pipe","text":""},{"location":"commands/integrations/r2pipe/#r2pipe","title":"r2pipe","text":"<pre><code>usage: r2pipe [-h] arguments [arguments ...]\n</code></pre> <p>Execute stateful radare2 commands through r2pipe.</p>"},{"location":"commands/integrations/r2pipe/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help arguments Arguments to pass to r2pipe"},{"location":"commands/integrations/r2pipe/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/integrations/r2pipe/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; r2pipe pdf @ sym.main\n ; ICOD XREF from entry0 @ 0x1d3e8(r)\n\u250c 6786: int main (uint32_t argc, char **argv, char **envp);\n\u2502 `- args(rdi, rsi, rdx) vars(21:sp[0x40..0x18c])\n\u2502 0x0001b920 f30f1efa endbr64\n\u2502 0x0001b924 4157 push r15\n\u2502 0x0001b926 4156 push r14\n\u2502 0x0001b928 4155 push r13\n\u2502 0x0001b92a 4154 push r12\n[...]\n\u2502 0x0001b966 85c0 test eax, eax\n\u2502 \u250c\u2500&lt; 0x0001b968 7545 jne 0x1b9af\n\u2502 \u2502 0x0001b96a e8311b0100 call sym.xtrace_init\n\u2502 \u2502 0x0001b96f e80cff0000 call sym.check_dev_tty\n\u2502 \u2502 ; CODE XREF from main @ 0x1b988(x)\n\u2502 \u250c\u2500\u2500&gt; 0x0001b974 833dd1680f.. cmp dword [obj.debugging_login_shell], 0 ; [0x11224c:4]=0\n\u2502 \u250c\u2500\u2500\u2500&lt; 0x0001b97b 743d je 0x1b9ba\n\u2502 \u2502\u254e\u2502 0x0001b97d bf03000000 mov edi, 3\n[...]\n</code></pre>"},{"location":"commands/integrations/rop/","title":"Rop","text":""},{"location":"commands/integrations/rop/#rop","title":"rop","text":"<pre><code>usage: rop [-h] [--grep GREP] [--memlimit MEMLIMIT] [argument ...]\n</code></pre> <p>Dump ROP gadgets with Jon Salwan's ROPgadget tool.</p> <p>Alias: ropgadget</p>"},{"location":"commands/integrations/rop/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help argument Arguments to pass to ROPgadget"},{"location":"commands/integrations/rop/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --grep String to grep the output for --memlimit String to grep the output for (default: '50MB')"},{"location":"commands/integrations/rop/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; rop --grep 'pop rdi' -- --nojop\nGadgets information\n============================================================\n[...]\n0x0007dce8 : pop rdi ; or dword ptr [rax], eax ; add rsp, 0x28 ; ret\n0x0007d838 : pop rdi ; or dword ptr [rax], eax ; je 0x7d840 ; ret\n0x0005b13d : pop rdi ; pop rbp ; ret\n0x0001ee23 : pop rdi ; ret\n\nUnique gadgets found: 8514\n</code></pre>"},{"location":"commands/integrations/ropper/","title":"Ropper","text":""},{"location":"commands/integrations/ropper/#ropper","title":"ropper","text":"<p>(only in GDB)</p> <pre><code>usage: ropper [-h] [argument ...]\n</code></pre> <p>ROP gadget search with ropper.</p>"},{"location":"commands/integrations/ropper/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help argument Arguments to pass to ropper"},{"location":"commands/integrations/ropper/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/integrations/ropper/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; ropper -- --console\n[INFO] Load gadgets from cache\n[LOAD] loading... 100%\n[LOAD] removing double gadgets... 100%\n(bash/ELF/x86_64)&gt;\n----\npwndbg&gt; ropper -- --search 'pop rdi; ret;'\n[INFO] Load gadgets from cache\n[LOAD] loading... 100%\n[LOAD] removing double gadgets... 100%\n[INFO] Searching for gadgets: pop rdi; ret;\n\n[INFO] File: /usr/bin/bash\n0x000000000001ee23: pop rdi; ret;\n</code></pre>"},{"location":"commands/integrations/rz/","title":"Rz","text":""},{"location":"commands/integrations/rz/#rz","title":"rz","text":"<pre><code>usage: rz [-h] [--no-seek] [--no-rebase] [arguments ...]\n</code></pre> <p>Launches rizin.</p> <p>Alias: rizin</p>"},{"location":"commands/integrations/rz/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help arguments Arguments to pass to rizin"},{"location":"commands/integrations/rz/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --no-seek Do not seek to current pc --no-rebase Do not set the base address for PIE according to the current mapping"},{"location":"commands/integrations/rz/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; rz -- -AA\n[x] Analyze all flags starting with sym. and entry0 (aa)\n[x] Analyze function calls\n[...]\n[x] Enable constraint types analysis for variables\n -- Use 'e asm.offset=true' to show offsets in 16bit segment addressing mode.\n[0x0001d3d0]&gt;\n</code></pre>"},{"location":"commands/integrations/rzpipe/","title":"Rzpipe","text":""},{"location":"commands/integrations/rzpipe/#rzpipe","title":"rzpipe","text":"<pre><code>usage: rzpipe [-h] arguments [arguments ...]\n</code></pre> <p>Execute stateful rizin commands through rzpipe.</p>"},{"location":"commands/integrations/rzpipe/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help arguments Arguments to pass to rzpipe"},{"location":"commands/integrations/rzpipe/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/integrations/rzpipe/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; rzpipe pdf @ sym.main\n ; DATA XREF from entry0 @ 0x1d3e8\n\u250c int main(int argc, char **argv, char **envp);\n\u2502 ; arg int argc @ rdi\n\u2502 ; arg char **argv @ rsi\n\u2502 ; arg char **envp @ rdx\n[...]\n\u2502 ; var uint64_t var_18ch @ stack - 0x18c\n\u2502 ; var int64_t var_188h @ stack - 0x188\n[...]\n\u2502 ; var int64_t canary @ stack - 0x40\n\u2502 0x0001b920 endbr64\n\u2502 0x0001b924 push r15\n\u2502 0x0001b926 push r14\n\u2502 0x0001b928 push r13\n\u2502 0x0001b92a push r12\n[...]\n\u2502 0x0001b966 test eax, eax\n\u2502 \u250c\u2500&lt; 0x0001b968 jne 0x1b9af\n\u2502 \u2502 0x0001b96a call sym.xtrace_init\n\u2502 \u2502 0x0001b96f call sym.check_dev_tty\n\u2502 \u2502 ; CODE XREF from main @ 0x1b988\n\u2502 \u250c\u2500\u2500&gt; 0x0001b974 cmp dword [obj.debugging_login_shell], 0 ; [0x11224c:4]=0\n\u2502 \u250c\u2500\u2500\u2500&lt; 0x0001b97b je 0x1b9ba\n\u2502 \u2502\u254e\u2502 0x0001b97d mov edi, 3 ; int s\n[...]\n</code></pre>"},{"location":"commands/integrations/save-ida/","title":"Save ida","text":""},{"location":"commands/integrations/save-ida/#save-ida","title":"save-ida","text":"<p>(only in GDB)</p> <pre><code>usage: save-ida [-h]\n</code></pre> <p>Save the ida database.</p>"},{"location":"commands/integrations/save-ida/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: jemalloc-extent-info [-h] [-v] addr\n</code></pre> <p>Prints extent information for the given address</p>"},{"location":"commands/jemalloc_heap/jemalloc-extent-info/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the extent metadata"},{"location":"commands/jemalloc_heap/jemalloc-extent-info/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose Print all chunk fields, even unused ones."},{"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":"<pre><code>usage: jemalloc-find-extent [-h] addr\n</code></pre> <p>Returns extent information for pointer address allocated by jemalloc</p>"},{"location":"commands/jemalloc_heap/jemalloc-find-extent/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the allocated memory location"},{"location":"commands/jemalloc_heap/jemalloc-find-extent/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: jemalloc-heap [-h]\n</code></pre> <p>Prints all extents information</p>"},{"location":"commands/jemalloc_heap/jemalloc-heap/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/binder/","title":"Binder","text":""},{"location":"commands/kernel/binder/#binder","title":"binder","text":"<pre><code>usage: binder [-h]\n</code></pre> <p>Show Android Binder information</p>"},{"location":"commands/kernel/binder/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/buddydump/","title":"Buddydump","text":""},{"location":"commands/kernel/buddydump/#buddydump","title":"buddydump","text":"<pre><code>usage: buddydump [-h] [-z ZONE] [-o ORDER] [-m MTYPE] [-p] [-c CPU] [-n NODE]\n [-f FIND]\n</code></pre> <p>Displays metadata and freelists of the buddy allocator.</p>"},{"location":"commands/kernel/buddydump/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -z --zone Displays/searches lists only in the specified zone. -o --order Displays/searches lists only with the specified order. -m --mtype Displays/searches lists only with the specified mtype. -p --pcp-only Displays/searches only PCP lists. -c --cpu CPU nr for searching PCP. -n --node -f --find The address to find in page free lists."},{"location":"commands/kernel/kbase/","title":"Kbase","text":""},{"location":"commands/kernel/kbase/#kbase","title":"kbase","text":"<pre><code>usage: kbase [-h] [-r] [-v]\n</code></pre> <p>Finds the kernel virtual base address.</p>"},{"location":"commands/kernel/kbase/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -r --rebase rebase loaded symbol file -v --verbose show more information relevant to the kbase (e.g. phys addr)"},{"location":"commands/kernel/kbpf/","title":"Kbpf","text":""},{"location":"commands/kernel/kbpf/#kbpf","title":"kbpf","text":"<pre><code>usage: kbpf [-h] [-v] [-p] [-m]\n</code></pre> <p>Prints information about the linux kernel bpf progs and maps.</p>"},{"location":"commands/kernel/kbpf/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -v --verbose (default: 0) -p --progs -m --maps"},{"location":"commands/kernel/kchecksec/","title":"Kchecksec","text":""},{"location":"commands/kernel/kchecksec/#kchecksec","title":"kchecksec","text":"<pre><code>usage: kchecksec [-h]\n</code></pre> <p>Checks for kernel hardening configuration options.</p>"},{"location":"commands/kernel/kchecksec/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/kcmdline/","title":"Kcmdline","text":""},{"location":"commands/kernel/kcmdline/#kcmdline","title":"kcmdline","text":"<pre><code>usage: kcmdline [-h]\n</code></pre> <p>Return the kernel commandline (/proc/cmdline).</p>"},{"location":"commands/kernel/kcmdline/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/kconfig/","title":"Kconfig","text":""},{"location":"commands/kernel/kconfig/#kconfig","title":"kconfig","text":"<pre><code>usage: kconfig [-h] [-l FILE_PATH] [config_name]\n</code></pre> <p>Outputs the kernel config.</p>"},{"location":"commands/kernel/kconfig/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help config_name A config name to search for"},{"location":"commands/kernel/kconfig/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -l --load load kernel config file"},{"location":"commands/kernel/kdmabuf/","title":"Kdmabuf","text":""},{"location":"commands/kernel/kdmabuf/#kdmabuf","title":"kdmabuf","text":"<pre><code>usage: kdmabuf [-h]\n</code></pre> <p>Prints DMA buf info</p>"},{"location":"commands/kernel/kdmabuf/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/kdmesg/","title":"Kdmesg","text":""},{"location":"commands/kernel/kdmesg/#kdmesg","title":"kdmesg","text":"<pre><code>usage: kdmesg [-h] [-T]\n</code></pre> <p>Displays the kernel ring buffer (dmesg) contents.</p>"},{"location":"commands/kernel/kdmesg/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -T --ctime Print human-readable timestamps."},{"location":"commands/kernel/klookup/","title":"Klookup","text":""},{"location":"commands/kernel/klookup/#klookup","title":"klookup","text":"<pre><code>usage: klookup [-h] [-a] [symbol]\n</code></pre> <p>Lookup kernel symbols</p> <p>Alias: kallsyms</p>"},{"location":"commands/kernel/klookup/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help symbol Address or symbol name to lookup"},{"location":"commands/kernel/klookup/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --apply applies all the symbols that satisfy the filter"},{"location":"commands/kernel/kmod/","title":"Kmod","text":""},{"location":"commands/kernel/kmod/#kmod","title":"kmod","text":"<pre><code>usage: kmod [-h] [-l PATH] [module_name]\n</code></pre> <p>Displays the loaded Linux kernel modules.</p>"},{"location":"commands/kernel/kmod/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help module_name A module name substring to filter for"},{"location":"commands/kernel/kmod/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -l --load the path of the module to load"},{"location":"commands/kernel/knft-dump/","title":"Knft dump","text":""},{"location":"commands/kernel/knft-dump/#knft-dump","title":"knft-dump","text":"<pre><code>usage: knft-dump [-h] [nsid]\n</code></pre> <p>Dump all nftables: tables, chains, rules, expressions</p>"},{"location":"commands/kernel/knft-dump/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help nsid Network Namespace ID"},{"location":"commands/kernel/knft-dump/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: knft-list-chains [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre> <p>Dump netfilter chains form a specific table</p>"},{"location":"commands/kernel/knft-list-chains/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help table_family Netfilter table family (inet, ip, ip6, netdev, bridge, arp) table_name Table name"},{"location":"commands/kernel/knft-list-chains/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n --nsid 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":"<pre><code>usage: knft-list-exprs [-h] [--nsid NSID]\n [table_family] [table_name] [chain_name] [rule_id]\n</code></pre> <p>Dump only expressions from specific rule</p>"},{"location":"commands/kernel/knft-list-exprs/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help table_family Table family, eg: inet, ip, ip6, netdev, bridge, arp table_name Table name chain_name Chain name rule_id Rule Handle ID"},{"location":"commands/kernel/knft-list-exprs/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n --nsid 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":"<pre><code>usage: knft-list-flowtables [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre> <p>Dump netfilter flowtables from a specific table</p>"},{"location":"commands/kernel/knft-list-flowtables/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help table_family Netfilter table family (inet, ip, ip6, netdev, bridge, arp) table_name Table name"},{"location":"commands/kernel/knft-list-flowtables/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n --nsid 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":"<pre><code>usage: knft-list-objects [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre> <p>Dump netfilter objects from a specific table</p>"},{"location":"commands/kernel/knft-list-objects/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help table_family Table family, eg: inet, ip, ip6, netdev, bridge, arp table_name Table name"},{"location":"commands/kernel/knft-list-objects/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n --nsid 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":"<pre><code>usage: knft-list-rules [-h] [--nsid NSID]\n [table_family] [table_name] [chain_name]\n</code></pre> <p>Dump netfilter rules form a specific chain</p>"},{"location":"commands/kernel/knft-list-rules/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help table_family Table family, eg: inet, ip, ip6, netdev, bridge, arp table_name Table name chain_name Chain name"},{"location":"commands/kernel/knft-list-rules/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n --nsid 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":"<pre><code>usage: knft-list-sets [-h] [--nsid NSID] [table_family] [table_name]\n</code></pre> <p>Dump netfilter sets from a specific table</p>"},{"location":"commands/kernel/knft-list-sets/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help table_family Table family, eg: inet, ip, ip6, netdev, bridge, arp table_name Table name"},{"location":"commands/kernel/knft-list-sets/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n --nsid 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":"<pre><code>usage: knft-list-tables [-h] [--nsid NSID]\n</code></pre> <p>Dump netfliter tables from a specific network namespace</p>"},{"location":"commands/kernel/knft-list-tables/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n --nsid Network Namespace ID"},{"location":"commands/kernel/ksyscalls/","title":"Ksyscalls","text":""},{"location":"commands/kernel/ksyscalls/#ksyscalls","title":"ksyscalls","text":"<pre><code>usage: ksyscalls [-h] [syscall_name]\n</code></pre> <p>Displays Linux syscall table, including names and addresses of syscalls.</p>"},{"location":"commands/kernel/ksyscalls/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help syscall_name A syscall name to search for"},{"location":"commands/kernel/ksyscalls/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/ktask/","title":"Ktask","text":""},{"location":"commands/kernel/ktask/#ktask","title":"ktask","text":"<pre><code>usage: ktask [-h] [task_name]\n</code></pre> <p>Displays information about kernel tasks.</p>"},{"location":"commands/kernel/ktask/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help task_name A task name to search for"},{"location":"commands/kernel/ktask/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/kversion/","title":"Kversion","text":""},{"location":"commands/kernel/kversion/#kversion","title":"kversion","text":"<pre><code>usage: kversion [-h]\n</code></pre> <p>Outputs the kernel version (/proc/version).</p>"},{"location":"commands/kernel/kversion/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/msr/","title":"Msr","text":""},{"location":"commands/kernel/msr/#msr","title":"msr","text":"<pre><code>usage: msr [-h] [-w [write_value]] [-l] [-r [MSR_RANGE]] [msr]\n</code></pre> <p>Read or write to Model Specific Register (MSR)</p>"},{"location":"commands/kernel/msr/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help msr MSR value or name"},{"location":"commands/kernel/msr/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -w --write value to write in MSR -l --list list common MSRs for the current arch -r --range dash separated range of MSRs to read (eg. --range=1-10 where 10 is included)"},{"location":"commands/kernel/p2v/","title":"P2v","text":""},{"location":"commands/kernel/p2v/#p2v","title":"p2v","text":"<pre><code>usage: p2v [-h] paddr\n</code></pre> <p>Translate physical address to its corresponding virtual address.</p>"},{"location":"commands/kernel/p2v/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help paddr"},{"location":"commands/kernel/p2v/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/pageinfo/","title":"Pageinfo","text":""},{"location":"commands/kernel/pageinfo/#pageinfo","title":"pageinfo","text":"<pre><code>usage: pageinfo [-h] page\n</code></pre> <p>Convert a pointer to a <code>struct page</code> to its corresponding virtual address.</p>"},{"location":"commands/kernel/pageinfo/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help page"},{"location":"commands/kernel/pageinfo/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/pagewalk/","title":"Pagewalk","text":""},{"location":"commands/kernel/pagewalk/#pagewalk","title":"pagewalk","text":"<pre><code>usage: pagewalk [-h] [--pgd ENTRY] vaddr\n</code></pre> <p>Performs pagewalk.</p>"},{"location":"commands/kernel/pagewalk/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help vaddr virtual address to walk"},{"location":"commands/kernel/pagewalk/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --pgd"},{"location":"commands/kernel/slab/","title":"Slab","text":""},{"location":"commands/kernel/slab/#slab","title":"slab","text":"<pre><code>usage: slab [-h] {list,info,contains} ...\n</code></pre> <p>Prints information about the linux kernel's slab allocator SLUB.</p>"},{"location":"commands/kernel/slab/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help command"},{"location":"commands/kernel/slab/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/kernel/v2p/","title":"V2p","text":""},{"location":"commands/kernel/v2p/#v2p","title":"v2p","text":"<pre><code>usage: v2p [-h] vaddr\n</code></pre> <p>Translate virtual address to its corresponding physmap address.</p>"},{"location":"commands/kernel/v2p/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help vaddr"},{"location":"commands/kernel/v2p/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: argc [-h]\n</code></pre> <p>Prints out the number of arguments.</p>"},{"location":"commands/linux_libc_elf/argc/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: argv [-h] [i]\n</code></pre> <p>Prints out the contents of argv.</p>"},{"location":"commands/linux_libc_elf/argv/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help i Index of the argument to print out."},{"location":"commands/linux_libc_elf/argv/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: aslr [-h] [{on,off}]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help state 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 Help -h --help 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":"<pre><code>usage: auxv-explore [-h]\n</code></pre> <p>Explore and print information from the Auxiliary ELF Vector.</p>"},{"location":"commands/linux_libc_elf/auxv-explore/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: auxv [-h]\n</code></pre> <p>Print information from the Auxiliary ELF Vector.</p>"},{"location":"commands/linux_libc_elf/auxv/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: elfsections [-h] [-R]\n</code></pre> <p>Prints the section mappings contained in the ELF header. If binary not start or use --no-rebase, the section permission based on section flags.</p>"},{"location":"commands/linux_libc_elf/elfsections/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -R --no-rebase Print the non-rebased section address."},{"location":"commands/linux_libc_elf/elfsections/#examples","title":"Examples","text":"<pre><code>elfsections\nelfsections --no-rebase\n</code></pre>"},{"location":"commands/linux_libc_elf/envp/","title":"Envp","text":""},{"location":"commands/linux_libc_elf/envp/#envp","title":"envp","text":"<pre><code>usage: envp [-h] [name]\n</code></pre> <p>Prints out the contents of the environment.</p> <p>Aliases: env, environ</p>"},{"location":"commands/linux_libc_elf/envp/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help name Name of the environment variable to see."},{"location":"commands/linux_libc_elf/envp/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: errno [-h] [err]\n</code></pre> <p>Converts errno (or argument) to its string representation.</p>"},{"location":"commands/linux_libc_elf/errno/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help err Errno; if not passed, it is retrieved from __errno_location"},{"location":"commands/linux_libc_elf/errno/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<p>(only in GDB)</p> <pre><code>usage: got [-h] [-p PATH_FILTER | -a] [-r] [symbol_filter]\n</code></pre> <p>Show the state of the Global Offset Table.</p>"},{"location":"commands/linux_libc_elf/got/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help symbol_filter Filter results by symbol name. (default: '')"},{"location":"commands/linux_libc_elf/got/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -p --path Filter results by library/objfile path. (default: '') -a --all Process all libs/obfjiles including the target executable. -r --show-readonly Also display read-only entries (which are filtered out by default)."},{"location":"commands/linux_libc_elf/got/#examples","title":"Examples","text":"<pre><code>&gt; got\n Print all writable GOT entries in the executable.\n&gt; got -r puts\n Print all GOT entries that contain the string \"puts\".\n&gt; got -p libc\n Print all writable GOT entries used by libc. (And any other loaded\n object files that contain the string \"libc\" in their path).\n&gt; got -ra\n Print all GOT entries in the address space.\n</code></pre>"},{"location":"commands/linux_libc_elf/gotplt/","title":"Gotplt","text":""},{"location":"commands/linux_libc_elf/gotplt/#gotplt","title":"gotplt","text":"<pre><code>usage: gotplt [-h]\n</code></pre> <p>Prints any symbols found in the .got.plt section if it exists.</p>"},{"location":"commands/linux_libc_elf/gotplt/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: libcinfo [-h]\n</code></pre> <p>Show libc version and link to its sources</p>"},{"location":"commands/linux_libc_elf/libcinfo/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: linkmap [-h]\n</code></pre> <p>Show the state of the Link Map</p>"},{"location":"commands/linux_libc_elf/linkmap/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: onegadget [-h] [--show-unsat] [--no-unknown] [-v]\n</code></pre> <p>Find gadgets which single-handedly give code execution.</p> <p>Uses the onegadget tool by david942j.</p>"},{"location":"commands/linux_libc_elf/onegadget/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --show-unsat Show unsatisfiable gadgets. --no-unknown Do not show unknown gadgets. -v --verbose Show verbose output."},{"location":"commands/linux_libc_elf/parse-seccomp/","title":"Parse seccomp","text":""},{"location":"commands/linux_libc_elf/parse-seccomp/#parse-seccomp","title":"parse-seccomp","text":"<pre><code>usage: parse-seccomp [-h] addr\n</code></pre> <p>Parse a struct sock_fprog from memory and dump its filter</p>"},{"location":"commands/linux_libc_elf/parse-seccomp/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of sock_fprog structure in target process memory (e.g. 0xdeadbeef)"},{"location":"commands/linux_libc_elf/parse-seccomp/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/linux_libc_elf/piebase/","title":"Piebase","text":""},{"location":"commands/linux_libc_elf/piebase/#piebase","title":"piebase","text":"<pre><code>usage: piebase [-h] [offset] [module]\n</code></pre> <p>Calculate VA of RVA from PIE base.</p>"},{"location":"commands/linux_libc_elf/piebase/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help offset Offset from PIE base. (default: 0) module Module to choose as base. Defaults to the target executable. (default: '')"},{"location":"commands/linux_libc_elf/piebase/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: plt [-h] [-a]\n</code></pre> <p>Prints any symbols found in Procedure Linkage Table sections if any exist.</p>"},{"location":"commands/linux_libc_elf/plt/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all-symbols Print all symbols, not just those that end in @plt"},{"location":"commands/linux_libc_elf/strings/","title":"Strings","text":""},{"location":"commands/linux_libc_elf/strings/#strings","title":"strings","text":"<pre><code>usage: strings [-h] [-n N] [--save-as SAVE_AS] [page_names ...]\n</code></pre> <p>Extracts and displays ASCII strings from readable memory pages of the debugged process.</p>"},{"location":"commands/linux_libc_elf/strings/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help page_names Mapping to search [e.g. libc]. Can be used with multiple mappings [e.g libc heap stack] (default: '[]')"},{"location":"commands/linux_libc_elf/strings/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -n Minimum length of ASCII strings to include (default: 4) --save-as 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":"<pre><code>usage: threads [-h] [-c] [num_threads]\n</code></pre> <p>List all threads belonging to the selected inferior.</p>"},{"location":"commands/linux_libc_elf/threads/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help num_threads Number of threads to display. Omit to display all threads."},{"location":"commands/linux_libc_elf/threads/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -c --config Respect context-max-threads config to limit number of threads displayed."},{"location":"commands/linux_libc_elf/tls/","title":"Tls","text":""},{"location":"commands/linux_libc_elf/tls/#tls","title":"tls","text":"<pre><code>usage: tls [-h] [-p] [-a]\n</code></pre> <p>Print out base address of the current Thread Local Storage (TLS).</p>"},{"location":"commands/linux_libc_elf/tls/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -p --pthread-self Try to get the address of TLS by calling pthread_self(). -a --all Do not truncate the dump output."},{"location":"commands/linux_libc_elf/track-got/","title":"Track got","text":""},{"location":"commands/linux_libc_elf/track-got/#track-got","title":"track-got","text":"<p>(only in GDB)</p> <pre><code>usage: track-got [-h] {enable,disable,info,query} ...\n</code></pre> <p>Controls GOT tracking</p>"},{"location":"commands/linux_libc_elf/track-got/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<p>(only in GDB)</p> <pre><code>usage: track-heap [-h] {enable,disable,toggle-break} ...\n</code></pre> <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/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/distance/","title":"Distance","text":""},{"location":"commands/memory/distance/#distance","title":"distance","text":"<pre><code>usage: distance [-h] a [b]\n</code></pre> <p>Print the distance between the two arguments, or print the offset to the address's page base.</p>"},{"location":"commands/memory/distance/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help a The first address. b The second address."},{"location":"commands/memory/distance/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/dump-register-frame/","title":"Dump register frame","text":""},{"location":"commands/memory/dump-register-frame/#dump-register-frame","title":"dump-register-frame","text":"<pre><code>usage: dump-register-frame [-h] [-p]\n {armcm-exception,armcm-exception2} [address]\n</code></pre> <p>Display the registers saved to memory for a certain frame type</p>"},{"location":"commands/memory/dump-register-frame/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help frame_type The type of frame to print address The address to read the frame from"},{"location":"commands/memory/dump-register-frame/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -p --print Show addresses of frame values"},{"location":"commands/memory/gdt/","title":"Gdt","text":""},{"location":"commands/memory/gdt/#gdt","title":"gdt","text":"<pre><code>usage: gdt [-h] address [count]\n</code></pre> <p>Decode X86-64 GDT entries at address</p> <p>See also:</p> <ul> <li>https://wiki.osdev.org/Global_Descriptor_Table</li> <li>https://wiki.osdev.org/GDT_Tutorial</li> </ul>"},{"location":"commands/memory/gdt/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address x86-64 GDTR base address (e.g. read from sgdt instruction from [16:79] bits) count Number of entries to dump (should be (GDTR.size+1)/8) (default: 8)"},{"location":"commands/memory/gdt/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/gdt/#notes","title":"Notes","text":"<p>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/go-dump/","title":"Go dump","text":""},{"location":"commands/memory/go-dump/#go-dump","title":"go-dump","text":"<pre><code>usage: go-dump [-h] [-x] [-f [DECIMALS]] [-d] [-p] ty address\n</code></pre> <p>Dumps a Go value of a given type at a specified address.</p> <p>Alias: god</p>"},{"location":"commands/memory/go-dump/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help ty Go type of value to dump, e.g. map[int]string, or the address of a type to resolve at runtime, e.g. 0x408860 address Address to dump"},{"location":"commands/memory/go-dump/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -x --hex Display non-pointer integers as hex -f --decimals Configures the number of decimal places to display for floating points -d --debug Shows debug info, like addresses for slice/map elements, slice capacity, etc. -p --pretty Enables pretty printing"},{"location":"commands/memory/go-type/","title":"Go type","text":""},{"location":"commands/memory/go-type/#go-type","title":"go-type","text":"<pre><code>usage: go-type [-h] address\n</code></pre> <p>Dumps a Go runtime reflection type at a specified address.</p> <p>Alias: goty</p>"},{"location":"commands/memory/go-type/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address to dump"},{"location":"commands/memory/go-type/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/hexdump/","title":"Hexdump","text":""},{"location":"commands/memory/hexdump/#hexdump","title":"hexdump","text":"<pre><code>usage: hexdump [-h] [address] [count]\n</code></pre> <p>Hexdumps data at the specified address or module name.</p>"},{"location":"commands/memory/hexdump/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address or module name to dump (default: $sp) count Number of bytes to dump (default: 64)"},{"location":"commands/memory/hexdump/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/leakfind/","title":"Leakfind","text":""},{"location":"commands/memory/leakfind/#leakfind","title":"leakfind","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> <p>Attempt to find a leak chain given a starting address.</p> <p>Scans memory near the given address, looks for pointers, and continues that process to attempt to find leaks.</p>"},{"location":"commands/memory/leakfind/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Starting address to find a leak chain from (default: $sp)"},{"location":"commands/memory/leakfind/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -p --page_name Substring required to be part of the name of any found pages -o --max_offset Max offset to add to addresses when looking for leak (default: 72) -d --max_depth Maximum depth to follow pointers to (default: 4) -s --step 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: 1) --negative_offset Max negative offset to search before an address when looking for a leak (default: 0)"},{"location":"commands/memory/leakfind/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; leakfind $rsp --page_name=filename --max_offset=0x48 --max_depth=6.\nThis would look for any chains of leaks that point to a section in filename\nwhich begin near $rsp, are never 0x48 bytes further from a known pointer,\nand are a maximum length of 6.\n</code></pre>"},{"location":"commands/memory/memfrob/","title":"Memfrob","text":""},{"location":"commands/memory/memfrob/#memfrob","title":"memfrob","text":"<pre><code>usage: memfrob [-h] address count\n</code></pre> <p>Memfrobs a region of memory (xor with '*').</p>"},{"location":"commands/memory/memfrob/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to start xoring at. count The number of bytes to xor."},{"location":"commands/memory/memfrob/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/mmap/","title":"Mmap","text":""},{"location":"commands/memory/mmap/#mmap","title":"mmap","text":"<pre><code>usage: mmap [-h] [--quiet] [--force] addr length [prot] [flags] [fd] [offset]\n</code></pre> <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)</p> <p>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>"},{"location":"commands/memory/mmap/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address hint to be given to mmap. length Length of the mapping, in bytes. Needs to be greater than zero. prot Prot enum or int as in mmap(2). Eg. \"PROT_READ|PROT_EXEC\" or 7 (for RWX). (default: '7') flags Flags enum or int as in mmap(2). Eg. \"MAP_PRIVATE|MAP_ANONYMOUS\" or 0x22. (default: '0x22') fd File descriptor of the file to be mapped, or -1 if using MAP_ANONYMOUS. (default: -1) offset Offset from the start of the file, in bytes, if using file based mapping. (default: 0)"},{"location":"commands/memory/mmap/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -q --quiet Disable address validity warnings and hints -f --force Force potentially unsafe actions to happen"},{"location":"commands/memory/mmap/#examples","title":"Examples","text":"<pre><code>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\nmmap 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/mprotect/","title":"Mprotect","text":""},{"location":"commands/memory/mprotect/#mprotect","title":"mprotect","text":"<pre><code>usage: mprotect [-h] addr length prot\n</code></pre> <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 &lt;value&gt;</code> command.</p>"},{"location":"commands/memory/mprotect/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Page-aligned address to all mprotect on. length Count of bytes to call mprotect on. Needs to be multiple of page size. prot 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 Help -h --help show this help message and exit"},{"location":"commands/memory/mprotect/#examples","title":"Examples","text":"<pre><code>mprotect $rsp 4096 PROT_READ|PROT_WRITE|PROT_EXEC\nmprotect $rsp 4096 rwx\nmprotect $rsp 4096 7\nmprotect some_symbol 0x1000 PROT_NONE\n</code></pre>"},{"location":"commands/memory/p2p/","title":"P2p","text":""},{"location":"commands/memory/p2p/#p2p","title":"p2p","text":"<pre><code>usage: p2p [-h] mapping_names [mapping_names ...]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help mapping_names Mapping name"},{"location":"commands/memory/p2p/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/probeleak/","title":"Probeleak","text":""},{"location":"commands/memory/probeleak/#probeleak","title":"probeleak","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> <p>Pointer scan for possible offset leaks.</p>"},{"location":"commands/memory/probeleak/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Leak memory address (default: $sp) count Leak size in bytes (default: 64)"},{"location":"commands/memory/probeleak/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --max-distance Max acceptable distance between memory page boundary and leaked pointer (default: 0) --point-to Mapping name of the page that you want the pointers point to --max-ptrs Stop search after find n pointers, default 0 (default: 0) --flags flags of the page that you want the pointers point to. [e.g. rwx]"},{"location":"commands/memory/probeleak/#examples","title":"Examples","text":"<pre><code>&gt; probeleak $rsp 0x64\nLeaks 0x64 bytes starting at stack pointer and search for valid pointers.\n&gt; probeleak $rsp 0x64 --max-dist 0x10\nAs above, but pointers may point 0x10 bytes outside of memory page.\n&gt; probeleak $rsp 0x64 --point-to libc --max-ptrs 1 --flags rwx\nLeaks 0x64 bytes starting at stack pointer and search for one valid pointer\nwhich points to a libc rwx page.\n</code></pre>"},{"location":"commands/memory/search/","title":"Search","text":""},{"location":"commands/memory/search/#search","title":"search","text":"<pre><code>usage: search [-h] [-t {byte,short,word,dword,qword,pointer,string,bytes,asm}]\n [-1] [-2] [-4] [-8] [-p] [--asm] [--asmbp] [-x] [-e] [-w]\n [-s STEP] [-l LIMIT] [-a ALIGNED] [--save] [--no-save] [-n]\n [--trunc-out]\n value [mapping_name]\n</code></pre> <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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help value Value to search for mapping_name Mapping to search [e.g. libc]"},{"location":"commands/memory/search/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -t --type Size of search target (default: 'bytes') -1 --byte Search for a 1-byte integer -2 --short Search for a 2-byte integer -4 --dword Search for a 4-byte integer -8 --qword Search for an 8-byte integer -p --pointer Search for a pointer-width integer --asm Search for an assembly instruction --asmbp Set breakpoint for found assembly instruction -x --hex Target is a hex-encoded (for bytes/strings) -e --executable Search executable segments only -w --writable Search writable segments only -s --step Step search address forward to next alignment after each hit (ex: 0x1000) -l --limit Max results before quitting the search. Differs from --trunc-out in that it will not save all search results before quitting -a --aligned Result must be aligned to this byte boundary --save Save results for further searches with --next. Default comes from config 'auto-save-search' --no-save Invert --save -n --next Search only locations returned by previous search with --save --trunc-out Truncate the output to 20 results. Differs from --limit in that it will first save all search results"},{"location":"commands/memory/telescope/","title":"Telescope","text":""},{"location":"commands/memory/telescope/#telescope","title":"telescope","text":"<pre><code>usage: telescope [-h] [-r] [-f] [-i] [address] [count]\n</code></pre> <p>Recursively dereferences pointers starting at the specified address.</p>"},{"location":"commands/memory/telescope/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to telescope at. (default: $sp) count The number of lines to show. (default: 8)"},{"location":"commands/memory/telescope/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -r --reverse Show previous addresses instead of next ones -f --frame Show the stack frame, from rsp to rbp -i --inverse Show the stack reverse growth"},{"location":"commands/memory/vmmap-add/","title":"Vmmap add","text":""},{"location":"commands/memory/vmmap-add/#vmmap-add","title":"vmmap-add","text":"<pre><code>usage: vmmap-add [-h] start size [flags] [offset]\n</code></pre> <p>Add virtual memory map page.</p>"},{"location":"commands/memory/vmmap-add/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help start Starting virtual address size Size of the address space, in bytes flags Flags set by the ELF file (r - read, w - write, x - executable) (default: '') offset Offset into the original ELF file that the data is loaded from (default: 0)"},{"location":"commands/memory/vmmap-add/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: vmmap-clear [-h]\n</code></pre> <p>Clear the vmmap cache.</p>"},{"location":"commands/memory/vmmap-clear/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: vmmap-explore [-h] address\n</code></pre> <p>Explore a page, trying to guess permissions.</p>"},{"location":"commands/memory/vmmap-explore/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address of the page to explore"},{"location":"commands/memory/vmmap-explore/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/vmmap/","title":"Vmmap","text":""},{"location":"commands/memory/vmmap/#vmmap","title":"vmmap","text":"<pre><code>usage: vmmap [-h] [-w] [-x] [-s] [-A LINES_AFTER] [-B LINES_BEFORE]\n [-C CONTEXT] [--gaps]\n [gdbval_or_str]\n</code></pre> <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 &amp; 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> <p>Aliases: lm, address, vprot, libs</p>"},{"location":"commands/memory/vmmap/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help gdbval_or_str Address or module name filter"},{"location":"commands/memory/vmmap/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -w --writable Display writable maps only -x --executable Display executable maps only -s --expand-shared-cache Expand all entries in the DYLD Shared Cache (Darwin only) -A --lines-after Number of pages to display after result (default: 1) -B --lines-before Number of pages to display before result (default: 1) -C --context Number of pages to display around the result --gaps Display unmapped memory gap information in the memory map."},{"location":"commands/memory/xinfo/","title":"Xinfo","text":""},{"location":"commands/memory/xinfo/#xinfo","title":"xinfo","text":"<pre><code>usage: xinfo [-h] [address]\n</code></pre> <p>Shows offsets of the specified address from various useful locations.</p>"},{"location":"commands/memory/xinfo/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address to inspect (default: $pc)"},{"location":"commands/memory/xinfo/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/memory/xor/","title":"Xor","text":""},{"location":"commands/memory/xor/#xor","title":"xor","text":"<pre><code>usage: xor [-h] address key count\n</code></pre> <p>XOR <code>count</code> bytes at <code>address</code> with the key <code>key</code>.</p>"},{"location":"commands/memory/xor/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to start xoring at. key The key to use. count The number of bytes to xor."},{"location":"commands/memory/xor/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/misc/asm/","title":"Asm","text":""},{"location":"commands/misc/asm/#asm","title":"asm","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> <p>Assemble shellcode into bytes</p>"},{"location":"commands/misc/asm/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help shellcode Assembler code to assemble (default: '[]')"},{"location":"commands/misc/asm/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -f --format Output format (default: 'hex') --arch Target architecture -v --avoid Encode the shellcode to avoid the listed bytes (provided as hex) -n --newline Encode the shellcode to avoid newlines -z --zero Encode the shellcode to avoid NULL bytes -i --infile Specify input file"},{"location":"commands/misc/checksec/","title":"Checksec","text":""},{"location":"commands/misc/checksec/#checksec","title":"checksec","text":"<pre><code>usage: checksec [-h] [-f FILE]\n</code></pre> <p>Prints out the binary security settings using <code>checksec</code>.</p>"},{"location":"commands/misc/checksec/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -f --file Specify the file to run <code>checksec</code> on."},{"location":"commands/misc/checksec/#examples","title":"Examples","text":"<pre><code>pwndbg&gt; checksec\nFile: /usr/bin/bash\nArch: amd64\nRELRO: Full RELRO\nStack: Canary found\nNX: NX enabled\nPIE: PIE enabled\nSHSTK: Enabled\nIBT: Enabled\n</code></pre>"},{"location":"commands/misc/comm/","title":"Comm","text":""},{"location":"commands/misc/comm/#comm","title":"comm","text":"<pre><code>usage: comm [-h] [--addr address] comment\n</code></pre> <p>Put comments in assembly code.</p>"},{"location":"commands/misc/comm/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help comment The text you want to comment"},{"location":"commands/misc/comm/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --addr Address to write comments"},{"location":"commands/misc/cyclic/","title":"Cyclic","text":""},{"location":"commands/misc/cyclic/#cyclic","title":"cyclic","text":"<pre><code>usage: cyclic [-h] [-a charset] [-n length] [-t seconds] [-l lookup_value]\n [-d]\n [count] [filename]\n</code></pre> <p>Cyclic pattern creator/finder.</p>"},{"location":"commands/misc/cyclic/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help count Number of characters to print from the sequence (default: print the entire sequence) (default: 100) filename Name (path) of the file to save the cyclic pattern to"},{"location":"commands/misc/cyclic/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --alphabet The alphabet to use in the cyclic pattern (default: abcdefghijklmnopqrstuvwxyz) -n --length Size of the unique subsequences (defaults to the pointer size for the current arch) -t --timeout Timeout in seconds for --detect (default: 2) -o --lookup Do a lookup instead of printing the sequence (accepts constant values as well as expressions) -d --detect Detect cyclic patterns in registers (Immediate values and memory pointed to by registers)"},{"location":"commands/misc/cymbol/","title":"Cymbol","text":""},{"location":"commands/misc/cymbol/#cymbol","title":"cymbol","text":"<p>(only in GDB)</p> <pre><code>usage: cymbol [-h] {add,remove,edit,load,show,file,show-all} ...\n</code></pre> <p>Manage custom C structures in pwndbg. Supports project-specific auto-loading from .gdbinit.</p>"},{"location":"commands/misc/cymbol/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help subcommand Available subcommands"},{"location":"commands/misc/cymbol/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/misc/cymbol/#notes","title":"Notes","text":"<p>The <code>cymbol</code> command loads custom C structs and symbols into the debugger using GCC under the hood.</p> <p>Usage Example: <code>cymbol file --force ./structs.h</code></p> <p>--force: Use this flag to force symbol reloading, even if symbols with the same name already exist.</p> <p>Warning: If a loaded structure defines a symbol that already exists, the debugger may prefer the original symbol or behave unexpectedly. It\u2019s recommended to use unique struct names to avoid symbol conflicts.</p> <p>Tip: You can add this command to your <code>.gdbinit</code> file for automatic loading: <code>cymbol file --force ./path/to/structs.h</code></p>"},{"location":"commands/misc/down/","title":"Down","text":""},{"location":"commands/misc/down/#down","title":"down","text":"<p>(only in GDB)</p> <pre><code>usage: down [-h] [n]\n</code></pre> <p>Select and print stack frame called by this one.</p> <p>Aliases: do, dow</p>"},{"location":"commands/misc/down/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help n The number of stack frames to go down. (default: 1)"},{"location":"commands/misc/down/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/misc/dt/","title":"Dt","text":""},{"location":"commands/misc/dt/#dt","title":"dt","text":"<pre><code>usage: dt [-h] typename [address]\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":"commands/misc/dt/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help typename The name of the structure being dumped. Use quotes if the type contains spaces (e.g. \"struct malloc_state\"). address The address of the structure."},{"location":"commands/misc/dt/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/misc/dumpargs/","title":"Dumpargs","text":""},{"location":"commands/misc/dumpargs/#dumpargs","title":"dumpargs","text":"<pre><code>usage: dumpargs [-h] [-f]\n</code></pre> <p>Prints determined arguments for call/syscall instruction.</p> <p>Alias: args</p>"},{"location":"commands/misc/dumpargs/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -f --force Force displaying of all arguments."},{"location":"commands/misc/getfile/","title":"Getfile","text":""},{"location":"commands/misc/getfile/#getfile","title":"getfile","text":"<p>(only in GDB)</p> <pre><code>usage: getfile [-h]\n</code></pre> <p>Gets the current file.</p>"},{"location":"commands/misc/getfile/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/misc/hex2ptr/","title":"Hex2ptr","text":""},{"location":"commands/misc/hex2ptr/#hex2ptr","title":"hex2ptr","text":"<pre><code>usage: hex2ptr [-h] hex_string\n</code></pre> <p>Converts a space-separated hex string to a little-endian address.</p>"},{"location":"commands/misc/hex2ptr/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help hex_string 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 Help -h --help 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":"<pre><code>usage: hijack-fd [-h] fdnum newfile\n</code></pre> <p>Replace a file descriptor of a debugged process.</p> <p>The new file descriptor can point to:</p> <ul> <li>a file</li> <li>a pipe</li> <li>a socket</li> <li>a device, etc.</li> </ul>"},{"location":"commands/misc/hijack-fd/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help fdnum File descriptor (FD) number to be replaced with the specified new socket or file. newfile 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 Help -h --help show this help message and exit"},{"location":"commands/misc/hijack-fd/#examples","title":"Examples","text":"<pre><code>1. 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</code></pre>"},{"location":"commands/misc/ipi/","title":"Ipi","text":""},{"location":"commands/misc/ipi/#ipi","title":"ipi","text":"<p>(only in GDB)</p> <pre><code>usage: ipi [-h]\n</code></pre> <p>Start an interactive IPython prompt.</p>"},{"location":"commands/misc/ipi/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: patch-list [-h]\n</code></pre> <p>List all patches.</p>"},{"location":"commands/misc/patch-list/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: patch-revert [-h] address\n</code></pre> <p>Revert patch at given address.</p>"},{"location":"commands/misc/patch-revert/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address to revert patch on"},{"location":"commands/misc/patch-revert/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/misc/patch/","title":"Patch","text":""},{"location":"commands/misc/patch/#patch","title":"patch","text":"<pre><code>usage: patch [-h] [-q] address ins\n</code></pre> <p>Patches given instruction with given code or bytes.</p>"},{"location":"commands/misc/patch/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to patch ins instruction[s]"},{"location":"commands/misc/patch/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -q --quiet don't print anything"},{"location":"commands/misc/plist/","title":"Plist","text":""},{"location":"commands/misc/plist/#plist","title":"plist","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> <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, &amp;node_c };\nstruct node node_a = { 0, &amp;node_b };\n</code></pre> <p>pwndbg&gt; 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, { &amp;inner_a_node_c.inner } };\nstruct inner_a_node inner_a_node_a = { 0, { &amp;inner_a_node_b.inner } };\n</code></pre> <p>pwndbg&gt; 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, { &amp;inner_b_node_c } };\nstruct inner_b_node inner_b_node_a = { 0, { &amp;inner_b_node_b } };\n</code></pre> <p>pwndbg&gt; 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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help path The first element of the linked list next 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 Help -h --help show this help message and exit -s --sentinel The address that stands in for an end of list marker in a non-cyclic list (default: 0) -i --inner The name of the inner nested structure where the next pointer is stored -f --field The name of the field to be displayed, if only one is desired -o --offset The offset of the first list element to display. Defaults to zero. (default: 0) -c --count 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":"<pre><code>usage: sigreturn [-h] [-a] [-p] [address]\n</code></pre> <p>Display the SigreturnFrame at the specific address</p>"},{"location":"commands/misc/sigreturn/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to read the frame from"},{"location":"commands/misc/sigreturn/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all Show all values in the frame in addition to common registers -p --print Show addresses of frame values"},{"location":"commands/misc/spray/","title":"Spray","text":""},{"location":"commands/misc/spray/#spray","title":"spray","text":"<pre><code>usage: spray [-h] [--value VALUE] [-x] addr [length]\n</code></pre> <p>Spray memory with cyclic() generated values</p>"},{"location":"commands/misc/spray/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address to spray length Length of byte sequence, when unspecified sprays until the end of vmmap which address belongs to (default: 0)"},{"location":"commands/misc/spray/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --value Value to spray memory with, when prefixed with '0x' treated as hex string encoded big-endian -x --only-funcptrs Spray only addresses whose values points to executable pages"},{"location":"commands/misc/tips/","title":"Tips","text":""},{"location":"commands/misc/tips/#tips","title":"tips","text":"<pre><code>usage: tips [-h] [-a]\n</code></pre> <p>Shows tips.</p>"},{"location":"commands/misc/tips/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all Show all tips."},{"location":"commands/misc/up/","title":"Up","text":""},{"location":"commands/misc/up/#up","title":"up","text":"<p>(only in GDB)</p> <pre><code>usage: up [-h] [n]\n</code></pre> <p>Select and print stack frame that called this one.</p>"},{"location":"commands/misc/up/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help n The number of stack frames to go up. (default: 1)"},{"location":"commands/misc/up/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/misc/valist/","title":"Valist","text":""},{"location":"commands/misc/valist/#valist","title":"valist","text":"<pre><code>usage: valist [-h] addr [count]\n</code></pre> <p>Dumps the arguments of a va_list.</p>"},{"location":"commands/misc/valist/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr Address of the va_list count Number of arguments to dump (default: 8)"},{"location":"commands/misc/valist/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: vmmap-load [-h] [filename]\n</code></pre> <p>Load virtual memory map pages from ELF file.</p>"},{"location":"commands/misc/vmmap-load/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help filename ELF filename, by default uses current loaded filename."},{"location":"commands/misc/vmmap-load/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/musl/mallocng-dump/","title":"Mallocng dump","text":""},{"location":"commands/musl/mallocng-dump/#mallocng-dump","title":"mallocng-dump","text":"<pre><code>usage: mallocng-dump [-h] [-ma META_AREA]\n</code></pre> <p>Dump the mallocng heap.</p> <p>May produce lots of output.</p> <p>Alias: ng-dump</p>"},{"location":"commands/musl/mallocng-dump/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -ma --meta-area Dump only the meta area at the provided address."},{"location":"commands/musl/mallocng-dump/#notes","title":"Notes","text":"<p>Since the command may produce lots of output, you may want to pipe it to less with <code>| ng-dump | less -R</code>.</p> <p>The [index] next to the metas is their index in the doubly linked list pointed to by ctx.freed_meta_head. The [index] next to the slots is the slot's index inside of its group (thus, these will always be sequential).</p> <p>Notice that the pointers in the output of this command aren't colored according to their mapping's color but rather according to the object's allocation status. Color legend: allocated; freed; available.</p>"},{"location":"commands/musl/mallocng-explain/","title":"Mallocng explain","text":""},{"location":"commands/musl/mallocng-explain/#mallocng-explain","title":"mallocng-explain","text":"<pre><code>usage: mallocng-explain [-h]\n</code></pre> <p>Gives a quick explanation of musl's mallocng allocator.</p> <p>Alias: ng-explain</p>"},{"location":"commands/musl/mallocng-explain/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/musl/mallocng-find/","title":"Mallocng find","text":""},{"location":"commands/musl/mallocng-find/#mallocng-find","title":"mallocng-find","text":"<pre><code>usage: mallocng-find [-h] [-a] [-m] [-s] address\n</code></pre> <p>Find slot which contains the given address.</p> <p>Returns the <code>start</code> of the slot. We say a slot 'contains' an address if the address is in [start, start + stride).</p> <p>Alias: ng-find</p>"},{"location":"commands/musl/mallocng-find/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to look for."},{"location":"commands/musl/mallocng-find/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all Print out all information. Including meta and group data. -m --metadata If the given address falls onto some in-band metadata, return the slot which owns that metadata. In other words, the containment check becomes [start - IB, end). -s --shallow Return the biggest slot which contains this address, don't recurse for smaller slots. The group which owns this slot will not be a nested group."},{"location":"commands/musl/mallocng-group/","title":"Mallocng group","text":""},{"location":"commands/musl/mallocng-group/#mallocng-group","title":"mallocng-group","text":"<pre><code>usage: mallocng-group [-h] [-i INDEX] address\n</code></pre> <p>Print out information about a mallocng group at the given address.</p> <p>Alias: ng-group</p>"},{"location":"commands/musl/mallocng-group/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address of the group object."},{"location":"commands/musl/mallocng-group/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -i --index Print start address of slot at given index (0-indexed)."},{"location":"commands/musl/mallocng-malloc-context/","title":"Mallocng malloc context","text":""},{"location":"commands/musl/mallocng-malloc-context/#mallocng-malloc-context","title":"mallocng-malloc-context","text":"<pre><code>usage: mallocng-malloc-context [-h] [address]\n</code></pre> <p>Print out the mallocng __malloc_context (ctx) object.</p> <p>Alias: ng-ctx</p>"},{"location":"commands/musl/mallocng-malloc-context/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Use the provided address instead of the one Pwndbg found."},{"location":"commands/musl/mallocng-malloc-context/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/musl/mallocng-meta-area/","title":"Mallocng meta area","text":""},{"location":"commands/musl/mallocng-meta-area/#mallocng-meta-area","title":"mallocng-meta-area","text":"<pre><code>usage: mallocng-meta-area [-h] [-i INDEX] address\n</code></pre> <p>Print out a mallocng meta_area object at the given address.</p> <p>Aliases: ng-metaarea, ng-ma</p>"},{"location":"commands/musl/mallocng-meta-area/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address of the meta_area object."},{"location":"commands/musl/mallocng-meta-area/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -i --index Print address of meta at given index (0-indexed)."},{"location":"commands/musl/mallocng-meta/","title":"Mallocng meta","text":""},{"location":"commands/musl/mallocng-meta/#mallocng-meta","title":"mallocng-meta","text":"<pre><code>usage: mallocng-meta [-h] address\n</code></pre> <p>Print out information about a mallocng group given the address of its meta.</p> <p>Alias: ng-meta</p>"},{"location":"commands/musl/mallocng-meta/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address of the meta object."},{"location":"commands/musl/mallocng-meta/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/musl/mallocng-slot-start/","title":"Mallocng slot start","text":""},{"location":"commands/musl/mallocng-slot-start/#mallocng-slot-start","title":"mallocng-slot-start","text":"<pre><code>usage: mallocng-slot-start [-h] [-a] address\n</code></pre> <p>Dump information about a mallocng slot, given its start address.</p> <p>Alias: ng-slots</p>"},{"location":"commands/musl/mallocng-slot-start/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The start of the slot (not including IB)."},{"location":"commands/musl/mallocng-slot-start/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all Print out all information. Including meta and group data."},{"location":"commands/musl/mallocng-slot-user/","title":"Mallocng slot user","text":""},{"location":"commands/musl/mallocng-slot-user/#mallocng-slot-user","title":"mallocng-slot-user","text":"<pre><code>usage: mallocng-slot-user [-h] [-a] address\n</code></pre> <p>Dump information about a mallocng slot, given its user address.</p> <p>Alias: ng-slotu</p>"},{"location":"commands/musl/mallocng-slot-user/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The start of user memory. Referred to as <code>p</code> in the source."},{"location":"commands/musl/mallocng-slot-user/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all Print out all information. Including meta and group data."},{"location":"commands/musl/mallocng-visualize-slots/","title":"Mallocng visualize slots","text":""},{"location":"commands/musl/mallocng-visualize-slots/#mallocng-visualize-slots","title":"mallocng-visualize-slots","text":"<pre><code>usage: mallocng-visualize-slots [-h] address [count]\n</code></pre> <p>Visualize slots in a group.</p> <p>Alias: ng-vis</p>"},{"location":"commands/musl/mallocng-visualize-slots/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address which is inside some slot. count The amount of slots to visualize. (default: 10)"},{"location":"commands/musl/mallocng-visualize-slots/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/process/killthreads/","title":"Killthreads","text":""},{"location":"commands/process/killthreads/#killthreads","title":"killthreads","text":"<p>(only in GDB)</p> <pre><code>usage: killthreads [-h] [-a] [thread_ids ...]\n</code></pre> <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 &amp; restart the execution to the point of interest (checkpoint).</p>"},{"location":"commands/process/killthreads/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help thread_ids Thread IDs to kill."},{"location":"commands/process/killthreads/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all Kill all threads except the current one."},{"location":"commands/process/pid/","title":"Pid","text":""},{"location":"commands/process/pid/#pid","title":"pid","text":"<pre><code>usage: pid [-h]\n</code></pre> <p>Gets the pid.</p> <p>Alias: getpid</p>"},{"location":"commands/process/pid/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/process/procinfo/","title":"Procinfo","text":""},{"location":"commands/process/procinfo/#procinfo","title":"procinfo","text":"<pre><code>usage: procinfo [-h]\n</code></pre> <p>Display information about the running process.</p>"},{"location":"commands/process/procinfo/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/bugreport/","title":"Bugreport","text":""},{"location":"commands/pwndbg/bugreport/#bugreport","title":"bugreport","text":"<pre><code>usage: bugreport [-h] [--run-browser | --use-gh]\n</code></pre> <p>Generate a bug report.</p>"},{"location":"commands/pwndbg/bugreport/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -b --run-browser Open browser on github/issues/new -g --use-gh Create issue using Github CLI"},{"location":"commands/pwndbg/config/","title":"Config","text":""},{"location":"commands/pwndbg/config/#config","title":"config","text":"<pre><code>usage: config [-h] [filter_pattern]\n</code></pre> <p>Shows Pwndbg-specific configuration.</p>"},{"location":"commands/pwndbg/config/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help filter_pattern Filter to apply to config parameters names/descriptions"},{"location":"commands/pwndbg/config/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/configfile/","title":"Configfile","text":""},{"location":"commands/pwndbg/configfile/#configfile","title":"configfile","text":"<p>(only in GDB)</p> <pre><code>usage: configfile [-h] [--show-all]\n</code></pre> <p>Generates a configuration file for the current Pwndbg options.</p>"},{"location":"commands/pwndbg/configfile/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --show-all Display all configuration options."},{"location":"commands/pwndbg/heap-config/","title":"Heap config","text":""},{"location":"commands/pwndbg/heap-config/#heap-config","title":"heap-config","text":"<pre><code>usage: heap-config [-h] [filter_pattern]\n</code></pre> <p>Shows heap related configuration.</p>"},{"location":"commands/pwndbg/heap-config/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help filter_pattern Filter to apply to config parameters names/descriptions"},{"location":"commands/pwndbg/heap-config/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/memoize/","title":"Memoize","text":""},{"location":"commands/pwndbg/memoize/#memoize","title":"memoize","text":"<pre><code>usage: memoize [-h]\n</code></pre> <p>Toggles memoization (caching).</p> <p>Useful for diagnosing caching-related bugs. Decreases performance.</p>"},{"location":"commands/pwndbg/memoize/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/profiler/","title":"Profiler","text":""},{"location":"commands/pwndbg/profiler/#profiler","title":"profiler","text":"<pre><code>usage: profiler [-h] {start,stop} ...\n</code></pre> <p>Utilities for profiling Pwndbg.</p> <p>Check out the <code>./profiling</code> folder for other useful utilities. Use <code>./profiling/print_stats.py</code> to generate a report from a <code>.pstats</code> file.</p>"},{"location":"commands/pwndbg/profiler/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help command"},{"location":"commands/pwndbg/profiler/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/pwndbg/","title":"Pwndbg","text":""},{"location":"commands/pwndbg/pwndbg/#pwndbg","title":"pwndbg","text":"<pre><code>usage: pwndbg [-h] [-c CATEGORY_ | --list-categories] [filter_pattern]\n</code></pre> <p>Prints out a list of all Pwndbg commands.</p>"},{"location":"commands/pwndbg/pwndbg/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help filter_pattern Filter to apply to commands names/docs"},{"location":"commands/pwndbg/pwndbg/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -c --category Filter commands by category --list-categories List command categories"},{"location":"commands/pwndbg/reinit-pwndbg/","title":"Reinit pwndbg","text":""},{"location":"commands/pwndbg/reinit-pwndbg/#reinit-pwndbg","title":"reinit-pwndbg","text":"<p>(only in GDB)</p> <pre><code>usage: reinit-pwndbg [-h]\n</code></pre> <p>Makes Pwndbg reinitialize all state.</p>"},{"location":"commands/pwndbg/reinit-pwndbg/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/reload/","title":"Reload","text":""},{"location":"commands/pwndbg/reload/#reload","title":"reload","text":"<p>(only in GDB)</p> <pre><code>usage: reload [-h]\n</code></pre> <p>Reload Pwndbg.</p>"},{"location":"commands/pwndbg/reload/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/theme/","title":"Theme","text":""},{"location":"commands/pwndbg/theme/#theme","title":"theme","text":"<pre><code>usage: theme [-h] [filter_pattern]\n</code></pre> <p>Shows Pwndbg-specific theme configuration.</p>"},{"location":"commands/pwndbg/theme/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help filter_pattern Filter to apply to theme parameters names/descriptions"},{"location":"commands/pwndbg/theme/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/pwndbg/themefile/","title":"Themefile","text":""},{"location":"commands/pwndbg/themefile/#themefile","title":"themefile","text":"<p>(only in GDB)</p> <pre><code>usage: themefile [-h] [--show-all]\n</code></pre> <p>Generates a configuration file for the current Pwndbg theme options.</p>"},{"location":"commands/pwndbg/themefile/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit --show-all Force displaying of all theme options."},{"location":"commands/pwndbg/version/","title":"Version","text":""},{"location":"commands/pwndbg/version/#version","title":"version","text":"<p>(only in GDB)</p> <pre><code>usage: version [-h]\n</code></pre> <p>Displays Pwndbg and its important deps versions.</p>"},{"location":"commands/pwndbg/version/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/register/cpsr/","title":"Cpsr","text":""},{"location":"commands/register/cpsr/#cpsr","title":"cpsr","text":"<pre><code>usage: cpsr [-h] [cpsr_value]\n</code></pre> <p>Print out ARM CPSR or xPSR register.</p> <p>Aliases: xpsr, pstate</p>"},{"location":"commands/register/cpsr/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help cpsr_value Parse the given CPSR value instead of the actual one."},{"location":"commands/register/cpsr/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/register/fsbase/","title":"Fsbase","text":""},{"location":"commands/register/fsbase/#fsbase","title":"fsbase","text":"<p>(only in GDB)</p> <pre><code>usage: fsbase [-h]\n</code></pre> <p>Prints out the FS base address. See also $fsbase.</p>"},{"location":"commands/register/fsbase/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/register/gsbase/","title":"Gsbase","text":""},{"location":"commands/register/gsbase/#gsbase","title":"gsbase","text":"<p>(only in GDB)</p> <pre><code>usage: gsbase [-h]\n</code></pre> <p>Prints out the GS base address. See also $gsbase.</p>"},{"location":"commands/register/gsbase/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/register/setflag/","title":"Setflag","text":""},{"location":"commands/register/setflag/#setflag","title":"setflag","text":"<pre><code>usage: setflag [-h] flag value\n</code></pre> <p>Modify the flags register.</p> <p>Alias: flag</p>"},{"location":"commands/register/setflag/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help flag Flag for which you want to change the value value 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 Help -h --help show this help message and exit"},{"location":"commands/register/setflag/#examples","title":"Examples","text":"<pre><code>On X86/X64:\n setflag ZF 1 -- set zero flag\n setflag CF 0 -- unset carry flag\n\nOn ARM:\n setflag Z 0 -- unset the Z cpsr/xpsr flag\n\nTo see flags registers:\n info reg eflags -- on x86/x64\n info reg cpsr/xpsr -- on ARM (specific register may vary)\n</code></pre>"},{"location":"commands/register/setflag/#notes","title":"Notes","text":"<p>This command supports flags registers that are defined for architectures in the pwndbg/regs.py file.</p>"},{"location":"commands/stack/canary/","title":"Canary","text":""},{"location":"commands/stack/canary/#canary","title":"canary","text":"<pre><code>usage: canary [-h] [-a]\n</code></pre> <p>Print out the current stack canary.</p>"},{"location":"commands/stack/canary/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -a --all Print out stack canaries for all threads instead of the current thread only."},{"location":"commands/stack/retaddr/","title":"Retaddr","text":""},{"location":"commands/stack/retaddr/#retaddr","title":"retaddr","text":"<pre><code>usage: retaddr [-h]\n</code></pre> <p>Print out the stack addresses that contain return addresses.</p>"},{"location":"commands/stack/retaddr/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: stack-explore [-h]\n</code></pre> <p>Explore stack from all threads.</p>"},{"location":"commands/stack/stack-explore/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/stack/stack/","title":"Stack","text":""},{"location":"commands/stack/stack/#stack","title":"stack","text":"<pre><code>usage: stack [-h] [-f] [-i] [count] [offset]\n</code></pre> <p>Dereferences on stack data with specified count and offset.</p>"},{"location":"commands/stack/stack/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help count number of element to dump (default: 8) offset Element offset from $sp (support negative offset) (default: 0)"},{"location":"commands/stack/stack/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit -f --frame Show the stack frame, from rsp to rbp -i --inverse Show reverse stack growth"},{"location":"commands/stack/stackf/","title":"Stackf","text":""},{"location":"commands/stack/stackf/#stackf","title":"stackf","text":"<pre><code>usage: stackf [-h] [count] [offset]\n</code></pre> <p>Dereferences on stack data, printing the entire stack frame with specified count and offset .</p>"},{"location":"commands/stack/stackf/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help count number of element to dump (default: 8) offset Element offset from $sp (support negative offset) (default: 0)"},{"location":"commands/stack/stackf/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/start/attachp/","title":"Attachp","text":""},{"location":"commands/start/attachp/#attachp","title":"attachp","text":"<p>(only in GDB)</p> <pre><code>usage: attachp [-h] [--no-truncate] [--retry] [--user USER] [-e] [-a] [target]\n</code></pre> <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 &lt;name&gt;</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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help target 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 Help -h --help show this help message and exit --no-truncate dont truncate command args --retry retry until a target is found --user username or uid to filter by -e --exact get the pid only for an exact command name match -a --all get pids also for partial cmdline matches etc"},{"location":"commands/start/entry/","title":"Entry","text":""},{"location":"commands/start/entry/#entry","title":"entry","text":"<pre><code>usage: entry [-h] [args ...]\n</code></pre> <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 or LLDB's <code>process launch -s</code>.</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 \"&gt;\", \"&lt;\", or \"&gt;&gt;\" 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/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help args The arguments to run the binary with."},{"location":"commands/start/entry/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/start/sstart/","title":"Sstart","text":""},{"location":"commands/start/sstart/#sstart","title":"sstart","text":"<p>(only in GDB)</p> <pre><code>usage: sstart [-h]\n</code></pre> <p>Alias for 'tbreak __libc_start_main; run'.</p>"},{"location":"commands/start/sstart/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/start/start/","title":"Start","text":""},{"location":"commands/start/start/#start","title":"start","text":"<p>(only in GDB)</p> <pre><code>usage: start [-h] [args ...]\n</code></pre> <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 \"&gt;\", \"&lt;\", or \"&gt;&gt;\" 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> <p>Aliases: main, init</p>"},{"location":"commands/start/start/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help args The arguments to run the binary with."},{"location":"commands/start/start/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: nextcall [-h] [symbol_regex]\n</code></pre> <p>Breaks at the next call instruction.</p>"},{"location":"commands/step_next_continue/nextcall/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help symbol_regex 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 Help -h --help 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":"<pre><code>usage: nextjmp [-h]\n</code></pre> <p>Breaks at the next jump instruction.</p> <p>Alias: nextjump</p>"},{"location":"commands/step_next_continue/nextjmp/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: nextproginstr [-h]\n</code></pre> <p>Breaks at the next instruction that belongs to the running program.</p>"},{"location":"commands/step_next_continue/nextproginstr/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: nextret [-h]\n</code></pre> <p>Breaks at next return-like instruction.</p>"},{"location":"commands/step_next_continue/nextret/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: nextsyscall [-h]\n</code></pre> <p>Breaks at the next syscall not taking branches.</p> <p>Alias: nextsc</p>"},{"location":"commands/step_next_continue/nextsyscall/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: stepover [-h] [addr]\n</code></pre> <p>Breaks on the instruction after this one.</p> <p>Alias: so</p>"},{"location":"commands/step_next_continue/stepover/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr The address to break after."},{"location":"commands/step_next_continue/stepover/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: stepret [-h]\n</code></pre> <p>Breaks at next return-like instruction by 'stepping' to it.</p>"},{"location":"commands/step_next_continue/stepret/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: stepsyscall [-h]\n</code></pre> <p>Breaks at the next syscall by taking branches.</p> <p>Alias: stepsc</p>"},{"location":"commands/step_next_continue/stepsyscall/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<pre><code>usage: stepuntilasm [-h] mnemonic [op_str ...]\n</code></pre> <p>Breaks on the next matching instruction.</p>"},{"location":"commands/step_next_continue/stepuntilasm/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help mnemonic The mnemonic of the instruction op_str The operands of the instruction"},{"location":"commands/step_next_continue/stepuntilasm/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help 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":"<p>(only in GDB)</p> <pre><code>usage: xuntil [-h] target\n</code></pre> <p>Continue execution until an address or expression.</p>"},{"location":"commands/step_next_continue/xuntil/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help target Location to stop execution at"},{"location":"commands/step_next_continue/xuntil/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/bc/","title":"Bc","text":""},{"location":"commands/windbg/bc/#bc","title":"bc","text":"<p>(only in GDB)</p> <pre><code>usage: bc [-h] [which]\n</code></pre> <p>Clear the breakpoint with the specified index.</p>"},{"location":"commands/windbg/bc/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help which Index of the breakpoint to clear. (default: '*')"},{"location":"commands/windbg/bc/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/bd/","title":"Bd","text":""},{"location":"commands/windbg/bd/#bd","title":"bd","text":"<p>(only in GDB)</p> <pre><code>usage: bd [-h] [which]\n</code></pre> <p>Disable the breakpoint with the specified index.</p>"},{"location":"commands/windbg/bd/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help which Index of the breakpoint to disable. (default: '*')"},{"location":"commands/windbg/bd/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/be/","title":"Be","text":""},{"location":"commands/windbg/be/#be","title":"be","text":"<p>(only in GDB)</p> <pre><code>usage: be [-h] [which]\n</code></pre> <p>Enable the breakpoint with the specified index.</p>"},{"location":"commands/windbg/be/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help which Index of the breakpoint to enable. (default: '*')"},{"location":"commands/windbg/be/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/bl/","title":"Bl","text":""},{"location":"commands/windbg/bl/#bl","title":"bl","text":"<p>(only in GDB)</p> <pre><code>usage: bl [-h]\n</code></pre> <p>List breakpoints.</p>"},{"location":"commands/windbg/bl/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/bp/","title":"Bp","text":""},{"location":"commands/windbg/bp/#bp","title":"bp","text":"<p>(only in GDB)</p> <pre><code>usage: bp [-h] where\n</code></pre> <p>Set a breakpoint at the specified address.</p>"},{"location":"commands/windbg/bp/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help where The address to break at."},{"location":"commands/windbg/bp/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/da/","title":"Da","text":""},{"location":"commands/windbg/da/#da","title":"da","text":"<pre><code>usage: da [-h] address [max]\n</code></pre> <p>Dump a string at the specified address.</p>"},{"location":"commands/windbg/da/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address to dump max Maximum string length (default: 256)"},{"location":"commands/windbg/da/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/db/","title":"Db","text":""},{"location":"commands/windbg/db/#db","title":"db","text":"<pre><code>usage: db [-h] address [count]\n</code></pre> <p>Starting at the specified address, dump N bytes.</p>"},{"location":"commands/windbg/db/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to dump from. count The number of bytes to dump. (default: 64)"},{"location":"commands/windbg/db/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/dc/","title":"Dc","text":""},{"location":"commands/windbg/dc/#dc","title":"dc","text":"<pre><code>usage: dc [-h] address [count]\n</code></pre> <p>Starting at the specified address, hexdump.</p>"},{"location":"commands/windbg/dc/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to dump from. count The number of bytes to hexdump. (default: 8)"},{"location":"commands/windbg/dc/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/dd/","title":"Dd","text":""},{"location":"commands/windbg/dd/#dd","title":"dd","text":"<pre><code>usage: dd [-h] address [count]\n</code></pre> <p>Starting at the specified address, dump N dwords.</p>"},{"location":"commands/windbg/dd/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to dump from. count The number of dwords to dump. (default: 16)"},{"location":"commands/windbg/dd/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/dds/","title":"Dds","text":""},{"location":"commands/windbg/dds/#dds","title":"dds","text":"<pre><code>usage: dds [-h] addr\n</code></pre> <p>Dump pointers and symbols at the specified address.</p> <p>Aliases: kd, dps, dqs</p>"},{"location":"commands/windbg/dds/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help addr The address to dump from."},{"location":"commands/windbg/dds/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/dq/","title":"Dq","text":""},{"location":"commands/windbg/dq/#dq","title":"dq","text":"<pre><code>usage: dq [-h] address [count]\n</code></pre> <p>Starting at the specified address, dump N qwords.</p>"},{"location":"commands/windbg/dq/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to dump from. count The number of qwords to dump. (default: 8)"},{"location":"commands/windbg/dq/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/ds/","title":"Ds","text":""},{"location":"commands/windbg/ds/#ds","title":"ds","text":"<pre><code>usage: ds [-h] address [max]\n</code></pre> <p>Dump a string at the specified address.</p>"},{"location":"commands/windbg/ds/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address Address to dump max Maximum string length (default: 256)"},{"location":"commands/windbg/ds/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/dw/","title":"Dw","text":""},{"location":"commands/windbg/dw/#dw","title":"dw","text":"<pre><code>usage: dw [-h] address [count]\n</code></pre> <p>Starting at the specified address, dump N words.</p>"},{"location":"commands/windbg/dw/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to dump from. count The number of words to dump. (default: 32)"},{"location":"commands/windbg/dw/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/eb/","title":"Eb","text":""},{"location":"commands/windbg/eb/#eb","title":"eb","text":"<pre><code>usage: eb [-h] address [data ...]\n</code></pre> <p>Write hex bytes at the specified address.</p>"},{"location":"commands/windbg/eb/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to write to. data The bytes to write."},{"location":"commands/windbg/eb/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/ed/","title":"Ed","text":""},{"location":"commands/windbg/ed/#ed","title":"ed","text":"<pre><code>usage: ed [-h] address [data ...]\n</code></pre> <p>Write hex dwords at the specified address.</p>"},{"location":"commands/windbg/ed/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to write to. data The dwords to write."},{"location":"commands/windbg/ed/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/eq/","title":"Eq","text":""},{"location":"commands/windbg/eq/#eq","title":"eq","text":"<pre><code>usage: eq [-h] address [data ...]\n</code></pre> <p>Write hex qwords at the specified address.</p>"},{"location":"commands/windbg/eq/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to write to. data The qwords to write."},{"location":"commands/windbg/eq/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/ew/","title":"Ew","text":""},{"location":"commands/windbg/ew/#ew","title":"ew","text":"<pre><code>usage: ew [-h] address [data ...]\n</code></pre> <p>Write hex words at the specified address.</p>"},{"location":"commands/windbg/ew/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to write to. data The words to write."},{"location":"commands/windbg/ew/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/ez/","title":"Ez","text":""},{"location":"commands/windbg/ez/#ez","title":"ez","text":"<pre><code>usage: ez [-h] address data\n</code></pre> <p>Write a string at the specified address.</p>"},{"location":"commands/windbg/ez/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to write to. data The string to write."},{"location":"commands/windbg/ez/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/eza/","title":"Eza","text":""},{"location":"commands/windbg/eza/#eza","title":"eza","text":"<pre><code>usage: eza [-h] address data\n</code></pre> <p>Write a string at the specified address.</p>"},{"location":"commands/windbg/eza/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help address The address to write to. data The string to write."},{"location":"commands/windbg/eza/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/go/","title":"Go","text":""},{"location":"commands/windbg/go/#go","title":"go","text":"<p>(only in GDB)</p> <pre><code>usage: go [-h]\n</code></pre> <p>WinDbg compatibility alias for 'continue' command.</p>"},{"location":"commands/windbg/go/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/k/","title":"K","text":""},{"location":"commands/windbg/k/#k","title":"k","text":"<p>(only in GDB)</p> <pre><code>usage: k [-h]\n</code></pre> <p>Print a backtrace (alias 'bt').</p>"},{"location":"commands/windbg/k/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/ln/","title":"Ln","text":""},{"location":"commands/windbg/ln/#ln","title":"ln","text":"<pre><code>usage: ln [-h] [value]\n</code></pre> <p>List the symbols nearest to the provided value.</p>"},{"location":"commands/windbg/ln/#positional-arguments","title":"Positional arguments","text":"Positional Argument Help value The address you want the name of."},{"location":"commands/windbg/ln/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/pc/","title":"Pc","text":""},{"location":"commands/windbg/pc/#pc","title":"pc","text":"<pre><code>usage: pc [-h]\n</code></pre> <p>WinDbg compatibility alias for 'nextcall' command.</p>"},{"location":"commands/windbg/pc/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"commands/windbg/peb/","title":"Peb","text":""},{"location":"commands/windbg/peb/#peb","title":"peb","text":"<pre><code>usage: peb [-h]\n</code></pre> <p>Not be windows.</p>"},{"location":"commands/windbg/peb/#optional-arguments","title":"Optional arguments","text":"Short Long Help -h --help show this help message and exit"},{"location":"configuration/","title":"Configuration","text":"<p>Pwndbg can be configured in various ways. You can tune features, control what it displays, how it displays it, and even what is going on under the hood.</p> <p>There are three \"scopes\" of configuration parameters currently:</p> <ol> <li>the config scope - for generic parameters</li> <li>the heap scope - for heap-related parameters</li> <li>the theme scope - for Pwndbg theming</li> </ol> <p>To see the parameters belonging to these scopes, use the <code>config</code>, <code>heap-config</code>, and <code>theme</code> commands respectively. You can also use the <code>configfile</code> and <code>themefile</code> commands to save your live configuration to a file which you can then load in your <code>~/.(gdb/lldb)init</code> file (after sourcing Pwndbg!).</p> <p>To see the value of any parameter, use <code>show param-name</code>. To set the value, use <code>set param-name param-value</code>. To see a more detailed description of the parameter use <code>help set param-name</code>.</p> <p>If you wish to use a theme different from the default one, check out pwndbg/pwndbg-themes. If you made a theme yourself, feel free to open a PR!</p>"},{"location":"configuration/config/","title":"Config","text":""},{"location":"configuration/config/#config","title":"config","text":""},{"location":"configuration/config/#ai-anthropic-api-key","title":"ai-anthropic-api-key","text":"<p>(only in GDB)</p> <p>Anthropic API key.</p> <p>Defaults to ANTHROPIC_API_KEY environment variable if not set.</p> <p>Default: '' </p>"},{"location":"configuration/config/#ai-history-size","title":"ai-history-size","text":"<p>(only in GDB)</p> <p>Maximum number of questions and answers to keep in the prompt.</p> <p>Default: 3 </p>"},{"location":"configuration/config/#ai-max-tokens","title":"ai-max-tokens","text":"<p>(only in GDB)</p> <p>The maximum number of tokens to return in the response.</p> <p>Useful when limiting verbosity or conserving resources. Set to a lower value to restrict output.</p> <p>Default: 100 </p>"},{"location":"configuration/config/#ai-model","title":"ai-model","text":"<p>(only in GDB)</p> <p>The name of the large language model to query.</p> <p>Changing this affects the behavior, response quality, and cost (if applicable) of AI responses.</p> <p>Default: 'gpt-3.5-turbo' </p>"},{"location":"configuration/config/#ai-ollama-endpoint","title":"ai-ollama-endpoint","text":"<p>(only in GDB)</p> <p>Ollama API endpoint.</p> <p>Defaults to OLLAMA_ENDPOINT environment variable if not set.</p> <p>Default: '' </p>"},{"location":"configuration/config/#ai-openai-api-key","title":"ai-openai-api-key","text":"<p>(only in GDB)</p> <p>OpenAI API key.</p> <p>Will default to OPENAI_API_KEY environment variable if not set.</p> <p>Default: '' </p>"},{"location":"configuration/config/#ai-show-usage","title":"ai-show-usage","text":"<p>(only in GDB)</p> <p>Whether to show how many tokens are used with each OpenAI API call.</p> <p>Default: off </p>"},{"location":"configuration/config/#ai-stack-depth","title":"ai-stack-depth","text":"<p>(only in GDB)</p> <p>Rows of stack context to include in the prompt for the ai command.</p> <p>Default: 16 </p>"},{"location":"configuration/config/#ai-temperature","title":"ai-temperature","text":"<p>(only in GDB)</p> <p>The temperature specification for the LLM query.</p> <p>This controls the degree of randomness in the response.</p> <p>Default: 0 </p>"},{"location":"configuration/config/#attachp-resolution-method","title":"attachp-resolution-method","text":"<p>(only in GDB)</p> <p>How to determine the process to attach when multiple candidates exists.</p> <p>Default: 'ask' Valid values: 'none', 'oldest', 'newest', 'ask'</p>"},{"location":"configuration/config/#auto-explore-auxv","title":"auto-explore-auxv","text":"<p>Stack exploration for AUXV information; it may be really slow.</p> <p>Default: 'warn' Valid values: 'warn', 'yes', 'no'</p>"},{"location":"configuration/config/#auto-explore-pages","title":"auto-explore-pages","text":"<p>Whether to try to infer page permissions when memory maps are missing.</p> <p>This command can cause errors.</p> <p>Default: 'warn' Valid values: 'yes', 'warn', 'no'</p>"},{"location":"configuration/config/#auto-explore-stack","title":"auto-explore-stack","text":"<p>Stack exploration; it may be really slow.</p> <p>Default: 'warn' Valid values: 'warn', 'yes', 'no'</p>"},{"location":"configuration/config/#auto-save-search","title":"auto-save-search","text":"<p>Automatically pass --save to \"search\" command.</p> <p>Default: off </p>"},{"location":"configuration/config/#bn-autosync","title":"bn-autosync","text":"<p>Whether to automatically run bn-sync every step.</p> <p>Default: off </p>"},{"location":"configuration/config/#bn-il-level","title":"bn-il-level","text":"<p>The IL level to use when displaying Binary Ninja decompilation.</p> <p>Default: 'hlil' Valid values: 'disasm', 'llil', 'mlil', 'hlil'</p>"},{"location":"configuration/config/#bn-rpc-host","title":"bn-rpc-host","text":"<p>Binary Ninja XML-RPC server host.</p> <p>Default: '127.0.0.1' </p>"},{"location":"configuration/config/#bn-rpc-port","title":"bn-rpc-port","text":"<p>Binary Ninja XML-RPC server port.</p> <p>Default: 31337 </p>"},{"location":"configuration/config/#bn-timeout","title":"bn-timeout","text":"<p>Time to wait for Binary Ninja XML-RPC, in seconds.</p> <p>Default: 2 </p>"},{"location":"configuration/config/#context-backtrace-lines","title":"context-backtrace-lines","text":"<p>Number of lines to print in the backtrace context.</p> <p>Default: 8 </p>"},{"location":"configuration/config/#context-clear-screen","title":"context-clear-screen","text":"<p>Whether to clear the screen before printing the context.</p> <p>Default: off </p>"},{"location":"configuration/config/#context-code-lines","title":"context-code-lines","text":"<p>Number of source code lines to print by the context command.</p> <p>Default: 10 </p>"},{"location":"configuration/config/#context-code-tabstop","title":"context-code-tabstop","text":"<p>Number of spaces that a in the source code counts for. <p>Default: 8 </p>"},{"location":"configuration/config/#context-disasm-lines","title":"context-disasm-lines","text":"<p>Number of additional lines to print in the disasm context.</p> <p>Default: 10 </p>"},{"location":"configuration/config/#context-ghidra","title":"context-ghidra","text":"<p>When to try to decompile the current function with ghidra.</p> <p>Doing this is slow and requires radare2/r2pipe or rizin/rzpipe.</p> <p>Default: 'never' Valid values: 'always', 'never', 'if-no-source'</p>"},{"location":"configuration/config/#context-history-size","title":"context-history-size","text":"<p>Number of context history entries to store.</p> <p>Default: 50 </p>"},{"location":"configuration/config/#context-integration-decompile","title":"context-integration-decompile","text":"<p>Whether context should fall back to decompilation with no source code.</p> <p>Default: on </p>"},{"location":"configuration/config/#context-max-threads","title":"context-max-threads","text":"<p>Maximum number of threads displayed by the context command.</p> <p>Default: 4 </p>"},{"location":"configuration/config/#context-output","title":"context-output","text":"<p>Where Pwndbg should output (\"stdout\" or file/tty).</p> <p>Default: 'stdout' </p>"},{"location":"configuration/config/#context-reserve-lines","title":"context-reserve-lines","text":"<p>When to reserve lines after the prompt to reduce context shake.</p> <p>The \"if-ctx-fits\" setting only reserves lines if the whole context would still fit vertically in the current terminal window. It doesn't take into account line-wrapping due to insufficient terminal width.</p> <p>Default: 'if-ctx-fits' Valid values: 'never', 'if-ctx-fits', 'always'</p>"},{"location":"configuration/config/#context-sections","title":"context-sections","text":"<p>Which context sections are displayed (controls order).</p> <p>Default: 'regs disasm code ghidra stack backtrace expressions threads heap_tracker' </p>"},{"location":"configuration/config/#context-stack-lines","title":"context-stack-lines","text":"<p>Number of lines to print in the stack context.</p> <p>Default: 8 </p>"},{"location":"configuration/config/#cymbol-editor","title":"cymbol-editor","text":"<p>(only in GDB)</p> <p>Path to the editor for editing custom structures.</p> <p>Default: '' </p>"},{"location":"configuration/config/#debug-events","title":"debug-events","text":"<p>(only in GDB)</p> <p>Display internal event debugging info.</p> <p>Default: off </p>"},{"location":"configuration/config/#decompiler","title":"decompiler","text":"<p>Framework that your ghidra plugin installed.</p> <p>Default: 'radare2' Valid values: 'radare2', 'rizin'</p>"},{"location":"configuration/config/#default-visualize-chunk-number","title":"default-visualize-chunk-number","text":"<p>Default number of chunks to visualize.</p> <p>Default: 10 </p>"},{"location":"configuration/config/#dereference-limit","title":"dereference-limit","text":"<p>Max number of pointers to dereference in a chain.</p> <p>Default: 5 </p>"},{"location":"configuration/config/#disasm-annotations","title":"disasm-annotations","text":"<p>Display annotations for instructions.</p> <p>Default: on </p>"},{"location":"configuration/config/#disasm-inline-symbols","title":"disasm-inline-symbols","text":"<p>Replacing constant operands with their symbol in the disassembly.</p> <p>Default: on </p>"},{"location":"configuration/config/#disasm-reg-alias","title":"disasm-reg-alias","text":"<p>Force the disassembly to use register aliases (e.g. aarch64 x29 -&gt; fp).</p> <p>The register aliasing is done by capstone, see: https://github.com/capstone-engine/capstone/blob/next/docs/cs_v6_release_guide.md#:~:text=None.-,Register%20alias,-Register%20alias%20</p> <p>Enabling this may make disassembly slower.</p> <p>Default: off </p>"},{"location":"configuration/config/#disasm-telescope-depth","title":"disasm-telescope-depth","text":"<p>Depth of telescope for disasm annotations.</p> <p>Default: 3 </p>"},{"location":"configuration/config/#disasm-telescope-string-length","title":"disasm-telescope-string-length","text":"<p>The number of characters in strings to display in disasm annotations.</p> <p>Default: 50 </p>"},{"location":"configuration/config/#emulate","title":"emulate","text":"<p>Unicorn emulation of code from the current PC register.</p> <p>Emulate can be:</p> <ol> <li>off - no emulation is performed</li> <li>jumps-only - emulation is done only to resolve branch instructions</li> <li>on - emulation is done to resolve registers/memory values etc.</li> </ol> <p>Emulation can slow down Pwndbg. Disabling it may improve performance. Emulation requires &gt;1GB RAM being available on the system and ability to allocate RWX memory.</p> <p>Default: 'on' Valid values: 'on', 'off', 'jumps-only'</p>"},{"location":"configuration/config/#emulate-annotations","title":"emulate-annotations","text":"<p>Unicorn emulation for instruction annotations.</p> <p>Refers to register and memory value annotations.</p> <p>Default: on </p>"},{"location":"configuration/config/#emulate-future-annotations","title":"emulate-future-annotations","text":"<p>Unicorn emulation for future instruction's annotations.</p> <p>Default: on </p>"},{"location":"configuration/config/#exception-debugger","title":"exception-debugger","text":"<p>Whether to debug exceptions raised in Pwndbg commands.</p> <p>Default: off </p>"},{"location":"configuration/config/#exception-verbose","title":"exception-verbose","text":"<p>Print a full stacktrace for exceptions raised in Pwndbg commands.</p> <p>Default: off </p>"},{"location":"configuration/config/#gcc-compiler-path","title":"gcc-compiler-path","text":"<p>(only in GDB)</p> <p>Path to the gcc/g++ toolchain for generating imported symbols.</p> <p>Default: '' </p>"},{"location":"configuration/config/#gdb-workaround-stop-event","title":"gdb-workaround-stop-event","text":"<p>(only in GDB)</p> <p>Asynchronous stop events to improve 'commands' functionality.</p> <p>Note that this may cause unexpected behavior with Pwndbg or gdb.execute.</p> <p>Values explained:</p> <ul> <li><code>disabled</code> - Disable the workaround (default).</li> <li><code>disabled-deadlock</code> - Disable only deadlock detection; deadlocks may still occur.</li> <li><code>enabled</code> - Enable asynchronous stop events; gdb.execute may behave unexpectedly (asynchronously).</li> </ul> <p>Default: 'disabled' Valid values: 'disabled', 'disabled-deadlock', 'enabled'</p>"},{"location":"configuration/config/#go-dump-indent-amount","title":"go-dump-indent-amount","text":"<p>The indent amount for go-dump pretty printing.</p> <p>Default: 4 </p>"},{"location":"configuration/config/#go-dump-line-width","title":"go-dump-line-width","text":"<p>The soft line width for go-dump pretty printing.</p> <p>Default: 80 </p>"},{"location":"configuration/config/#hexdump-bytes","title":"hexdump-bytes","text":"<p>Number of bytes printed by hexdump command.</p> <p>Default: 64 </p>"},{"location":"configuration/config/#hexdump-group-use-big-endian","title":"hexdump-group-use-big-endian","text":"<p>Use big-endian within each group of bytes in hexdump command.</p> <p>When <code>on</code>, use big-endian within each group of bytes. Only applies to raw bytes, not the ASCII part. See also hexdump-highlight-group-lsb.</p> <p>Default: off </p>"},{"location":"configuration/config/#hexdump-group-width","title":"hexdump-group-width","text":"<p>Number of bytes grouped in hexdump command.</p> <p>If -1, the architecture's pointer size is used.</p> <p>Default: -1 </p>"},{"location":"configuration/config/#hexdump-limit-mb","title":"hexdump-limit-mb","text":"<p>The maximum size in megabytes (MB) <code>hexdump</code> will read.</p> <p>Set the maximum size in megabytes (MB) that the <code>hexdump</code> command will attempt to read at once. Prevents GDB crashes due to excessive memory allocation requests. Set to 0 for unlimited (use with caution).</p> <p>Default: 10 </p>"},{"location":"configuration/config/#hexdump-width","title":"hexdump-width","text":"<p>Line width of hexdump command.</p> <p>Default: 16 </p>"},{"location":"configuration/config/#ida-rpc-host","title":"ida-rpc-host","text":"<p>(only in GDB)</p> <p>Ida xmlrpc server address.</p> <p>Default: '127.0.0.1' </p>"},{"location":"configuration/config/#ida-rpc-port","title":"ida-rpc-port","text":"<p>(only in GDB)</p> <p>Ida xmlrpc server port.</p> <p>Default: 31337 </p>"},{"location":"configuration/config/#ida-timeout","title":"ida-timeout","text":"<p>(only in GDB)</p> <p>Time to wait for ida xmlrpc in seconds.</p> <p>Default: 2 </p>"},{"location":"configuration/config/#integration-function-lookup","title":"integration-function-lookup","text":"<p>Use integration to look up function type signatures.</p> <p>Default: on </p>"},{"location":"configuration/config/#integration-provider","title":"integration-provider","text":"<p>Which provider to use for integration features.</p> <p>Default: 'none' Valid values: 'none', 'binja', 'ida'</p>"},{"location":"configuration/config/#integration-smart-enhance","title":"integration-smart-enhance","text":"<p>Use integration to determine when to disassemble during enhancing.</p> <p>Default: on </p>"},{"location":"configuration/config/#integration-symbol-lookup","title":"integration-symbol-lookup","text":"<p>Whether to use integration to look up unknown symbols.</p> <p>Default: on </p>"},{"location":"configuration/config/#kernel-vmmap","title":"kernel-vmmap","text":"<p>The method to get vmmap information when debugging via QEMU kernel.</p> <p>Values explained:</p> <ul> <li><code>page-tables</code> - read /proc/$qemu-pid/mem to parse kernel page tables to render vmmap</li> <li><code>monitor</code> - use QEMU's <code>monitor info mem</code> to render vmmap</li> <li><code>none</code> - disable vmmap rendering; useful if rendering is particularly slow</li> </ul> <p>Note 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).</p> <p>Default: 'page-tables' Valid values: 'page-tables', 'monitor', 'none'</p>"},{"location":"configuration/config/#left-pad-disasm","title":"left-pad-disasm","text":"<p>Whether to left-pad disassembly.</p> <p>Default: on </p>"},{"location":"configuration/config/#max-decimal-number","title":"max-decimal-number","text":"<p>Show all numbers greater than this in hex.</p> <p>For negative numbers, their absolute value is used.</p> <p>Set the parameter to 'unlimited' if you want all values in decimal. Specially, set the parameter to zero if you want all values in hex.</p> <p>The assembly instruction operands come from capstone, and are thus not controlled by this setting. For consistency with them, leave this setting at 9 (the default).</p> <p>Default: 9 </p>"},{"location":"configuration/config/#max-visualize-chunk-size","title":"max-visualize-chunk-size","text":"<p>Max display size for heap chunks visualization (0 for display all).</p> <p>Default: 0 </p>"},{"location":"configuration/config/#nearpc-integration-comments","title":"nearpc-integration-comments","text":"<p>Whether to show comments from integration provider.</p> <p>Default: on </p>"},{"location":"configuration/config/#nearpc-lines","title":"nearpc-lines","text":"<p>Number of additional lines to print for the nearpc command.</p> <p>Default: 10 </p>"},{"location":"configuration/config/#nearpc-num-opcode-bytes","title":"nearpc-num-opcode-bytes","text":"<p>Number of opcode bytes to print for each instruction.</p> <p>Default: 0 </p>"},{"location":"configuration/config/#nearpc-opcode-separator-bytes","title":"nearpc-opcode-separator-bytes","text":"<p>Number of spaces between opcode bytes.</p> <p>Default: 1 </p>"},{"location":"configuration/config/#nearpc-show-args","title":"nearpc-show-args","text":"<p>Whether to show call arguments below instruction.</p> <p>Default: on </p>"},{"location":"configuration/config/#objc-max-function-arguments","title":"objc-max-function-arguments","text":"<p>Maximum number of arguments to resolve for an Objective-C method call.</p> <p>Default: 32 </p>"},{"location":"configuration/config/#objc-max-function-types-depth","title":"objc-max-function-types-depth","text":"<p>Maximum allowed depth for a type in an Objective-C method call.</p> <p>Default: 32 </p>"},{"location":"configuration/config/#safe-linking","title":"safe-linking","text":"<p>Whether glibc uses safe-linking.</p> <p>Default: auto Valid values: on, off, auto.</p>"},{"location":"configuration/config/#show-compact-regs","title":"show-compact-regs","text":"<p>Whether to show a compact register view with columns.</p> <p>Default: off </p>"},{"location":"configuration/config/#show-compact-regs-columns","title":"show-compact-regs-columns","text":"<p>The number of columns (0 for dynamic number of columns).</p> <p>Default: 2 </p>"},{"location":"configuration/config/#show-compact-regs-min-width","title":"show-compact-regs-min-width","text":"<p>The minimum width of each column.</p> <p>Default: 20 </p>"},{"location":"configuration/config/#show-compact-regs-separation","title":"show-compact-regs-separation","text":"<p>The number of spaces separating columns.</p> <p>Default: 4 </p>"},{"location":"configuration/config/#show-flags","title":"show-flags","text":"<p>Whether to show flags registers.</p> <p>Default: off </p>"},{"location":"configuration/config/#show-retaddr-reg","title":"show-retaddr-reg","text":"<p>Whether to show return address register.</p> <p>Default: on </p>"},{"location":"configuration/config/#show-tips","title":"show-tips","text":"<p>Whether to display the tip of the day on startup.</p> <p>Default: on </p>"},{"location":"configuration/config/#syntax-highlight","title":"syntax-highlight","text":"<p>Source code / assembly syntax highlight.</p> <p>Default: on </p>"},{"location":"configuration/config/#telescope-dont-skip-registers","title":"telescope-dont-skip-registers","text":"<p>Don't skip a repeated line if a registers points to it.</p> <p>Default: on </p>"},{"location":"configuration/config/#telescope-frame-print-retaddr","title":"telescope-frame-print-retaddr","text":"<p>Print one pointer past the stack frame.</p> <p>Default: on </p>"},{"location":"configuration/config/#telescope-framepointer-offset","title":"telescope-framepointer-offset","text":"<p>Print offset to framepointer for each address, if sufficiently small.</p> <p>Default: on </p>"},{"location":"configuration/config/#telescope-lines","title":"telescope-lines","text":"<p>Number of lines to printed by the telescope command.</p> <p>Default: 8 </p>"},{"location":"configuration/config/#telescope-skip-repeating-val","title":"telescope-skip-repeating-val","text":"<p>Whether to skip repeating values of the telescope command.</p> <p>Default: on </p>"},{"location":"configuration/config/#telescope-skip-repeating-val-min","title":"telescope-skip-repeating-val-min","text":"<p>Minimum amount of repeated values before skipping lines.</p> <p>Default: 3 </p>"},{"location":"configuration/config/#vmmap-prefer-relpaths","title":"vmmap-prefer-relpaths","text":"<p>Show relative paths by default in vmmap.</p> <p>Default: on </p>"},{"location":"configuration/heap/","title":"Heap","text":""},{"location":"configuration/heap/#heap","title":"heap","text":""},{"location":"configuration/heap/#glibc","title":"glibc","text":"<p>Glibc version for heap heuristics resolution (e.g. 2.31).</p> <p>Default: '' </p>"},{"location":"configuration/heap/#global-max-fast","title":"global-max-fast","text":"<p>The address of global_max_fast.</p> <p>Default: '0' </p>"},{"location":"configuration/heap/#heap-corruption-check-limit","title":"heap-corruption-check-limit","text":"<p>Amount of chunks to traverse for the bin corruption check.</p> <p>The bins are traversed both forwards and backwards.</p> <p>Default: 64 </p>"},{"location":"configuration/heap/#heap-dereference-limit","title":"heap-dereference-limit","text":"<p>Number of chunks to dereference in each bin.</p> <p>Default: 8 </p>"},{"location":"configuration/heap/#main-arena","title":"main-arena","text":"<p>The address of main_arena.</p> <p>Default: '0' </p>"},{"location":"configuration/heap/#mp","title":"mp","text":"<p>The address of mp_.</p> <p>Default: '0' </p>"},{"location":"configuration/heap/#ng-search-on-fail","title":"ng-search-on-fail","text":"<p>Let the ng-slot* commands search the heap if necessary.</p> <p>For freed, avail(able) and corrupted slots, it may be impossible to recover the start of the group and meta.</p> <p>When this option is set to True, the ng-slotu and ng-slots commands will search the heap to try to find the correct meta/group.</p> <p>Default: on </p>"},{"location":"configuration/heap/#ng-vis-count","title":"ng-vis-count","text":"<p>Default count for ng-vis.</p> <p>Default: 10 </p>"},{"location":"configuration/heap/#resolve-heap-via-heuristic","title":"resolve-heap-via-heuristic","text":"GDBLLDB <p>The strategy to resolve heap via heuristic.</p> <p>Values explained:</p> <ul> <li><code>auto</code> - Pwndbg will try to use heuristics if debug symbols are missing</li> <li><code>force</code> - Pwndbg will always try to use heuristics, even if debug symbols are available</li> <li><code>never</code> - Pwndbg will never use heuristics to resolve the heap</li> </ul> <p>If the output of the heap related command produces errors with heuristics, you can try manually setting the libc symbol addresses. For this, see the <code>heap_config</code> command output and set the <code>main_arena</code>, <code>mp_</code>, <code>global_max_fast</code>, <code>tcache</code> and <code>thread_arena</code> addresses.</p> <p>Note: Pwndbg will generate more reliable results with proper debug symbols. Therefore, when debug symbols are missing, you should try to install them first if you haven't already.</p> <p>They can probably be installed via the package manager of your choice. See also: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html .</p> <p>E.g. on Ubuntu/Debian you might need to do the following steps (for 64-bit and 32-bit binaries): <pre><code>sudo apt-get install libc6-dbg\nsudo dpkg --add-architecture i386\nsudo apt-get install libc-dbg:i386\n</code></pre> If you used setup.sh on Arch based distro you'll need to do a power cycle or set environment variable manually like this: <pre><code>export DEBUGINFOD_URLS=https://debuginfod.archlinux.org\n</code></pre></p> <p>In addition, even you have the debug symbols of libc, you might still see the following warning when debugging a multi-threaded program: <pre><code>warning: Unable to find libthread_db matching inferior's thread library, thread\ndebugging will not be available.\n</code></pre></p> <p>You'll need to ensure that the correct <code>libthread_db.so</code> is loaded. To do this, set the search path using: <pre><code>set libthread-db-search-path &lt;path having correct libthread_db.so&gt;\n</code></pre> Then, restart your program to enable proper thread debugging.</p> <p>Default: 'auto' Valid values: 'auto', 'force', 'never'</p> <p>The strategy to resolve heap via heuristic.</p> <p>Values explained:</p> <ul> <li><code>auto</code> - Pwndbg will try to use heuristics if debug symbols are missing</li> <li><code>force</code> - Pwndbg will always try to use heuristics, even if debug symbols are available</li> <li><code>never</code> - Pwndbg will never use heuristics to resolve the heap</li> </ul> <p>If the output of the heap related command produces errors with heuristics, you can try manually setting the libc symbol addresses. For this, see the <code>heap_config</code> command output and set the <code>main_arena</code>, <code>mp_</code>, <code>global_max_fast</code>, <code>tcache</code> and <code>thread_arena</code> addresses.</p> <p>Note: Pwndbg will generate more reliable results with proper debug symbols. Therefore, when debug symbols are missing, you should try to install them first if you haven't already.</p> <p>They can probably be installed via the package manager of your choice. See also: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html .</p> <p>E.g. on Ubuntu/Debian you might need to do the following steps (for 64-bit and 32-bit binaries): <pre><code>sudo apt-get install libc6-dbg\nsudo dpkg --add-architecture i386\nsudo apt-get install libc-dbg:i386\n</code></pre> If you used setup.sh on Arch based distro you'll need to do a power cycle or set environment variable manually like this: <pre><code>export DEBUGINFOD_URLS=https://debuginfod.archlinux.org\n</code></pre></p> <p>Default: 'auto' Valid values: 'auto', 'force', 'never'</p>"},{"location":"configuration/heap/#tcache","title":"tcache","text":"<p>The address pointed by tcache.</p> <p>Default: '0' </p>"},{"location":"configuration/heap/#thread-arena","title":"thread-arena","text":"<p>The address pointed by thread_arena.</p> <p>Default: '0' </p>"},{"location":"configuration/theme/","title":"Theme","text":""},{"location":"configuration/theme/#theme","title":"theme","text":""},{"location":"configuration/theme/#backtrace-address-color","title":"backtrace-address-color","text":"<p>Color for backtrace (address).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#backtrace-frame-label","title":"backtrace-frame-label","text":"<p>Frame number label for backtrace.</p> <p>Default: '' </p>"},{"location":"configuration/theme/#backtrace-frame-label-color","title":"backtrace-frame-label-color","text":"<p>Color for backtrace (frame label).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#backtrace-prefix","title":"backtrace-prefix","text":"<p>Prefix for current backtrace label.</p> <p>Default: '\u25ba' </p>"},{"location":"configuration/theme/#backtrace-prefix-color","title":"backtrace-prefix-color","text":"<p>Color for prefix of current backtrace label.</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#backtrace-symbol-color","title":"backtrace-symbol-color","text":"<p>Color for backtrace (symbol).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#banner-color","title":"banner-color","text":"<p>Color for banner line.</p> <p>Default: 'blue' </p>"},{"location":"configuration/theme/#banner-separator","title":"banner-separator","text":"<p>Repeated banner separator character.</p> <p>Default: '\u2500' </p>"},{"location":"configuration/theme/#banner-title-color","title":"banner-title-color","text":"<p>Color for banner title.</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#banner-title-position","title":"banner-title-position","text":"<p>Banner title position.</p> <p>Default: 'center' Valid values: 'center', 'left', 'right'</p>"},{"location":"configuration/theme/#banner-title-surrounding-left","title":"banner-title-surrounding-left","text":"<p>Banner title surrounding char (left side).</p> <p>Default: '[ ' </p>"},{"location":"configuration/theme/#banner-title-surrounding-right","title":"banner-title-surrounding-right","text":"<p>Banner title surrounding char (right side).</p> <p>Default: ' ]' </p>"},{"location":"configuration/theme/#bn-decomp-style","title":"bn-decomp-style","text":"<p>Decompilation highlight theme for Binary Ninja.</p> <p>Default: 'dark' Valid values: 'dark', 'light'</p>"},{"location":"configuration/theme/#chain-arrow-color","title":"chain-arrow-color","text":"<p>Color of chain formatting (arrow).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#chain-arrow-left","title":"chain-arrow-left","text":"<p>Left arrow of chain formatting.</p> <p>Default: '\u25c2\u2014' </p>"},{"location":"configuration/theme/#chain-arrow-right","title":"chain-arrow-right","text":"<p>Right arrow of chain formatting.</p> <p>Default: '\u2014\u25b8' </p>"},{"location":"configuration/theme/#chain-contiguous-marker","title":"chain-contiguous-marker","text":"<p>Contiguous marker of chain formatting.</p> <p>Default: '...' </p>"},{"location":"configuration/theme/#chain-contiguous-marker-color","title":"chain-contiguous-marker-color","text":"<p>Color of chain formatting (contiguous marker).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#code-prefix","title":"code-prefix","text":"<p>Prefix marker for 'context code' command.</p> <p>Default: '\u25ba' </p>"},{"location":"configuration/theme/#code-prefix-color","title":"code-prefix-color","text":"<p>Color for 'context code' command (prefix marker).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#comment-color","title":"comment-color","text":"<p>Color for comment.</p> <p>Default: 'gray' </p>"},{"location":"configuration/theme/#context-flag-bracket-color","title":"context-flag-bracket-color","text":"<p>Color for flags register (bracket).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#context-flag-changed-color","title":"context-flag-changed-color","text":"<p>Color for flags register (flag changed).</p> <p>Default: 'underline' </p>"},{"location":"configuration/theme/#context-flag-set-color","title":"context-flag-set-color","text":"<p>Color for flags register (flag set).</p> <p>Default: 'green,bold' </p>"},{"location":"configuration/theme/#context-flag-unset-color","title":"context-flag-unset-color","text":"<p>Color for flags register (flag unset).</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#context-flag-value-color","title":"context-flag-value-color","text":"<p>Color for flags register (register value).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#context-register-changed-color","title":"context-register-changed-color","text":"<p>Color for registers label (change marker).</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#context-register-changed-marker","title":"context-register-changed-marker","text":"<p>Change marker for registers label.</p> <p>Default: '*' </p>"},{"location":"configuration/theme/#context-register-color","title":"context-register-color","text":"<p>Color for registers label.</p> <p>Default: 'bold' </p>"},{"location":"configuration/theme/#disable-colors","title":"disable-colors","text":"<p>Whether to color the output or not.</p> <p>Default: off </p>"},{"location":"configuration/theme/#disasm-branch-color","title":"disasm-branch-color","text":"<p>Color for disasm (branch/call instruction).</p> <p>Default: 'bold' </p>"},{"location":"configuration/theme/#disasm-branch-off","title":"disasm-branch-off","text":"<p>Marker for branches that will NOT be taken.</p> <p>Default: '\u2718' </p>"},{"location":"configuration/theme/#disasm-branch-on","title":"disasm-branch-on","text":"<p>Marker for branches that WILL be taken.</p> <p>Default: '\u2714' </p>"},{"location":"configuration/theme/#enhance-comment-color","title":"enhance-comment-color","text":"<p>Color of value enhance (comment).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#enhance-integer-value-color","title":"enhance-integer-value-color","text":"<p>Color of value enhance (integer).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#enhance-string-value-color","title":"enhance-string-value-color","text":"<p>Color of value enhance (string).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#enhance-unknown-color","title":"enhance-unknown-color","text":"<p>Color of value enhance (unknown value).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#go-dump-debug","title":"go-dump-debug","text":"<p>Color for 'go-dump' command's debug info when --debug is specified.</p> <p>Default: 'blue' </p>"},{"location":"configuration/theme/#hexdump-address-color","title":"hexdump-address-color","text":"<p>Color for hexdump command (address label).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#hexdump-ascii-block-separator","title":"hexdump-ascii-block-separator","text":"<p>Block separator char of the hexdump command.</p> <p>Default: '\u2502' </p>"},{"location":"configuration/theme/#hexdump-byte-separator","title":"hexdump-byte-separator","text":"<p>Separator of single bytes in hexdump (does NOT affect group separator).</p> <p>Default: ' ' </p>"},{"location":"configuration/theme/#hexdump-colorize-ascii","title":"hexdump-colorize-ascii","text":"<p>Whether to colorize the hexdump command ascii section.</p> <p>Default: on </p>"},{"location":"configuration/theme/#hexdump-highlight-group-lsb","title":"hexdump-highlight-group-lsb","text":"<p>Highlight LSB of each group.</p> <p>Applies only if hexdump-use-big-endian actually changes byte order.</p> <p>Default: 'underline' </p>"},{"location":"configuration/theme/#hexdump-normal-color","title":"hexdump-normal-color","text":"<p>Color for hexdump command (normal bytes).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#hexdump-offset-color","title":"hexdump-offset-color","text":"<p>Color for hexdump command (offset label).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#hexdump-printable-color","title":"hexdump-printable-color","text":"<p>Color for hexdump command (printable characters).</p> <p>Default: 'bold' </p>"},{"location":"configuration/theme/#hexdump-separator-color","title":"hexdump-separator-color","text":"<p>Color for hexdump command (group separator).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#hexdump-special-color","title":"hexdump-special-color","text":"<p>Color for hexdump command (special bytes).</p> <p>Default: 'yellow' </p>"},{"location":"configuration/theme/#hexdump-zero-color","title":"hexdump-zero-color","text":"<p>Color for hexdump command (zero bytes).</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#highlight-breakpoints","title":"highlight-breakpoints","text":"<p>Whether to highlight breakpoints.</p> <p>Default: on </p>"},{"location":"configuration/theme/#highlight-color","title":"highlight-color","text":"<p>Color added to highlights like source/pc.</p> <p>Default: 'green,bold' </p>"},{"location":"configuration/theme/#highlight-pc","title":"highlight-pc","text":"<p>Whether to highlight the current instruction.</p> <p>Default: on </p>"},{"location":"configuration/theme/#highlight-source","title":"highlight-source","text":"<p>Whether to highlight the closest source line.</p> <p>Default: on </p>"},{"location":"configuration/theme/#memory-code-color","title":"memory-code-color","text":"<p>Color for executable memory.</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#memory-data-color","title":"memory-data-color","text":"<p>Color for all other writable memory.</p> <p>Default: 'purple' </p>"},{"location":"configuration/theme/#memory-guard-color","title":"memory-guard-color","text":"<p>Color added to all guard pages (no perms).</p> <p>Default: 'cyan' </p>"},{"location":"configuration/theme/#memory-heap-color","title":"memory-heap-color","text":"<p>Color for heap memory.</p> <p>Default: 'blue' </p>"},{"location":"configuration/theme/#memory-rodata-color","title":"memory-rodata-color","text":"<p>Color for all read only memory.</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#memory-stack-color","title":"memory-stack-color","text":"<p>Color for stack memory.</p> <p>Default: 'yellow' </p>"},{"location":"configuration/theme/#memory-wx-color","title":"memory-wx-color","text":"<p>Color added to all WX memory.</p> <p>Default: 'underline' </p>"},{"location":"configuration/theme/#message-breakpoint-color","title":"message-breakpoint-color","text":"<p>Color of breakpoint messages.</p> <p>Default: 'yellow' </p>"},{"location":"configuration/theme/#message-debug-color","title":"message-debug-color","text":"<p>Color of debug messages.</p> <p>Default: 'blue' </p>"},{"location":"configuration/theme/#message-error-color","title":"message-error-color","text":"<p>Color of error messages.</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#message-exit-color","title":"message-exit-color","text":"<p>Color of exit messages.</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#message-hint-color","title":"message-hint-color","text":"<p>Color of hint and marker messages.</p> <p>Default: 'yellow' </p>"},{"location":"configuration/theme/#message-info-color","title":"message-info-color","text":"<p>Color of info messages.</p> <p>Default: 'white' </p>"},{"location":"configuration/theme/#message-notice-color","title":"message-notice-color","text":"<p>Color of notice messages.</p> <p>Default: 'purple' </p>"},{"location":"configuration/theme/#message-signal-color","title":"message-signal-color","text":"<p>Color of signal messages.</p> <p>Default: 'bold,red' </p>"},{"location":"configuration/theme/#message-status-off-color","title":"message-status-off-color","text":"<p>Color of off status messages.</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#message-status-on-color","title":"message-status-on-color","text":"<p>Color of on status messages.</p> <p>Default: 'green' </p>"},{"location":"configuration/theme/#message-success-color","title":"message-success-color","text":"<p>Color of success messages.</p> <p>Default: 'green' </p>"},{"location":"configuration/theme/#message-system-color","title":"message-system-color","text":"<p>Color of system messages.</p> <p>Default: 'light-red' </p>"},{"location":"configuration/theme/#message-warning-color","title":"message-warning-color","text":"<p>Color of warning messages.</p> <p>Default: 'yellow' </p>"},{"location":"configuration/theme/#nearpc-address-color","title":"nearpc-address-color","text":"<p>Color for nearpc command (address).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#nearpc-argument-color","title":"nearpc-argument-color","text":"<p>Color for nearpc command (target argument).</p> <p>Default: 'bold' </p>"},{"location":"configuration/theme/#nearpc-branch-marker","title":"nearpc-branch-marker","text":"<p>Branch marker line for nearpc command.</p> <p>Default: ' \u2193' </p>"},{"location":"configuration/theme/#nearpc-branch-marker-color","title":"nearpc-branch-marker-color","text":"<p>Color for nearpc command (branch marker line).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#nearpc-branch-marker-contiguous","title":"nearpc-branch-marker-contiguous","text":"<p>Contiguous branch marker line for nearpc command.</p> <p>Default: ' ' </p>"},{"location":"configuration/theme/#nearpc-breakpoint-color","title":"nearpc-breakpoint-color","text":"<p>Color for nearpc command (breakpoint marker).</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#nearpc-breakpoint-prefix","title":"nearpc-breakpoint-prefix","text":"<p>Breakpoint marker for nearpc command.</p> <p>Default: 'b+' </p>"},{"location":"configuration/theme/#nearpc-integration-comments-color","title":"nearpc-integration-comments-color","text":"<p>Color for nearpc command (integration comments).</p> <p>Default: 'bold' </p>"},{"location":"configuration/theme/#nearpc-prefix","title":"nearpc-prefix","text":"<p>Prefix marker for nearpc command.</p> <p>Default: '\u25ba' </p>"},{"location":"configuration/theme/#nearpc-prefix-color","title":"nearpc-prefix-color","text":"<p>Color for nearpc command (prefix marker).</p> <p>Default: 'none' </p>"},{"location":"configuration/theme/#nearpc-symbol-color","title":"nearpc-symbol-color","text":"<p>Color for nearpc command (symbol).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#nearpc-syscall-name-color","title":"nearpc-syscall-name-color","text":"<p>Color for nearpc command (resolved syscall name).</p> <p>Default: 'red' </p>"},{"location":"configuration/theme/#prompt-alive-color","title":"prompt-alive-color","text":"<p>Prompt alive color.</p> <p>Default: 'bold,green' </p>"},{"location":"configuration/theme/#prompt-color","title":"prompt-color","text":"<p>Prompt color.</p> <p>Default: 'bold,red' </p>"},{"location":"configuration/theme/#prop-name-color","title":"prop-name-color","text":"<p>Color used to highlight the name in name-value pairs.</p> <p>Used heavily in mallocng commands.</p> <p>Default: 'bold' </p>"},{"location":"configuration/theme/#prop-title-color","title":"prop-title-color","text":"<p>Color used to highlight the title of name-value pair groups.</p> <p>Used heavily in mallocng commands.</p> <p>Default: 'green' </p>"},{"location":"configuration/theme/#prop-value-color","title":"prop-value-color","text":"<p>Color used to highlight the value in name-value pairs.</p> <p>Used heavily in mallocng commands.</p> <p>Default: 'yellow' </p>"},{"location":"configuration/theme/#syntax-highlight-style","title":"syntax-highlight-style","text":"<p>Source code / assembly syntax highlight stylename of pygments module.</p> <p>Default: 'monokai' </p>"},{"location":"configuration/theme/#telescope-offset-color","title":"telescope-offset-color","text":"<p>Color of the telescope command (offset prefix).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#telescope-offset-delimiter","title":"telescope-offset-delimiter","text":"<p>Offset delimiter of the telescope command.</p> <p>Default: ':' </p>"},{"location":"configuration/theme/#telescope-offset-delimiter-color","title":"telescope-offset-delimiter-color","text":"<p>Color of the telescope command (offset delimiter).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#telescope-offset-separator","title":"telescope-offset-separator","text":"<p>Offset separator of the telescope command.</p> <p>Default: '\u2502' </p>"},{"location":"configuration/theme/#telescope-offset-separator-color","title":"telescope-offset-separator-color","text":"<p>Color of the telescope command (offset separator).</p> <p>Default: 'normal' </p>"},{"location":"configuration/theme/#telescope-register-color","title":"telescope-register-color","text":"<p>Color of the telescope command (register).</p> <p>Default: 'bold' </p>"},{"location":"configuration/theme/#telescope-repeating-marker","title":"telescope-repeating-marker","text":"<p>Repeating values marker of the telescope command.</p> <p>Default: '... \u2193' </p>"},{"location":"configuration/theme/#telescope-repeating-marker-color","title":"telescope-repeating-marker-color","text":"<p>Color of the telescope command (repeating values marker).</p> <p>Default: 'normal' </p>"},{"location":"contributing/","title":"Contributing Guide","text":""},{"location":"contributing/#contributing-overview","title":"Contributing Overview","text":"<p>Thank you for your interest in contributing to Pwndbg!</p> <p>Note that while it is recommended that your pull request (PR) links to an issue (which can be used for discussing the bug / feature), you do not need to be assigned to it - just create the PR and it will be reviewed.</p> <p>To start, install Pwndbg from source and set it up for development. For common tasks see:</p> <ul> <li>Adding a command</li> <li>Adding a configuration option</li> <li>Improving annotations</li> </ul> <p>Regardless of the contents of your PR, you will need to lint and test your code so make sure to read those sections. It is also likely you will need to update the documentation.</p> <p>Read General developer notes to get more familiar with the various systems in place in Pwndbg. If you have any questions don't hesitate to ask us on our discord server!</p>"},{"location":"contributing/#linting","title":"Linting","text":"<p>The <code>lint.sh</code> script runs isort, ruff, shfmt, and vermin. isort and ruff (mostly) are able to automatically fix any issues they detect. You may apply all available fixes by running <pre><code>./lint.sh -f\n</code></pre></p> <p>Note</p> <p>You can find the configuration files for these tools in <code>pyproject.toml</code> or by checking the arguments passed inside <code>lint.sh</code>.</p> <p>When submitting a PR, the continuous integration (CI) job defined in <code>.github/workflows/lint.yml</code> will verify that running <code>./lint.sh</code> succeeds, otherwise the job will fail and we won't be able to merge your PR.</p> <p>It is recommended to enable the pre-push git hook to run the lint if you haven't already done so. You may re-run <code>./setup-dev.sh</code> to set it.</p>"},{"location":"contributing/#running-tests","title":"Running tests","text":"<p>Your PR will not be merged without passing the testing CI. Moreover, it is highly recommended you write a new test or update an existing test whenever adding new functionality to Pwndbg. To see how to do this, check out Writing tests.</p> <p>To run the tests in the same environment as the testing CI, you can use the following docker commands. <pre><code># General (x86_64) test suite\ndocker compose run --rm --build ubuntu24.04-mount ./tests.sh -d gdb -g gdb\n# Cross-architecture tests\ndocker compose run --rm --build ubuntu24.04-mount ./tests.sh -d gdb -g cross-arch-user\n# Kernel tests (x86_64 and aarch64)\ndocker compose run --rm --build ubuntu24.04-mount ./kernel-tests.sh\n# Unit tests\ndocker compose run --rm --build ubuntu24.04-mount ./unit-tests.sh\n</code></pre> This comes in handy particularly for cross-architecture tests because the docker environment has all the cross-compilers installed. The active <code>pwndbg</code> directory is mounted, preventing the need for a full rebuild whenever you update the codebase.</p> <p>Remove the <code>-mount</code> if you want the tests to run from a clean slate (no files are mounted, meaning all binaries are recompiled each time).</p> <p>If you wish to focus on some failing tests, you can filter the tests to run by providing an argument to the script, such as <code>&lt;docker..&gt; ./tests.sh heap</code>, which will only run tests that contain \"heap\" in the name. See <code>./tests.sh --help</code> for more information and other options. You can also do this with the cross-arch and kernel tests.</p> <p>If you want to, you may also run the tests with nix or run them bare.</p>"},{"location":"contributing/#running-tests-with-nix","title":"Running tests with nix","text":"<p>You will need to build a nix-compatible <code>gdbinit.py</code> file, which you can do with <pre><code>nix build .#pwndbg-dev\n</code></pre> Then simply run the test by adding the <code>--nix</code> flag: <pre><code>./tests.sh --nix [filter]\n</code></pre></p>"},{"location":"contributing/#running-without-docker","title":"Running without docker","text":"<p>If you wish to improve Pwndbg support for your distribution (or the testing infrastructure) you may run the testing suite without the docker container.</p> <p>The commands are analogous to the docker commands. <pre><code># General (x86_64) test suite\n./tests.sh -d gdb -g gdb\n# Cross-architecture tests\n./tests.sh -d gdb -g cross-arch-user\n# Kernel tests (x86_64 and aarch64)\n./kernel-tests.sh\n# Unit tests\n./unit-tests.sh\n</code></pre></p>"},{"location":"contributing/#updating-documentation","title":"Updating Documentation","text":"<p>All the documentation is written in markdown files in the <code>./docs/</code> folder. The docs are built into a website using mkdocs (you may see the configuration in <code>./mkdocs.yml</code>), pushed to the gh-pages branch, and published via github pages. All of this happens in the CI.</p> <p>In general, for your PR to be accepted you will only need to Update the auto-generated documentation.</p>"},{"location":"contributing/#update-the-auto-generated-documentation","title":"Update the auto-generated documentation","text":"<p>The <code>./docs/commands</code>, <code>./docs/functions</code>, and <code>./docs/configuration</code> folders are automatically generated<sup>1</sup> by extracting the necessary information from the source code. If your changes modify things like a command's description, a configuration's valid values, a convenience function's arguments - i.e. pretty much anything that's user-facing - you must run <pre><code>./scripts/generate-docs.sh\n</code></pre> to update the documentation. You need to have a supported version of GDB and LLDB installed for this to work. Commit these changes in a separate commit.</p> <p>If you forget to do that the CI will detect a discrepency between the documentation and source code (using the <code>./scripts/verify-docs.sh</code> script, which you may also invoke yourself) and prevent your PR from being merged (until you push new changes, re-running the CI).</p>"},{"location":"contributing/#manual-updates","title":"Manual updates","text":"<p>Of course, if you wish to update some other part of the documentation, you may simply modify the necessary markdown files. All autogenerated files (or parts of files) will have noticable markers written as markdown comments, for instance: <pre><code>&lt;!-- THIS PART OF THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT. See scripts/generate-docs.sh --&gt;\n</code></pre> In case you want to add something that cannot be cleanly viewed from the debugger, like a video, screenshot, or long example, every command markdown file also has a dedicated part at the bottom for hand-written text which you can use. The <code>./scripts/generate-docs.sh</code> script will never delete these hand-written parts, so if you are for instance renaming a command you will have to transfer this part by copy pasting it to the new file.</p> <p>If you wish to preview the documentation locally, you may do so by running: <pre><code>./scripts/docs-live.sh\n</code></pre> The build will take some time due to the <code>Source</code> section being built. You may disable this by temporarily commenting these lines <pre><code> - api-autonav:\n modules: ['pwndbg']\n nav_section_title: \"Source\"\n</code></pre> in the <code>mkdocs.yml</code> file. This will provide much faster build times (but make sure not to commit those changes!). Visit <code>http://127.0.0.1:8000/pwndbg/</code> to see the docs. Note that the <code>Home</code> section will not be available (it is generated in the CI by copying the README.md), and the site will lack the version selector.</p> <ol> <li> <p>Actually, the <code>./docs/configuration/index.md</code> file is hand-written, and the intro text to the <code>./docs/functions/index.md</code> file is defined in the doc generating file's source code.\u00a0\u21a9</p> </li> </ol>"},{"location":"contributing/adding-a-command/","title":"Adding a Command","text":""},{"location":"contributing/adding-a-command/#command-skeleton","title":"Command skeleton","text":"<p>To add a command to Pwndbg, create a new python file in <code>pwndbg/commands/my_command.py</code> where <code>my_command</code> is the name of the command you want to add. The most basic command looks like this: <pre><code>import argparse\nimport pwndbg.commands\n\nparser = argparse.ArgumentParser(description=\"Command description.\")\nparser.add_argument(\"arg\", type=str, help=\"An example argument.\")\n\n@pwndbg.commands.Command(parser, category=pwndbg.commands.CommandCategory.MISC)\ndef my_command(arg: str) -&gt; None:\n \"\"\"Print the argument\"\"\"\n print(f\"Argument is {arg}\")\n</code></pre> Next, import this file in the <code>load_commands</code> function in <code>pwndbg/commands/__init__.py</code>.</p> <p>That's all you need to get it working! <pre><code>pwndbg&gt; my-command foo\nArgument is foo\n</code></pre></p>"},{"location":"contributing/adding-a-command/#getting-started","title":"Getting started","text":"<p>Let's see what arguments the <code>@pwndbg.commands.Command</code> decorator takes. It is defined in <code>pwndbg/commands/__init__.py</code>: <pre><code> def __init__(\n self,\n parser_or_desc: argparse.ArgumentParser | str,\n *, # All further parameters are not positional\n category: CommandCategory,\n command_name: str | None = None,\n aliases: List[str] = [],\n examples: str = \"\",\n notes: str = \"\",\n only_debuggers: Set[pwndbg.dbg_mod.DebuggerType] = None,\n exclude_debuggers: Set[pwndbg.dbg_mod.DebuggerType] = None,\n ) -&gt; None:\n # ...\n</code></pre> We will cover the first four arguments now, and come back to the rest later.</p> <p>If your command takes no arguments you can pass the description of the command as the first argument (<code>parser_or_desc</code>) to the constructor. Otherwise you will be passing an <code>argparse.ArgumentParser</code> object there.</p> <p>The only other required argument is <code>category</code>. The <code>category</code> determines how commands are grouped together in the output of the <code>pwndbg</code> command and in the documentation. Peruse the list of all commands inside a debugger (by running the <code>pwndbg</code> command) and decide in which category your command fits best. The enum of all command categories is defined at the top of the <code>pwndbg/commands/__init__.py</code> file.</p>"},{"location":"contributing/adding-a-command/#picking-a-command-name","title":"Picking a command name","text":"<p>Next, the <code>command_name</code> argument. It is optional because if it is not specified the command name will be the same as the function you used to define the command (except the underscores are replaced with dashes). As such, it is generally not needed to specify this argument.</p> <p>That being said, it is important to pick a good name for your command. Ideally your command name should be one to two words that are not delimited by a dash (e.g. <code>errno</code>, <code>libcinfo</code>, <code>buddydump</code>) since that is easiest to remember and type.</p> <p>If your command is porting behavior from some other debugger or tool, you should consider using the same name they use so users don't need to relearn it when switching.</p> <p>If the command name contains three or more words, you should use dashes to make it more legible. If that is the case, or if the name is long, consider providing an alias that makes it quicker to type (like <code>vis-heap-chunks [vis]</code>).</p> <p>You provide aliases to a command by specifying a list of strings to the <code>aliases</code> argument. Again, you may provide aliases to help users transitioning from other tools/debuggers (e.g. <code>nearpc [pdisass, u]</code>).</p>"},{"location":"contributing/adding-a-command/#the-arguments-your-command-will-take","title":"The arguments your command will take","text":"<p>We are using <code>argparse.ArgumentParser</code> from the python standard library to define command arguments. Take a look at the python documentation to see how it works. Let's take a look at an example from the source (the <code>setflag</code> command): <pre><code>parser = argparse.ArgumentParser(description=\"Modify the flags register.\")\n\nparser.add_argument(\n \"flag\",\n type=str,\n help=\"Flag for which you want to change the value\"\n )\n\nparser.add_argument(\n \"value\",\n type=int,\n help=\"Value to which you want to set the flag - only valid options are 0 and 1\",\n)\n</code></pre> For usage inside Pwndbg, to instantiate an <code>argparse.ArgumentParser</code> object, you must pass the <code>description</code> argument and may pass the <code>epilog</code> argument. Everything else, including <code>prog</code>, <code>usage</code>, <code>formatter_class</code> etc. will be set up by Pwndbg (by the <code>@pwndbg.commands.Command</code> decorator). Here we see only the <code>description</code> was provided.</p> <p>Add arguments to your command with <code>parser.add_argument</code>. Again, consult the python documentation for an explanation. One nice thing specific to Pwndbg is that by setting an argument's <code>type</code> to <code>int</code>, it will also accept debugger values and symbols that can resolve to an int. For instance: <pre><code>pwndbg&gt; setflag ZF (1-1)\nSet flag ZF=0 in flag register eflags (old val=0x206, new val=0x206)\npwndbg&gt; setflag ZF $rdi\nSet flag ZF=1 in flag register eflags (old val=0x246, new val=0x246)\npwndbg&gt; setflag ZF (int)main^(int)main\nSet flag ZF=0 in flag register eflags (old val=0x246, new val=0x206)\n</code></pre> Be careful when deciding which arguments are positional, and which are optional. Especially take care if you have positional arguments which are not required, think about which of those will be specified more often by users and put them first.</p> <p>Your function signature should match the arguments you defined with argparse (and their order!), unsurprisingly the <code>setflag</code> function has this signature: <pre><code>def setflag(flag: str, value: int) -&gt; None:\n</code></pre> You can see the help of your command with <code>my_command -h</code> or <code>help my_command</code>, so for <code>setflag</code>: <pre><code>pwndbg&gt; help setflag\nusage: setflag [-h] flag value\n\nModify the flags register.\n\npositional arguments:\n flag Flag for which you want to change the value\n value Value to which you want to set the flag - only valid options are 0 and 1\n\noptions:\n -h, --help show this help message and exit\n\nExamples:\nOn X86/X64:\n setflag ZF 1 -- set zero flag\n setflag CF 0 -- unset carry flag\n\nOn ARM:\n setflag Z 0 -- unset the Z cpsr/xpsr flag\n\nTo see flags registers:\n info reg eflags -- on x86/x64\n info reg cpsr/xpsr -- on ARM (specific register may vary)\n\nNotes:\nThis command supports flags registers that are defined for architectures in the pwndbg/regs.py file.\n\nAlias: flag\n</code></pre> Eh? Where is all that extra text coming from? Well the <code>Alias: flag</code> line is being automatically generated by Pwndbg but...</p>"},{"location":"contributing/adding-a-command/#examples-notes-and-debugger-support","title":"Examples, notes, and debugger support","text":"<p>Coming back to the arguments of the <code>pwndbg.commands.Command</code> constructor: <pre><code> def __init__(\n self,\n parser_or_desc: argparse.ArgumentParser | str,\n *, # All further parameters are not positional\n category: CommandCategory,\n command_name: str | None = None,\n aliases: List[str] = [],\n examples: str = \"\", # &lt;--- we left off here\n notes: str = \"\",\n only_debuggers: Set[pwndbg.dbg_mod.DebuggerType] = None,\n exclude_debuggers: Set[pwndbg.dbg_mod.DebuggerType] = None,\n ) -&gt; None:\n # ...\n</code></pre> You may supply the <code>examples</code> and <code>notes</code> arguments to add additional text at the end of the command's help. It is defined like so for <code>setflag</code>: <pre><code>@pwndbg.commands.Command(\n parser,\n aliases=[\"flag\"],\n category=CommandCategory.REGISTER,\n examples=\"\"\"\nOn X86/X64:\n setflag ZF 1 -- set zero flag\n setflag CF 0 -- unset carry flag\n\nOn ARM:\n setflag Z 0 -- unset the Z cpsr/xpsr flag\n\nTo see flags registers:\n info reg eflags -- on x86/x64\n info reg cpsr/xpsr -- on ARM (specific register may vary)\n \"\"\",\n notes=\"\"\"\nThis command supports flags registers that are defined for architectures in the pwndbg/regs.py file.\n \"\"\",\n)\n@pwndbg.commands.OnlyWhenRunning\ndef setflag(flag: str, value: int) -&gt; None:\n # ....\n</code></pre> When writing this (and the command description for that matter), you should consider what it will look like in the documentation after being parsed as markdown.</p> <p>As for <code>only_debuggers</code> and <code>exclude_debuggers</code>, you must use (usually one of) them if your command does not work an all debuggers that Pwndbg supports. For instance, if it uses some features from <code>pwndbg.gdblib</code> (which should be avoided if at all possible). In such a case, you probably also need to conditionally import it in the <code>load_commands</code> function.</p>"},{"location":"contributing/adding-a-command/#can-your-command-be-invoked-all-the-time","title":"Can your command be invoked all the time?","text":"<p>In most cases a command cannot be legally invoked at every moment in a debugging session, or for every debugging session. For instance, you can't use heap commands if the heap isn't initialized yet, you can't use kernel commands if you're not debugging a kernel.</p> <p>To make sure these cases are properly handled, Pwndbg provides certain decorators. They are defined in <code>pwndbg/commands/__init__.py</code>. Check the source to see an up-to-date list, but here are some important ones: <pre><code>OnlyWhenRunning\nOnlyWhenLocal\nOnlyWithFile\nOnlyWhenQemuKernel\nOnlyWhenUserspace\nOnlyWithKernelDebugInfo\nOnlyWithKernelDebugSymbols\nOnlyWhenPagingEnabled\nOnlyWithTcache\nOnlyWhenHeapIsInitialized\nOnlyWithResolvedHeapSyms\n</code></pre> Feel free to add more of these decorators yourself!</p> <p>Another very important one is <code>OnlyWithArch</code>, defined in <code>pwndbg/aglib/proc.py</code>. Does your command work on all architectures? If not, make sure to specify this decorator and pass in the architectures which you do support.</p>"},{"location":"contributing/adding-a-command/#actually-implementing-the-command","title":"Actually implementing the command","text":"<p>There is no single right way to do it. You will want to read the source of some similar commands and see how they work. Check out the general developer notes, and feel free to ask a question on the discord server. Good luck!</p>"},{"location":"contributing/adding-a-parameter/","title":"Adding a Configuration Option","text":"<p>Configuration options are also called \"parameters\" in the source. Let's take a look at an existing parameter <code>gdb-workaround-stop-event</code> defined in <code>pwndbg/gdblib/events.py</code>. <pre><code>DISABLED = \"disabled\"\nDISABLED_DEADLOCK = \"disabled-deadlock\"\nENABLED = \"enabled\"\n\ngdb_workaround_stop_event = config.add_param(\n \"gdb-workaround-stop-event\",\n DISABLED,\n \"asynchronous stop events to improve 'commands' functionality\",\n help_docstring=f\"\"\"\nNote that this may cause unexpected behavior with Pwndbg or gdb.execute.\n\nValues explained:\n\n+ `{DISABLED}` - Disable the workaround (default).\n+ `{DISABLED_DEADLOCK}` - Disable only deadlock detection; deadlocks may still occur.\n+ `{ENABLED}` - Enable asynchronous stop events; gdb.execute may behave unexpectedly (asynchronously).\n \"\"\",\n param_class=pwndbg.lib.config.PARAM_ENUM,\n enum_sequence=[DISABLED, DISABLED_DEADLOCK, ENABLED],\n)\n</code></pre> To understand it, let's also look at the signature of the <code>Config.add_param</code> function defined in <code>pwndbg/lib/config.py</code>: <pre><code> def add_param(\n self,\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: Scope = Scope.config,\n ) -&gt; Parameter:\n # ...\n</code></pre> So, the first argument specifies the name by which the parameter will be used inside the debugger. The second argument specifies the default value of the parameter.</p>"},{"location":"contributing/adding-a-parameter/#set_show_doc","title":"set_show_doc","text":"<p>The third argument is a very brief description of what the parameter is for. The argument is called <code>set_show_doc</code> due to how it is used in GDB. <pre><code>pwndbg&gt; set gdb-workaround-stop-event enabled\nSet asynchronous stop events to improve 'commands' functionality to 'enabled'.\n |------------------------------------------------------------|\n</code></pre> <pre><code>pwndbg&gt; show gdb-workaround-stop-event\nAsynchronous stop events to improve 'commands' functionality is 'enabled'. [...]\n|-----------------------------------------------------------|\n</code></pre> It is therefore recommended to use a noun phrase rather than describe an action. However, it sometimes may be necessary to break this rule to retain the brevity of the description.</p> <p>The <code>set_show_doc</code> argument should be short because it is displayed with the <code>config</code> family of commands. <pre><code>pwndbg&gt; config\nName Documentation Value (Default)\n----------------------------------------------------------------------------------------------------------------------------\nai-anthropic-api-key Anthropic API key ''\nai-history-size maximum number of questions and answers to keep in the prompt 3\nai-max-tokens the maximum number of tokens to return in the response 100\nai-model the name of the large language model to query 'gpt-3.5-turbo'\nai-ollama-endpoint Ollama API endpoint ''\nai-openai-api-key OpenAI API key ''\nai-show-usage whether to show how many tokens are used with each OpenAI API call off\nai-stack-depth rows of stack context to include in the prompt for the ai command 16\nai-temperature the temperature specification for the LLM query 0\nattachp-resolution-method how to determine the process to attach when multiple candidates exists 'ask'\nauto-explore-auxv stack exploration for AUXV information; it may be really slow 'warn'\nauto-explore-pages whether to try to infer page permissions when memory maps are missing 'warn'\nauto-explore-stack stack exploration; it may be really slow 'warn'\nauto-save-search automatically pass --save to \"search\" command off\nbn-autosync whether to automatically run bn-sync every step off\n[...]\n</code></pre> Because of the various contexts in which a parameter can be show, the first letter of the <code>set_show_doc</code> string should be lowercase (unless the first word is a name or an abbreviation) and there should be no punctuation at the end. This way, Pwndbg and GDB can more easily modify the string to fit it into these contexts.</p>"},{"location":"contributing/adding-a-parameter/#help_docstring","title":"help_docstring","text":"<p>While <code>help_docstring</code> is not mandatory, it is highly recommended to use it. Put a detailed explanation of what the parameter does here, and explain any caveats. This string does not have a size limit and is shown with the following command in GDB and LLDB: <pre><code>pwndbg&gt; help set gdb-workaround-stop-event\nSet asynchronous stop events to improve 'commands' functionality.\nNote that this may cause unexpected behavior with Pwndbg or gdb.execute.\n\nValues explained:\n\n+ `disabled` - Disable the workaround (default).\n+ `disabled-deadlock` - Disable only deadlock detection; deadlocks may still occur.\n+ `enabled` - Enable asynchronous stop events; gdb.execute may behave unexpectedly (asynchronously).\n\nDefault: 'disabled'\nValid values: 'disabled', 'disabled-deadlock', 'enabled'\n</code></pre> Note that the last two lines are automatically generated by Pwndbg.</p> <p>When writing this explanation, it is important to take into account how it will be displayed in the documentation after being parsed as markdown. See what <code>gdb-workaround-stop-event</code> looks like here. If there wasn't an empty line between <code>Values explained:</code> and <code>+ `disabled`..</code> the list wouldn't have rendered properly.</p>"},{"location":"contributing/adding-a-parameter/#param_class","title":"param_class","text":"<p>This argument describes the type of the parameter. It will be used by GDB to perform input validation when the parameter is being set so it is important to set this to the correct value. The possible values are defined in <code>pwndbg/lib/config.py</code>, use the most restrictive one that fits: <pre><code># Boolean value. True or False, same as in Python.\nPARAM_BOOLEAN = 0\n# Boolean value, or 'auto'.\nPARAM_AUTO_BOOLEAN = 1\n# Signed integer value. Disallows zero.\nPARAM_INTEGER = 2\n# Signed integer value.\nPARAM_ZINTEGER = 3\n# Unsigned integer value. Disallows zero.\nPARAM_UINTEGER = 4\n# Unsigned integer value.\nPARAM_ZUINTEGER = 5\n# Unlimited ZUINTEGER.\nPARAM_ZUINTEGER_UNLIMITED = 6\n# String value. Accepts escape sequences.\nPARAM_STRING = 7\n# String value, accepts only one of a number of possible values, specified at\n# parameter creation.\nPARAM_ENUM = 8\n# String value corresponding to the name of a file, if present.\nPARAM_OPTIONAL_FILENAME = 9\n</code></pre> For more information (for instance about what <code>None</code> or <code>\"unlimited\"</code> mean) see https://sourceware.org/gdb/current/onlinedocs/gdb.html/Parameters-In-Python.html .</p>"},{"location":"contributing/adding-a-parameter/#enum_sequence","title":"enum_sequence","text":"<p>If the <code>param_class</code> is set to <code>pwndbg.lib.config.PARAM_ENUM</code> then the <code>enum_sequence</code> argument must be supplied as well. It should constitute an array of legal values. GDB and (our) LLDB (driver) won't allow setting the parameter to any other value. The legal values will be automatically displayed at the end of <code>help_docstring</code> as previously shown.</p> <p>If it isn't immediately obvious what the enum values do, explain them in <code>help_docstring</code> using same format that <code>gdb-workaround-stop-event</code> uses.</p>"},{"location":"contributing/adding-a-parameter/#scope","title":"scope","text":"<p>The <code>scope</code> argument has the default value of <code>pwndbg.lib.config.Scope.config</code> and is used to group parameters. The legal values are: <pre><code>class Scope(Enum):\n # If you want to add another scope here, don't forget to add\n # a command which prints it!\n config = 1\n theme = 2\n heap = 3\n</code></pre> The parameters of each scope are printed using a different command. The <code>config</code> scope is printed with <code>config</code>, the <code>heap</code> scope is printed with <code>heap-config</code> and the <code>theme</code> scope is printed with <code>theme</code>. The <code>config</code> and <code>theme</code> scopes also have corresponding <code>configfile</code> and <code>themefile</code> commands which export the values of all the parameters from those scopes.</p>"},{"location":"contributing/adding-a-parameter/#the-theme-scope","title":"The <code>theme</code> scope","text":"<p>You should never directly pass this scope to <code>pwndbg.config.add_param</code>. Instead use the <code>pwndbg.color.theme.add_param</code> and <code>pwndbg.color.theme.add_color_param</code> wrapper commands like this: <pre><code># pwndbg/aglib/nearpc.py\nnearpc_branch_marker = pwndbg.color.theme.add_param(\n \"nearpc-branch-marker\", \" \u2193\", \"branch marker line for nearpc command\"\n)\n</code></pre> <pre><code># pwndbg/color/context.py\nconfig_highlight_color = theme.add_color_param(\n \"highlight-color\", \"green,bold\", \"color added to highlights like source/pc\"\n)\n</code></pre></p>"},{"location":"contributing/adding-a-parameter/#using-the-parameter-in-code","title":"Using the parameter in code","text":"<p>Usually when a parameter is defined its value is also set to a variable, for instance <code>gdb_workaround_stop_event = ...</code> in the initial example. This isn't necessary, as all registered parameters are available as <code>pwndbg.config.&lt;parameter_name_except_with_underscores&gt;</code> so in our example, we could also access the <code>gdb-workaround-stop-event</code> parameter as <code>pwndbg.config.gdb_workaround_stop_event</code>.</p> <p>That being said, defining the variable can reduce code verbosity: <pre><code># pwndbg/aglib/godbg.py\nline_width = pwndbg.config.add_param(\n \"go-dump-line-width\", 80, \"the soft line width for go-dump pretty printing\"\n)\n</code></pre> Since the variable is scoped to the <code>godbg.py</code> file, its name can be short, and we don't have to write <code>pwndbg.config.go_dump_line_width</code> every time.</p>"},{"location":"contributing/adding-a-parameter/#using-color-parameters","title":"Using color parameters","text":"<p>Note that the <code>theme.add_color_param()</code> function returns a <code>ColorParameter</code> object instead of a <code>Parameter</code>. The parameter should be used via its <code>color_function()</code> method: <pre><code># pwndbg/aglib/godbg.py\ndef fmt_debug(self, val: str, default: str = \"\") -&gt; str:\n if self.debug:\n return debug_color.color_function(val)\n else:\n return default\n</code></pre> Though you will also see <code>generateColorFunction(debug_color)(val)</code> being used in the code to the same effect.</p>"},{"location":"contributing/dev-notes/","title":"Developer Notes","text":""},{"location":"contributing/dev-notes/#random-developer-notes","title":"Random developer notes","text":"<p>Feel free to update the list below!</p> <ul> <li> <p>If you want to play with Pwndbg functions under GDB, you can always use GDB's <code>pi</code> which launches python interpreter or just <code>py &lt;some python line&gt;</code>.</p> </li> <li> <p>If you want to do the same in LLDB, you should type <code>lldb</code>, followed by <code>script</code>, which brings up an interactive Python REPL. Don't forget to <code>import pwndbg</code>!</p> </li> <li> <p>Do not access debugger-specific functionality - eg. anything that uses the <code>gdb</code>, <code>lldb</code>, or <code>gdblib</code> modules - from outside the proper module in <code>pwndbg.dbg</code>.</p> </li> <li> <p>Use <code>aglib</code> instead of <code>gdblib</code>, as the latter is in the process of being removed. Both modules should have nearly identical interfaces, so doing this should be a matter of typing <code>pwndbg.aglib.X</code> instead of <code>pwndbg.gdblib.X</code>. Ideally, an issue should be opened if there is any functionality present in <code>gdblib</code> that's missing from <code>aglib</code>.</p> </li> <li> <p>We have our own <code>pwndbg.config.Parameter</code> - read about it in Adding a Configuration Option.</p> </li> <li> <p>The dashboard/display/context we are displaying is done by <code>pwndbg/commands/context.py</code> which is invoked through GDB's and LLDB's prompt hook, which are defined, respectively, in <code>pwndbg/gdblib/prompt.py</code> as <code>prompt_hook_on_stop</code>, and in <code>pwndb/dbg/lldb/hooks.py</code> as <code>prompt_hook</code>.</p> </li> <li> <p>We change a bit GDB settings - this can be seen in <code>pwndbg/dbg/gdb.py</code> under <code>GDB.setup</code> - there are also imports for all Pwndbg submodules.</p> </li> <li> <p>Pwndbg has its own event system, and thanks to it we can set up code to be invoked in response to them. The event types and the conditions in which they occurr are defined and documented in the <code>EventType</code> enum, and functions are registered to be called on events with the <code>@pwndbg.dbg.event_handler</code> decorator. Both the enum and the decorator are documented in <code>pwndbg/dbg/__init__.py</code>.</p> </li> <li> <p>We have a caching mechanism (\"memoization\") which we use through Python's decorators - those are defined in <code>pwndbg/lib/cache.py</code> - just check its usages</p> </li> <li> <p>To block a function before the first prompt was displayed use the <code>pwndbg.decorators.only_after_first_prompt</code> decorator.</p> </li> <li> <p>Memory accesses should be done through <code>pwndbg/aglib/memory.py</code> functions.</p> </li> <li> <p>Process properties can be retrieved thanks to <code>pwndbg/aglib/proc.py</code> - e.g. using <code>pwndbg.aglib.proc.pid</code> will give us current process pid</p> </li> <li> <p>We have a wrapper for handling exceptions that are thrown by commands - defined in <code>pwndbg/exception.py</code> - current approach seems to work fine - by using <code>set exception-verbose on</code> - we get a stacktrace. If we want to debug stuff we can always do <code>set exception-debugger on</code>.</p> </li> <li> <p>Some of Pwndbg's functionality require us to have an instance of <code>pwndbg.dbg.Value</code> - the problem with that is that there is no way to define our own types in either GDB or LLDB - we have to ask the debugger if it detected a particular type in this particular binary (that sucks). We do that in <code>pwndbg/aglib/typeinfo.py</code> and it works most of the time. The known bug with that is that it might not work properly for Golang binaries compiled with debugging symbols.</p> </li> </ul>"},{"location":"contributing/dev-notes/#support-for-multiple-debuggers","title":"Support for Multiple Debuggers","text":"<p>Pwndbg is a tool that supports multiple debuggers, and so using debugger-specific functionality outside of <code>pwndbg.dbg.X</code> is generally discouraged, with one imporant caveat, that we will get into later. When adding code to Pwndbg, one must be careful with the functionality being used.</p>"},{"location":"contributing/dev-notes/#the-debugger-api","title":"The Debugger API","text":"<p>Our support for multiple debuggers is primarily achieved through use of the Debugger API, found under <code>pwndbg/dbg/</code>, which defines a terse set of debugging primitives that can then be built upon by the rest of Pwndbg. It comprises two parts: the interface, and the implementations. The interface contains the abstract classes and the types that lay out the \"shape\" of the functionality that may be used by the rest of Pwndbg, and the implementations, well, implement the interface on top of each supported debugger.</p> <p>As a matter of clarity, it makes sense to think of the Debugger API as a debugger-agnostic version of the <code>lldb</code> and <code>gdb</code> Python modules. Compared to both modules, it is much closer in spirit to <code>lldb</code> than to <code>gdb</code>.</p> <p>It is important to note that a lot of care must be exercised when adding things to the Debugger API, as one must always add implementations for all supported debuggers of whatever new functionality is being added, even if only to properly gate off debuggers in which the functionality is not supported. Additionally, it is important to keep the Debugger API interfaces as terse as possible in order to reduce code duplication. As a rule of thumb, if all the implementations of an interface are expected to share code, that interface is probably better suited for <code>aglib</code>, and it should be further broken down into its primitives, which can then be added to the Debugger API.</p> <p>Some examples of debugging primitives are memory reads, memory writes, memory map acquisition, symbol lookup, register reads and writes, and execution frames. These are all things that one can find in both the GDB and LLDB APIs.</p> <p>The entry point for the Debugger API is <code>pwndbg.dbg</code>, though most process-related methods are accessed through a <code>Process</code> object. Unless you really know what you're doing, you're going to want to use the objected yielded by <code>pwndbg.dbg.selected_inferior()</code> for this.</p>"},{"location":"contributing/dev-notes/#aglib","title":"<code>aglib</code>","text":"<p>Along with the Debugger API, there is also <code>aglib</code>, found under <code>pwndbg/aglib/</code>, in which lives functionality that is both too broad for a single command, and that can be shared between multiple debuggers. Things like QEMU handling, ELF and dynamic section parsing, operating system functionality, disassembly with capstone, heap analysis, and more, all belong in <code>aglib</code>.</p> <p>In order to facilitate the process of porting Pwndbg to the debugger-agnostic interfaces, and also because of its historical roots, <code>aglib</code> is intended to export the exact same functionality provided by <code>gdblib</code>, but on top of a debugger-agnostic foundation.</p> <p>If it helps, one may think of <code>aglib</code> like a <code>pwndbglib</code>. It takes the debugging primitives provided by the Debugger API and builds the more complex and interesting bits of functionality found in Pwndbg on top of them.</p>"},{"location":"contributing/dev-notes/#mappings-from-gdb-and-lldb-to-the-debugger-api","title":"Mappings from GDB and LLDB to the Debugger API","text":"<p>Here are some things one may want to do, along with how they can be achieved in the GDB, LLDB, and Pwndbg Debugger APIs.</p> GDBLLDBDebugger API <p>Setting a breakpoint at an address: <pre><code>gdb.Breakpoint(\"*&lt;address&gt;\")\n</code></pre> Querying for the address of a symbol: <pre><code>int(gdb.lookup_symbol(&lt;name&gt;).value().address)\n</code></pre> Setting a watchpoint at an address: <pre><code>gdb.Breakpoint(f\"(char[{&lt;size&gt;}])*{&lt;address&gt;}\", gdb.BP_WATCHPOINT)\n</code></pre></p> <p>Setting a breakpoint at an address: <pre><code>lldb.target.BreakpointCreateByAddress(&lt;address&gt;)\n</code></pre> Querying for the address of a symbol: <pre><code>lldb.target.FindSymbols(&lt;name&gt;).GetContextAtIndex(0).symbol.GetStartAddress().GetLoadAddress(lldb.target)\n</code></pre> Setting a watchpoint at an address: <pre><code>lldb.target.WatchAddress(&lt;address&gt;, &lt;size&gt;, ...)\n</code></pre></p> <p><pre><code># Fetch a Process object on which we will operate.\ninf = pwndbg.dbg.selected_inferior()\n</code></pre> Setting a breakpoint at an address: <pre><code>inf.break_at(BreakpointLocation(&lt;address&gt;))\n</code></pre> Querying for the address of a symbol: <pre><code>inf.lookup_symbol(&lt;name&gt;)\n</code></pre> Setting a watchpoint at an address: <pre><code>inf.break_at(WatchpointLocation(&lt;address&gt;, &lt;size&gt;))\n</code></pre></p>"},{"location":"contributing/dev-notes/#exception-to-use-of-debugger-agnostic-interfaces","title":"Exception to use of Debugger-agnostic interfaces","text":"<p>Some commands might not make any sense outside the context of a single debugger. For these commands, it is generally okay to talk to the debugger directly. However, they must be properly marked as debugger-specific and their loading must be properly gated off behind the correct debugger. They should ideally be placed in a separate location from the rest of the commands in <code>pwndbg/commands/</code>.</p>"},{"location":"contributing/dev-notes/#porting-public-tools","title":"Porting public tools","text":"<p>If porting a public tool to Pwndbg, please make a point of crediting the original author. This can be added to CREDITS.md noting the original author/inspiration, and linking to the original tool/article. Also please be sure that the license of the original tool is suitable to porting into Pwndbg, such as MIT.</p>"},{"location":"contributing/dev-notes/#minimum-supported-versions","title":"Minimum Supported Versions","text":"<p>Our goal is to fully support all Ubuntu LTS releases that have not reached end-of-life, with support for other platforms on a best-effort basis. Currently that means all code should work on Ubuntu 22.04, and 24.04 with GDB 12.1 and later. This means that the minimum supported Python version is 3.10, and we cannot use any newer Python features unless those features are backported to this minimum version.</p> <p>Note that while all code should run without errors on these supported LTS versions, it's fine if older versions don't support all of the features of newer versions, as long as this is handled correctly and this information is shown to the user. For example, we may make use of some GDB APIs in newer versions that we aren't able to provide alternative implementations for in older versions, and so in these cases we should inform the user that the functionality can't be provided due to the version of GDB.</p> <p>The <code>lint.sh</code> script described in the previous section runs <code>vermin</code> to ensure that our code does not use any features that aren't supported on Python 3.10.</p>"},{"location":"contributing/improving-annotations/","title":"Improving Annotations","text":"<p>Alongside the disassembled instructions in the dashboard, Pwndbg also has the ability to display annotations - text that contains relevent information regarding the execution of the instruction. For example, on the x86 <code>MOV</code> instruction, we can display the concrete value that gets placed into the destination register. Likewise, we can indicate the results of mathematical operations and memory accesses. The annotation in question is always dependent on the exact instruction being annotated - we handle it in a case-by-case basis.</p> <p>The main hurdle in providing annotations is determining what each instruction does, getting the relevent CPU registers and memory that are accessed, and then resolving concrete values of the operands. We call the process of determining this information \"enhancement\", as we enhance the information provided natively by GDB.</p> <p>The Capstone Engine disassembly framework is used to statically determine information about instructions and their operands. Take the x86 instruction <code>sub rax, rdx</code>. Given the raw bytes of the machine instructions, Capstone creates an object that provides an API that, among many things, exposes the names of the operands and the fact that they are both 8-byte wide registers. It provides all the information necessary to describe each operand. It also tells the general 'group' that a instruction belongs to, like if its a JUMP-like instruction, a RET, or a CALL. These groups are architecture agnostic.</p> <p>However, the Capstone Engine doesn't fill in concrete values that those registers take on. It has no way of knowing the value in <code>rdx</code>, nor can it actually read from memory.</p> <p>To determine the actual values that the operands take on, and to determine the results of executing an instruction, we use the Unicorn Engine, a CPU emulator framework. The emulator has its own internal CPU register set and memory pages that mirror that of the host process, and it can execute instructions to mutate its internal state. Note that the Unicorn Engine cannot execute syscalls - it doesn't have knowledge of a kernel.</p> <p>We have the ability to single-step the emulator - tell it to execute the instruction at the program counter inside the emulator. After doing so, we can inspect the state of the emulator - read from its registers and memory. The Unicorn Engine itself doesn't expose information regarding what each instruction is doing - what is the instruction (is it an <code>add</code>, <code>mov</code>, <code>push</code>?) and what registers/memory locations is it reading to and writing from? - which is why we use the Capstone engine to statically determine this information.</p> <p>Using what we know about the instruction based on the Capstone engine - such as that it was a <code>sub</code> instruction and <code>rax</code> was written to - we query the emulator after stepping in to determine the results of the instruction.</p> <p>We also read the program counter from the emulator to determine jumps and so we can display the instructions that will actually be executed, as opposed to displaying the instructions that follow consecutively in memory.</p>"},{"location":"contributing/improving-annotations/#enhancing","title":"Enhancing","text":"<p>Everytime the inferior process stops (and when the <code>disasm</code> context section is displayed), we display the next handful of assembly instructions in the dashboard so the user can understand where the process is headed. The exact amount is determined by the <code>context-disasm-lines</code> setting.</p> <p>We will be enhancing the instruction at the current program counter, as well as all the future instructions that are displayed. The end result of enhancement is that we get a list of <code>PwndbgInstruction</code> objects, each encapsulating relevent information regarding the instructions execution.</p> <p>When the process stops, we instantiate the emulator from scratch. We copy all the registers from the host process into the emulator. For performance purposes, we register a handler to the Unicorn Engine to lazily map memory pages from the host to the emulator when they are accessed (a page fault from within the emulator), instead of immediately copying all the memory from the host to the emulator.</p> <p>The enhancement is broken into a couple stops:</p> <ol> <li>First, we resolve the values of all the operands of the instruction before stepping the emulator. This means we read values from registers and dereference memory depending on the operand type. This gives us the values of operands before the instruction executes.</li> <li>Then, we step the emulator, executing a single instruction.</li> <li>We resolve the values of all operands again, giving us the <code>after_value</code> of each operand.</li> <li>Then, we enhance the \"condition\" field of PwndbgInstructions, where we determine if the instruction is conditional (conditional branch or conditional mov are common) and if the action is taken.</li> <li>We then determine the <code>next</code> and <code>target</code> fields of PwndbgInstructions. <code>next</code> is the address that the program counter will take on after using the GDB command <code>nexti</code>, and <code>target</code> indicates the target address of branch/jump/PC-changing instructions.</li> <li>With all this information determined, we now effectively have a big switch statement, matching on the instruction type, where we set the <code>annotation</code> string value, which is the text that will be printed alongside the instruction in question.</li> </ol> <p>We go through the enhancement process for the instruction at the program counter and then ensuing handful of instructions that are shown in the dashboard.</p>"},{"location":"contributing/improving-annotations/#when-to-use-emulation-reasoning-about-process-state","title":"When to use emulation / reasoning about process state","text":"<p>In general, the code aims to be organized in a way as to allow as many features as possible even in the absence of emulation. If there is information that can be determined statically, then we try to expose it as an alternative to emulation. This is so we can display annotations even when the Unicorn Engine is disabled. For example, say we come to a stop, and are faced with enhancing the following three instructions in the dashboard:</p> <pre><code>1. lea rax, [rip + 0xd55]\n2. &gt; mov rsi, rax # The host process program counter is here\n3. mov rax, rsi\n</code></pre> <p>Instruction 1, the <code>lea</code> instruction, is already in the past - we pull our enhanced PwndbgInstruction for it from a cache.</p> <p>Instruction 2, the first <code>mov</code> instruction, is where the host process program counter is at. If we did <code>stepi</code> in GDB, this instruction would be executed. In this case, there is two ways we can determine the value that gets written to <code>rsi</code>.</p> <ol> <li>After stepping the emulator, read from the emulators <code>rsi</code> register.</li> <li>Given the context of the instruction, we know the value in <code>rsi</code> will come from <code>rax</code>. We can just read the <code>rax</code> register from the host. This avoids emulation.</li> </ol> <p>The decision on which option to take is implemented in the annotation handler for the specific instruction. When possible, we have a preference for the second option, because it makes the annotations work even when emulation is off.</p> <p>The reason we could do the second option, in this case, is because we could reason about the process state at the time this instruction would execute. This instruction is about to be executed (<code>Program PC == instruction.address</code>). We can safely read from <code>rax</code> from the host, knowing that the value we get is the true value it takes on when the instruction will execute. It must - there are no instructions in-between that could have mutated <code>rax</code>.</p> <p>However, this will not be the case while enhancing instruction 3 while we are paused at instruction 2. This instruction is in the future, and without emulation, we cannot safely reason about the operands in question. It is reading from <code>rsi</code>, which might be mutated from the current value that <code>rsi</code> has in the stopped process (and in this case, we happen to know that it will be mutated). We must use emulation to determine the <code>before_value</code> of <code>rsi</code> in this case, and can't just read from the host processes register set. This principle applies in general - future instructions must be emulated to be fully annotated. When emulation is disable, the annotations are not as detailed since we can't fully reason about process state for future instructions.</p>"},{"location":"contributing/improving-annotations/#what-if-the-emulator-fails","title":"What if the emulator fails?","text":"<p>It is possible for the emulator to fail to execute an instruction - either due to a restrictions in the engine itself, or the instruction inside segfaults and cannot continue. If the Unicorn Engine fails, there is no real way we can recover. When this happens, we simply stop emulating for the current step, and we try again the next time the process stops when we instantiate the emulator from scratch again.</p>"},{"location":"contributing/improving-annotations/#caching-annotations","title":"Caching annotations","text":"<p>When we are stepping through the emulator, we want to remember the annotations of the past couple instructions. We don't want to <code>nexti</code>, and suddenly have the annotation of the previously executed instruction deleted. At the same time, we also never want stale annotations that might result from coming back to point in the program to which we have stepped before, such as the middle of a loop via a breakpoint.</p> <p>New annotations are only created when the process stops, and we create annotations for next handful of instructions to be executed. If we <code>continue</code> in GDB and stop at a breakpoint, we don't want annotations to appear behind the PC that are from a previous time we were near the location in question. To avoid stale annotations while still remembering them when stepping, we have a simple caching method:</p> <p>While we are doing our enhancement, we create a list containing the addresses of the future instructions that are displayed.</p> <p>For example, say we have the following instructions with the first number being the memory address:</p> <pre><code> 0x555555556259 &lt;main+553&gt; lea rax, [rsp + 0x90]\n 0x555555556261 &lt;main+561&gt; mov edi, 1 EDI =&gt; 1\n 0x555555556266 &lt;main+566&gt; mov rsi, rax\n 0x555555556269 &lt;main+569&gt; mov qword ptr [rsp + 0x78], rax\n 0x55555555626e &lt;main+574&gt; call qword ptr [rip + 0x6d6c] &lt;fstat64&gt;\n\n \u25ba 0x555555556274 &lt;main+580&gt; mov edx, 5 EDX =&gt; 5\n 0x555555556279 &lt;main+585&gt; lea rsi, [rip + 0x3f30] RSI =&gt; 0x55555555a1b0 \u25c2\u2014 'standard output'\n 0x555555556280 &lt;main+592&gt; test eax, eax\n 0x555555556282 &lt;main+594&gt; js main+3784 &lt;main+3784&gt;\n\n 0x555555556288 &lt;main+600&gt; mov rsi, qword ptr [rsp + 0xc8]\n 0x555555556290 &lt;main+608&gt; mov edi, dword ptr [rsp + 0xa8]\n</code></pre> <p>In this case, our <code>next_addresses_cache</code> would be <code>[0x555555556279, 0x555555556280, 0x555555556282, 0x555555556288, 0x555555556290]</code>.</p> <p>Then, the next time our program comes to a stop (after using <code>si</code>, <code>n</code>, or any GDB command that continues the process), we immediately check if the current program counter is in this list. If it is, then we can infer that the annotations are still valid, as the program has only executed a couple instructions. In all other cases, we delete our cache of annotated instructions.</p> <p>We might think \"why not just check if it's the next address - 0x555555556279 in this case? Why a list of the next couple addresses?\". This is because when source code is available, <code>step</code> and <code>next</code> often skip a couple instructions. It would be jarring to remove the annotations in this case. Likewise, this method has the added benefit that if we stop somewhere, and there happens to be a breakpoint only a couple instructions in front of us that we <code>continue</code> to, then previous couple annotations won't be wiped.</p>"},{"location":"contributing/improving-annotations/#other-random-annotation-details","title":"Other random annotation details","text":"<ul> <li>We don't emulate through CALL instructions. This is because the function might be very long.</li> <li>We resolve symbols during the enhancement stage for operand values.</li> <li>The folder <code>pwndbg/aglib/disasm</code> contains the code for enhancement. It follows an object-oriented model, with <code>arch.py</code> implementing the parent class with shared functionality, and the per-architecture implementations are implemented as subclasses in their own files.</li> <li><code>pwndbg/aglib/nearpc.py</code> is responsible for getting the list of enhanced PwndbgInstruction objects and converting them to the output seen in the 'disasm' view of the dashboard.</li> </ul>"},{"location":"contributing/improving-annotations/#adding-or-fixing-annotations","title":"Adding or fixing annotations","text":"<p>We annotate on an instruction-by-instruction basis. Effectively, imagine a giant <code>switch</code> statement that selects the correct handler to create an annotation based on the specific instruction. Many instruction types can be grouped and annotated using the same logic, such as <code>load</code>, <code>store</code>, and <code>arithmetic</code> instructions.</p> <p>See <code>pwndbg/aglib/disasm/aarch64.py</code> as an example. We define sets that group instructions using the unique Capstone ID for each instruction, and inside the constructor of <code>DisassemblyAssistant</code> we have a mapping of instructions to a specific handler. The <code>_set_annotation_string</code> function will match the instruction to the correct handler, which set the <code>instruction.annotation</code> field.</p> <p>If there is a bug in an annotation, the first order of business is finding its annotation handler. To track down where we are handling the instruction, you can search for its Capstone constant. For example, the RISC-V store byte instruction, <code>sb</code>, is represented as the Capstone constant <code>RISCV_INS_SB</code>. Or, if you are looking for the handler for the AArch64 instruction SUB, you can search the disasm code for <code>_INS_SUB</code> to find where we reference the appropriate Capstone constant for the instruction and following the code to the function that ultimately sets the annotation.</p> <p>If an annotation is causing a crash, is it most likely due to a handler making an incorrect assumption on the number of operands, leading to a <code>list index out of range</code> error. One possible source of this is that a given instruction has multiple different disassembly representations. Take the RISC-V <code>JALR</code> instruction. It can be represented in 3 ways:</p> <pre><code>jalr rs1 # return register is implied as ra, and imm is implied as 0\njalr rs1, imm # return register is implied as ra\njalr rd, rs1, imm\n</code></pre> <p>Capstone will expose the most \"simplified\" one possible, and the underlying list of register operands will change. If the handler doesn't take these different options into account, and rather assumes that <code>jalr</code> always has 3 operands, then an index error can occur if the handler accesses <code>instruction.operands[2]</code>.</p>"},{"location":"contributing/improving-annotations/#bug-root-cause","title":"Bug root cause","text":"<p>When encountering an instruction that is behaving strangely (incorrect annotation, or there is a jump target when one shouldn't exist, or the target is incorrect), there are a couple routine things to check.</p> <p>1. Use the <code>dev-dump-instruction</code> command to print all the enhancement information. With no arguments, it will dump the info from the instruction at the current address. If given an address, it will pull from the instruction cache at the corresponding location.</p> <p>If the issue is not related to branches, check the operands and the resolved values for registers and memory accesses. Verify that the values are correct - are the resolved memory locations correct? Step past the instruction and use instructions like <code>telescope</code> and <code>regs</code> to read memory and verify if the claim that the annotation is making is correct. For things like memory operands, you can try to look around the resolved memory location in memory to see the actual value that the instruction dereferenced, and see if the resolved memory location is simply off by a couple bytes.</p> <p>Example output of dumping a <code>mov</code> instruction:</p> <pre><code>mov qword ptr [rsp], rsi at 0x55555555706c (size=4) (arch: x86)\n ID: 460, mov\n Raw asm: mov qword ptr [rsp], rsi\n New asm: mov qword ptr [rsp], rsi\n Next: 0x555555557070\n Target: 0x555555557070, Target string=, const=None\n Condition: UNDETERMINED\n Groups: []\n Annotation: [0x7fffffffe000] =&gt; 0x7fffffffe248 \u2014\u25b8 0x7fffffffe618 \u25c2\u2014 '/usr/bin/ls'\n Operands: [['[0x7fffffffe000]': Symbol: None, Before: 0x7fffffffe000, After: 0x7fffffffe000, type=CS_OP_MEM, size=8, access=CS_AC_WRITE]] ['RSI': Symbol: None, Before: 0x7fffffffe248, After: 0x7fffffffe248, type=CS_OP_REG, size=8, access=CS_AC_READ]]]\n Conditional jump: False. Taken: False\n Unconditional jump: False\n Declare unconditional: None\n Can change PC: False\n Syscall: N/A\n Causes Delay slot: False\n Split: NO_SPLIT\n Call-like: False\n</code></pre> <p>2. Use the Capstone disassembler to verify the number of operands the instruction groups.</p> <p>Taken the raw instruction bytes and pass them to <code>cstool</code> to see the information that we are working with:</p> <pre><code>cstool -d mips 0x0400000c\n</code></pre> <p>The number of operands may not match the visual appearance. You might also check the instruction groups, and verify that an instruction that we might consider a <code>call</code> has the Capstone <code>call</code> group. Capstone is not 100% correct in every single case in all architectures, so it's good to verify. Report a bug to Capstone if there appears to be an error, and in the meanwhile we can create a fix in Pwndbg to work around the current behavior.</p> <p>3. Check the state of the emulator.</p> <p>Go to pwndbg/emu/emulator.py and uncomment the <code>DEBUG = -1</code> line. This will enable verbose debug printing. The emulator will print it's current <code>pc</code> at every step, and indicate important events, like memory mappings. Likewise, in pwndbg/aglib/disasm/arch.py you can set <code>DEBUG_ENHANCEMENT = True</code> to print register accesses to verify they are sane values.</p> <p>Potential bugs:</p> <ul> <li>A register is 0 (may also be the source of a Unicorn segfault if used as a memory operand) - often means we are not copying the host processes register into the emulator. By default, we map register by name - if in Pwndbg, it's called <code>rax</code>, then we find the UC constant named <code>U.x86_const.UC_X86_REG_RAX</code>. Sometimes, this default mapping doesn't work, sometimes do to differences in underscores (<code>FSBASE</code> vs <code>FS_BASE</code>). In these cases, we have to manually add the mapping.</li> <li>Unexpected crash - the instruction at hand might require a 'coprocessor', or some information that is unavailable to Unicorn (it's QEMU under the hood).</li> <li>Instructions are just no executing - we've seen this in the case of Arm Thumb instructions. There might be some specific API/way to invoke the emulator that is required for a certain processor state.</li> </ul>"},{"location":"contributing/improving-annotations/#creating-small-cross-architecture-programs","title":"Creating small cross-architecture programs","text":"<p>If you are encountering a strange behavior with a certain instruction or scenario in a non-native-architecture program, you can use some great functions from <code>pwntools</code> to handle the compilation and debugging. This is a great way to create a small reproducible example to isolate an issue.</p> <p>The following Python program, when run from inside a <code>tmux</code> session, will take some AArch64 assembly, compile it, and run it with GDB attached in a new <code>tmux</code> pane. It will search your system for the appropriate cross compiler for the architecture at hand, and run the compiled binary with QEMU.</p> <pre><code>from pwn import *\n\ncontext.arch = \"aarch64\"\n\nAARCH64_GRACEFUL_EXIT = \"\"\"\nmov x0, 0\nmov x8, 93\nsvc 0\n\"\"\"\n\nout = make_elf_from_assembly(STORE)\n# Debug info\nprint(out)\ngdb.debug(out)\n\npause()\n</code></pre>"},{"location":"contributing/making-a-gif/","title":"Making a Pwndbg gif","text":""},{"location":"contributing/making-a-gif/#the-rundown","title":"The rundown","text":"<p>If you wish to make a gif of your terminal while using Pwndbg (usually to add an example of some command/workflow to the website) you should use charmbracelet/vhs. This ensures a consistent look to the gifs throughout the documentation, makes them easily updateable when UI changes are made, and just makes them more easily reproducable and modifiable in general.</p> <p>Note</p> <p>Here \"gif\" really means \"a video that loops\", in practice it is better to use <code>.webm</code> with <code>.mp4</code> as a fallback because they are better optimized file formats.</p> <p>The workflow to creating a gif is simple. Start a recording: <pre><code>vhs record &gt; my_thingy.tape\n</code></pre> Whatever you now do in the terminal will be \"recorded\" to the <code>my_thingy.tape</code> file. Exit the shell to save the recording. The tape probably isn't ready to use as-is. You will want to add some metadata and fixup some lines.</p> Example <p>This is the tape used to generate the gif at https://pwndbg.re/dev/commands/context/context/ : <pre><code># https://github.com/charmbracelet/vhs\n\nOutput pwndbg.mp4\nOutput pwndbg.webm\n\nSet FontSize 24\nSet Width 1920\nSet Height 1080\nSet TypingSpeed 100ms\n\nSleep 1s\nType \"pwndbg /bin/sh\"\nEnter\nSleep 2s\nType \"start\"\nEnter\nSleep 3s\nType \"stepsyscall\"\nSleep 3s\nEnter 1\nSleep 3s\nType \"up\"\nSleep 1s\nEnter 1\nSleep 1s\nType \"up\"\nSleep 1s\nEnter 1\nSleep 1s\nType \"up\"\nSleep 1s\nEnter 1\nSleep 1s\nType \"context\"\nSleep 4s\nEnter 1\nSleep 7s\nType \"down\"\nSleep 1s\nEnter 1\nSleep 1s\nType \"ctx\"\nSleep 4s\nEnter 1\nSleep 7s\n</code></pre></p> <p>You may now run <pre><code>vhs my_thingy.tape\n</code></pre> and it will generate a gif with the filename you specified in the tape (the <code>Output</code> line in the example).</p> <p>Make sure to commit the <code>.tape</code> file along with the gif.</p>"},{"location":"contributing/making-a-gif/#recording-in-docker","title":"Recording in Docker","text":"<p>If the setup for the gif is not highly involved, you may want to use a Dockerfile to generate the gif to ensure reproducability (or if wish to make sure your environment variables aren't visible during the debugging session). Here is a sample Dockerfile you can modify to your liking: <pre><code># https://github.com/charmbracelet/vhs\nFROM ghcr.io/charmbracelet/vhs\n\n# Install Pwndbg\nRUN apt update &amp;&amp; apt install -y git \\\n &amp;&amp; git clone https://github.com/pwndbg/pwndbg.git /pwndbg \\\n &amp;&amp; cd /pwndbg \\\n &amp;&amp; ./setup.sh\n\n# Create a pwndbg executable in PATH so we can run with\n# `pwndbg /bin/sh`.\nRUN echo '#!/bin/sh\\ngdb --quiet \"$@\"' &gt; /usr/local/bin/pwndbg \\\n &amp;&amp; chmod +x /usr/local/bin/pwndbg\n\n# Make sure uv.lock.hash is created so we don't get\n# a message about updating during the gif.\nRUN gdb /bin/sh --batch\n\n# The ENTRYPOINT and CMD are defined in the vhs docker image.\n</code></pre> you can use a script like this to run it easily. <pre><code>#!/bin/sh\n\nset -e\n\nIMAGE_NAME=\"vhs-pwndbg\"\n\nrm -f .gdb_history\ndocker build -t \"$IMAGE_NAME\" .\ndocker run --rm -v \"$(pwd)\":/vhs \"$IMAGE_NAME\" my_thingy.tape\n</code></pre></p>"},{"location":"contributing/setup-pwndbg-dev/","title":"Setup Pwndbg for Development","text":""},{"location":"contributing/setup-pwndbg-dev/#installing-pwndbg-from-source","title":"Installing Pwndbg from source","text":"<p>Run the following: <pre><code>git clone https://github.com/pwndbg/pwndbg\ncd pwndbg\n./setup.sh\n</code></pre> Officially supported is Ubuntu 22.04 and later, but the setup script also supports the following distributions:</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>Tip</p> <p>If you have an older ubuntu version you may still use Pwndbg:</p> <ul> <li>for Ubuntu 20.04 use the 2024.08.29 release</li> <li>for Ubuntu 18.04 use the 2023.07.17: ubuntu18.04-final release</li> </ul> <p>however if you wish to contribute, it is recommended you upgrade your distribution.</p>"},{"location":"contributing/setup-pwndbg-dev/#running-with-gdb","title":"Running with GDB","text":"<p>Pwndbg requires GDB 12.1 or later. If the GDB version your distro provides is too old, build GDB from source: <pre><code>sudo apt install libgmp-dev libmpfr-dev libreadline-dev texinfo # required by build\ngit clone git://sourceware.org/git/binutils-gdb.git\nmkdir gdb-build\ncd gdb-build\n../binutils-gdb/configure --enable-option-checking --disable-nls --disable-werror --with-system-readline --with-python=$(which python3) --with-system-gdbinit=/etc/gdb/gdbinit --enable-targets=all --disable-binutils --disable-ld --disable-gold --disable-gas --disable-sim --disable-gprof\nmake -j $(nproc)\n</code></pre> Since the <code>./setup.sh</code> script made it so you source Pwndbg from your <code>~/.gdbinit</code>, Pwndbg will start up automatically any time you run <code>gdb</code>.</p>"},{"location":"contributing/setup-pwndbg-dev/#running-with-lldb","title":"Running with LLDB","text":"<p>Pwndbg requires LLDB 19 or later. You can get it like this on Ubuntu 24.04: <pre><code>sudo apt install -y lldb-19 liblldb-19-dev\n</code></pre> but it will be added to your PATH as <code>lldb-19</code> so you should either alias it or export it in your shell: <pre><code>export PATH=/usr/lib/llvm-19/bin/:$PATH\n</code></pre> so you can invoke it as <code>lldb</code>. Also export this environment variable: <pre><code>export LLDB_DEBUGSERVER_PATH=/usr/lib/llvm-19/bin/lldb-server\n</code></pre> Pwndbg doesn't use the <code>lldb</code> driver binary directly, it drives its own REPL and interacts with LLDB through liblldb. You can run Pwndbg with LLDB by running: <pre><code>uv run pwndbg-lldb [binary-to-debug]\n</code></pre></p>"},{"location":"contributing/setup-pwndbg-dev/#the-development-environment","title":"The development environment","text":"<p>After installing Pwndbg like described above, there are a few ways to set up the development environment. The simplest one is by running: <pre><code>./setup-dev.sh\n</code></pre> but you can also use the docker container or develop using nix.</p> <p>Note</p> <p>For a proper development environment you must be able to run Pwndbg with both GDB and LLDB, otherwise you won't be able to use some important development features (like doc generation).</p>"},{"location":"contributing/setup-pwndbg-dev/#development-from-docker","title":"Development from docker","text":"<p>You can create a Docker image with everything already installed for you. You can use docker compose <pre><code>docker compose run -i main\n</code></pre> or build and run the container with <pre><code>docker build -t pwndbg .\ndocker run -it --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v `pwd`:/pwndbg pwndbg bash\n</code></pre></p>"},{"location":"contributing/setup-pwndbg-dev/#development-using-nix","title":"Development using Nix","text":"<p>Pwndbg supports development with Nix which installs all the required development dependencies:</p> <ol> <li>Install Nix with Determinate Nix Installer.</li> <li>Enter the development shell with <code>nix develop</code> or automate this with <code>direnv</code>.</li> <li>Run local changes with <code>pwndbg</code> or <code>pwndbg-lldb</code>. Run tests with <code>./tests.sh</code>.</li> </ol>"},{"location":"contributing/writing-tests/","title":"Writing Tests","text":""},{"location":"contributing/writing-tests/#overview","title":"Overview","text":"<p>Note</p> <p>This is written under the assumption you already know how to run the tests.</p> <p>In Pwndbg we have four types of tests: extensive x86_64 GDB tests, cross-architecture tests, linux kernel tests and unit-tests. They are all located in subdirectories of <code>./tests</code>.</p> <p>The x86_64 tests encompass most of the Pwndbg testing suite. If your tests do not belong in any of the other categories, they should go here. Since we do not yet perform testing on LLDB, these are run from inside GDB and are located in the <code>./tests/library/gdb</code> directory. They can be run with <code>./tests.sh -d gdb -g gdb</code>.</p> <p>The cross-architecture tests are run using qemu-user emulation. They test architecture-specific logic and are located in the <code>./tests/library/qemu-user</code> directory. They can be run with <code>./tests.sh -d gdb -g cross-arch-user</code>.</p> <p>The linux kernel tests are run using qemu-system emulation. They are located in the <code>./tests/library/qemu_system</code> directory and run for a variety kernel configurations and architectures.</p> <p>The unit tests are not run from within a debugger, but rather directly with pytest. They are located in the <code>./tests/unit_tests/</code> directory.</p> <p>Here are the options supported by <code>./tests.sh</code> which you can get by running <code>./tests.sh -h</code>. <pre><code>usage: tests.py [-h] -g {gdb,dbg,cross-arch-user} -d {gdb} [-p] [-c] [-v] [-s] [--nix] [--collect-only] [test_name_filter]\n\nRun tests.\n\npositional arguments:\n test_name_filter run only tests that match the regex\n\noptions:\n -h, --help show this help message and exit\n -g {gdb,dbg,cross-arch-user}, --group {gdb,dbg,cross-arch-user}\n -d {gdb}, --driver {gdb}\n -p, --pdb enable pdb (Python debugger) post mortem debugger on failed tests\n -c, --cov enable codecov\n -v, --verbose display all test output instead of just failing test output\n -s, --serial run tests one at a time instead of in parallel\n --nix run tests using built for nix environment\n --collect-only only show the output of test collection, don't run any tests\n</code></pre></p>"},{"location":"contributing/writing-tests/#writing-tests_1","title":"Writing tests","text":"<p>Each test is a Python function that runs inside of an isolated GDB session. Using a <code>pytest</code> fixture at the beginning of each test, GDB will attach to a <code>binary</code> or connect to a <code>QEMU instance</code>. Each test runs some commands and uses Python <code>assert</code> statements to verify correctness. We can access Pwndbg library code like <code>pwndbg.aglib.regs.rsp</code> as well as execute GDB commands with <code>gdb.execute()</code>.</p> <p>We can take a look at <code>tests/library/gdb/tests/test_symbol.py</code> for an example of a simple test. Looking at a simplified version of the top-level code, we have this:</p> <pre><code>import gdb\nimport pwndbg\nimport tests\n\nBINARY = tests.get_binary(\"symbol_1600_and_752.out\")\n</code></pre> <p>Since these tests run inside GDB, we can import the <code>gdb</code> Python library. We also import the <code>tests</code> module, which makes it easy to get the path to the test binaries located in <code>tests/gdb-tests/tests/binaries</code>. You should be able to reuse the binaries in this folder for most tests, but if not feel free to add a new one.</p> <p>Here's a small snippet of the actual test:</p> <pre><code>def test_hexdump(start_binary):\n start_binary(BINARY)\n pwndbg.config.hexdump_group_width.value = -1\n\n gdb.execute(\"set hexdump-byte-separator\")\n stack_addr = pwndbg.aglib.regs.rsp - 0x100\n</code></pre> <p><code>pytest</code> will run any function that starts with <code>test_</code> as a new test, so there is no need to register your new test anywhere. The <code>start_binary</code> argument is a function that will run the binary you give it, and it will set some common options before starting the binary. Using <code>start_binary</code> is recommended if you don't need any additional customization to GDB settings before starting the binary, but if you do it's fine to not use it.</p>"},{"location":"contributing/writing-tests/#qemu-tests","title":"QEMU Tests","text":"<p>Our <code>gdb</code> tests run in x86. To debug other architectures, we use QEMU for emulation and attach to its debug port. These tests are located in <code>tests/library/qemu-user/tests</code>. Test creation is identical to our x86 tests - create a Python function with a Pytest fixture name as the parameter (it matches based on the name), and call the argument to start debugging a binary. The <code>qemu_assembly_run</code> fixture takes in a Python string of assembly code, compiles it in the appropriate architecture, and runs it - no need to create an external file or edit a Makefile.</p>"},{"location":"functions/","title":"Index","text":""},{"location":"functions/#functions","title":"Functions","text":"<p>Pwndbg provides a set of functions which can be used during expression evaluation to quickly perform common calculations. These can even be passed to other commands as arguments. Currently, they only work in gdb.</p> <p>To see a list of all functions, including those built into GDB, use <code>help function</code>. To see the help of any given function use <code>help function function_name</code>. Function invocation must include a preceding $ sign and must include brackets. For instance, invoke the <code>environ</code> function like so: <pre><code>pwndbg&gt; p $environ(\"LANG\")\n$2 = (signed char *) 0x7fffffffe6da \"LANG=en_US.UTF-8\"\n</code></pre> If the result of the function is being passed to a Pwndbg command, make sure to either escape the function argument's quotes, or put the whole function call in quotes. <pre><code>pwndbg&gt; tele $environ(\"LANG\")\nusage: telescope [-h] [-r] [-f] [-i] [address] [count]\ntelescope: error: argument address: debugger couldn't resolve argument '$environ(LANG)':\n No symbol \"LANG\" in current context.\npwndbg&gt; tele $environ(\\\"LANG\\\")\n00:0000\u2502 0x7fffffffe6cf \u25c2\u2014 'LANG=en_US.UTF-8'\n01:0008\u2502 0x7fffffffe6d7 \u25c2\u2014 'US.UTF-8'\n02:0010\u2502 0x7fffffffe6df \u25c2\u2014 0x4e49475542454400\n[...]\npwndbg&gt; tele '$environ(\"LANG\")'\n00:0000\u2502 0x7fffffffe6cf \u25c2\u2014 'LANG=en_US.UTF-8'\n01:0008\u2502 0x7fffffffe6d7 \u25c2\u2014 'US.UTF-8'\n02:0010\u2502 0x7fffffffe6df \u25c2\u2014 0x4e49475542454400\n[...]\n</code></pre></p>"},{"location":"functions/#pwndbg-functions","title":"Pwndbg functions","text":""},{"location":"functions/#argc","title":"argc","text":"<pre><code>argc() -&gt; int\n</code></pre> <p>Get the number of program arguments. Evaluates to argc.</p>"},{"location":"functions/#example","title":"Example","text":"<pre><code>pwndbg&gt; p $argc()\n$1 = 2\npwndbg&gt; argv\n00:0000\u2502 0x7fffffffe288 \u2014\u25b8 0x7fffffffe659 \u25c2\u2014 '/usr/bin/cat'\n01:0008\u2502 0x7fffffffe290 \u2014\u25b8 0x7fffffffe666 \u25c2\u2014 'gdbinit.py'\n02:0010\u2502 0x7fffffffe298 \u25c2\u2014 0\n</code></pre>"},{"location":"functions/#argv","title":"argv","text":"<pre><code>argv(index: gdb.Value) -&gt; gdb.Value\n</code></pre> <p>Get the n-th program argument. Evaluate argv on the supplied value.</p>"},{"location":"functions/#example_1","title":"Example","text":"<pre><code>pwndbg&gt; p $argv(0)\n$11 = (signed char *) 0x7fffffffe666 \"/usr/bin/sh\"\npwndbg&gt; argv\n00:0000\u2502 0x7fffffffe2a8 \u2014\u25b8 0x7fffffffe666 \u25c2\u2014 '/usr/bin/sh'\n01:0008\u2502 0x7fffffffe2b0 \u25c2\u2014 0\n</code></pre>"},{"location":"functions/#base","title":"base","text":"<pre><code>base(name_pattern: gdb.Value | str)\n</code></pre> <p>Return the base address of the first memory mapping containing the given name.</p>"},{"location":"functions/#example_2","title":"Example","text":"<pre><code>pwndbg&gt; p/x $base(\"libc\")\n$4 = 0x7ffff7d4b000\npwndbg&gt; vmmap libc\n 0x7ffff7d4a000 0x7ffff7d4b000 rw-p 1000 6e000 /usr/lib/libncursesw.so.6.5\n\u25ba 0x7ffff7d4b000 0x7ffff7d6f000 r--p 24000 0 /usr/lib/libc.so.6\n\u25ba 0x7ffff7d6f000 0x7ffff7ed6000 r-xp 167000 24000 /usr/lib/libc.so.6\n\u25ba 0x7ffff7ed6000 0x7ffff7f2b000 r--p 55000 18b000 /usr/lib/libc.so.6\n\u25ba 0x7ffff7f2b000 0x7ffff7f2f000 r--p 4000 1e0000 /usr/lib/libc.so.6\n\u25ba 0x7ffff7f2f000 0x7ffff7f31000 rw-p 2000 1e4000 /usr/lib/libc.so.6\n 0x7ffff7f31000 0x7ffff7f39000 rw-p 8000 0 [anon_7ffff7f31]\npwndbg&gt; tele $base(\\\"libc\\\")+0x1337\n00:0000\u2502 0x7ffff7d4c337 \u25c2\u2014 0x80480a04214000f0\n01:0008\u2502 0x7ffff7d4c33f \u25c2\u2014 0x8040c02204452040\n02:0010\u2502 0x7ffff7d4c347 \u25c2\u2014 0x20042400000200\n03:0018\u2502 0x7ffff7d4c34f \u25c2\u2014 0x20 /* ' ' */\n[...]\n</code></pre> <p>Beware of accidentally matching the wrong mapping. For instance, if the loaded executable contained the string \"libc\" anywhere in it's path, it would've been returned.</p>"},{"location":"functions/#bn_eval","title":"bn_eval","text":"<pre><code>bn_eval(expr: gdb.Value) -&gt; int | None\n</code></pre> <p>Parse and evaluate a Binary Ninja expression.</p> <p>Read more about binary ninja expressions here: https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.parse_expression</p> <p>All registers in the current register set are available as magic variables (e.g. $rip). The $piebase magic variable is also included, with the computed executable base.</p> <p>This function cannot see stack local variables.</p>"},{"location":"functions/#example_3","title":"Example","text":"<pre><code>pwndbg&gt; set integration-provider binja\nPwndbg successfully connected to Binary Ninja (4.2.6455 Personal) xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'binja'.\npwndbg&gt; p/x $bn_eval(\"10+20\")\n$6 = 0x30\npwndbg&gt; p/x $bn_eval(\"main\")\n$7 = 0x1645\npwndbg&gt; p/x $rebase($bn_eval(\"main\"))\n$8 = 0x555555555645\npwndbg&gt; p some_global_var\nNo symbol \"some_global_var\" in current context.\npwndbg&gt; p/x $rebase($bn_eval(\"some_global_var+$rax\"))\n$9 = 0x5555555586b8\npwndbg&gt; p $rebase($bn_eval(\"some_global_var+$rax\")) == $bn_sym(\"some_global_var\") + $rax\n$10 = 1\npwndbg&gt; p $bn_eval(\"$piebase+some_global_var+$rax\") == $bn_sym(\"some_global_var\") + $rax\n$11 = 1\n</code></pre>"},{"location":"functions/#bn_sym","title":"bn_sym","text":"<pre><code>bn_sym(name_val: gdb.Value) -&gt; int | None\n</code></pre> <p>Lookup a symbol's address by name from Binary Ninja.</p> <p>This function sees symbols like functions and global variables, but not stack local variables, use <code>bn_var</code> for that.</p>"},{"location":"functions/#example_4","title":"Example","text":"<pre><code>pwndbg&gt; set integration-provider binja\nPwndbg successfully connected to Binary Ninja (4.2.6455 Personal) xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'binja'.\npwndbg&gt; p main\nNo symbol \"main\" in current context.\npwndbg&gt; p/x $bn_sym(\"main\")\n$2 = 0x555555555645\npwndbg&gt; b *($bn_sym(\"main\"))\nBreakpoint 1 at 0x555555555645\n</code></pre>"},{"location":"functions/#bn_var","title":"bn_var","text":"<pre><code>bn_var(name_val: gdb.Value) -&gt; int | None\n</code></pre> <p>Lookup a stack variable's address by name from Binary Ninja.</p> <p>This function doesn't see functions or global variables, use <code>bn_sym</code> for that.</p>"},{"location":"functions/#example_5","title":"Example","text":"<pre><code>pwndbg&gt; set integration-provider binja\nPwndbg successfully connected to Binary Ninja (4.2.6455 Personal) xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'binja'.\npwndbg&gt; p user_choice\nNo symbol \"user_choice\" in current context.\npwndbg&gt; p/x $bn_var(\"user_choice\")\n$4 = 0x7fffffffe118\npwndbg&gt; vmmap $4\n 0x7ffff7ffe000 0x7ffff7fff000 rw-p 1000 0 [anon_7ffff7ffe]\n\u25ba 0x7ffffffde000 0x7ffffffff000 rw-p 21000 0 [stack] +0x20118\npwndbg&gt; p/x $bn_var(\"main\")\nTypeError: Could not convert Python object: None.\nError while executing Python code.\n</code></pre>"},{"location":"functions/#environ","title":"environ","text":"<pre><code>environ(env_name: gdb.Value) -&gt; gdb.Value\n</code></pre> <p>Get an environment variable by name. Evaluate getenv() on the supplied value.</p>"},{"location":"functions/#example_6","title":"Example","text":"<pre><code>pwndbg&gt; p $environ(\"LANG\")\n$2 = (signed char *) 0x7fffffffebfb \"LANG=en_US.UTF-8\"\n</code></pre>"},{"location":"functions/#envp","title":"envp","text":"<pre><code>envp(index: gdb.Value) -&gt; gdb.Value\n</code></pre> <p>Get the n-th environment variable. Evaluate envp on the supplied value.</p>"},{"location":"functions/#example_7","title":"Example","text":"<pre><code>pwndbg&gt; p $envp(0x3F)\n$13 = (signed char *) 0x7fffffffef7d \"LANG=en_US.UTF-8\"\npwndbg&gt; p $envp(0x3F) == $environ(\"LANG\")\n$14 = 1\n</code></pre>"},{"location":"functions/#fsbase","title":"fsbase","text":"<pre><code>fsbase(offset: gdb.Value = gdb.Value(0)) -&gt; int\n</code></pre> <p>Get the value of the FS segment register. Only valid on x86(-64).</p>"},{"location":"functions/#example_8","title":"Example","text":"<p><pre><code>pwndbg&gt; p/x $fsbase()\n$3 = 0x7ffff7cdab80\npwndbg&gt; p $fs_base == $fsbase()\n$4 = 1\npwndbg&gt; x/gx $fsbase(0x28)\n0x7ffff7cdaba8: 0x4da926e1668e5a00\npwndbg&gt; x/gx $fsbase(0x30)\n0x7ffff7cdabb0: 0x190a86d93bccf0ad\npwndbg&gt; tls\nThread Local Storage (TLS) base: 0x7ffff7cdab80\nTLS is located at:\n 0x7ffff7cda000 0x7ffff7cdc000 rw-p 2000 0 [anon_7ffff7cda]\nDumping the address:\ntcbhead_t @ 0x7ffff7cdab80\n 0x00007ffff7cdab80 +0x0000 tcb : 0x7ffff7cdab80\n 0x00007ffff7cdab88 +0x0008 dtv : 0x7ffff7cdb4f0\n 0x00007ffff7cdab90 +0x0010 self : 0x7ffff7cdab80\n 0x00007ffff7cdab98 +0x0018 multiple_threads : 0x0\n 0x00007ffff7cdab9c +0x001c gscope_flag : 0x0\n 0x00007ffff7cdaba0 +0x0020 sysinfo : 0x0\n 0x00007ffff7cdaba8 +0x0028 stack_guard : 0x4da926e1668e5a00\n 0x00007ffff7cdabb0 +0x0030 pointer_guard : 0x190a86d93bccf0ad\n [...]\npwndbg&gt; canary\n[...]\nCanary = 0x4da926e1668e5a00 (may be incorrect on != glibc)\n[...]\n</code></pre> FS will usually point to the start of the TLS. If you're not providing an offset, it is usually easier to use GDB's builtin $fs_base variable.</p>"},{"location":"functions/#gsbase","title":"gsbase","text":"<pre><code>gsbase(offset: gdb.Value = gdb.Value(0)) -&gt; int\n</code></pre> <p>Get the value of the GS segment register. Only valid on x86(-64).</p>"},{"location":"functions/#example_9","title":"Example","text":"<p><pre><code>pwndbg&gt; p/x $gsbase()\n$1 = 0x0\n</code></pre> The value of the GS register is more interesting when doing kernel debugging: <pre><code>pwndbg&gt; p/x $gsbase()\n$1 = 0xffff999287a00000\npwndbg&gt; tele $gsbase()\n00:0000\u2502 0xffff999287a00000 \u25c2\u2014 0\n... \u2193 4 skipped\n05:0028\u2502 0xffff999287a00028 \u25c2\u2014 0xd6aa9b336d52a400\n06:0030\u2502 0xffff999287a00030 \u25c2\u2014 0\n07:0038\u2502 0xffff999287a00038 \u25c2\u2014 0\npwndbg&gt; p $gsbase() == $gs_base\n$2 = 1\n</code></pre> If you're not providing an offset, it is usually easier to use GDB's builtin $gs_base variable.</p>"},{"location":"functions/#hex2ptr","title":"hex2ptr","text":"<pre><code>hex2ptr(hex_string: gdb.Value | str) -&gt; int\n</code></pre> <p>Converts a hex string to a little-endian address and returns the address.</p>"},{"location":"functions/#example_10","title":"Example","text":"<pre><code>pwndbg&gt; p/x $hex2ptr(\"20 74 ed f7 ff 7f\")\n$1 = 0x7ffff7ed7420\npwndbg&gt; p/x $hex2ptr(\"2074edf7ff7f\")\n$2 = 0x7ffff7ed7420\npwndbg&gt; distance '$base(\"libc\")' '$hex2ptr(\"20 74 ed f7 ff 7f\")'\n0x7ffff7d4b000-&gt;0x7ffff7ed7420 is 0x18c420 bytes (0x31884 words)\n</code></pre> <p>Especially useful for quickly converting pwntools output.</p>"},{"location":"functions/#ida","title":"ida","text":"<pre><code>ida(name: gdb.Value) -&gt; int\n</code></pre> <p>Lookup a symbol's address by name from IDA. Evaluate ida.LocByName() on the supplied value.</p> <p>This functions doesn't see stack local variables.</p>"},{"location":"functions/#example_11","title":"Example","text":"<pre><code>pwndbg&gt; set integration-provider ida\nPwndbg successfully connected to Ida Pro xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'ida'.\npwndbg&gt; p main\nNo symbol \"main\" in current context.\npwndbg&gt; p/x $ida(\"main\")\n$1 = 0x555555555645\npwndbg&gt; b *$ida(\"main\")\nBreakpoint 2 at 0x555555555645\n</code></pre>"},{"location":"functions/#rebase","title":"rebase","text":"<pre><code>rebase(addr: gdb.Value | int) -&gt; int\n</code></pre> <p>Return address rebased onto the executable's mappings.</p>"},{"location":"functions/#example_12","title":"Example","text":"<pre><code>pwndbg&gt; p/x $rebase(0xd9020)\n$1 = 0x55555562d020\npwndbg&gt; vmmap\n0x555555554000 0x55555556f000 r--p 1b000 0 /usr/bin/bash\n0x55555556f000 0x55555562d000 r-xp be000 1b000 /usr/bin/bash\n0x55555562d000 0x55555565e000 r--p 31000 d9000 /usr/bin/bash\n[...]\npwndbg&gt; p $rebase(0xd9020) == 0x555555554000 + 0xd9020\n$2 = 1\npwndbg&gt; tele $rebase(0xd9020)\n00:0000\u2502 0x55555562d020 \u25c2\u2014 0x204900636f6c6c61 /* 'alloc' */\n01:0008\u2502 0x55555562d028 \u25c2\u2014 'have no name!'\n02:0010\u2502 0x55555562d030 \u25c2\u2014 0x65720021656d616e /* 'name!' */\n03:0018\u2502 0x55555562d038 \u25c2\u2014 'adline stdin'\n[...]\n</code></pre>"},{"location":"tutorials/env-vars/","title":"Env vars","text":""},{"location":"tutorials/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>NO_COLOR</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":"tutorials/gdb-lldb-commands/","title":"GDB vs LLDB","text":"<p>For users who are migrating from one debugger to another, here is a table comparison of some of the most common actions and how to do them in GDB and LLDB. Note that both debuggers offer shorthands for typing these commands.</p> Functionality GDB Command LLDB Command Start Debugging Program <code>gdb ./your-program</code> <code>lldb ./your-program</code> Set a Breakpoint <code>break &lt;function-name&gt;</code> <code>breakpoint set --name &lt;function-name&gt;</code> Set Breakpoint on Address <code>break *&lt;address&gt;</code> <code>breakpoint set --address &lt;address&gt;</code> Set Breakpoint at Line <code>break &lt;filename&gt;:&lt;line-number&gt;</code> <code>breakpoint set --file &lt;filename&gt; --line &lt;line-number&gt;</code> Set Hardware Breakpoint <code>hbreak &lt;function-name&gt;</code> <code>breakpoint set --hardware --name &lt;function-name&gt;</code> Set Hardware Breakpoint at Memory <code>hbreak *&lt;memory-address&gt;</code> <code>breakpoint set --hardware --address &lt;memory-address&gt;</code> List All Breakpoints <code>info breakpoints</code> <code>breakpoint list</code> Delete Breakpoints <code>delete &lt;breakpoint-number&gt;</code> <code>breakpoint delete &lt;breakpoint-number&gt;</code> Set Watchpoint <code>watch &lt;variable&gt;</code> <code>watchpoint set variable &lt;variable&gt;</code> Set Conditional Breakpoint <code>break &lt;function-name&gt; if &lt;condition&gt;</code> <code>breakpoint set --condition \"&lt;condition&gt;\"</code> Continue Execution <code>continue</code> <code>process continue</code> Next Instruction <code>next</code> <code>thread step-over</code> Step into a Function <code>step</code> <code>thread step-in</code> Step out of a Function <code>finish</code> <code>thread step-out</code> Print Threads <code>info threads</code> <code>thread list</code> Select Thread <code>thread &lt;thread-id&gt;</code> <code>thread select &lt;thread-id&gt;</code> Print Register Values <code>info registers</code> <code>register read -a</code> Print a Variable <code>print &lt;variable&gt;</code> <code>print &lt;variable&gt;</code> Display Variable on Every Stop <code>display &lt;variable&gt;</code> <code>expression --watch &lt;variable&gt;</code> Examine Memory (Hex) <code>x/&lt;num&gt;x &lt;memory-address&gt;</code> <code>memory read --format x --count &lt;num&gt; &lt;memory-address&gt;</code> Examine Memory (Integer) <code>x/&lt;num&gt;d &lt;memory-address&gt;</code> <code>memory read --format d --count &lt;num&gt; &lt;memory-address&gt;</code> Inspect Stack Trace <code>backtrace</code> <code>thread backtrace</code> Change Register Value <code>set $&lt;register-name&gt; = &lt;value&gt;</code> <code>register write &lt;register-name&gt; &lt;value&gt;</code> Check Program Status <code>info locals</code> <code>frame variable</code> Check Program Info <code>info functions</code> <code>image lookup --functions</code> Show Disassembly of Function <code>disas &lt;function-name&gt;</code> <code>disassemble &lt;function-name&gt;</code> Memory Dump (Hex) <code>x/&lt;num&gt;xh &lt;memory-address&gt;</code> <code>memory read --format x --count &lt;num&gt; &lt;memory-address&gt;</code> Memory Dump (Bytes) <code>x/&lt;num&gt;bx &lt;memory-address&gt;</code> <code>memory read --format b --count &lt;num&gt; &lt;memory-address&gt;</code> Show Process Information <code>info process</code> <code>process status</code> Quit Debugging <code>quit</code> <code>quit</code> Run Program with Arguments <code>run &lt;arg1&gt; &lt;arg2&gt; ...</code> <code>process launch -- &lt;arg1&gt; &lt;arg2&gt; ...</code> Show Current Function <code>info frame</code> <code>frame info</code> Set Sysroot <code>set sysroot &lt;path-to-sysroot&gt;</code> <code>settings set target.sysroot &lt;path-to-sysroot&gt;</code> Set Source Directory <code>directory &lt;path-to-source-directory&gt;</code> <code>settings set target.source-map &lt;remote-path&gt; &lt;local-path&gt;</code> Set Architecture <code>set architecture &lt;arch&gt;</code> <code>target create --arch &lt;arch&gt; &lt;executable-file&gt;</code> Show Settings <code>show &lt;setting-name&gt;</code> <code>settings show &lt;setting-name&gt;</code> Set File for Debugging <code>file &lt;executable-file&gt;</code> <code>target create &lt;executable-file&gt;</code> Start the Program at the First Instruction <code>starti</code> <code>process launch --stop-at-entry</code> Enable ASLR <code>set disable-randomization off</code> <code>settings set target.disable-aslr false</code>"},{"location":"tutorials/gdb-tui/","title":"GDB TUI","text":"<p>The context sections are available as native GDB TUI windows named <code>pwndbg_[sectionname]</code>. There are some predefined layouts coming with Pwndbg which you can select using <code>layout pwndbg</code> or <code>layout pwndbg_code</code>.</p> <p>Use <code>focus cmd</code> to focus the command window and have the arrow keys scroll through the command history again. <code>tui disable</code> to disable TUI mode and go back to CLI mode when running commands with longer output. <code>ctrl-x + a</code> toggles between TUI and CLI mode quickly. Hold shift to ignore the TUI mouse integration and use the mouse normally to select text or copy data.</p> <p>To create your own layout and selecting it use normal <code>tui new-layout</code> syntax like: <pre><code>tui new-layout pwndbg_custom {-horizontal { { -horizontal { pwndbg_code 1 pwndbg_disasm 1 } 2 { {-horizontal pwndbg_legend 8 pwndbg_control 2 } 0 pwndbg_regs 1 pwndbg_stack 1 } 3 } 7 cmd 3 } 3 { pwndbg_backtrace 2 pwndbg_expressions 2 pwndbg_threads 1 } 1 } 1 status 1\nlayout pwndbg_custom\n</code></pre></p>"},{"location":"tutorials/go-debugging/","title":"Debugging Go with Pwndbg","text":""},{"location":"tutorials/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:</p> <ul> <li>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</li> <li>Misc types: <code>bool</code>, <code>rune</code>, <code>uintptr</code>, <code>string</code></li> <li>Floating point types: <code>float32</code>, <code>float64</code></li> <li>Complex numbers: <code>complex64</code>, <code>complex128</code></li> <li>Interface types: <code>any</code> for <code>interface{}</code> (the empty interface), and <code>interface</code> for all non-empty interfaces</li> <li>Function types: <code>funcptr</code> for all function types</li> <li>Pointers: <code>*ELEM</code></li> <li>Slices: <code>[]ELEM</code></li> <li>Arrays: <code>[LEN]ELEM</code></li> <li>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)</li> </ul> <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&gt; go-dump map[string]int 0xc0000b20f0\n{\"a\": 1, \"b\": 2, \"c\": 3}\n\npwndbg&gt; go-dump any 0xc0000ace40\n([]struct { a int; b string }) [struct {a: 1, b: \"first\"}, struct {a: 2, b: \"second\"}]\n\npwndbg&gt; 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":"tutorials/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&gt; 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&gt; go-dump 0x49fbc0 0xc000108120\nstruct {a: 1, b: \"first\"}\n</code></pre></p>"},{"location":"tutorials/packaging/","title":"Packaging Pwndbg","text":"<p>Previously, packagers were required to create a <code>.skip-venv</code> file if they wanted to make sure Pwndbg used system installed python packages. Also, they had to deal with the fact that Pwndbg was invoked from the <code>~/.gdbinit</code> file.</p> <p>As of version 2025.10.10, you don't need to worry about those problems anymore. The entrypoints to Pwndbg are the <code>pwndbg</code> and <code>pwndbg-lldb</code> commands as defined in the <code>[project.scripts]</code> section of the <code>pyproject.toml</code> file. The <code>.skip-venv</code> file is also not necessary as Pwndbg will detect that a virtual environment is not being used at runtime. The method you use to package any python package will just work with Pwndbg without any workarounds.</p> <p>Info</p> <p>If you're curious, the PR that introduced these changes is #3199. There is a general packaging thread in #3124. For reference, the Pwndbg package for Gentoo has been updated in this PR: gentoo/gentoo!44181.</p>"},{"location":"tutorials/pwndbg-users/","title":"Pwndbg in the wild","text":"<p>Here is a non-exhaustive list of Pwndbg mentions found in the wild. Feel free to open a PR to add more if you find them!</p>"},{"location":"tutorials/pwndbg-users/#talks","title":"Talks","text":"<ul> <li>EuroPython 2025 - Pwndbg: Low level debugging and exploit development with Python (slides, video)</li> <li>OffensiveCon24 - How to Fuzz Your Way to Android Universal Root: Attacking Android Binder - by Eugene Rodionov, Zi Fan Tan and Gulshan Singh</li> </ul>"},{"location":"tutorials/pwndbg-users/#blog-posts","title":"Blog posts","text":"<ul> <li>Oops Safari, I think You Spilled Something! @ Exodus Intelligence</li> <li>\u201cUnstripping\u201d binaries: Restoring debugging information in GDB with Pwndbg by Jason An @ Trail of Bits</li> <li>A Winter\u2019s Tale: Improving messages and types in GDB\u2019s Python API by Matheus Branco Borella @ Trail of Bits</li> <li>Patch-gapping Google Chrome @ Exodus Intelligence</li> <li>Inspecting rdtsc with pwndbg by John Shaughnessy</li> </ul>"},{"location":"tutorials/pwndbg-users/#videos","title":"Videos","text":"<ul> <li>Intro to pwndbg - CTF Cookbook by SloppyJoePirates CTF Writeups</li> <li>Intro to Binary Exploitation (Pwn) by CryptoCat</li> <li>Bug A Day #8 - pwndbg #2 by Bug-A-Day</li> </ul>"},{"location":"tutorials/pwndbg-users/#scripts","title":"Scripts","text":"<ul> <li>CVE-2022-24834 exploit by ptr-yudai</li> </ul>"},{"location":"tutorials/pwndbg-users/#magazine-articles","title":"Magazine articles","text":"<ul> <li>\"Programista\" polish programming magazine - Low level debugging with Pwndbg (in polish)</li> </ul>"},{"location":"tutorials/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":"tutorials/pycharm-debugging/#configuring-the-debugging-server","title":"Configuring the debugging server","text":"<p>Select <code>Run -&gt; 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":"tutorials/pycharm-debugging/#configuring-pwndbg","title":"Configuring Pwndbg","text":"<ul> <li>Select <code>Run -&gt; Edit Configurations</code> and install the packages described in that window.</li> <li><code>pip install pydevd-pycharm~=&lt;your_pycharm_version&gt;</code></li> <li>Add the following code somewhere where it will execute on GDB startup: <pre><code>import pydevd_pycharm\npydevd_pycharm.settrace('&lt;your_IP&gt;', port=&lt;port&gt;, stdoutToServer=True, stderrToServer=True)\n</code></pre></li> </ul>"},{"location":"tutorials/pycharm-debugging/#debugging","title":"Debugging","text":"<ol> <li>Start the debugging server in PyCharm</li> <li>Run Pwndbg</li> </ol>"},{"location":"tutorials/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":"tutorials/splitting-the-context/","title":"Splitting / Layouting Context","text":"<p>i.e. doing this: </p> <p>In Pwndbg, the context sections can be distributed among different tty by using the <code>contextoutput</code> command. Example: <pre><code>contextoutput stack /path/to/tty true\n</code></pre></p> <p>If you use a terminal or multiplexer that supports scripted pane splitting, you can write a Python script that will create the panes and distribute them to your liking whenever you start Pwndbg.</p> <p>For instance, for tmux, you could write something like this: <pre><code>python\nimport atexit\nimport os\nfrom pwndbg.commands.context import contextoutput, output, clear_screen\nbt = os.popen('tmux split-window -P -F \"#{pane_id}:#{pane_tty}\" -d \"cat -\"').read().strip().split(\":\")\nst = os.popen(F'tmux split-window -h -t {bt[0]} -P -F '+'\"#{pane_id}:#{pane_tty}\" -d \"cat -\"').read().strip().split(\":\")\nre = os.popen(F'tmux split-window -h -t {st[0]} -P -F '+'\"#{pane_id}:#{pane_tty}\" -d \"cat -\"').read().strip().split(\":\")\ndi = os.popen('tmux split-window -h -P -F \"#{pane_id}:#{pane_tty}\" -d \"cat -\"').read().strip().split(\":\")\npanes = dict(backtrace=bt, stack=st, regs=re, disasm=di)\nfor sec, p in panes.items():\n contextoutput(sec, p[1], True)\ncontextoutput(\"legend\", di[1], True)\natexit.register(lambda: [os.popen(F\"tmux kill-pane -t {p[0]}\").read() for p in panes.values()])\nend\n</code></pre> If you're using tmux specifically, you can use pwnmux as a prebuilt layout or splitmind to easily configure the layout you want.</p> <p>Example</p> <p>The above example uses splitmind and following configuration: <pre><code>python\nimport splitmind\n(splitmind.Mind()\n .tell_splitter(show_titles=True)\n .tell_splitter(set_title=\"Main\")\n .right(display=\"backtrace\", size=\"25%\")\n .above(of=\"main\", display=\"disasm\", size=\"80%\", banner=\"top\")\n .show(\"code\", on=\"disasm\", banner=\"none\")\n .right(cmd='tty; tail -f /dev/null', size=\"65%\", clearing=False)\n .tell_splitter(set_title='Input / Output')\n .above(display=\"stack\", size=\"75%\")\n .above(display=\"legend\", size=\"25\")\n .show(\"regs\", on=\"legend\")\n .below(of=\"backtrace\", cmd=\"ipython\", size=\"30%\")\n).build(nobanner=True)\nend\n</code></pre></p> <p>If you're using kitty, you may check out kittydbg for a prebuilt layout.</p>"},{"location":"tutorials/decompiler-integration/binja-integration/","title":"Binary Ninja","text":""},{"location":"tutorials/decompiler-integration/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":"tutorials/decompiler-integration/binja-integration/#setup","title":"Setup","text":"<p>Copy (or symlink) <code>binja_script.py</code> to your plugins directory.</p>"},{"location":"tutorials/decompiler-integration/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 &gt; pwndbg &gt; 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":"tutorials/decompiler-integration/binja-integration/#features","title":"Features","text":"<p>The integration currently syncs symbol names, comments, decompilation, function type signatures, and stack variables.</p>"},{"location":"tutorials/decompiler-integration/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":"tutorials/decompiler-integration/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":"tutorials/decompiler-integration/ghidra-integration/","title":"Ghidra","text":"<p>Unlike with IDA and Binary Ninja, Ghidra is not considered an \"integration provider\". You cannot synchronise your Ghidra reverse engineering progress to Pwndbg. You can however integrate Ghidra's decompiler into Pwndbg such that the decompiled version of any function you're in is shown in the Pwndbg context.</p> Example Screenshot <p></p> <p>To do this, we will need the help of radare2 or rizin.</p>"},{"location":"tutorials/decompiler-integration/ghidra-integration/#setup","title":"Setup","text":"rizinradare2 <ol> <li>Install rizin. It must be found by the debugger (within path).</li> <li>Install the Ghidra plugin for rizin: rz-ghidra.</li> <li>Install rzpipe and make sure the python used by the debugger can access it.</li> <li>Add <code>set r2decompiler rizin</code> to your <code>~/.gdbinit</code> after Pwndbg is sourced.</li> </ol> <p>Regarding the third step, if you don't install to your user or system-wide python (but rather a virtual environment), you may add something like this to the beginning of your <code>~/.gdbinit</code>: <pre><code>python\nimport sys\nimport os\nfrom glob import glob\n\nvenv = os.path.expanduser('~/tools/rizin/venv')\nsite_dir_pattern = os.path.join(venv, 'lib', 'python*/site-packages')\nsite_dirs = glob(site_dir_pattern)\nsys.path.insert(0, site_dirs[0])\nimport rzpipe\nend\n</code></pre></p> <ol> <li>Install radare2. It must be found by the debugger (within path).</li> <li>Install the Ghidra plugin for radare2: r2ghidra.</li> <li>Install r2pipe and make sure the python used by the debugger can access it.</li> <li>Add <code>set r2decompiler radare2</code> to your <code>~/.gdbinit</code> after Pwndbg is sourced.</li> </ol> <p>Regarding the third step, if you don't install to your user or system-wide python (but rather a virtual environment), you may add something like this to the beginning of your <code>~/.gdbinit</code>: <pre><code>python\nimport sys\nimport os\nfrom glob import glob\n\nvenv = os.path.expanduser('~/tools/radare2/venv')\nsite_dir_pattern = os.path.join(venv, 'lib', 'python*/site-packages')\nsite_dirs = glob(site_dir_pattern)\nsys.path.insert(0, site_dirs[0])\nimport r2pipe\nend\n</code></pre></p>"},{"location":"tutorials/decompiler-integration/ghidra-integration/#usage","title":"Usage","text":"<p>Append <code>set context-ghidra if-no-source</code> to your <code>~/.gdbinit</code>. You should be able to see the <code>[ GHIDRA DECOMPILE ]</code> context now right below your disassembly. If you want to temporarily enable/disable it or move around the context sections, see context-ghidra and contextoutput.</p> <p>Be warned, the first call to both radare2/r2ghidra and rizin/rz-ghidra are rather slow! Subsequent requests for decompiled source will be faster. And it does take up some resources as the radare2/rizin instance is kept by r2pipe/rzpipe to enable faster subsequent analysis.</p> <p>Remark: the plugin tries to guess the correct current line and mark it with \"\u2192\", but it might get it wrong.</p>"},{"location":"tutorials/decompiler-integration/ida-integration/","title":"IDA","text":""},{"location":"tutorials/decompiler-integration/ida-integration/#usage","title":"Usage","text":"<p>Open the same binary with Pwndbg and IDA. Then inside IDA go to <code>File &gt; Script file</code> and select the <code>ida_script.py</code> file from the Pwndbg root folder. This will start the XMLRPC server that Pwndbg queries for information.</p> <p>Inside the debugger, run <code>set integration-provider ida</code>. This will start the integration, you can run <code>set integration-provider none</code> to disable it.</p>"},{"location":"tutorials/decompiler-integration/ida-integration/#features","title":"Features","text":"<p>The integration will sync IDA's decompilation and show it in the context. You can query for symbols and stack variables using the <code>ida</code> function.</p>"},{"location":"tutorials/decompiler-integration/ida-integration/#debugger-control","title":"Debugger Control","text":"<p>To see an up-to-date list of things you can do regarding IDA integration, you may grep for <code>ida</code> like so: <pre><code>pwndbg&gt; pwndbg ida\nfind-fake-fast Find candidate fake fast or tcache chunks overlapping the specified address.\nsave-ida Save the ida database.\npwndbg&gt; config ida\nattachp-resolution-method how to determine the process to attach when multiple candidates exists 'ask'\nida-rpc-host ida xmlrpc server address '127.0.0.1'\nida-rpc-port ida xmlrpc server port 31337\nida-timeout time to wait for ida xmlrpc in seconds 2\npwndbg&gt; | help function | grep ida\nfunction ida -- Lookup a symbol's address by name from IDA.\n</code></pre> Note that you will see some false positives.</p> <p>You can use the <code>decomp</code> command to use IDA to decompile at an arbitrary address.</p>"},{"location":"reference/pwndbg/","title":"pwndbg","text":""},{"location":"reference/pwndbg/#pwndbg","title":"pwndbg","text":"<p>Modules:</p> <ul> <li> <code>aglib</code> \u2013 <p>Debugger-agnostic library that provides various functionality.</p> </li> <li> <code>arguments</code> \u2013 <p>Function and syscall argument formatting.</p> </li> <li> <code>auxv</code> \u2013 <p>Performs handling of the linux auxiliary vector.</p> </li> <li> <code>chain</code> \u2013 <p>Dereference and format pointer chains.</p> </li> <li> <code>color</code> \u2013 <p>Text colorizing and theme configuration logic.</p> </li> <li> <code>commands</code> \u2013 <p>Pwndbg command implementations.</p> </li> <li> <code>dbg</code> \u2013 <p>The abstracted debugger interface.</p> </li> <li> <code>decorators</code> \u2013 <p>Project-wide function decorators.</p> </li> <li> <code>emu</code> \u2013 <p>Emulation assistance from Unicorn.</p> </li> <li> <code>enhance</code> \u2013 <p>Attempt to describe the data at a memory address as best as possible.</p> </li> <li> <code>exception</code> \u2013 <p>Common exception handling.</p> </li> <li> <code>gdblib</code> \u2013 <p>Library for handling GDB logic. Being removed in favour of aglib.</p> </li> <li> <code>ghidra</code> \u2013 <p>Ghidra integration.</p> </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 <p>Decompiler integration.</p> </li> <li> <code>lib</code> \u2013 <p>Library for non-debugger-dependant functionality.</p> </li> <li> <code>log</code> \u2013 <p>Logging.</p> </li> <li> <code>profiling</code> \u2013 <p>Pwndbg profiling.</p> </li> <li> <code>radare2</code> \u2013 <p>Radare2 integration with r2pipe.</p> </li> <li> <code>rizin</code> \u2013 <p>Rizin integration with rzpipe.</p> </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 <p>Specific command output wrappers.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>config</code> (<code>Config</code>) \u2013 <p>The global configuration object.</p> </li> <li> <code>__version__</code> \u2013 <p>Pwndbg version.</p> </li> <li> <code>version</code> \u2013 <p>Pwndbg version.</p> </li> </ul>"},{"location":"reference/pwndbg/#pwndbg.config","title":"config <code>module-attribute</code>","text":"<pre><code>config: Config = Config()\n</code></pre> <p>The global configuration object.</p>"},{"location":"reference/pwndbg/#pwndbg.__version__","title":"__version__ <code>module-attribute</code>","text":"<pre><code>__version__ = __version__\n</code></pre> <p>Pwndbg version.</p>"},{"location":"reference/pwndbg/#pwndbg.version","title":"version <code>module-attribute</code>","text":"<pre><code>version = __version__\n</code></pre> <p>Pwndbg version.</p>"},{"location":"reference/pwndbg/aglib/","title":"aglib","text":""},{"location":"reference/pwndbg/aglib/#pwndbg.aglib","title":"aglib","text":"<p>Debugger-agnostic library that provides various functionality.</p> <p>Takes the debugging primitives provided by the Debugger API and builds the more complex and interesting bits of functionality found in Pwndbg on top of them.</p> <p>See https://pwndbg.re/dev/contributing/dev-notes/#aglib for more information.</p> <p>Modules:</p> <ul> <li> <code>arch</code> \u2013 </li> <li> <code>argv</code> \u2013 </li> <li> <code>asm</code> \u2013 </li> <li> <code>commpage</code> \u2013 </li> <li> <code>ctypes</code> \u2013 <p>On-the-fly endianness switching for ctypes structures.</p> </li> <li> <code>disasm</code> \u2013 </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>macho</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>objc</code> \u2013 <p>Apple Objective-C Runtime Support</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>saved_register_frames</code> \u2013 </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> <li> <code>set_arch</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/#pwndbg.aglib.set_arch","title":"set_arch","text":"<pre><code>set_arch(pwndbg_arch: PwndbgArchitecture)\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/","title":"arch","text":""},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch","title":"arch","text":"<p>Classes:</p> <ul> <li> <code>PwndbgArchitecture</code> \u2013 <p>This class defines the context of the currently debugged architecture as well as other related information of the platform.</p> </li> <li> <code>AMD64Arch</code> \u2013 </li> <li> <code>i386Arch</code> \u2013 <p>32-bit mode x86</p> </li> <li> <code>i8086Arch</code> \u2013 <p>16-bit mode x86</p> </li> <li> <code>ArmArch</code> \u2013 </li> <li> <code>ArmCortexArch</code> \u2013 <p>Cortex-M processors run the M-profile Arm architecture.</p> </li> <li> <code>AArch64Arch</code> \u2013 </li> <li> <code>PowerPCArch</code> \u2013 </li> <li> <code>SparcArch</code> \u2013 </li> <li> <code>RISCV32Arch</code> \u2013 </li> <li> <code>RISCV64Arch</code> \u2013 </li> <li> <code>MipsArch</code> \u2013 </li> <li> <code>Loongarch64Arch</code> \u2013 </li> <li> <code>S390xArch</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>register_arch</code> \u2013 </li> <li> <code>get_pwndbg_architecture</code> \u2013 </li> <li> <code>get_thumb_mode_string</code> \u2013 </li> <li> <code>update</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>EndianType</code> \u2013 </li> <li> <code>FMT_LITTLE_ENDIAN</code> \u2013 </li> <li> <code>FMT_BIG_ENDIAN</code> \u2013 </li> <li> <code>registered_architectures</code> (<code>dict[PWNDBG_SUPPORTED_ARCHITECTURES_TYPE, PwndbgArchitecture]</code>) \u2013 </li> <li> <code>all_arches</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.EndianType","title":"EndianType <code>module-attribute</code>","text":"<pre><code>EndianType = Literal['little', 'big']\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.FMT_LITTLE_ENDIAN","title":"FMT_LITTLE_ENDIAN <code>module-attribute</code>","text":"<pre><code>FMT_LITTLE_ENDIAN = {1: 'B', 2: '&lt;H', 4: '&lt;I', 8: '&lt;Q'}\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.FMT_BIG_ENDIAN","title":"FMT_BIG_ENDIAN <code>module-attribute</code>","text":"<pre><code>FMT_BIG_ENDIAN = {1: 'B', 2: '&gt;H', 4: '&gt;I', 8: '&gt;Q'}\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.registered_architectures","title":"registered_architectures <code>module-attribute</code>","text":"<pre><code>registered_architectures: dict[\n PWNDBG_SUPPORTED_ARCHITECTURES_TYPE, PwndbgArchitecture\n] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.all_arches","title":"all_arches <code>module-attribute</code>","text":"<pre><code>all_arches = [\n AMD64Arch(),\n i386Arch(),\n i8086Arch(),\n ArmArch(),\n ArmCortexArch(),\n AArch64Arch(),\n PowerPCArch(),\n SparcArch(),\n RISCV32Arch(),\n RISCV64Arch(),\n MipsArch(),\n Loongarch64Arch(),\n S390xArch(),\n]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture","title":"PwndbgArchitecture","text":"<pre><code>PwndbgArchitecture(name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE)\n</code></pre> <p> Bases: <code>ArchDefinition</code></p> <p>This class defines the context of the currently debugged architecture as well as other related information of the platform.</p> <p>This includes the following information: - Capstone/Unicorn constants - ABI information</p> <p>Methods:</p> <ul> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <li> <code>get_capstone_constants</code> \u2013 <p>Return tuple of (CAPSTONE ARCH, CAPSTONE MODE) used to instantiate the Capstone disassembler for this architecture.</p> </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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> (<code>int</code>) \u2013 </li> <li> <code>instruction_alignment</code> (<code>int</code>) \u2013 </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.max_instruction_size","title":"max_instruction_size <code>instance-attribute</code>","text":"<pre><code>max_instruction_size: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.instruction_alignment","title":"instruction_alignment <code>instance-attribute</code>","text":"<pre><code>instruction_alignment: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int] | None\n</code></pre> <p>Return tuple of (CAPSTONE ARCH, CAPSTONE MODE) used to instantiate the Capstone disassembler for this architecture.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PwndbgArchitecture.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.AMD64Arch","title":"AMD64Arch","text":"<pre><code>AMD64Arch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 16\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AMD64Arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.i386Arch","title":"i386Arch","text":"<pre><code>i386Arch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>32-bit mode x86</p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 16\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i386Arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.i8086Arch","title":"i8086Arch","text":"<pre><code>i8086Arch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>16-bit mode x86</p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 16\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.i8086Arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.ArmArch","title":"ArmArch","text":"<pre><code>ArmArch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>read_thumb_bit</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmArch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch","title":"ArmCortexArch","text":"<pre><code>ArmCortexArch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Cortex-M processors run the M-profile Arm architecture. This architecture is prevalent in bare-metal/embedded systems that lack operating systems. Only Thumb-2 instructions are supported, and the Thumb bit is always 1.</p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>read_thumb_bit</code> \u2013 <p>On Cortex-M processors, the Thumb bit is architecturally defined to be 1.</p> </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1]\n</code></pre> <p>On Cortex-M processors, the Thumb bit is architecturally defined to be 1.</p> <p>This is the (xpsr &gt;&gt; 24) &amp; 1, which is always 1.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.ArmCortexArch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch","title":"AArch64Arch","text":"<pre><code>AArch64Arch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.AArch64Arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.PowerPCArch","title":"PowerPCArch","text":"<pre><code>PowerPCArch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.PowerPCArch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.SparcArch","title":"SparcArch","text":"<pre><code>SparcArch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.SparcArch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.RISCV32Arch","title":"RISCV32Arch","text":"<pre><code>RISCV32Arch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 22\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV32Arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.RISCV64Arch","title":"RISCV64Arch","text":"<pre><code>RISCV64Arch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 22\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.RISCV64Arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.MipsArch","title":"MipsArch","text":"<pre><code>MipsArch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 8\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.MipsArch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.Loongarch64Arch","title":"Loongarch64Arch","text":"<pre><code>Loongarch64Arch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.Loongarch64Arch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.S390xArch","title":"S390xArch","text":"<pre><code>S390xArch()\n</code></pre> <p> Bases: <code>PwndbgArchitecture</code></p> <p>Methods:</p> <ul> <li> <code>get_capstone_constants</code> \u2013 </li> <li> <code>update</code> \u2013 <p>While debugging a process, certain aspects of the architecture can change.</p> </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> <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> </ul> <p>Attributes:</p> <ul> <li> <code>max_instruction_size</code> \u2013 </li> <li> <code>instruction_alignment</code> \u2013 </li> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>EndianType</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> <li> <code>ptrbits</code> (<code>int</code>) \u2013 <p>Pointer size in bits</p> </li> <li> <code>ptrmask</code> (<code>int</code>) \u2013 </li> <li> <code>function_abi</code> (<code>ABI | None</code>) \u2013 </li> <li> <code>syscall_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>sigreturn_abi</code> (<code>SyscallABI | None</code>) \u2013 </li> <li> <code>fmts</code> (<code>dict[int, str]</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.max_instruction_size","title":"max_instruction_size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>max_instruction_size = 6\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.instruction_alignment","title":"instruction_alignment <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>instruction_alignment = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = name\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: EndianType\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.attributes","title":"attributes <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.ptrbits","title":"ptrbits <code>instance-attribute</code>","text":"<pre><code>ptrbits: int\n</code></pre> <p>Pointer size in bits</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.ptrmask","title":"ptrmask <code>instance-attribute</code>","text":"<pre><code>ptrmask: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.function_abi","title":"function_abi <code>instance-attribute</code>","text":"<pre><code>function_abi: ABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.syscall_abi","title":"syscall_abi <code>instance-attribute</code>","text":"<pre><code>syscall_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.sigreturn_abi","title":"sigreturn_abi <code>instance-attribute</code>","text":"<pre><code>sigreturn_abi: SyscallABI | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.fmts","title":"fmts <code>instance-attribute</code>","text":"<pre><code>fmts: dict[int, str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.get_capstone_constants","title":"get_capstone_constants","text":"<pre><code>get_capstone_constants(address: int) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.update","title":"update","text":"<pre><code>update(arch_definition: ArchDefinition) -&gt; None\n</code></pre> <p>While debugging a process, certain aspects of the architecture can change.</p> <p>For example: - Some architectures can change endianness dynamically.</p>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.pack","title":"pack","text":"<pre><code>pack(integer: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.unpack","title":"unpack","text":"<pre><code>unpack(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.pack_size","title":"pack_size","text":"<pre><code>pack_size(integer: int, size: int) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.unpack_size","title":"unpack_size","text":"<pre><code>unpack_size(data: bytes, size: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.S390xArch.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit() -&gt; Literal[0, 1, 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.register_arch","title":"register_arch","text":"<pre><code>register_arch(arch: PwndbgArchitecture)\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.get_pwndbg_architecture","title":"get_pwndbg_architecture","text":"<pre><code>get_pwndbg_architecture(\n name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,\n) -&gt; PwndbgArchitecture | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.get_thumb_mode_string","title":"get_thumb_mode_string","text":"<pre><code>get_thumb_mode_string() -&gt; Literal['arm', 'thumb'] | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/arch/#pwndbg.aglib.arch.update","title":"update","text":"<pre><code>update() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.update_state","title":"update_state","text":"<pre><code>update_state() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.argc","title":"argc","text":"<pre><code>argc() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.argv","title":"argv","text":"<pre><code>argv(number: int) -&gt; Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.envc","title":"envc","text":"<pre><code>envc() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.envp","title":"envp","text":"<pre><code>envp(number: int) -&gt; Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/argv/#pwndbg.aglib.argv.environ","title":"environ","text":"<pre><code>environ(name: str) -&gt; Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/asm/","title":"asm","text":""},{"location":"reference/pwndbg/aglib/asm/#pwndbg.aglib.asm","title":"asm","text":"<p>Functions:</p> <ul> <li> <code>asm</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/asm/#pwndbg.aglib.asm.asm","title":"asm","text":"<pre><code>asm(data: str) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/","title":"commpage","text":""},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage","title":"commpage","text":"<p>Classes:</p> <ul> <li> <code>CommPageField</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>get_commpage_fields</code> \u2013 </li> <li> <code>get_commpage_mappings</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>rw_flags</code> \u2013 </li> <li> <code>ro_flags</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.rw_flags","title":"rw_flags <code>module-attribute</code>","text":"<pre><code>rw_flags = R_OK | W_OK\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.ro_flags","title":"ro_flags <code>module-attribute</code>","text":"<pre><code>ro_flags = R_OK\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField","title":"CommPageField","text":"<p> Bases: <code>NamedTuple</code></p> <p>Methods:</p> <ul> <li> <code>is_undocumented</code> \u2013 </li> <li> <code>is_unused</code> \u2013 </li> <li> <code>is_readonly</code> \u2013 </li> <li> <code>real_addr</code> \u2013 </li> <li> <code>real_size</code> \u2013 </li> <li> <code>unpack</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>flags</code> (<code>int</code>) \u2013 </li> <li> <code>ctype</code> (<code>str</code>) \u2013 </li> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>offset</code> (<code>int</code>) \u2013 </li> <li> <code>desc</code> (<code>str</code>) \u2013 </li> <li> <code>fmt</code> (<code>str</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.flags","title":"flags <code>instance-attribute</code>","text":"<pre><code>flags: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.ctype","title":"ctype <code>instance-attribute</code>","text":"<pre><code>ctype: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.offset","title":"offset <code>instance-attribute</code>","text":"<pre><code>offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.desc","title":"desc <code>instance-attribute</code>","text":"<pre><code>desc: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.fmt","title":"fmt <code>instance-attribute</code>","text":"<pre><code>fmt: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.is_undocumented","title":"is_undocumented","text":"<pre><code>is_undocumented()\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.is_unused","title":"is_unused","text":"<pre><code>is_unused()\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.is_readonly","title":"is_readonly","text":"<pre><code>is_readonly()\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.real_addr","title":"real_addr","text":"<pre><code>real_addr() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.real_size","title":"real_size","text":"<pre><code>real_size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.CommPageField.unpack","title":"unpack","text":"<pre><code>unpack() -&gt; Any\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.get_commpage_fields","title":"get_commpage_fields","text":"<pre><code>get_commpage_fields() -&gt; tuple[CommPageField, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/commpage/#pwndbg.aglib.commpage.get_commpage_mappings","title":"get_commpage_mappings","text":"<pre><code>get_commpage_mappings() -&gt; tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/ctypes/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/","title":"disasm","text":""},{"location":"reference/pwndbg/aglib/disasm/#pwndbg.aglib.disasm","title":"disasm","text":"<p>Modules:</p> <ul> <li> <code>aarch64</code> \u2013 </li> <li> <code>arch</code> \u2013 </li> <li> <code>arm</code> \u2013 </li> <li> <code>disassembly</code> \u2013 <p>Functionality for disassmebling code at an address, or at an</p> </li> <li> <code>instruction</code> \u2013 </li> <li> <code>loongarch64</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>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/","title":"aarch64","text":""},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64","title":"aarch64","text":"<p>Classes:</p> <ul> <li> <code>AArch64DisassemblyAssistant</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_CONSTANT_SHIFTS</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>AARCH64_SHIFT_INSTRUCTIONS</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 AARCH64_INS_LDRB: 1,\n AARCH64_INS_ALIAS_LDRB: 1,\n AARCH64_INS_LDURB: 1,\n AARCH64_INS_ALIAS_LDURB: 1,\n AARCH64_INS_LDRSB: -1,\n AARCH64_INS_ALIAS_LDRSB: -1,\n AARCH64_INS_LDURSB: -1,\n AARCH64_INS_ALIAS_LDURSB: -1,\n AARCH64_INS_LDRH: 2,\n AARCH64_INS_ALIAS_LDRH: 2,\n AARCH64_INS_LDURH: 2,\n AARCH64_INS_ALIAS_LDURH: 2,\n AARCH64_INS_LDRSH: -2,\n AARCH64_INS_ALIAS_LDRSH: -2,\n AARCH64_INS_LDURSH: -2,\n AARCH64_INS_ALIAS_LDURSH: -2,\n AARCH64_INS_LDURSW: -4,\n AARCH64_INS_ALIAS_LDURSW: -4,\n AARCH64_INS_LDRSW: -4,\n AARCH64_INS_ALIAS_LDRSW: -4,\n AARCH64_INS_LDUR: None,\n AARCH64_INS_ALIAS_LDUR: None,\n AARCH64_INS_LDR: None,\n AARCH64_INS_ALIAS_LDR: None,\n AARCH64_INS_LDTRB: 1,\n AARCH64_INS_LDTRSB: -1,\n AARCH64_INS_LDTRH: 2,\n AARCH64_INS_LDTRSH: -2,\n AARCH64_INS_LDTRSW: -4,\n AARCH64_INS_LDTR: None,\n AARCH64_INS_ALIAS_LDTR: None,\n AARCH64_INS_LDXRB: 1,\n AARCH64_INS_LDXRH: 2,\n AARCH64_INS_LDXR: None,\n AARCH64_INS_LDARB: 1,\n AARCH64_INS_LDARH: 2,\n AARCH64_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 AARCH64_INS_STRB: 1,\n AARCH64_INS_ALIAS_STRB: 1,\n AARCH64_INS_STURB: 1,\n AARCH64_INS_ALIAS_STURB: 1,\n AARCH64_INS_STRH: 2,\n AARCH64_INS_ALIAS_STRH: 2,\n AARCH64_INS_STURH: 2,\n AARCH64_INS_ALIAS_STURH: 2,\n AARCH64_INS_STUR: None,\n AARCH64_INS_ALIAS_STUR: None,\n AARCH64_INS_STR: None,\n AARCH64_INS_ALIAS_STR: None,\n AARCH64_INS_STTRB: 1,\n AARCH64_INS_STTRH: 2,\n AARCH64_INS_STTR: None,\n AARCH64_INS_STLRB: 1,\n AARCH64_INS_STLRH: 2,\n AARCH64_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 AARCH64_INS_STXRB: 1,\n AARCH64_INS_STXRH: 2,\n AARCH64_INS_STXR: None,\n AARCH64_INS_STLXRB: 1,\n AARCH64_INS_STLXRH: 2,\n AARCH64_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 AARCH64_INS_CSEL,\n AARCH64_INS_CSINC,\n AARCH64_INS_CSINV,\n AARCH64_INS_CSNEG,\n AARCH64_INS_ALIAS_CSET,\n AARCH64_INS_ALIAS_CSETM,\n AARCH64_INS_ALIAS_CINC,\n AARCH64_INS_ALIAS_CINV,\n AARCH64_INS_ALIAS_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 AARCH64_INS_SXTB,\n AARCH64_INS_SXTH,\n AARCH64_INS_SXTW,\n AARCH64_INS_UXTB,\n AARCH64_INS_UXTH,\n AARCH64_INS_UXTW,\n AARCH64_INS_RBIT,\n AARCH64_INS_CLS,\n AARCH64_INS_CLZ,\n AARCH64_INS_ALIAS_BFXIL,\n AARCH64_INS_ALIAS_UBFIZ,\n AARCH64_INS_UBFM,\n AARCH64_INS_ALIAS_UBFX,\n AARCH64_INS_ALIAS_SBFIZ,\n AARCH64_INS_SBFM,\n AARCH64_INS_ALIAS_SBFX,\n AARCH64_INS_ALIAS_BFI,\n AARCH64_INS_NEG,\n AARCH64_INS_ALIAS_NEGS,\n AARCH64_INS_REV,\n AARCH64_INS_BIC,\n AARCH64_INS_BICS,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_CONSTANT_SHIFTS","title":"AARCH64_CONSTANT_SHIFTS <code>module-attribute</code>","text":"<pre><code>AARCH64_CONSTANT_SHIFTS = {\n AARCH64_SFT_LSL,\n AARCH64_SFT_LSR,\n AARCH64_SFT_ASR,\n AARCH64_SFT_ROR,\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 AARCH64_SFT_LSL: logical_shift_left,\n AARCH64_SFT_LSR: logical_shift_right,\n AARCH64_SFT_ASR: arithmetic_shift_right,\n AARCH64_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 AARCH64_EXT_UXTB: lambda x: x &amp; (1 &lt;&lt; 8) - 1,\n AARCH64_EXT_UXTH: lambda x: x &amp; (1 &lt;&lt; 16) - 1,\n AARCH64_EXT_UXTW: lambda x: x &amp; (1 &lt;&lt; 32) - 1,\n AARCH64_EXT_UXTX: lambda x: x,\n AARCH64_EXT_SXTB: lambda x: to_signed(x, 8),\n AARCH64_EXT_SXTH: lambda x: to_signed(x, 16),\n AARCH64_EXT_SXTW: lambda x: to_signed(x, 32),\n AARCH64_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 AARCH64_INS_ADD: \"+\",\n AARCH64_INS_ALIAS_ADD: \"+\",\n AARCH64_INS_ADDS: \"+\",\n AARCH64_INS_ALIAS_ADDS: \"+\",\n AARCH64_INS_SUB: \"-\",\n AARCH64_INS_ALIAS_SUB: \"-\",\n AARCH64_INS_SUBS: \"-\",\n AARCH64_INS_ALIAS_SUBS: \"-\",\n AARCH64_INS_AND: \"&amp;\",\n AARCH64_INS_ALIAS_AND: \"&amp;\",\n AARCH64_INS_ANDS: \"&amp;\",\n AARCH64_INS_ALIAS_ANDS: \"&amp;\",\n AARCH64_INS_ORR: \"|\",\n AARCH64_INS_ALIAS_ORR: \"|\",\n AARCH64_INS_EOR: \"^\",\n AARCH64_INS_ALIAS_EOR: \"^\",\n AARCH64_INS_UDIV: \"/\",\n AARCH64_INS_SDIV: \"/\",\n AARCH64_INS_SMULH: \"*\",\n AARCH64_INS_SMULL: \"*\",\n AARCH64_INS_ALIAS_SMULL: \"*\",\n AARCH64_INS_UMULH: \"*\",\n AARCH64_INS_UMULL: \"*\",\n AARCH64_INS_ALIAS_UMULL: \"*\",\n AARCH64_INS_MUL: \"*\",\n AARCH64_INS_ALIAS_MUL: \"*\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AARCH64_SHIFT_INSTRUCTIONS","title":"AARCH64_SHIFT_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>AARCH64_SHIFT_INSTRUCTIONS = {\n AARCH64_INS_LSL: \"&lt;&lt;\",\n AARCH64_INS_ALIAS_LSL: \"&lt;&lt;\",\n AARCH64_INS_LSR: \"&gt;&gt;\",\n AARCH64_INS_ALIAS_LSR: \"&gt;&gt;\",\n AARCH64_INS_ASR: \"&gt;&gt;s\",\n AARCH64_INS_ALIAS_ASR: \"&gt;&gt;s\",\n AARCH64_INS_ROR: \"&gt;&gt;r\",\n AARCH64_INS_ALIAS_ROR: \"&gt;&gt;r\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AArch64DisassemblyAssistant","title":"AArch64DisassemblyAssistant","text":"<pre><code>AArch64DisassemblyAssistant(architecture)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>enhance</code> \u2013 <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> </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>architecture</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>manual_register_values</code> (<code>PseudoEmulatedRegisterFile</code>) \u2013 </li> <li> <code>supports_manual_emulation</code> \u2013 <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p> </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.AArch64DisassemblyAssistant.annotation_handlers","title":"annotation_handlers <code>instance-attribute</code>","text":"<pre><code>annotation_handlers: dict[\n int, Callable[[PwndbgInstruction, Emulator], None]\n] = {\n AARCH64_INS_MOV: _common_move_annotator,\n AARCH64_INS_ALIAS_MOV: _common_move_annotator,\n AARCH64_INS_MOVZ: _common_move_annotator,\n AARCH64_INS_MOVK: _common_generic_register_destination,\n AARCH64_INS_ADR: _common_generic_register_destination,\n AARCH64_INS_ADRP: _handle_adrp,\n AARCH64_INS_ALIAS_CMP: _common_cmp_annotator_builder(\"cpsr\", \"-\"),\n AARCH64_INS_ALIAS_CMN: _common_cmp_annotator_builder(\"cpsr\", \"+\"),\n AARCH64_INS_ALIAS_TST: _common_cmp_annotator_builder(\"cpsr\", \"&amp;\"),\n AARCH64_INS_CCMP: _common_cmp_annotator_builder(\"cpsr\", \"\"),\n AARCH64_INS_CCMN: _common_cmp_annotator_builder(\"cpsr\", \"\"),\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AArch64DisassemblyAssistant.architecture","title":"architecture <code>instance-attribute</code>","text":"<pre><code>architecture: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = architecture\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AArch64DisassemblyAssistant.manual_register_values","title":"manual_register_values <code>instance-attribute</code>","text":"<pre><code>manual_register_values: PseudoEmulatedRegisterFile = PseudoEmulatedRegisterFile(\n current, ptrsize\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AArch64DisassemblyAssistant.supports_manual_emulation","title":"supports_manual_emulation <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>supports_manual_emulation = False\n</code></pre> <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AArch64DisassemblyAssistant.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.AArch64DisassemblyAssistant.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.AArch64DisassemblyAssistant.enhance","title":"enhance","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -&gt; None\n</code></pre> <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> <p>This is the only public method that should be called on this object externally.</p>"},{"location":"reference/pwndbg/aglib/disasm/aarch64/#pwndbg.aglib.disasm.aarch64.AArch64DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -&gt; 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.AArch64DisassemblyAssistant.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) -&gt; 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":"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> <li> <code>basic_enhance</code> \u2013 </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> </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: _4for (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: _xfor (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: _efor (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.DisassemblyAssistant","title":"DisassemblyAssistant","text":"<pre><code>DisassemblyAssistant(architecture: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE)\n</code></pre> <p>Methods:</p> <ul> <li> <code>enhance</code> \u2013 <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> </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>supports_manual_emulation</code> \u2013 <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p> </li> <li> <code>architecture</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>manual_register_values</code> (<code>PseudoEmulatedRegisterFile</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.supports_manual_emulation","title":"supports_manual_emulation <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>supports_manual_emulation = False\n</code></pre> <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.architecture","title":"architecture <code>instance-attribute</code>","text":"<pre><code>architecture: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = architecture\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arch/#pwndbg.aglib.disasm.arch.DisassemblyAssistant.manual_register_values","title":"manual_register_values <code>instance-attribute</code>","text":"<pre><code>manual_register_values: PseudoEmulatedRegisterFile = PseudoEmulatedRegisterFile(\n current, ptrsize\n)\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.enhance","title":"enhance","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -&gt; None\n</code></pre> <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> <p>This is the only public method that should be called on this object externally.</p>"},{"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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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/arch/#pwndbg.aglib.disasm.arch.basic_enhance","title":"basic_enhance","text":"<pre><code>basic_enhance(ins: PwndbgInstruction) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/","title":"arm","text":""},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm","title":"arm","text":"<p>Classes:</p> <ul> <li> <code>ArmDisassemblyAssistant</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>itstate_from_cpsr</code> \u2013 <p>ITSTATE == If-Then execution state bits for the Thumb IT instruction</p> </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_INSTRUCTIONS</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: \"&amp;\",\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: \"&gt;&gt;s\",\n ARM_INS_ALIAS_ASR: \"&gt;&gt;s\",\n ARM_INS_LSR: \"&gt;&gt;\",\n ARM_INS_ALIAS_LSR: \"&gt;&gt;\",\n ARM_INS_LSL: \"&lt;&lt;\",\n ARM_INS_ALIAS_LSL: \"&lt;&lt;\",\n ARM_INS_ROR: \"&gt;&gt;r\",\n ARM_INS_ALIAS_ROR: \"&gt;&gt;r\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ARM_CAN_WRITE_TO_PC_INSTRUCTIONS","title":"ARM_CAN_WRITE_TO_PC_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>ARM_CAN_WRITE_TO_PC_INSTRUCTIONS = {\n ARM_INS_LDM,\n ARM_INS_ALIAS_LDM,\n ARM_INS_POP,\n ARM_INS_ALIAS_POP,\n ARM_INS_LDR,\n ARM_INS_ADC,\n ARM_INS_ADD,\n ARM_INS_ADR,\n ARM_INS_AND,\n ARM_INS_ASR,\n ARM_INS_ALIAS_ASR,\n ARM_INS_BIC,\n ARM_INS_EOR,\n ARM_INS_LSL,\n ARM_INS_ALIAS_LSL,\n ARM_INS_LSR,\n ARM_INS_ALIAS_LSR,\n ARM_INS_MOV,\n ARM_INS_MVN,\n ARM_INS_ORR,\n ARM_INS_ROR,\n ARM_INS_ALIAS_ROR,\n ARM_INS_RRX,\n ARM_INS_ALIAS_RRX,\n ARM_INS_RSB,\n ARM_INS_RSC,\n ARM_INS_SBC,\n ARM_INS_SUB,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ArmDisassemblyAssistant","title":"ArmDisassemblyAssistant","text":"<pre><code>ArmDisassemblyAssistant(architecture, 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>enhance</code> \u2013 <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> </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>architecture</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>manual_register_values</code> (<code>PseudoEmulatedRegisterFile</code>) \u2013 </li> <li> <code>supports_manual_emulation</code> \u2013 <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p> </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.ArmDisassemblyAssistant.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.ArmDisassemblyAssistant.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, \"&amp;\"),\n ARM_INS_TEQ: _common_cmp_annotator_builder(flags_reg, \"^\"),\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ArmDisassemblyAssistant.architecture","title":"architecture <code>instance-attribute</code>","text":"<pre><code>architecture: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = architecture\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ArmDisassemblyAssistant.manual_register_values","title":"manual_register_values <code>instance-attribute</code>","text":"<pre><code>manual_register_values: PseudoEmulatedRegisterFile = PseudoEmulatedRegisterFile(\n current, ptrsize\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ArmDisassemblyAssistant.supports_manual_emulation","title":"supports_manual_emulation <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>supports_manual_emulation = False\n</code></pre> <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ArmDisassemblyAssistant.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.ArmDisassemblyAssistant.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.ArmDisassemblyAssistant.read_thumb_bit","title":"read_thumb_bit","text":"<pre><code>read_thumb_bit(instruction: PwndbgInstruction, emu: Emulator) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ArmDisassemblyAssistant.enhance","title":"enhance","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -&gt; None\n</code></pre> <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> <p>This is the only public method that should be called on this object externally.</p>"},{"location":"reference/pwndbg/aglib/disasm/arm/#pwndbg.aglib.disasm.arm.ArmDisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -&gt; 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.ArmDisassemblyAssistant.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.itstate_from_cpsr","title":"itstate_from_cpsr","text":"<pre><code>itstate_from_cpsr(cpsr_value: int) -&gt; int\n</code></pre> <p>ITSTATE == If-Then execution state bits for the Thumb IT instruction The ITSTATE bits are spread across 3 sections of Arm flags register to a total of 8 bits. This function extracts them and reorders the bits into their logical order - https://developer.arm.com/documentation/ddi0403/d/System-Level-Architecture/System-Level-Programmers--Model/Registers/The-special-purpose-program-status-registers--xPSR#:~:text=shows%20the%20assignment%20of%20the%20ICI/IT%20bits.</p> <p>Bits of the flags register: EPSR[26:25] EPSR[15:12] EPSR[11:10] Bits of ITSTATE: IT[1:0] IT[7:4] IT[3:2]</p> <p>The lower 5 bits has information that indicates the number of instructions in the IT Block. The top 3 bits indicate the base condition of the block. - https://developer.arm.com/documentation/ddi0406/cb/Application-Level-Architecture/Application-Level-Programmers--Model/Execution-state-registers/IT-block-state-register--ITSTATE?lang=en</p> <p>If the value is zero, it means we are not in an IT block.</p>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/","title":"disassembly","text":""},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly","title":"disassembly","text":"<p>Functionality for disassmebling code at an address, or at an address \u00b1 a few instructions.</p> <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</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> <li> <code>get_disassembly_assistant_for_current_arch</code> \u2013 </li> <li> <code>arch_has_disassembly_assistant</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>CapstoneEndian</code> \u2013 </li> <li> <code>CapstoneSyntax</code> \u2013 </li> <li> <code>force_register_alias</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 | None]</code>) \u2013 </li> <li> <code>first_time_emulate</code> \u2013 </li> <li> <code>ALL_DISASSEMBLY_ASSISTANTS</code> (<code>dict[PWNDBG_SUPPORTED_ARCHITECTURES_TYPE, Callable[[], DisassemblyAssistant]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.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/disassembly/#pwndbg.aglib.disasm.disassembly.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/disassembly/#pwndbg.aglib.disasm.disassembly.force_register_alias","title":"force_register_alias <code>module-attribute</code>","text":"<pre><code>force_register_alias = add_param(\n \"disasm-reg-alias\",\n False,\n \"force the disassembly to use register aliases (e.g. aarch64 x29 -&gt; fp)\",\n param_class=PARAM_BOOLEAN,\n help_docstring=\"The register aliasing is done by capstone, see:\\nhttps://github.com/capstone-engine/capstone/blob/next/docs/cs_v6_release_guide.md#:~:text=None.-,Register%20alias,-Register%20alias%20\\n\\nEnabling this may make disassembly slower.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.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/disassembly/#pwndbg.aglib.disasm.disassembly.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/disassembly/#pwndbg.aglib.disasm.disassembly.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/disassembly/#pwndbg.aglib.disasm.disassembly.emulated_arm_mode_cache","title":"emulated_arm_mode_cache <code>module-attribute</code>","text":"<pre><code>emulated_arm_mode_cache: DefaultDict[int, int | None] = defaultdict(\n lambda: None\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.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/disassembly/#pwndbg.aglib.disasm.disassembly.ALL_DISASSEMBLY_ASSISTANTS","title":"ALL_DISASSEMBLY_ASSISTANTS <code>module-attribute</code>","text":"<pre><code>ALL_DISASSEMBLY_ASSISTANTS: dict[\n PWNDBG_SUPPORTED_ARCHITECTURES_TYPE, Callable[[], DisassemblyAssistant]\n] = {\n \"aarch64\": lambda: AArch64DisassemblyAssistant(\"aarch64\"),\n \"i386\": lambda: X86DisassemblyAssistant(\"i386\"),\n \"x86-64\": lambda: X86DisassemblyAssistant(\"x86-64\"),\n \"arm\": lambda: ArmDisassemblyAssistant(\"arm\", \"cpsr\"),\n \"armcm\": lambda: ArmDisassemblyAssistant(\"armcm\", \"xpsr\"),\n \"mips\": lambda: MipsDisassemblyAssistant(\"mips\"),\n \"rv32\": lambda: RISCVDisassemblyAssistant(\"rv32\"),\n \"rv64\": lambda: RISCVDisassemblyAssistant(\"rv64\"),\n \"loongarch64\": lambda: Loong64DisassemblyAssistant(\"loongarch64\"),\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.enhance_cache_listener","title":"enhance_cache_listener","text":"<pre><code>enhance_cache_listener() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.clear_on_reg_mem_change","title":"clear_on_reg_mem_change","text":"<pre><code>clear_on_reg_mem_change() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.get_disassembler","title":"get_disassembler","text":"<pre><code>get_disassembler(cs_info: tuple[int, int])\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.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 assistant: DisassemblyAssistant = None,\n) -&gt; 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/disassembly/#pwndbg.aglib.disasm.disassembly.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 assistant: DisassemblyAssistant = None,\n) -&gt; PwndbgInstruction | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.one_raw","title":"one_raw","text":"<pre><code>one_raw(address=None) -&gt; PwndbgInstruction | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.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 assistant: DisassemblyAssistant = None,\n) -&gt; list[PwndbgInstruction]\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.can_run_first_emulate","title":"can_run_first_emulate","text":"<pre><code>can_run_first_emulate() -&gt; 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/disassembly/#pwndbg.aglib.disasm.disassembly.no_emulate_one","title":"no_emulate_one","text":"<pre><code>no_emulate_one()\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.emulate_one","title":"emulate_one","text":"<pre><code>emulate_one()\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.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/disassembly/#pwndbg.aglib.disasm.disassembly.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) -&gt; 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</p> <p>This allows us to maintain a context of surrounding instructions while single-stepping instructions.</p>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.get_disassembly_assistant_for_current_arch","title":"get_disassembly_assistant_for_current_arch","text":"<pre><code>get_disassembly_assistant_for_current_arch() -&gt; DisassemblyAssistant\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/disassembly/#pwndbg.aglib.disasm.disassembly.arch_has_disassembly_assistant","title":"arch_has_disassembly_assistant","text":"<pre><code>arch_has_disassembly_assistant(\n arch: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE | None = None,\n) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/instruction/","title":"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_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_CALL, X86_INS_RET, 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_JALR_HB,\n MIPS_INS_BAL,\n MIPS_INS_ALIAS_BAL,\n MIPS_INS_B,\n MIPS_INS_ALIAS_B,\n },\n CS_ARCH_SPARC: {SPARC_INS_CALL, SPARC_INS_ALIAS_CALL, SPARC_INS_JMPL},\n CS_ARCH_ARM: {ARM_INS_TBB, ARM_INS_TBH},\n CS_ARCH_AARCH64: {AARCH64_INS_BL, AARCH64_INS_BLR, AARCH64_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 CS_ARCH_SYSTEMZ: {\n SYSTEMZ_INS_J,\n SYSTEMZ_INS_JL,\n SYSTEMZ_INS_B,\n SYSTEMZ_INS_BR,\n SYSTEMZ_INS_BAL,\n SYSTEMZ_INS_BALR,\n SYSTEMZ_INS_BRAS,\n SYSTEMZ_INS_BRASL,\n },\n CS_ARCH_LOONGARCH: {\n LOONGARCH_INS_B,\n LOONGARCH_INS_BL,\n LOONGARCH_INS_JIRL,\n LOONGARCH_INS_ALIAS_JR,\n LOONGARCH_INS_CALL36,\n },\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_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 | {CS_GRP_CALL, CS_GRP_RET, CS_GRP_IRET}\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_AARCH64: \"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 CS_ARCH_SYSTEMZ: \"s390x\",\n CS_ARCH_LOONGARCH: \"loongarch\",\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_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>register_writes</code> (<code>dict[int, int]</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>jump_result_is_known</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_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.register_writes","title":"register_writes <code>instance-attribute</code>","text":"<pre><code>register_writes: dict[int, int]\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.jump_result_is_known","title":"jump_result_is_known <code>property</code>","text":"<pre><code>jump_result_is_known: 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) -&gt; 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) -&gt; 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_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>register_writes</code> \u2013 <p>Mapping of Capstone register id to integer value. During enhancement, we might manually determine</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>jump_result_is_known</code> (<code>bool</code>) \u2013 <p>True under the following conditions:</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 = alias_id if is_alias else id\n</code></pre> <p>The underlying Capstone ID for the instruction If it's an alias, use the id of the alias</p> <p>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_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 time, we depend on Capstone groups to check for jump instructions. However, some instructions become branches depending on the operands, such as Arm <code>add</code>, <code>sub</code>, <code>ldr</code>, <code>pop</code>, where PC is the destination register</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.register_writes","title":"register_writes <code>instance-attribute</code>","text":"<pre><code>register_writes = {}\n</code></pre> <p>Mapping of Capstone register id to integer value. During enhancement, we might manually determine that an instruction writes some value to a register, and this is stored here.</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.jump_result_is_known","title":"jump_result_is_known <code>property</code>","text":"<pre><code>jump_result_is_known: bool\n</code></pre> <p>True under the following conditions: - If it's an unconditional jump, we know the target of the jump - If it's a conditional jump, we know the target of the branch and know whether or not we take it Otherwise, false</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) -&gt; 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) -&gt; 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__() -&gt; 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__() -&gt; 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_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>register_writes</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> <li> <code>jump_result_is_known</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) &gt; 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_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.register_writes","title":"register_writes <code>instance-attribute</code>","text":"<pre><code>register_writes = {}\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.jump_result_is_known","title":"jump_result_is_known <code>property</code>","text":"<pre><code>jump_result_is_known: 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) -&gt; 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) -&gt; 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) -&gt; InstructionCondition\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/","title":"loongarch64","text":""},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64","title":"loongarch64","text":"<p>Classes:</p> <ul> <li> <code>Loong64DisassemblyAssistant</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>CONDITION_RESOLVERS</code> (<code>dict[int, Callable[[list[int]], bool]]</code>) \u2013 </li> <li> <code>LOONGARCH_LOAD_INSTRUCTIONS</code> (<code>dict[int, int]</code>) \u2013 </li> <li> <code>LOONGARCH_STORE_INSTRUCTIONS</code> (<code>dict[int, int]</code>) \u2013 </li> <li> <code>LOONGARCH_BINARY_OPERATIONS</code> (<code>dict[int, str]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.CONDITION_RESOLVERS","title":"CONDITION_RESOLVERS <code>module-attribute</code>","text":"<pre><code>CONDITION_RESOLVERS: dict[int, Callable[[list[int]], bool]] = {\n LOONGARCH_INS_BEQZ: lambda ops: ops[0] == 0,\n LOONGARCH_INS_BNEZ: lambda ops: ops[0] != 0,\n LOONGARCH_INS_BEQ: lambda ops: ops[0] == ops[1],\n LOONGARCH_INS_BNE: lambda ops: ops[0] != ops[1],\n LOONGARCH_INS_BGE: lambda ops: to_signed(ops[0], ptrsize * 8)\n &gt;= to_signed(ops[1], ptrsize * 8),\n LOONGARCH_INS_BLT: lambda ops: to_signed(ops[0], ptrsize * 8)\n &lt; to_signed(ops[1], ptrsize * 8),\n LOONGARCH_INS_BLTU: lambda ops: ops[0] &lt; ops[1],\n LOONGARCH_INS_BGEU: lambda ops: ops[0] &gt;= ops[1],\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.LOONGARCH_LOAD_INSTRUCTIONS","title":"LOONGARCH_LOAD_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>LOONGARCH_LOAD_INSTRUCTIONS: dict[int, int] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.LOONGARCH_STORE_INSTRUCTIONS","title":"LOONGARCH_STORE_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>LOONGARCH_STORE_INSTRUCTIONS: dict[int, int] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.LOONGARCH_BINARY_OPERATIONS","title":"LOONGARCH_BINARY_OPERATIONS <code>module-attribute</code>","text":"<pre><code>LOONGARCH_BINARY_OPERATIONS: dict[int, str] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant","title":"Loong64DisassemblyAssistant","text":"<pre><code>Loong64DisassemblyAssistant(architecture)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>enhance</code> \u2013 <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> </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>architecture</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>manual_register_values</code> (<code>PseudoEmulatedRegisterFile</code>) \u2013 </li> <li> <code>supports_manual_emulation</code> \u2013 <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p> </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/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.annotation_handlers","title":"annotation_handlers <code>instance-attribute</code>","text":"<pre><code>annotation_handlers: dict[\n int, Callable[[PwndbgInstruction, Emulator], None]\n] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.architecture","title":"architecture <code>instance-attribute</code>","text":"<pre><code>architecture: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = architecture\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.manual_register_values","title":"manual_register_values <code>instance-attribute</code>","text":"<pre><code>manual_register_values: PseudoEmulatedRegisterFile = PseudoEmulatedRegisterFile(\n current, ptrsize\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.supports_manual_emulation","title":"supports_manual_emulation <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>supports_manual_emulation = False\n</code></pre> <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.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/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.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/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.enhance","title":"enhance","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -&gt; None\n</code></pre> <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> <p>This is the only public method that should be called on this object externally.</p>"},{"location":"reference/pwndbg/aglib/disasm/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -&gt; 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/loongarch64/#pwndbg.aglib.disasm.loongarch64.Loong64DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/mips/","title":"mips","text":""},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips","title":"mips","text":"<p>Classes:</p> <ul> <li> <code>MipsDisassemblyAssistant</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>BRANCH_WITHOUT_DELAY_SLOT_INSTRUCTIONS</code> \u2013 </li> <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> </ul>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.BRANCH_WITHOUT_DELAY_SLOT_INSTRUCTIONS","title":"BRANCH_WITHOUT_DELAY_SLOT_INSTRUCTIONS <code>module-attribute</code>","text":"<pre><code>BRANCH_WITHOUT_DELAY_SLOT_INSTRUCTIONS = {\n MIPS_INS_BC,\n MIPS_INS_BALC,\n MIPS_INS_JIALC,\n MIPS_INS_JIC,\n MIPS_INS_BLEZALC,\n MIPS_INS_BGEZALC,\n MIPS_INS_BGTZALC,\n MIPS_INS_BLTZALC,\n MIPS_INS_BEQZALC,\n MIPS_INS_BNEZALC,\n MIPS_INS_BLEZC,\n MIPS_INS_BGEZC,\n MIPS_INS_BGEUC,\n MIPS_INS_BGEIC,\n MIPS_INS_BGEUC,\n MIPS_INS_BGEIUC,\n MIPS_INS_BGTZC,\n MIPS_INS_BLTZC,\n MIPS_INS_BEQZC,\n MIPS_INS_ALIAS_BEQZC,\n MIPS_INS_BNEZC,\n MIPS_INS_ALIAS_BNEZC,\n MIPS_INS_BEQC,\n MIPS_INS_ALIAS_BEQC,\n MIPS_INS_BEQIC,\n MIPS_INS_BNEC,\n MIPS_INS_ALIAS_BNEC,\n MIPS_INS_BNEIC,\n MIPS_INS_BLTC,\n MIPS_INS_BLTIC,\n MIPS_INS_BLTUC,\n MIPS_INS_BLTIUC,\n MIPS_INS_BGEC,\n MIPS_INS_BLTUC,\n MIPS_INS_BNVC,\n MIPS_INS_BOVC,\n MIPS_INS_BRSC,\n MIPS_INS_BALRSC,\n MIPS_INS_BBEQZC,\n MIPS_INS_BBNEZC,\n}\n</code></pre>"},{"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_BC1FL,\n MIPS_INS_ALIAS_BC1FL,\n MIPS_INS_BC1TL,\n MIPS_INS_ALIAS_BC1TL,\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 MIPS_INS_ALIAS_BNEZL,\n MIPS_INS_ALIAS_BEQZL,\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) &gt;= 0,\n MIPS_INS_BGEZAL: lambda ops: to_signed(ops[0], ptrsize * 8) &gt;= 0,\n MIPS_INS_BGTZ: lambda ops: to_signed(ops[0], ptrsize * 8) &gt; 0,\n MIPS_INS_BLEZ: lambda ops: to_signed(ops[0], ptrsize * 8) &lt;= 0,\n MIPS_INS_BLTZAL: lambda ops: to_signed(ops[0], ptrsize * 8) &lt; 0,\n MIPS_INS_BLTZ: lambda ops: to_signed(ops[0], ptrsize * 8) &lt; 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: \"&amp;\",\n MIPS_INS_AND: \"&amp;\",\n MIPS_INS_ORI: \"|\",\n MIPS_INS_OR: \"|\",\n MIPS_INS_XOR: \"^\",\n MIPS_INS_XORI: \"^\",\n MIPS_INS_SLL: \"&lt;&lt;\",\n MIPS_INS_SLLV: \"&lt;&lt;\",\n MIPS_INS_DSLL: \"&lt;&lt;\",\n MIPS_INS_DSLLV: \"&lt;&lt;\",\n MIPS_INS_SRL: \"&gt;&gt;\",\n MIPS_INS_SRLV: \"&gt;&gt;\",\n MIPS_INS_DSRL: \"&gt;&gt;\",\n MIPS_INS_DSRLV: \"&gt;&gt;\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MipsDisassemblyAssistant","title":"MipsDisassemblyAssistant","text":"<pre><code>MipsDisassemblyAssistant(architecture)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>enhance</code> \u2013 <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> </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>architecture</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>manual_register_values</code> (<code>PseudoEmulatedRegisterFile</code>) \u2013 </li> <li> <code>supports_manual_emulation</code> \u2013 <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p> </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.MipsDisassemblyAssistant.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_ALIAS_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.MipsDisassemblyAssistant.architecture","title":"architecture <code>instance-attribute</code>","text":"<pre><code>architecture: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = architecture\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MipsDisassemblyAssistant.manual_register_values","title":"manual_register_values <code>instance-attribute</code>","text":"<pre><code>manual_register_values: PseudoEmulatedRegisterFile = PseudoEmulatedRegisterFile(\n current, ptrsize\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MipsDisassemblyAssistant.supports_manual_emulation","title":"supports_manual_emulation <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>supports_manual_emulation = False\n</code></pre> <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MipsDisassemblyAssistant.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.MipsDisassemblyAssistant.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.MipsDisassemblyAssistant.enhance","title":"enhance","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -&gt; None\n</code></pre> <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> <p>This is the only public method that should be called on this object externally.</p>"},{"location":"reference/pwndbg/aglib/disasm/mips/#pwndbg.aglib.disasm.mips.MipsDisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -&gt; 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.MipsDisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/ppc/","title":"ppc","text":""},{"location":"reference/pwndbg/aglib/disasm/ppc/#pwndbg.aglib.disasm.ppc","title":"ppc","text":""},{"location":"reference/pwndbg/aglib/disasm/riscv/","title":"riscv","text":""},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv","title":"riscv","text":"<p>Classes:</p> <ul> <li> <code>RISCVDisassemblyAssistant</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>RISCV_LOAD_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_STORE_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_MATH_INSTRUCTIONS</code> \u2013 </li> <li> <code>RISCV_EMULATED_ANNOTATIONS</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 RISCV_INS_C_LW: -4,\n RISCV_INS_C_LWSP: -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 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: \"&amp;\",\n RISCV_INS_C_ANDI: \"&amp;\",\n RISCV_INS_AND: \"&amp;\",\n RISCV_INS_C_AND: \"&amp;\",\n RISCV_INS_SLLI: \"&lt;&lt;\",\n RISCV_INS_C_SLLI: \"&lt;&lt;\",\n RISCV_INS_SLL: \"&lt;&lt;\",\n RISCV_INS_SRLI: \"&gt;&gt;\",\n RISCV_INS_C_SRLI: \"&gt;&gt;\",\n RISCV_INS_SRL: \"&gt;&gt;\",\n RISCV_INS_SRAI: \"&gt;&gt;s\",\n RISCV_INS_C_SRAI: \"&gt;&gt;s\",\n RISCV_INS_SRA: \"&gt;&gt;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: \"&lt;&lt;\",\n RISCV_INS_SLLW: \"&lt;&lt;\",\n RISCV_INS_SRLIW: \"&gt;&gt;\",\n RISCV_INS_SRLW: \"&gt;&gt;\",\n RISCV_INS_SRAIW: \"&gt;&gt;s\",\n RISCV_INS_SRAW: \"&gt;&gt;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.RISCVDisassemblyAssistant","title":"RISCVDisassemblyAssistant","text":"<pre><code>RISCVDisassemblyAssistant(architecture)\n</code></pre> <p> Bases: <code>DisassemblyAssistant</code></p> <p>Methods:</p> <ul> <li> <code>enhance</code> \u2013 <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> </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>manual_register_values</code> (<code>PseudoEmulatedRegisterFile</code>) \u2013 </li> <li> <code>supports_manual_emulation</code> \u2013 <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p> </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.RISCVDisassemblyAssistant.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.RISCVDisassemblyAssistant.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.RISCVDisassemblyAssistant.manual_register_values","title":"manual_register_values <code>instance-attribute</code>","text":"<pre><code>manual_register_values: PseudoEmulatedRegisterFile = PseudoEmulatedRegisterFile(\n current, ptrsize\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCVDisassemblyAssistant.supports_manual_emulation","title":"supports_manual_emulation <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>supports_manual_emulation = False\n</code></pre> <p>This feature relies on the Capstone .regs_access() features that not all architectures have reliable support for</p>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCVDisassemblyAssistant.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.RISCVDisassemblyAssistant.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.RISCVDisassemblyAssistant.enhance","title":"enhance","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -&gt; None\n</code></pre> <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> <p>This is the only public method that should be called on this object externally.</p>"},{"location":"reference/pwndbg/aglib/disasm/riscv/#pwndbg.aglib.disasm.riscv.RISCVDisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -&gt; 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.RISCVDisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/disasm/sparc/","title":"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":"x86","text":""},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86","title":"x86","text":"<p>Classes:</p> <ul> <li> <code>X86DisassemblyAssistant</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> </ul>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.groups","title":"groups <code>module-attribute</code>","text":"<pre><code>groups = {v: _Dfor (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: _Jfor (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: _Nfor (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: _3for (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: \"&amp;\",\n X86_INS_OR: \"|\",\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant","title":"X86DisassemblyAssistant","text":"<pre><code>X86DisassemblyAssistant(architecture)\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>enhance</code> \u2013 <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> </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>supports_manual_emulation</code> \u2013 </li> <li> <code>annotation_handlers</code> (<code>dict[int, Callable[[PwndbgInstruction, Emulator], None]]</code>) \u2013 </li> <li> <code>architecture</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>manual_register_values</code> (<code>PseudoEmulatedRegisterFile</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.X86DisassemblyAssistant.supports_manual_emulation","title":"supports_manual_emulation <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>supports_manual_emulation = True\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.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\", \"&amp;\"),\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.X86DisassemblyAssistant.architecture","title":"architecture <code>instance-attribute</code>","text":"<pre><code>architecture: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE = architecture\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.manual_register_values","title":"manual_register_values <code>instance-attribute</code>","text":"<pre><code>manual_register_values: PseudoEmulatedRegisterFile = PseudoEmulatedRegisterFile(\n current, ptrsize\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.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.X86DisassemblyAssistant.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.X86DisassemblyAssistant.handle_mov","title":"handle_mov","text":"<pre><code>handle_mov(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.handle_vmovaps","title":"handle_vmovaps","text":"<pre><code>handle_vmovaps(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.handle_lea","title":"handle_lea","text":"<pre><code>handle_lea(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.handle_xchg","title":"handle_xchg","text":"<pre><code>handle_xchg(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.handle_pop","title":"handle_pop","text":"<pre><code>handle_pop(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.handle_xor","title":"handle_xor","text":"<pre><code>handle_xor(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.handle_inc","title":"handle_inc","text":"<pre><code>handle_inc(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.handle_dec","title":"handle_dec","text":"<pre><code>handle_dec(instruction: PwndbgInstruction, emu: Emulator) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.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.X86DisassemblyAssistant.enhance","title":"enhance","text":"<pre><code>enhance(instruction: PwndbgInstruction, emu: Emulator = None) -&gt; None\n</code></pre> <p>Enhance the instruction - resolving branch targets, conditionals, and adding annotations</p> <p>This is the only public method that should be called on this object externally.</p>"},{"location":"reference/pwndbg/aglib/disasm/x86/#pwndbg.aglib.disasm.x86.X86DisassemblyAssistant.can_reason_about_process_state","title":"can_reason_about_process_state","text":"<pre><code>can_reason_about_process_state(instruction: PwndbgInstruction) -&gt; 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.X86DisassemblyAssistant.dump","title":"dump","text":"<pre><code>dump(instruction: PwndbgInstruction)\n</code></pre> <p>Debug-only method.</p>"},{"location":"reference/pwndbg/aglib/dt/","title":"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) -&gt; str\n</code></pre> <p>Dump out a structure type WinDbg style.</p>"},{"location":"reference/pwndbg/aglib/dynamic/","title":"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__() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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]) -&gt; 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]) -&gt; 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":"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>get_vmlinux_unrand_base</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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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.get_vmlinux_unrand_base","title":"get_vmlinux_unrand_base","text":"<pre><code>get_vmlinux_unrand_base(elf_filepath: str)\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) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/elf/#pwndbg.aglib.elf.get_ehdr","title":"get_ehdr","text":"<pre><code>get_ehdr(pointer: int) -&gt; 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 = '') -&gt; 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>&gt;&gt;&gt; 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&gt;&gt;&gt; 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) -&gt; tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/file/","title":"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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; str\n</code></pre> <p>readlink(path) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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":"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>max_align</code> \u2013 <p>Gets the Go maximum alignment 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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 = '') -&gt; 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]) -&gt; 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) -&gt; 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>align</code> \u2013 <p>Returns the alignment 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()) -&gt; 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() -&gt; 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.align","title":"align <code>abstractmethod</code>","text":"<pre><code>align() -&gt; int\n</code></pre> <p>Returns the alignment 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() -&gt; 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() -&gt; 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() -&gt; 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__() -&gt; 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() -&gt; 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>align</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() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BackrefType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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() -&gt; 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__() -&gt; 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>align</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>algn</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.algn","title":"algn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>algn: 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()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.size","title":"size","text":"<pre><code>size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.__post_init__","title":"__post_init__","text":"<pre><code>__post_init__() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.BasicType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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__() -&gt; 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>align</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()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.size","title":"size","text":"<pre><code>size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.SliceType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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__() -&gt; 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>align</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()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.size","title":"size","text":"<pre><code>size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.PointerType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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__() -&gt; 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>align</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()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.size","title":"size","text":"<pre><code>size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.ArrayType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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__() -&gt; 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.</p> <p>Methods:</p> <ul> <li> <code>is_swiss</code> \u2013 </li> <li> <code>field_offsets_noswiss</code> \u2013 <p>The layout for pre-1.24 maps is as follows (taken from src/runtime/map.go commit 1b4f1dc):</p> </li> <li> <code>field_offsets_swiss</code> \u2013 <p>The layout for post-1.24 maps is as follows (taken from src/internal/runtime/map.go commit 4e63ae4):</p> </li> <li> <code>field_offsets_swiss_inner</code> \u2013 <p>The layout for the inner swissmap is as follows (taken from src/internal/runtime/maps/table.go commit 4e63ae4):</p> </li> <li> <code>field_offsets</code> \u2013 </li> <li> <code>format_entries</code> \u2013 </li> <li> <code>dump_noswiss</code> \u2013 </li> <li> <code>dump_swiss</code> \u2013 </li> <li> <code>dump</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>align</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.is_swiss","title":"is_swiss <code>staticmethod</code>","text":"<pre><code>is_swiss() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.field_offsets_noswiss","title":"field_offsets_noswiss <code>staticmethod</code>","text":"<pre><code>field_offsets_noswiss() -&gt; dict[str, int]\n</code></pre> <p>The layout for pre-1.24 maps 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>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.field_offsets_swiss","title":"field_offsets_swiss <code>staticmethod</code>","text":"<pre><code>field_offsets_swiss() -&gt; dict[str, int]\n</code></pre> <p>The layout for post-1.24 maps is as follows (taken from src/internal/runtime/map.go commit 4e63ae4):</p> <p>type Map struct { used uint64 seed uintptr dirPtr unsafe.Pointer dirLen int globalDepth uint8 globalShift uint8 writing uint8 tombstonePossible bool clearSeq uint64 }</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.field_offsets_swiss_inner","title":"field_offsets_swiss_inner <code>staticmethod</code>","text":"<pre><code>field_offsets_swiss_inner() -&gt; dict[str, int]\n</code></pre> <p>The layout for the inner swissmap is as follows (taken from src/internal/runtime/maps/table.go commit 4e63ae4):</p> <p>type table struct { used uint16 capacity uint16 growthLeft uint16 localDepth uint8 index int groups groupsReference }</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.field_offsets","title":"field_offsets <code>classmethod</code>","text":"<pre><code>field_offsets() -&gt; dict[str, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.format_entries","title":"format_entries <code>staticmethod</code>","text":"<pre><code>format_entries(\n entries: list[tuple[int, int, str, str]], fmt: FormatOpts = FormatOpts()\n) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.dump_noswiss","title":"dump_noswiss","text":"<pre><code>dump_noswiss(addr: int, fmt: FormatOpts = FormatOpts()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.dump_swiss","title":"dump_swiss","text":"<pre><code>dump_swiss(addr: int, fmt: FormatOpts = FormatOpts()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.dump","title":"dump","text":"<pre><code>dump(addr: int, fmt: FormatOpts = FormatOpts()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.size","title":"size","text":"<pre><code>size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.MapType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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__() -&gt; 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 algn: int | None = None,\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>align</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>algn</code> (<code>int | None</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.algn","title":"algn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>algn: int | None = None\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()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.size","title":"size","text":"<pre><code>size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.additional_metadata","title":"additional_metadata","text":"<pre><code>additional_metadata() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.StructType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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__() -&gt; 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>align</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>algn</code> (<code>int | None</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.algn","title":"algn <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>algn: int | None = field(init=False, default=None)\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()) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.size","title":"size","text":"<pre><code>size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.align","title":"align","text":"<pre><code>align() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.get_typename","title":"get_typename","text":"<pre><code>get_typename() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.RuntimeType.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; 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() -&gt; 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__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.word_size","title":"word_size","text":"<pre><code>word_size() -&gt; 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/49cdf0c42e320dfed044baa551610f081eafb781/src/cmd/compile/internal/types2/sizes.go#L230-L249</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.max_align","title":"max_align","text":"<pre><code>max_align() -&gt; int\n</code></pre> <p>Gets the Go maximum alignment for the current architecture.</p> <p>Values taken from https://github.com/golang/go/blob/49cdf0c42e320dfed044baa551610f081eafb781/src/cmd/compile/internal/types2/sizes.go#L230-L249</p>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.compute_offsets","title":"compute_offsets","text":"<pre><code>compute_offsets(fields: Iterable[tuple[int, int]]) -&gt; 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]]) -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.load_int","title":"load_int","text":"<pre><code>load_int(data: bytes) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/godbg/#pwndbg.aglib.godbg.load_float","title":"load_float","text":"<pre><code>load_float(data: bytes) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/","title":"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>mallocng</code> \u2013 <p>Implements handling of musl's allocator mallocng.</p> </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>extra_hint_for_gdb</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.extra_hint_for_gdb","title":"extra_hint_for_gdb <code>module-attribute</code>","text":"<pre><code>extra_hint_for_gdb = \"\\nIn addition, even you have the debug symbols of libc, you might still see the\\nfollowing warning when debugging a multi-threaded program:\\n```\\nwarning: Unable to find libthread_db matching inferior's thread library, thread\\ndebugging will not be available.\\n```\\n\\nYou'll need to ensure that the correct `libthread_db.so` is loaded. To do this,\\nset the search path using:\\n```\\nset libthread-db-search-path &lt;path having correct libthread_db.so&gt;\\n```\\nThen, restart your program to enable proper thread debugging.\\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=\"Values explained:\\n\\n+ `auto` - Pwndbg will try to use heuristics if debug symbols are missing\\n+ `force` - Pwndbg will always try to use heuristics, even if debug symbols are available\\n+ `never` - Pwndbg will never use heuristics to resolve the heap\\n\\nIf the output of the heap related command produces errors with heuristics, you\\ncan try manually setting the libc symbol addresses.\\nFor this, see the `heap_config` command output and set the `main_arena`, `mp_`,\\n`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\\nif 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\\n32-bit binaries):\\n```bash\\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\\nenvironment variable manually like this:\\n```bash\\nexport DEBUGINFOD_URLS=https://debuginfod.archlinux.org\\n```\\n\"\n + extra_hint_for_gdb,\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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/#pwndbg.aglib.heap.reset","title":"reset","text":"<pre><code>reset() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/heap/","title":"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>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.containing","title":"containing","text":"<pre><code>containing(address: int) -&gt; 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() -&gt; 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() -&gt; 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":"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 &lt;&lt; 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 &lt;&lt; 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 &lt;&lt; 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() -&gt; 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) -&gt; 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) -&gt; 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 &lt;= 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/mallocng/","title":"mallocng","text":""},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng","title":"mallocng","text":"<p>Implements handling of musl's allocator mallocng. https://elixir.bootlin.com/musl/v1.2.5/source/src/malloc/mallocng</p> <p>Classes:</p> <ul> <li> <code>SlotState</code> \u2013 </li> <li> <code>Group</code> \u2013 <p>A group is an array of slots.</p> </li> <li> <code>Slot</code> \u2013 <p>The \"unit of allocation\" (analogous to glibc's \"chunk\").</p> </li> <li> <code>GroupedSlot</code> \u2013 <p>This is not a mallocng concept, this is a pwndbg abstraction.</p> </li> <li> <code>Meta</code> \u2013 <p>The metadata of a group.</p> </li> <li> <code>MetaArea</code> \u2013 <p>Slabs that contain metas, linked in a singly-linked list.</p> </li> <li> <code>MallocContext</code> \u2013 <p>The global object that holds all allocator state.</p> </li> <li> <code>Mallocng</code> \u2013 <p>Tracks the allocator state.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>int_size</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>UNIT</code> (<code>int</code>) \u2013 </li> <li> <code>IB</code> (<code>int</code>) \u2013 </li> <li> <code>size_classes</code> (<code>list[int]</code>) \u2013 </li> <li> <code>mallocng</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.UNIT","title":"UNIT <code>module-attribute</code>","text":"<pre><code>UNIT: int = 16\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.IB","title":"IB <code>module-attribute</code>","text":"<pre><code>IB: int = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.size_classes","title":"size_classes <code>module-attribute</code>","text":"<pre><code>size_classes: list[int] = [\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10,\n 12,\n 15,\n 18,\n 20,\n 25,\n 31,\n 36,\n 42,\n 50,\n 63,\n 72,\n 84,\n 102,\n 127,\n 146,\n 170,\n 204,\n 255,\n 292,\n 340,\n 409,\n 511,\n 584,\n 682,\n 818,\n 1023,\n 1169,\n 1364,\n 1637,\n 2047,\n 2340,\n 2730,\n 3276,\n 4095,\n 4680,\n 5460,\n 6552,\n 8191,\n]\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.mallocng","title":"mallocng <code>module-attribute</code>","text":"<pre><code>mallocng = Mallocng()\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.SlotState","title":"SlotState","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>ALLOCATED</code> \u2013 </li> <li> <code>FREED</code> \u2013 </li> <li> <code>AVAIL</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.SlotState.ALLOCATED","title":"ALLOCATED <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ALLOCATED = 'allocated'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.SlotState.FREED","title":"FREED <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>FREED = 'freed'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.SlotState.AVAIL","title":"AVAIL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>AVAIL = 'available'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group","title":"Group","text":"<pre><code>Group(addr: int)\n</code></pre> <p>A group is an array of slots.</p> <p>https://elixir.bootlin.com/musl/v1.2.5/source/src/malloc/mallocng/meta.h#L17 struct group { struct meta *meta; unsigned char active_idx:5; char pad[UNIT - sizeof(struct meta *) - 1]; unsigned char storage[]; };</p> <p>Methods:</p> <ul> <li> <code>preload</code> \u2013 <p>Read all the necessary process memory to populate the group's</p> </li> <li> <code>set_meta</code> \u2013 <p>Sets the meta object for this group.</p> </li> <li> <code>at_index</code> \u2013 <p>Get the address of the slot at index idx.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>addr</code> \u2013 </li> <li> <code>meta</code> (<code>Meta</code>) \u2013 <p>Raises:</p> </li> <li> <code>active_idx</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>storage</code> (<code>int</code>) \u2013 </li> <li> <code>group_size</code> (<code>int</code>) \u2013 <p>The size of this group, in bytes.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr = addr\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.meta","title":"meta <code>property</code>","text":"<pre><code>meta: Meta\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.active_idx","title":"active_idx <code>property</code>","text":"<pre><code>active_idx: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.storage","title":"storage <code>property</code>","text":"<pre><code>storage: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.group_size","title":"group_size <code>property</code>","text":"<pre><code>group_size: int\n</code></pre> <p>The size of this group, in bytes.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading meta fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.preload","title":"preload","text":"<pre><code>preload() -&gt; None\n</code></pre> <p>Read all the necessary process memory to populate the group's fields.</p> <p>Do this if you know you will be using most of the fields of the group. It will be faster, since we can do one reads instead of two small ones. You may also catch inaccessible memory exceptions here and not worry about it later.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.set_meta","title":"set_meta","text":"<pre><code>set_meta(meta: Meta) -&gt; None\n</code></pre> <p>Sets the meta object for this group.</p> <p>If the meta for this group is already calculated by the callee, use this to prevent it from being wastefully recalculated.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Group.at_index","title":"at_index","text":"<pre><code>at_index(idx: int) -&gt; int\n</code></pre> <p>Get the address of the slot at index idx.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot","title":"Slot","text":"<pre><code>Slot(p: int)\n</code></pre> <p>The \"unit of allocation\" (analogous to glibc's \"chunk\"). There is no struct in the source code that describes it.</p> <p>Methods:</p> <ul> <li> <code>preload</code> \u2013 <p>Read all the necessary process memory to populate the slot's</p> </li> <li> <code>preload_meta_dependants</code> \u2013 <p>Preloads all fields that depend on a sane meta.</p> </li> <li> <code>is_cyclic</code> \u2013 <p>Returns whether mallocng reports that p != start.</p> </li> <li> <code>contains_group</code> \u2013 <p>Does this slot nest a group?</p> </li> <li> <code>set_group</code> \u2013 <p>If the slot is FREED or AVAIL, it is impossible for it to</p> </li> <li> <code>from_p</code> \u2013 </li> <li> <code>from_start</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>p</code> (<code>int</code>) \u2013 </li> <li> <code>offset</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>pn3</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>idx</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>reserved_in_header</code> (<code>int</code>) \u2013 </li> <li> <code>big_offset_check</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>start</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>cyclic_offset</code> (<code>int</code>) \u2013 <p>Returns zero if is_cyclic() is False.</p> </li> <li> <code>startn3</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>reserved_in_footer</code> (<code>int</code>) \u2013 <p>Returns -1 if the value is invalid, i.e.</p> </li> <li> <code>end</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>reserved</code> (<code>int</code>) \u2013 <p>Returns 0 if reserved_in_header() == 6.</p> </li> <li> <code>nominal_size</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>user_size</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>slack</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>group</code> (<code>Group</code>) \u2013 </li> <li> <code>meta</code> (<code>Meta</code>) \u2013 <p>Raises:</p> </li> <li> <code>slot_state</code> (<code>SlotState</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.p","title":"p <code>instance-attribute</code>","text":"<pre><code>p: int = p\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.offset","title":"offset <code>property</code>","text":"<pre><code>offset: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.pn3","title":"pn3 <code>property</code>","text":"<pre><code>pn3: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.idx","title":"idx <code>property</code>","text":"<pre><code>idx: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.reserved_in_header","title":"reserved_in_header <code>property</code>","text":"<pre><code>reserved_in_header: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.big_offset_check","title":"big_offset_check <code>property</code>","text":"<pre><code>big_offset_check: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.start","title":"start <code>property</code>","text":"<pre><code>start: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading meta fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.cyclic_offset","title":"cyclic_offset <code>property</code>","text":"<pre><code>cyclic_offset: int\n</code></pre> <p>Returns zero if is_cyclic() is False.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading meta fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.startn3","title":"startn3 <code>property</code>","text":"<pre><code>startn3: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.reserved_in_footer","title":"reserved_in_footer <code>property</code>","text":"<pre><code>reserved_in_footer: int\n</code></pre> <p>Returns -1 if the value is invalid, i.e. reserved_in_header() != 5.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.end","title":"end <code>property</code>","text":"<pre><code>end: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading meta fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.reserved","title":"reserved <code>property</code>","text":"<pre><code>reserved: int\n</code></pre> <p>Returns 0 if reserved_in_header() == 6. Returns -1 if reserved_in_header() == 7.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.nominal_size","title":"nominal_size <code>property</code>","text":"<pre><code>nominal_size: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading meta fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.user_size","title":"user_size <code>property</code>","text":"<pre><code>user_size: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading meta fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.slack","title":"slack <code>property</code>","text":"<pre><code>slack: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading meta fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.group","title":"group <code>property</code>","text":"<pre><code>group: Group\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.meta","title":"meta <code>property</code>","text":"<pre><code>meta: Meta\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.slot_state","title":"slot_state <code>property</code>","text":"<pre><code>slot_state: SlotState\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.preload","title":"preload","text":"<pre><code>preload() -&gt; None\n</code></pre> <p>Read all the necessary process memory to populate the slot's p header fields.</p> <p>Do this if you know you will be using most of the fields of the slot. It will be faster, since we can do a few big reads instead of many small ones. You may also catch inaccessible memory exceptions here and not worry about it later.</p> <p>Fields dependant on the meta are not loaded - you will still need to worry about exceptions coming from them.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.preload_meta_dependants","title":"preload_meta_dependants","text":"<pre><code>preload_meta_dependants() -&gt; None\n</code></pre> <p>Preloads all fields that depend on a sane meta.</p> <p>It generally only makes sense to run this after preload(). Calling this reduces the amount of process writes and centralizes field exceptions to this function.</p> <p>If both preload() and preload_meta_dependants() return without exceptions, all the fields in this class are guaranteed to not cause any more memory reads nor raise any more exceptions.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When the meta is corrupt and/or reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.is_cyclic","title":"is_cyclic","text":"<pre><code>is_cyclic() -&gt; int\n</code></pre> <p>Returns whether mallocng reports that p != start.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.contains_group","title":"contains_group","text":"<pre><code>contains_group() -&gt; bool\n</code></pre> <p>Does this slot nest a group?</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.set_group","title":"set_group","text":"<pre><code>set_group(group: Group) -&gt; None\n</code></pre> <p>If the slot is FREED or AVAIL, it is impossible for it to recover the start of its group, and ergo its meta.</p> <p>You can thus use this to set it externally.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.from_p","title":"from_p <code>classmethod</code>","text":"<pre><code>from_p(p: int) -&gt; 'Slot'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Slot.from_start","title":"from_start <code>classmethod</code>","text":"<pre><code>from_start(start: int) -&gt; 'Slot'\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot","title":"GroupedSlot","text":"<pre><code>GroupedSlot(group: Group, idx: int)\n</code></pre> <p>This is not a mallocng concept, this is a pwndbg abstraction.</p> <p>A Slot object uses its inband metadata to recover all its fields and uncover more information about itself by locating its group and meta. It works essentially the same way mallocng's free() works.</p> <p>However, if a slot is freed or available, most of its in-band metadata will be invalid and it will not be able to recover group and meta. But, given the start of the slot, we can infer which group it belongs to and what its index is by walking allocator state i.e. ctx i.e. by using Mallocng.find_slot().</p> <p>A GroupedSlot then describes all information we can glean about a slot which is described by a (group, idx) pair. Many of its fields can be completely different from a Slot at the same location. They are guaranteed to be the same only if the slot is ALLOCATED and hasn't been corrupted.</p> <p>Not all fields that are available in Slot are available in GroupedSlot.</p> <p>Make sure the group you are passing to the constructor points to a valid meta object.</p> <p>Attributes:</p> <ul> <li> <code>group</code> \u2013 </li> <li> <code>meta</code> \u2013 </li> <li> <code>idx</code> \u2013 </li> <li> <code>stride</code> \u2013 </li> <li> <code>slot_state</code> \u2013 </li> <li> <code>start</code> \u2013 </li> <li> <code>end</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot.group","title":"group <code>instance-attribute</code>","text":"<pre><code>group = group\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot.meta","title":"meta <code>instance-attribute</code>","text":"<pre><code>meta = meta\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot.idx","title":"idx <code>instance-attribute</code>","text":"<pre><code>idx = idx\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot.stride","title":"stride <code>instance-attribute</code>","text":"<pre><code>stride = stride\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot.slot_state","title":"slot_state <code>instance-attribute</code>","text":"<pre><code>slot_state = slotstate_at_index(idx)\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot.start","title":"start <code>instance-attribute</code>","text":"<pre><code>start = storage + stride * idx\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.GroupedSlot.end","title":"end <code>instance-attribute</code>","text":"<pre><code>end = start + stride - IB\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta","title":"Meta","text":"<pre><code>Meta(addr: int)\n</code></pre> <p>The metadata of a group.</p> <p>https://elixir.bootlin.com/musl/v1.2.5/source/src/malloc/mallocng/meta.h#L24 struct meta { struct meta *prev, *next; struct group *mem; volatile int avail_mask, freed_mask; uintptr_t last_idx:5; uintptr_t freeable:1; uintptr_t sizeclass:6; uintptr_t maplen:8*sizeof(uintptr_t)-12; };</p> <p>Methods:</p> <ul> <li> <code>preload</code> \u2013 <p>Read all the necessary process memory to populate the meta's</p> </li> <li> <code>parent_group</code> \u2013 <p>If this group is nested, returns the address of the group which</p> </li> <li> <code>root_group</code> \u2013 <p>Returns the topmost/biggest parent group. It will never be a nested</p> </li> <li> <code>slotstate_at_index</code> \u2013 </li> <li> <code>sizeof</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>addr</code> (<code>int</code>) \u2013 </li> <li> <code>prev</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>next</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>mem</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>avail_mask</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>freed_mask</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>last_idx</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>freeable</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>sizeclass</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>maplen</code> (<code>int</code>) \u2013 <p>Raises:</p> </li> <li> <code>stride</code> (<code>int</code>) \u2013 <p>Returns -1 if sizeclass &gt;= len(size_classes).</p> </li> <li> <code>cnt</code> (<code>int</code>) \u2013 <p>Number of slots in the group.</p> </li> <li> <code>is_donated</code> (<code>bool</code>) \u2013 <p>Returns whether the group object referred to by this meta has been</p> </li> <li> <code>is_mmaped</code> (<code>bool</code>) \u2013 <p>Returns whether the group object referred to by this meta has been</p> </li> <li> <code>is_nested</code> (<code>bool</code>) \u2013 <p>Returns whether the group object referred to by this meta has been</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr: int = addr\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.prev","title":"prev <code>property</code>","text":"<pre><code>prev: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.next","title":"next <code>property</code>","text":"<pre><code>next: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.mem","title":"mem <code>property</code>","text":"<pre><code>mem: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.avail_mask","title":"avail_mask <code>property</code>","text":"<pre><code>avail_mask: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.freed_mask","title":"freed_mask <code>property</code>","text":"<pre><code>freed_mask: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.last_idx","title":"last_idx <code>property</code>","text":"<pre><code>last_idx: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.freeable","title":"freeable <code>property</code>","text":"<pre><code>freeable: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.sizeclass","title":"sizeclass <code>property</code>","text":"<pre><code>sizeclass: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.maplen","title":"maplen <code>property</code>","text":"<pre><code>maplen: int\n</code></pre> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.stride","title":"stride <code>property</code>","text":"<pre><code>stride: int\n</code></pre> <p>Returns -1 if sizeclass &gt;= len(size_classes).</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.cnt","title":"cnt <code>property</code>","text":"<pre><code>cnt: int\n</code></pre> <p>Number of slots in the group.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.is_donated","title":"is_donated <code>property</code>","text":"<pre><code>is_donated: bool\n</code></pre> <p>Returns whether the group object referred to by this meta has been created by being donated by ld.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.is_mmaped","title":"is_mmaped <code>property</code>","text":"<pre><code>is_mmaped: bool\n</code></pre> <p>Returns whether the group object referred to by this meta has been created by being mmaped.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.is_nested","title":"is_nested <code>property</code>","text":"<pre><code>is_nested: bool\n</code></pre> <p>Returns whether the group object referred to by this meta has been created by being nested into a slot.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.preload","title":"preload","text":"<pre><code>preload() -&gt; None\n</code></pre> <p>Read all the necessary process memory to populate the meta's fields.</p> <p>Do this if you know you will be using most of the fields of the meta. It will be faster, since we can do a one big read instead of many small ones. You may also catch inaccessible memory exceptions here and not worry about it later.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>When reading memory fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.parent_group","title":"parent_group","text":"<pre><code>parent_group() -&gt; int\n</code></pre> <p>If this group is nested, returns the address of the group which contains the slot in which this group is in. Otherwise, returns -1.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.root_group","title":"root_group","text":"<pre><code>root_group() -&gt; Group\n</code></pre> <p>Returns the topmost/biggest parent group. It will never be a nested group. If this group isn't nested, this group is returned.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.slotstate_at_index","title":"slotstate_at_index","text":"<pre><code>slotstate_at_index(idx: int) -&gt; SlotState\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Meta.sizeof","title":"sizeof <code>staticmethod</code>","text":"<pre><code>sizeof() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea","title":"MetaArea","text":"<pre><code>MetaArea(addr: int)\n</code></pre> <p>Slabs that contain metas, linked in a singly-linked list.</p> <p>https://elixir.bootlin.com/musl/v1.2.5/source/src/malloc/mallocng/meta.h#L34 struct meta_area { uint64_t check; struct meta_area *next; int nslots; struct meta slots[]; };</p> <p>Methods:</p> <ul> <li> <code>load</code> \u2013 </li> <li> <code>at_index</code> \u2013 <p>Returns the address of the meta object located</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>addr</code> (<code>int</code>) \u2013 </li> <li> <code>check</code> (<code>int</code>) \u2013 </li> <li> <code>meta_area</code> (<code>int</code>) \u2013 </li> <li> <code>nslots</code> (<code>int</code>) \u2013 </li> <li> <code>slots</code> (<code>int</code>) \u2013 </li> <li> <code>area_size</code> (<code>int</code>) \u2013 <p>Returns not the size of <code>struct meta_area</code> but rather</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr: int = addr\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.check","title":"check <code>instance-attribute</code>","text":"<pre><code>check: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.meta_area","title":"meta_area <code>instance-attribute</code>","text":"<pre><code>meta_area: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.nslots","title":"nslots <code>instance-attribute</code>","text":"<pre><code>nslots: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.slots","title":"slots <code>instance-attribute</code>","text":"<pre><code>slots: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.area_size","title":"area_size <code>property</code>","text":"<pre><code>area_size: int\n</code></pre> <p>Returns not the size of <code>struct meta_area</code> but rather the size of the memory this object represents.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.load","title":"load","text":"<pre><code>load() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MetaArea.at_index","title":"at_index","text":"<pre><code>at_index(idx: int) -&gt; int\n</code></pre> <p>Returns the address of the meta object located at index idx.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext","title":"MallocContext","text":"<pre><code>MallocContext(addr: int)\n</code></pre> <p>The global object that holds all allocator state.</p> <p>https://elixir.bootlin.com/musl/v1.2.5/source/src/malloc/mallocng/meta.h#L41 struct malloc_context { uint64_t secret;</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext--ifndef-pagesize","title":"ifndef PAGESIZE","text":"<p>size_t pagesize;</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext--endif","title":"endif","text":"<p>int init_done; unsigned mmap_counter; struct meta *free_meta_head; struct meta *avail_meta; size_t avail_meta_count, avail_meta_area_count, meta_alloc_shift; struct meta_area *meta_area_head, *meta_area_tail; unsigned char *avail_meta_areas; struct meta *active[48]; size_t usage_by_class[48]; uint8_t unmap_seq[32], bounces[32]; uint8_t seq; uintptr_t brk; };</p> <p>Methods:</p> <ul> <li> <code>load</code> \u2013 </li> <li> <code>looks_valid</code> \u2013 <p>Returns true if this object looks like a valid <code>struct malloc_context</code> object</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>addr</code> (<code>int</code>) \u2013 </li> <li> <code>secret</code> (<code>int</code>) \u2013 </li> <li> <code>pagesize</code> (<code>int</code>) \u2013 </li> <li> <code>init_done</code> (<code>int</code>) \u2013 </li> <li> <code>mmap_counter</code> (<code>int</code>) \u2013 </li> <li> <code>free_meta_head</code> (<code>int</code>) \u2013 </li> <li> <code>avail_meta</code> (<code>int</code>) \u2013 </li> <li> <code>avail_meta_count</code> (<code>int</code>) \u2013 </li> <li> <code>avail_meta_area_count</code> (<code>int</code>) \u2013 </li> <li> <code>meta_alloc_shift</code> (<code>int</code>) \u2013 </li> <li> <code>meta_area_head</code> (<code>int</code>) \u2013 </li> <li> <code>meta_area_tail</code> (<code>int</code>) \u2013 </li> <li> <code>avail_meta_areas</code> (<code>int</code>) \u2013 </li> <li> <code>active</code> (<code>list[int]</code>) \u2013 </li> <li> <code>usage_by_class</code> (<code>list[int]</code>) \u2013 </li> <li> <code>unmap_seq</code> (<code>list[int]</code>) \u2013 </li> <li> <code>bounces</code> (<code>list[int]</code>) \u2013 </li> <li> <code>seq</code> (<code>int</code>) \u2013 </li> <li> <code>brk</code> (<code>int</code>) \u2013 </li> <li> <code>sizeof</code> (<code>int</code>) \u2013 </li> <li> <code>has_pagesize_field</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr: int = addr\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.secret","title":"secret <code>instance-attribute</code>","text":"<pre><code>secret: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.pagesize","title":"pagesize <code>instance-attribute</code>","text":"<pre><code>pagesize: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.init_done","title":"init_done <code>instance-attribute</code>","text":"<pre><code>init_done: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.mmap_counter","title":"mmap_counter <code>instance-attribute</code>","text":"<pre><code>mmap_counter: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.free_meta_head","title":"free_meta_head <code>instance-attribute</code>","text":"<pre><code>free_meta_head: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.avail_meta","title":"avail_meta <code>instance-attribute</code>","text":"<pre><code>avail_meta: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.avail_meta_count","title":"avail_meta_count <code>instance-attribute</code>","text":"<pre><code>avail_meta_count: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.avail_meta_area_count","title":"avail_meta_area_count <code>instance-attribute</code>","text":"<pre><code>avail_meta_area_count: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.meta_alloc_shift","title":"meta_alloc_shift <code>instance-attribute</code>","text":"<pre><code>meta_alloc_shift: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.meta_area_head","title":"meta_area_head <code>instance-attribute</code>","text":"<pre><code>meta_area_head: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.meta_area_tail","title":"meta_area_tail <code>instance-attribute</code>","text":"<pre><code>meta_area_tail: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.avail_meta_areas","title":"avail_meta_areas <code>instance-attribute</code>","text":"<pre><code>avail_meta_areas: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.active","title":"active <code>instance-attribute</code>","text":"<pre><code>active: list[int] = []\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.usage_by_class","title":"usage_by_class <code>instance-attribute</code>","text":"<pre><code>usage_by_class: list[int] = []\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.unmap_seq","title":"unmap_seq <code>instance-attribute</code>","text":"<pre><code>unmap_seq: list[int] = []\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.bounces","title":"bounces <code>instance-attribute</code>","text":"<pre><code>bounces: list[int] = []\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.seq","title":"seq <code>instance-attribute</code>","text":"<pre><code>seq: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.brk","title":"brk <code>instance-attribute</code>","text":"<pre><code>brk: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.sizeof","title":"sizeof <code>instance-attribute</code>","text":"<pre><code>sizeof: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.has_pagesize_field","title":"has_pagesize_field <code>instance-attribute</code>","text":"<pre><code>has_pagesize_field: bool = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.load","title":"load","text":"<pre><code>load() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.MallocContext.looks_valid","title":"looks_valid","text":"<pre><code>looks_valid() -&gt; bool\n</code></pre> <p>Returns true if this object looks like a valid <code>struct malloc_context</code> object describing an initialized heap. False otherwise.</p> <p>This is used by <code>class Mallocng</code> to find the correct ctx object.</p> <p>We consider it invalid if the heap reads as uninitialized because: 1. Performing this check filters out invalid ctx objects very well. 2. When musl is dynmically linked, due to the ld donation logic, the heap will usually be initialized before the start of main().</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng","title":"Mallocng","text":"<pre><code>Mallocng()\n</code></pre> <p> Bases: <code>MemoryAllocator</code></p> <p>Tracks the allocator state. By leveraging the __malloc_context symbol.</p> <p>Import this singleton class like: from pwndbg.aglib.heap.mallocng import mallocng as ng</p> <p>and make sure that you have run ng.init_if_needed() before you used the object.</p> <p>Methods:</p> <ul> <li> <code>init_if_needed</code> \u2013 <p>We want this class to be a singleton, but also we can't</p> </li> <li> <code>set_ctx_addr</code> \u2013 <p>Find where the __malloc_context global symbol is. Try using debug information,</p> </li> <li> <code>libc_has_debug_syms</code> \u2013 </li> <li> <code>find_slot</code> \u2013 <p>Get the slot which contains this address.</p> </li> <li> <code>containing</code> \u2013 <p>Same as find_slot() but returns only the <code>start</code> address of the slot, or zero</p> </li> <li> <code>get_free_metas</code> \u2013 <p>Get all free metas by traversing the ctx.free_meta_head doubly</p> </li> <li> <code>meta_is_avail</code> \u2013 <p>Checks whether a meta is available.</p> </li> <li> <code>is_initialized</code> \u2013 <p>Returns whether the allocator is initialized or not.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>finished_init</code> (<code>bool</code>) \u2013 </li> <li> <code>ctx_addr</code> (<code>int</code>) \u2013 </li> <li> <code>ctx</code> (<code>MallocContext | None</code>) \u2013 </li> <li> <code>has_debug_syms</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.finished_init","title":"finished_init <code>instance-attribute</code>","text":"<pre><code>finished_init: bool = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.ctx_addr","title":"ctx_addr <code>instance-attribute</code>","text":"<pre><code>ctx_addr: int = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.ctx","title":"ctx <code>instance-attribute</code>","text":"<pre><code>ctx: MallocContext | None = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.has_debug_syms","title":"has_debug_syms <code>instance-attribute</code>","text":"<pre><code>has_debug_syms: bool = False\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.init_if_needed","title":"init_if_needed","text":"<pre><code>init_if_needed() -&gt; bool\n</code></pre> <p>We want this class to be a singleton, but also we can't initialize it as soon as pwndbg is loaded.</p> <p>Users of the object are responsible for calling this to make sure the object is initialized. This also ensures our view of the heap is up-to-date.</p> <p>Returns:</p> <ul> <li> <code>bool</code> \u2013 <p>True if this object is successfully initialized (whether</p> </li> <li> <code>bool</code> \u2013 <p>now or before). False otherswise. If this returns False</p> </li> <li> <code>bool</code> \u2013 <p>you may not use this object for heap operations.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.set_ctx_addr","title":"set_ctx_addr","text":"<pre><code>set_ctx_addr() -&gt; None\n</code></pre> <p>Find where the __malloc_context global symbol is. Try using debug information, but if it isn't available try using a heuristic.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.libc_has_debug_syms","title":"libc_has_debug_syms","text":"<pre><code>libc_has_debug_syms() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.find_slot","title":"find_slot","text":"<pre><code>find_slot(\n address: int, metadata: bool = False, shallow: bool = False\n) -&gt; tuple[GroupedSlot | None, Slot | None]\n</code></pre> <p>Get the slot which contains this address.</p> <p>We say a slot \"contains\" an address, if the address is in [start, start + stride). Thus, this will match the previous slot if you provide the address of the header inband metadata of a slot.</p> <p>If <code>metadata</code> is True, then we check [start - IB, end) for containment.</p> <p>If <code>shallow</code> is True, return the biggest slot which contains this address. The group that owns this slot will not be a nested group.</p> <p>Returns (None, None) if nothing is found.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.containing","title":"containing","text":"<pre><code>containing(address: int, metadata: bool = False, shallow: bool = False) -&gt; int\n</code></pre> <p>Same as find_slot() but returns only the <code>start</code> address of the slot, or zero if no slot is found.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.get_free_metas","title":"get_free_metas","text":"<pre><code>get_free_metas() -&gt; dict[int, tuple[int, Meta]]\n</code></pre> <p>Get all free metas by traversing the ctx.free_meta_head doubly linked list. Map them to their index in the list.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>If some meta cannot be read or is corrupted.</p> </li> </ul> <p>Returns:</p> <ul> <li> <code>dict[int, tuple[int, Meta]]</code> \u2013 <p>A dictionary that maps: meta address -&gt; (meta index in list, Meta object).</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.meta_is_avail","title":"meta_is_avail","text":"<pre><code>meta_is_avail(addr: int) -&gt; bool\n</code></pre> <p>Checks whether a meta is available.</p>"},{"location":"reference/pwndbg/aglib/heap/mallocng/#pwndbg.aglib.heap.mallocng.Mallocng.is_initialized","title":"is_initialized","text":"<pre><code>is_initialized() -&gt; 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/mallocng/#pwndbg.aglib.heap.mallocng.int_size","title":"int_size","text":"<pre><code>int_size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/","title":"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>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.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() -&gt; 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) -&gt; 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) -&gt; 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 &lt;= ptr &lt; 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) -&gt; bool\n</code></pre> <p>This allow us to avoid extra constructions like 'if start_addr &lt;= ptr &lt; 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) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Heap.__str__","title":"__str__","text":"<pre><code>__str__() -&gt; 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() -&gt; Bins\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.Arena.__str__","title":"__str__","text":"<pre><code>__str__() -&gt; 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>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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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]) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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.containing","title":"containing","text":"<pre><code>containing(address: int) -&gt; 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>can_be_resolved</code> \u2013 </li> <li> <code>has_tcache</code> \u2013 </li> <li> <code>get_heap</code> \u2013 <p>Find &amp; 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>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>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.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.can_be_resolved","title":"can_be_resolved","text":"<pre><code>can_be_resolved() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.has_tcache","title":"has_tcache","text":"<pre><code>has_tcache() -&gt; 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) -&gt; Value | None\n</code></pre> <p>Find &amp; 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) -&gt; 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() -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.DebugSymsHeap.containing","title":"containing","text":"<pre><code>containing(address: int) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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]) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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 &amp; 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>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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 'pwndbg.aglib.heap.structs.HeapInfo' | None\n</code></pre> <p>Find &amp; 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) -&gt; \"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() -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/ptmalloc/#pwndbg.aglib.heap.ptmalloc.HeuristicHeap.containing","title":"containing","text":"<pre><code>containing(address: int) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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]) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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":"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 &lt; 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 &lt; 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 &gt;= 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 &lt; 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 2.30 &lt;= GLIBC &lt; 2.42 as a ctypes struct.</p> </li> <li> <code>c_tcache_perthread_struct_2_42</code> \u2013 <p>This class represents the tcache_perthread_struct for 2.42 &lt;= GLIBC 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 &lt; 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 &gt;= 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 &lt; 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 &lt; 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 &gt;= 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 &gt;= 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 &gt;= 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_SMALL_BINS</code> \u2013 </li> <li> <code>TCACHE_LARGE_BINS</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_SMALL_BINS","title":"TCACHE_SMALL_BINS <code>module-attribute</code>","text":"<pre><code>TCACHE_SMALL_BINS = 64\n</code></pre>"},{"location":"reference/pwndbg/aglib/heap/structs/#pwndbg.aglib.heap.structs.TCACHE_LARGE_BINS","title":"TCACHE_LARGE_BINS <code>module-attribute</code>","text":"<pre><code>TCACHE_LARGE_BINS = 12\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 = TCACHE_SMALL_BINS + TCACHE_LARGE_BINS\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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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 &lt; 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 &lt; 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 &gt;= 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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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 &amp; 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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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 &lt; 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 2.30 &lt;= GLIBC &lt; 2.42 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.c_tcache_perthread_struct_2_42","title":"c_tcache_perthread_struct_2_42","text":"<p> Bases: <code>Structure</code></p> <p>This class represents the tcache_perthread_struct for 2.42 &lt;= GLIBC as a ctypes struct.</p> <p>https://elixir.bootlin.com/glibc/glibc-2.42/source/malloc/malloc.c#L3127</p> <p>typedef struct tcache_perthread_struct { uint16_t num_slots[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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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 &lt; 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 &gt;= 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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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 &lt; 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 &lt; 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 &gt;= 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 &gt;= 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 &gt;= 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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/","title":"kernel","text":""},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel","title":"kernel","text":"<p>Modules:</p> <ul> <li> <code>bpf</code> \u2013 </li> <li> <code>buddydump</code> \u2013 </li> <li> <code>dmabuf</code> \u2013 </li> <li> <code>kallsyms</code> \u2013 </li> <li> <code>kmod</code> \u2013 </li> <li> <code>macros</code> \u2013 </li> <li> <code>nftables</code> \u2013 </li> <li> <code>paging</code> \u2013 </li> <li> <code>rbtree</code> \u2013 </li> <li> <code>slab</code> \u2013 </li> <li> <code>symbol</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_symbols</code> \u2013 </li> <li> <code>has_debug_info</code> \u2013 </li> <li> <code>requires_debug_symbols</code> \u2013 </li> <li> <code>requires_debug_info</code> \u2013 </li> <li> <code>nproc</code> \u2013 <p>Returns the number of processing units available, similar to nproc(1)</p> </li> <li> <code>first_kernel_ro_page</code> \u2013 <p>Returns the first kernel mapping which contains the linux_banner</p> </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>get_idt_entries</code> \u2013 <p>Retrieves the IDT entries from memory.</p> </li> <li> <code>arch_paginginfo</code> \u2013 </li> <li> <code>arch_ops</code> \u2013 </li> <li> <code>arch_symbols</code> \u2013 </li> <li> <code>ptr_size</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>kbase</code> \u2013 </li> <li> <code>pagewalk</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> <li> <code>node_data</code> \u2013 </li> <li> <code>slab_caches</code> \u2013 </li> <li> <code>per_cpu_offset</code> \u2013 </li> <li> <code>modules</code> \u2013 </li> <li> <code>db_list</code> \u2013 </li> <li> <code>prog_idr</code> \u2013 </li> <li> <code>map_idr</code> \u2013 </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>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> <p>Attributes:</p> <ul> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> <li> <code>phys_offset</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>vmemmap</code> (<code>int</code>) \u2013 </li> <li> <code>kbase</code> (<code>int | None</code>) \u2013 </li> <li> <code>ptr_size</code> (<code>int</code>) \u2013 </li> <li> <code>page_size</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.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.ArchOps.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.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.ArchOps.vmemmap","title":"vmemmap <code>property</code>","text":"<pre><code>vmemmap: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.kbase","title":"kbase <code>property</code>","text":"<pre><code>kbase: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ArchOps.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.ArchOps.page_size","title":"page_size <code>property</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: int | Value, cpu=None) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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>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>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> <li> <code>phys_offset</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>vmemmap</code> (<code>int</code>) \u2013 </li> <li> <code>kbase</code> (<code>int | None</code>) \u2013 </li> <li> <code>page_size</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.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.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.x86Ops.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.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.x86Ops.vmemmap","title":"vmemmap <code>property</code>","text":"<pre><code>vmemmap: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.kbase","title":"kbase <code>property</code>","text":"<pre><code>kbase: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86Ops.page_size","title":"page_size <code>property</code>","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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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: int | Value, cpu=None) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops","title":"i386Ops","text":"<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>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>ptr_size</code> (<code>int</code>) \u2013 </li> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> <li> <code>phys_offset</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>vmemmap</code> (<code>int</code>) \u2013 </li> <li> <code>kbase</code> (<code>int | None</code>) \u2013 </li> <li> <code>page_size</code> (<code>int</code>) \u2013 </li> </ul>"},{"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.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\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.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_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.vmemmap","title":"vmemmap <code>property</code>","text":"<pre><code>vmemmap: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.kbase","title":"kbase <code>property</code>","text":"<pre><code>kbase: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.page_size","title":"page_size <code>property</code>","text":"<pre><code>page_size: 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.i386Ops.per_cpu","title":"per_cpu","text":"<pre><code>per_cpu(addr: int | Value, cpu: int | None = None) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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>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>phys_base</code> \u2013 </li> <li> <code>ptr_size</code> (<code>int</code>) \u2013 </li> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> <li> <code>phys_offset</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>vmemmap</code> (<code>int</code>) \u2013 </li> <li> <code>kbase</code> (<code>int | None</code>) \u2013 </li> <li> <code>page_size</code> (<code>int</code>) \u2013 </li> </ul>"},{"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.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\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.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_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.vmemmap","title":"vmemmap <code>property</code>","text":"<pre><code>vmemmap: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.kbase","title":"kbase <code>property</code>","text":"<pre><code>kbase: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.x86_64Ops.page_size","title":"page_size <code>property</code>","text":"<pre><code>page_size: 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: int | Value, cpu: int | None = None) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops","title":"Aarch64Ops","text":"<p> Bases: <code>ArchOps</code></p> <p>Methods:</p> <ul> <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>ptr_size</code> \u2013 </li> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>page_offset</code> (<code>int</code>) \u2013 </li> <li> <code>phys_offset</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>vmemmap</code> (<code>int</code>) \u2013 </li> <li> <code>kbase</code> (<code>int | None</code>) \u2013 </li> <li> <code>page_size</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.ptr_size","title":"ptr_size <code>property</code>","text":"<pre><code>ptr_size\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.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.Aarch64Ops.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_offset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.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.Aarch64Ops.vmemmap","title":"vmemmap <code>property</code>","text":"<pre><code>vmemmap: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.kbase","title":"kbase <code>property</code>","text":"<pre><code>kbase: int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.Aarch64Ops.page_size","title":"page_size <code>property</code>","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: int | Value, cpu: int | None = None) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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_symbols","title":"has_debug_symbols","text":"<pre><code>has_debug_symbols(*required: str, checkall: bool = True) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.has_debug_info","title":"has_debug_info","text":"<pre><code>has_debug_info() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.requires_debug_symbols","title":"requires_debug_symbols","text":"<pre><code>requires_debug_symbols(\n *required: str, checkall=False, default: D = None\n) -&gt; Callable[[Callable[P, T]], Callable[P, T | D]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.requires_debug_info","title":"requires_debug_info","text":"<pre><code>requires_debug_info(\n default: D = None,\n) -&gt; 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() -&gt; 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.first_kernel_ro_page","title":"first_kernel_ro_page","text":"<pre><code>first_kernel_ro_page() -&gt; 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.kconfig","title":"kconfig","text":"<pre><code>kconfig() -&gt; Kconfig | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.kcmdline","title":"kcmdline","text":"<pre><code>kcmdline() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.kversion","title":"kversion","text":"<pre><code>kversion() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.krelease","title":"krelease","text":"<pre><code>krelease() -&gt; tuple[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() -&gt; list[IDTEntry]\n</code></pre> <p>Retrieves the IDT entries from memory.</p>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.arch_paginginfo","title":"arch_paginginfo","text":"<pre><code>arch_paginginfo() -&gt; ArchPagingInfo | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.arch_ops","title":"arch_ops","text":"<pre><code>arch_ops() -&gt; ArchOps | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.arch_symbols","title":"arch_symbols","text":"<pre><code>arch_symbols() -&gt; ArchSymbols | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.ptr_size","title":"ptr_size","text":"<pre><code>ptr_size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.page_size","title":"page_size","text":"<pre><code>page_size() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.per_cpu","title":"per_cpu","text":"<pre><code>per_cpu(addr: int | Value, cpu: int | None = None) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.kbase","title":"kbase","text":"<pre><code>kbase() -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.pagewalk","title":"pagewalk","text":"<pre><code>pagewalk(addr, entry=None) -&gt; tuple[PageTableLevel, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.paging_enabled","title":"paging_enabled","text":"<pre><code>paging_enabled() -&gt; 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() -&gt; int\n</code></pre> <p>Returns the number of NUMA nodes that are online on the system</p>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.node_data","title":"node_data","text":"<pre><code>node_data() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.slab_caches","title":"slab_caches","text":"<pre><code>slab_caches() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.per_cpu_offset","title":"per_cpu_offset","text":"<pre><code>per_cpu_offset() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.modules","title":"modules","text":"<pre><code>modules() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.db_list","title":"db_list","text":"<pre><code>db_list() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.prog_idr","title":"prog_idr","text":"<pre><code>prog_idr() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/#pwndbg.aglib.kernel.map_idr","title":"map_idr","text":"<pre><code>map_idr() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/bpf/","title":"bpf","text":""},{"location":"reference/pwndbg/aglib/kernel/bpf/#pwndbg.aglib.kernel.bpf","title":"bpf","text":"<p>Functions:</p> <ul> <li> <code>get_struct_bpf_prog</code> \u2013 </li> <li> <code>get_struct_bpf_map</code> \u2013 </li> <li> <code>get_bpf_struct_offsets</code> \u2013 </li> <li> <code>load_bpf_typeinfo</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/bpf/#pwndbg.aglib.kernel.bpf.get_struct_bpf_prog","title":"get_struct_bpf_prog","text":"<pre><code>get_struct_bpf_prog()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/bpf/#pwndbg.aglib.kernel.bpf.get_struct_bpf_map","title":"get_struct_bpf_map","text":"<pre><code>get_struct_bpf_map()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/bpf/#pwndbg.aglib.kernel.bpf.get_bpf_struct_offsets","title":"get_bpf_struct_offsets","text":"<pre><code>get_bpf_struct_offsets(prog_idr, map_idr) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/bpf/#pwndbg.aglib.kernel.bpf.load_bpf_typeinfo","title":"load_bpf_typeinfo","text":"<pre><code>load_bpf_typeinfo()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/buddydump/","title":"buddydump","text":""},{"location":"reference/pwndbg/aglib/kernel/buddydump/#pwndbg.aglib.kernel.buddydump","title":"buddydump","text":"<p>Functions:</p> <ul> <li> <code>find_zone_offsets</code> \u2013 </li> <li> <code>load_buddydump_typeinfo</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>MAX_ORDER</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/buddydump/#pwndbg.aglib.kernel.buddydump.MAX_ORDER","title":"MAX_ORDER <code>module-attribute</code>","text":"<pre><code>MAX_ORDER = 11\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/buddydump/#pwndbg.aglib.kernel.buddydump.find_zone_offsets","title":"find_zone_offsets","text":"<pre><code>find_zone_offsets() -&gt; tuple[int, int, int, int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/buddydump/#pwndbg.aglib.kernel.buddydump.load_buddydump_typeinfo","title":"load_buddydump_typeinfo","text":"<pre><code>load_buddydump_typeinfo()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/dmabuf/","title":"dmabuf","text":""},{"location":"reference/pwndbg/aglib/kernel/dmabuf/#pwndbg.aglib.kernel.dmabuf","title":"dmabuf","text":"<p>Functions:</p> <ul> <li> <code>find_dmabuf_offsets</code> \u2013 </li> <li> <code>load_dmabuf_typeinfo</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/dmabuf/#pwndbg.aglib.kernel.dmabuf.find_dmabuf_offsets","title":"find_dmabuf_offsets","text":"<pre><code>find_dmabuf_offsets(dmabuf) -&gt; tuple[int, int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/dmabuf/#pwndbg.aglib.kernel.dmabuf.load_dmabuf_typeinfo","title":"load_dmabuf_typeinfo","text":"<pre><code>load_dmabuf_typeinfo(first_dmabuf: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kallsyms/","title":"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 &gt;= 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 &gt;= 6.4</li> <li>... &lt;= 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 &gt;= 6.4</li> <li>kallsyms_relative_base &gt;= 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>list[tuple[str, str, int]]</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: list[tuple[str, str, int]] = []\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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; tuple[tuple[str, str, int], ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/","title":"kmod","text":""},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod","title":"kmod","text":"<p>Classes:</p> <ul> <li> <code>mod_mem_type</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>module_name_offset</code> \u2013 </li> <li> <code>module_mem_offset</code> \u2013 </li> <li> <code>module_layout_offset</code> \u2013 </li> <li> <code>module_kallsyms_offset</code> \u2013 </li> <li> <code>module_list_with_typeinfo</code> \u2013 </li> <li> <code>module_list</code> \u2013 </li> <li> <code>parse_module_kallsyms</code> \u2013 </li> <li> <code>all_modules_kallsyms</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.mod_mem_type","title":"mod_mem_type","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>MOD_TEXT</code> \u2013 </li> <li> <code>MOD_DATA</code> \u2013 </li> <li> <code>MOD_RODATA</code> \u2013 </li> <li> <code>MOD_RO_AFTER_INIT</code> \u2013 </li> <li> <code>MOD_MEM_NUM_TYPES</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.mod_mem_type.MOD_TEXT","title":"MOD_TEXT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MOD_TEXT = 0\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.mod_mem_type.MOD_DATA","title":"MOD_DATA <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MOD_DATA = 1\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.mod_mem_type.MOD_RODATA","title":"MOD_RODATA <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MOD_RODATA = 2\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.mod_mem_type.MOD_RO_AFTER_INIT","title":"MOD_RO_AFTER_INIT <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MOD_RO_AFTER_INIT = 3\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.mod_mem_type.MOD_MEM_NUM_TYPES","title":"MOD_MEM_NUM_TYPES <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MOD_MEM_NUM_TYPES = 4\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.module_name_offset","title":"module_name_offset","text":"<pre><code>module_name_offset()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.module_mem_offset","title":"module_mem_offset","text":"<pre><code>module_mem_offset() -&gt; tuple[int | None, int | None, int | None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.module_layout_offset","title":"module_layout_offset","text":"<pre><code>module_layout_offset() -&gt; tuple[int | None, int | None]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.module_kallsyms_offset","title":"module_kallsyms_offset","text":"<pre><code>module_kallsyms_offset()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.module_list_with_typeinfo","title":"module_list_with_typeinfo","text":"<pre><code>module_list_with_typeinfo() -&gt; tuple[Value, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.module_list","title":"module_list","text":"<pre><code>module_list() -&gt; tuple[int, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.parse_module_kallsyms","title":"parse_module_kallsyms","text":"<pre><code>parse_module_kallsyms(kallsyms: int) -&gt; list[tuple[str, int, str]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/kmod/#pwndbg.aglib.kernel.kmod.all_modules_kallsyms","title":"all_modules_kallsyms","text":"<pre><code>all_modules_kallsyms() -&gt; list[tuple[str, int, str]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/macros/","title":"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) -&gt; 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) -&gt; Iterator[Value]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/macros/#pwndbg.aglib.kernel.macros.swab","title":"swab","text":"<pre><code>swab(x: int) -&gt; 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) -&gt; Value\n</code></pre> <p>returns the head page of compound pages</p>"},{"location":"reference/pwndbg/aglib/kernel/nftables/","title":"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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; '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() -&gt; 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() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/","title":"paging","text":""},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging","title":"paging","text":"<p>Classes:</p> <ul> <li> <code>PageTableLevel</code> \u2013 </li> <li> <code>ArchPagingInfo</code> \u2013 </li> <li> <code>x86_64PagingInfo</code> \u2013 </li> <li> <code>Aarch64PagingInfo</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>get_memory_map_raw</code> \u2013 </li> <li> <code>first_kernel_page_start</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>INVALID_ADDR</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.INVALID_ADDR","title":"INVALID_ADDR <code>module-attribute</code>","text":"<pre><code>INVALID_ADDR = 1 &lt;&lt; 64\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.PageTableLevel","title":"PageTableLevel <code>dataclass</code>","text":"<pre><code>PageTableLevel(name: str, entry: int, virt: int, idx: int)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>entry</code> (<code>int</code>) \u2013 </li> <li> <code>virt</code> (<code>int</code>) \u2013 </li> <li> <code>idx</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.PageTableLevel.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.PageTableLevel.entry","title":"entry <code>instance-attribute</code>","text":"<pre><code>entry: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.PageTableLevel.virt","title":"virt <code>instance-attribute</code>","text":"<pre><code>virt: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.PageTableLevel.idx","title":"idx <code>instance-attribute</code>","text":"<pre><code>idx: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo","title":"ArchPagingInfo","text":"<p>Methods:</p> <ul> <li> <code>adjust</code> \u2013 </li> <li> <code>markers</code> \u2013 </li> <li> <code>handle_kernel_pages</code> \u2013 </li> <li> <code>kbase_helper</code> \u2013 </li> <li> <code>pagewalk</code> \u2013 </li> <li> <code>pagewalk_helper</code> \u2013 </li> <li> <code>pageentry_flags</code> \u2013 </li> <li> <code>should_stop_pagewalk</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>USERLAND</code> \u2013 </li> <li> <code>KERNELLAND</code> \u2013 </li> <li> <code>KERNELRO</code> \u2013 </li> <li> <code>KERNELBSS</code> \u2013 </li> <li> <code>KERNELDRIVER</code> \u2013 </li> <li> <code>ESPSTACK</code> \u2013 </li> <li> <code>PHYSMAP</code> \u2013 </li> <li> <code>VMALLOC</code> \u2013 </li> <li> <code>VMEMMAP</code> \u2013 </li> <li> <code>physmap</code> (<code>int</code>) \u2013 </li> <li> <code>vmalloc</code> (<code>int</code>) \u2013 </li> <li> <code>vmemmap</code> (<code>int</code>) \u2013 </li> <li> <code>kbase</code> (<code>int</code>) \u2013 </li> <li> <code>addr_marker_sz</code> (<code>int</code>) \u2013 </li> <li> <code>va_bits</code> (<code>int</code>) \u2013 </li> <li> <code>pagetable_cache</code> (<code>dict[Value, dict[int, int]]</code>) \u2013 </li> <li> <code>pagetableptr_cache</code> (<code>dict[int, Value]</code>) \u2013 </li> <li> <code>pagetable_level_names</code> (<code>tuple[str, ...]</code>) \u2013 </li> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>paging_level</code> (<code>int</code>) \u2013 </li> <li> <code>phys_offset</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.USERLAND","title":"USERLAND <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>USERLAND = 'userland'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.KERNELLAND","title":"KERNELLAND <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELLAND = 'kernel [.text]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.KERNELRO","title":"KERNELRO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELRO = 'kernel [.rodata]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.KERNELBSS","title":"KERNELBSS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELBSS = 'kernel [.bss]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.KERNELDRIVER","title":"KERNELDRIVER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELDRIVER = 'kernel [.driver .bpf]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.ESPSTACK","title":"ESPSTACK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ESPSTACK = 'espfix'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.PHYSMAP","title":"PHYSMAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PHYSMAP = 'physmap'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.VMALLOC","title":"VMALLOC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VMALLOC = 'vmalloc'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.VMEMMAP","title":"VMEMMAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VMEMMAP = 'vmemmap'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.physmap","title":"physmap <code>instance-attribute</code>","text":"<pre><code>physmap: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.vmalloc","title":"vmalloc <code>instance-attribute</code>","text":"<pre><code>vmalloc: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.vmemmap","title":"vmemmap <code>instance-attribute</code>","text":"<pre><code>vmemmap: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.kbase","title":"kbase <code>instance-attribute</code>","text":"<pre><code>kbase: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.addr_marker_sz","title":"addr_marker_sz <code>instance-attribute</code>","text":"<pre><code>addr_marker_sz: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.va_bits","title":"va_bits <code>instance-attribute</code>","text":"<pre><code>va_bits: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.pagetable_cache","title":"pagetable_cache <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pagetable_cache: dict[Value, dict[int, int]] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.pagetableptr_cache","title":"pagetableptr_cache <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pagetableptr_cache: dict[int, Value] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.pagetable_level_names","title":"pagetable_level_names <code>instance-attribute</code>","text":"<pre><code>pagetable_level_names: tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.page_shift","title":"page_shift <code>property</code>","text":"<pre><code>page_shift: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.paging_level","title":"paging_level <code>property</code>","text":"<pre><code>paging_level: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_offset\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.adjust","title":"adjust","text":"<pre><code>adjust(name: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.markers","title":"markers","text":"<pre><code>markers() -&gt; tuple[tuple[str, int], ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.handle_kernel_pages","title":"handle_kernel_pages","text":"<pre><code>handle_kernel_pages(pages)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.kbase_helper","title":"kbase_helper","text":"<pre><code>kbase_helper(address)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.pagewalk","title":"pagewalk","text":"<pre><code>pagewalk(target, entry) -&gt; tuple[PageTableLevel, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.pagewalk_helper","title":"pagewalk_helper","text":"<pre><code>pagewalk_helper(target, entry) -&gt; tuple[PageTableLevel, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.pageentry_flags","title":"pageentry_flags","text":"<pre><code>pageentry_flags(level) -&gt; BitFlags\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.ArchPagingInfo.should_stop_pagewalk","title":"should_stop_pagewalk","text":"<pre><code>should_stop_pagewalk(is_last)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo","title":"x86_64PagingInfo","text":"<pre><code>x86_64PagingInfo()\n</code></pre> <p> Bases: <code>ArchPagingInfo</code></p> <p>Methods:</p> <ul> <li> <code>get_vmalloc_vmemmap_bases</code> \u2013 </li> <li> <code>markers</code> \u2013 </li> <li> <code>adjust</code> \u2013 </li> <li> <code>handle_kernel_pages</code> \u2013 </li> <li> <code>pagewalk</code> \u2013 </li> <li> <code>pageentry_flags</code> \u2013 </li> <li> <code>should_stop_pagewalk</code> \u2013 </li> <li> <code>kbase_helper</code> \u2013 </li> <li> <code>pagewalk_helper</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>va_bits</code> \u2013 </li> <li> <code>pagetable_level_names</code> \u2013 </li> <li> <code>physmap</code> \u2013 </li> <li> <code>kbase</code> \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>vmalloc</code> \u2013 </li> <li> <code>vmemmap</code> \u2013 </li> <li> <code>paging_level</code> (<code>int</code>) \u2013 </li> <li> <code>USERLAND</code> \u2013 </li> <li> <code>KERNELLAND</code> \u2013 </li> <li> <code>KERNELRO</code> \u2013 </li> <li> <code>KERNELBSS</code> \u2013 </li> <li> <code>KERNELDRIVER</code> \u2013 </li> <li> <code>ESPSTACK</code> \u2013 </li> <li> <code>PHYSMAP</code> \u2013 </li> <li> <code>VMALLOC</code> \u2013 </li> <li> <code>VMEMMAP</code> \u2013 </li> <li> <code>addr_marker_sz</code> (<code>int</code>) \u2013 </li> <li> <code>pagetable_cache</code> (<code>dict[Value, dict[int, int]]</code>) \u2013 </li> <li> <code>pagetableptr_cache</code> (<code>dict[int, Value]</code>) \u2013 </li> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> <li> <code>phys_offset</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.va_bits","title":"va_bits <code>instance-attribute</code>","text":"<pre><code>va_bits = 48 if paging_level == 4 else 51\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.pagetable_level_names","title":"pagetable_level_names <code>instance-attribute</code>","text":"<pre><code>pagetable_level_names = (\n (\"Page\", \"PT\", \"PMD\", \"PUD\", \"PGD\")\n if paging_level == 4\n else (\"Page\", \"PT\", \"PMD\", \"P4D\", \"PUD\", \"PGD\")\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.physmap","title":"physmap <code>property</code>","text":"<pre><code>physmap\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.kbase","title":"kbase <code>property</code>","text":"<pre><code>kbase\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.page_shift","title":"page_shift <code>property</code>","text":"<pre><code>page_shift: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.vmalloc","title":"vmalloc <code>property</code>","text":"<pre><code>vmalloc\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.vmemmap","title":"vmemmap <code>property</code>","text":"<pre><code>vmemmap\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.paging_level","title":"paging_level <code>property</code>","text":"<pre><code>paging_level: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.USERLAND","title":"USERLAND <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>USERLAND = 'userland'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.KERNELLAND","title":"KERNELLAND <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELLAND = 'kernel [.text]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.KERNELRO","title":"KERNELRO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELRO = 'kernel [.rodata]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.KERNELBSS","title":"KERNELBSS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELBSS = 'kernel [.bss]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.KERNELDRIVER","title":"KERNELDRIVER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELDRIVER = 'kernel [.driver .bpf]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.ESPSTACK","title":"ESPSTACK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ESPSTACK = 'espfix'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.PHYSMAP","title":"PHYSMAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PHYSMAP = 'physmap'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.VMALLOC","title":"VMALLOC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VMALLOC = 'vmalloc'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.VMEMMAP","title":"VMEMMAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VMEMMAP = 'vmemmap'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.addr_marker_sz","title":"addr_marker_sz <code>instance-attribute</code>","text":"<pre><code>addr_marker_sz: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.pagetable_cache","title":"pagetable_cache <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pagetable_cache: dict[Value, dict[int, int]] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.pagetableptr_cache","title":"pagetableptr_cache <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pagetableptr_cache: dict[int, Value] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_offset\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.get_vmalloc_vmemmap_bases","title":"get_vmalloc_vmemmap_bases","text":"<pre><code>get_vmalloc_vmemmap_bases()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.markers","title":"markers","text":"<pre><code>markers() -&gt; tuple[tuple[str, int], ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.adjust","title":"adjust","text":"<pre><code>adjust(name)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.handle_kernel_pages","title":"handle_kernel_pages","text":"<pre><code>handle_kernel_pages(pages)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.pagewalk","title":"pagewalk","text":"<pre><code>pagewalk(target, entry) -&gt; tuple[PageTableLevel, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.pageentry_flags","title":"pageentry_flags","text":"<pre><code>pageentry_flags(is_last) -&gt; BitFlags\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.should_stop_pagewalk","title":"should_stop_pagewalk","text":"<pre><code>should_stop_pagewalk(entry)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.kbase_helper","title":"kbase_helper","text":"<pre><code>kbase_helper(address)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.x86_64PagingInfo.pagewalk_helper","title":"pagewalk_helper","text":"<pre><code>pagewalk_helper(target, entry) -&gt; tuple[PageTableLevel, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo","title":"Aarch64PagingInfo","text":"<pre><code>Aarch64PagingInfo()\n</code></pre> <p> Bases: <code>ArchPagingInfo</code></p> <p>Methods:</p> <ul> <li> <code>markers</code> \u2013 </li> <li> <code>adjust</code> \u2013 </li> <li> <code>handle_kernel_pages</code> \u2013 </li> <li> <code>pagewalk</code> \u2013 </li> <li> <code>pageentry_flags</code> \u2013 </li> <li> <code>should_stop_pagewalk</code> \u2013 </li> <li> <code>kbase_helper</code> \u2013 </li> <li> <code>pagewalk_helper</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>tcr_el1</code> \u2013 </li> <li> <code>va_bits</code> \u2013 </li> <li> <code>PAGE_OFFSET</code> \u2013 </li> <li> <code>va_bits_min</code> \u2013 </li> <li> <code>vmalloc</code> \u2013 </li> <li> <code>pagetable_level_names</code> \u2013 </li> <li> <code>physmap</code> \u2013 </li> <li> <code>kbase</code> \u2013 </li> <li> <code>kversion</code> \u2013 </li> <li> <code>module_start</code> \u2013 </li> <li> <code>vmemmap</code> \u2013 </li> <li> <code>pci</code> \u2013 </li> <li> <code>fixmap</code> \u2013 </li> <li> <code>ksize</code> \u2013 </li> <li> <code>page_shift_heuristic</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift</code> (<code>int</code>) \u2013 </li> <li> <code>page_shift_user</code> (<code>int</code>) \u2013 </li> <li> <code>paging_level</code> \u2013 </li> <li> <code>phys_offset</code> \u2013 </li> <li> <code>USERLAND</code> \u2013 </li> <li> <code>KERNELLAND</code> \u2013 </li> <li> <code>KERNELRO</code> \u2013 </li> <li> <code>KERNELBSS</code> \u2013 </li> <li> <code>KERNELDRIVER</code> \u2013 </li> <li> <code>ESPSTACK</code> \u2013 </li> <li> <code>PHYSMAP</code> \u2013 </li> <li> <code>VMALLOC</code> \u2013 </li> <li> <code>VMEMMAP</code> \u2013 </li> <li> <code>addr_marker_sz</code> (<code>int</code>) \u2013 </li> <li> <code>pagetable_cache</code> (<code>dict[Value, dict[int, int]]</code>) \u2013 </li> <li> <code>pagetableptr_cache</code> (<code>dict[int, Value]</code>) \u2013 </li> <li> <code>STRUCT_PAGE_SIZE</code> \u2013 </li> <li> <code>STRUCT_PAGE_SHIFT</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.tcr_el1","title":"tcr_el1 <code>instance-attribute</code>","text":"<pre><code>tcr_el1 = aarch64_tcr_flags\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.va_bits","title":"va_bits <code>instance-attribute</code>","text":"<pre><code>va_bits = 64 - tcr_el1['T1SZ']\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.PAGE_OFFSET","title":"PAGE_OFFSET <code>instance-attribute</code>","text":"<pre><code>PAGE_OFFSET = _PAGE_OFFSET(va_bits)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.va_bits_min","title":"va_bits_min <code>instance-attribute</code>","text":"<pre><code>va_bits_min = 48 if va_bits &gt; 48 else va_bits\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.vmalloc","title":"vmalloc <code>instance-attribute</code>","text":"<pre><code>vmalloc = _PAGE_END(va_bits_min)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.pagetable_level_names","title":"pagetable_level_names <code>instance-attribute</code>","text":"<pre><code>pagetable_level_names = ('Page', 'L3', 'L2', 'L1', 'L0')\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.physmap","title":"physmap <code>property</code>","text":"<pre><code>physmap\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.kbase","title":"kbase <code>property</code>","text":"<pre><code>kbase\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.kversion","title":"kversion <code>property</code>","text":"<pre><code>kversion\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.module_start","title":"module_start <code>property</code>","text":"<pre><code>module_start\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.vmemmap","title":"vmemmap <code>property</code>","text":"<pre><code>vmemmap\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.pci","title":"pci <code>property</code>","text":"<pre><code>pci\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.fixmap","title":"fixmap <code>property</code>","text":"<pre><code>fixmap\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.ksize","title":"ksize <code>property</code>","text":"<pre><code>ksize\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.page_shift_heuristic","title":"page_shift_heuristic <code>property</code>","text":"<pre><code>page_shift_heuristic: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.page_shift","title":"page_shift <code>property</code>","text":"<pre><code>page_shift: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.page_shift_user","title":"page_shift_user <code>property</code>","text":"<pre><code>page_shift_user: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.paging_level","title":"paging_level <code>property</code>","text":"<pre><code>paging_level\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.phys_offset","title":"phys_offset <code>property</code>","text":"<pre><code>phys_offset\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.USERLAND","title":"USERLAND <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>USERLAND = 'userland'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.KERNELLAND","title":"KERNELLAND <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELLAND = 'kernel [.text]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.KERNELRO","title":"KERNELRO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELRO = 'kernel [.rodata]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.KERNELBSS","title":"KERNELBSS <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELBSS = 'kernel [.bss]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.KERNELDRIVER","title":"KERNELDRIVER <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>KERNELDRIVER = 'kernel [.driver .bpf]'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.ESPSTACK","title":"ESPSTACK <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>ESPSTACK = 'espfix'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.PHYSMAP","title":"PHYSMAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>PHYSMAP = 'physmap'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.VMALLOC","title":"VMALLOC <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VMALLOC = 'vmalloc'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.VMEMMAP","title":"VMEMMAP <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>VMEMMAP = 'vmemmap'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.addr_marker_sz","title":"addr_marker_sz <code>instance-attribute</code>","text":"<pre><code>addr_marker_sz: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.pagetable_cache","title":"pagetable_cache <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pagetable_cache: dict[Value, dict[int, int]] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.pagetableptr_cache","title":"pagetableptr_cache <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>pagetableptr_cache: dict[int, Value] = {}\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.STRUCT_PAGE_SIZE","title":"STRUCT_PAGE_SIZE <code>property</code>","text":"<pre><code>STRUCT_PAGE_SIZE\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.STRUCT_PAGE_SHIFT","title":"STRUCT_PAGE_SHIFT <code>property</code>","text":"<pre><code>STRUCT_PAGE_SHIFT\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.markers","title":"markers","text":"<pre><code>markers() -&gt; tuple[tuple[str, int], ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.adjust","title":"adjust","text":"<pre><code>adjust(name)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.handle_kernel_pages","title":"handle_kernel_pages","text":"<pre><code>handle_kernel_pages(pages)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.pagewalk","title":"pagewalk","text":"<pre><code>pagewalk(target, entry) -&gt; tuple[PageTableLevel, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.pageentry_flags","title":"pageentry_flags","text":"<pre><code>pageentry_flags(is_last) -&gt; BitFlags\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.should_stop_pagewalk","title":"should_stop_pagewalk","text":"<pre><code>should_stop_pagewalk(entry)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.kbase_helper","title":"kbase_helper","text":"<pre><code>kbase_helper(address)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.Aarch64PagingInfo.pagewalk_helper","title":"pagewalk_helper","text":"<pre><code>pagewalk_helper(target, entry) -&gt; tuple[PageTableLevel, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.get_memory_map_raw","title":"get_memory_map_raw","text":"<pre><code>get_memory_map_raw() -&gt; tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/paging/#pwndbg.aglib.kernel.paging.first_kernel_page_start","title":"first_kernel_page_start","text":"<pre><code>first_kernel_page_start()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/rbtree/","title":"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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; Value | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/","title":"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 </li> <li> <code>kmem_cache_node_pad_sz</code> \u2013 </li> <li> <code>kmem_cache_pad_sz</code> \u2013 </li> <li> <code>kmem_cache_structs</code> \u2013 </li> <li> <code>load_slab_typeinfo</code> \u2013 </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 &lt;&lt; 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, slab: Slab)\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> <li> <code>is_valid_obj</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>start_addr</code> \u2013 </li> <li> <code>slab</code> \u2013 </li> <li> <code>offset</code> \u2013 </li> <li> <code>random</code> \u2013 </li> <li> <code>cyclic</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.slab","title":"slab <code>instance-attribute</code>","text":"<pre><code>slab = slab\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.cyclic","title":"cyclic <code>instance-attribute</code>","text":"<pre><code>cyclic = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.__iter__","title":"__iter__","text":"<pre><code>__iter__() -&gt; 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__() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.__len__","title":"__len__","text":"<pre><code>__len__() -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Freelist.is_valid_obj","title":"is_valid_obj","text":"<pre><code>is_valid_obj(addr)\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>Methods:</p> <ul> <li> <code>find_containing_slab</code> \u2013 </li> </ul> <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>slab_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 | None</code>) \u2013 <p>returns cpu cache associated to current thread</p> </li> <li> <code>cpu_caches</code> (<code>Generator[CpuCache, None, None]</code>) \u2013 </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>cpu_partial_slabs</code> (<code>int</code>) \u2013 </li> <li> <code>min_partial</code> (<code>int</code>) \u2013 </li> <li> <code>inuse</code> (<code>int</code>) \u2013 </li> <li> <code>useroffset</code> (<code>int</code>) \u2013 </li> <li> <code>usersize</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.slab_size","title":"slab_size <code>property</code>","text":"<pre><code>slab_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 | None\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>"},{"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.cpu_partial_slabs","title":"cpu_partial_slabs <code>property</code>","text":"<pre><code>cpu_partial_slabs: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.min_partial","title":"min_partial <code>property</code>","text":"<pre><code>min_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.useroffset","title":"useroffset <code>property</code>","text":"<pre><code>useroffset: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.SlabCache.usersize","title":"usersize <code>property</code>","text":"<pre><code>usersize: 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.SlabCache.find_containing_slab","title":"find_containing_slab","text":"<pre><code>find_containing_slab(address) -&gt; Slab | None\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> <li> <code>nr_partial</code> (<code>int</code>) \u2013 </li> <li> <code>min_partial</code> (<code>int</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.NodeCache.nr_partial","title":"nr_partial <code>property</code>","text":"<pre><code>nr_partial: int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.NodeCache.min_partial","title":"min_partial <code>property</code>","text":"<pre><code>min_partial: int\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 node_cache: NodeCache = None,\n is_active: bool = False,\n)\n</code></pre> <p>Methods:</p> <ul> <li> <code>__contains__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>is_active</code> \u2013 </li> <li> <code>cpu_cache</code> \u2013 </li> <li> <code>is_cpu</code> \u2013 </li> <li> <code>slab_cache</code> \u2013 </li> <li> <code>node_cache</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>free_objects</code> (<code>set[int]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.Slab.is_active","title":"is_active <code>instance-attribute</code>","text":"<pre><code>is_active = is_active\n</code></pre>"},{"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.is_cpu","title":"is_cpu <code>instance-attribute</code>","text":"<pre><code>is_cpu = True\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.node_cache","title":"node_cache <code>instance-attribute</code>","text":"<pre><code>node_cache = node_cache\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.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.Slab.__contains__","title":"__contains__","text":"<pre><code>__contains__(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.caches","title":"caches","text":"<pre><code>caches() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; SlabCache | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.kmem_cache_node_pad_sz","title":"kmem_cache_node_pad_sz","text":"<pre><code>kmem_cache_node_pad_sz(val)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.kmem_cache_pad_sz","title":"kmem_cache_pad_sz","text":"<pre><code>kmem_cache_pad_sz(kconfig) -&gt; tuple[int, int]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.kmem_cache_structs","title":"kmem_cache_structs","text":"<pre><code>kmem_cache_structs(node_cache_pad)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/slab/#pwndbg.aglib.kernel.slab.load_slab_typeinfo","title":"load_slab_typeinfo","text":"<pre><code>load_slab_typeinfo()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/","title":"symbol","text":""},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol","title":"symbol","text":"<p>Classes:</p> <ul> <li> <code>ArchSymbols</code> \u2013 </li> <li> <code>x86_64Symbols</code> \u2013 </li> <li> <code>Aarch64Symbols</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>migratetype_names</code> \u2013 </li> <li> <code>try_usymbol</code> \u2013 </li> <li> <code>nzones</code> \u2013 </li> <li> <code>nmtypes</code> \u2013 </li> <li> <code>npcplist</code> \u2013 <p>returns NR_PCP_LISTS (https://elixir.bootlin.com/linux/v6.13/source/include/linux/mmzone.h#L671)</p> </li> <li> <code>kversion_cint</code> \u2013 </li> <li> <code>load_common_structs</code> \u2013 </li> <li> <code>load_common_structs_on_load</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>POSSIBLE_ZONE_NAMES</code> \u2013 </li> <li> <code>COMMON_TYPES</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.POSSIBLE_ZONE_NAMES","title":"POSSIBLE_ZONE_NAMES <code>module-attribute</code>","text":"<pre><code>POSSIBLE_ZONE_NAMES = (\"DMA\", \"DMA32\", \"Normal\", \"HighMem\", \"Movable\", \"Device\")\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.COMMON_TYPES","title":"COMMON_TYPES <code>module-attribute</code>","text":"<pre><code>COMMON_TYPES = '\\n#include &lt;stdint.h&gt;\\n#include &lt;stddef.h&gt;\\n#include &lt;linux/version.h&gt;\\ntypedef unsigned char u8;\\ntypedef char s8;\\ntypedef unsigned short u16;\\ntypedef unsigned int u32;\\ntypedef long long s64;\\n#define bool int\\n#if UINTPTR_MAX == 0xffffffff\\n typedef int16_t arch_word_t;\\n#else\\n typedef int32_t arch_word_t;\\n#endif\\ntypedef struct {\\n int counter;\\n} atomic_t;\\n\\nstruct list_head {\\n struct list_head *next, *prev;\\n};\\nstruct kmem_cache;\\nenum pageflags {\\n\\tPG_locked,\\t\\t/* Page is locked. Don\\'t touch. */\\n\\tPG_writeback,\\t\\t/* Page is under writeback */\\n\\tPG_referenced,\\n\\tPG_uptodate,\\n\\tPG_dirty,\\n\\tPG_lru,\\n\\tPG_head,\\t\\t/* Must be in bit 6 */\\n\\tPG_waiters,\\t\\t/* Page has waiters, check its waitqueue. Must be bit #7 and in the same byte as \"PG_locked\" */\\n\\tPG_active,\\n\\tPG_workingset,\\n\\tPG_owner_priv_1,\\t/* Owner use. If pagecache, fs may use */\\n\\tPG_owner_2,\\t\\t/* Owner use. If pagecache, fs may use */\\n\\tPG_arch_1,\\n\\tPG_reserved,\\n\\tPG_private,\\t\\t/* If pagecache, has fs-private data */\\n\\tPG_private_2,\\t\\t/* If pagecache, has fs aux data */\\n\\tPG_reclaim,\\t\\t/* To be reclaimed asap */\\n\\tPG_swapbacked,\\t\\t/* Page is backed by RAM/swap */\\n\\tPG_unevictable,\\t\\t/* Page is \"unevictable\" */\\n\\tPG_dropbehind,\\t\\t/* drop pages on IO completion */\\n};\\n'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols","title":"ArchSymbols","text":"<pre><code>ArchSymbols()\n</code></pre> <p>Methods:</p> <ul> <li> <code>disass</code> \u2013 </li> <li> <code>regex</code> \u2013 </li> <li> <code>node_data</code> \u2013 </li> <li> <code>slab_caches</code> \u2013 </li> <li> <code>per_cpu_offset</code> \u2013 </li> <li> <code>modules</code> \u2013 </li> <li> <code>db_list</code> \u2013 </li> <li> <code>map_idr</code> \u2013 </li> <li> <code>prog_idr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>node_data_heuristic_func</code> \u2013 </li> <li> <code>slab_caches_heuristic_func</code> \u2013 </li> <li> <code>per_cpu_offset_heuristic_func</code> \u2013 </li> <li> <code>modules_heuristic_func</code> \u2013 </li> <li> <code>db_list_heuristic_func</code> \u2013 </li> <li> <code>bpf_prog_heuristic_func</code> \u2013 </li> <li> <code>bpf_map_heuristic_func</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.node_data_heuristic_func","title":"node_data_heuristic_func <code>instance-attribute</code>","text":"<pre><code>node_data_heuristic_func = 'first_online_pgdat'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.slab_caches_heuristic_func","title":"slab_caches_heuristic_func <code>instance-attribute</code>","text":"<pre><code>slab_caches_heuristic_func = 'slab_next'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.per_cpu_offset_heuristic_func","title":"per_cpu_offset_heuristic_func <code>instance-attribute</code>","text":"<pre><code>per_cpu_offset_heuristic_func = 'nr_iowait_cpu'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.modules_heuristic_func","title":"modules_heuristic_func <code>instance-attribute</code>","text":"<pre><code>modules_heuristic_func = 'find_module_all'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.db_list_heuristic_func","title":"db_list_heuristic_func <code>instance-attribute</code>","text":"<pre><code>db_list_heuristic_func = (\n \"dma_buf_file_release\" if krelease() &gt;= (5, 10) else \"dma_buf_release\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.bpf_prog_heuristic_func","title":"bpf_prog_heuristic_func <code>instance-attribute</code>","text":"<pre><code>bpf_prog_heuristic_func = 'bpf_prog_free_id'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.bpf_map_heuristic_func","title":"bpf_map_heuristic_func <code>instance-attribute</code>","text":"<pre><code>bpf_map_heuristic_func = 'bpf_map_free_id'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.disass","title":"disass","text":"<pre><code>disass(name, lines=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.regex","title":"regex","text":"<pre><code>regex(s, pattern, nth)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.node_data","title":"node_data","text":"<pre><code>node_data()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.slab_caches","title":"slab_caches","text":"<pre><code>slab_caches()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.per_cpu_offset","title":"per_cpu_offset","text":"<pre><code>per_cpu_offset()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.modules","title":"modules","text":"<pre><code>modules()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.db_list","title":"db_list","text":"<pre><code>db_list()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.map_idr","title":"map_idr","text":"<pre><code>map_idr()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.ArchSymbols.prog_idr","title":"prog_idr","text":"<pre><code>prog_idr()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols","title":"x86_64Symbols","text":"<pre><code>x86_64Symbols()\n</code></pre> <p> Bases: <code>ArchSymbols</code></p> <p>Methods:</p> <ul> <li> <code>dword_mov_reg_memoff</code> \u2013 </li> <li> <code>dword_add_reg_memoff</code> \u2013 </li> <li> <code>qword_mov_reg_const</code> \u2013 </li> <li> <code>qword_mov_reg_ripoff</code> \u2013 </li> <li> <code>disass</code> \u2013 </li> <li> <code>regex</code> \u2013 </li> <li> <code>node_data</code> \u2013 </li> <li> <code>slab_caches</code> \u2013 </li> <li> <code>per_cpu_offset</code> \u2013 </li> <li> <code>modules</code> \u2013 </li> <li> <code>db_list</code> \u2013 </li> <li> <code>map_idr</code> \u2013 </li> <li> <code>prog_idr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>node_data_heuristic_func</code> \u2013 </li> <li> <code>slab_caches_heuristic_func</code> \u2013 </li> <li> <code>per_cpu_offset_heuristic_func</code> \u2013 </li> <li> <code>modules_heuristic_func</code> \u2013 </li> <li> <code>db_list_heuristic_func</code> \u2013 </li> <li> <code>bpf_prog_heuristic_func</code> \u2013 </li> <li> <code>bpf_map_heuristic_func</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.node_data_heuristic_func","title":"node_data_heuristic_func <code>instance-attribute</code>","text":"<pre><code>node_data_heuristic_func = 'first_online_pgdat'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.slab_caches_heuristic_func","title":"slab_caches_heuristic_func <code>instance-attribute</code>","text":"<pre><code>slab_caches_heuristic_func = 'slab_next'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.per_cpu_offset_heuristic_func","title":"per_cpu_offset_heuristic_func <code>instance-attribute</code>","text":"<pre><code>per_cpu_offset_heuristic_func = 'nr_iowait_cpu'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.modules_heuristic_func","title":"modules_heuristic_func <code>instance-attribute</code>","text":"<pre><code>modules_heuristic_func = 'find_module_all'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.db_list_heuristic_func","title":"db_list_heuristic_func <code>instance-attribute</code>","text":"<pre><code>db_list_heuristic_func = (\n \"dma_buf_file_release\" if krelease() &gt;= (5, 10) else \"dma_buf_release\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.bpf_prog_heuristic_func","title":"bpf_prog_heuristic_func <code>instance-attribute</code>","text":"<pre><code>bpf_prog_heuristic_func = 'bpf_prog_free_id'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.bpf_map_heuristic_func","title":"bpf_map_heuristic_func <code>instance-attribute</code>","text":"<pre><code>bpf_map_heuristic_func = 'bpf_map_free_id'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.dword_mov_reg_memoff","title":"dword_mov_reg_memoff","text":"<pre><code>dword_mov_reg_memoff(disass, nth=0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.dword_add_reg_memoff","title":"dword_add_reg_memoff","text":"<pre><code>dword_add_reg_memoff(disass, nth=0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.qword_mov_reg_const","title":"qword_mov_reg_const","text":"<pre><code>qword_mov_reg_const(disass, nth=0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.qword_mov_reg_ripoff","title":"qword_mov_reg_ripoff","text":"<pre><code>qword_mov_reg_ripoff(disass, nth=0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.disass","title":"disass","text":"<pre><code>disass(name, lines=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.regex","title":"regex","text":"<pre><code>regex(s, pattern, nth)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.node_data","title":"node_data","text":"<pre><code>node_data()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.slab_caches","title":"slab_caches","text":"<pre><code>slab_caches()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.per_cpu_offset","title":"per_cpu_offset","text":"<pre><code>per_cpu_offset()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.modules","title":"modules","text":"<pre><code>modules()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.db_list","title":"db_list","text":"<pre><code>db_list()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.map_idr","title":"map_idr","text":"<pre><code>map_idr()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.x86_64Symbols.prog_idr","title":"prog_idr","text":"<pre><code>prog_idr()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols","title":"Aarch64Symbols","text":"<pre><code>Aarch64Symbols()\n</code></pre> <p> Bases: <code>ArchSymbols</code></p> <p>Methods:</p> <ul> <li> <code>qword_adrp_add_const</code> \u2013 </li> <li> <code>disass</code> \u2013 </li> <li> <code>regex</code> \u2013 </li> <li> <code>node_data</code> \u2013 </li> <li> <code>slab_caches</code> \u2013 </li> <li> <code>per_cpu_offset</code> \u2013 </li> <li> <code>modules</code> \u2013 </li> <li> <code>db_list</code> \u2013 </li> <li> <code>map_idr</code> \u2013 </li> <li> <code>prog_idr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>node_data_heuristic_func</code> \u2013 </li> <li> <code>slab_caches_heuristic_func</code> \u2013 </li> <li> <code>per_cpu_offset_heuristic_func</code> \u2013 </li> <li> <code>modules_heuristic_func</code> \u2013 </li> <li> <code>db_list_heuristic_func</code> \u2013 </li> <li> <code>bpf_prog_heuristic_func</code> \u2013 </li> <li> <code>bpf_map_heuristic_func</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.node_data_heuristic_func","title":"node_data_heuristic_func <code>instance-attribute</code>","text":"<pre><code>node_data_heuristic_func = 'first_online_pgdat'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.slab_caches_heuristic_func","title":"slab_caches_heuristic_func <code>instance-attribute</code>","text":"<pre><code>slab_caches_heuristic_func = 'slab_next'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.per_cpu_offset_heuristic_func","title":"per_cpu_offset_heuristic_func <code>instance-attribute</code>","text":"<pre><code>per_cpu_offset_heuristic_func = 'nr_iowait_cpu'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.modules_heuristic_func","title":"modules_heuristic_func <code>instance-attribute</code>","text":"<pre><code>modules_heuristic_func = 'find_module_all'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.db_list_heuristic_func","title":"db_list_heuristic_func <code>instance-attribute</code>","text":"<pre><code>db_list_heuristic_func = (\n \"dma_buf_file_release\" if krelease() &gt;= (5, 10) else \"dma_buf_release\"\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.bpf_prog_heuristic_func","title":"bpf_prog_heuristic_func <code>instance-attribute</code>","text":"<pre><code>bpf_prog_heuristic_func = 'bpf_prog_free_id'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.bpf_map_heuristic_func","title":"bpf_map_heuristic_func <code>instance-attribute</code>","text":"<pre><code>bpf_map_heuristic_func = 'bpf_map_free_id'\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.qword_adrp_add_const","title":"qword_adrp_add_const","text":"<pre><code>qword_adrp_add_const(disass, nth=0)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.disass","title":"disass","text":"<pre><code>disass(name, lines=None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.regex","title":"regex","text":"<pre><code>regex(s, pattern, nth)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.node_data","title":"node_data","text":"<pre><code>node_data()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.slab_caches","title":"slab_caches","text":"<pre><code>slab_caches()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.per_cpu_offset","title":"per_cpu_offset","text":"<pre><code>per_cpu_offset()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.modules","title":"modules","text":"<pre><code>modules()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.db_list","title":"db_list","text":"<pre><code>db_list()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.map_idr","title":"map_idr","text":"<pre><code>map_idr()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.Aarch64Symbols.prog_idr","title":"prog_idr","text":"<pre><code>prog_idr()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.migratetype_names","title":"migratetype_names","text":"<pre><code>migratetype_names() -&gt; tuple[str, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.try_usymbol","title":"try_usymbol","text":"<pre><code>try_usymbol(name: str, size=ptr_size) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.nzones","title":"nzones","text":"<pre><code>nzones() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.nmtypes","title":"nmtypes","text":"<pre><code>nmtypes() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.npcplist","title":"npcplist","text":"<pre><code>npcplist() -&gt; int\n</code></pre> <p>returns NR_PCP_LISTS (https://elixir.bootlin.com/linux/v6.13/source/include/linux/mmzone.h#L671)</p>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.kversion_cint","title":"kversion_cint","text":"<pre><code>kversion_cint(kversion: tuple[int, int, int] = None)\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.load_common_structs","title":"load_common_structs","text":"<pre><code>load_common_structs()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/symbol/#pwndbg.aglib.kernel.symbol.load_common_structs_on_load","title":"load_common_structs_on_load","text":"<pre><code>load_common_structs_on_load()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/","title":"vmmap","text":""},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap","title":"vmmap","text":"<p>Classes:</p> <ul> <li> <code>KernelVmmap</code> \u2013 </li> <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=\"Values explained:\\n\\n+ `page-tables` - read /proc/$qemu-pid/mem to parse kernel page tables to render vmmap\\n+ `monitor` - use QEMU's `monitor info mem` to render vmmap\\n+ `none` - 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.KernelVmmap","title":"KernelVmmap","text":"<pre><code>KernelVmmap(pages: tuple[Page, ...])\n</code></pre> <p>Methods:</p> <ul> <li> <code>get_name</code> \u2013 </li> <li> <code>adjust</code> \u2013 </li> <li> <code>handle_user_pages</code> \u2013 </li> <li> <code>handle_offsets</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pages</code> \u2013 </li> <li> <code>sections</code> \u2013 </li> <li> <code>pi</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.KernelVmmap.pages","title":"pages <code>instance-attribute</code>","text":"<pre><code>pages = pages\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.KernelVmmap.sections","title":"sections <code>instance-attribute</code>","text":"<pre><code>sections = None\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.KernelVmmap.pi","title":"pi <code>instance-attribute</code>","text":"<pre><code>pi = arch_paginginfo()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.KernelVmmap.get_name","title":"get_name","text":"<pre><code>get_name(addr: int) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.KernelVmmap.adjust","title":"adjust","text":"<pre><code>adjust()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.KernelVmmap.handle_user_pages","title":"handle_user_pages","text":"<pre><code>handle_user_pages()\n</code></pre>"},{"location":"reference/pwndbg/aglib/kernel/vmmap/#pwndbg.aglib.kernel.vmmap.KernelVmmap.handle_offsets","title":"handle_offsets","text":"<pre><code>handle_offsets()\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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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","title":"kernel_vmmap","text":"<pre><code>kernel_vmmap(process_pages=True) -&gt; tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/","title":"macho","text":""},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho","title":"macho","text":"<p>Classes:</p> <ul> <li> <code>Trie</code> \u2013 <p>Prefix Tree</p> </li> <li> <code>DyldSharedCacheMapping</code> \u2013 </li> <li> <code>DyldSharedCacheHashSet</code> \u2013 <p>A hash set from the DyLD Shared Cache.</p> </li> <li> <code>DyldSharedCache</code> \u2013 <p>Handle to the DyLD Shared Cache in the address space of the inferior.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>shared_cache</code> \u2013 <p>Base address of the Darwin shared cache.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>T</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.Trie","title":"Trie","text":"<pre><code>Trie(ptr: int, ty: Callable[[int, int], T])\n</code></pre> <p> Bases: <code>_RawTrie</code>, <code>Generic[T]</code></p> <p>Prefix Tree</p> <p>The Mach-O format makes extensive use of prefix trees for any operation that involves string-based loookup.</p> <p>Methods:</p> <ul> <li> <code>get</code> \u2013 <p>Get the data associated with the node of given name, if it exists.</p> </li> <li> <code>entries</code> \u2013 <p>List all the entries in the trie, along with their associated data.</p> </li> <li> <code>keys</code> \u2013 <p>List the name of all nodes in the trie.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.Trie.get","title":"get","text":"<pre><code>get(name: bytes) -&gt; T | None\n</code></pre> <p>Get the data associated with the node of given name, if it exists.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.Trie.entries","title":"entries","text":"<pre><code>entries() -&gt; Generator[tuple[bytes, T]]\n</code></pre> <p>List all the entries in the trie, along with their associated data.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.Trie.keys","title":"keys","text":"<pre><code>keys() -&gt; Generator[bytes]\n</code></pre> <p>List the name of all nodes in the trie.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheMapping","title":"DyldSharedCacheMapping","text":"<pre><code>DyldSharedCacheMapping(\n addr: int, size: int, file_offset: int, max_prot: int, init_prot: int\n)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>addr</code> \u2013 </li> <li> <code>size</code> \u2013 </li> <li> <code>file_offset</code> \u2013 </li> <li> <code>max_prot</code> \u2013 </li> <li> <code>init_prot</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheMapping.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr = addr\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheMapping.size","title":"size <code>instance-attribute</code>","text":"<pre><code>size = size\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheMapping.file_offset","title":"file_offset <code>instance-attribute</code>","text":"<pre><code>file_offset = file_offset\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheMapping.max_prot","title":"max_prot <code>instance-attribute</code>","text":"<pre><code>max_prot = max_prot\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheMapping.init_prot","title":"init_prot <code>instance-attribute</code>","text":"<pre><code>init_prot = init_prot\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheHashSet","title":"DyldSharedCacheHashSet","text":"<pre><code>DyldSharedCacheHashSet(ptr: int)\n</code></pre> <p>A hash set from the DyLD Shared Cache.</p> <p>The DyLD Shared Cache uses hash sets in all structures related to Objective-C Optimization. This class is an interface to them.</p> <p>Methods:</p> <ul> <li> <code>lookup</code> \u2013 <p>Look up the given key in the hash set.</p> </li> <li> <code>keys</code> \u2013 <p>Returns an iterator over all the keys present in the hash set.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>capacity</code> \u2013 </li> <li> <code>shift</code> \u2013 </li> <li> <code>mask</code> \u2013 </li> <li> <code>salt</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheHashSet.capacity","title":"capacity <code>instance-attribute</code>","text":"<pre><code>capacity = u32(_ptr + 4)\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheHashSet.shift","title":"shift <code>instance-attribute</code>","text":"<pre><code>shift = u32(_ptr + 12)\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheHashSet.mask","title":"mask <code>instance-attribute</code>","text":"<pre><code>mask = u32(_ptr + 16)\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheHashSet.salt","title":"salt <code>instance-attribute</code>","text":"<pre><code>salt = u64(_ptr + 24)\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheHashSet.lookup","title":"lookup","text":"<pre><code>lookup(key: bytes) -&gt; int | None\n</code></pre> <p>Look up the given key in the hash set.</p> <p>Returns a pointer to the key if it is present, None otherwise.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCacheHashSet.keys","title":"keys","text":"<pre><code>keys() -&gt; Generator[bytes]\n</code></pre> <p>Returns an iterator over all the keys present in the hash set.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache","title":"DyldSharedCache","text":"<pre><code>DyldSharedCache(addr: int)\n</code></pre> <p>Handle to the DyLD Shared Cache in the address space of the inferior.</p> <p>The shared cache format handling code in libmacho has multiple paths for gathering the same information, depending on a value that is near the beggining of the header, which indicates that the format has likely evolved quite a bit since its first intoduction.</p> <p>The way the version of a given shared cache is determined isn't exactly straighforward, and relies on a combination of the <code>magic</code> and <code>mappingOffset</code> values. Fortunately for us, however, when <code>mappingOffset</code> is used for this purpose, it follows the fairly widely used pattern of using the size of the struct to denote its version.</p> <p>Methods:</p> <ul> <li> <code>mappings</code> \u2013 <p>Generate the list of memory mappings in the shared cache.</p> </li> <li> <code>image_base</code> \u2013 </li> <li> <code>image_name</code> \u2013 </li> <li> <code>is_address_in_shared_cache</code> \u2013 <p>Whether the given address is in the shared cache.</p> </li> <li> <code>objc_builtin_selectors</code> \u2013 <p>Looks up the hash table of builtin Objective-C selectors and returns it.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>addr</code> \u2013 </li> <li> <code>slide</code> (<code>int</code>) \u2013 <p>The slide value of the DyLD Shared Cache, in bytes.</p> </li> <li> <code>image_count</code> \u2013 </li> <li> <code>base</code> (<code>int</code>) \u2013 <p>The base virtual address of the DyLD Shared Cache.</p> </li> <li> <code>size</code> (<code>int</code>) \u2013 <p>The mapped size, in bytes, of the DyLD Shared Cache.</p> </li> <li> <code>image_index_trie</code> (<code>Trie[int] | None</code>) \u2013 <p>The trie of image indices, if available.</p> </li> <li> <code>images</code> (<code>Generator[tuple[bytes, int]]</code>) \u2013 </li> <li> <code>images_sorted</code> (<code>Generator[tuple[bytes, int]]</code>) \u2013 <p>Same as images, but guaranteed to be sorted by increasing base address</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.addr","title":"addr <code>instance-attribute</code>","text":"<pre><code>addr = addr\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.slide","title":"slide <code>instance-attribute</code>","text":"<pre><code>slide: int = _slide()\n</code></pre> <p>The slide value of the DyLD Shared Cache, in bytes.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.image_count","title":"image_count <code>instance-attribute</code>","text":"<pre><code>image_count = u32(addr + images_offset + 4)\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.base","title":"base <code>property</code>","text":"<pre><code>base: int\n</code></pre> <p>The base virtual address of the DyLD Shared Cache.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.size","title":"size <code>property</code>","text":"<pre><code>size: int\n</code></pre> <p>The mapped size, in bytes, of the DyLD Shared Cache.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.image_index_trie","title":"image_index_trie <code>property</code>","text":"<pre><code>image_index_trie: Trie[int] | None\n</code></pre> <p>The trie of image indices, if available.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.images","title":"images <code>property</code>","text":"<pre><code>images: Generator[tuple[bytes, int]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.images_sorted","title":"images_sorted <code>property</code>","text":"<pre><code>images_sorted: Generator[tuple[bytes, int]]\n</code></pre> <p>Same as images, but guaranteed to be sorted by increasing base address</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.mappings","title":"mappings","text":"<pre><code>mappings() -&gt; Generator[DyldSharedCacheMapping]\n</code></pre> <p>Generate the list of memory mappings in the shared cache.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.image_base","title":"image_base","text":"<pre><code>image_base(index: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.image_name","title":"image_name","text":"<pre><code>image_name(index: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.is_address_in_shared_cache","title":"is_address_in_shared_cache","text":"<pre><code>is_address_in_shared_cache(addr: int) -&gt; int\n</code></pre> <p>Whether the given address is in the shared cache.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.DyldSharedCache.objc_builtin_selectors","title":"objc_builtin_selectors","text":"<pre><code>objc_builtin_selectors() -&gt; DyldSharedCacheHashSet\n</code></pre> <p>Looks up the hash table of builtin Objective-C selectors and returns it.</p>"},{"location":"reference/pwndbg/aglib/macho/#pwndbg.aglib.macho.shared_cache","title":"shared_cache","text":"<pre><code>shared_cache() -&gt; DyldSharedCache | None\n</code></pre> <p>Base address of the Darwin shared cache.</p> <p>In Darwin, the way the Objective-C Runtime queries for this value is to call <code>_dyld_get_shared_cache_range</code> from libdyld1, which then calls a routine that lives inside dyld itself, and that returns the values after poking into internal C++ structures.</p> <p>From our perspective, that kind of sucks. Calling routines from debuggers can be quite unreliable, and so ideally we'd always be peeking into the data structures directly. But, in this case, even for Apple these are considered entirely private to dyld2, and so there's even less of a stability guarantee for the layout of these structures than normal.</p> <p>Because of this, a level of care must be taken before calling this function, as it must be assumed that the state of the inferior can be changed by it.</p>"},{"location":"reference/pwndbg/aglib/memory/","title":"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) -&gt; bytearray</p> </li> <li> <code>readtype</code> \u2013 <p>readtype(type, addr) -&gt; int</p> </li> <li> <code>write</code> \u2013 <p>write(addr, data)</p> </li> <li> <code>peek</code> \u2013 <p>peek(address) -&gt; bytearray</p> </li> <li> <code>is_readable_address</code> \u2013 <p>is_readable_address(address) -&gt; 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) -&gt; int</p> </li> <li> <code>uchar</code> \u2013 <p>uchar(addr) -&gt; int</p> </li> <li> <code>ushort</code> \u2013 <p>ushort(addr) -&gt; int</p> </li> <li> <code>uint</code> \u2013 <p>uint(addr) -&gt; int</p> </li> <li> <code>read_pointer_width</code> \u2013 <p>Read one pointer-width integer at the specified address.</p> </li> <li> <code>u8</code> \u2013 <p>u8(addr) -&gt; int</p> </li> <li> <code>u16</code> \u2013 <p>u16(addr) -&gt; int</p> </li> <li> <code>u32</code> \u2013 <p>u32(addr) -&gt; int</p> </li> <li> <code>u64</code> \u2013 <p>u64(addr) -&gt; int</p> </li> <li> <code>u</code> \u2013 <p>u(addr, size=None) -&gt; int</p> </li> <li> <code>s8</code> \u2013 <p>s8(addr) -&gt; int</p> </li> <li> <code>s16</code> \u2013 <p>s16(addr) -&gt; int</p> </li> <li> <code>s32</code> \u2013 <p>s32(addr) -&gt; int</p> </li> <li> <code>s64</code> \u2013 <p>s64(addr) -&gt; int</p> </li> <li> <code>sint</code> \u2013 <p>Read one <code>signed int</code> from the specified</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) -&gt; int</p> </li> <li> <code>find_lower_boundary</code> \u2013 <p>find_lower_boundary(addr, max_pages=1024) -&gt; 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> <li> <code>is_pagefault_supported</code> \u2013 <p>This function should be called before stray memory dereferences to protect against the following situations:</p> </li> <li> <code>is_kernel</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) -&gt; bytearray\n</code></pre> <p>read(addr, count, partial=False) -&gt; 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) -&gt; int\n</code></pre> <p>readtype(type, addr) -&gt; 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) -&gt; 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) -&gt; bytearray | None\n</code></pre> <p>peek(address) -&gt; 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) -&gt; bool\n</code></pre> <p>is_readable_address(address) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; int\n</code></pre> <p>byte(addr) -&gt; 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) -&gt; int\n</code></pre> <p>uchar(addr) -&gt; 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) -&gt; int\n</code></pre> <p>ushort(addr) -&gt; 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) -&gt; int\n</code></pre> <p>uint(addr) -&gt; int</p> <p>Read one <code>unsigned int</code> at the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.read_pointer_width","title":"read_pointer_width","text":"<pre><code>read_pointer_width(addr: int) -&gt; int\n</code></pre> <p>Read one pointer-width integer at the specified address.</p> <p>Raises:</p> <ul> <li> <code>Error</code> \u2013 <p>if memory read fails.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.u8","title":"u8","text":"<pre><code>u8(addr: int) -&gt; int\n</code></pre> <p>u8(addr) -&gt; 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) -&gt; int\n</code></pre> <p>u16(addr) -&gt; 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) -&gt; int\n</code></pre> <p>u32(addr) -&gt; 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) -&gt; int\n</code></pre> <p>u64(addr) -&gt; 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) -&gt; int\n</code></pre> <p>u(addr, size=None) -&gt; 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) -&gt; int\n</code></pre> <p>s8(addr) -&gt; 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) -&gt; int\n</code></pre> <p>s16(addr) -&gt; 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) -&gt; int\n</code></pre> <p>s32(addr) -&gt; 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) -&gt; int\n</code></pre> <p>s64(addr) -&gt; int</p> <p>Read one <code>int64_t</code> from the specified address.</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.sint","title":"sint","text":"<pre><code>sint(addr: int) -&gt; int\n</code></pre> <p>Read one <code>signed int</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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; int\n</code></pre> <p>find_upper_boundary(addr, max_pages=1024) -&gt; 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) -&gt; int\n</code></pre> <p>find_lower_boundary(addr, max_pages=1024) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.is_pagefault_supported","title":"is_pagefault_supported","text":"<pre><code>is_pagefault_supported() -&gt; bool\n</code></pre> <p>This function should be called before stray memory dereferences to protect against the following situations:</p> <ol> <li>On embedded systems, it's not uncommon for MMIO regions to exist where memory reads might mutate the hardware/process state.</li> <li>On baremetal/embedded, paging doesn't always exist, so all memory is \"valid\" (and often initialized to zero) - this makes every value appear to be a pointer.</li> </ol> <p>As such, we disable dereferencing by default for bare metal targets.</p> <p>See more discussion here: !385</p>"},{"location":"reference/pwndbg/aglib/memory/#pwndbg.aglib.memory.is_kernel","title":"is_kernel","text":"<pre><code>is_kernel(addr: int)\n</code></pre>"},{"location":"reference/pwndbg/aglib/nearpc/","title":"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) -&gt; 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":"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 <p>Return the next branch instruction that the process will encounter with repeated usage of the \"nexti\" command.</p> </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 <p>If including_current == True, do not step in case we are currently on a branch</p> </li> <li> <code>break_next_interrupt</code> \u2013 <p>Break at the next interrupt if there is one in the current basic block</p> </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, honor_current_branch=False)\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>If honor_current_branch is True, then if the address is already a branch, return None.</p> <p>If no interrupt exists or a jump is in the way, return None.</p>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.next_branch","title":"next_branch","text":"<pre><code>next_branch(address=None, including_current=False) -&gt; PwndbgInstruction | None\n</code></pre> <p>Return the next branch instruction that the process will encounter with repeated usage of the \"nexti\" command.</p> <p>If including_current == True, then if the instruction at the address is already a branch, return it.</p>"},{"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(\n ec: ExecutionController, address=None, including_current=False\n)\n</code></pre> <p>If including_current == True, do not step in case we are currently on a branch</p>"},{"location":"reference/pwndbg/aglib/next/#pwndbg.aglib.next.break_next_interrupt","title":"break_next_interrupt <code>async</code>","text":"<pre><code>break_next_interrupt(\n ec: ExecutionController, address=None, honor_current_branch=False\n) -&gt; PwndbgInstruction | None\n</code></pre> <p>Break at the next interrupt if there is one in the current basic block and no jumps are between the current instruction and the interrupt.</p> <p>If no such interrupt exists or a jump is in the way, return None.</p>"},{"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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/","title":"objc","text":""},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc","title":"objc","text":"<p>Apple Objective-C Runtime Support</p> <p>This module implements support for analyzing the Apple Objective-C runtime. As expected, Apple provides no oficial specification for the internal ABI of ObjC and no guarantees of its stability, and so this module is not guaranteed to work on all versions of Darwin.</p> <p>Classes:</p> <ul> <li> <code>Object</code> \u2013 </li> <li> <code>Class</code> \u2013 </li> <li> <code>InstanceVariable</code> \u2013 <p>An Objective-C Instance Variable.</p> </li> <li> <code>ClassProperty</code> \u2013 </li> <li> <code>Selector</code> \u2013 <p>An Objective-C Selector.</p> </li> <li> <code>Method</code> \u2013 <p>An Objective-C Method Pointer.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>try_resolve_call_at_current_pc</code> \u2013 <p>Tries to resolve a call to an Objective-C method for an instruction in the</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>T</code> \u2013 </li> <li> <code>max_method_argument_count</code> \u2013 </li> <li> <code>max_method_type_depth</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.max_method_argument_count","title":"max_method_argument_count <code>module-attribute</code>","text":"<pre><code>max_method_argument_count = add_param(\n \"objc-max-function-arguments\",\n 32,\n \"maximum number of arguments to resolve for an Objective-C method call\",\n param_class=PARAM_ZUINTEGER,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.max_method_type_depth","title":"max_method_type_depth <code>module-attribute</code>","text":"<pre><code>max_method_type_depth = add_param(\n \"objc-max-function-types-depth\",\n 32,\n \"maximum allowed depth for a type in an Objective-C method call\",\n param_class=PARAM_ZUINTEGER,\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Object","title":"Object","text":"<pre><code>Object(addr: int)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>cls</code> (<code>Class | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Object.cls","title":"cls <code>property</code>","text":"<pre><code>cls: Class | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class","title":"Class","text":"<pre><code>Class(addr: int)\n</code></pre> <p> Bases: <code>Object</code></p> <p>Attributes:</p> <ul> <li> <code>superclass</code> (<code>Class | None</code>) \u2013 </li> <li> <code>name</code> (<code>bytes</code>) \u2013 </li> <li> <code>methods</code> (<code>Generator[Method]</code>) \u2013 </li> <li> <code>ivars</code> (<code>Generator[InstanceVariable]</code>) \u2013 </li> <li> <code>properties</code> (<code>Generator[ClassProperty]</code>) \u2013 </li> <li> <code>is_metaclass</code> (<code>bool</code>) \u2013 </li> <li> <code>cls</code> (<code>Class | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class.superclass","title":"superclass <code>property</code>","text":"<pre><code>superclass: Class | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class.name","title":"name <code>property</code>","text":"<pre><code>name: bytes\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class.methods","title":"methods <code>property</code>","text":"<pre><code>methods: Generator[Method]\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class.ivars","title":"ivars <code>property</code>","text":"<pre><code>ivars: Generator[InstanceVariable]\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class.properties","title":"properties <code>property</code>","text":"<pre><code>properties: Generator[ClassProperty]\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class.is_metaclass","title":"is_metaclass <code>property</code>","text":"<pre><code>is_metaclass: bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Class.cls","title":"cls <code>property</code>","text":"<pre><code>cls: Class | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.InstanceVariable","title":"InstanceVariable","text":"<pre><code>InstanceVariable(ptr: int)\n</code></pre> <p>An Objective-C Instance Variable.</p> <p>Instance Variables are NOT objects!</p> <p>Attributes:</p> <ul> <li> <code>offset</code> (<code>int</code>) \u2013 <p>The offset in bytes of this value from the start of the object instance.</p> </li> <li> <code>name</code> (<code>bytes</code>) \u2013 <p>The name of this instance variable.</p> </li> <li> <code>typename</code> (<code>bytes</code>) \u2013 <p>The name of the type of this instance variable.</p> </li> <li> <code>alignment</code> (<code>int</code>) \u2013 <p>The alignment of this instance variable, in bytes.</p> </li> <li> <code>size</code> (<code>int</code>) \u2013 <p>The size of this instance variable, in bytes.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.InstanceVariable.offset","title":"offset <code>property</code>","text":"<pre><code>offset: int\n</code></pre> <p>The offset in bytes of this value from the start of the object instance.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.InstanceVariable.name","title":"name <code>property</code>","text":"<pre><code>name: bytes\n</code></pre> <p>The name of this instance variable.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.InstanceVariable.typename","title":"typename <code>property</code>","text":"<pre><code>typename: bytes\n</code></pre> <p>The name of the type of this instance variable.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.InstanceVariable.alignment","title":"alignment <code>property</code>","text":"<pre><code>alignment: int\n</code></pre> <p>The alignment of this instance variable, in bytes.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.InstanceVariable.size","title":"size <code>property</code>","text":"<pre><code>size: int\n</code></pre> <p>The size of this instance variable, in bytes.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.ClassProperty","title":"ClassProperty","text":"<pre><code>ClassProperty(ptr: int)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>bytes</code>) \u2013 <p>The name of this class property.</p> </li> <li> <code>value</code> (<code>bytes</code>) \u2013 <p>The value of this property.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.ClassProperty.name","title":"name <code>property</code>","text":"<pre><code>name: bytes\n</code></pre> <p>The name of this class property.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.ClassProperty.value","title":"value <code>property</code>","text":"<pre><code>value: bytes\n</code></pre> <p>The value of this property.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Selector","title":"Selector","text":"<pre><code>Selector(ptr: int)\n</code></pre> <p>An Objective-C Selector.</p> <p>Selectors are NOT objects!</p> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>bytes</code>) \u2013 <p>Retrieves the name of this selector.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Selector.name","title":"name <code>property</code>","text":"<pre><code>name: bytes\n</code></pre> <p>Retrieves the name of this selector.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Method","title":"Method","text":"<pre><code>Method(ptr: int)\n</code></pre> <p>An Objective-C Method Pointer.</p> <p>Methods are NOT objects!</p> <p>A method pointer can be one of three types: Small, small direct, and big.</p> <p>Pointer types are distinguished by the two least significant bits in the integer representation of the pointer. A value of <code>1</code> is used for both small pointer types, while all other values are used to distinguish between the signing nuances of big pointers.</p> <p>Small pointers 32-bit wide and relative to a given base value. Big pointers contain the pointers themselves, and they may or may not be signed.</p> <p>Small direct pointers are small pointers that reside in the shared cache, and their selectors are relative to @selector(\ud83e\udd2f), while the selectors of regular small pointers are relative to the pointers themselves.</p> <p>Attributes:</p> <ul> <li> <code>sel</code> (<code>Selector</code>) \u2013 <p>The selector this method responds to.</p> </li> <li> <code>types</code> (<code>bytes</code>) \u2013 <p>The types of the arguments to this method.</p> </li> <li> <code>imp</code> (<code>int</code>) \u2013 <p>The pointer to the function that implements this method.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Method.sel","title":"sel <code>property</code>","text":"<pre><code>sel: Selector\n</code></pre> <p>The selector this method responds to.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Method.types","title":"types <code>property</code>","text":"<pre><code>types: bytes\n</code></pre> <p>The types of the arguments to this method.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.Method.imp","title":"imp <code>property</code>","text":"<pre><code>imp: int\n</code></pre> <p>The pointer to the function that implements this method.</p>"},{"location":"reference/pwndbg/aglib/objc/#pwndbg.aglib.objc.try_resolve_call_at_current_pc","title":"try_resolve_call_at_current_pc","text":"<pre><code>try_resolve_call_at_current_pc(insn: PwndbgInstruction) -&gt; Function | None\n</code></pre> <p>Tries to resolve a call to an Objective-C method for an instruction in the current Program Counter.</p>"},{"location":"reference/pwndbg/aglib/onegadget/","title":"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('(.*) &lt;= 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('(.+) &amp; 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 = ' &gt;&gt; '\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__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.__and__","title":"__and__","text":"<pre><code>__and__(other: CheckSatResult) -&gt; CheckSatResult\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.CheckSatResult.__or__","title":"__or__","text":"<pre><code>__or__(other: CheckSatResult) -&gt; 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) -&gt; Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.__sub__","title":"__sub__","text":"<pre><code>__sub__(other: int) -&gt; Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.__str__","title":"__str__","text":"<pre><code>__str__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.__repr__","title":"__repr__","text":"<pre><code>__repr__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.deref","title":"deref","text":"<pre><code>deref() -&gt; Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.deref_","title":"deref_","text":"<pre><code>deref_() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.ref","title":"ref","text":"<pre><code>ref() -&gt; Lambda\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.Lambda.evaluate","title":"evaluate","text":"<pre><code>evaluate(context: dict[Any, Any]) -&gt; 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] = {}) -&gt; 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) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/onegadget/#pwndbg.aglib.onegadget.colorize_integer","title":"colorize_integer","text":"<pre><code>colorize_integer(x: object) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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":"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() -&gt; 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) -&gt; 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) -&gt; 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]) -&gt; 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]) -&gt; 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) -&gt; 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]) -&gt; 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]) -&gt; 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) -&gt; Callable[[Callable[..., T]], Callable[..., T | None]]\n</code></pre>"},{"location":"reference/pwndbg/aglib/qemu/","title":"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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/qemu/#pwndbg.aglib.qemu.is_usermode","title":"is_usermode","text":"<pre><code>is_usermode() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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":"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>kernel</code> (<code>KernelRegisterSet</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.kernel","title":"kernel <code>property</code>","text":"<pre><code>kernel: KernelRegisterSet\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) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(attr: str) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(item: Any) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__contains__","title":"__contains__","text":"<pre><code>__contains__(reg: str) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.__iter__","title":"__iter__","text":"<pre><code>__iter__() -&gt; Iterator[str]\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.fix","title":"fix","text":"<pre><code>fix(expression: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.module.items","title":"items","text":"<pre><code>items() -&gt; 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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/regs/#pwndbg.aglib.regs.update_last","title":"update_last","text":"<pre><code>update_last() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/remote/","title":"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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/saved_register_frames/","title":"saved_register_frames","text":""},{"location":"reference/pwndbg/aglib/saved_register_frames/#pwndbg.aglib.saved_register_frames","title":"saved_register_frames","text":"<p>Classes:</p> <ul> <li> <code>SavedRegisterFrame</code> \u2013 <p>A list of registers that have been saved to process memory for later restoration.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>ARM_CORTEX_M_EXCEPTION_STACK_FRAME_OFFSETS</code> \u2013 </li> <li> <code>ARM_CORTEX_M_EXCEPTION_STACK</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/saved_register_frames/#pwndbg.aglib.saved_register_frames.ARM_CORTEX_M_EXCEPTION_STACK_FRAME_OFFSETS","title":"ARM_CORTEX_M_EXCEPTION_STACK_FRAME_OFFSETS <code>module-attribute</code>","text":"<pre><code>ARM_CORTEX_M_EXCEPTION_STACK_FRAME_OFFSETS = {\n \"r0\": 0,\n \"r1\": 4,\n \"r2\": 8,\n \"r3\": 12,\n \"r12\": 16,\n \"lr\": 20,\n \"pc\": 24,\n \"xpsr\": 28,\n}\n</code></pre>"},{"location":"reference/pwndbg/aglib/saved_register_frames/#pwndbg.aglib.saved_register_frames.ARM_CORTEX_M_EXCEPTION_STACK","title":"ARM_CORTEX_M_EXCEPTION_STACK <code>module-attribute</code>","text":"<pre><code>ARM_CORTEX_M_EXCEPTION_STACK = SavedRegisterFrame(\n ARM_CORTEX_M_EXCEPTION_STACK_FRAME_OFFSETS\n)\n</code></pre>"},{"location":"reference/pwndbg/aglib/saved_register_frames/#pwndbg.aglib.saved_register_frames.SavedRegisterFrame","title":"SavedRegisterFrame <code>dataclass</code>","text":"<pre><code>SavedRegisterFrame(register_offsets: dict[str, int])\n</code></pre> <p>A list of registers that have been saved to process memory for later restoration.</p> <p>For example, on syscall entry, the process registers are saved to the kernel stack.</p> <p>Methods:</p> <ul> <li> <code>read_saved_register</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>offsets</code> (<code>dict[str, int]</code>) \u2013 </li> <li> <code>frame_layout</code> (<code>list[tuple[int, str]]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/aglib/saved_register_frames/#pwndbg.aglib.saved_register_frames.SavedRegisterFrame.offsets","title":"offsets <code>instance-attribute</code>","text":"<pre><code>offsets: dict[str, int] = register_offsets\n</code></pre>"},{"location":"reference/pwndbg/aglib/saved_register_frames/#pwndbg.aglib.saved_register_frames.SavedRegisterFrame.frame_layout","title":"frame_layout <code>instance-attribute</code>","text":"<pre><code>frame_layout: list[tuple[int, str]] = sorted((y, x) for (x, y) in (items()))\n</code></pre>"},{"location":"reference/pwndbg/aglib/saved_register_frames/#pwndbg.aglib.saved_register_frames.SavedRegisterFrame.read_saved_register","title":"read_saved_register","text":"<pre><code>read_saved_register(reg: str, sp: int = None) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/shellcode/","title":"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)\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(ec: ExecutionController, blob)\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":"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) -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.get","title":"get","text":"<pre><code>get() -&gt; 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() -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/aglib/stack/#pwndbg.aglib.stack.callstack","title":"callstack","text":"<pre><code>callstack() -&gt; list[int]\n</code></pre> <p>Return the address of the return address for the current frame.</p>"},{"location":"reference/pwndbg/aglib/strings/","title":"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 &gt;= 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() -&gt; 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) -&gt; 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) -&gt; Iterator[str]\n</code></pre> <p>Yields strings of length &gt;= n found in a given vmmap page</p>"},{"location":"reference/pwndbg/aglib/symbol/","title":"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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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":"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() -&gt; 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() -&gt; 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() -&gt; 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":"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>sint</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.sint","title":"sint <code>module-attribute</code>","text":"<pre><code>sint: 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) -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.update","title":"update","text":"<pre><code>update() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/typeinfo/#pwndbg.aglib.typeinfo.load","title":"load","text":"<pre><code>load(name: str) -&gt; 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) -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap/","title":"vmmap","text":""},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap","title":"vmmap","text":"<p>Functions:</p> <ul> <li> <code>get_memory_map</code> \u2013 </li> <li> <code>get</code> \u2013 </li> <li> <code>find</code> \u2013 </li> <li> <code>addr_region_start</code> \u2013 <p>Let's define a \"region\" as contiguous memory compromised of memory mappings</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap.get_memory_map","title":"get_memory_map","text":"<pre><code>get_memory_map() -&gt; MemoryMap\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap.get","title":"get","text":"<pre><code>get() -&gt; tuple[Page, ...]\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap.find","title":"find","text":"<pre><code>find(address: int | Value | None) -&gt; Page | None\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap/#pwndbg.aglib.vmmap.addr_region_start","title":"addr_region_start","text":"<pre><code>addr_region_start(address: int | Value) -&gt; int | None\n</code></pre> <p>Let's define a \"region\" as contiguous memory compromised of memory mappings which all have the same object file name. Also referred to as \"File (Base)\" by <code>xinfo</code>.</p> <p>Returns:</p> <ul> <li> <code>int | None</code> \u2013 <p>The start of the memory region this address belongs to, or None if the address</p> </li> <li> <code>int | None</code> \u2013 <p>is not mapped.</p> </li> </ul>"},{"location":"reference/pwndbg/aglib/vmmap_custom/","title":"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() -&gt; 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) -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/aglib/vmmap_custom/#pwndbg.aglib.vmmap_custom.explore","title":"explore","text":"<pre><code>explore(address_maybe: int) -&gt; 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) -&gt; 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) -&gt; Page\n</code></pre> <p>Given a single address, find all contiguous pages which are mapped.</p>"},{"location":"reference/pwndbg/arguments/","title":"arguments","text":""},{"location":"reference/pwndbg/arguments/#pwndbg.arguments","title":"arguments","text":"<p>Function and syscall argument formatting.</p> <p>Enumerates 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> <p>Attributes:</p> <ul> <li> <code>FILE_DESCRIPTOR_ARG_NAMES</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.FILE_DESCRIPTOR_ARG_NAMES","title":"FILE_DESCRIPTOR_ARG_NAMES <code>module-attribute</code>","text":"<pre><code>FILE_DESCRIPTOR_ARG_NAMES = {\n \"fd\",\n \"in_fd\",\n \"out_fd\",\n \"fdin\",\n \"fdout\",\n \"oldfd\",\n \"fildes\",\n \"newfd\",\n \"epfd\",\n \"dfd\",\n \"dirfd\",\n \"mountdirfd\",\n}\n</code></pre>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.get","title":"get","text":"<pre><code>get(instruction: PwndbgInstruction) -&gt; list[tuple[Argument, int]]\n</code></pre> <p>Returns an array containing the arguments to the current function, if $pc is a function call or syscall instruction.</p> <p>Otherwise, returns None.</p>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.argname","title":"argname","text":"<pre><code>argname(n: int, abi: ABI) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/arguments/#pwndbg.arguments.argument","title":"argument","text":"<pre><code>argument(n: int, abi: ABI | None = None) -&gt; 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) -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/auxv/","title":"auxv","text":""},{"location":"reference/pwndbg/auxv/#pwndbg.auxv","title":"auxv","text":"<p>Performs handling of the linux auxiliary vector.</p> <p>https://www.man7.org/linux/man-pages/man3/getauxval.3.html https://lwn.net/Articles/519085/</p> <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() -&gt; AUXV\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.procfs_auxv","title":"procfs_auxv","text":"<pre><code>procfs_auxv() -&gt; AUXV | None\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.use_info_auxv","title":"use_info_auxv","text":"<pre><code>use_info_auxv() -&gt; AUXV | None\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.explore_stack_auxv","title":"explore_stack_auxv","text":"<pre><code>explore_stack_auxv() -&gt; AUXV | None\n</code></pre>"},{"location":"reference/pwndbg/auxv/#pwndbg.auxv.walk_stack2","title":"walk_stack2","text":"<pre><code>walk_stack2(offset: int = 0) -&gt; AUXV\n</code></pre>"},{"location":"reference/pwndbg/chain/","title":"chain","text":""},{"location":"reference/pwndbg/chain/#pwndbg.chain","title":"chain","text":"<p>Dereference and format pointer chains.</p> <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) -&gt; 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) -&gt; 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":"color","text":""},{"location":"reference/pwndbg/color/#pwndbg.color","title":"color","text":"<p>Text colorizing and theme configuration logic.</p> <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>nocolor</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(\"NO_COLOR\")),\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) -&gt; Callable[[str], str]\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.normal","title":"normal","text":"<pre><code>normal(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.black","title":"black","text":"<pre><code>black(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.red","title":"red","text":"<pre><code>red(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.green","title":"green","text":"<pre><code>green(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.yellow","title":"yellow","text":"<pre><code>yellow(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.blue","title":"blue","text":"<pre><code>blue(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.purple","title":"purple","text":"<pre><code>purple(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.cyan","title":"cyan","text":"<pre><code>cyan(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_gray","title":"light_gray","text":"<pre><code>light_gray(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.foreground","title":"foreground","text":"<pre><code>foreground(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.gray","title":"gray","text":"<pre><code>gray(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_red","title":"light_red","text":"<pre><code>light_red(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_green","title":"light_green","text":"<pre><code>light_green(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_yellow","title":"light_yellow","text":"<pre><code>light_yellow(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_blue","title":"light_blue","text":"<pre><code>light_blue(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_purple","title":"light_purple","text":"<pre><code>light_purple(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.light_cyan","title":"light_cyan","text":"<pre><code>light_cyan(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.white","title":"white","text":"<pre><code>white(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.bold","title":"bold","text":"<pre><code>bold(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.underline","title":"underline","text":"<pre><code>underline(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.colorize","title":"colorize","text":"<pre><code>colorize(x: str, color: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.nocolor","title":"nocolor","text":"<pre><code>nocolor(x: str, color: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.unstylize","title":"unstylize","text":"<pre><code>unstylize(x: str) -&gt; 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) -&gt; 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) -&gt; Callable[[object], str]\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.strip","title":"strip","text":"<pre><code>strip(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/#pwndbg.color.terminateWith","title":"terminateWith","text":"<pre><code>terminateWith(x: str, color: str) -&gt; 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 = ' ') -&gt; 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":"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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.highlight","title":"highlight","text":"<pre><code>highlight(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.register","title":"register","text":"<pre><code>register(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.register_changed","title":"register_changed","text":"<pre><code>register_changed(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_bracket","title":"flag_bracket","text":"<pre><code>flag_bracket(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_value","title":"flag_value","text":"<pre><code>flag_value(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_set","title":"flag_set","text":"<pre><code>flag_set(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_unset","title":"flag_unset","text":"<pre><code>flag_unset(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.flag_changed","title":"flag_changed","text":"<pre><code>flag_changed(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.banner","title":"banner","text":"<pre><code>banner(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.banner_title","title":"banner_title","text":"<pre><code>banner_title(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/context/#pwndbg.color.context.comment","title":"comment","text":"<pre><code>comment(x: object) -&gt; 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":"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>config_branch_on</code> \u2013 </li> <li> <code>config_branch_off</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.config_branch_on","title":"config_branch_on <code>module-attribute</code>","text":"<pre><code>config_branch_on = add_param(\n \"disasm-branch-on\", \"\u2714\", \"marker for branches that WILL be taken\"\n)\n</code></pre>"},{"location":"reference/pwndbg/color/disasm/#pwndbg.color.disasm.config_branch_off","title":"config_branch_off <code>module-attribute</code>","text":"<pre><code>config_branch_off = add_param(\n \"disasm-branch-off\", \"\u2718\", \"marker for branches that will NOT be taken\"\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) -&gt; 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]) -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/color/enhance/","title":"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":"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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.printable","title":"printable","text":"<pre><code>printable(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.zero","title":"zero","text":"<pre><code>zero(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.special","title":"special","text":"<pre><code>special(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.offset","title":"offset","text":"<pre><code>offset(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.address","title":"address","text":"<pre><code>address(x: str) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/hexdump/#pwndbg.color.hexdump.separator","title":"separator","text":"<pre><code>separator(x: str) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/memory/","title":"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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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":"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> \u2013 </li> <li> <code>config_prompt_alive_color</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 = 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 = 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.off","title":"off","text":"<pre><code>off(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.notice","title":"notice","text":"<pre><code>notice(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.hint","title":"hint","text":"<pre><code>hint(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.success","title":"success","text":"<pre><code>success(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.debug","title":"debug","text":"<pre><code>debug(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.info","title":"info","text":"<pre><code>info(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.warn","title":"warn","text":"<pre><code>warn(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.error","title":"error","text":"<pre><code>error(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.system","title":"system","text":"<pre><code>system(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.exit","title":"exit","text":"<pre><code>exit(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.breakpoint","title":"breakpoint","text":"<pre><code>breakpoint(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.signal","title":"signal","text":"<pre><code>signal(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.prompt","title":"prompt","text":"<pre><code>prompt(msg: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/message/#pwndbg.color.message.alive_prompt","title":"alive_prompt","text":"<pre><code>alive_prompt(msg: object) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/syntax_highlight/","title":"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() -&gt; 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') -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/","title":"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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.register","title":"register","text":"<pre><code>register(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.separator","title":"separator","text":"<pre><code>separator(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.delimiter","title":"delimiter","text":"<pre><code>delimiter(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/telescope/#pwndbg.color.telescope.repeating_marker","title":"repeating_marker","text":"<pre><code>repeating_marker(x: object) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/","title":"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(*args, **kwargs)\n</code></pre> <p> Bases: <code>Parameter</code></p> <p>Methods:</p> <ul> <li> <code>update_color_function</code> \u2013 </li> <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>color_function</code> (<code>Callable[[object], str]</code>) \u2013 </li> <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.color_function","title":"color_function <code>instance-attribute</code>","text":"<pre><code>color_function: Callable[[object], str]\n</code></pre>"},{"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 = set_show_doc\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 = help_docstring\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.update_color_function","title":"update_color_function","text":"<pre><code>update_color_function()\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]) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.revert_default","title":"revert_default","text":"<pre><code>revert_default() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.attr_name","title":"attr_name","text":"<pre><code>attr_name() -&gt; 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) -&gt; 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() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.pretty_default","title":"pretty_default","text":"<pre><code>pretty_default() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__int__","title":"__int__","text":"<pre><code>__int__() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__str__","title":"__str__","text":"<pre><code>__str__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__bool__","title":"__bool__","text":"<pre><code>__bool__() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__lt__","title":"__lt__","text":"<pre><code>__lt__(other: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__add__","title":"__add__","text":"<pre><code>__add__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__radd__","title":"__radd__","text":"<pre><code>__radd__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__sub__","title":"__sub__","text":"<pre><code>__sub__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__rsub__","title":"__rsub__","text":"<pre><code>__rsub__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__mul__","title":"__mul__","text":"<pre><code>__mul__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__rmul__","title":"__rmul__","text":"<pre><code>__rmul__(other: int) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__div__","title":"__div__","text":"<pre><code>__div__(other: float) -&gt; float\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__floordiv__","title":"__floordiv__","text":"<pre><code>__floordiv__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__pow__","title":"__pow__","text":"<pre><code>__pow__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__mod__","title":"__mod__","text":"<pre><code>__mod__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/color/theme/#pwndbg.color.theme.ColorParameter.__len__","title":"__len__","text":"<pre><code>__len__() -&gt; 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 *,\n help_docstring: str = \"\",\n param_class: int | None = None,\n enum_sequence: Sequence[str] | None = None,\n) -&gt; 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(\n name: str, default: Any, set_show_doc: str, *, help_docstring: str = \"\"\n) -&gt; ColorParameter\n</code></pre>"},{"location":"reference/pwndbg/commands/","title":"commands","text":""},{"location":"reference/pwndbg/commands/#pwndbg.commands","title":"commands","text":"<p>Pwndbg command implementations.</p> <p>As well as various command-handling logic.</p> <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>buddydump</code> \u2013 </li> <li> <code>canary</code> \u2013 </li> <li> <code>checksec</code> \u2013 </li> <li> <code>comments</code> \u2013 </li> <li> <code>commpage</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>kbpf</code> \u2013 </li> <li> <code>kchecksec</code> \u2013 </li> <li> <code>kcmdline</code> \u2013 </li> <li> <code>kconfig</code> \u2013 </li> <li> <code>kdmabuf</code> \u2013 </li> <li> <code>kdmesg</code> \u2013 <p>Display the kernel ring buffer (dmesg) contents.</p> </li> <li> <code>killthreads</code> \u2013 </li> <li> <code>klookup</code> \u2013 </li> <li> <code>kmod</code> \u2013 <p>Displays information about loaded kernel modules. This command retrieves the list of kernel modules from the <code>modules</code> symbol</p> </li> <li> <code>knft</code> \u2013 </li> <li> <code>ksyscalls</code> \u2013 <p>Displays the syscall table for kernel debugging.</p> </li> <li> <code>ktask</code> \u2013 <p>Displays information about kernel tasks. This command iterates through the kernel's task list</p> </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>mallocng</code> \u2013 <p>Commands that help with debugging musl's allocator, mallocng.</p> </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>msr</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>paging</code> \u2013 </li> <li> <code>parse_seccomp</code> \u2013 </li> <li> <code>patch</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>saved_register_frames</code> \u2013 </li> <li> <code>search</code> \u2013 </li> <li> <code>segments</code> \u2013 </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>InvalidDebuggerError</code> \u2013 <p>Raised when a command is called in a debugger for which</p> </li> <li> <code>CommandFormatter</code> \u2013 <p>The formatter_class that is passed to argparse for all</p> </li> <li> <code>CommandObj</code> \u2013 <p>Represents a command that can be invoked from the</p> </li> <li> <code>Command</code> \u2013 <p>Parametrized decorator for functions that serve as pwndbg commands.</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>OnlyWithKernelDebugInfo</code> \u2013 </li> <li> <code>OnlyWithKernelDebugSymbols</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[CommandObj]</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[CommandObj] = []\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>MUSL</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>DARWIN</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.MUSL","title":"MUSL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MUSL = 'musl'\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.DARWIN","title":"DARWIN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DARWIN = 'Darwin/libsystem/Mach-O'\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.InvalidDebuggerError","title":"InvalidDebuggerError","text":"<p> Bases: <code>Exception</code></p> <p>Raised when a command is called in a debugger for which it is disallowed.</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandFormatter","title":"CommandFormatter","text":"<p> Bases: <code>RawDescriptionHelpFormatter</code></p> <p>The formatter_class that is passed to argparse for all commands.</p> <p>Subclassing this isn't officially supported, but there isn't a good alternative.</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj","title":"CommandObj","text":"<pre><code>CommandObj(\n function: Callable[..., str | None],\n parser: ArgumentParser,\n command_name: str | None,\n category: CommandCategory,\n aliases: list[str],\n examples: str,\n notes: str,\n)\n</code></pre> <p>Represents a command that can be invoked from the debugger.</p> <p>Methods:</p> <ul> <li> <code>register_command</code> \u2013 <p>Register this object command with the underlying debugger</p> </li> <li> <code>has_notes_string</code> \u2013 </li> <li> <code>has_examples_string</code> \u2013 </li> <li> <code>initialize_parser</code> \u2013 </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>function</code> \u2013 </li> <li> <code>command_name</code> \u2013 </li> <li> <code>category</code> \u2013 </li> <li> <code>aliases</code> \u2013 </li> <li> <code>examples</code> \u2013 </li> <li> <code>notes</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> <li> <code>repeat</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.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.CommandObj.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.CommandObj.function","title":"function <code>instance-attribute</code>","text":"<pre><code>function = function\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.command_name","title":"command_name <code>instance-attribute</code>","text":"<pre><code>command_name = command_name\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.category","title":"category <code>instance-attribute</code>","text":"<pre><code>category = category\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.aliases","title":"aliases <code>instance-attribute</code>","text":"<pre><code>aliases = aliases\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.examples","title":"examples <code>instance-attribute</code>","text":"<pre><code>examples = strip()\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.notes","title":"notes <code>instance-attribute</code>","text":"<pre><code>notes = strip()\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.parser","title":"parser <code>instance-attribute</code>","text":"<pre><code>parser = parser\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.repeat","title":"repeat <code>instance-attribute</code>","text":"<pre><code>repeat = False\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.register_command","title":"register_command","text":"<pre><code>register_command()\n</code></pre> <p>Register this object command with the underlying debugger and update pwndbg global state to know about this command.</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.has_notes_string","title":"has_notes_string <code>staticmethod</code>","text":"<pre><code>has_notes_string(text: str) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.has_examples_string","title":"has_examples_string <code>staticmethod</code>","text":"<pre><code>has_examples_string(text: str) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.initialize_parser","title":"initialize_parser","text":"<pre><code>initialize_parser()\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.invoke","title":"invoke","text":"<pre><code>invoke(argument: str, from_tty: bool) -&gt; None\n</code></pre> <p>Invoke the command with an argument string</p>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.CommandObj.check_repeated","title":"check_repeated","text":"<pre><code>check_repeated(argument: str, from_tty: bool) -&gt; 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.CommandObj.__call__","title":"__call__","text":"<pre><code>__call__(*args: Any, **kwargs: Any) -&gt; str | None\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command","title":"Command","text":"<pre><code>Command(\n parser_or_desc: str | ArgumentParser,\n *,\n category: CommandCategory,\n command_name: str | None = None,\n aliases: list[str] = [],\n examples: str = \"\",\n notes: str = \"\",\n only_debuggers: set[DebuggerType] = None,\n exclude_debuggers: set[DebuggerType] = None,\n)\n</code></pre> <p>Parametrized decorator for functions that serve as pwndbg commands.</p> <p>Always use this to decorate your commands.</p> <p>Methods:</p> <ul> <li> <code>__call__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>category</code> \u2013 </li> <li> <code>command_name</code> \u2013 </li> <li> <code>aliases</code> \u2013 </li> <li> <code>examples</code> \u2013 </li> <li> <code>notes</code> \u2013 </li> <li> <code>only_debuggers</code> \u2013 </li> <li> <code>exclude_debuggers</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.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.Command.category","title":"category <code>instance-attribute</code>","text":"<pre><code>category = category\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.command_name","title":"command_name <code>instance-attribute</code>","text":"<pre><code>command_name = command_name\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.examples","title":"examples <code>instance-attribute</code>","text":"<pre><code>examples = examples\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.notes","title":"notes <code>instance-attribute</code>","text":"<pre><code>notes = notes\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.Command.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.Command.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.Command.__call__","title":"__call__","text":"<pre><code>__call__(function: Callable[..., Any]) -&gt; CommandObj\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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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]) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenLocal","title":"OnlyWhenLocal","text":"<pre><code>OnlyWhenLocal(function: Callable[P, T]) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithFile","title":"OnlyWithFile","text":"<pre><code>OnlyWithFile(function: Callable[P, T]) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenQemuKernel","title":"OnlyWhenQemuKernel","text":"<pre><code>OnlyWhenQemuKernel(function: Callable[P, T]) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenUserspace","title":"OnlyWhenUserspace","text":"<pre><code>OnlyWhenUserspace(function: Callable[P, T]) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithKernelDebugInfo","title":"OnlyWithKernelDebugInfo","text":"<pre><code>OnlyWithKernelDebugInfo(function: Callable[P, T]) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithKernelDebugSymbols","title":"OnlyWithKernelDebugSymbols","text":"<pre><code>OnlyWithKernelDebugSymbols(\n function: Callable[P, T],\n) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenPagingEnabled","title":"OnlyWhenPagingEnabled","text":"<pre><code>OnlyWhenPagingEnabled(function: Callable[P, T]) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWhenRunning","title":"OnlyWhenRunning","text":"<pre><code>OnlyWhenRunning(function: Callable[P, T]) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithTcache","title":"OnlyWithTcache","text":"<pre><code>OnlyWithTcache(function: Callable[P, T]) -&gt; 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) -&gt; Callable[P, T | None]\n</code></pre>"},{"location":"reference/pwndbg/commands/#pwndbg.commands.OnlyWithResolvedHeapSyms","title":"OnlyWithResolvedHeapSyms","text":"<pre><code>OnlyWithResolvedHeapSyms(function: Callable[P, T]) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ai/","title":"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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/argv/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/argv/#pwndbg.commands.argv.argv","title":"argv","text":"<pre><code>argv(i: int = None) -&gt; 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":"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 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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/asm/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/","title":"attachp","text":""},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp","title":"attachp","text":"<p>Classes:</p> <ul> <li> <code>ProcessInfo</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>find_pids</code> \u2013 </li> <li> <code>resolve_target_process</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 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 &lt;name&gt;` 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.ProcessInfo","title":"ProcessInfo","text":"<p> Bases: <code>NamedTuple</code></p> <p>Attributes:</p> <ul> <li> <code>pid</code> (<code>int</code>) \u2013 </li> <li> <code>user</code> (<code>str</code>) \u2013 </li> <li> <code>elapsed</code> (<code>str</code>) \u2013 </li> <li> <code>command</code> (<code>str</code>) \u2013 </li> <li> <code>start_time</code> (<code>float</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.ProcessInfo.pid","title":"pid <code>instance-attribute</code>","text":"<pre><code>pid: int\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.ProcessInfo.user","title":"user <code>instance-attribute</code>","text":"<pre><code>user: str\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.ProcessInfo.elapsed","title":"elapsed <code>instance-attribute</code>","text":"<pre><code>elapsed: str\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.ProcessInfo.command","title":"command <code>instance-attribute</code>","text":"<pre><code>command: str\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.ProcessInfo.start_time","title":"start_time <code>instance-attribute</code>","text":"<pre><code>start_time: float\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.find_pids","title":"find_pids","text":"<pre><code>find_pids(target: str, user: str | None, exact: bool, all: bool) -&gt; list[int]\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.resolve_target_process","title":"resolve_target_process","text":"<pre><code>resolve_target_process(\n pids: list[int], method: str, no_truncate: bool\n) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/attachp/#pwndbg.commands.attachp.attachp","title":"attachp","text":"<pre><code>attachp(\n target: str,\n no_truncate: bool,\n retry: bool,\n exact: bool,\n all: bool,\n user: str | None = None,\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/auxv/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/auxv/#pwndbg.commands.auxv.auxv_explore","title":"auxv_explore","text":"<pre><code>auxv_explore() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/binder/","title":"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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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":"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) -&gt; None\n</code></pre> <p>Synchronize Binary Ninja's cursor with GDB</p>"},{"location":"reference/pwndbg/commands/binja_functions/","title":"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) -&gt; int | None\n</code></pre> <p>Lookup a symbol's address by name from Binary Ninja.</p> <p>This function sees symbols like functions and global variables, but not stack local variables, use <code>bn_var</code> for that.</p> <p>Example: <pre><code>pwndbg&gt; set integration-provider binja\nPwndbg successfully connected to Binary Ninja (4.2.6455 Personal) xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'binja'.\npwndbg&gt; p main\nNo symbol \"main\" in current context.\npwndbg&gt; p/x $bn_sym(\"main\")\n$2 = 0x555555555645\npwndbg&gt; b *($bn_sym(\"main\"))\nBreakpoint 1 at 0x555555555645\n</code></pre></p>"},{"location":"reference/pwndbg/commands/binja_functions/#pwndbg.commands.binja_functions.bn_var","title":"bn_var","text":"<pre><code>bn_var(name_val: Value) -&gt; int | None\n</code></pre> <p>Lookup a stack variable's address by name from Binary Ninja.</p> <p>This function doesn't see functions or global variables, use <code>bn_sym</code> for that.</p> <p>Example: <pre><code>pwndbg&gt; set integration-provider binja\nPwndbg successfully connected to Binary Ninja (4.2.6455 Personal) xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'binja'.\npwndbg&gt; p user_choice\nNo symbol \"user_choice\" in current context.\npwndbg&gt; p/x $bn_var(\"user_choice\")\n$4 = 0x7fffffffe118\npwndbg&gt; vmmap $4\n 0x7ffff7ffe000 0x7ffff7fff000 rw-p 1000 0 [anon_7ffff7ffe]\n\u25ba 0x7ffffffde000 0x7ffffffff000 rw-p 21000 0 [stack] +0x20118\npwndbg&gt; p/x $bn_var(\"main\")\nTypeError: Could not convert Python object: None.\nError while executing Python code.\n</code></pre></p>"},{"location":"reference/pwndbg/commands/binja_functions/#pwndbg.commands.binja_functions.bn_eval","title":"bn_eval","text":"<pre><code>bn_eval(expr: Value) -&gt; int | None\n</code></pre> <p>Parse and evaluate a Binary Ninja expression.</p> <p>Read more about binary ninja expressions here: https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.parse_expression</p> <p>All registers in the current register set are available as magic variables (e.g. $rip). The $piebase magic variable is also included, with the computed executable base.</p> <p>This function cannot see stack local variables.</p> <p>Example: <pre><code>pwndbg&gt; set integration-provider binja\nPwndbg successfully connected to Binary Ninja (4.2.6455 Personal) xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'binja'.\npwndbg&gt; p/x $bn_eval(\"10+20\")\n$6 = 0x30\npwndbg&gt; p/x $bn_eval(\"main\")\n$7 = 0x1645\npwndbg&gt; p/x $rebase($bn_eval(\"main\"))\n$8 = 0x555555555645\npwndbg&gt; p some_global_var\nNo symbol \"some_global_var\" in current context.\npwndbg&gt; p/x $rebase($bn_eval(\"some_global_var+$rax\"))\n$9 = 0x5555555586b8\npwndbg&gt; p $rebase($bn_eval(\"some_global_var+$rax\")) == $bn_sym(\"some_global_var\") + $rax\n$10 = 1\npwndbg&gt; p $bn_eval(\"$piebase+some_global_var+$rax\") == $bn_sym(\"some_global_var\") + $rax\n$11 = 1\n</code></pre></p>"},{"location":"reference/pwndbg/commands/branch/","title":"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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/","title":"buddydump","text":""},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump","title":"buddydump","text":"<p>Classes:</p> <ul> <li> <code>ParsedBuddyArgs</code> \u2013 </li> <li> <code>CurrentBuddyParams</code> \u2013 </li> </ul> <p>Functions:</p> <ul> <li> <code>cpu_limitcheck</code> \u2013 </li> <li> <code>static_str_arr</code> \u2013 </li> <li> <code>check_find</code> \u2013 </li> <li> <code>traverse_pglist</code> \u2013 </li> <li> <code>print_section</code> \u2013 </li> <li> <code>print_pglist</code> \u2013 </li> <li> <code>print_mtypes</code> \u2013 </li> <li> <code>print_pcp_set</code> \u2013 </li> <li> <code>print_free_area</code> \u2013 </li> <li> <code>print_zones</code> \u2013 </li> <li> <code>buddydump</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>log</code> \u2013 </li> <li> <code>MAX_PG_FREE_LIST_STR_RESULT_CNT</code> \u2013 </li> <li> <code>MAX_PG_FREE_LIST_CNT</code> \u2013 </li> <li> <code>NONE_TUPLE</code> \u2013 </li> <li> <code>MIGRATE_PCPTYPES</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.log","title":"log <code>module-attribute</code>","text":"<pre><code>log = getLogger(__name__)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.MAX_PG_FREE_LIST_STR_RESULT_CNT","title":"MAX_PG_FREE_LIST_STR_RESULT_CNT <code>module-attribute</code>","text":"<pre><code>MAX_PG_FREE_LIST_STR_RESULT_CNT = 16\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.MAX_PG_FREE_LIST_CNT","title":"MAX_PG_FREE_LIST_CNT <code>module-attribute</code>","text":"<pre><code>MAX_PG_FREE_LIST_CNT = 4096\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.NONE_TUPLE","title":"NONE_TUPLE <code>module-attribute</code>","text":"<pre><code>NONE_TUPLE = (None, None)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.MIGRATE_PCPTYPES","title":"MIGRATE_PCPTYPES <code>module-attribute</code>","text":"<pre><code>MIGRATE_PCPTYPES = 3\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Displays metadata and freelists of the buddy allocator.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.ParsedBuddyArgs","title":"ParsedBuddyArgs <code>dataclass</code>","text":"<pre><code>ParsedBuddyArgs(\n zone: str | None,\n order: int | None,\n mtype: str | None,\n cpu: int | None,\n find: int | None,\n)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>zone</code> (<code>str | None</code>) \u2013 </li> <li> <code>order</code> (<code>int | None</code>) \u2013 </li> <li> <code>mtype</code> (<code>str | None</code>) \u2013 </li> <li> <code>cpu</code> (<code>int | None</code>) \u2013 </li> <li> <code>find</code> (<code>int | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.ParsedBuddyArgs.zone","title":"zone <code>instance-attribute</code>","text":"<pre><code>zone: str | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.ParsedBuddyArgs.order","title":"order <code>instance-attribute</code>","text":"<pre><code>order: int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.ParsedBuddyArgs.mtype","title":"mtype <code>instance-attribute</code>","text":"<pre><code>mtype: str | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.ParsedBuddyArgs.cpu","title":"cpu <code>instance-attribute</code>","text":"<pre><code>cpu: int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.ParsedBuddyArgs.find","title":"find <code>instance-attribute</code>","text":"<pre><code>find: int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams","title":"CurrentBuddyParams <code>dataclass</code>","text":"<pre><code>CurrentBuddyParams(\n sections: list[tuple[str, str]],\n indent: IndentContextManager,\n node: int | None,\n zone: Value | None,\n order: int,\n mtype: str | None,\n freelists: Value | None,\n freelist: Value | None,\n nr_types: int | None,\n found: bool,\n)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>sections</code> (<code>list[tuple[str, str]]</code>) \u2013 </li> <li> <code>indent</code> (<code>IndentContextManager</code>) \u2013 </li> <li> <code>node</code> (<code>int | None</code>) \u2013 </li> <li> <code>zone</code> (<code>Value | None</code>) \u2013 </li> <li> <code>order</code> (<code>int</code>) \u2013 </li> <li> <code>mtype</code> (<code>str | None</code>) \u2013 </li> <li> <code>freelists</code> (<code>Value | None</code>) \u2013 </li> <li> <code>freelist</code> (<code>Value | None</code>) \u2013 </li> <li> <code>nr_types</code> (<code>int | None</code>) \u2013 </li> <li> <code>found</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.sections","title":"sections <code>instance-attribute</code>","text":"<pre><code>sections: list[tuple[str, str]]\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.indent","title":"indent <code>instance-attribute</code>","text":"<pre><code>indent: IndentContextManager\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.node","title":"node <code>instance-attribute</code>","text":"<pre><code>node: int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.zone","title":"zone <code>instance-attribute</code>","text":"<pre><code>zone: Value | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.order","title":"order <code>instance-attribute</code>","text":"<pre><code>order: int\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.mtype","title":"mtype <code>instance-attribute</code>","text":"<pre><code>mtype: str | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.freelists","title":"freelists <code>instance-attribute</code>","text":"<pre><code>freelists: Value | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.freelist","title":"freelist <code>instance-attribute</code>","text":"<pre><code>freelist: Value | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.nr_types","title":"nr_types <code>instance-attribute</code>","text":"<pre><code>nr_types: int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.CurrentBuddyParams.found","title":"found <code>instance-attribute</code>","text":"<pre><code>found: bool\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.cpu_limitcheck","title":"cpu_limitcheck","text":"<pre><code>cpu_limitcheck(cpu: str)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.static_str_arr","title":"static_str_arr","text":"<pre><code>static_str_arr(name: str) -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.check_find","title":"check_find","text":"<pre><code>check_find(\n counter: int,\n physmap_addr: int,\n pba: ParsedBuddyArgs,\n cbp: CurrentBuddyParams,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.traverse_pglist","title":"traverse_pglist","text":"<pre><code>traverse_pglist(\n pba: ParsedBuddyArgs, cbp: CurrentBuddyParams\n) -&gt; tuple[list[tuple[int, str]], int, list[str]]\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.print_section","title":"print_section","text":"<pre><code>print_section(section: tuple[str, str], indent: IndentContextManager)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.print_pglist","title":"print_pglist","text":"<pre><code>print_pglist(pba: ParsedBuddyArgs, cbp: CurrentBuddyParams)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.print_mtypes","title":"print_mtypes","text":"<pre><code>print_mtypes(pba: ParsedBuddyArgs, cbp: CurrentBuddyParams)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.print_pcp_set","title":"print_pcp_set","text":"<pre><code>print_pcp_set(pba: ParsedBuddyArgs, cbp: CurrentBuddyParams)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.print_free_area","title":"print_free_area","text":"<pre><code>print_free_area(pba: ParsedBuddyArgs, cbp: CurrentBuddyParams)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.print_zones","title":"print_zones","text":"<pre><code>print_zones(pba: ParsedBuddyArgs, cbp: CurrentBuddyParams, zones, pcp_only)\n</code></pre>"},{"location":"reference/pwndbg/commands/buddydump/#pwndbg.commands.buddydump.buddydump","title":"buddydump","text":"<pre><code>buddydump(\n zone: str,\n pcp_only: bool,\n order: int,\n mtype: str,\n cpu: int,\n node: int,\n find: int,\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/canary/","title":"canary","text":""},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary","title":"canary","text":"<p>Functions:</p> <ul> <li> <code>canary_value</code> \u2013 <p>Get the global canary value from AT_RANDOM with its last byte masked (as glibc does)</p> </li> <li> <code>find_tls_canary_addr</code> \u2013 <p>Find the address of the canary in the Thread Local Storage (TLS).</p> </li> <li> <code>canary</code> \u2013 <p>Display information about the stack canary, including its location in TLS and any copies found on the stack.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>DEFAULT_NUM_CANARIES_TO_DISPLAY</code> \u2013 </li> <li> <code>TLS_CANARY_OFFSETS</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.TLS_CANARY_OFFSETS","title":"TLS_CANARY_OFFSETS <code>module-attribute</code>","text":"<pre><code>TLS_CANARY_OFFSETS = {'x86-64': 40, 'i386': 20, 'aarch64': 40}\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() -&gt; tuple[int | None, int | None]\n</code></pre> <p>Get the global canary value from AT_RANDOM with its last byte masked (as glibc does)</p> <p>Returns:</p> <ul> <li> <code>tuple</code> ( <code>tuple[int | None, int | None]</code> ) \u2013 <p>(canary_value, at_random_addr) or (None, None) if not found</p> </li> </ul>"},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary.find_tls_canary_addr","title":"find_tls_canary_addr","text":"<pre><code>find_tls_canary_addr() -&gt; int | None\n</code></pre> <p>Find the address of the canary in the Thread Local Storage (TLS).</p> <p>The canary is stored at a fixed offset from the TLS base, which varies by architecture. The TLS base can be accessed through architecture-specific registers: - x86_64: fs register - i386: gs register - aarch64: tpidr_el0 register</p> <p>Returns:</p> <ul> <li> <code>int</code> ( <code>int | None</code> ) \u2013 <p>The virtual address of the canary in TLS, or None if not found/supported</p> </li> </ul>"},{"location":"reference/pwndbg/commands/canary/#pwndbg.commands.canary.canary","title":"canary","text":"<pre><code>canary(all) -&gt; None\n</code></pre> <p>Display information about the stack canary, including its location in TLS and any copies found on the stack.</p>"},{"location":"reference/pwndbg/commands/checksec/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/comments/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/comments/#pwndbg.commands.comments.init","title":"init","text":"<pre><code>init() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/commpage/","title":"commpage","text":""},{"location":"reference/pwndbg/commands/commpage/#pwndbg.commands.commpage","title":"commpage","text":"<p>Functions:</p> <ul> <li> <code>pretty_bytes</code> \u2013 </li> <li> <code>commpage</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/commpage/#pwndbg.commands.commpage.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description=\"Dumps all values from the macOS commpage.\")\n</code></pre>"},{"location":"reference/pwndbg/commands/commpage/#pwndbg.commands.commpage.pretty_bytes","title":"pretty_bytes","text":"<pre><code>pretty_bytes(data: bytes) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/commpage/#pwndbg.commands.commpage.commpage","title":"commpage","text":"<pre><code>commpage(verbose: bool = False)\n</code></pre>"},{"location":"reference/pwndbg/commands/config/","title":"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>heap_config</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>themefile_parser</code> \u2013 </li> <li> <code>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.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.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Shows heap related configuration.')\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: Scope, filter_pattern: str)\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,\n scope: Scope,\n has_file_command: bool = True,\n show_hints: bool = True,\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.config","title":"config","text":"<pre><code>config(filter_pattern) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.theme","title":"theme","text":"<pre><code>theme(filter_pattern) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.configfile","title":"configfile","text":"<pre><code>configfile(show_all=False) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.themefile","title":"themefile","text":"<pre><code>themefile(show_all=False) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/config/#pwndbg.commands.config.heap_config","title":"heap_config","text":"<pre><code>heap_config(filter_pattern: str) -&gt; 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: Scope, show_all: bool = False) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/","title":"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> <li> <code>RegisterContext</code> \u2013 </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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.CallOutput.writelines","title":"writelines","text":"<pre><code>writelines(lines_iterable) -&gt; 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.RegisterContext","title":"RegisterContext","text":"<pre><code>RegisterContext()\n</code></pre> <p>Methods:</p> <ul> <li> <code>get_prefix</code> \u2013 </li> <li> <code>get_register_value</code> \u2013 </li> <li> <code>flag_register_context</code> \u2013 </li> <li> <code>segment_registers_context</code> \u2013 </li> <li> <code>addressing_register_context</code> \u2013 </li> <li> <code>register_context_default</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>changed</code> (<code>list[str]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.RegisterContext.changed","title":"changed <code>instance-attribute</code>","text":"<pre><code>changed: list[str] = changed\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.RegisterContext.get_prefix","title":"get_prefix","text":"<pre><code>get_prefix(reg)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.RegisterContext.get_register_value","title":"get_register_value","text":"<pre><code>get_register_value(reg)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.RegisterContext.flag_register_context","title":"flag_register_context","text":"<pre><code>flag_register_context(reg, bit_flags)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.RegisterContext.segment_registers_context","title":"segment_registers_context","text":"<pre><code>segment_registers_context(regs)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.RegisterContext.addressing_register_context","title":"addressing_register_context","text":"<pre><code>addressing_register_context(reg, is_virtual)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.RegisterContext.register_context_default","title":"register_context_default","text":"<pre><code>register_context_default(reg)\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.clear_screen","title":"clear_screen","text":"<pre><code>clear_screen(out=stdout) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextprev","title":"contextprev","text":"<pre><code>contextprev(count) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextnext","title":"contextnext","text":"<pre><code>contextnext(count) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextsearch","title":"contextsearch","text":"<pre><code>contextsearch(needle, section) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextwatch","title":"contextwatch","text":"<pre><code>contextwatch(expression, cmd) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/context/#pwndbg.commands.context.contextunwatch","title":"contextunwatch","text":"<pre><code>contextunwatch(num) -&gt; 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) -&gt; 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 &gt;= 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=[]) -&gt; 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]) -&gt; 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) -&gt; 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) -&gt; 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":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/cyclic/","title":"cyclic","text":""},{"location":"reference/pwndbg/commands/cyclic/#pwndbg.commands.cyclic","title":"cyclic","text":"<p>Classes:</p> <ul> <li> <code>TimeoutException</code> \u2013 <p>Custom exception for signal-based timeouts.</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>detect_register_patterns</code> \u2013 </li> <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.TimeoutException","title":"TimeoutException","text":"<p> Bases: <code>Exception</code></p> <p>Custom exception for signal-based timeouts.</p>"},{"location":"reference/pwndbg/commands/cyclic/#pwndbg.commands.cyclic.detect_register_patterns","title":"detect_register_patterns","text":"<pre><code>detect_register_patterns(alphabet, length, timeout) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/cyclic/#pwndbg.commands.cyclic.cyclic_cmd","title":"cyclic_cmd","text":"<pre><code>cyclic_cmd(\n alphabet,\n length: int | None,\n lookup,\n detect,\n count=100,\n filename=\"\",\n timeout=2,\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/","title":"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 expands $EDITOR and $VISUAL environment variables to find the path to the default text editor.</p> <p>Functions:</p> <ul> <li> <code>create_temp_header_file</code> \u2013 <p>Create a temporary header file with the given content.</p> </li> <li> <code>unload_loaded_symbol</code> \u2013 </li> <li> <code>OnlyWhenStructFileExists</code> \u2013 </li> <li> <code>compile_with_flags</code> \u2013 </li> <li> <code>generate_debug_symbols</code> \u2013 </li> <li> <code>create_blank_elf</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> <li> <code>subparsers</code> \u2013 </li> <li> <code>add_parser</code> \u2013 </li> <li> <code>remove_parser</code> \u2013 </li> <li> <code>edit_parser</code> \u2013 </li> <li> <code>load_parser</code> \u2013 </li> <li> <code>show_parser</code> \u2013 </li> <li> <code>file_parser</code> \u2013 </li> <li> <code>show_all_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=\"Manage custom C structures in pwndbg. Supports project-specific auto-loading from .gdbinit.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.subparsers","title":"subparsers <code>module-attribute</code>","text":"<pre><code>subparsers = add_subparsers(dest='subcommand', help='Available subcommands')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.add_parser","title":"add_parser <code>module-attribute</code>","text":"<pre><code>add_parser = add_parser('add', help='Add a custom structure')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.remove_parser","title":"remove_parser <code>module-attribute</code>","text":"<pre><code>remove_parser = add_parser('remove', help='Remove a custom structure')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.edit_parser","title":"edit_parser <code>module-attribute</code>","text":"<pre><code>edit_parser = add_parser('edit', help='Edit a custom structure')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.load_parser","title":"load_parser <code>module-attribute</code>","text":"<pre><code>load_parser = add_parser('load', help='Load a custom structure')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.show_parser","title":"show_parser <code>module-attribute</code>","text":"<pre><code>show_parser = add_parser('show', help='Show a custom structure')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.file_parser","title":"file_parser <code>module-attribute</code>","text":"<pre><code>file_parser = add_parser('file', help='Add a structure from a header file')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.show_all_parser","title":"show_all_parser <code>module-attribute</code>","text":"<pre><code>show_all_parser = add_parser('show-all', help='Show all stored structure')\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.create_temp_header_file","title":"create_temp_header_file","text":"<pre><code>create_temp_header_file(content: str) -&gt; str\n</code></pre> <p>Create a temporary header file with the given content.</p>"},{"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.OnlyWhenStructFileExists","title":"OnlyWhenStructFileExists","text":"<pre><code>OnlyWhenStructFileExists(\n func: _OnlyWhenStructFileExists,\n) -&gt; _OnlyWhenStructFileExists\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.compile_with_flags","title":"compile_with_flags","text":"<pre><code>compile_with_flags(gcc_extra_flags)\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) -&gt; str | None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.create_blank_elf","title":"create_blank_elf","text":"<pre><code>create_blank_elf()\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, force=False)\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, force: bool = False\n) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/cymbol/#pwndbg.commands.cymbol.cymbol","title":"cymbol","text":"<pre><code>cymbol(subcommand: str = None, name: str = None, path: str = None, force=False)\n</code></pre>"},{"location":"reference/pwndbg/commands/dev/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/dev/#pwndbg.commands.dev.log_level","title":"log_level","text":"<pre><code>log_level(level: str) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/distance/","title":"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) -&gt; None\n</code></pre> <p>Print the distance between the two arguments</p>"},{"location":"reference/pwndbg/commands/dt/","title":"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 description=\"\\nDump out information on a type (e.g. ucontext_t).\\n\\nOptionally overlay that information at an address.\"\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) -&gt; 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":"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/syscall instruction.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs.dumpargs","title":"dumpargs","text":"<pre><code>dumpargs(force: bool = False) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs.call_args","title":"call_args","text":"<pre><code>call_args() -&gt; 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.</p> <p>Return empty list if PC is not on a call or syscall instruction.</p>"},{"location":"reference/pwndbg/commands/dumpargs/#pwndbg.commands.dumpargs.all_args","title":"all_args","text":"<pre><code>all_args() -&gt; list[str]\n</code></pre> <p>Returns list of all argument strings for display.</p>"},{"location":"reference/pwndbg/commands/elf/","title":"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> <p>Attributes:</p> <ul> <li> <code>PLT_SECTION_NAMES</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.PLT_SECTION_NAMES","title":"PLT_SECTION_NAMES <code>module-attribute</code>","text":"<pre><code>PLT_SECTION_NAMES = ('.plt', '.plt.sec', '.plt.got', '.plt.bnd')\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Prints any symbols found in Procedure Linkage Table sections if any exist.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.elfsections","title":"elfsections","text":"<pre><code>elfsections(no_rebase: bool) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.gotplt","title":"gotplt","text":"<pre><code>gotplt() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/elf/#pwndbg.commands.elf.plt","title":"plt","text":"<pre><code>plt(all_symbols: bool = False) -&gt; 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: str)\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='') -&gt; 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(\n start: int, end: int, filter_text=\"\"\n) -&gt; list[tuple[str, int]]\n</code></pre>"},{"location":"reference/pwndbg/commands/flags/","title":"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>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/flags/#pwndbg.commands.flags.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Modify the flags register.')\n</code></pre>"},{"location":"reference/pwndbg/commands/flags/#pwndbg.commands.flags.setflag","title":"setflag","text":"<pre><code>setflag(flag: str, value: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/gdt/","title":"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 description=\"Decode X86-64 GDT entries at address\\n\\nSee also:\\n\\n* https://wiki.osdev.org/Global_Descriptor_Table\\n* https://wiki.osdev.org/GDT_Tutorial\\n\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/gdt/#pwndbg.commands.gdt.gdt","title":"gdt","text":"<pre><code>gdt(address, count) -&gt; 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":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/godbg/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/godbg/#pwndbg.commands.godbg.go_type","title":"go_type","text":"<pre><code>go_type(address: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/got/","title":"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 description=\"Show the state of the Global Offset Table.\"\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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/got_tracking/","title":"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) -&gt; 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='.*') -&gt; 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) -&gt; None\n</code></pre> <p>Prints out information about a single GOT tracking entry.</p>"},{"location":"reference/pwndbg/commands/hex2ptr/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/hexdump/","title":"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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/commands/hexdump/#pwndbg.commands.hexdump.hexdump","title":"hexdump","text":"<pre><code>hexdump(address, count=hexdump_bytes) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/hijack_fd/","title":"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 description=\"Replace a file descriptor of a debugged process.\\n\\nThe new file descriptor can point to:\\n\\n- a file\\n- a pipe\\n- a socket\\n- a device, etc.\\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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ida/","title":"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>Lookup a symbol's address by name from IDA.</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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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: Value) -&gt; int\n</code></pre> <p>Lookup a symbol's address by name from IDA. Evaluate ida.LocByName() on the supplied value.</p> <p>This functions doesn't see stack local variables.</p> <p>Example: <pre><code>pwndbg&gt; set integration-provider ida\nPwndbg successfully connected to Ida Pro xmlrpc: http://127.0.0.1:31337\nSet which provider to use for integration features to 'ida'.\npwndbg&gt; p main\nNo symbol \"main\" in current context.\npwndbg&gt; p/x $ida(\"main\")\n$1 = 0x555555555645\npwndbg&gt; b *$ida(\"main\")\nBreakpoint 2 at 0x555555555645\n</code></pre></p>"},{"location":"reference/pwndbg/commands/ignore/","title":"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 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/integration/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ipython_interactive/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/jemalloc/","title":"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) -&gt; 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) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/commands/jemalloc/#pwndbg.commands.jemalloc.jemalloc_heap","title":"jemalloc_heap","text":"<pre><code>jemalloc_heap() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/kbase/","title":"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, verbose=False) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/","title":"kbpf","text":""},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf","title":"kbpf","text":"<p>Functions:</p> <ul> <li> <code>handle_bpf_aux_reg_for_insns_bytes</code> \u2013 </li> <li> <code>handle_bpf_aux_reg_for_opstr</code> \u2013 </li> <li> <code>bpf_map_array_offset</code> \u2013 </li> <li> <code>parse_xa_node</code> \u2013 </li> <li> <code>print_bpf_progs</code> \u2013 </li> <li> <code>print_bpf_maps</code> \u2013 </li> <li> <code>kbpf</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>MAX_PRINTED_VALUE_SIZE</code> \u2013 </li> <li> <code>MAX_BPF_VERBOSE_LEVEL1_OUTPUT_LEN</code> \u2013 </li> <li> <code>BPF_AUX_REG_STRING</code> \u2013 </li> <li> <code>BPF_MAP_ARRAY_TYPES</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Prints information about the linux kernel bpf progs and maps.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.MAX_PRINTED_VALUE_SIZE","title":"MAX_PRINTED_VALUE_SIZE <code>module-attribute</code>","text":"<pre><code>MAX_PRINTED_VALUE_SIZE = 32\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.MAX_BPF_VERBOSE_LEVEL1_OUTPUT_LEN","title":"MAX_BPF_VERBOSE_LEVEL1_OUTPUT_LEN <code>module-attribute</code>","text":"<pre><code>MAX_BPF_VERBOSE_LEVEL1_OUTPUT_LEN = 16\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.BPF_AUX_REG_STRING","title":"BPF_AUX_REG_STRING <code>module-attribute</code>","text":"<pre><code>BPF_AUX_REG_STRING = 'ax'\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.BPF_MAP_ARRAY_TYPES","title":"BPF_MAP_ARRAY_TYPES <code>module-attribute</code>","text":"<pre><code>BPF_MAP_ARRAY_TYPES = ('BPF_MAP_TYPE_ARRAY', 'BPF_MAP_TYPE_PROG_ARRAY')\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.handle_bpf_aux_reg_for_insns_bytes","title":"handle_bpf_aux_reg_for_insns_bytes","text":"<pre><code>handle_bpf_aux_reg_for_insns_bytes(insns_bytes)\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.handle_bpf_aux_reg_for_opstr","title":"handle_bpf_aux_reg_for_opstr","text":"<pre><code>handle_bpf_aux_reg_for_opstr(opstr, regflag)\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.bpf_map_array_offset","title":"bpf_map_array_offset","text":"<pre><code>bpf_map_array_offset(bpf_array, t, max_entries, value_size)\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.parse_xa_node","title":"parse_xa_node","text":"<pre><code>parse_xa_node(xa_node)\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.print_bpf_progs","title":"print_bpf_progs","text":"<pre><code>print_bpf_progs(verbose)\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.print_bpf_maps","title":"print_bpf_maps","text":"<pre><code>print_bpf_maps(verbose)\n</code></pre>"},{"location":"reference/pwndbg/commands/kbpf/#pwndbg.commands.kbpf.kbpf","title":"kbpf","text":"<pre><code>kbpf(verbose: int, print_progs: bool, print_maps: bool)\n</code></pre>"},{"location":"reference/pwndbg/commands/kchecksec/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/kcmdline/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/kconfig/","title":"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(description='Outputs the kernel config.')\n</code></pre>"},{"location":"reference/pwndbg/commands/kconfig/#pwndbg.commands.kconfig.kconfig","title":"kconfig","text":"<pre><code>kconfig(config_name=None, file_path=None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmabuf/","title":"kdmabuf","text":""},{"location":"reference/pwndbg/commands/kdmabuf/#pwndbg.commands.kdmabuf","title":"kdmabuf","text":"<p>Functions:</p> <ul> <li> <code>print_dmabuf</code> \u2013 </li> <li> <code>print_sgl</code> \u2013 </li> <li> <code>kdmabuf</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>SG_CHAIN</code> \u2013 </li> <li> <code>SG_END</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kdmabuf/#pwndbg.commands.kdmabuf.SG_CHAIN","title":"SG_CHAIN <code>module-attribute</code>","text":"<pre><code>SG_CHAIN = 1\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmabuf/#pwndbg.commands.kdmabuf.SG_END","title":"SG_END <code>module-attribute</code>","text":"<pre><code>SG_END = 2\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmabuf/#pwndbg.commands.kdmabuf.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Prints DMA buf info')\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmabuf/#pwndbg.commands.kdmabuf.print_dmabuf","title":"print_dmabuf","text":"<pre><code>print_dmabuf(dmabuf, idx, indent)\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmabuf/#pwndbg.commands.kdmabuf.print_sgl","title":"print_sgl","text":"<pre><code>print_sgl(sgl, indent)\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmabuf/#pwndbg.commands.kdmabuf.kdmabuf","title":"kdmabuf","text":"<pre><code>kdmabuf()\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmesg/","title":"kdmesg","text":""},{"location":"reference/pwndbg/commands/kdmesg/#pwndbg.commands.kdmesg","title":"kdmesg","text":"<p>Display the kernel ring buffer (dmesg) contents. This command reads the <code>printk_ringbuffer</code> structure, which stores printk messages. It iterates through the records in the ring buffer to print each record like a dmesg log.</p> <p>This command supports only the \"new\" kernel ring buffer implementation that is present in kernel versions 5.10+. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d594d8f411d47bf7b583ec3474b11fec348c88bb</p> <p>This implementation read information from the Linux kernel's <code>printk_ringbuffer</code> structure as defined in: https://github.com/torvalds/linux/blob/19272b37aa4f83ca52bdf9c16d5d81bdd1354494/kernel/printk/printk_ringbuffer.h</p> <p>Functions:</p> <ul> <li> <code>kdmesg</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kdmesg/#pwndbg.commands.kdmesg.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Displays the kernel ring buffer (dmesg) contents.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/kdmesg/#pwndbg.commands.kdmesg.kdmesg","title":"kdmesg","text":"<pre><code>kdmesg(ctime: bool = False) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/killthreads/","title":"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 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 &amp; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/klookup/","title":"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, apply: bool) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/kmod/","title":"kmod","text":""},{"location":"reference/pwndbg/commands/kmod/#pwndbg.commands.kmod","title":"kmod","text":"<p>Displays information about loaded kernel modules. This command retrieves the list of kernel modules from the <code>modules</code> symbol and displays information about each module. It can filter modules by a substring of their names if provided.</p> <p>Functions:</p> <ul> <li> <code>kmod</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/kmod/#pwndbg.commands.kmod.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description=\"Displays the loaded Linux kernel modules.\")\n</code></pre>"},{"location":"reference/pwndbg/commands/kmod/#pwndbg.commands.kmod.kmod","title":"kmod","text":"<pre><code>kmod(module_name=None, path=None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/knft/","title":"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) -&gt; 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/ksyscalls/","title":"ksyscalls","text":""},{"location":"reference/pwndbg/commands/ksyscalls/#pwndbg.commands.ksyscalls","title":"ksyscalls","text":"<p>Displays the syscall table for kernel debugging.</p> <p>Functions:</p> <ul> <li> <code>ksyscalls</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ksyscalls/#pwndbg.commands.ksyscalls.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Displays Linux syscall table, including names and addresses of syscalls.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/ksyscalls/#pwndbg.commands.ksyscalls.ksyscalls","title":"ksyscalls","text":"<pre><code>ksyscalls(syscall_name=None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ktask/","title":"ktask","text":""},{"location":"reference/pwndbg/commands/ktask/#pwndbg.commands.ktask","title":"ktask","text":"<p>Displays information about kernel tasks. This command iterates through the kernel's task list and prints details about each task, including its address, PID, user space status, CPU, UID, GID, and name.</p> <p>Functions:</p> <ul> <li> <code>ktask</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ktask/#pwndbg.commands.ktask.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Displays information about kernel tasks.')\n</code></pre>"},{"location":"reference/pwndbg/commands/ktask/#pwndbg.commands.ktask.ktask","title":"ktask","text":"<pre><code>ktask(task_name=None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/kversion/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/leakfind/","title":"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 description=\"\\nAttempt to find a leak chain given a starting address.\\n\\nScans memory near the given address, looks for pointers, and continues that process to attempt to find leaks.\\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) -&gt; 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":"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":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/","title":"mallocng","text":""},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng","title":"mallocng","text":"<p>Commands that help with debugging musl's allocator, mallocng.</p> <p>Functions:</p> <ul> <li> <code>get_slot_color</code> \u2013 </li> <li> <code>get_colored_slot_state</code> \u2013 </li> <li> <code>get_colored_slot_state_short</code> \u2013 </li> <li> <code>dump_group</code> \u2013 </li> <li> <code>dump_meta</code> \u2013 <p>Arguments:</p> </li> <li> <code>dump_grouped_slot</code> \u2013 </li> <li> <code>dump_slot</code> \u2013 </li> <li> <code>smart_dump_slot</code> \u2013 </li> <li> <code>dump_meta_area</code> \u2013 </li> <li> <code>dump_malloc_context</code> \u2013 </li> <li> <code>mallocng_slot_user</code> \u2013 </li> <li> <code>mallocng_slot_start</code> \u2013 </li> <li> <code>mallocng_meta</code> \u2013 </li> <li> <code>mallocng_group</code> \u2013 </li> <li> <code>mallocng_meta_area</code> \u2013 </li> <li> <code>mallocng_malloc_context</code> \u2013 </li> <li> <code>mallocng_find</code> \u2013 </li> <li> <code>bin_ascii</code> \u2013 </li> <li> <code>colorize_pointer</code> \u2013 </li> <li> <code>colorize_start_header_line</code> \u2013 </li> <li> <code>line_decoration</code> \u2013 <p>Maybe append extra clarification to a line.</p> </li> <li> <code>mallocng_visualize_slots</code> \u2013 </li> <li> <code>mallocng_dump</code> \u2013 </li> <li> <code>mallocng_explain</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>search_on_fail</code> \u2013 </li> <li> <code>state_alloc_color</code> \u2013 </li> <li> <code>state_alloc_color_alt</code> \u2013 </li> <li> <code>state_freed_color</code> \u2013 </li> <li> <code>state_freed_color_alt</code> \u2013 </li> <li> <code>state_avail_color</code> \u2013 </li> <li> <code>state_avail_color_alt</code> \u2013 </li> <li> <code>VALID_CHARS</code> \u2013 </li> <li> <code>vis_cyclic_offset_color</code> \u2013 </li> <li> <code>vis_offset_color</code> \u2013 </li> <li> <code>vis_cycled_mark_color</code> \u2013 </li> <li> <code>vis_pn3_reserved_color</code> \u2013 </li> <li> <code>vis_big_offset_check_color</code> \u2013 </li> <li> <code>vis_ftr_reserved_color</code> \u2013 </li> <li> <code>default_vis_count</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.search_on_fail","title":"search_on_fail <code>module-attribute</code>","text":"<pre><code>search_on_fail = add_param(\n \"ng-search-on-fail\",\n True,\n \"let the ng-slot* commands search the heap if necessary\",\n help_docstring=\"\\nFor freed, avail(able) and corrupted slots, it may be\\nimpossible to recover the start of the group and meta.\\n\\nWhen this option is set to True, the ng-slotu and ng-slots\\ncommands will search the heap to try to find the correct meta/group.\\n \",\n param_class=PARAM_BOOLEAN,\n scope=heap,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.state_alloc_color","title":"state_alloc_color <code>module-attribute</code>","text":"<pre><code>state_alloc_color = BLUE\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.state_alloc_color_alt","title":"state_alloc_color_alt <code>module-attribute</code>","text":"<pre><code>state_alloc_color_alt = CYAN\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.state_freed_color","title":"state_freed_color <code>module-attribute</code>","text":"<pre><code>state_freed_color = RED\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.state_freed_color_alt","title":"state_freed_color_alt <code>module-attribute</code>","text":"<pre><code>state_freed_color_alt = LIGHT_RED\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.state_avail_color","title":"state_avail_color <code>module-attribute</code>","text":"<pre><code>state_avail_color = GRAY\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.state_avail_color_alt","title":"state_avail_color_alt <code>module-attribute</code>","text":"<pre><code>state_avail_color_alt = LIGHT_GRAY\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.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/mallocng/#pwndbg.commands.mallocng.vis_cyclic_offset_color","title":"vis_cyclic_offset_color <code>module-attribute</code>","text":"<pre><code>vis_cyclic_offset_color = YELLOW\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.vis_offset_color","title":"vis_offset_color <code>module-attribute</code>","text":"<pre><code>vis_offset_color = LIGHT_YELLOW\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.vis_cycled_mark_color","title":"vis_cycled_mark_color <code>module-attribute</code>","text":"<pre><code>vis_cycled_mark_color = PURPLE\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.vis_pn3_reserved_color","title":"vis_pn3_reserved_color <code>module-attribute</code>","text":"<pre><code>vis_pn3_reserved_color = LIGHT_CYAN\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.vis_big_offset_check_color","title":"vis_big_offset_check_color <code>module-attribute</code>","text":"<pre><code>vis_big_offset_check_color = BLACK\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.vis_ftr_reserved_color","title":"vis_ftr_reserved_color <code>module-attribute</code>","text":"<pre><code>vis_ftr_reserved_color = GREEN\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.default_vis_count","title":"default_vis_count <code>module-attribute</code>","text":"<pre><code>default_vis_count = add_param(\n \"ng-vis-count\",\n 10,\n \"default count for ng-vis\",\n param_class=PARAM_UINTEGER,\n scope=heap,\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"\\nDump the mallocng heap.\\n\\nMay produce lots of output.\\n \"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.get_slot_color","title":"get_slot_color","text":"<pre><code>get_slot_color(state: SlotState, last_color: str = '') -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.get_colored_slot_state","title":"get_colored_slot_state","text":"<pre><code>get_colored_slot_state(ss: SlotState) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.get_colored_slot_state_short","title":"get_colored_slot_state_short","text":"<pre><code>get_colored_slot_state_short(ss: SlotState) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.dump_group","title":"dump_group","text":"<pre><code>dump_group(group: Group) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.dump_meta","title":"dump_meta","text":"<pre><code>dump_meta(meta: Meta, focus_slot: int | None = None) -&gt; str\n</code></pre> <p>Parameters:</p> <ul> <li> <code>meta</code> (<code>Meta</code>) \u2013 <p>the meta to dump</p> </li> <li> <code>focus_slot</code> (<code>int | None</code>, default: <code>None</code> ) \u2013 <p>the index of the slot to highlight in the slot statuses list</p> </li> </ul>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.dump_grouped_slot","title":"dump_grouped_slot","text":"<pre><code>dump_grouped_slot(gslot: GroupedSlot, all: bool) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.dump_slot","title":"dump_slot","text":"<pre><code>dump_slot(\n slot: Slot, all: bool, successful_preload: bool, will_dump_gslot: bool\n) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.smart_dump_slot","title":"smart_dump_slot","text":"<pre><code>smart_dump_slot(slot: Slot, all: bool, gslot: GroupedSlot | None = None) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.dump_meta_area","title":"dump_meta_area","text":"<pre><code>dump_meta_area(meta_area: MetaArea, coming_from_dump: bool = False) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.dump_malloc_context","title":"dump_malloc_context","text":"<pre><code>dump_malloc_context(ctx: MallocContext) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_slot_user","title":"mallocng_slot_user","text":"<pre><code>mallocng_slot_user(address: int, all: bool) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_slot_start","title":"mallocng_slot_start","text":"<pre><code>mallocng_slot_start(address: int, all: bool) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_meta","title":"mallocng_meta","text":"<pre><code>mallocng_meta(address: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_group","title":"mallocng_group","text":"<pre><code>mallocng_group(address: int, index: int | None = None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_meta_area","title":"mallocng_meta_area","text":"<pre><code>mallocng_meta_area(address: int, index: int | None = None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_malloc_context","title":"mallocng_malloc_context","text":"<pre><code>mallocng_malloc_context(address: int | None = None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_find","title":"mallocng_find","text":"<pre><code>mallocng_find(\n address: int,\n all: bool = False,\n metadata: bool = False,\n shallow: bool = False,\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.bin_ascii","title":"bin_ascii","text":"<pre><code>bin_ascii(bs: bytearray)\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.colorize_pointer","title":"colorize_pointer","text":"<pre><code>colorize_pointer(\n address: int, ptrvalue: int, state: SlotState, slot: Slot\n) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.colorize_start_header_line","title":"colorize_start_header_line","text":"<pre><code>colorize_start_header_line(shline: str, state: SlotState, slot: Slot) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.line_decoration","title":"line_decoration","text":"<pre><code>line_decoration(addr: int, slot_state: SlotState, slot: Slot) -&gt; str\n</code></pre> <p>Maybe append extra clarification to a line.</p> <p>Currently only appends to p headers.</p>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_visualize_slots","title":"mallocng_visualize_slots","text":"<pre><code>mallocng_visualize_slots(address: int, count: int = default_vis_count)\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_dump","title":"mallocng_dump","text":"<pre><code>mallocng_dump(meta_area: int | None = None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mallocng/#pwndbg.commands.mallocng.mallocng_explain","title":"mallocng_explain","text":"<pre><code>mallocng_explain() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/memoize/","title":"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 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/","title":"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>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.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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/misc/#pwndbg.commands.misc.pwndbg_","title":"pwndbg_","text":"<pre><code>pwndbg_(filter_pattern, category_, list_categories) -&gt; 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)\n</code></pre>"},{"location":"reference/pwndbg/commands/mmap/","title":"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 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)\\n\\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\"\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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/mprotect/","title":"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 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 &lt;value&gt;` command.\\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) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/mprotect/#pwndbg.commands.mprotect.mprotect","title":"mprotect","text":"<pre><code>mprotect(addr, length, prot) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/","title":"msr","text":""},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr","title":"msr","text":"<p>Functions:</p> <ul> <li> <code>parse_msr</code> \u2013 </li> <li> <code>parse_range</code> \u2013 </li> <li> <code>x86_msr_read</code> \u2013 </li> <li> <code>x86_msr_write</code> \u2013 </li> <li> <code>msr_read</code> \u2013 </li> <li> <code>msr_write</code> \u2013 </li> <li> <code>msr_list</code> \u2013 </li> <li> <code>msr</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>X86_MSRS</code> \u2013 </li> <li> <code>COMMON_MSRS</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.X86_MSRS","title":"X86_MSRS <code>module-attribute</code>","text":"<pre><code>X86_MSRS = {\n \"MSR_EFER\": 3221225600,\n \"MSR_STAR\": 3221225601,\n \"MSR_LSTAR\": 3221225602,\n \"MSR_CSTAR\": 3221225603,\n \"MSR_SYSCALL_MASK\": 3221225604,\n \"MSR_FS_BASE\": 3221225728,\n \"MSR_GS_BASE\": 3221225729,\n \"MSR_KERNEL_GS_BASE\": 3221225730,\n \"MSR_TSC_AUX\": 3221225731,\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.COMMON_MSRS","title":"COMMON_MSRS <code>module-attribute</code>","text":"<pre><code>COMMON_MSRS = {'i386': X86_MSRS, 'x86-64': X86_MSRS}\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"\\nRead or write to Model Specific Register (MSR)\\n\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.parse_msr","title":"parse_msr","text":"<pre><code>parse_msr(msr: str, arch: str) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.parse_range","title":"parse_range","text":"<pre><code>parse_range(msr_range: str, arch: str) -&gt; tuple[int, int] | None\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.x86_msr_read","title":"x86_msr_read","text":"<pre><code>x86_msr_read(msr: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.x86_msr_write","title":"x86_msr_write","text":"<pre><code>x86_msr_write(msr: int, write_value: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.msr_read","title":"msr_read","text":"<pre><code>msr_read(msr: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.msr_write","title":"msr_write","text":"<pre><code>msr_write(msr: int, write_value: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.msr_list","title":"msr_list","text":"<pre><code>msr_list(arch: str)\n</code></pre>"},{"location":"reference/pwndbg/commands/msr/#pwndbg.commands.msr.msr","title":"msr","text":"<pre><code>msr(\n msr: str | None = None,\n write: int | None = None,\n list_msr=False,\n msr_range: str | None = None,\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/nearpc/","title":"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) -&gt; 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) -&gt; None\n</code></pre> <p>Like nearpc, but will emulate instructions from the current $PC forward.</p>"},{"location":"reference/pwndbg/commands/next/","title":"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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/next/#pwndbg.commands.next.stepover","title":"stepover","text":"<pre><code>stepover(addr=None) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/onegadget/","title":"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 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/","title":"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 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__() -&gt; 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() -&gt; 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) -&gt; AddrRange\n</code></pre>"},{"location":"reference/pwndbg/commands/p2p/#pwndbg.commands.p2p.address_range","title":"address_range","text":"<pre><code>address_range(section: str) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/","title":"paging","text":""},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging","title":"paging","text":"<p>Functions:</p> <ul> <li> <code>print_pagetable_entry</code> \u2013 </li> <li> <code>page_type</code> \u2013 </li> <li> <code>page_info</code> \u2013 </li> <li> <code>pagewalk</code> \u2013 </li> <li> <code>paging_print_helper</code> \u2013 </li> <li> <code>p2v</code> \u2013 </li> <li> <code>v2p</code> \u2013 </li> <li> <code>pageinfo</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>PAGETYPES</code> \u2013 </li> <li> <code>p2v_parser</code> \u2013 </li> <li> <code>v2p_parser</code> \u2013 </li> <li> <code>page_parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(description='Performs pagewalk.')\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.PAGETYPES","title":"PAGETYPES <code>module-attribute</code>","text":"<pre><code>PAGETYPES = (\n \"buddy\",\n \"offline\",\n \"table\",\n \"guard\",\n \"hugetlb\",\n \"slab\",\n \"zsmalloc\",\n \"unaccepted\",\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.p2v_parser","title":"p2v_parser <code>module-attribute</code>","text":"<pre><code>p2v_parser = ArgumentParser(\n description=\"Translate physical address to its corresponding virtual address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.v2p_parser","title":"v2p_parser <code>module-attribute</code>","text":"<pre><code>v2p_parser = ArgumentParser(\n description=\"Translate virtual address to its corresponding physmap address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.page_parser","title":"page_parser <code>module-attribute</code>","text":"<pre><code>page_parser = ArgumentParser(\n description=\"Convert a pointer to a `struct page` to its corresponding virtual address.\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.print_pagetable_entry","title":"print_pagetable_entry","text":"<pre><code>print_pagetable_entry(ptl: PageTableLevel, level: int, is_last: bool)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.page_type","title":"page_type","text":"<pre><code>page_type(page)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.page_info","title":"page_info","text":"<pre><code>page_info(page)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.pagewalk","title":"pagewalk","text":"<pre><code>pagewalk(vaddr, entry=None)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.paging_print_helper","title":"paging_print_helper","text":"<pre><code>paging_print_helper(name, addr)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.p2v","title":"p2v","text":"<pre><code>p2v(paddr)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.v2p","title":"v2p","text":"<pre><code>v2p(vaddr)\n</code></pre>"},{"location":"reference/pwndbg/commands/paging/#pwndbg.commands.paging.pageinfo","title":"pageinfo","text":"<pre><code>pageinfo(page)\n</code></pre>"},{"location":"reference/pwndbg/commands/parse_seccomp/","title":"parse_seccomp","text":""},{"location":"reference/pwndbg/commands/parse_seccomp/#pwndbg.commands.parse_seccomp","title":"parse_seccomp","text":"<p>Functions:</p> <ul> <li> <code>parse_seccomp</code> \u2013 <p>Parse a struct sock_fprog at a given address and pass filter to external tool.</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/parse_seccomp/#pwndbg.commands.parse_seccomp.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Parse a struct sock_fprog from memory and dump its filter\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/parse_seccomp/#pwndbg.commands.parse_seccomp.parse_seccomp","title":"parse_seccomp","text":"<pre><code>parse_seccomp(addr: int) -&gt; None\n</code></pre> <p>Parse a struct sock_fprog at a given address and pass filter to external tool.</p>"},{"location":"reference/pwndbg/commands/patch/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.patch_revert","title":"patch_revert","text":"<pre><code>patch_revert(address: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/patch/#pwndbg.commands.patch.patch_list","title":"patch_list","text":"<pre><code>patch_list() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/peda/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/peda/#pwndbg.commands.peda.xuntil","title":"xuntil","text":"<pre><code>xuntil(target) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/pie/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/pie/#pwndbg.commands.pie.breakrva","title":"breakrva","text":"<pre><code>breakrva(offset=0, module=None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/plist/","title":"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 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, &amp;node_c };\\nstruct node node_a = { 0, &amp;node_b };\\n```\\n\\npwndbg&gt; plist node_a next\\n0x4000011050 &lt;node_a&gt;: {\\n value = 0,\\n next = 0x4000011040 &lt;node_b&gt;\\n}\\n0x4000011040 &lt;node_b&gt;: {\\n value = 1,\\n next = 0x4000011010 &lt;node_c&gt;\\n}\\n0x4000011010 &lt;node_c&gt;: {\\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, { &amp;inner_a_node_c.inner } };\\nstruct inner_a_node inner_a_node_a = { 0, { &amp;inner_a_node_b.inner } };\\n```\\n\\npwndbg&gt; plist inner_a_node_a -i inner next\\n0x4000011070 &lt;inner_a_node_a&gt;: {\\n value = 0,\\n inner = {\\n next = 0x4000011068 &lt;inner_a_node_b+8&gt;\\n }\\n}\\n0x4000011060 &lt;inner_a_node_b&gt;: {\\n value = 1,\\n inner = {\\n next = 0x4000011028 &lt;inner_a_node_c+8&gt;\\n }\\n}\\n0x4000011020 &lt;inner_a_node_c&gt;: {\\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, { &amp;inner_b_node_c } };\\nstruct inner_b_node inner_b_node_a = { 0, { &amp;inner_b_node_b } };\\n```\\n\\npwndbg&gt; plist inner_b_node_a -i inner next\\n0x4000011090 &lt;inner_b_node_a&gt;: {\\n value = 0,\\n inner = {\\n next = 0x4000011080 &lt;inner_b_node_b&gt;\\n }\\n}\\n0x4000011080 &lt;inner_b_node_b&gt;: {\\n value = 1,\\n inner = {\\n next = 0x4000011030 &lt;inner_b_node_c&gt;\\n }\\n}\\n0x4000011030 &lt;inner_b_node_c&gt;: {\\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) -&gt; 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":"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(description='Pointer scan for possible offset leaks.')\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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/","title":"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>tcp6</code> \u2013 </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(tid: int)\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.tcp6","title":"tcp6","text":"<pre><code>tcp6(tid: int)\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.unix","title":"unix","text":"<pre><code>unix(tid: int)\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.netlink","title":"netlink","text":"<pre><code>netlink(tid: int)\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.pid","title":"pid","text":"<pre><code>pid() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/procinfo/#pwndbg.commands.procinfo.procinfo","title":"procinfo","text":"<pre><code>procinfo() -&gt; None\n</code></pre> <p>Display information about the running process.</p>"},{"location":"reference/pwndbg/commands/profiler/","title":"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(\n description=\"\\nUtilities for profiling Pwndbg.\\n\\nCheck out the `./profiling` folder for other useful utilities.\\nUse `./profiling/print_stats.py` to generate a report from a `.pstats` file.\\n\"\n)\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') -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/","title":"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> </ul> <p>Attributes:</p> <ul> <li> <code>parser</code> \u2013 </li> <li> <code>group</code> \u2013 </li> <li> <code>VALID_CHARS</code> \u2013 </li> <li> <code>try_free_parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Visualize chunks on a heap.\\n\\nDefault to the current arena's active heap.\"\n)\n</code></pre>"},{"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.read_chunk","title":"read_chunk","text":"<pre><code>read_chunk(addr: int) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.arena","title":"arena","text":"<pre><code>arena(addr: int | None = None) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2/#pwndbg.commands.ptmalloc2.try_unlink","title":"try_unlink","text":"<pre><code>try_unlink(addr: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ptmalloc2_tracking/","title":"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 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":"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)\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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/radare2/#pwndbg.commands.radare2.r2pipe","title":"r2pipe","text":"<pre><code>r2pipe(arguments) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/reload/","title":"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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/reload/#pwndbg.commands.reload.reinit_pwndbg","title":"reinit_pwndbg","text":"<pre><code>reinit_pwndbg() -&gt; None\n</code></pre> <p>Makes pwndbg reinitialize all state.</p>"},{"location":"reference/pwndbg/commands/retaddr/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/retaddr/#pwndbg.commands.retaddr.stack_explore","title":"stack_explore","text":"<pre><code>stack_explore() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/rizin/","title":"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)\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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/rizin/#pwndbg.commands.rizin.rzpipe","title":"rzpipe","text":"<pre><code>rzpipe(arguments) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/rop/","title":"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)\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(get_capstone_constants(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) -&gt; 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) -&gt; 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) -&gt; 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]) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/ropper/","title":"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(description='ROP gadget search with ropper.')\n</code></pre>"},{"location":"reference/pwndbg/commands/ropper/#pwndbg.commands.ropper.ropper","title":"ropper","text":"<pre><code>ropper(argument) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/saved_register_frames/","title":"saved_register_frames","text":""},{"location":"reference/pwndbg/commands/saved_register_frames/#pwndbg.commands.saved_register_frames","title":"saved_register_frames","text":"<p>Functions:</p> <ul> <li> <code>print_saved_register_frame</code> \u2013 </li> <li> <code>dump_register_frame</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>VALID_FRAME_TYPES</code> \u2013 </li> <li> <code>parser</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/commands/saved_register_frames/#pwndbg.commands.saved_register_frames.VALID_FRAME_TYPES","title":"VALID_FRAME_TYPES <code>module-attribute</code>","text":"<pre><code>VALID_FRAME_TYPES = {\n \"armcm-exception\": ARM_CORTEX_M_EXCEPTION_STACK,\n \"armcm-exception2\": ARM_CORTEX_M_EXCEPTION_STACK,\n}\n</code></pre>"},{"location":"reference/pwndbg/commands/saved_register_frames/#pwndbg.commands.saved_register_frames.parser","title":"parser <code>module-attribute</code>","text":"<pre><code>parser = ArgumentParser(\n description=\"Display the registers saved to memory for a certain frame type\"\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/saved_register_frames/#pwndbg.commands.saved_register_frames.print_saved_register_frame","title":"print_saved_register_frame","text":"<pre><code>print_saved_register_frame(\n context: SavedRegisterFrame, address: int = None, print_address=False\n)\n</code></pre>"},{"location":"reference/pwndbg/commands/saved_register_frames/#pwndbg.commands.saved_register_frames.dump_register_frame","title":"dump_register_frame","text":"<pre><code>dump_register_frame(\n frame_type: str, address: int = None, print_address=False\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/search/","title":"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 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) -&gt; 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 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/segments/","title":"segments","text":""},{"location":"reference/pwndbg/commands/segments/#pwndbg.commands.segments","title":"segments","text":"<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.fsbase","title":"fsbase","text":"<pre><code>fsbase() -&gt; 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() -&gt; None\n</code></pre> <p>Prints out the GS base address. See also $gsbase.</p>"},{"location":"reference/pwndbg/commands/sigreturn/","title":"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, \"&amp;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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/","title":"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>Functions:</p> <ul> <li> <code>slab</code> \u2013 </li> <li> <code>emphasize</code> \u2013 </li> <li> <code>handle_next</code> \u2013 </li> <li> <code>freelist_desc</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 linux kernel's slab allocator SLUB.\"\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.slab","title":"slab","text":"<pre><code>slab(\n command,\n filter_=None,\n names=None,\n verbose=False,\n addresses=None,\n cpu=None,\n node=None,\n partial_only=False,\n active_only=False,\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.emphasize","title":"emphasize","text":"<pre><code>emphasize(s)\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.handle_next","title":"handle_next","text":"<pre><code>handle_next(curr: int, freelist: Freelist, indent)\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.freelist_desc","title":"freelist_desc","text":"<pre><code>freelist_desc(freelist: Freelist, indent)\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) -&gt; 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(\n cpu_cache: CpuCache, verbose: bool, active: bool, partial: bool, indent\n) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.slab_info","title":"slab_info","text":"<pre><code>slab_info(\n name: str, verbose: bool, cpu: int, node: int, active: bool, partial: bool\n) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.slab_list","title":"slab_list","text":"<pre><code>slab_list(filter_) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/slab/#pwndbg.commands.slab.slab_contains","title":"slab_contains","text":"<pre><code>slab_contains(address: str) -&gt; None\n</code></pre> <p>prints the slab_cache associated with the provided address</p>"},{"location":"reference/pwndbg/commands/spray/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/start/","title":"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 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 or LLDB\\'s `process launch -s`.\\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 \"&gt;\", \"&lt;\", or \"&gt;&gt;\"\\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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start.entry","title":"entry","text":"<pre><code>entry(args=None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/start/#pwndbg.commands.start.sstart","title":"sstart","text":"<pre><code>sstart() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/strings/","title":"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":"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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.stack","title":"stack","text":"<pre><code>stack(count, offset, frame, inverse) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/telescope/#pwndbg.commands.telescope.stackf","title":"stackf","text":"<pre><code>stackf(count, offset) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/tips/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/tls/","title":"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 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/tls/#pwndbg.commands.tls.threads","title":"threads","text":"<pre><code>threads(num_threads, respect_config) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/valist/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/version/","title":"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() -&gt; 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() -&gt; 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":"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() -&gt; 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() -&gt; 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, ...]) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.gap_text","title":"gap_text","text":"<pre><code>gap_text(page: Page) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_map","title":"print_map","text":"<pre><code>print_map(page: Page) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.print_guard","title":"print_guard","text":"<pre><code>print_guard(page: Page) -&gt; 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, ...]) -&gt; 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 expand_shared_cache=False,\n) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap_explore","title":"vmmap_explore","text":"<pre><code>vmmap_explore(address: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap_clear","title":"vmmap_clear","text":"<pre><code>vmmap_clear() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/vmmap/#pwndbg.commands.vmmap.vmmap_load","title":"vmmap_load","text":"<pre><code>vmmap_load(filename) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/","title":"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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.ds","title":"ds","text":"<pre><code>ds(address, max) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.bl","title":"bl","text":"<pre><code>bl() -&gt; None\n</code></pre> <p>List breakpoints</p>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.bd","title":"bd","text":"<pre><code>bd(which='*') -&gt; 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='*') -&gt; 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='*') -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/windbg/#pwndbg.commands.windbg.k","title":"k","text":"<pre><code>k() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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":"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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/xinfo/#pwndbg.commands.xinfo.xinfo","title":"xinfo","text":"<pre><code>xinfo(address=None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/commands/xor/","title":"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) -&gt; 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":"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>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.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() -&gt; 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) -&gt; 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__() -&gt; StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.StopPoint.__exit__","title":"__exit__","text":"<pre><code>__exit__(exc_type, exc_value, traceback) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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":"<pre><code>MemoryMap(pages: Sequence[Page])\n</code></pre> <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> <li> <code>lookup_page</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pages</code> (<code>tuple[Page, ...]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.MemoryMap.pages","title":"pages <code>instance-attribute</code>","text":"<pre><code>pages: tuple[Page, ...] = tuple(pages)\n</code></pre>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.MemoryMap.is_qemu","title":"is_qemu","text":"<pre><code>is_qemu() -&gt; 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() -&gt; Sequence[Page]\n</code></pre> <p>Returns all ranges in this memory map.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.MemoryMap.lookup_page","title":"lookup_page","text":"<pre><code>lookup_page(address: int) -&gt; Page | None\n</code></pre>"},{"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> <li> <code>cont_selected_thread</code> \u2013 <p>Continues execution on single thread 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() -&gt; 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> <p>FIXME GDB: On GDB <code>stepi</code> will execute other threads. On LLDB not. Please use <code>set scheduler-locking step</code></p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.ExecutionController.cont","title":"cont","text":"<pre><code>cont(until: StopPoint) -&gt; Awaitable[None]\n</code></pre> <p>Continues execution until the given breakpoint or whatchpoint is hit. Continues execution on all threads.</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.ExecutionController.cont_selected_thread","title":"cont_selected_thread","text":"<pre><code>cont_selected_thread(until: StopPoint) -&gt; Awaitable[None]\n</code></pre> <p>Continues execution on single thread until the given breakpoint or whatchpoint is hit. Continues execution on selected thread.</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, as seen by the debugger.</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> <li> <code>add_symbol_file</code> \u2013 <p>Adds a symbol file at base</p> </li> </ul>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Process.threads","title":"threads","text":"<pre><code>threads() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; MemoryMap\n</code></pre> <p>Returns the virtual memory map of this process, as seen by the debugger.</p> <p>Generally, one should prefer <code>pwndbg.aglib.vmmap.get()</code> over this function, as this passes the raw information from the debugger more or less straight through, without applying more general Pwndbg enhancements to the memory map. This is the lower-level functionality on top of which the function in <code>aglib</code> is implemented.</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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; ArchDefinition\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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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.Process.add_symbol_file","title":"add_symbol_file","text":"<pre><code>add_symbol_file(path, base=None)\n</code></pre> <p>Adds a symbol file at base</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>array_len</code> (<code>int</code>) \u2013 <p>Get array length of this type.</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.array_len","title":"array_len <code>property</code>","text":"<pre><code>array_len: int\n</code></pre> <p>Get array length of this type.</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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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 pointer 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() -&gt; Value\n</code></pre> <p>If this is a pointer 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() -&gt; 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() -&gt; 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() -&gt; 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__() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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>SUSPEND_ALL</code> \u2013 </li> <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.SUSPEND_ALL","title":"SUSPEND_ALL <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>SUSPEND_ALL = -1\n</code></pre>"},{"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>ctx_suspend_events</code> \u2013 <p>Context manager for temporarily suspending and resuming the delivery of events</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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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.ctx_suspend_events","title":"ctx_suspend_events","text":"<pre><code>ctx_suspend_events(ty: EventType) -&gt; Iterator[None]\n</code></pre> <p>Context manager for temporarily suspending and resuming the delivery of events of a given type.</p>"},{"location":"reference/pwndbg/dbg/#pwndbg.dbg.Debugger.suspend_events","title":"suspend_events","text":"<pre><code>suspend_events(ty: EventType) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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":"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>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>gdb_mips_to_arch_attribute_map</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 \"s390:64-bit\",\n)\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.gdb_mips_to_arch_attribute_map","title":"gdb_mips_to_arch_attribute_map <code>module-attribute</code>","text":"<pre><code>gdb_mips_to_arch_attribute_map = {\n \"mips5\": MIPS_ISA_5,\n \"micromips\": MIPS_ISA_MICRO,\n \"isa32\": MIPS_ISA_32,\n \"isa32r2\": MIPS_ISA_32R2,\n \"isa32r3\": MIPS_ISA_32R3,\n \"isa32r5\": MIPS_ISA_32R5,\n \"isa32r6\": MIPS_ISA_32R6,\n \"isa64\": MIPS_ISA_64,\n \"isa64r2\": MIPS_ISA_64R2,\n \"isa64r3\": MIPS_ISA_64R3,\n \"isa64r5\": MIPS_ISA_64R5,\n \"isa64r6\": MIPS_ISA_64R6,\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.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) -&gt; 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) -&gt; 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) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.regs","title":"regs","text":"<pre><code>regs() -&gt; 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) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.pc","title":"pc","text":"<pre><code>pc() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.sp","title":"sp","text":"<pre><code>sp() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.parent","title":"parent","text":"<pre><code>parent() -&gt; Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.child","title":"child","text":"<pre><code>child() -&gt; Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBFrame.sal","title":"sal","text":"<pre><code>sal() -&gt; 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) -&gt; 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() -&gt; Iterator[Frame]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBThread.ptid","title":"ptid","text":"<pre><code>ptid() -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBThread.index","title":"index","text":"<pre><code>index() -&gt; 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 <p>Returns all ranges in this memory map.</p> </li> <li> <code>lookup_page</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>qemu</code> \u2013 </li> <li> <code>pages</code> (<code>tuple[Page, ...]</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: tuple[Page, ...] = tuple(pages)\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap.is_qemu","title":"is_qemu","text":"<pre><code>is_qemu() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap.ranges","title":"ranges","text":"<pre><code>ranges() -&gt; Sequence[Page]\n</code></pre> <p>Returns all ranges in this memory map.</p>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBMemoryMap.lookup_page","title":"lookup_page","text":"<pre><code>lookup_page(address: int) -&gt; Page | None\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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.remove","title":"remove","text":"<pre><code>remove() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBStopPoint.__enter__","title":"__enter__","text":"<pre><code>__enter__() -&gt; 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) -&gt; 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> <li> <code>add_symbol_file</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() -&gt; list[Thread]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.pid","title":"pid","text":"<pre><code>pid() -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.alive","title":"alive","text":"<pre><code>alive() -&gt; 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() -&gt; 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) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.vmmap","title":"vmmap","text":"<pre><code>vmmap() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; Sequence[Type]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.arch","title":"arch","text":"<pre><code>arch() -&gt; ArchDefinition\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) -&gt; StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.is_linux","title":"is_linux","text":"<pre><code>is_linux() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBProcess.disasm","title":"disasm","text":"<pre><code>disasm(address: int) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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.GDBProcess.add_symbol_file","title":"add_symbol_file","text":"<pre><code>add_symbol_file(path, base=None)\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> <li> <code>cont_selected_thread</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.GDBExecutionController.cont_selected_thread","title":"cont_selected_thread <code>async</code>","text":"<pre><code>cont_selected_thread(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) -&gt; 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() -&gt; 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> <li> <code>array_len</code> (<code>int</code>) \u2013 <p>Get array length of this type.</p> </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.array_len","title":"array_len <code>property</code>","text":"<pre><code>array_len: int\n</code></pre> <p>Get array length of this type.</p>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.func_arguments","title":"func_arguments","text":"<pre><code>func_arguments() -&gt; list[Type] | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.fields","title":"fields","text":"<pre><code>fields() -&gt; 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) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.array","title":"array","text":"<pre><code>array(count: int) -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.pointer","title":"pointer","text":"<pre><code>pointer() -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.strip_typedefs","title":"strip_typedefs","text":"<pre><code>strip_typedefs() -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.target","title":"target","text":"<pre><code>target() -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.keys","title":"keys","text":"<pre><code>keys() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBType.offsetof","title":"offsetof","text":"<pre><code>offsetof(field_name: str) -&gt; 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) -&gt; 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() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.string","title":"string","text":"<pre><code>string() -&gt; 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() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.fetch_lazy","title":"fetch_lazy","text":"<pre><code>fetch_lazy() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__int__","title":"__int__","text":"<pre><code>__int__() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.cast","title":"cast","text":"<pre><code>cast(type: Type | Any) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__add__","title":"__add__","text":"<pre><code>__add__(rhs: int) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__sub__","title":"__sub__","text":"<pre><code>__sub__(rhs: int) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDBValue.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str | int) -&gt; 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> <li> <code>ctx_suspend_events</code> \u2013 <p>Context manager for temporarily suspending and resuming the delivery of events</p> </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) -&gt; CommandHandle\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.history","title":"history","text":"<pre><code>history(last: int = 10) -&gt; 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) -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.selected_thread","title":"selected_thread","text":"<pre><code>selected_thread() -&gt; Thread | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.selected_frame","title":"selected_frame","text":"<pre><code>selected_frame() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.breakpoint_locations","title":"breakpoint_locations","text":"<pre><code>breakpoint_locations() -&gt; list[BreakpointLocation]\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.name","title":"name","text":"<pre><code>name() -&gt; 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() -&gt; 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() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.addrsz","title":"addrsz","text":"<pre><code>addrsz(address: Any) -&gt; 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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/gdb/#pwndbg.dbg.gdb.GDB.ctx_suspend_events","title":"ctx_suspend_events","text":"<pre><code>ctx_suspend_events(ty: EventType) -&gt; Iterator[None]\n</code></pre> <p>Context manager for temporarily suspending and resuming the delivery of events of a given type.</p>"},{"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) -&gt; 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":"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":"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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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":"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>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.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) -&gt; 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) -&gt; 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) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.regs","title":"regs","text":"<pre><code>regs() -&gt; 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) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.pc","title":"pc","text":"<pre><code>pc() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.sp","title":"sp","text":"<pre><code>sp() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.parent","title":"parent","text":"<pre><code>parent() -&gt; Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.child","title":"child","text":"<pre><code>child() -&gt; Frame | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBFrame.sal","title":"sal","text":"<pre><code>sal() -&gt; 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) -&gt; 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() -&gt; Iterator[Frame]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread.ptid","title":"ptid","text":"<pre><code>ptid() -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBThread.index","title":"index","text":"<pre><code>index() -&gt; 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> <li> <code>array_len</code> (<code>int</code>) \u2013 <p>Get array length of this type.</p> </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.array_len","title":"array_len <code>property</code>","text":"<pre><code>array_len: int\n</code></pre> <p>Get array length of this type.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.__eq__","title":"__eq__","text":"<pre><code>__eq__(rhs: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.func_arguments","title":"func_arguments","text":"<pre><code>func_arguments() -&gt; list[Type] | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.fields","title":"fields","text":"<pre><code>fields() -&gt; list[TypeField]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.array","title":"array","text":"<pre><code>array(count: int) -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.pointer","title":"pointer","text":"<pre><code>pointer() -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.strip_typedefs","title":"strip_typedefs","text":"<pre><code>strip_typedefs() -&gt; Type\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBType.target","title":"target","text":"<pre><code>target() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.string","title":"string","text":"<pre><code>string() -&gt; 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() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.fetch_lazy","title":"fetch_lazy","text":"<pre><code>fetch_lazy() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__int__","title":"__int__","text":"<pre><code>__int__() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.cast","title":"cast","text":"<pre><code>cast(type: Type | Any) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__add__","title":"__add__","text":"<pre><code>__add__(rhs: int) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__sub__","title":"__sub__","text":"<pre><code>__sub__(rhs: int) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBValue.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key: str | int) -&gt; 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 <p>Returns all ranges in this memory map.</p> </li> <li> <code>lookup_page</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>pages</code> (<code>tuple[Page, ...]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap.pages","title":"pages <code>instance-attribute</code>","text":"<pre><code>pages: tuple[Page, ...] = tuple(pages)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap.is_qemu","title":"is_qemu","text":"<pre><code>is_qemu() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap.ranges","title":"ranges","text":"<pre><code>ranges() -&gt; Sequence[Page]\n</code></pre> <p>Returns all ranges in this memory map.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBMemoryMap.lookup_page","title":"lookup_page","text":"<pre><code>lookup_page(address: int) -&gt; Page | None\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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBStopPoint.__enter__","title":"__enter__","text":"<pre><code>__enter__() -&gt; 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) -&gt; 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__() -&gt; Generator[Any, Any, Any]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.YieldContinue","title":"YieldContinue","text":"<pre><code>YieldContinue(target: LLDBStopPoint, selected_thread: bool = False)\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> <li> <code>selected_thread</code> (<code>bool</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.YieldContinue.selected_thread","title":"selected_thread <code>instance-attribute</code>","text":"<pre><code>selected_thread: bool = selected_thread\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> <li> <code>cont_selected_thread</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBExecutionController.single_step","title":"single_step","text":"<pre><code>single_step() -&gt; Awaitable[None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBExecutionController.cont","title":"cont","text":"<pre><code>cont(target: StopPoint) -&gt; Awaitable[None]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBExecutionController.cont_selected_thread","title":"cont_selected_thread","text":"<pre><code>cont_selected_thread(target: StopPoint) -&gt; 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> <li> <code>add_symbol_file</code> \u2013 <p>Adds a symbol file at base</p> </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() -&gt; list[Thread]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.pid","title":"pid","text":"<pre><code>pid() -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.alive","title":"alive","text":"<pre><code>alive() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; list[Page]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.vmmap","title":"vmmap","text":"<pre><code>vmmap() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; Sequence[Type]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.arch","title":"arch","text":"<pre><code>arch() -&gt; ArchDefinition\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) -&gt; StopPoint\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.disasm","title":"disasm","text":"<pre><code>disasm(address: int) -&gt; DisassembledInstruction | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDBProcess.is_linux","title":"is_linux","text":"<pre><code>is_linux() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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.LLDBProcess.add_symbol_file","title":"add_symbol_file","text":"<pre><code>add_symbol_file(path, base=None)\n</code></pre> <p>Adds a symbol file at base</p>"},{"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() -&gt; 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>relay_exceptions</code> \u2013 <p>Relay an exception raised during an LLDB command handler.</p> </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> <li> <code>ctx_suspend_events</code> \u2013 <p>Context manager for temporarily suspending and resuming the delivery of events</p> </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.relay_exceptions","title":"relay_exceptions","text":"<pre><code>relay_exceptions() -&gt; None\n</code></pre> <p>Relay an exception raised during an LLDB command handler.</p>"},{"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) -&gt; CommandHandle\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.history","title":"history","text":"<pre><code>history(last: int = 10) -&gt; list[tuple[int, str]]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.commands","title":"commands","text":"<pre><code>commands() -&gt; 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) -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.selected_inferior","title":"selected_inferior","text":"<pre><code>selected_inferior() -&gt; Process | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.selected_thread","title":"selected_thread","text":"<pre><code>selected_thread() -&gt; Thread | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.selected_frame","title":"selected_frame","text":"<pre><code>selected_frame() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.breakpoint_locations","title":"breakpoint_locations","text":"<pre><code>breakpoint_locations() -&gt; list[BreakpointLocation]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.name","title":"name","text":"<pre><code>name() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.LLDB.ctx_suspend_events","title":"ctx_suspend_events","text":"<pre><code>ctx_suspend_events(ty: EventType) -&gt; Iterator[None]\n</code></pre> <p>Context manager for temporarily suspending and resuming the delivery of events of a given type.</p>"},{"location":"reference/pwndbg/dbg/lldb/#pwndbg.dbg.lldb.rename_register","title":"rename_register","text":"<pre><code>rename_register(name: str, proc: LLDBProcess) -&gt; 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) -&gt; TypeCode\n</code></pre> <p>Determines the type code of a given LLDB SBType.</p>"},{"location":"reference/pwndbg/dbg/lldb/hooks/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.reset_config","title":"reset_config","text":"<pre><code>reset_config() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.on_start","title":"on_start","text":"<pre><code>on_start() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.on_stop","title":"on_stop","text":"<pre><code>on_stop() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/hooks/#pwndbg.dbg.lldb.hooks.on_exit","title":"on_exit","text":"<pre><code>on_exit() -&gt; 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":"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>pget</code> \u2013 <p>Retrieves a parameter with a given name.</p> </li> <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.pget","title":"pget","text":"<pre><code>pget(name: str) -&gt; Parameter | None\n</code></pre> <p>Retrieves a parameter with a given name.</p>"},{"location":"reference/pwndbg/dbg/lldb/pset/#pwndbg.dbg.lldb.pset.pset","title":"pset","text":"<pre><code>pset(param: Parameter, value: str)\n</code></pre> <p>Parses and sets a Pwndbg configuration value.</p> <p>Raises <code>InvalidParse</code> if the value is not valid.</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) -&gt; Any\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/","title":"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>fuzzy</code> \u2013 </li> <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> <li> <code>AutoTarget</code> \u2013 <p>During the execution of some commands, the LLDB CLI automatically creates an</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>print_error</code> \u2013 <p>Print an error message in the style of the LLDB CLI.</p> </li> <li> <code>print_warn</code> \u2013 <p>Print a warning message in the style of the LLDB CLI.</p> </li> <li> <code>print_hint</code> \u2013 <p>Print a hint message in the style of the LLDB CLI.</p> </li> <li> <code>print_info</code> \u2013 <p>Print an information message in the style of the LLDB CLI.</p> </li> <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>HAS_FZF</code> \u2013 </li> <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.HAS_FZF","title":"HAS_FZF <code>module-attribute</code>","text":"<pre><code>HAS_FZF = which('fzf') is not None\n</code></pre>"},{"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, prog='target create')\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, prog='process launch')\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 \"script-class\",\n \"plugin\",\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, prog='process attach')\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, prog='process connect')\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, prog='gdb-remote')\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, prog='continue')\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(event: SBEvent)\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() -&gt; 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) -&gt; 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) -&gt; 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.AutoTarget","title":"AutoTarget","text":"<pre><code>AutoTarget(dbg: LLDB)\n</code></pre> <p>During the execution of some commands, the LLDB CLI automatically creates an empty target and selects it before the command is executed.</p> <p>Methods:</p> <ul> <li> <code>__bool__</code> \u2013 </li> <li> <code>close</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>error</code> \u2013 </li> <li> <code>target</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.AutoTarget.error","title":"error <code>instance-attribute</code>","text":"<pre><code>error = SBError()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.AutoTarget.target","title":"target <code>instance-attribute</code>","text":"<pre><code>target = CreateTarget(None, None, None, True, error)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.AutoTarget.__bool__","title":"__bool__","text":"<pre><code>__bool__()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.AutoTarget.close","title":"close","text":"<pre><code>close()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.print_error","title":"print_error","text":"<pre><code>print_error(msg: str, *args)\n</code></pre> <p>Print an error message in the style of the LLDB CLI.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.print_warn","title":"print_warn","text":"<pre><code>print_warn(msg: str, *args)\n</code></pre> <p>Print a warning message in the style of the LLDB CLI.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.print_hint","title":"print_hint","text":"<pre><code>print_hint(msg: str, *args)\n</code></pre> <p>Print a hint message in the style of the LLDB CLI.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.print_info","title":"print_info","text":"<pre><code>print_info(msg: str, *args)\n</code></pre> <p>Print an information message in the style of the LLDB CLI.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/#pwndbg.dbg.lldb.repl.lex_args","title":"lex_args","text":"<pre><code>lex_args(args: str) -&gt; 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() -&gt; 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[..., Coroutine[Any, Any, None]],\n *args,\n debug: bool = False,\n) -&gt; 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, output_to, dbg: LLDB, driver: ProcessDriver, relay: EventRelay\n) -&gt; 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],\n parser: ArgumentParser,\n unsupported: list[str],\n raw_marker: str | None = None,\n) -&gt; Any | None\n</code></pre> <p>Parses a list of string arguments into an object containing the parsed data.</p> <p>If <code>raw_marker</code> is not <code>None</code>, the argument list will be split in two, with all arguments before the split being fed to the argument parser, and all arguments after the split being returned as-is. In this case the return value is a tuple.</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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre> <p>Attaches to a process with the given name or pid based on regex match. Used for <code>_regexp-attach &lt;pid|name&gt;</code> (alias for <code>attach &lt;pid|name&gt;</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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre> <p>Continues the execution of a process.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/","title":"fuzzy","text":""},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy","title":"fuzzy","text":"<p>Classes:</p> <ul> <li> <code>FzfTabCompletePreviewThread</code> \u2013 <p>A thread for previewing help docs of selected completion with fzf.</p> </li> <li> <code>LLDBHistory</code> \u2013 <p>Manage your LLDB History</p> </li> <li> <code>LLDBCompleter</code> \u2013 <p>Completer of LLDB</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>get_lldb_completes</code> \u2013 </li> <li> <code>safe_get_help_docs</code> \u2013 </li> <li> <code>should_get_help_docs</code> \u2013 <p>Check if we need to get help docs for another completion that generated by same command.</p> </li> <li> <code>get_lldb_completion_and_status</code> \u2013 <p>Return all possible completions and whether we need to get help docs for all completions.</p> </li> <li> <code>create_fzf_process</code> \u2013 <p>Create a fzf process with given query and preview command.</p> </li> <li> <code>create_preview_fifos</code> \u2013 <p>Create a temporary directory and two FIFOs in it, return the paths of these FIFOs.</p> </li> <li> <code>fzf_reverse_search</code> \u2013 <p>Reverse search history with fzf.</p> </li> <li> <code>fzf_tab_autocomplete</code> \u2013 <p>Tab autocomplete with fzf.</p> </li> <li> <code>wrap_with_history</code> \u2013 </li> <li> <code>get_prompt_session</code> \u2013 </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>FZF_RUN_CMD</code> \u2013 </li> <li> <code>FZF_PRVIEW_WINDOW_ARGS</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.P","title":"P <code>module-attribute</code>","text":"<pre><code>P = ParamSpec('P')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.T","title":"T <code>module-attribute</code>","text":"<pre><code>T = TypeVar('T')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.PROMPT","title":"PROMPT <code>module-attribute</code>","text":"<pre><code>PROMPT = ANSI('\\x1b[34mpwndbg-lldb&gt;\\x1b[0m ')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.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/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FZF_RUN_CMD","title":"FZF_RUN_CMD <code>module-attribute</code>","text":"<pre><code>FZF_RUN_CMD = (\n \"fzf\",\n \"--select-1\",\n \"--exit-0\",\n \"--tiebreak=index\",\n \"--no-multi\",\n \"--height=40%\",\n \"--layout=reverse\",\n)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FZF_PRVIEW_WINDOW_ARGS","title":"FZF_PRVIEW_WINDOW_ARGS <code>module-attribute</code>","text":"<pre><code>FZF_PRVIEW_WINDOW_ARGS = ('--preview-window', 'right:55%:wrap')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FzfTabCompletePreviewThread","title":"FzfTabCompletePreviewThread","text":"<pre><code>FzfTabCompletePreviewThread(\n fifo_input_path: str,\n fifo_output_path: str,\n completion_help_docs: dict[int, str],\n **kwargs,\n)\n</code></pre> <p> Bases: <code>Thread</code></p> <p>A thread for previewing help docs of selected completion with fzf.</p> <p>This is modified from: https://github.com/infokiller/config-public/blob/master/.config/ipython/profile_default/startup/ext/fzf_history.py#L72</p> <p>Methods:</p> <ul> <li> <code>run</code> \u2013 </li> <li> <code>stop</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>fifo_input_path</code> \u2013 </li> <li> <code>fifo_output_path</code> \u2013 </li> <li> <code>completion_help_docs</code> \u2013 </li> <li> <code>is_done</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FzfTabCompletePreviewThread.fifo_input_path","title":"fifo_input_path <code>instance-attribute</code>","text":"<pre><code>fifo_input_path = fifo_input_path\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FzfTabCompletePreviewThread.fifo_output_path","title":"fifo_output_path <code>instance-attribute</code>","text":"<pre><code>fifo_output_path = fifo_output_path\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FzfTabCompletePreviewThread.completion_help_docs","title":"completion_help_docs <code>instance-attribute</code>","text":"<pre><code>completion_help_docs = completion_help_docs\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FzfTabCompletePreviewThread.is_done","title":"is_done <code>instance-attribute</code>","text":"<pre><code>is_done = Event()\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FzfTabCompletePreviewThread.run","title":"run","text":"<pre><code>run() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.FzfTabCompletePreviewThread.stop","title":"stop","text":"<pre><code>stop() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.LLDBHistory","title":"LLDBHistory","text":"<pre><code>LLDBHistory(filename: str, ignore_duplicates: bool = False)\n</code></pre> <p> Bases: <code>FileHistory</code></p> <p>Manage your LLDB History</p> <p>Methods:</p> <ul> <li> <code>load_history_strings</code> \u2013 </li> <li> <code>store_string</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>ignore_duplicates</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.LLDBHistory.ignore_duplicates","title":"ignore_duplicates <code>instance-attribute</code>","text":"<pre><code>ignore_duplicates = ignore_duplicates\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.LLDBHistory.load_history_strings","title":"load_history_strings","text":"<pre><code>load_history_strings() -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.LLDBHistory.store_string","title":"store_string","text":"<pre><code>store_string(string: str) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.LLDBCompleter","title":"LLDBCompleter","text":"<pre><code>LLDBCompleter(dbg)\n</code></pre> <p> Bases: <code>Completer</code></p> <p>Completer of LLDB</p> <p>Methods:</p> <ul> <li> <code>get_completions</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>dbg</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.LLDBCompleter.dbg","title":"dbg <code>instance-attribute</code>","text":"<pre><code>dbg = dbg\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.LLDBCompleter.get_completions","title":"get_completions","text":"<pre><code>get_completions(\n document: Document, complete_event: CompleteEvent\n) -&gt; Iterator[Completion]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.get_lldb_completes","title":"get_lldb_completes","text":"<pre><code>get_lldb_completes(dbg: LLDB, query: str = '') -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.safe_get_help_docs","title":"safe_get_help_docs","text":"<pre><code>safe_get_help_docs(dbg: LLDB, command: str) -&gt; str | None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.should_get_help_docs","title":"should_get_help_docs","text":"<pre><code>should_get_help_docs(dbg: LLDB, completion: str) -&gt; bool\n</code></pre> <p>Check if we need to get help docs for another completion that generated by same command.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.get_lldb_completion_and_status","title":"get_lldb_completion_and_status","text":"<pre><code>get_lldb_completion_and_status(dbg: LLDB, query: str) -&gt; tuple[list[str], bool]\n</code></pre> <p>Return all possible completions and whether we need to get help docs for all completions.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.create_fzf_process","title":"create_fzf_process","text":"<pre><code>create_fzf_process(\n query: str, preview: str = \"\", pre_cmd: str = \"\"\n) -&gt; Popen[str]\n</code></pre> <p>Create a fzf process with given query and preview command.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.create_preview_fifos","title":"create_preview_fifos","text":"<pre><code>create_preview_fifos() -&gt; tuple[str, str]\n</code></pre> <p>Create a temporary directory and two FIFOs in it, return the paths of these FIFOs.</p> <p>This is modified from: https://github.com/infokiller/config-public/blob/652b4638a0a0ffed9743fa9e0ad2a8d4e4e90572/.config/ipython/profile_default/startup/ext/fzf_history.py#L128</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.fzf_reverse_search","title":"fzf_reverse_search","text":"<pre><code>fzf_reverse_search(event: KeyPressEvent) -&gt; None\n</code></pre> <p>Reverse search history with fzf.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.fzf_tab_autocomplete","title":"fzf_tab_autocomplete","text":"<pre><code>fzf_tab_autocomplete(\n event: KeyPressEvent, dbg: LLDB, preview: str, fifo_in: str, fifo_out: str\n) -&gt; None\n</code></pre> <p>Tab autocomplete with fzf.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.wrap_with_history","title":"wrap_with_history","text":"<pre><code>wrap_with_history(function: Callable[P, T]) -&gt; Callable[P, T]\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/fuzzy/#pwndbg.dbg.lldb.repl.fuzzy.get_prompt_session","title":"get_prompt_session","text":"<pre><code>get_prompt_session(dbg)\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/","title":"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() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPlainText.stop","title":"stop","text":"<pre><code>stop() -&gt; 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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/io/#pwndbg.dbg.lldb.repl.io.IODriverPseudoTerminal.stop","title":"stop","text":"<pre><code>stop() -&gt; 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() -&gt; 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) -&gt; 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() -&gt; 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() -&gt; 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":"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>LaunchResult</code> \u2013 <p>Base class for results of launch operations.</p> </li> <li> <code>LaunchResultSuccess</code> \u2013 <p>Indicates that the process was fully launched or attached to.</p> </li> <li> <code>LaunchResultEarlyExit</code> \u2013 <p>Indicates that the process was fully launched or attached to, but that it</p> </li> <li> <code>LaunchResultConnected</code> \u2013 <p>Indicates that there has been a successful connection to a remote</p> </li> <li> <code>LaunchResultError</code> \u2013 <p>Indicates that there was an error launching the process.</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(cause: SBEvent)\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.LaunchResult","title":"LaunchResult","text":"<p>Base class for results of launch operations.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.LaunchResultSuccess","title":"LaunchResultSuccess","text":"<p> Bases: <code>LaunchResult</code></p> <p>Indicates that the process was fully launched or attached to.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.LaunchResultEarlyExit","title":"LaunchResultEarlyExit","text":"<p> Bases: <code>LaunchResult</code></p> <p>Indicates that the process was fully launched or attached to, but that it exited immediately, with no stop events.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.LaunchResultConnected","title":"LaunchResultConnected","text":"<p> Bases: <code>LaunchResult</code></p> <p>Indicates that there has been a successful connection to a remote debugserver, but that no process is being debugged yet.</p>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.LaunchResultError","title":"LaunchResultError","text":"<pre><code>LaunchResultError(what: SBError, disconnected: bool)\n</code></pre> <p> Bases: <code>LaunchResult</code></p> <p>Indicates that there was an error launching the process.</p> <p>Attributes:</p> <ul> <li> <code>__match_args__</code> \u2013 </li> <li> <code>what</code> \u2013 </li> <li> <code>disconnected</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.LaunchResultError.__match_args__","title":"__match_args__ <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>__match_args__ = ('what', 'disconnected')\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.LaunchResultError.what","title":"what <code>instance-attribute</code>","text":"<pre><code>what = what\n</code></pre>"},{"location":"reference/pwndbg/dbg/lldb/repl/proc/#pwndbg.dbg.lldb.repl.proc.LaunchResultError.disconnected","title":"disconnected <code>instance-attribute</code>","text":"<pre><code>disconnected = disconnected\n</code></pre>"},{"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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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]) -&gt; 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 | None,\n disable_aslr: bool,\n) -&gt; LaunchResult\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, info: SBAttachInfo) -&gt; LaunchResult\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) -&gt; LaunchResult\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":"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&gt; ')\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) -&gt; 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]) -&gt; 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":"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) -&gt; 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":"decorators","text":""},{"location":"reference/pwndbg/decorators/#pwndbg.decorators","title":"decorators","text":"<p>Project-wide function decorators.</p> <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) -&gt; 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) -&gt; 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":"emu","text":""},{"location":"reference/pwndbg/emu/#pwndbg.emu","title":"emu","text":"<p>Emulation assistance from Unicorn.</p> <p>Modules:</p> <ul> <li> <code>emulator</code> \u2013 <p>Emulation assistance from Unicorn.</p> </li> </ul>"},{"location":"reference/pwndbg/emu/emulator/","title":"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>enable_virtual_tlb</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 \"s390x\": UC_ARCH_S390X,\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 \"s390x\": parse_consts(s390x_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 \"s390x\": create_reg_to_const_map(arch_to_UC_consts[\"s390x\"]),\n}\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.enable_virtual_tlb","title":"enable_virtual_tlb <code>module-attribute</code>","text":"<pre><code>enable_virtual_tlb = {'s390x': True}\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: [AARCH64_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, MIPS_INS_ALIAS_RDHWR},\n \"arm\": ARM_BANNED_INSTRUCTIONS,\n \"armcm\": ARM_BANNED_INSTRUCTIONS,\n \"aarch64\": {AARCH64_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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.single_step","title":"single_step","text":"<pre><code>single_step(\n pc=None, instruction: PwndbgInstruction | None = None\n) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.dumpregs","title":"dumpregs","text":"<pre><code>dumpregs() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.Emulator.__repr__","title":"__repr__","text":"<pre><code>__repr__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/emu/emulator/#pwndbg.emu.emulator.parse_consts","title":"parse_consts","text":"<pre><code>parse_consts(u_consts) -&gt; 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_*\" -&gt; 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) -&gt; 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=()) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/enhance/","title":"enhance","text":""},{"location":"reference/pwndbg/enhance/#pwndbg.enhance","title":"enhance","text":"<p>Attempt to describe the data at a memory address as best as possible.</p> <p>Only when the data is not a pointer.</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>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.int_str","title":"int_str","text":"<pre><code>int_str(value: int) -&gt; 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) -&gt; 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":"exception","text":""},{"location":"reference/pwndbg/exception/#pwndbg.exception","title":"exception","text":"<p>Common exception handling.</p> <p>Functions:</p> <ul> <li> <code>print_exception</code> \u2013 </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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/exception/#pwndbg.exception.inform_report_issue","title":"inform_report_issue","text":"<pre><code>inform_report_issue(exception_msg) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/","title":"gdblib","text":""},{"location":"reference/pwndbg/gdblib/#pwndbg.gdblib","title":"gdblib","text":"<p>Library for handling GDB logic. Being removed in favour of aglib.</p> <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() -&gt; None\n</code></pre> <p>Import all gdblib modules that need to run code on import</p>"},{"location":"reference/pwndbg/gdblib/bpoint/","title":"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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/bpoint/#pwndbg.gdblib.bpoint.Breakpoint.should_stop","title":"should_stop","text":"<pre><code>should_stop() -&gt; 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":"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>&gt;&gt;&gt; pwndbg.config.add_param('example-value', 7, 'an example')\n&gt;&gt;&gt; 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_INTEGER: PARAM_INTEGER,\n PARAM_ZINTEGER: PARAM_ZINTEGER,\n PARAM_UINTEGER: PARAM_UINTEGER,\n PARAM_ZUINTEGER: PARAM_ZUINTEGER,\n PARAM_ZUINTEGER_UNLIMITED: PARAM_ZUINTEGER_UNLIMITED,\n PARAM_STRING: PARAM_STRING,\n PARAM_ENUM: PARAM_ENUM,\n PARAM_OPTIONAL_FILENAME: PARAM_OPTIONAL_FILENAME,\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 &gt;= 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 &lt;param&gt;</code></p> </li> <li> <code>get_show_string</code> \u2013 <p>Handles the GDB <code>show &lt;param&gt;</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) -&gt; None\n</code></pre> <p>Initializes the super class for GDB &gt;= 9</p>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.Parameter.on_change","title":"on_change","text":"<pre><code>on_change(value: Any) -&gt; 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() -&gt; str\n</code></pre> <p>Handles the GDB <code>set &lt;param&gt;</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) -&gt; str\n</code></pre> <p>Handles the GDB <code>show &lt;param&gt;</code></p>"},{"location":"reference/pwndbg/gdblib/config/#pwndbg.gdblib.config.init_params","title":"init_params","text":"<pre><code>init_params() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/","title":"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>DISABLED</code> \u2013 </li> <li> <code>DISABLED_DEADLOCK</code> \u2013 </li> <li> <code>ENABLED</code> \u2013 </li> <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>workaround_thread_conn</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.DISABLED","title":"DISABLED <code>module-attribute</code>","text":"<pre><code>DISABLED = 'disabled'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.DISABLED_DEADLOCK","title":"DISABLED_DEADLOCK <code>module-attribute</code>","text":"<pre><code>DISABLED_DEADLOCK = 'disabled-deadlock'\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.ENABLED","title":"ENABLED <code>module-attribute</code>","text":"<pre><code>ENABLED = 'enabled'\n</code></pre>"},{"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('gdb-workaround-stop-event', DISABLED, \"asynchronous stop events to improve 'commands' functionality\", help_docstring=f'\nNote that this may cause unexpected behavior with Pwndbg or gdb.execute.\n\nValues explained:\n\n+ `{DISABLED}` - Disable the workaround (default).\n+ `{DISABLED_DEADLOCK}` - Disable only deadlock detection; deadlocks may still occur.\n+ `{ENABLED}` - Enable asynchronous stop events; gdb.execute may behave unexpectedly (asynchronously).\n ', param_class=PARAM_ENUM, enum_sequence=[DISABLED, DISABLED_DEADLOCK, ENABLED])\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.workaround_thread_conn","title":"workaround_thread_conn <code>module-attribute</code>","text":"<pre><code>workaround_thread_conn = None\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]) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.disconnect","title":"disconnect","text":"<pre><code>disconnect(function: Callable[..., Any]) -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.on_exited","title":"on_exited","text":"<pre><code>on_exited() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.StartEvent.on_stop","title":"on_stop","text":"<pre><code>on_stop() -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.unpause","title":"unpause","text":"<pre><code>unpause(event_registry) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/events/#pwndbg.gdblib.events.on_reload","title":"on_reload","text":"<pre><code>on_reload() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/functions/","title":"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 address rebased onto the executable's mappings.</p> </li> <li> <code>base</code> \u2013 <p>Return the 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>argc</code> \u2013 <p>Get the number of program arguments.</p> </li> <li> <code>argv</code> \u2013 <p>Get the n-th program argument.</p> </li> <li> <code>environ</code> \u2013 <p>Get an environment variable by name.</p> </li> <li> <code>envp</code> \u2013 <p>Get the n-th environment variable.</p> </li> <li> <code>dbg_value_to_gdb</code> \u2013 </li> <li> <code>fsbase</code> \u2013 <p>Get the value of the FS segment register.</p> </li> <li> <code>gsbase</code> \u2013 <p>Get the value of the GS segment register.</p> </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) -&gt; Callable[..., Any]\n</code></pre>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.rebase","title":"rebase","text":"<pre><code>rebase(addr: int | Value) -&gt; int\n</code></pre> <p>Return address rebased onto the executable's mappings.</p> <p>Example: <pre><code>pwndbg&gt; p/x $rebase(0xd9020)\n$1 = 0x55555562d020\npwndbg&gt; vmmap\n0x555555554000 0x55555556f000 r--p 1b000 0 /usr/bin/bash\n0x55555556f000 0x55555562d000 r-xp be000 1b000 /usr/bin/bash\n0x55555562d000 0x55555565e000 r--p 31000 d9000 /usr/bin/bash\n[...]\npwndbg&gt; p $rebase(0xd9020) == 0x555555554000 + 0xd9020\n$2 = 1\npwndbg&gt; tele $rebase(0xd9020)\n00:0000\u2502 0x55555562d020 \u25c2\u2014 0x204900636f6c6c61 /* 'alloc' */\n01:0008\u2502 0x55555562d028 \u25c2\u2014 'have no name!'\n02:0010\u2502 0x55555562d030 \u25c2\u2014 0x65720021656d616e /* 'name!' */\n03:0018\u2502 0x55555562d038 \u25c2\u2014 'adline stdin'\n[...]\n</code></pre></p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.base","title":"base","text":"<pre><code>base(name_pattern: str | Value)\n</code></pre> <p>Return the base address of the first memory mapping containing the given name.</p> <p>Example: <pre><code>pwndbg&gt; p/x $base(\"libc\")\n$4 = 0x7ffff7d4b000\npwndbg&gt; vmmap libc\n 0x7ffff7d4a000 0x7ffff7d4b000 rw-p 1000 6e000 /usr/lib/libncursesw.so.6.5\n\u25ba 0x7ffff7d4b000 0x7ffff7d6f000 r--p 24000 0 /usr/lib/libc.so.6\n\u25ba 0x7ffff7d6f000 0x7ffff7ed6000 r-xp 167000 24000 /usr/lib/libc.so.6\n\u25ba 0x7ffff7ed6000 0x7ffff7f2b000 r--p 55000 18b000 /usr/lib/libc.so.6\n\u25ba 0x7ffff7f2b000 0x7ffff7f2f000 r--p 4000 1e0000 /usr/lib/libc.so.6\n\u25ba 0x7ffff7f2f000 0x7ffff7f31000 rw-p 2000 1e4000 /usr/lib/libc.so.6\n 0x7ffff7f31000 0x7ffff7f39000 rw-p 8000 0 [anon_7ffff7f31]\npwndbg&gt; tele $base(\\\"libc\\\")+0x1337\n00:0000\u2502 0x7ffff7d4c337 \u25c2\u2014 0x80480a04214000f0\n01:0008\u2502 0x7ffff7d4c33f \u25c2\u2014 0x8040c02204452040\n02:0010\u2502 0x7ffff7d4c347 \u25c2\u2014 0x20042400000200\n03:0018\u2502 0x7ffff7d4c34f \u25c2\u2014 0x20 /* ' ' */\n[...]\n</code></pre></p> <p>Beware of accidentally matching the wrong mapping. For instance, if the loaded executable contained the string \"libc\" anywhere in it's path, it would've been returned.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.hex2ptr","title":"hex2ptr","text":"<pre><code>hex2ptr(hex_string: str | Value) -&gt; int\n</code></pre> <p>Converts a hex string to a little-endian address and returns the address.</p> <p>Example: <pre><code>pwndbg&gt; p/x $hex2ptr(\"20 74 ed f7 ff 7f\")\n$1 = 0x7ffff7ed7420\npwndbg&gt; p/x $hex2ptr(\"2074edf7ff7f\")\n$2 = 0x7ffff7ed7420\npwndbg&gt; distance '$base(\"libc\")' '$hex2ptr(\"20 74 ed f7 ff 7f\")'\n0x7ffff7d4b000-&gt;0x7ffff7ed7420 is 0x18c420 bytes (0x31884 words)\n</code></pre></p> <p>Especially useful for quickly converting pwntools output.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.argc","title":"argc","text":"<pre><code>argc() -&gt; int\n</code></pre> <p>Get the number of program arguments. Evaluates to argc.</p> <p>Example: <pre><code>pwndbg&gt; p $argc()\n$1 = 2\npwndbg&gt; argv\n00:0000\u2502 0x7fffffffe288 \u2014\u25b8 0x7fffffffe659 \u25c2\u2014 '/usr/bin/cat'\n01:0008\u2502 0x7fffffffe290 \u2014\u25b8 0x7fffffffe666 \u25c2\u2014 'gdbinit.py'\n02:0010\u2502 0x7fffffffe298 \u25c2\u2014 0\n</code></pre></p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.argv","title":"argv","text":"<pre><code>argv(index: Value) -&gt; Value\n</code></pre> <p>Get the n-th program argument. Evaluate argv on the supplied value.</p> <p>Example: <pre><code>pwndbg&gt; p $argv(0)\n$11 = (signed char *) 0x7fffffffe666 \"/usr/bin/sh\"\npwndbg&gt; argv\n00:0000\u2502 0x7fffffffe2a8 \u2014\u25b8 0x7fffffffe666 \u25c2\u2014 '/usr/bin/sh'\n01:0008\u2502 0x7fffffffe2b0 \u25c2\u2014 0\n</code></pre></p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.environ","title":"environ","text":"<pre><code>environ(env_name: Value) -&gt; Value\n</code></pre> <p>Get an environment variable by name. Evaluate getenv() on the supplied value.</p> <p>Example: <pre><code>pwndbg&gt; p $environ(\"LANG\")\n$2 = (signed char *) 0x7fffffffebfb \"LANG=en_US.UTF-8\"\n</code></pre></p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.envp","title":"envp","text":"<pre><code>envp(index: Value) -&gt; Value\n</code></pre> <p>Get the n-th environment variable. Evaluate envp on the supplied value.</p> <p>Example: <pre><code>pwndbg&gt; p $envp(0x3F)\n$13 = (signed char *) 0x7fffffffef7d \"LANG=en_US.UTF-8\"\npwndbg&gt; p $envp(0x3F) == $environ(\"LANG\")\n$14 = 1\n</code></pre></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) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.fsbase","title":"fsbase","text":"<pre><code>fsbase(offset: Value = Value(0)) -&gt; int\n</code></pre> <p>Get the value of the FS segment register. Only valid on x86(-64).</p> <p>Example: <pre><code>pwndbg&gt; p/x $fsbase()\n$3 = 0x7ffff7cdab80\npwndbg&gt; p $fs_base == $fsbase()\n$4 = 1\npwndbg&gt; x/gx $fsbase(0x28)\n0x7ffff7cdaba8: 0x4da926e1668e5a00\npwndbg&gt; x/gx $fsbase(0x30)\n0x7ffff7cdabb0: 0x190a86d93bccf0ad\npwndbg&gt; tls\nThread Local Storage (TLS) base: 0x7ffff7cdab80\nTLS is located at:\n 0x7ffff7cda000 0x7ffff7cdc000 rw-p 2000 0 [anon_7ffff7cda]\nDumping the address:\ntcbhead_t @ 0x7ffff7cdab80\n 0x00007ffff7cdab80 +0x0000 tcb : 0x7ffff7cdab80\n 0x00007ffff7cdab88 +0x0008 dtv : 0x7ffff7cdb4f0\n 0x00007ffff7cdab90 +0x0010 self : 0x7ffff7cdab80\n 0x00007ffff7cdab98 +0x0018 multiple_threads : 0x0\n 0x00007ffff7cdab9c +0x001c gscope_flag : 0x0\n 0x00007ffff7cdaba0 +0x0020 sysinfo : 0x0\n 0x00007ffff7cdaba8 +0x0028 stack_guard : 0x4da926e1668e5a00\n 0x00007ffff7cdabb0 +0x0030 pointer_guard : 0x190a86d93bccf0ad\n [...]\npwndbg&gt; canary\n[...]\nCanary = 0x4da926e1668e5a00 (may be incorrect on != glibc)\n[...]\n</code></pre> FS will usually point to the start of the TLS. If you're not providing an offset, it is usually easier to use GDB's builtin $fs_base variable.</p>"},{"location":"reference/pwndbg/gdblib/functions/#pwndbg.gdblib.functions.gsbase","title":"gsbase","text":"<pre><code>gsbase(offset: Value = Value(0)) -&gt; int\n</code></pre> <p>Get the value of the GS segment register. Only valid on x86(-64).</p> <p>Example: <pre><code>pwndbg&gt; p/x $gsbase()\n$1 = 0x0\n</code></pre> The value of the GS register is more interesting when doing kernel debugging: <pre><code>pwndbg&gt; p/x $gsbase()\n$1 = 0xffff999287a00000\npwndbg&gt; tele $gsbase()\n00:0000\u2502 0xffff999287a00000 \u25c2\u2014 0\n... \u2193 4 skipped\n05:0028\u2502 0xffff999287a00028 \u25c2\u2014 0xd6aa9b336d52a400\n06:0030\u2502 0xffff999287a00030 \u25c2\u2014 0\n07:0038\u2502 0xffff999287a00038 \u25c2\u2014 0\npwndbg&gt; p $gsbase() == $gs_base\n$2 = 1\n</code></pre> If you're not providing an offset, it is usually easier to use GDB's builtin $gs_base variable.</p>"},{"location":"reference/pwndbg/gdblib/got/","title":"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) -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Patcher.stop","title":"stop","text":"<pre><code>stop() -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.should_stop","title":"should_stop","text":"<pre><code>should_stop() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/gdblib/got/#pwndbg.gdblib.got.Tracker.stop","title":"stop","text":"<pre><code>stop() -&gt; 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) -&gt; 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() -&gt; 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":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.update_arch","title":"update_arch","text":"<pre><code>update_arch() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.reset_config","title":"reset_config","text":"<pre><code>reset_config() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.on_start","title":"on_start","text":"<pre><code>on_start() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.on_stop","title":"on_stop","text":"<pre><code>on_stop() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.on_exit","title":"on_exit","text":"<pre><code>on_exit() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/hooks/#pwndbg.gdblib.hooks.init","title":"init","text":"<pre><code>init() -&gt; 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":"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() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.auxv","title":"auxv","text":"<pre><code>auxv() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.files","title":"files","text":"<pre><code>files() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.target","title":"target","text":"<pre><code>target() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.sharedlibrary","title":"sharedlibrary","text":"<pre><code>sharedlibrary() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/gdblib/info/#pwndbg.gdblib.info.parsed_sharedlibrary","title":"parsed_sharedlibrary","text":"<pre><code>parsed_sharedlibrary() -&gt; 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() -&gt; 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) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/","title":"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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.show_hint","title":"show_hint","text":"<pre><code>show_hint() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/prompt/#pwndbg.gdblib.prompt.set_prompt","title":"set_prompt","text":"<pre><code>set_prompt() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/","title":"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>PTRS_COLORS</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.PTRS_COLORS","title":"PTRS_COLORS <code>module-attribute</code>","text":"<pre><code>PTRS_COLORS = (\n red,\n green,\n yellow,\n blue,\n purple,\n cyan,\n light_gray,\n gray,\n light_red,\n light_green,\n light_yellow,\n light_blue,\n light_purple,\n light_cyan,\n)\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() -&gt; 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>colorize_ptr</code> \u2013 <p>Returns colored string of the provided pointer/address</p> </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> <li> <code>colorized_heap_ptrs</code> (<code>dict[int, str]</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.colorized_heap_ptrs","title":"colorized_heap_ptrs <code>instance-attribute</code>","text":"<pre><code>colorized_heap_ptrs: dict[int, str] = {}\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) -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.colorize_ptr","title":"colorize_ptr","text":"<pre><code>colorize_ptr(ptr: int) -&gt; str\n</code></pre> <p>Returns colored string of the provided pointer/address</p>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.malloc","title":"malloc","text":"<pre><code>malloc(chunk: Chunk) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.Tracker.free","title":"free","text":"<pre><code>free(address: int) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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>freed_str</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.freed_str","title":"freed_str <code>instance-attribute</code>","text":"<pre><code>freed_str = colorize_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() -&gt; 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() -&gt; 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>ptr_str</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.ptr_str","title":"ptr_str <code>instance-attribute</code>","text":"<pre><code>ptr_str = colorize_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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.is_enabled","title":"is_enabled","text":"<pre><code>is_enabled() -&gt; 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) -&gt; 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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/ptmalloc2_tracking/#pwndbg.gdblib.ptmalloc2_tracking.uninstall","title":"uninstall","text":"<pre><code>uninstall() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/scheduler/","title":"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() -&gt; 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) -&gt; Value\n</code></pre>"},{"location":"reference/pwndbg/gdblib/shellcode/","title":"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":"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":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/","title":"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.___ansi_substr","title":"___ansi_substr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>___ansi_substr = _ansi_substr\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.close","title":"close","text":"<pre><code>close() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.render","title":"render","text":"<pre><code>render() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.hscroll","title":"hscroll","text":"<pre><code>hscroll(num: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/context/#pwndbg.gdblib.tui.context.ContextTUIWindow.vscroll","title":"vscroll","text":"<pre><code>vscroll(num: int) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/","title":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.render","title":"render","text":"<pre><code>render() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.hscroll","title":"hscroll","text":"<pre><code>hscroll(num: int) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/tui/control/#pwndbg.gdblib.tui.control.ControlTUIWindow.vscroll","title":"vscroll","text":"<pre><code>vscroll(num: int) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/gdblib/vmmap/","title":"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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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 &gt;= 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) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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":"ghidra","text":""},{"location":"reference/pwndbg/ghidra/#pwndbg.ghidra","title":"ghidra","text":"<p>Ghidra integration.</p> <p>Functions:</p> <ul> <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>decompiler</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/ghidra/#pwndbg.ghidra.decompiler","title":"decompiler <code>module-attribute</code>","text":"<pre><code>decompiler = add_param(\n \"decompiler\",\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.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":"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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/glibc/#pwndbg.glibc.get_version","title":"get_version","text":"<pre><code>get_version() -&gt; 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() -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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]) -&gt; 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() -&gt; 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":"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() -&gt; 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":"integration","text":""},{"location":"reference/pwndbg/integration/#pwndbg.integration","title":"integration","text":"<p>Decompiler integration.</p> <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) -&gt; 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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.get_versions","title":"get_versions","text":"<pre><code>get_versions() -&gt; 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) -&gt; 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) -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/integration/#pwndbg.integration.ConfigurableProvider.decompile","title":"decompile","text":"<pre><code>decompile(addr: int, lines: int) -&gt; 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) -&gt; 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) -&gt; 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":"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 param_class=PARAM_ENUM,\n enum_sequence=list(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) -&gt; str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.BinjaProvider.get_versions","title":"get_versions","text":"<pre><code>get_versions() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; 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() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.can_connect","title":"can_connect","text":"<pre><code>can_connect() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.l2r","title":"l2r","text":"<pre><code>l2r(addr: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.r2l","title":"r2l","text":"<pre><code>r2l(addr: int) -&gt; 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() -&gt; 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() -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/integration/binja/#pwndbg.integration.binja.navigate_to","title":"navigate_to","text":"<pre><code>navigate_to(addr: int) -&gt; 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) -&gt; 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]) -&gt; dict[Any, str]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/","title":"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>GetFuncAttr</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>GetFrameId</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>GetMemberOffset</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 = (\n \"{k:v for k,v in globals()['idc'].__dict__.items() if isinstance(v, int)}\"\n)\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) -&gt; str | None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.IdaProvider.get_versions","title":"get_versions","text":"<pre><code>get_versions() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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) -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.withIDA","title":"withIDA","text":"<pre><code>withIDA(func: Callable[P, T]) -&gt; 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]) -&gt; 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) -&gt; 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]) -&gt; Callable[P, int]\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.available","title":"available","text":"<pre><code>available() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.can_connect","title":"can_connect","text":"<pre><code>can_connect() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.l2r","title":"l2r","text":"<pre><code>l2r(addr: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.r2l","title":"r2l","text":"<pre><code>r2l(addr: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.remote","title":"remote","text":"<pre><code>remote(function) -&gt; 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.GetFuncAttr","title":"GetFuncAttr","text":"<pre><code>GetFuncAttr(addr: int, attr: 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() -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.UpdateBreakpoints","title":"UpdateBreakpoints","text":"<pre><code>UpdateBreakpoints() -&gt; 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() -&gt; 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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.LocByName","title":"LocByName","text":"<pre><code>LocByName(name) -&gt; 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) -&gt; 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() -&gt; 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.GetFrameId","title":"GetFrameId","text":"<pre><code>GetFrameId(addr)\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.GetMemberOffset","title":"GetMemberOffset","text":"<pre><code>GetMemberOffset(sid, member_name)\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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/integration/ida/#pwndbg.integration.ida.print_structs","title":"print_structs","text":"<pre><code>print_structs() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/","title":"lib","text":""},{"location":"reference/pwndbg/lib/#pwndbg.lib","title":"lib","text":"<p>Library for non-debugger-dependant functionality.</p> <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>exception</code> \u2013 </li> <li> <code>funcparser</code> \u2013 </li> <li> <code>functions</code> \u2013 </li> <li> <code>functions_data</code> \u2013 </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>pretty_print</code> \u2013 </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> <li> <code>zig</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/abi/","title":"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', 'x4', 'x5', 'x6', 'x7'), 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: tuple[str, ...], align: int, minimum: int)\n</code></pre> <p>Encapsulates information about a calling convention.</p> <p>Attributes:</p> <ul> <li> <code>returns</code> \u2013 </li> <li> <code>register_arguments</code> (<code>tuple[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: tuple[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.SyscallABI","title":"SyscallABI","text":"<pre><code>SyscallABI(register_arguments: tuple[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>Attributes:</p> <ul> <li> <code>syscall_register</code> \u2013 </li> <li> <code>register_arguments</code> (<code>tuple[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 = register_arguments[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: tuple[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.SigreturnABI","title":"SigreturnABI","text":"<pre><code>SigreturnABI(register_arguments: tuple[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>Attributes:</p> <ul> <li> <code>returns</code> \u2013 </li> <li> <code>register_arguments</code> (<code>tuple[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: tuple[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 = register_arguments[0]\n</code></pre>"},{"location":"reference/pwndbg/lib/android/","title":"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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/","title":"arch","text":""},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch","title":"arch","text":"<p>Classes:</p> <ul> <li> <code>Platform</code> \u2013 </li> <li> <code>ArchAttribute</code> \u2013 </li> <li> <code>ArchDefinition</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>PWNLIB_PLATFORM_MAPPINGS</code> (<code>dict[Platform, str]</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 \"s390x\",\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 \"s390x\": \"s390\",\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.PWNLIB_PLATFORM_MAPPINGS","title":"PWNLIB_PLATFORM_MAPPINGS <code>module-attribute</code>","text":"<pre><code>PWNLIB_PLATFORM_MAPPINGS: dict[Platform, str] = {\n LINUX: \"linux\",\n DARWIN: \"darwin\",\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Platform","title":"Platform","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>LINUX</code> \u2013 </li> <li> <code>DARWIN</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Platform.LINUX","title":"LINUX <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>LINUX = (auto(),)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.Platform.DARWIN","title":"DARWIN <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>DARWIN = (auto(),)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute","title":"ArchAttribute","text":"<pre><code>ArchAttribute(_, cs_mode)\n</code></pre> <p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>MIPS_ISA_1</code> \u2013 </li> <li> <code>MIPS_ISA_2</code> \u2013 </li> <li> <code>MIPS_ISA_3</code> \u2013 </li> <li> <code>MIPS_ISA_4</code> \u2013 </li> <li> <code>MIPS_ISA_5</code> \u2013 </li> <li> <code>MIPS_ISA_32</code> \u2013 </li> <li> <code>MIPS_ISA_32R2</code> \u2013 </li> <li> <code>MIPS_ISA_32R3</code> \u2013 </li> <li> <code>MIPS_ISA_32R5</code> \u2013 </li> <li> <code>MIPS_ISA_32R6</code> \u2013 </li> <li> <code>MIPS_ISA_64</code> \u2013 </li> <li> <code>MIPS_ISA_64R2</code> \u2013 </li> <li> <code>MIPS_ISA_64R3</code> \u2013 </li> <li> <code>MIPS_ISA_64R5</code> \u2013 </li> <li> <code>MIPS_ISA_64R6</code> \u2013 </li> <li> <code>MIPS_ISA_MICRO</code> \u2013 </li> <li> <code>MIPS_ISA_NANO</code> \u2013 </li> <li> <code>cs_mode</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_1","title":"MIPS_ISA_1 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_1 = (auto(), CS_MODE_MIPS1)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_2","title":"MIPS_ISA_2 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_2 = (auto(), CS_MODE_MIPS2)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_3","title":"MIPS_ISA_3 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_3 = (auto(), CS_MODE_MIPS3)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_4","title":"MIPS_ISA_4 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_4 = (auto(), CS_MODE_MIPS4)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_5","title":"MIPS_ISA_5 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_5 = (auto(), CS_MODE_MIPS5)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_32","title":"MIPS_ISA_32 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_32 = (auto(), CS_MODE_MIPS32)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_32R2","title":"MIPS_ISA_32R2 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_32R2 = (auto(), CS_MODE_MIPS32R2)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_32R3","title":"MIPS_ISA_32R3 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_32R3 = (auto(), CS_MODE_MIPS32R3)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_32R5","title":"MIPS_ISA_32R5 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_32R5 = (auto(), CS_MODE_MIPS32R5)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_32R6","title":"MIPS_ISA_32R6 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_32R6 = (auto(), CS_MODE_MIPS32R6)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_64","title":"MIPS_ISA_64 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_64 = (auto(), CS_MODE_MIPS64)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_64R2","title":"MIPS_ISA_64R2 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_64R2 = (auto(), CS_MODE_MIPS64R2)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_64R3","title":"MIPS_ISA_64R3 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_64R3 = (auto(), CS_MODE_MIPS64R3)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_64R5","title":"MIPS_ISA_64R5 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_64R5 = (auto(), CS_MODE_MIPS64R5)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_64R6","title":"MIPS_ISA_64R6 <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_64R6 = (auto(), CS_MODE_MIPS64R6)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_MICRO","title":"MIPS_ISA_MICRO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_MICRO = (auto(), CS_MODE_MICRO)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.MIPS_ISA_NANO","title":"MIPS_ISA_NANO <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>MIPS_ISA_NANO = (auto(), CS_MODE_NANOMIPS)\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchAttribute.cs_mode","title":"cs_mode <code>instance-attribute</code>","text":"<pre><code>cs_mode = cs_mode\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchDefinition","title":"ArchDefinition <code>dataclass</code>","text":"<pre><code>ArchDefinition(\n name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE,\n ptrsize: int,\n endian: Literal[\"little\", \"big\"],\n platform: Platform,\n attributes: list[ArchAttribute] = list(),\n)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>PWNDBG_SUPPORTED_ARCHITECTURES_TYPE</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 <p>Pointer size in bytes</p> </li> <li> <code>endian</code> (<code>Literal['little', 'big']</code>) \u2013 </li> <li> <code>platform</code> (<code>Platform</code>) \u2013 </li> <li> <code>attributes</code> (<code>list[ArchAttribute]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchDefinition.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: PWNDBG_SUPPORTED_ARCHITECTURES_TYPE\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchDefinition.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int\n</code></pre> <p>Pointer size in bytes</p>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchDefinition.endian","title":"endian <code>instance-attribute</code>","text":"<pre><code>endian: Literal['little', 'big']\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchDefinition.platform","title":"platform <code>instance-attribute</code>","text":"<pre><code>platform: Platform\n</code></pre>"},{"location":"reference/pwndbg/lib/arch/#pwndbg.lib.arch.ArchDefinition.attributes","title":"attributes <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>attributes: list[ArchAttribute] = field(default_factory=list)\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/","title":"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, ...]) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/cache/#pwndbg.lib.cache.DebugCacheDict.clear","title":"clear","text":"<pre><code>clear() -&gt; 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) -&gt; 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) -&gt; 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() -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/common/","title":"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) -&gt; int\n</code></pre> <p>Converts a hex string to a little-endian integer address.</p>"},{"location":"reference/pwndbg/lib/config/","title":"config","text":""},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config","title":"config","text":"<p>Classes:</p> <ul> <li> <code>Scope</code> \u2013 </li> <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_AUTO_BOOLEAN</code> \u2013 </li> <li> <code>PARAM_INTEGER</code> \u2013 </li> <li> <code>PARAM_ZINTEGER</code> \u2013 </li> <li> <code>PARAM_UINTEGER</code> \u2013 </li> <li> <code>PARAM_ZUINTEGER</code> \u2013 </li> <li> <code>PARAM_ZUINTEGER_UNLIMITED</code> \u2013 </li> <li> <code>PARAM_STRING</code> \u2013 </li> <li> <code>PARAM_ENUM</code> \u2013 </li> <li> <code>PARAM_OPTIONAL_FILENAME</code> \u2013 </li> <li> <code>PARAM_CLASSES</code> \u2013 </li> <li> <code>HELP_DEFAULT_PREFIX</code> \u2013 </li> <li> <code>HELP_VALID_VALUES_PREFIX</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_AUTO_BOOLEAN","title":"PARAM_AUTO_BOOLEAN <code>module-attribute</code>","text":"<pre><code>PARAM_AUTO_BOOLEAN = 1\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 = 2\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 = 3\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 = 4\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 = 5\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 = 6\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 = 7\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 = 8\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 = 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.HELP_DEFAULT_PREFIX","title":"HELP_DEFAULT_PREFIX <code>module-attribute</code>","text":"<pre><code>HELP_DEFAULT_PREFIX = 'Default:'\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.HELP_VALID_VALUES_PREFIX","title":"HELP_VALID_VALUES_PREFIX <code>module-attribute</code>","text":"<pre><code>HELP_VALID_VALUES_PREFIX = 'Valid values:'\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Scope","title":"Scope","text":"<p> Bases: <code>Enum</code></p> <p>Attributes:</p> <ul> <li> <code>config</code> \u2013 </li> <li> <code>theme</code> \u2013 </li> <li> <code>heap</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Scope.config","title":"config <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>config = 1\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Scope.theme","title":"theme <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>theme = 2\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Scope.heap","title":"heap <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>heap = 3\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: Scope = 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 = set_show_doc\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 = help_docstring\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]) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.revert_default","title":"revert_default","text":"<pre><code>revert_default() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.attr_name","title":"attr_name","text":"<pre><code>attr_name() -&gt; 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) -&gt; 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() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.pretty_default","title":"pretty_default","text":"<pre><code>pretty_default() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__int__","title":"__int__","text":"<pre><code>__int__() -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__str__","title":"__str__","text":"<pre><code>__str__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__bool__","title":"__bool__","text":"<pre><code>__bool__() -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__lt__","title":"__lt__","text":"<pre><code>__lt__(other: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__add__","title":"__add__","text":"<pre><code>__add__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__radd__","title":"__radd__","text":"<pre><code>__radd__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__sub__","title":"__sub__","text":"<pre><code>__sub__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__rsub__","title":"__rsub__","text":"<pre><code>__rsub__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__mul__","title":"__mul__","text":"<pre><code>__mul__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__rmul__","title":"__rmul__","text":"<pre><code>__rmul__(other: int) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__div__","title":"__div__","text":"<pre><code>__div__(other: float) -&gt; float\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__floordiv__","title":"__floordiv__","text":"<pre><code>__floordiv__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__pow__","title":"__pow__","text":"<pre><code>__pow__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__mod__","title":"__mod__","text":"<pre><code>__mod__(other: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Parameter.__len__","title":"__len__","text":"<pre><code>__len__() -&gt; 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: Scope = config,\n) -&gt; 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) -&gt; Parameter\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.trigger","title":"trigger","text":"<pre><code>trigger(*params: Parameter) -&gt; 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: Scope) -&gt; list[Parameter]\n</code></pre>"},{"location":"reference/pwndbg/lib/config/#pwndbg.lib.config.Config.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name: str) -&gt; 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":"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":"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":"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: _bfor (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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(attr: str) -&gt; int | str | None\n</code></pre>"},{"location":"reference/pwndbg/lib/elftypes/#pwndbg.lib.elftypes.AUXV.__str__","title":"__str__","text":"<pre><code>__str__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/exception/","title":"exception","text":""},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception","title":"exception","text":"<p>Classes:</p> <ul> <li> <code>IndentContextManager</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.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> <li> <code>addr_hex</code> \u2013 </li> <li> <code>aux_hex</code> \u2013 </li> <li> <code>prefix</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>indent</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.IndentContextManager.indent","title":"indent <code>instance-attribute</code>","text":"<pre><code>indent = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.IndentContextManager.__enter__","title":"__enter__","text":"<pre><code>__enter__() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.IndentContextManager.print","title":"print","text":"<pre><code>print(*a, **kw) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.IndentContextManager.addr_hex","title":"addr_hex","text":"<pre><code>addr_hex(val: int) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.IndentContextManager.aux_hex","title":"aux_hex","text":"<pre><code>aux_hex(val: int) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/exception/#pwndbg.lib.exception.IndentContextManager.prefix","title":"prefix","text":"<pre><code>prefix(s: str)\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/","title":"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) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/funcparser/#pwndbg.lib.funcparser.ExtractFuncDecl","title":"ExtractFuncDecl","text":"<pre><code>ExtractFuncDecl(node: CAstNode, verbose: bool = False) -&gt; 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) -&gt; Function | None\n</code></pre>"},{"location":"reference/pwndbg/lib/functions/","title":"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":"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/heap/","title":"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":"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) -&gt; Generator[int, None, None]\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/","title":"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":"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 | None, *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> <li> <code>update_with_file</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>data</code> \u2013 </li> <li> <code>CONFIG_SLUB_TINY</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_SLUB_CPU_PARTIAL</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_MEMCG</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_SLAB_FREELIST_RANDOM</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_HARDENED_USERCOPY</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_SLAB_FREELIST_HARDENED</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_NUMA</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_KASAN_GENERIC</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_KASAN</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_SMP</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_CMA</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_MEMORY_ISOLATION</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_SYSFS</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_DEBUG_FS</code> (<code>bool</code>) \u2013 </li> <li> <code>CONFIG_SECURITY</code> (<code>bool</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.CONFIG_SLUB_TINY","title":"CONFIG_SLUB_TINY <code>property</code>","text":"<pre><code>CONFIG_SLUB_TINY: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_SLUB_CPU_PARTIAL","title":"CONFIG_SLUB_CPU_PARTIAL <code>property</code>","text":"<pre><code>CONFIG_SLUB_CPU_PARTIAL: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_MEMCG","title":"CONFIG_MEMCG <code>property</code>","text":"<pre><code>CONFIG_MEMCG: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_SLAB_FREELIST_RANDOM","title":"CONFIG_SLAB_FREELIST_RANDOM <code>property</code>","text":"<pre><code>CONFIG_SLAB_FREELIST_RANDOM: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_HARDENED_USERCOPY","title":"CONFIG_HARDENED_USERCOPY <code>property</code>","text":"<pre><code>CONFIG_HARDENED_USERCOPY: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_SLAB_FREELIST_HARDENED","title":"CONFIG_SLAB_FREELIST_HARDENED <code>property</code>","text":"<pre><code>CONFIG_SLAB_FREELIST_HARDENED: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_NUMA","title":"CONFIG_NUMA <code>property</code>","text":"<pre><code>CONFIG_NUMA: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_KASAN_GENERIC","title":"CONFIG_KASAN_GENERIC <code>property</code>","text":"<pre><code>CONFIG_KASAN_GENERIC: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_KASAN","title":"CONFIG_KASAN <code>property</code>","text":"<pre><code>CONFIG_KASAN: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_SMP","title":"CONFIG_SMP <code>property</code>","text":"<pre><code>CONFIG_SMP: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_CMA","title":"CONFIG_CMA <code>property</code>","text":"<pre><code>CONFIG_CMA: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_MEMORY_ISOLATION","title":"CONFIG_MEMORY_ISOLATION <code>property</code>","text":"<pre><code>CONFIG_MEMORY_ISOLATION: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_SYSFS","title":"CONFIG_SYSFS <code>property</code>","text":"<pre><code>CONFIG_SYSFS: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_DEBUG_FS","title":"CONFIG_DEBUG_FS <code>property</code>","text":"<pre><code>CONFIG_DEBUG_FS: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/kconfig/#pwndbg.lib.kernel.kconfig.Kconfig.CONFIG_SECURITY","title":"CONFIG_SECURITY <code>property</code>","text":"<pre><code>CONFIG_SECURITY: bool\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) -&gt; 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) -&gt; 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.Kconfig.update_with_file","title":"update_with_file","text":"<pre><code>update_with_file(file_path)\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) -&gt; 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) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/kernel/structs/","title":"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":"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) -&gt; int</p> </li> <li> <code>round_up</code> \u2013 <p>round_up(address, align) -&gt; int</p> </li> <li> <code>format_address</code> \u2013 <p>Format the given address as a string.</p> </li> <li> <code>page_align</code> \u2013 <p>page_align(address) -&gt; 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(\n start: int,\n size: int,\n flags: int,\n offset: int,\n objfile: str = \"\",\n in_darwin_shared_cache: bool = False,\n)\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>in_darwin_shared_cache</code> (<code>bool</code>) \u2013 <p>Whether this mapping is part of the Darwin Shared Cache.</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.in_darwin_shared_cache","title":"in_darwin_shared_cache <code>instance-attribute</code>","text":"<pre><code>in_darwin_shared_cache: bool = in_darwin_shared_cache\n</code></pre> <p>Whether this mapping is part of the Darwin Shared Cache.</p> <p>This is an interesting property to know, as these entries may not be useful to us at all times, and having an easy way to filter them out is helpful..</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__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__repr__","title":"__repr__","text":"<pre><code>__repr__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__contains__","title":"__contains__","text":"<pre><code>__contains__(addr: int) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__eq__","title":"__eq__","text":"<pre><code>__eq__(other: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__lt__","title":"__lt__","text":"<pre><code>__lt__(other: object) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.Page.__hash__","title":"__hash__","text":"<pre><code>__hash__() -&gt; 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) -&gt; int\n</code></pre> <p>round_down(address, align) -&gt; 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) -&gt; int\n</code></pre> <p>round_up(address, align) -&gt; 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.format_address","title":"format_address","text":"<pre><code>format_address(\n vaddr: int,\n memsz: int,\n permstr: str,\n offset: int,\n objfile: str | None = None,\n) -&gt; str\n</code></pre> <p>Format the given address as a string.</p>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.page_align","title":"page_align","text":"<pre><code>page_align(address: int) -&gt; int\n</code></pre> <p>page_align(address) -&gt; 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) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/memory/#pwndbg.lib.memory.page_offset","title":"page_offset","text":"<pre><code>page_offset(address: int) -&gt; int\n</code></pre>"},{"location":"reference/pwndbg/lib/net/","title":"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>format_host_port</code> \u2013 </li> <li> <code>tcp</code> \u2013 </li> <li> <code>tcp6</code> \u2013 </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__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Connection.__repr__","title":"__repr__","text":"<pre><code>__repr__() -&gt; 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__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.UnixSocket.__repr__","title":"__repr__","text":"<pre><code>__repr__() -&gt; 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>portid</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.portid","title":"portid <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>portid: 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__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.Netlink.__repr__","title":"__repr__","text":"<pre><code>__repr__() -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.format_host_port","title":"format_host_port","text":"<pre><code>format_host_port(ip, port)\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.tcp","title":"tcp","text":"<pre><code>tcp(data: str) -&gt; list[Connection]\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.tcp6","title":"tcp6","text":"<pre><code>tcp6(data: str) -&gt; list[Connection]\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.unix","title":"unix","text":"<pre><code>unix(data: str) -&gt; list[UnixSocket]\n</code></pre>"},{"location":"reference/pwndbg/lib/net/#pwndbg.lib.net.netlink","title":"netlink","text":"<pre><code>netlink(data: str) -&gt; list[Netlink]\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/","title":"pretty_print","text":""},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print","title":"pretty_print","text":"<p>Classes:</p> <ul> <li> <code>Property</code> \u2013 <p>A (property name, property value) pair</p> </li> </ul> <p>Functions:</p> <ul> <li> <code>int_to_string</code> \u2013 <p>Converts an integer value to string.</p> </li> <li> <code>int_pair_to_string</code> \u2013 <p>Converts an integer pair to a string pair.</p> </li> <li> <code>from_properties</code> \u2013 <p>When you have (property name, property value) pairs</p> </li> </ul> <p>Attributes:</p> <ul> <li> <code>max_decimal_number</code> \u2013 </li> <li> <code>config_property_name_color</code> \u2013 </li> <li> <code>config_property_value_color</code> \u2013 </li> <li> <code>config_property_title_color</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.max_decimal_number","title":"max_decimal_number <code>module-attribute</code>","text":"<pre><code>max_decimal_number = add_param(\n \"max-decimal-number\",\n 9,\n \"show all numbers greater than this in hex\",\n param_class=PARAM_ZUINTEGER_UNLIMITED,\n help_docstring=\"\\nFor negative numbers, their absolute value is used.\\n\\nSet the parameter to 'unlimited' if you want all values in decimal.\\nSpecially, set the parameter to zero if you want all values in hex.\\n\\nThe assembly instruction operands come from capstone, and are thus\\nnot controlled by this setting. For consistency with them, leave\\nthis setting at 9 (the default).\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.config_property_name_color","title":"config_property_name_color <code>module-attribute</code>","text":"<pre><code>config_property_name_color = add_color_param(\n \"prop-name-color\",\n \"bold\",\n \"color used to highlight the name in name-value pairs\",\n help_docstring=\"\\nUsed heavily in mallocng commands.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.config_property_value_color","title":"config_property_value_color <code>module-attribute</code>","text":"<pre><code>config_property_value_color = add_color_param(\n \"prop-value-color\",\n \"yellow\",\n \"color used to highlight the value in name-value pairs\",\n help_docstring=\"\\nUsed heavily in mallocng commands.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.config_property_title_color","title":"config_property_title_color <code>module-attribute</code>","text":"<pre><code>config_property_title_color = add_color_param(\n \"prop-title-color\",\n \"green\",\n \"color used to highlight the title of name-value pair groups\",\n help_docstring=\"\\nUsed heavily in mallocng commands.\\n\",\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property","title":"Property <code>dataclass</code>","text":"<pre><code>Property(\n name: str,\n value: Any,\n alt_value: Any = None,\n extra: str | list[str] = \"\",\n is_addr: bool = False,\n use_hex: bool = True,\n name_color_func: Callable[[str], str] | None = None,\n value_color_func: Callable[[str], str] | None = None,\n)\n</code></pre> <p>A (property name, property value) pair with optional extra information.</p> <p>Used by from_properties().</p> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>value</code> (<code>Any</code>) \u2013 </li> <li> <code>alt_value</code> (<code>Any</code>) \u2013 </li> <li> <code>extra</code> (<code>str | list[str]</code>) \u2013 </li> <li> <code>is_addr</code> (<code>bool</code>) \u2013 </li> <li> <code>use_hex</code> (<code>bool</code>) \u2013 </li> <li> <code>name_color_func</code> (<code>Callable[[str], str] | None</code>) \u2013 </li> <li> <code>value_color_func</code> (<code>Callable[[str], str] | None</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.value","title":"value <code>instance-attribute</code>","text":"<pre><code>value: Any\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.alt_value","title":"alt_value <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>alt_value: Any = None\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.extra","title":"extra <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>extra: str | list[str] = ''\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.is_addr","title":"is_addr <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>is_addr: bool = False\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.use_hex","title":"use_hex <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>use_hex: bool = True\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.name_color_func","title":"name_color_func <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>name_color_func: Callable[[str], str] | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.Property.value_color_func","title":"value_color_func <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>value_color_func: Callable[[str], str] | None = None\n</code></pre>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.int_to_string","title":"int_to_string","text":"<pre><code>int_to_string(num: int) -&gt; str\n</code></pre> <p>Converts an integer value to string.</p> <p>Decides whether to format it in decimal or hex depending on the max-decimal-number config.</p>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.int_pair_to_string","title":"int_pair_to_string","text":"<pre><code>int_pair_to_string(num1: int, num2: int) -&gt; tuple[str, str]\n</code></pre> <p>Converts an integer pair to a string pair.</p> <p>Decides whether to format them in decimal or hex depending on the max-decimal-number config.</p> <p>If either value should be hex, both are hex.</p>"},{"location":"reference/pwndbg/lib/pretty_print/#pwndbg.lib.pretty_print.from_properties","title":"from_properties","text":"<pre><code>from_properties(\n title: str,\n properties: list[Property],\n *,\n preamble: str = \"\",\n value_offset: int = 14,\n extra_offset: int = 16,\n title_color_func: Callable[[str], str] | None = None,\n name_color_func: Callable[[str], str] | None = None,\n value_color_func: Callable[[str], str] | None = None,\n indent_size: int = 2,\n) -&gt; str\n</code></pre> <p>When you have (property name, property value) pairs that you want to print, each on a new line.</p> <p>A common usecase is printing a struct.</p> Example <p>general start: 0x7ffff7ff6040 user start: 0x7ffff7ff6040 aka <code>p</code> end: 0x7ffff7ff606c start + stride - 4 stride: 0x30 distance between adjacent slots user size: 0x20 aka \"nominal size\", <code>n</code> slack: 0x0 (0x0) slot's unused memory / 0x10</p> <p>Parameters:</p> <ul> <li> <code>title</code> (<code>str</code>) \u2013 <p>The title of this property group. An empty string may be provided for a titleless group.</p> </li> <li> <code>properties</code> (<code>list[Property]</code>) \u2013 <p>The list of properties to format.</p> </li> <li> <code>preamble</code> (<code>str</code>, default: <code>''</code> ) \u2013 <p>A string that will be printed between the title and the properties, may be used to denote the address of an object like e.g. <code>@ 0x408000 - 0x408fe0</code></p> </li> <li> <code>value_offset</code> (<code>int</code>, default: <code>14</code> ) \u2013 <p>The number of characters from the start of the name of a property to the start of its value.</p> </li> <li> <code>extra_offset</code> (<code>int</code>, default: <code>16</code> ) \u2013 <p>The number of characters from the start of the value of a property to the start of its extra text.</p> </li> <li> <code>title_color_func</code> (<code>Callable[[str], str] | None</code>, default: <code>None</code> ) \u2013 <p>The function to use to color the title.</p> </li> <li> <code>name_color_func</code> (<code>Callable[[str], str] | None</code>, default: <code>None</code> ) \u2013 <p>The function to use to color names.</p> </li> <li> <code>value_color_func</code> (<code>Callable[[str], str] | None</code>, default: <code>None</code> ) \u2013 <p>The function to use to color values. This function isn't applied to is_addr=True properties.</p> </li> <li> <code>indent_size</code> (<code>int</code>, default: <code>2</code> ) \u2013 <p>The indentation to use i.e. the offset from the title to the names.</p> </li> </ul>"},{"location":"reference/pwndbg/lib/regs/","title":"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>BitFlags</code> \u2013 </li> <li> <code>AddressingRegister</code> \u2013 <p>Represents a register that is used to store an address, e.g. cr3, gsbase, fsbase</p> </li> <li> <code>SegmentRegisters</code> \u2013 <p>Represents the x86 segment register set</p> </li> <li> <code>KernelRegisterSet</code> \u2013 <p>additional registers that are useful when pwning kernels</p> </li> <li> <code>UnicornRegisterWrite</code> \u2013 <p>Represent a register to write to the Unicorn emulator.</p> </li> <li> <code>Reg</code> \u2013 </li> <li> <code>RegisterSet</code> \u2013 </li> <li> <code>PseudoEmulatedRegisterFile</code> \u2013 <p>This class represents a set of registers that can be written, read, and invalidated.</p> </li> </ul> <p>Attributes:</p> <ul> <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_tcr_flags</code> \u2013 </li> <li> <code>aarch64_scr_flags</code> \u2013 </li> <li> <code>aarch64_mmfr_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_kernel</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>s390x</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.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),\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_tcr_flags","title":"aarch64_tcr_flags <code>module-attribute</code>","text":"<pre><code>aarch64_tcr_flags = BitFlags(\n [(\"TG1\", (30, 31)), (\"T1SZ\", (16, 21)), (\"TG0\", (14, 15)), (\"T0SZ\", (0, 5))]\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.aarch64_mmfr_flags","title":"aarch64_mmfr_flags <code>module-attribute</code>","text":"<pre><code>aarch64_mmfr_flags = BitFlags([('VARange', (16, 19))])\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=(Reg(\"lr\", 4),),\n flags={\"cpsr\": arm_cpsr_flags},\n gpr=(\n Reg(\"r0\", 4),\n Reg(\"r1\", 4),\n Reg(\"r2\", 4),\n Reg(\"r3\", 4),\n Reg(\"r4\", 4),\n Reg(\"r5\", 4),\n Reg(\"r6\", 4),\n Reg(\"r7\", 4),\n Reg(\"r8\", 4),\n Reg(\"r9\", 4),\n Reg(\"r10\", 4),\n Reg(\"r11\", 4),\n Reg(\"r12\", 4),\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=(Reg(\"lr\", 4),),\n flags={\"xpsr\": arm_xpsr_flags},\n gpr=(\n Reg(\"r0\", 4),\n Reg(\"r1\", 4),\n Reg(\"r2\", 4),\n Reg(\"r3\", 4),\n Reg(\"r4\", 4),\n Reg(\"r5\", 4),\n Reg(\"r6\", 4),\n Reg(\"r7\", 4),\n Reg(\"r8\", 4),\n Reg(\"r9\", 4),\n Reg(\"r10\", 4),\n Reg(\"r11\", 4),\n Reg(\"r12\", 4),\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=(Reg(\"lr\", 8),),\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 \"tcr_el1\": aarch64_tcr_flags,\n \"id_aa64mmfr2_el1\": aarch64_mmfr_flags,\n \"ttbr0_el1\": BitFlags(),\n \"ttbr1_el1\": BitFlags(),\n },\n frame=Reg(\"fp\", 8, subregisters=(Reg(\"w29\", 4, zero_extend_writes=True),)),\n gpr=(\n Reg(\"x0\", 8, subregisters=(Reg(\"w0\", 4, zero_extend_writes=True),)),\n Reg(\"x1\", 8, subregisters=(Reg(\"w1\", 4, zero_extend_writes=True),)),\n Reg(\"x2\", 8, subregisters=(Reg(\"w2\", 4, zero_extend_writes=True),)),\n Reg(\"x3\", 8, subregisters=(Reg(\"w3\", 4, zero_extend_writes=True),)),\n Reg(\"x4\", 8, subregisters=(Reg(\"w4\", 4, zero_extend_writes=True),)),\n Reg(\"x5\", 8, subregisters=(Reg(\"w5\", 4, zero_extend_writes=True),)),\n Reg(\"x6\", 8, subregisters=(Reg(\"w6\", 4, zero_extend_writes=True),)),\n Reg(\"x7\", 8, subregisters=(Reg(\"w7\", 4, zero_extend_writes=True),)),\n Reg(\"x8\", 8, subregisters=(Reg(\"w8\", 4, zero_extend_writes=True),)),\n Reg(\"x9\", 8, subregisters=(Reg(\"w9\", 4, zero_extend_writes=True),)),\n Reg(\"x10\", 8, subregisters=(Reg(\"w10\", 4, zero_extend_writes=True),)),\n Reg(\"x11\", 8, subregisters=(Reg(\"w11\", 4, zero_extend_writes=True),)),\n Reg(\"x12\", 8, subregisters=(Reg(\"w12\", 4, zero_extend_writes=True),)),\n Reg(\"x13\", 8, subregisters=(Reg(\"w13\", 4, zero_extend_writes=True),)),\n Reg(\"x14\", 8, subregisters=(Reg(\"w14\", 4, zero_extend_writes=True),)),\n Reg(\"x15\", 8, subregisters=(Reg(\"w15\", 4, zero_extend_writes=True),)),\n Reg(\"x16\", 8, subregisters=(Reg(\"w16\", 4, zero_extend_writes=True),)),\n Reg(\"x17\", 8, subregisters=(Reg(\"w17\", 4, zero_extend_writes=True),)),\n Reg(\"x18\", 8, subregisters=(Reg(\"w18\", 4, zero_extend_writes=True),)),\n Reg(\"x19\", 8, subregisters=(Reg(\"w19\", 4, zero_extend_writes=True),)),\n Reg(\"x20\", 8, subregisters=(Reg(\"w20\", 4, zero_extend_writes=True),)),\n Reg(\"x21\", 8, subregisters=(Reg(\"w21\", 4, zero_extend_writes=True),)),\n Reg(\"x22\", 8, subregisters=(Reg(\"w22\", 4, zero_extend_writes=True),)),\n Reg(\"x23\", 8, subregisters=(Reg(\"w23\", 4, zero_extend_writes=True),)),\n Reg(\"x24\", 8, subregisters=(Reg(\"w24\", 4, zero_extend_writes=True),)),\n Reg(\"x25\", 8, subregisters=(Reg(\"w25\", 4, zero_extend_writes=True),)),\n Reg(\"x26\", 8, subregisters=(Reg(\"w26\", 4, zero_extend_writes=True),)),\n Reg(\"x27\", 8, subregisters=(Reg(\"w27\", 4, zero_extend_writes=True),)),\n Reg(\"x28\", 8, subregisters=(Reg(\"w28\", 4, zero_extend_writes=True),)),\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 (\"AC\", 18),\n ]\n )\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.amd64_kernel","title":"amd64_kernel <code>module-attribute</code>","text":"<pre><code>amd64_kernel = KernelRegisterSet(\n segments=SegmentRegisters([\"cs\", \"ss\", \"ds\", \"es\", \"fs\", \"gs\"]),\n controls={\n \"cr0\": BitFlags([(\"PE\", 0), (\"WP\", 16), (\"PG\", 31)]),\n \"cr3\": AddressingRegister(\"cr3\", False),\n \"cr4\": BitFlags(\n [\n (\"UMIP\", 11),\n (\"FSGSBASE\", 16),\n (\"SMEP\", 20),\n (\"SMAP\", 21),\n (\"PKE\", 22),\n (\"CET\", 23),\n (\"PKS\", 24),\n ]\n ),\n },\n msrs={\n \"efer\": BitFlags([(\"NXE\", 11)]),\n \"gs_base\": AddressingRegister(\"gs_base\", True),\n \"fs_base\": AddressingRegister(\"fs_base\", True),\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=Reg(\"rip\"),\n stack=Reg(\n \"rsp\",\n 8,\n subregisters=(\n Reg(\"esp\", 4, 0, zero_extend_writes=True),\n Reg(\"sp\", 2, 0),\n Reg(\"spl\", 1, 0),\n ),\n ),\n frame=Reg(\n \"rbp\",\n 8,\n subregisters=(\n Reg(\"ebp\", 4, 0, zero_extend_writes=True),\n Reg(\"bp\", 2, 0),\n Reg(\"bpl\", 1, 0),\n ),\n ),\n flags=x86flags,\n gpr=(\n Reg(\n \"rax\",\n 8,\n subregisters=(\n Reg(\"eax\", 4, 0, zero_extend_writes=True),\n Reg(\"ax\", 2, 0),\n Reg(\"ah\", 1, 1),\n Reg(\"al\", 1, 0),\n ),\n ),\n Reg(\n \"rbx\",\n 8,\n subregisters=(\n Reg(\"ebx\", 4, 0, zero_extend_writes=True),\n Reg(\"bx\", 2, 0),\n Reg(\"bh\", 1, 1),\n Reg(\"bl\", 1, 0),\n ),\n ),\n Reg(\n \"rcx\",\n 8,\n subregisters=(\n Reg(\"ecx\", 4, 0, zero_extend_writes=True),\n Reg(\"cx\", 2, 0),\n Reg(\"ch\", 1, 1),\n Reg(\"cl\", 1, 0),\n ),\n ),\n Reg(\n \"rdx\",\n 8,\n subregisters=(\n Reg(\"edx\", 4, 0, zero_extend_writes=True),\n Reg(\"dx\", 2, 0),\n Reg(\"dh\", 1, 1),\n Reg(\"dl\", 1, 0),\n ),\n ),\n Reg(\n \"rdi\",\n 8,\n subregisters=(\n Reg(\"edi\", 4, 0, zero_extend_writes=True),\n Reg(\"di\", 2, 0),\n Reg(\"dil\", 1, 0),\n ),\n ),\n Reg(\n \"rsi\",\n 8,\n subregisters=(\n Reg(\"esi\", 4, 0, zero_extend_writes=True),\n Reg(\"si\", 2, 0),\n Reg(\"sil\", 1, 0),\n ),\n ),\n Reg(\n \"r8\",\n 8,\n subregisters=(\n Reg(\"r8d\", 4, 0, zero_extend_writes=True),\n Reg(\"r8w\", 2, 0),\n Reg(\"r8b\", 1, 0),\n ),\n ),\n Reg(\n \"r9\",\n 8,\n subregisters=(\n Reg(\"r9d\", 4, 0, zero_extend_writes=True),\n Reg(\"r9w\", 2, 0),\n Reg(\"r9b\", 1, 0),\n ),\n ),\n Reg(\n \"r10\",\n 8,\n subregisters=(\n Reg(\"r10d\", 4, 0, zero_extend_writes=True),\n Reg(\"r10w\", 2, 0),\n Reg(\"r10b\", 1, 0),\n ),\n ),\n Reg(\n \"r11\",\n 8,\n subregisters=(\n Reg(\"r11d\", 4, 0, zero_extend_writes=True),\n Reg(\"r11w\", 2, 0),\n Reg(\"r11b\", 1, 0),\n ),\n ),\n Reg(\n \"r12\",\n 8,\n subregisters=(\n Reg(\"r12d\", 4, 0, zero_extend_writes=True),\n Reg(\"r12w\", 2, 0),\n Reg(\"r12b\", 1, 0),\n ),\n ),\n Reg(\n \"r13\",\n 8,\n subregisters=(\n Reg(\"r13d\", 4, 0, zero_extend_writes=True),\n Reg(\"r13w\", 2, 0),\n Reg(\"r13b\", 1, 0),\n ),\n ),\n Reg(\n \"r14\",\n 8,\n subregisters=(\n Reg(\"r14d\", 4, 0, zero_extend_writes=True),\n Reg(\"r14w\", 2, 0),\n Reg(\"r14b\", 1, 0),\n ),\n ),\n Reg(\n \"r15\",\n 8,\n subregisters=(\n Reg(\"r15d\", 4, 0, zero_extend_writes=True),\n Reg(\"r15w\", 2, 0),\n Reg(\"r15b\", 1, 0),\n ),\n ),\n ),\n misc=(\"cs\", \"ss\", \"ds\", \"es\", \"fs\", \"gs\", \"fs_base\", \"gs_base\", \"ip\"),\n kernel=amd64_kernel,\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=Reg(\"eip\"),\n stack=Reg(\"esp\", 4, subregisters=(Reg(\"sp\", 2, 0),)),\n frame=Reg(\"ebp\", 4, subregisters=(Reg(\"bp\", 2, 0),)),\n flags=x86flags,\n gpr=(\n Reg(\n \"eax\",\n 4,\n subregisters=(Reg(\"ax\", 2, 0), Reg(\"ah\", 1, 1), Reg(\"al\", 1, 0)),\n ),\n Reg(\n \"ebx\",\n 4,\n subregisters=(Reg(\"bx\", 2, 0), Reg(\"bh\", 1, 1), Reg(\"bl\", 1, 0)),\n ),\n Reg(\n \"ecx\",\n 4,\n subregisters=(Reg(\"cx\", 2, 0), Reg(\"ch\", 1, 1), Reg(\"cl\", 1, 0)),\n ),\n Reg(\n \"edx\",\n 4,\n subregisters=(Reg(\"dx\", 2, 0), Reg(\"dh\", 1, 1), Reg(\"dl\", 1, 0)),\n ),\n Reg(\"edi\", 4, subregisters=(Reg(\"di\", 2, 0),)),\n Reg(\"esi\", 4, subregisters=(Reg(\"si\", 2, 0),)),\n ),\n misc=(\"cs\", \"ss\", \"ds\", \"es\", \"fs\", \"gs\", \"fs_base\", \"gs_base\", \"ip\"),\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=(Reg(\"lr\"),),\n flags={\"msr\": BitFlags(), \"xer\": BitFlags()},\n gpr=(\n Reg(\"r0\"),\n Reg(\"r1\"),\n Reg(\"r2\"),\n Reg(\"r3\"),\n Reg(\"r4\"),\n Reg(\"r5\"),\n Reg(\"r6\"),\n Reg(\"r7\"),\n Reg(\"r8\"),\n Reg(\"r9\"),\n Reg(\"r10\"),\n Reg(\"r11\"),\n Reg(\"r12\"),\n Reg(\"r13\"),\n Reg(\"r14\"),\n Reg(\"r15\"),\n Reg(\"r16\"),\n Reg(\"r17\"),\n Reg(\"r18\"),\n Reg(\"r19\"),\n Reg(\"r20\"),\n Reg(\"r21\"),\n Reg(\"r22\"),\n Reg(\"r23\"),\n Reg(\"r24\"),\n Reg(\"r25\"),\n Reg(\"r26\"),\n Reg(\"r27\"),\n Reg(\"r28\"),\n Reg(\"r29\"),\n Reg(\"r30\"),\n Reg(\"r31\"),\n Reg(\"cr\"),\n Reg(\"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=Reg(\"sp\"),\n frame=Reg(\"fp\"),\n retaddr=(Reg(\"i7\"),),\n flags={\"psr\": BitFlags()},\n gpr=(\n Reg(\"g1\"),\n Reg(\"g2\"),\n Reg(\"g3\"),\n Reg(\"g4\"),\n Reg(\"g5\"),\n Reg(\"g6\"),\n Reg(\"g7\"),\n Reg(\"o0\"),\n Reg(\"o1\"),\n Reg(\"o2\"),\n Reg(\"o3\"),\n Reg(\"o4\"),\n Reg(\"o5\"),\n Reg(\"o7\"),\n Reg(\"l0\"),\n Reg(\"l1\"),\n Reg(\"l2\"),\n Reg(\"l3\"),\n Reg(\"l4\"),\n Reg(\"l5\"),\n Reg(\"l6\"),\n Reg(\"l7\"),\n Reg(\"i0\"),\n Reg(\"i1\"),\n Reg(\"i2\"),\n Reg(\"i3\"),\n Reg(\"i4\"),\n Reg(\"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=Reg(\"fp\"),\n retaddr=(Reg(\"ra\"),),\n gpr=(\n Reg(\"v0\"),\n Reg(\"v1\"),\n Reg(\"a0\"),\n Reg(\"a1\"),\n Reg(\"a2\"),\n Reg(\"a3\"),\n Reg(\"t0\"),\n Reg(\"t1\"),\n Reg(\"t2\"),\n Reg(\"t3\"),\n Reg(\"t4\"),\n Reg(\"t5\"),\n Reg(\"t6\"),\n Reg(\"t7\"),\n Reg(\"t8\"),\n Reg(\"t9\"),\n Reg(\"s0\"),\n Reg(\"s1\"),\n Reg(\"s2\"),\n Reg(\"s3\"),\n Reg(\"s4\"),\n Reg(\"s5\"),\n Reg(\"s6\"),\n Reg(\"s7\"),\n Reg(\"s8\"),\n Reg(\"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=Reg(\"pc\"),\n stack=Reg(\"sp\"),\n retaddr=(Reg(\"ra\"),),\n gpr=(\n Reg(\"gp\"),\n Reg(\"tp\"),\n Reg(\"t0\"),\n Reg(\"t1\"),\n Reg(\"t2\"),\n Reg(\"s0\"),\n Reg(\"s1\"),\n Reg(\"a0\"),\n Reg(\"a1\"),\n Reg(\"a2\"),\n Reg(\"a3\"),\n Reg(\"a4\"),\n Reg(\"a5\"),\n Reg(\"a6\"),\n Reg(\"a7\"),\n Reg(\"s2\"),\n Reg(\"s3\"),\n Reg(\"s4\"),\n Reg(\"s5\"),\n Reg(\"s6\"),\n Reg(\"s7\"),\n Reg(\"s8\"),\n Reg(\"s9\"),\n Reg(\"s10\"),\n Reg(\"s11\"),\n Reg(\"t3\"),\n Reg(\"t4\"),\n Reg(\"t5\"),\n Reg(\"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=Reg(\"pc\"),\n stack=Reg(\"sp\"),\n frame=Reg(\"fp\"),\n retaddr=(Reg(\"ra\"),),\n gpr=(\n Reg(\"a0\"),\n Reg(\"a1\"),\n Reg(\"a2\"),\n Reg(\"a3\"),\n Reg(\"a4\"),\n Reg(\"a5\"),\n Reg(\"a6\"),\n Reg(\"a7\"),\n Reg(\"t0\"),\n Reg(\"t1\"),\n Reg(\"t2\"),\n Reg(\"t3\"),\n Reg(\"t4\"),\n Reg(\"t5\"),\n Reg(\"t6\"),\n Reg(\"t7\"),\n Reg(\"t8\"),\n Reg(\"s0\"),\n Reg(\"s1\"),\n Reg(\"s2\"),\n Reg(\"s3\"),\n Reg(\"s4\"),\n Reg(\"s5\"),\n Reg(\"s6\"),\n Reg(\"s7\"),\n Reg(\"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.s390x","title":"s390x <code>module-attribute</code>","text":"<pre><code>s390x = RegisterSet(\n pc=Reg(\"pc\"),\n retaddr=(Reg(\"r14\"),),\n stack=Reg(\"r15\"),\n flags={\"pswm\": BitFlags()},\n gpr=(\n Reg(\"r0\"),\n Reg(\"r1\"),\n Reg(\"r2\"),\n Reg(\"r3\"),\n Reg(\"r4\"),\n Reg(\"r5\"),\n Reg(\"r6\"),\n Reg(\"r7\"),\n Reg(\"r8\"),\n Reg(\"r9\"),\n Reg(\"r10\"),\n Reg(\"r11\"),\n Reg(\"r12\"),\n Reg(\"r13\"),\n ),\n args=(\"r2\", \"r3\", \"r4\", \"r5\", \"r6\"),\n retval=\"r2\",\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 \"s390x\": s390x,\n}\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags","title":"BitFlags","text":"<pre><code>BitFlags(flags: list[tuple[str, int | tuple[int, int]]] = [], value=None)\n</code></pre> <p>Methods:</p> <ul> <li> <code>__getattr__</code> \u2013 </li> <li> <code>__getitem__</code> \u2013 </li> <li> <code>__setitem__</code> \u2013 </li> <li> <code>__delitem__</code> \u2013 </li> <li> <code>__iter__</code> \u2013 </li> <li> <code>__len__</code> \u2013 </li> <li> <code>__repr__</code> \u2013 </li> <li> <code>update</code> \u2013 </li> <li> <code>context</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>regname</code> (<code>str</code>) \u2013 </li> <li> <code>flags</code> (<code>OrderedDict[str, int | tuple[int, int]]</code>) \u2013 </li> <li> <code>value</code> (<code>int</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.regname","title":"regname <code>instance-attribute</code>","text":"<pre><code>regname: str = ''\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.flags","title":"flags <code>instance-attribute</code>","text":"<pre><code>flags: OrderedDict[str, int | tuple[int, int]] = {}\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.value","title":"value <code>instance-attribute</code>","text":"<pre><code>value: int = value\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.__getattr__","title":"__getattr__","text":"<pre><code>__getattr__(name)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.__getitem__","title":"__getitem__","text":"<pre><code>__getitem__(key)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.__setitem__","title":"__setitem__","text":"<pre><code>__setitem__(key, value)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.__delitem__","title":"__delitem__","text":"<pre><code>__delitem__(key)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.__iter__","title":"__iter__","text":"<pre><code>__iter__()\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.__len__","title":"__len__","text":"<pre><code>__len__()\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.__repr__","title":"__repr__","text":"<pre><code>__repr__()\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.update","title":"update","text":"<pre><code>update(regname: str)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.BitFlags.context","title":"context","text":"<pre><code>context(rc)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.AddressingRegister","title":"AddressingRegister","text":"<pre><code>AddressingRegister(reg: str, is_virtual: bool)\n</code></pre> <p>Represents a register that is used to store an address, e.g. cr3, gsbase, fsbase</p> <p>Methods:</p> <ul> <li> <code>update</code> \u2013 </li> <li> <code>context</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>reg</code> (<code>str</code>) \u2013 </li> <li> <code>value</code> (<code>int</code>) \u2013 </li> <li> <code>is_virtual</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.AddressingRegister.reg","title":"reg <code>instance-attribute</code>","text":"<pre><code>reg: str = reg\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.AddressingRegister.value","title":"value <code>instance-attribute</code>","text":"<pre><code>value: int = 0\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.AddressingRegister.is_virtual","title":"is_virtual <code>instance-attribute</code>","text":"<pre><code>is_virtual: bool = is_virtual\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.AddressingRegister.update","title":"update","text":"<pre><code>update(regname: str)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.AddressingRegister.context","title":"context","text":"<pre><code>context(rc)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.SegmentRegisters","title":"SegmentRegisters","text":"<pre><code>SegmentRegisters(regs: list[str])\n</code></pre> <p>Represents the x86 segment register set</p> <p>Methods:</p> <ul> <li> <code>context</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>regs</code> (<code>list[str]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.SegmentRegisters.regs","title":"regs <code>instance-attribute</code>","text":"<pre><code>regs: list[str] = regs\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.SegmentRegisters.context","title":"context","text":"<pre><code>context(rc)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.KernelRegisterSet","title":"KernelRegisterSet","text":"<pre><code>KernelRegisterSet(\n segments: SegmentRegisters | None,\n controls: dict[str, BitFlags | AddressingRegister] = {},\n msrs: dict[str, BitFlags | AddressingRegister] = {},\n)\n</code></pre> <p>additional registers that are useful when pwning kernels used only for x86-64 for now</p> <p>Attributes:</p> <ul> <li> <code>segments</code> (<code>SegmentRegisters</code>) \u2013 </li> <li> <code>controls</code> (<code>dict[str, BitFlags | AddressingRegister]</code>) \u2013 </li> <li> <code>msrs</code> (<code>dict[str, BitFlags | AddressingRegister]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.KernelRegisterSet.segments","title":"segments <code>instance-attribute</code>","text":"<pre><code>segments: SegmentRegisters = segments\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.KernelRegisterSet.controls","title":"controls <code>instance-attribute</code>","text":"<pre><code>controls: dict[str, BitFlags | AddressingRegister] = controls\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.KernelRegisterSet.msrs","title":"msrs <code>instance-attribute</code>","text":"<pre><code>msrs: dict[str, BitFlags | AddressingRegister] = msrs\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.UnicornRegisterWrite","title":"UnicornRegisterWrite <code>dataclass</code>","text":"<pre><code>UnicornRegisterWrite(name: str, force_write: bool)\n</code></pre> <p>Represent a register to write to the Unicorn emulator.</p> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>force_write</code> (<code>bool</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.UnicornRegisterWrite.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.UnicornRegisterWrite.force_write","title":"force_write <code>instance-attribute</code>","text":"<pre><code>force_write: bool\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.Reg","title":"Reg <code>dataclass</code>","text":"<pre><code>Reg(\n name: str,\n size: int | None = None,\n offset: int = 0,\n zero_extend_writes: bool = False,\n subregisters: tuple[Reg, ...] = (),\n)\n</code></pre> <p>Attributes:</p> <ul> <li> <code>name</code> (<code>str</code>) \u2013 </li> <li> <code>size</code> (<code>int | None</code>) \u2013 <p>Register width in bytes. None if the register size is arch.ptrsize</p> </li> <li> <code>offset</code> (<code>int</code>) \u2013 <p>Relevant for subregisters - the offset of this register in the main register</p> </li> <li> <code>zero_extend_writes</code> (<code>bool</code>) \u2013 <p>Upon writing a value to this subregister, are the higher bits of the full register zeroed out?</p> </li> <li> <code>subregisters</code> (<code>tuple[Reg, ...]</code>) \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.Reg.name","title":"name <code>instance-attribute</code>","text":"<pre><code>name: str\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.Reg.size","title":"size <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>size: int | None = None\n</code></pre> <p>Register width in bytes. None if the register size is arch.ptrsize</p>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.Reg.offset","title":"offset <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>offset: int = 0\n</code></pre> <p>Relevant for subregisters - the offset of this register in the main register</p>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.Reg.zero_extend_writes","title":"zero_extend_writes <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>zero_extend_writes: bool = False\n</code></pre> <p>Upon writing a value to this subregister, are the higher bits of the full register zeroed out?</p>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.Reg.subregisters","title":"subregisters <code>class-attribute</code> <code>instance-attribute</code>","text":"<pre><code>subregisters: tuple[Reg, ...] = ()\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet","title":"RegisterSet","text":"<pre><code>RegisterSet(\n pc: Reg = Reg(\"pc\"),\n stack: Reg = Reg(\"sp\"),\n frame: Reg | None = None,\n retaddr: tuple[Reg, ...] = (),\n flags: dict[str, BitFlags] = {},\n extra_flags: dict[str, BitFlags] = {},\n gpr: tuple[Reg, ...] = (),\n misc: tuple[str, ...] = (),\n args: tuple[str, ...] = (),\n kernel: KernelRegisterSet | None = None,\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>kernel</code> (<code>KernelRegisterSet | None</code>) \u2013 </li> <li> <code>reg_definitions</code> (<code>dict[str, Reg]</code>) \u2013 </li> <li> <code>full_register_lookup</code> (<code>dict[str, Reg]</code>) \u2013 </li> <li> <code>common</code> (<code>list[str]</code>) \u2013 </li> <li> <code>emulated_regs_order</code> (<code>list[UnicornRegisterWrite]</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 = name\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.stack","title":"stack <code>instance-attribute</code>","text":"<pre><code>stack: str = name\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 = name if frame else None\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, ...] = tuple((name) for x in 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, ...] = tuple((name) for x in 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.kernel","title":"kernel <code>instance-attribute</code>","text":"<pre><code>kernel: KernelRegisterSet | None = kernel\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.reg_definitions","title":"reg_definitions <code>instance-attribute</code>","text":"<pre><code>reg_definitions: dict[str, Reg] = {}\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.full_register_lookup","title":"full_register_lookup <code>instance-attribute</code>","text":"<pre><code>full_register_lookup: dict[str, Reg] = {}\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[UnicornRegisterWrite] = []\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)\n | set(flags)\n | set(extra_flags)\n | set(retaddr)\n | set(common)\n | set(all_subregisters)\n)\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.__contains__","title":"__contains__","text":"<pre><code>__contains__(reg: str) -&gt; bool\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.RegisterSet.__iter__","title":"__iter__","text":"<pre><code>__iter__() -&gt; Iterator[str]\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile","title":"PseudoEmulatedRegisterFile","text":"<pre><code>PseudoEmulatedRegisterFile(register_set: RegisterSet, ptrsize: int)\n</code></pre> <p>This class represents a set of registers that can be written, read, and invalidated.</p> <p>The aim is to allow some manual dynamic/static analysis without the need for a full emulator.</p> <p>The implementation can handle the behavior of architectures with partial registers, such as x86 (Ex: rax has \"eax\", \"ax\", \"ah\", and \"al\" as subregisters) or AArch64 (Ex: X0 contains W0). Most of the complexity of the bitshifts and masks arise from the necessity to handle these cases.</p> <p>Methods:</p> <ul> <li> <code>write_register</code> \u2013 <p>source_width is the byte width of the value's source.</p> </li> <li> <code>read_register</code> \u2013 </li> <li> <code>invalidate_all_registers</code> \u2013 </li> <li> <code>invalidate_register</code> \u2013 <p>Invalidate the bits that a write to this register would override.</p> </li> <li> <code>__repr__</code> \u2013 </li> </ul> <p>Attributes:</p> <ul> <li> <code>register_set</code> (<code>RegisterSet</code>) \u2013 </li> <li> <code>ptrsize</code> (<code>int</code>) \u2013 </li> <li> <code>masks</code> (<code>defaultdict[str, int]</code>) \u2013 <p>Map of register name to bitmask indicating what bits of the register we know the value of.</p> </li> <li> <code>values</code> (<code>defaultdict[str, int]</code>) \u2013 <p>Map of register to the value we know it to have.</p> </li> </ul>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.register_set","title":"register_set <code>instance-attribute</code>","text":"<pre><code>register_set: RegisterSet = register_set\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.ptrsize","title":"ptrsize <code>instance-attribute</code>","text":"<pre><code>ptrsize: int = ptrsize\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.masks","title":"masks <code>instance-attribute</code>","text":"<pre><code>masks: defaultdict[str, int] = defaultdict(int)\n</code></pre> <p>Map of register name to bitmask indicating what bits of the register we know the value of.</p> <p>Example: { \"rax\": 0xFFFF } This indicates that in the RAX register, we only know the bottom 16 bits. This likely resulted from writing the \"ax\" register. Any attempt to read any other bits returns None. In this case, we can read from \"ax\", \"ah\", and \"al\", but not \"eax\" or \"rax\".</p>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.values","title":"values <code>instance-attribute</code>","text":"<pre><code>values: defaultdict[str, int] = defaultdict(int)\n</code></pre> <p>Map of register to the value we know it to have.</p>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.write_register","title":"write_register","text":"<pre><code>write_register(\n reg: str,\n value: int,\n source_width: int | None = None,\n sign_extend: bool = False,\n) -&gt; None\n</code></pre> <p>source_width is the byte width of the value's source. It should be specified when the source has a width shorter than the destination register.</p> <p>Examples:</p> <p>movsbl EAX, AL // sign extend 1 byte register to 4 byte register movzbl EAX, AL // zero extend</p> <p>Source width would be 1, and in the first case sign_extend should be set to True. If sign_extend is False, we zero extend.</p>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.read_register","title":"read_register","text":"<pre><code>read_register(reg: str) -&gt; int | None\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.invalidate_all_registers","title":"invalidate_all_registers","text":"<pre><code>invalidate_all_registers() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.invalidate_register","title":"invalidate_register","text":"<pre><code>invalidate_register(reg: str) -&gt; None\n</code></pre> <p>Invalidate the bits that a write to this register would override.</p> <p>This can be used when we statically detect that a register is written, but we don't know the concrete value that is written so we have to invalidate any current knowledge of the register's bits.</p>"},{"location":"reference/pwndbg/lib/regs/#pwndbg.lib.regs.PseudoEmulatedRegisterFile.__repr__","title":"__repr__","text":"<pre><code>__repr__()\n</code></pre>"},{"location":"reference/pwndbg/lib/stdio/","title":"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) -&gt; 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) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/lib/strings/","title":"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":"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() -&gt; 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) -&gt; str\n</code></pre> <p>Returns and potentially creates a persistent safe cachedir location based on XDG_CACHE_HOME or ~/.cache or LOCALAPPDATA (Windows)</p> <p>Optionally creates a sub namespace inside the pwndbg cache folder.</p>"},{"location":"reference/pwndbg/lib/tips/","title":"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 &lt;topic&gt;` command displays all registered commands that are related to the given &lt;topic&gt;\",\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 &lt;path&gt;` 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 &lt;cmd&gt; | &lt;prog&gt;` 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: `| &lt;cmd&gt; | &lt;prog&gt;`\",\n \"Prefixing a command with `!` in GDB will execute it as a shell command, e.g.: `!ls` or `!cat flag.txt`\",\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 &lt;param&gt;` and `set &lt;param&gt; &lt;value&gt;` 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 &amp; 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 &lt;sections&gt;` or forward the output to a file/tty via `set context-output &lt;file&gt;`. 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://pwndbg.re/stable/tutorials/splitting-the-context/\",\n 'Use `$base(\"heap\")` to get the start address of a [heap] memory page',\n \"Use the `errno` (or `errno &lt;number&gt;`) 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 &lt;number&gt; &lt;filter&gt;` to display &lt;number&gt; 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 &lt;address&gt; '&lt;assembly&gt;'` to patch an address with given assembly code\",\n \"Want to NOP some instructions? Use `patch &lt;address&gt; '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 &lt;assembly-instruction [operands]&gt;` 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 &lt;command&gt;` 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 &lt;regex&gt;` 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 &lt;pid&gt;` 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() -&gt; 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() -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/lib/version/","title":"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.10.20'\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() -&gt; str\n</code></pre> <p>Returns pwndbg commit id if git is available.</p>"},{"location":"reference/pwndbg/lib/which/","title":"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) -&gt; 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) -&gt; str | set[str] | None\n</code></pre> <p>which(name, flags = os.X_OK, all = False) -&gt; 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/lib/zig/","title":"zig","text":""},{"location":"reference/pwndbg/lib/zig/#pwndbg.lib.zig","title":"zig","text":"<p>Functions:</p> <ul> <li> <code>flags</code> \u2013 </li> <li> <code>asm</code> \u2013 </li> </ul>"},{"location":"reference/pwndbg/lib/zig/#pwndbg.lib.zig.flags","title":"flags","text":"<pre><code>flags(arch: ArchDefinition) -&gt; list[str]\n</code></pre>"},{"location":"reference/pwndbg/lib/zig/#pwndbg.lib.zig.asm","title":"asm","text":"<pre><code>asm(\n arch: ArchDefinition, data: str, includes: list[Path] | None = None\n) -&gt; bytes\n</code></pre>"},{"location":"reference/pwndbg/log/","title":"log","text":""},{"location":"reference/pwndbg/log/#pwndbg.log","title":"log","text":"<p>Logging.</p> <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":"profiling","text":""},{"location":"reference/pwndbg/profiling/#pwndbg.profiling","title":"profiling","text":"<p>Pwndbg profiling.</p> <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() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.Profiler.start","title":"start","text":"<pre><code>start() -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.Profiler.stop","title":"stop","text":"<pre><code>stop(filename: str | None = None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/profiling/#pwndbg.profiling.init","title":"init","text":"<pre><code>init(p: Profile, _start_time: float | None) -&gt; None\n</code></pre>"},{"location":"reference/pwndbg/radare2/","title":"radare2","text":""},{"location":"reference/pwndbg/radare2/#pwndbg.radare2","title":"radare2","text":"<p>Radare2 integration with r2pipe.</p> <p>Functions:</p> <ul> <li> <code>r2pipe</code> \u2013 <p>Spawn and return a r2pipe handle for the current process file.</p> </li> <li> <code>r2cmd</code> \u2013 </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/radare2/#pwndbg.radare2.r2cmd","title":"r2cmd","text":"<pre><code>r2cmd(arguments) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/rizin/","title":"rizin","text":""},{"location":"reference/pwndbg/rizin/#pwndbg.rizin","title":"rizin","text":"<p>Rizin integration with rzpipe.</p> <p>Functions:</p> <ul> <li> <code>rzpipe</code> \u2013 <p>Spawn and return a rzpipe handle for the current process file.</p> </li> <li> <code>rzcmd</code> \u2013 </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/rizin/#pwndbg.rizin.rzcmd","title":"rzcmd","text":"<pre><code>rzcmd(arguments) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/search/","title":"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) -&gt; 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":"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>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\",\n \"center\",\n \"banner title position\",\n param_class=PARAM_ENUM,\n enum_sequence=[\"center\", \"left\", \"right\"],\n)\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) -&gt; 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":"wrappers","text":""},{"location":"reference/pwndbg/wrappers/#pwndbg.wrappers","title":"wrappers","text":"<p>Specific command output wrappers.</p> <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]) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/wrappers/checksec/","title":"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() -&gt; 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) -&gt; 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) -&gt; 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) -&gt; str\n</code></pre>"},{"location":"reference/pwndbg/wrappers/readelf/","title":"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) -&gt; dict[RelocationType, list[str]]\n</code></pre>"},{"location":"blog/archive/2022/","title":"2022","text":""}]}