** gdb.Value.format_string now uses the format provided by 'print',
if it is called during a 'print' or other similar operation.
+ ** gdb.Value.format_string now accepts the 'summary' keyword. This
+ can be used to request a shorter representation of a value, the
+ way that 'set print frame-arguments scalars' does.
+
* New features in the GDB remote stub, GDBserver
** GDBserver is now supported on LoongArch GNU/Linux.
every output string will contain escape sequences.
When @code{False}, which is the default, no output styling is applied.
+
+@item summary
+@code{True} when just a summary should be printed. In this mode,
+scalar values are printed in their entirety, but aggregates such as
+structures or unions are omitted. This mode is used by @code{set
+print frame-arguments scalars} (@pxref{Print Settings}).
@end table
@end defun
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",
"address", /* See set print address on|off. */
"styling", /* Should we apply styling. */
"nibbles", /* See set print nibbles on|off. */
+ "summary", /* Summary mode for non-scalars. */
/* C++ options. */
"deref_refs", /* No corresponding setting. */
"actual_objects", /* See set print object on|off. */
PyObject *deref_refs_obj = NULL;
PyObject *actual_objects_obj = NULL;
PyObject *static_members_obj = NULL;
+ PyObject *summary_obj = NULL;
char *format = NULL;
if (!gdb_PyArg_ParseTupleAndKeywords (args,
kw,
- "|O!O!O!O!O!O!O!O!O!O!O!O!IIIs",
+ "|O!O!O!O!O!O!O!O!O!O!O!O!O!IIIs",
keywords,
&PyBool_Type, &raw_obj,
&PyBool_Type, &pretty_arrays_obj,
&PyBool_Type, &address_obj,
&PyBool_Type, &styling_obj,
&PyBool_Type, &nibbles_obj,
+ &PyBool_Type, &summary_obj,
&PyBool_Type, &deref_refs_obj,
&PyBool_Type, &actual_objects_obj,
&PyBool_Type, &static_members_obj,
return NULL;
if (!copy_py_bool_obj (&opts.static_field_print, static_members_obj))
return NULL;
+ if (!copy_py_bool_obj (&opts.summary, summary_obj))
+ return nullptr;
/* Numeric arguments for which 0 means unlimited (which we represent as
UINT_MAX). Note that the max-depth numeric argument uses -1 as