From: Michael Snyder <msnyder@redhat.com>
To: Joel Brobecker <brobecker@gnat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] GDB/624 - tbreak commands not executed when breakpoint hit
Date: Thu, 22 Aug 2002 18:37:00 -0000 [thread overview]
Message-ID: <3D659178.25167F02@redhat.com> (raw)
In-Reply-To: <20020822223142.GS25997@gnat.com>
[-- Attachment #1: Type: text/plain, Size: 599 bytes --]
Joel Brobecker wrote:
>
> Michael,
>
> > Joel, this implementation, with its use of delete_at_next_stop,
> > seems clumsy and, to be frank, scary. Instead, what if you just
> > made a temporary copy of the tbreak command-list (like you do for
> > GDB/622), then delete the breakpoint, and later execute the commands?
>
> Thanks for your review. I need a bit of time to delve into this again,
> but I'll be quite busy in the next 2 or 3 weeks. You can consider this
> patch withdrawn in the meantime.
Aww, come on. ;-)
OK, maybe it's fresher in my mind now than it is in yours.
How about this?
[-- Attachment #2: joel2.diff --]
[-- Type: text/plain, Size: 1060 bytes --]
*** breakpoint.joel1.c Thu Aug 22 17:01:02 2002
--- breakpoint.c Thu Aug 22 17:56:03 2002
*************** void
*** 6594,6604 ****
breakpoint_auto_delete (bpstat bs)
{
struct breakpoint *b, *temp;
for (; bs; bs = bs->next)
if (bs->breakpoint_at && bs->breakpoint_at->disposition == disp_del
&& bs->stop)
! delete_breakpoint (bs->breakpoint_at);
ALL_BREAKPOINTS_SAFE (b, temp)
{
--- 6594,6614 ----
breakpoint_auto_delete (bpstat bs)
{
struct breakpoint *b, *temp;
+ struct command_line *cmd;
for (; bs; bs = bs->next)
if (bs->breakpoint_at && bs->breakpoint_at->disposition == disp_del
&& bs->stop)
! {
! /* Deleting a temp breakpoint. If it has commands associated
! with it, preserve them in the in the bpstat list, so they
! can be executed by bpstat_do_actions. */
!
! cmd = copy_command_lines (bs->commands);
! make_cleanup_free_command_lines (&cmd);
! delete_breakpoint (bs->breakpoint_at);
! bs->commands = cmd;
! }
ALL_BREAKPOINTS_SAFE (b, temp)
{
next prev parent reply other threads:[~2002-08-23 1:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-31 13:14 Joel Brobecker
2002-07-31 13:16 ` Joel Brobecker
2002-08-20 6:28 ` Joel Brobecker
2002-08-22 15:10 ` Michael Snyder
2002-08-22 15:31 ` Joel Brobecker
2002-08-22 18:37 ` Michael Snyder [this message]
2002-09-27 16:10 ` Andrew Cagney
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=3D659178.25167F02@redhat.com \
--to=msnyder@redhat.com \
--cc=brobecker@gnat.com \
--cc=gdb-patches@sources.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