public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Patrick Monnerat <patrick@monnerat.net>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Replace deprecated_target_wait_hook by an observer
Date: Mon, 23 Aug 2021 19:36:47 +0200	[thread overview]
Message-ID: <934649d9-1f4a-0b3c-a6de-5641c49bb0c6@monnerat.net> (raw)
In-Reply-To: <a6813d36-e495-a810-e545-8ff8a4774a08@polymtl.ca>


On 8/23/21 6:26 PM, Simon Marchi wrote:
> Can you show to the
> corresponding change in Insight?  I'm curious to see how Insight uses
> this.
>
Hi Simon,

Sure! Here is the important part of the Insight diff:

-----

--- a/gdbtk/generic/gdbtk-hooks.c
+++ b/gdbtk/generic/gdbtk-hooks.c

@@ -685,16 +685,19 @@ gdbtk_post_add_symbol (void)
  /* This hook function is called whenever we want to wait for the
     target.  */

-static ptid_t
-gdbtk_wait (ptid_t ptid, struct target_waitstatus *ourstatus, void 
*options)
+static void
+gdbtk_waiting_for_target (bool enter, ptid_t ptid)
  {
-  gdbtk_force_detach = 0;
-  gdbtk_start_timer ();
-  ptid = target_wait (ptid, ourstatus, *(target_wait_flags *) options);
-  gdbtk_stop_timer ();
-  gdbtk_ptid = ptid;
-
-  return ptid;
+  if (enter)
+    {
+      gdbtk_force_detach = 0;
+      gdbtk_start_timer ();
+    }
+  else
+    {
+      gdbtk_stop_timer ();
+      gdbtk_ptid = ptid;
+    }
  }

  /*
-----

For more details, see Insight commit 
https://sourceware.org/git/?p=insight.git;a=commit;h=16042bf


Patrick


  reply	other threads:[~2021-08-23 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 16:42 Patrick Monnerat
2021-08-23 16:26 ` Simon Marchi
2021-08-23 17:36   ` Patrick Monnerat [this message]
2021-08-23 17:48     ` Simon Marchi
2021-08-23 18:01       ` Patrick Monnerat
2021-08-24 16:14 ` Andrew Burgess
2021-08-25 13:30   ` Patrick Monnerat
2021-08-25 16:19     ` Andrew Burgess
2021-08-26  2:41       ` Simon Marchi
2021-08-26 10:53         ` Patrick Monnerat

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=934649d9-1f4a-0b3c-a6de-5641c49bb0c6@monnerat.net \
    --to=patrick@monnerat.net \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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).