[PATCHv3 0/2] Disassembler Output Styling

Andrew Burgess aburgess@redhat.com
Mon Dec 13 14:12:37 GMT 2021


In this update, the biggest change, is that the controlling setting is
now 'set/show style disassembler enabled', that is I've added
'enabled' to the setting name.

My reason for this is that, in the future, I might want to add
additional disassembler styles, like:

  set style disassembler register ....
  set style disassembler mnemonic ....

And the new setting name leaves this possibility open, while the old
setting made this harder.

This version also includes an improved test, minor updates to the docs
to match the above change, and a rebase to current master.

Feedback welcome,

Thanks,
Andrew


---

Since v2:

  - Rebased onto current master,

  - Changed the name of the setting to 'set/show style disassembler
    enabled',

  - Updated the test to cover toggling this setting,

  - Updated the NEWS and docs to match the setting change,

  - Updated the commit message on patch #1, which I forgot to do in
    v2.

Since v1:

 - I pushed patches #1 and #2,

 - I rebased onto current master, minor conflicts resolved, no other
   changes.

 - New patch #2 (old patch #4) has been reviewed, so just patch #1
   needs review.


---

Andrew Burgess (2):
  gdb: use python to colorize disassembler output
  gdb/python: move styling support to gdb.styling

 gdb/NEWS                         |  6 +++
 gdb/cli/cli-style.c              | 44 +++++++++++++++++
 gdb/cli/cli-style.h              |  3 ++
 gdb/data-directory/Makefile.in   |  1 +
 gdb/disasm.c                     | 58 +++++++++++++++++++++-
 gdb/disasm.h                     | 25 ++++++++++
 gdb/doc/gdb.texinfo              | 15 ++++++
 gdb/extension-priv.h             |  6 +++
 gdb/extension.c                  | 20 ++++++++
 gdb/extension.h                  |  8 +++
 gdb/python/lib/gdb/__init__.py   | 18 -------
 gdb/python/lib/gdb/styling.py    | 48 ++++++++++++++++++
 gdb/python/python.c              | 85 ++++++++++++++++++++++++++++++--
 gdb/testsuite/gdb.base/style.exp | 82 +++++++++++++++++++++++++++++-
 14 files changed, 395 insertions(+), 24 deletions(-)
 create mode 100644 gdb/python/lib/gdb/styling.py

-- 
2.25.4



More information about the Gdb-patches mailing list