[0/4] Improvements to observer debug output

Message ID 20210424021006.22779-1-simon.marchi@polymtl.ca
Headers show
Series
  • Improvements to observer debug output
Related show

Message

Simon Marchi via Gdb-patches April 24, 2021, 2:10 a.m.
This is a small series that improves the observer debug output ("set
debug observer").  This is done in preparation of this patchset by
Michael Weghorn:

    https://sourceware.org/pipermail/gdb-patches/2021-April/178069.html

While working on this, I thought that it would be quite nice to be able
to see each observer being called, that could make some observer
ordering problems more obvious.

Simon Marchi (4):
  gdbsupport: introduce struct observer
  gdbsupport, gdb: give names to observers
  gdbsupport: allow passing format string to scoped_debug_start_end
  gdbsupport: add observer_debug_printf,
    OBSERVER_SCOPED_DEBUG_ENTER_EXIT

 gdb/ada-lang.c                       |  6 +--
 gdb/ada-tasks.c                      |  6 ++-
 gdb/agent.c                          |  3 +-
 gdb/aix-thread.c                     |  5 ++-
 gdb/annotate.c                       |  8 ++--
 gdb/arm-tdep.c                       |  2 +-
 gdb/auto-load.c                      |  5 ++-
 gdb/auxv.c                           |  6 +--
 gdb/break-catch-syscall.c            |  3 +-
 gdb/breakpoint.c                     | 15 ++++---
 gdb/bsd-uthread.c                    |  9 ++--
 gdb/cli/cli-interp.c                 | 20 +++++----
 gdb/dummy-frame.c                    |  2 +-
 gdb/extension.c                      |  2 +-
 gdb/frame.c                          |  3 +-
 gdb/guile/scm-breakpoint.c           |  6 ++-
 gdb/inflow.c                         |  2 +-
 gdb/infrun.c                         | 12 ++---
 gdb/jit.c                            |  8 ++--
 gdb/linux-tdep.c                     |  9 ++--
 gdb/linux-thread-db.c                |  5 ++-
 gdb/m68k-linux-tdep.c                |  3 +-
 gdb/mi/mi-cmd-break.c                |  3 +-
 gdb/mi/mi-interp.c                   | 63 +++++++++++++++------------
 gdb/printcmd.c                       |  3 +-
 gdb/python/py-breakpoint.c           |  9 ++--
 gdb/python/py-finishbreakpoint.c     |  6 ++-
 gdb/python/py-inferior.c             | 29 ++++++++-----
 gdb/python/py-unwind.c               |  3 +-
 gdb/ravenscar-thread.c               |  3 +-
 gdb/record-btrace.c                  |  3 +-
 gdb/regcache.c                       |  6 ++-
 gdb/remote.c                         |  2 +-
 gdb/sol-thread.c                     |  2 +-
 gdb/solib-aix.c                      |  3 +-
 gdb/solib-svr4.c                     |  3 +-
 gdb/solib.c                          |  5 ++-
 gdb/symfile-mem.c                    |  2 +-
 gdb/symfile.c                        |  2 +-
 gdb/symtab.c                         |  7 +--
 gdb/tui/tui-hooks.c                  |  4 +-
 gdb/tui/tui-interp.c                 | 20 +++++----
 gdb/tui/tui-win.c                    |  4 +-
 gdb/tui/tui-winsource.c              |  2 +-
 gdb/unittests/observable-selftests.c | 14 +++---
 gdbsupport/common-debug.h            | 65 +++++++++++++++++++++++-----
 gdbsupport/observable.h              | 59 +++++++++++++++++++------
 47 files changed, 296 insertions(+), 166 deletions(-)

-- 
2.30.1

Comments

Tom Tromey April 24, 2021, 9:19 p.m. | #1
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:


Simon> This is a small series that improves the observer debug output ("set
Simon> debug observer").  This is done in preparation of this patchset by
Simon> Michael Weghorn:

Simon>     https://sourceware.org/pipermail/gdb-patches/2021-April/178069.html

Simon> While working on this, I thought that it would be quite nice to be able
Simon> to see each observer being called, that could make some observer
Simon> ordering problems more obvious.

I sent a couple of nits, but otherwise this looks good to me.
Thank you.

Tom
Simon Marchi April 24, 2021, 11:34 p.m. | #2
On 2021-04-24 5:19 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

> 

> Simon> This is a small series that improves the observer debug output ("set

> Simon> debug observer").  This is done in preparation of this patchset by

> Simon> Michael Weghorn:

> 

> Simon>     https://sourceware.org/pipermail/gdb-patches/2021-April/178069.html

> 

> Simon> While working on this, I thought that it would be quite nice to be able

> Simon> to see each observer being called, that could make some observer

> Simon> ordering problems more obvious.

> 

> I sent a couple of nits, but otherwise this looks good to me.

> Thank you.

> 

> Tom

> 


Thanks, pushed with those fixed!

Simon