From: Pedro Alves <pedro@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org, Kevin Pouget <kevin.pouget@gmail.com>
Subject: Re: [PATCH] Remove same-pc breakpoint notification for internal BPs
Date: Thu, 21 Apr 2011 15:27:00 -0000 [thread overview]
Message-ID: <201104211627.20994.pedro@codesourcery.com> (raw)
In-Reply-To: <m3bozzzltx.fsf@fleche.redhat.com>
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
next prev parent reply other threads:[~2011-04-21 15:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 13:44 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 [this message]
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
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=201104211627.20994.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=kevin.pouget@gmail.com \
--cc=tromey@redhat.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