Pwndbg breaks w/ trace-commands enabled
See original GitHub issueDescription
pwndbg breaks with trace-commands enabled, I have a use case where I want to dynamically save user input to a file which trace-commands allows, however this breaks the pwndbg functionality.
+r
Starting program: /home/parallels/example/demo
The bare metal debugging is enabled since gdb's osabi is '++show osabi' which is not 'GNU/Linux'.
Ex. the page resolving and memory de-referencing ONLY works on known pages.
This option is based on gdb client compile arguments (by default) and will be corrected if you load an ELF with a '.note.ABI-tag' section.
If you are debugging a program that runs on the Linux ABI, please select the correct gdb client.
Breakpoint 1, main (argc=1, argv=0xfffffffff088) at demo.c:6
6 func_0_args();
Warning: Skipping auxv entry '++info auxv'
Traceback (most recent call last):
File "/home/parallels/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/parallels/pwndbg/pwndbg/strings.py", line 33, in update_length
length = int(message)
ValueError: invalid literal for int() with base 10: 'elements'
Traceback (most recent call last):
File "/home/parallels/pwndbg/pwndbg/events.py", line 169, in caller
raise e
File "/home/parallels/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/parallels/pwndbg/pwndbg/strings.py", line 33, in update_length
length = int(message)
ValueError: invalid literal for int() with base 10: 'elements'
Traceback (most recent call last):
File "/home/parallels/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/parallels/pwndbg/pwndbg/strings.py", line 33, in update_length
length = int(message)
ValueError: invalid literal for int() with base 10: 'elements'
Traceback (most recent call last):
File "/home/parallels/pwndbg/pwndbg/prompt.py", line 30, in prompt_hook
pwndbg.events.after_reload(start=cur is None)
File "/home/parallels/pwndbg/pwndbg/events.py", line 216, in after_reload
f()
File "/home/parallels/pwndbg/pwndbg/events.py", line 169, in caller
raise e
File "/home/parallels/pwndbg/pwndbg/events.py", line 165, in caller
func()
File "/home/parallels/pwndbg/pwndbg/strings.py", line 33, in update_length
length = int(message)
ValueError: invalid literal for int() with base 10: 'elements'
Steps to reproduce
before running binary, enable trace-commands
gdb <binary>
set trace-commands on
r
My setup
+version Gdb: 9.2 Python: 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0] Pwndbg: 1.1.0 build: 44286af Capstone: 4.0.1024 Unicorn: 1.0.3
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Exploiting with pwndbg - Solving PlaidCTF 2016 SmartStove
One of the tools I've been hearing good things about is pwndbg, an open source plugin for GDB which aims to help with...
Read more >2020q2.txt - sourceware.org
I had hoped that "set debug timestamp 1" woudl help, but this appears to maybe be broken and/or not interact properly with CU...
Read more >Tut02: Pwndbg, Ghidra, Shellcode - CS6265
Let's test pwndbg with a tutorial binary, tut02-shellcode/target . ... you will be shown with multiple subviews of the program enabled by Ghidra....
Read more >Issues-pwndbg/pwndbg - PythonTechWorld - Python 博客
Exploit Development and Reverse Engineering with GDB Made Easy. ... Description pwndbg breaks with trace-commands enabled, I have a use case where I...
Read more >GDB and PWNDBG Cheat Sheet (DRAFT) by cactuarnation
A cheatsheet for debugging 64-bit binaries with GDB and PWNDBG. ... GDB and PWNDBG Cheat Sheet (DRAFT) by cactuarnation ... Enable breakpoint 2....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So i dug into the error message and hack-fixed it locally which might work fine for me, in strings.py
adding the try/except there just forces the length to 0 if there’s any kind of failure. obviously not a good production fix but i think i can at least make forward progress and haven’t seen any bad functionality yet from this
I think default gdb logging can do that, just not the commands that were input which was all I really needed