public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Markus Metzger <markus.t.metzger@intel.com>
To: gdb-patches@sourceware.org
Cc: pedro@palves.net
Subject: [PATCH v2 3/6] gdb, btrace: remove record_btrace_target::supports_*()
Date: Thu, 11 Apr 2024 05:26:01 +0000	[thread overview]
Message-ID: <20240411052604.87893-4-markus.t.metzger@intel.com> (raw)
In-Reply-To: <20240411052604.87893-1-markus.t.metzger@intel.com>

Let's not introduce support for breakpoint types the target beneath does
not support, even though we could while replaying.

Otherwise, users may set breakpoints during replay that then couldn't be
inserted into the target when switching back to recording.
---
 gdb/record-btrace.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 1d946f9d3f2..66f283b8680 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -130,10 +130,7 @@ class record_btrace_target final : public target_ops
   bool can_execute_reverse () override;
 
   bool stopped_by_sw_breakpoint () override;
-  bool supports_stopped_by_sw_breakpoint () override;
-
   bool stopped_by_hw_breakpoint () override;
-  bool supports_stopped_by_hw_breakpoint () override;
 
   enum exec_direction_kind execution_direction () override;
   void prepare_to_generate_core () override;
@@ -2706,18 +2703,6 @@ record_btrace_target::stopped_by_sw_breakpoint ()
   return this->beneath ()->stopped_by_sw_breakpoint ();
 }
 
-/* The supports_stopped_by_sw_breakpoint method of target
-   record-btrace.  */
-
-bool
-record_btrace_target::supports_stopped_by_sw_breakpoint ()
-{
-  if (record_is_replaying (minus_one_ptid))
-    return true;
-
-  return this->beneath ()->supports_stopped_by_sw_breakpoint ();
-}
-
 /* The stopped_by_sw_breakpoint method of target record-btrace.  */
 
 bool
@@ -2733,18 +2718,6 @@ record_btrace_target::stopped_by_hw_breakpoint ()
   return this->beneath ()->stopped_by_hw_breakpoint ();
 }
 
-/* The supports_stopped_by_hw_breakpoint method of target
-   record-btrace.  */
-
-bool
-record_btrace_target::supports_stopped_by_hw_breakpoint ()
-{
-  if (record_is_replaying (minus_one_ptid))
-    return true;
-
-  return this->beneath ()->supports_stopped_by_hw_breakpoint ();
-}
-
 /* The update_thread_list method of target record-btrace.  */
 
 void
-- 
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


  parent reply	other threads:[~2024-04-11  5:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11  5:25 [PATCH v2 0/6] fix PR gdb/19340 Markus Metzger
2024-04-11  5:25 ` [PATCH v2 1/6] gdb, btrace: fix pr19340 Markus Metzger
2024-04-11  5:26 ` [PATCH v2 2/6] gdb, btrace: simplify gdb.btrace/multi-inferior.exp Markus Metzger
2024-04-11  5:26 ` Markus Metzger [this message]
2024-04-11  5:26 ` [PATCH v2 4/6] gdb, btrace: set wait status to ignore if nothing is moving Markus Metzger
2024-04-11  5:26 ` [PATCH v2 5/6] gdb, infrun: fix silent inferior switch in do_target_wait() Markus Metzger
2024-04-11  5:26 ` [PATCH v2 6/6] gdb, btrace, infrun: per-inferior run-control Markus Metzger
2024-05-03  5:25 ` [PING] [PATCH v2 0/6] fix PR gdb/19340 Metzger, Markus T

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=20240411052604.87893-4-markus.t.metzger@intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /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).