mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-06 23:50:09 +08:00
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
This commit is contained in:
@ -2560,6 +2560,10 @@ the returned string is 'ADDRESS <SYMBOL+OFFSET>' without the quotes." },
|
||||
"current_language () -> string\n\
|
||||
Return the name of the currently selected language." },
|
||||
|
||||
{ "print_options", gdbpy_print_options, METH_NOARGS,
|
||||
"print_options () -> dict\n\
|
||||
Return the current print options." },
|
||||
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user