From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 4/4] gdb: make record-full target clear its async event handler in wait
Date: Mon, 30 Nov 2020 11:52:51 -0500 [thread overview]
Message-ID: <20201130165251.830482-5-simon.marchi@efficios.com> (raw)
In-Reply-To: <20201130165251.830482-1-simon.marchi@efficios.com>
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
next prev parent reply other threads:[~2020-11-30 16:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 16:52 [PATCH 0/4] Clear target async event handlers in wait method Simon Marchi
2020-11-30 16:52 ` [PATCH 1/4] gdb: make async event handlers clear themselves Simon Marchi
2020-12-24 17:26 ` Andrew Burgess
2021-02-04 17:42 ` Pedro Alves
2021-02-04 18:15 ` Simon Marchi
2020-11-30 16:52 ` [PATCH 2/4] gdb: make remote target clear its async event handler in wait Simon Marchi
2020-12-24 17:23 ` Andrew Burgess
2020-12-24 17:44 ` Simon Marchi
2021-02-04 18:00 ` Pedro Alves
2021-02-04 18:34 ` Simon Marchi
2020-11-30 16:52 ` [PATCH 3/4] gdb: make record-btrace " Simon Marchi
2021-01-06 9:50 ` Andrew Burgess
2020-11-30 16:52 ` Simon Marchi [this message]
2021-01-06 9:51 ` [PATCH 4/4] gdb: make record-full " Andrew Burgess
2020-12-23 21:31 ` [PATCH 0/4] Clear target async event handlers in wait method Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201130165251.830482-5-simon.marchi@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).