[0/8] Split new_objfile observable

Message ID 20231004022305.298534-1-simon.marchi@polymtl.ca
Headers
Series Split new_objfile observable |

Message

Simon Marchi Oct. 4, 2023, 2:20 a.m. UTC
  The goal of this series is to split the new_objfile observable in two.
It currently serves two purposes:

 - if called with a non-nullptr objfile, it means a new objfile was
   added to the current program space
 - if called with a nullptr objfile, it means all objfiles were removed
   from the current program space

Introduce a new "all_objfiles_removed" observable for the second
purpose.

Simon Marchi (8):
  gdb: add program_space parameter to ada_clear_symbol_cache
  gdb: add program_space parameters to some functions in symtab.c
  gdb: add program_space parameter to emit_clear_objfiles_event
  gdb: use objfile->pspace in auto-load.c
  gdb: add program_space parameters to some auto-load functions
  gdb: add all_objfiles_removed observer
  gdb: remove unnecessary nullptr check in free_objfile observers
  gdb: use objfile->pspace in free_objfile observers

 gdb/ada-lang.c                  | 10 +++---
 gdb/ada-tasks.c                 | 41 +++++++++++-------------
 gdb/agent.c                     |  2 +-
 gdb/aix-thread.c                |  7 ++---
 gdb/arm-tdep.c                  |  2 +-
 gdb/auto-load.c                 | 56 +++++++++++----------------------
 gdb/auto-load.h                 |  5 +--
 gdb/auxv.c                      | 13 ++++----
 gdb/breakpoint.c                |  3 --
 gdb/guile/scm-auto-load.c       |  3 +-
 gdb/linux-thread-db.c           |  5 ++-
 gdb/observable.c                |  1 +
 gdb/observable.h                |  7 +++--
 gdb/printcmd.c                  |  7 +----
 gdb/python/py-auto-load.c       |  3 +-
 gdb/python/py-event.h           |  2 +-
 gdb/python/py-inferior.c        | 30 ++++++++++--------
 gdb/python/py-newobjfileevent.c |  8 ++---
 gdb/remote.c                    | 18 ++++++++---
 gdb/sol-thread.c                |  3 +-
 gdb/solib.c                     |  2 +-
 gdb/symfile.c                   |  5 ++-
 gdb/symtab.c                    | 56 +++++++++++++++++++--------------
 gdb/tui/tui-hooks.c             | 13 ++++++--
 24 files changed, 153 insertions(+), 149 deletions(-)


base-commit: 1181bcd0d2572aee2c0947040e56bc1f9af634e3
  

Comments

Tom Tromey Oct. 5, 2023, 4:36 p.m. UTC | #1
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> The goal of this series is to split the new_objfile observable in two.
Simon> It currently serves two purposes:

Simon>  - if called with a non-nullptr objfile, it means a new objfile was
Simon>    added to the current program space
Simon>  - if called with a nullptr objfile, it means all objfiles were removed
Simon>    from the current program space

Simon> Introduce a new "all_objfiles_removed" observable for the second
Simon> purpose.

This all seems fine to me.  Thank you.
Approved-By: Tom Tromey <tom@tromey.com>

Tom
  
Simon Marchi Oct. 5, 2023, 5:23 p.m. UTC | #2
On 10/5/23 12:36, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> The goal of this series is to split the new_objfile observable in two.
> Simon> It currently serves two purposes:
> 
> Simon>  - if called with a non-nullptr objfile, it means a new objfile was
> Simon>    added to the current program space
> Simon>  - if called with a nullptr objfile, it means all objfiles were removed
> Simon>    from the current program space
> 
> Simon> Introduce a new "all_objfiles_removed" observable for the second
> Simon> purpose.
> 
> This all seems fine to me.  Thank you.
> Approved-By: Tom Tromey <tom@tromey.com>
> 
> Tom

Thanks, pushed.

Simon