diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-12-04 16:43:51 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-12-04 16:43:52 -0500 |
commit | 42a4fec513f11d4ff346f62fc0df3731ce9f7d59 (patch) | |
tree | 9f7c10404b81c3a7186f3b1552e7114af4922c1d /gdb/infrun.c | |
parent | aafdfb4eddc3c58be24fe50a1e6543a4b9c8cbac (diff) | |
download | gdb-42a4fec513f11d4ff346f62fc0df3731ce9f7d59.zip gdb-42a4fec513f11d4ff346f62fc0df3731ce9f7d59.tar.gz gdb-42a4fec513f11d4ff346f62fc0df3731ce9f7d59.tar.bz2 |
gdb: add inferior_execd observable
I want to add another action (clearing displaced stepping state) that
happens when an inferior execs. I think it would be cleaner to have an
observer for this event, rather than have infrun know about each other
sub-component.
Replace the calls to solib_create_inferior_hook and
jit_inferior_created_hook in follow_exec by observers.
gdb/ChangeLog:
* observable.h (inferior_execd): Declare new observable.
* observable.c (inferior_execd): Declare new observable.
* infrun.c (follow_exec): Notify inferior_execd observer.
* jit.c (jit_inferior_created_hook): Make static.
(_initialize_jit): Register inferior_execd observer.
* jit.h (jit_inferior_created_hook): Remove declaration.
* solib.c (_initialize_solib): Register inferior_execd observer.
Change-Id: I000cce00094e23baa67df693d912646b6ae38e44
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 2e5e837..473a0fb 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1222,9 +1222,7 @@ follow_exec (ptid_t ptid, const char *exec_file_target) registers. */ target_find_description (); - solib_create_inferior_hook (0); - - jit_inferior_created_hook (inf); + gdb::observers::inferior_execd.notify (inf); breakpoint_re_set (); |