public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
To: gdb-patches@sourceware.org
Subject: [RFC 0/3] Wait for inferior after attaching
Date: Thu, 18 Apr 2024 09:36:35 +0200	[thread overview]
Message-ID: <cover.1713423838.git.tankut.baris.aktemur@intel.com> (raw)

Hello,

The second patch of this series uses 'wait_for_inferior' to wait for
events right after attaching to a process, instead of using the main
event loop for events and the inferior continuations to finish the
inferior setup.

I explain some existing problems in Patch 2 and propose
'wait_for_inferior' as a potential solution.  I'd like to post this as
an RFC because the inferior continuations are elegant and eliminating
their use makes me think that I'm missing something.  However, it may
also be the case that since the time continuations were introduced and
used, GDB has evolved significantly and the original motivation is
perhaps no longer there.  The attach and remote-target start flows are
the only places they are used.

Regards,
Baris

Tankut Baris Aktemur (3):
  gdb: print target in print_target_wait_results
  gdb: wait for inferior after attaching instead of adding a
    continuation
  gdb: remove inferior continuations

 gdb/inf-loop.c |  5 -----
 gdb/infcmd.c   | 24 +++++++++++-------------
 gdb/inferior.c | 19 -------------------
 gdb/inferior.h | 11 -----------
 gdb/infrun.c   | 38 ++++++++++++++++++++++++--------------
 gdb/infrun.h   | 12 +++++++++++-
 gdb/remote.c   |  2 +-
 7 files changed, 47 insertions(+), 64 deletions(-)

-- 
2.34.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


             reply	other threads:[~2024-04-18  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18  7:36 Tankut Baris Aktemur [this message]
2024-04-18  7:36 ` [PATCH 1/3] gdb: print target in print_target_wait_results Tankut Baris Aktemur
2024-04-18  7:36 ` [RFC 2/3] gdb: wait for inferior after attaching instead of adding a continuation Tankut Baris Aktemur
2024-04-19 20:33   ` Tom Tromey
2024-04-22  6:48     ` Aktemur, Tankut Baris
2024-04-18  7:36 ` [RFC 3/3] gdb: remove inferior continuations Tankut Baris Aktemur

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=cover.1713423838.git.tankut.baris.aktemur@intel.com \
    --to=tankut.baris.aktemur@intel.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).