mirror of https://github.com/python/cpython
bpo-32962: python-gdb catchs ValueError on read_var() (GH-7692)
python-gdb now catchs ValueError on read_var(): when Python has no debug symbols for example.
This commit is contained in:
parent
4ffe9c2b25
commit
019d33b7a4
|
@ -0,0 +1,2 @@
|
|||
python-gdb now catchs ValueError on read_var(): when Python has no debug
|
||||
symbols for example.
|
|
@ -1552,15 +1552,22 @@ class Frame(object):
|
|||
# Use the prettyprinter for the func:
|
||||
func = frame.read_var(arg_name)
|
||||
return str(func)
|
||||
except ValueError:
|
||||
return ('PyCFunction invocation (unable to read %s: '
|
||||
'missing debuginfos?)' % arg_name)
|
||||
except RuntimeError:
|
||||
return 'PyCFunction invocation (unable to read %s)' % arg_name
|
||||
|
||||
if caller == 'wrapper_call':
|
||||
arg_name = 'wp'
|
||||
try:
|
||||
func = frame.read_var('wp')
|
||||
func = frame.read_var(arg_name)
|
||||
return str(func)
|
||||
except ValueError:
|
||||
return ('<wrapper_call invocation (unable to read %s: '
|
||||
'missing debuginfos?)>' % arg_name)
|
||||
except RuntimeError:
|
||||
return '<wrapper_call invocation>'
|
||||
return '<wrapper_call invocation (unable to read %s)>' % arg_name
|
||||
|
||||
# This frame isn't worth reporting:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue