This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
- From: Kevin Pouget <kevin dot pouget at gmail dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Thu, 15 Sep 2011 14:19:33 +0200
- Subject: Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
- References: <BANLkTim4J5Nnt_bKQvcvHh+ve+jtQdkw8w@mail.gmail.com> <BANLkTikdW7-L_WaLebZuVWRouMRXwXeMNg@mail.gmail.com> <CAPftXULPpkOqU_zBiRMxJDdpOWWpKxdvAFdi0NBYgn1Q7FnKmg@mail.gmail.com> <201109051256.24817.pedro@codesourcery.com>
On Mon, Sep 5, 2011 at 1:56 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Wednesday 31 August 2011 14:18:00, Kevin Pouget wrote:
>> On Wed, Apr 27, 2011 at 3:02 PM, Kevin Pouget <kevin.pouget@gmail.com> wrote:
>> > Hello,
>> >
>> > here is an updated version of the patch, which uses `user_breakpoint_p'
>> >
>> >
>> > thanks,
>> >
>> > Kevin (still waiting for copyright papers)
>>
>>
>> Hello,
>>
>> this patch was not explicitly approved when I first submitted it, ?but
>> all the concerns were addressed; please let me not if it looks good to
>> you
>
> This is okay, thanks.
>
> On Wednesday 31 August 2011 14:18:00, Kevin Pouget wrote:
>> ? ?ALL_BREAKPOINTS (b)
>> - ? ?others += breakpoint_has_pc (b, pspace, pc, section);
>> + ? ?others += (breakpoint_has_pc (b, pspace, pc, section)
>> + ? ? ? ? ? ? ? && user_breakpoint_p (b));
>> ? ?if (others > 0)
>> ? ? ?{
>> ? ? ? ?if (others == 1)
>> @@ -5418,7 +5419,7 @@ describe_other_breakpoints (struct gdbarch *gdbarch,
>> ? ? ? ?else /* if (others == ???) */
>> ? ? ? ? printf_filtered (_("Note: breakpoints "));
>> ? ? ? ?ALL_BREAKPOINTS (b)
>> - ? ? ? if (breakpoint_has_pc (b, pspace, pc, section))
>> + ? ? ? if (breakpoint_has_pc (b, pspace, pc, section) && user_breakpoint_p (b))
>
>
> I'd suggest flipping the tests order so the cheaper test is done
> first, like:
>
>> + ? ?others += (user_breakpoint_p (b)
>> + ? ? ? ? ? ? ? && breakpoint_has_pc (b, pspace, pc, section));
>
> and
>
>> + ? ? ? if (user_breakpoint_p (b) && breakpoint_has_pc (b, pspace, pc, section))
>
> Okay with or without that change.
>
> --
> Pedro Alves
>
commited with the change you suggested
Thanks,
Kevin
From 421d1625f761c4987f8315a272d3bbfbfe14a52e Mon Sep 17 00:00:00 2001
From: Kevin Pouget <kevin.pouget@st.com>
Date: Wed, 20 Apr 2011 15:36:51 -0400
Subject: [PATCH] Remove same-pc breakpoint notification for internal BPs
---
gdb/breakpoint.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 2352191..3474caf 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -5397,7 +5397,7 @@ breakpoint_has_pc (struct breakpoint *b,
return 0;
}
-/* Print a message describing any breakpoints set at PC. This
+/* Print a message describing any user-breakpoints set at PC. This
concerns with logical breakpoints, so we match program spaces, not
address spaces. */
@@ -5410,7 +5410,8 @@ describe_other_breakpoints (struct gdbarch *gdbarch,
struct breakpoint *b;
ALL_BREAKPOINTS (b)
- others += breakpoint_has_pc (b, pspace, pc, section);
+ others += (user_breakpoint_p (b)
+ && breakpoint_has_pc (b, pspace, pc, section));
if (others > 0)
{
if (others == 1)
@@ -5418,7 +5419,7 @@ describe_other_breakpoints (struct gdbarch *gdbarch,
else /* if (others == ???) */
printf_filtered (_("Note: breakpoints "));
ALL_BREAKPOINTS (b)
- if (breakpoint_has_pc (b, pspace, pc, section))
+ if (user_breakpoint_p (b) && breakpoint_has_pc (b, pspace, pc, section))
{
others--;
printf_filtered ("%d", b->number);
--
1.7.6