* Fix ansi color truncation in TUI windows
All remaining ansi escape codes after the substring of real characters weren't printed.
This caused some colors to linger over to the next line.
* Add two default TUI layouts
One including the sourcecode section and one without.
The allows to try the TUI quickly by selecting one of the layouts: `layout pwndbg` or `layout pwndbg_code`.
* Don't use \t tabs in context threads section
Horizontal scroll in TUI mode would jump around causing visual glitches. Use spaces instead.
* Add warning when section is in TUI layout but not in 'context-sections'
The section won't be updated automatically on stop.
* Update FEATURES docs including screenshot
* Don't create TUI windows when GDB is compiled without it
Don't stop pwndbg from loading on gdb without tui integration.
* Fix redraw of all windows after toggling TUI mode
When switching back to TUI mode, the contextoutput would be sent before a TUI window's `render` function was called. This caused some sections to be printed normally in the cmd window instead of being sent to their TUI window.
Keep a list of all open context TUI windows and redirect contextoutput for all of them once the first window is rerendered instead of waiting for them to be rendered too.
Also fix the _static_enabled class variable usage.
* Add history of context output
Every context section is cached individually to allow to display older output again. You can scroll through the old context output using `contextprev` and `contextnext`.
This allows to "scroll" in TUI mode.
* Add button TUI window to control context history
* Simplify history status output generation
* Remove SIGWINCH signal handler
gdb updates `height` and `width` automatically since 2015,
so this code seems to be obsolete.
Installing our own signal handler replaced gdb's one and prevented it from reacting to SIGWINCH signals.
* Add context sections TUI windows
This adds `pwndbg_[section]` tui windows to be used in a layout.
You can arrange `pwndbg_regs` or `pwndbg_disasm` as you wish.
The horizontal scrolling and truncation has to consider ANSI escape codes and makes sure to include all of them while scrolling through to properly keep the colors.
Since there is no event fired when TUI mode is enabled/disabled, we have to check `.is_valid()` whenever context data is available or the TUI is rendered to redirect context output appropriately again.
* Feature: show ghidra decompiled code in context
With the help of radare2, r2pipe and r2ghidra-dec
* Update FEATURES.md
* Include review comments
* Removed embarrassing auto added guards
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Configure context output per section
* banner respects width of target output
* Fixed context output help
* ui.banner optionaly force a width
* Allow python functions as context output
* Use is for StdOutput type comparison
Co-Authored-By: Disconnect3d <dominik.b.czarnota@gmail.com>
* Use list-function as initial value of default dict
Co-Authored-By: Disconnect3d <dominik.b.czarnota@gmail.com>
* Append final context linebreak only on stdout
* Documented context splitting feature
* Option to hide context section banners
* Option to set width per context section (currently only banner)
* Splitting screenshot
* Fixed empty lines when not clearing
* Fixed auto banner width (using stdin as before instead of stdout)
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
* Add option to redirect context output to other tty or files
The output of context/dashboard can be now be redirected with
"set context-output /dev/pts/x" to everything wich python can open and
offers a file like "write".
* Sorted imports correctly (fixing pwndbg CI)
* Added support for using different malloc algorithms and implemented
ptmalloc commands
- Added support for the mp_ structure from glibc
- Fixed the bug when the base of [heap] is not sbrk_base (occurs
when bss is very large).
- Added an interface for interacting with ptmalloc heaps
* Added fastbins, unsortedbins, smallbins, largebins
- Implemented the bin functions both in the ptmalloc interface in
the heap/ directory and the commands function
- Completed the bins command which prints all the commands
- Added option to bin commands `verbose` specifies the users desire
to print empty bins - linked lists with out any nodes from malloc
- Changed bin representation to OrderedDict
* remove old bins command
* Ptmalloc bug fixes
- switched constants.ptmalloc from using pwndbg.typeinfo to a gdb
api function to prevent bugs when libc-dbg isn't installed
- Other minor changes
* Added some functionality for when libc-dbg is not present
- Added checks for finding symbols
* Ran isort on pwndbg
* Made few changes based on feedback from pull requests
- Cleaned up spaces_table
- Syntax changes
* Moved formatting code away from logic
- Moved format_bin from pwndbg.heap.ptmalloc to pwndbg.commands.heap
* Fixed bug in spaces_table for 32 bit archs
* Changed malloc_chunk command to display FASTBIN instead of PREV_INUSE
- Fixed local isort version problems
* Small bug fixes, tweaks, and added features list.
- Changed pwndbg.chain.format to use the offset for the very last
index in the chain.
- Fixed bug with ptmalloc's main_arena property.
- Added images to cap and links to FEATURES.md.
- Changed bin commands to print hex instead of base 10.
* Modified docstring to match other docstrings in pwndbg
* Memoize properties, fix merge conflicst, fix constants
- Moved the macros from the constants directory into the Heap
class, left the constants there.
- Switched from lazy loading to the memoize events.
* Fixed double spaces after images from a previous pull request.
* Added more examples to FEATURES.md for heaps
* Fix typos in FEATURES.md
* Added PyCharm project dir (.idea) to .gitignore
* Reformat & optimize imports in ida xmlrpc sources
* Refactored ida_script.py
* Moved host to variable in ida_script.py
* Added info that server has been hosted in ida_script.py
* Added info to config/theme commands output
* Reformat & optimize imports in pwndbg/config.py
* Fix for configfile/themefile generation #137
Also generating the configs only for the changed parameters.
* Better info for config and theme commands
* Added Ida Pro rpc connection host, port parameters #132
* Fixed wrong Ida Pro idb save path on Windows #132
The problem happens on a NTFS filesystem as it supports ADS (Alternative
Data Streams) so that filepath with ':' is treated as ntfs ads.
* Added info on Ida Pro rpc successful connection #132
* Sorted imports with isort
* Added Ida Pro rpc auto connect when host/port has changed #132
* Better Ida Pro integration description in FEATURES.md #132
* Added info about config/theme into FEATURES.md
* Add PEP8 configuration file for pep8 command-line and PyCharm
* Review #139 fixes: ugly filter_cond cleanup
* Minor name refactor in pwndbg/config.py
* Review #139: added native_default to pwndbg.config.Parameter
* config: fix type checking of native translation by testing instance
* config: add optional 'all' parameter to {config,theme}file
this makes it easier to get a template of all configurable options.
* Removed trailing spaces in FEATURES.md