]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/infrun.c
Replace deprecated_target_wait_hook by observers
authorPatrick Monnerat <patrick@monnerat.net>
Sat, 12 Mar 2022 12:41:47 +0000 (13:41 +0100)
committerTom Tromey <tromey@adacore.com>
Mon, 14 Mar 2022 13:49:18 +0000 (07:49 -0600)
commitfb85cece22a2cb3c0185e61cfc1323e9c5a6466e
tree24e2ccdafd6784676763833be4b45d9614fa0652
parent79a0742380b5304c734ce6f4359d437325cc7121
Replace deprecated_target_wait_hook by observers

Commit b60cea7 (Make target_wait options use enum flags) broke
deprecated_target_wait_hook usage: there's a commit comment telling
this hook has not been converted.

Rather than trying to mend it, this patch replaces the hook by two
target_wait observers:

target_pre_wait (ptid_t ptid)
target_post_wait (ptid_t event_ptid)

Upon target_wait entry, target_pre_wait is notified with the ptid
passed to target_wait. Upon exit, target_post_wait is notified with
the event ptid returned by target_wait. Should an exception occur,
event_ptid is null_ptid.

This change benefits to Insight (out-of-tree): there's no real use of the
late hook in gdb itself.
gdb/infrun.c
gdb/infrun.h
gdb/interps.c
gdb/observable.c
gdb/observable.h
gdb/target.c
gdb/top.c