peadar / pstack

Print stack traces from running processes, or core files. Supports aarch64, x86_64, and i386
BSD 2-Clause "Simplified" License
134 stars 34 forks source link

ProcMgr Prep #16

Closed nskobelevs closed 3 years ago

nskobelevs commented 3 years ago

Arguments Implement argument printing for Python processes using the -a flag Supports *varargs, keyword-only arguments and **kwargs -a no longer prints any locals.

Before

Screenshot 2021-05-24 at 10 01 12

After

Screenshot 2021-05-24 at 10 00 36

Locals Locals are now printed with the -l flag

Python 3 Source CMake will now auto search /usr/src/debug/ for the Python 3 source if one is not specified.

Misc Added -r to specify max recursion depth for printing locals. Change -p to print the C stack trace if the process isn't a Python process

nskobelevs commented 3 years ago

Added the -A and reverted -p to current behaviour. -p takes precedence so -pA is equivalent to -p

Also quick bug fix to handle null for Reader::readString.

Bug:

Screenshot 2021-05-25 at 13 57 54

run_mod has a string for second argument and in this instance the argument was NULL so it tried reading the string at 0x0