* [PATCH] Remove same-pc breakpoint notification for internal BPs
@ 2011-04-20 13:44 Kevin Pouget
2011-04-20 13:57 ` Kevin Pouget
2011-04-20 19:03 ` Tom Tromey
0 siblings, 2 replies; 15+ messages in thread
From: Kevin Pouget @ 2011-04-20 13:44 UTC (permalink / raw)
To: gdb-patches
Hello,
I'd like to suggest a patch which removes the message
> (gdb) break function
> Note: breakpoint -1 also set at pc 0x3cbd80e2a0.
> Breakpoint 1 at 0x3cbd80e2a0
when the user sets a breakpoint at the same PC as a _internal_ breakpoints.
Internal bps are meant to be hidden from the user, so this patch goes this way
(it might happen more often now that it's easy to create internal BPs
from the Python interface, and that's what I'm doing)
Cordially,
Kevin
(How can I run the testsuite only for gdb.base, for instance? nothing
should fail here, because the testsuite only matches "Note: breakpoint
\[0-9\]+ also set...", but I would have preferred actually testing
it!)
--
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 2352191..2208a80 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 += breakpoint_has_pc (b, pspace, pc, section)
+ && b->number >= 0;
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) && b->number >= 0)
{
others--;
printf_filtered ("%d", b->number);
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-20 13:44 [PATCH] Remove same-pc breakpoint notification for internal BPs Kevin Pouget
@ 2011-04-20 13:57 ` Kevin Pouget
2011-04-20 19:03 ` Tom Tromey
1 sibling, 0 replies; 15+ messages in thread
From: Kevin Pouget @ 2011-04-20 13:57 UTC (permalink / raw)
To: gdb-patches
... and the missing ChangeLog:
2011-04-20 Kevin Pouget <kevin.pouget@st.com>
* breakpoint.c (describe_other_breakpoints): Do not write 'duplicate'
note if the breakpoint is internal.
On Wed, Apr 20, 2011 at 9:43 AM, Kevin Pouget <kevin.pouget@gmail.com> wrote:
> Hello,
>
> I'd like to suggest a patch which removes the message
>
>> (gdb) break function
>> Note: breakpoint -1 also set at pc 0x3cbd80e2a0.
>> Breakpoint 1 at 0x3cbd80e2a0
>
> when the user sets a breakpoint at the same PC as a _internal_ breakpoints.
> Internal bps are meant to be hidden from the user, so this patch goes this way
>
> (it might happen more often now that it's easy to create internal BPs
> from the Python interface, and that's what I'm doing)
>
> Cordially,
>
> Kevin
>
> (How can I run the testsuite only for gdb.base, for instance? nothing
> should fail here, because the testsuite only matches "Note: breakpoint
> \[0-9\]+ also set...", but I would have preferred actually testing
> it!)
>
> --
>
> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 2352191..2208a80 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 += breakpoint_has_pc (b, pspace, pc, section)
> + && b->number >= 0;
> 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) && b->number >= 0)
> {
> others--;
> printf_filtered ("%d", b->number);
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-20 13:44 [PATCH] Remove same-pc breakpoint notification for internal BPs Kevin Pouget
2011-04-20 13:57 ` Kevin Pouget
@ 2011-04-20 19:03 ` Tom Tromey
2011-04-21 8:12 ` Kevin Pouget
1 sibling, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2011-04-20 19:03 UTC (permalink / raw)
To: Kevin Pouget; +Cc: gdb-patches
>>>>> "Kevin" == Kevin Pouget <kevin.pouget@gmail.com> writes:
Kevin> I'd like to suggest a patch which removes the message
>> (gdb) break function
>> Note: breakpoint -1 also set at pc 0x3cbd80e2a0.
>> Breakpoint 1 at 0x3cbd80e2a0
Kevin> when the user sets a breakpoint at the same PC as a _internal_
Kevin> breakpoints.
Seems reasonable to me.
Kevin> (How can I run the testsuite only for gdb.base, for instance? nothing
Kevin> should fail here, because the testsuite only matches "Note: breakpoint
Kevin> \[0-9\]+ also set...", but I would have preferred actually testing
Kevin> it!)
You should usually do full regression tests for a patch. That is, run
before and after, and compare.
You can run just a single directory like:
make check RUNTESTFLAGS=--directory=gdb.base
Kevin> ALL_BREAKPOINTS (b)
Kevin> - others += breakpoint_has_pc (b, pspace, pc, section);
Kevin> + others += breakpoint_has_pc (b, pspace, pc, section)
Kevin> + && b->number >= 0;
You need parens around the RHS here and more indentation on the second
line.
Tom
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-20 19:03 ` Tom Tromey
@ 2011-04-21 8:12 ` Kevin Pouget
2011-04-21 8:49 ` Pedro Alves
0 siblings, 1 reply; 15+ messages in thread
From: Kevin Pouget @ 2011-04-21 8:12 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
> You should usually do full regression tests for a patch. That is, run
> before and after, and compare.
>
> You can run just a single directory like:
>
> make check RUNTESTFLAGS=--directory=gdb.base
right, that's okay.
> Kevin> ALL_BREAKPOINTS (b)
> Kevin> - others += breakpoint_has_pc (b, pspace, pc, section);
> Kevin> + others += breakpoint_has_pc (b, pspace, pc, section)
> Kevin> + && b->number >= 0;
>
> You need parens around the RHS here and more indentation on the second
> line.
fixed
Thanks,
Kevin
(still waiting to receive the copyright papers mailed by the FSF)
--
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 2352191..be383f2 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 += (breakpoint_has_pc (b, pspace, pc, section)
+ && b->number >= 0);
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) && b->number >= 0)
{
others--;
printf_filtered ("%d", b->number);
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 8:12 ` Kevin Pouget
@ 2011-04-21 8:49 ` Pedro Alves
2011-04-21 9:25 ` Kevin Pouget
2011-04-21 14:17 ` Tom Tromey
0 siblings, 2 replies; 15+ messages in thread
From: Pedro Alves @ 2011-04-21 8:49 UTC (permalink / raw)
To: gdb-patches; +Cc: Kevin Pouget, Tom Tromey
On Thursday 21 April 2011 09:11:29, Kevin Pouget wrote:
> + && b->number >= 0);
Can you make those b->number > 0? `0' is used for
momentary breakpoints, which aren't user visible either.
(as principle, please re-paste the changelog when posting
an updated patch, so we don't have go fish which patch
goes with which changelog. It's practicaly 0 work to re-paste
it, but it's not 0 work to look for it.)
In all-stop/sync when the user has the prompt,
no momentary breakpoint will be inserted (pending bugs), but
in non-stop, it can happen:
(gdb) next& (over a function call that never returns)
...
(gdb) maint info breakpoints
Num Type Disp Enb Address What
-1 shlib events keep y 0x00007ffff7deba30 <_dl_debug_state> inf 1
breakpoint already hit 2 times
...
0 step resume keep y 0x0000000000400728 <main+164> inf 1 thread 1
stop only in thread 1
(gdb) b *0x0000000000400728
Note: breakpoint 0 (thread 1) also set at pc 0x400728.
Breakpoint 2 at 0x400728: file threads.c, line 51.
(gdb)
--
Pedro Alves
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 8:49 ` Pedro Alves
@ 2011-04-21 9:25 ` Kevin Pouget
2011-04-21 9:34 ` Kevin Pouget
2011-04-21 14:17 ` Tom Tromey
1 sibling, 1 reply; 15+ messages in thread
From: Kevin Pouget @ 2011-04-21 9:25 UTC (permalink / raw)
To: Pedro Alves, Tom Tromey; +Cc: gdb-patches
On Thu, Apr 21, 2011 at 4:49 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Thursday 21 April 2011 09:11:29, Kevin Pouget wrote:
>> + && b->number >= 0);
>
> Can you make those b->number > 0? `0' is used for
> momentary breakpoints, which aren't user visible either.
>
> (as principle, please re-paste the changelog when posting
> an updated patch, so we don't have go fish which patch
> goes with which changelog. It's practicaly 0 work to re-paste
> it, but it's not 0 work to look for it.)
sure, that's two points I was hesitating about; here is the new version:
2011-04-20 Kevin Pouget <kevin.pouget@st.com>
* breakpoint.c (describe_other_breakpoints): Do not write 'duplicate'
note if the breakpoint is internal.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 2352191..ea2f334 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 += (breakpoint_has_pc (b, pspace, pc, section)
+ && b->number > 0);
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) && b->number >= 0)
{
others--;
printf_filtered ("%d", b->number);
--
1.7.4.4
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 9:25 ` Kevin Pouget
@ 2011-04-21 9:34 ` Kevin Pouget
0 siblings, 0 replies; 15+ messages in thread
From: Kevin Pouget @ 2011-04-21 9:34 UTC (permalink / raw)
To: Pedro Alves, Tom Tromey; +Cc: gdb-patches
wait, sorry, I didn't send the updated version of the patch
2011-04-20 Kevin Pouget <kevin.pouget@st.com>
* breakpoint.c (describe_other_breakpoints): Do not write 'duplicate'
note if the breakpoint is internal.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 2352191..eeec497 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 += (breakpoint_has_pc (b, pspace, pc, section)
+ && b->number > 0);
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) && b->number > 0)
{
others--;
printf_filtered ("%d", b->number);
On Thu, Apr 21, 2011 at 5:24 AM, Kevin Pouget <kevin.pouget@gmail.com> wrote:
> On Thu, Apr 21, 2011 at 4:49 AM, Pedro Alves <pedro@codesourcery.com> wrote:
>> On Thursday 21 April 2011 09:11:29, Kevin Pouget wrote:
>>> + && b->number >= 0);
>>
>> Can you make those b->number > 0? `0' is used for
>> momentary breakpoints, which aren't user visible either.
>>
>> (as principle, please re-paste the changelog when posting
>> an updated patch, so we don't have go fish which patch
>> goes with which changelog. It's practicaly 0 work to re-paste
>> it, but it's not 0 work to look for it.)
>
> sure, that's two points I was hesitating about; here is the new version:
>
> 2011-04-20 Kevin Pouget <kevin.pouget@st.com>
> * breakpoint.c (describe_other_breakpoints): Do not write 'duplicate'
> note if the breakpoint is internal.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 8:49 ` Pedro Alves
2011-04-21 9:25 ` Kevin Pouget
@ 2011-04-21 14:17 ` Tom Tromey
2011-04-21 14:59 ` Pedro Alves
1 sibling, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2011-04-21 14:17 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Kevin Pouget
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> On Thursday 21 April 2011 09:11:29, Kevin Pouget wrote:
>> + && b->number >= 0);
Pedro> Can you make those b->number > 0? `0' is used for
Pedro> momentary breakpoints, which aren't user visible either.
I wonder if this code should be using user_breakpoint_p instead.
Tom
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 14:17 ` Tom Tromey
@ 2011-04-21 14:59 ` Pedro Alves
2011-04-21 15:06 ` Tom Tromey
0 siblings, 1 reply; 15+ messages in thread
From: Pedro Alves @ 2011-04-21 14:59 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches, Kevin Pouget
On Thursday 21 April 2011 15:17:26, Tom Tromey wrote:
> I wonder if this code should be using user_breakpoint_p instead.
I never understood why we need that function (as is implemented) though.
/* Return non-zero if B is user settable (breakpoints, watchpoints,
catchpoints, et.al.). */
static int
user_settable_breakpoint (const struct breakpoint *b)
{
return (b->type == bp_breakpoint
|| b->type == bp_catchpoint
|| b->type == bp_hardware_breakpoint
|| is_tracepoint (b)
|| is_watchpoint (b)
|| b->type == bp_gnu_ifunc_resolver);
}
/* Return true if this breakpoint was set by the user, false if it is
internal or momentary. */
int
user_breakpoint_p (struct breakpoint *b)
{
return user_settable_breakpoint (b) && b->number > 0;
}
What could be !user_settable_breakpoint whose b->number is > 0?
IOW, why isn't that just :
int
user_breakpoint_p (struct breakpoint *b)
{
return b->number > 0;
}
?
There are a bunch of places that check b->number directly.
--
Pedro Alves
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 14:59 ` Pedro Alves
@ 2011-04-21 15:06 ` Tom Tromey
2011-04-21 15:27 ` Pedro Alves
0 siblings, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2011-04-21 15:06 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Kevin Pouget
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> I never understood why we need that function (as is implemented) though.
IIRC I added it to pull common code out of a few spots, and at the same
time regularize it. I think different spots were using slightly
different checks.
I don't object to the current patch.
Pedro> What could be !user_settable_breakpoint whose b->number is > 0?
Pedro> IOW, why isn't that just :
[...]
I don't know; I think the change to introduce the function just
commonized pre-existing code.
Tom
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 15:06 ` Tom Tromey
@ 2011-04-21 15:27 ` Pedro Alves
2011-04-27 13:03 ` Kevin Pouget
0 siblings, 1 reply; 15+ messages in thread
From: Pedro Alves @ 2011-04-21 15:27 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches, Kevin Pouget
On Thursday 21 April 2011 16:05:30, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
>
> Pedro> I never understood why we need that function (as is implemented) though.
>
> IIRC I added it to pull common code out of a few spots, and at the same
> time regularize it. I think different spots were using slightly
> different checks.
>
> I don't object to the current patch.
>
> Pedro> What could be !user_settable_breakpoint whose b->number is > 0?
> Pedro> IOW, why isn't that just :
> [...]
>
> I don't know; I think the change to introduce the function just
> commonized pre-existing code.
Yeah, user_settable_p, but I'm thinking further back than that.
user_settable_breakpoint was introduced here:
<http://sourceware.org/ml/gdb-patches/2001-06/msg00321.html>
but it was a refactor. I looked at the sources of a gdb
of around that time, and internal breakpoints with negative
numbers already existed then.
I looked further back. Looking at gdb 4.6's (1992) sources, gdb
already had breakpoint types (bp_until, etc.) by then, but there's no
decrementing `internal_breakpoint_number' yet, and the code
Cagney's patch is refactoring out appears to be there already,
in a more primitive form. `internal_breakpoint_number' appears to
have been added circa 1996 (from ChangeLog).
breakpoint_1, gdb 4.2:
/* We only print out user settable breakpoints unless the allflag is set. */
if (!allflag
&& b->type != bp_breakpoint
&& b->type != bp_watchpoint)
continue;
It looks like this grew as breakpoint types were added, but when
`internal_breakpoint_number' was added, it was kept.
--
Pedro Alves
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-21 15:27 ` Pedro Alves
@ 2011-04-27 13:03 ` Kevin Pouget
2011-08-31 13:18 ` Kevin Pouget
0 siblings, 1 reply; 15+ messages in thread
From: Kevin Pouget @ 2011-04-27 13:03 UTC (permalink / raw)
To: Pedro Alves; +Cc: Tom Tromey, gdb-patches
Hello,
here is an updated version of the patch, which uses `user_breakpoint_p'
thanks,
Kevin (still waiting for copyright papers)
--
2011-04-27 Kevin Pouget <kevin.pouget@st.com>
* breakpoint.c (describe_other_breakpoints): Do not write 'duplicate'
note if the breakpoint is internal.
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 += (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))
{
others--;
printf_filtered ("%d", b->number);
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-04-27 13:03 ` Kevin Pouget
@ 2011-08-31 13:18 ` Kevin Pouget
2011-09-05 14:43 ` Pedro Alves
0 siblings, 1 reply; 15+ messages in thread
From: Kevin Pouget @ 2011-08-31 13:18 UTC (permalink / raw)
To: Pedro Alves, Tom Tromey; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
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
Thanks,
Kevin
2011-08-31 Kevin Pouget <kevin.pouget@st.com>
* breakpoint.c (describe_other_breakpoints): Do not write 'duplicate'
note if the breakpoint is internal.
[-- Attachment #2: 0001-Remove-same-pc-breakpoint-notification-for-internal-.patch --]
[-- Type: text/x-patch, Size: 1467 bytes --]
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 += (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))
{
others--;
printf_filtered ("%d", b->number);
--
1.7.6
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-08-31 13:18 ` Kevin Pouget
@ 2011-09-05 14:43 ` Pedro Alves
2011-09-15 12:31 ` Kevin Pouget
0 siblings, 1 reply; 15+ messages in thread
From: Pedro Alves @ 2011-09-05 14:43 UTC (permalink / raw)
To: Kevin Pouget; +Cc: Tom Tromey, gdb-patches
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
2011-09-05 14:43 ` Pedro Alves
@ 2011-09-15 12:31 ` Kevin Pouget
0 siblings, 0 replies; 15+ messages in thread
From: Kevin Pouget @ 2011-09-15 12:31 UTC (permalink / raw)
To: Pedro Alves; +Cc: Tom Tromey, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]
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
[-- Attachment #2: 0001-Remove-same-pc-breakpoint-notification-for-internal-.patch --]
[-- Type: text/x-patch, Size: 1467 bytes --]
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
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-09-15 12:20 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20 13:44 [PATCH] Remove same-pc breakpoint notification for internal BPs Kevin Pouget
2011-04-20 13:57 ` Kevin Pouget
2011-04-20 19:03 ` Tom Tromey
2011-04-21 8:12 ` Kevin Pouget
2011-04-21 8:49 ` Pedro Alves
2011-04-21 9:25 ` Kevin Pouget
2011-04-21 9:34 ` Kevin Pouget
2011-04-21 14:17 ` Tom Tromey
2011-04-21 14:59 ` Pedro Alves
2011-04-21 15:06 ` Tom Tromey
2011-04-21 15:27 ` Pedro Alves
2011-04-27 13:03 ` Kevin Pouget
2011-08-31 13:18 ` Kevin Pouget
2011-09-05 14:43 ` Pedro Alves
2011-09-15 12:31 ` Kevin Pouget
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox