Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alan Hayward <Alan.Hayward@arm.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: "tromey@adacore.com" <tromey@adacore.com>, nd <nd@arm.com>,
	Alan Hayward	<Alan.Hayward@arm.com>
Subject: [PATCH] Fix Arm build error
Date: Mon, 18 Mar 2019 16:28:00 -0000	[thread overview]
Message-ID: <20190318162759.31241-1-alan.hayward@arm.com> (raw)

The following commit broke the build for Arm:
d3a70e03cf51c8fb6bc183eaff7559edffec2045
Change iterate_over_lwps to take a gdb::function_view

Correct the changes made to arm_linux_insert_hw_breakpoint1 and make
similar changes to arm_linux_remove_hw_breakpoint1.

2019-03-18  Alan Hayward  <alan.hayward@arm.com>

	* arm-linux-nat.c (arm_linux_insert_hw_breakpoint1): Fix
	variable names.
	(arm_linux_remove_hw_breakpoint1): Use a gdb::function_view.
---
 gdb/arm-linux-nat.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 8c98a7189f..11e353e61c 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -1005,8 +1005,8 @@ arm_linux_insert_hw_breakpoint1 (const struct arm_linux_hw_breakpoint* bpt,
         iterate_over_lwps (pid_ptid,
 			   [=] (struct lwp_info *info)
 			   {
-			     return update_registers_callback (info, watch,
-							       index);
+			     return update_registers_callback (info, watchpoint,
+							       i);
 			   });
         break;
       }
@@ -1024,7 +1024,6 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt,
   gdb_byte count, i;
   ptid_t pid_ptid;
   struct arm_linux_hw_breakpoint* bpts;
-  struct update_registers_data data;
 
   pid = inferior_ptid.pid ();
   pid_ptid = ptid_t (pid);
@@ -1043,10 +1042,13 @@ arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt,
   for (i = 0; i < count; ++i)
     if (arm_linux_hw_breakpoint_equal (bpt, bpts + i))
       {
-        data.watch = watchpoint;
-        data.index = i;
         bpts[i].control = arm_hwbp_control_disable (bpts[i].control);
-        iterate_over_lwps (pid_ptid, update_registers_callback, &data);
+	iterate_over_lwps (pid_ptid,
+			   [=] (struct lwp_info *info)
+			   {
+			     return update_registers_callback (info, watchpoint,
+							       i);
+			   });
         break;
       }
 
-- 
2.17.2 (Apple Git-113)


             reply	other threads:[~2019-03-18 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 16:28 Alan Hayward [this message]
2019-03-18 16:43 ` Tom Tromey

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=20190318162759.31241-1-alan.hayward@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.com \
    --cc=tromey@adacore.com \
    /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