diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-01-24 15:29:49 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-02-07 16:52:47 +0000 |
commit | 0642912e83168b9036d81e8a9950352d233affcb (patch) | |
tree | dedd33995145b8d2ba8e2d863ad3231a68d22907 /gdb/NEWS | |
parent | 573269a87c89ae866db556428fe9ea63d6c4db5f (diff) | |
download | gdb-0642912e83168b9036d81e8a9950352d233affcb.zip gdb-0642912e83168b9036d81e8a9950352d233affcb.tar.gz gdb-0642912e83168b9036d81e8a9950352d233affcb.tar.bz2 |
gdb/python: allow Value.format_string to return styled output
Add a new argument to the gdb.Value.format_string method, 'styling'.
This argument is False by default.
When this argument is True, then the returned string can contain output
styling escape sequences.
When this argument is False, then the returned string will not contain
any styling escape sequences.
If the returned string is going to be printed to the user, then it is
often nice to retain the GDB styling.
For the testing, we need to adjust the TERM environment variable, as
we do for all the styling tests. I'm now running all of the C tests
in gdb.python/py-format-string.exp in an environment where styling
could be generated, but only my new test should actually produce
styled output, hopefully this will catch the case where a bug might
cause format_string to always produce styled output.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -168,6 +168,13 @@ info win manager that temporarily sets the gdb parameter NAME to VALUE, then resets it when the context is exited. + ** The gdb.Value.format_string method now takes a 'styling' + argument, which is a boolean. When true, the returned string can + include escape sequences to apply styling. The styling will only + be present if styling is otherwise turned on in GDB (see 'help + set styling'). When false, which is the default if the argument + is not given, then no styling is applied to the returned string. + * New features in the GDB remote stub, GDBserver ** GDBserver is now supported on OpenRISC GNU/Linux. |