From c4a3dbaf1132105586586617a59d0e7566eefd41 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 6 Jun 2022 09:54:45 -0600 Subject: Expose current 'print' settings to Python PR python/17291 asks for access to the current print options. While I think this need is largely satisfied by the existence of Value.format_string, it seemed to me that a bit more could be done. First, while Value.format_string uses the user's settings, it does not react to temporary settings such as "print/x". This patch changes this. Second, there is no good way to examine the current settings (in particular the temporary ones in effect for just a single "print"). This patch adds this as well. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17291 --- gdb/NEWS | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdb/NEWS') diff --git a/gdb/NEWS b/gdb/NEWS index 3c82d6d..85e1e10 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -149,6 +149,13 @@ GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux* ** gdb.Objfile now has an attribute named "is_file". This is True if the objfile comes from a file, and False otherwise. + ** New function gdb.print_options that returns a dictionary of the + prevailing print options, in the form accepted by + gdb.Value.format_string. + + ** gdb.Value.format_string now uses the format provided by 'print', + if it is called during a 'print' or other similar operation. + * New features in the GDB remote stub, GDBserver ** GDBserver is now supported on LoongArch GNU/Linux. -- cgit v1.1