Skip to content

Commit

Permalink
Fix arguments of newer GDB and LLDB
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyseek committed Jan 3, 2023
1 parent 3fe40e9 commit a39112f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pystack.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def make_gdb_args(pid, command):
r'call (void) PyRun_SimpleString("exec(r\"\"\"%s\"\"\")")' % command,
r'call (void) PyGILState_Release((void *) $1)',
]
arguments = [find_debugger('gdb'), '-p', str(pid), '-batch']
arguments = [find_debugger('gdb'), '-p', str(pid), '-nx', '-batch']
arguments.extend(['-iex', 'set debuginfod enabled on'])
arguments.extend("-eval-command=%s" % s for s in statements)
return arguments

Expand All @@ -58,7 +59,8 @@ def make_lldb_args(pid, command):
r'expr (void) PyGILState_Release($gil)',
]
arguments = [find_debugger('lldb'), '-p', str(pid), '--batch']
arguments.extend('--one-line=%s' % s for s in statements)
for s in statements:
arguments.extend(['--one-line', s])
return arguments


Expand Down

0 comments on commit a39112f

Please sign in to comment.