binutils-gdb/gdb/python
Andrew Burgess 0642912e83 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.
2022-02-07 16:52:47 +00:00
..
lib/gdb gdb: fix formatting for help set/show extended-prompt 2022-02-02 16:33:05 +00:00
py-all-events.def Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-arch.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-auto-load.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-block.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-bpevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-breakpoint.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-cmd.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-connection.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-continueevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-event-types.def Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-event.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-event.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-events.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-evtregistry.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-evts.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-exitedevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-finishbreakpoint.c gdb: remove SYMBOL_TYPE macro 2022-02-06 16:03:47 -05:00
py-frame.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-framefilter.c gdb: remove SYMBOL_IS_ARGUMENT macro 2022-02-06 16:03:46 -05:00
py-function.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-gdb-readline.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-inferior.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-infevents.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-infthread.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-instruction.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-instruction.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-lazy-string.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-linetable.c gdb: remove SYMTAB_LINETABLE macro, add getter/setter 2022-02-06 15:48:19 -05:00
py-membuf.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-newobjfileevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-objfile.c Remove host_hex_value 2022-02-04 07:37:22 -07:00
py-param.c gdb/python: improve the auto help text for gdb.Parameter 2022-01-26 22:00:20 +00:00
py-prettyprint.c Always call the wrap_here method 2022-01-26 15:19:13 -07:00
py-progspace.c gdb: remove COMPUNIT_OBJFILE macro 2022-02-06 15:48:18 -05:00
py-record-btrace.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-record-btrace.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-record-full.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-record-full.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-record.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-record.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-ref.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-registers.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-signalevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-stopevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-stopevent.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-symbol.c gdb: remove SYMBOL_LINE macro 2022-02-06 16:03:47 -05:00
py-symtab.c gdb: remove SYMTAB_OBJFILE macro 2022-02-06 16:03:46 -05:00
py-threadevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-tui.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-type.c gdb: remove SYMBOL_TYPE macro 2022-02-06 16:03:47 -05:00
py-unwind.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-utils.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-value.c gdb/python: allow Value.format_string to return styled output 2022-02-07 16:52:47 +00:00
py-varobj.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-xmethods.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
python-config.py gdb: re-format Python files using black 21.4b0 2021-05-07 10:56:20 -04:00
python-internal.h gdb/python: add gdb.history_count function 2022-01-26 21:58:12 +00:00
python.c gdb/python: handle non utf-8 characters when source highlighting 2022-01-26 23:12:52 +00:00
python.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00