Add 'summary' mode to Value.format_string
This adds a 'summary' mode to Value.format_string and to gdb.print_options. For the former, it lets Python code format values using this mode. For the latter, it lets a printer potentially detect if it is being called in a backtrace with 'set print frame-arguments' set to 'scalars'. I considered adding a new mode here to let a pretty-printer see whether it was being called in a 'backtrace' context at all, but I'm not sure if this is really desirable.
This commit is contained in:
parent
c4a3dbaf11
commit
72be9d6be7
6 changed files with 26 additions and 1 deletions
|
@ -753,6 +753,8 @@ gdbpy_print_options (PyObject *unused1, PyObject *unused2)
|
|||
opts.static_field_print) < 0
|
||||
|| set_boolean (result.get (), "deref_refs",
|
||||
opts.deref_ref) < 0
|
||||
|| set_boolean (result.get (), "summary",
|
||||
opts.summary) < 0
|
||||
|| set_unsigned (result.get (), "max_elements",
|
||||
opts.print_max) < 0
|
||||
|| set_unsigned (result.get (), "max_depth",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue