[PATCH 4/4] gdb: make record-full target clear its async event handler in wait
Simon Marchi
simon.marchi@efficios.com
Mon Nov 30 16:52:51 GMT 2020
For the same reason explained in the previous patch (which was for the
record-btrace target), move clearing of the async event handler of the
record-full target to the wait method.
I'm not sure if/where that target needs to re-set its async event
handler in the wait method. Since it only supports a single thread,
there probably can't be multiple events to report at the same time.
gdb/ChangeLog:
* record-full.c (record_full_async_inferior_event_handler):
Don't clear async event handler.
(record_full_base_target::wait): Clear async event handler at
beginning.
Change-Id: I146fbdb53d99e3a32766ac7cd337ac5ed7fd9adf
---
gdb/record-full.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 410028aed60..a7bd0bdcd62 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -904,7 +904,6 @@ static struct async_event_handler *record_full_async_inferior_event_token;
static void
record_full_async_inferior_event_handler (gdb_client_data data)
{
- clear_async_event_handler (record_full_async_inferior_event_token);
inferior_event_handler (INF_REG_EVENT);
}
@@ -1464,6 +1463,8 @@ record_full_base_target::wait (ptid_t ptid, struct target_waitstatus *status,
{
ptid_t return_ptid;
+ clear_async_event_handler (record_full_async_inferior_event_token);
+
return_ptid = record_full_wait_1 (this, ptid, status, options);
if (status->kind != TARGET_WAITKIND_IGNORE)
{
--
2.29.2
More information about the Gdb-patches
mailing list