From: Michael Snyder <msnyder@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Missing breakpoint-modify events
Date: Thu, 13 Jun 2002 22:49:00 -0000 [thread overview]
Message-ID: <3D09804B.BD4E6526@redhat.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0206132154230.19373-100000@makita.cygnus.com>
Keith Seitz wrote:
>
> Hi,
>
> When conditions, commands, and ignore counts are added to an existing
> breakpoint, gdb fails to send an event notification informing UIs of that
> the breakpoint has been modified. This patch fixes this.
Approved. Would that all patches were so easy to review. ;-)
> I've only added event notifications. Are the hooks still needed? (I'm
> operating under the assumption that they are all deprecated and can be
> whacked...)
You would know better than I, I think.
> I've also inserted a little clean up into ignore_command which will only
> print the newline when from_tty is set. This cleans up the MI output when
> -break-after is used.
Hmmm... have you checked whether this affects output from scripts?
I'm thinking --
%> gdb -x myscript >& mylog
>
> ChangeLog
> 2002-06-13 Keith Seitz <keiths@redhat.com>
>
> * breakpoint.c (condition_command): Post breakpoint_modify
> when a condition is added to an existing breakpoint.
> (commands_command): Likewise for commands.
> (set_ignore_count): Likewise for ignore counts.
> If no tty, do not simply return, still need to send event
> notification.
> (ignore_command): Only print a newline if the command came
> from a tty.
> Don't call breakpoints_changed, since this is now properly
> handled by set_ignore_count.
>
> Patch
> Index: breakpoint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/breakpoint.c,v
> retrieving revision 1.76
> diff -p -r1.76 breakpoint.c
> *** breakpoint.c 10 Jun 2002 23:25:50 -0000 1.76
> --- breakpoint.c 14 Jun 2002 04:49:37 -0000
> *************** condition_command (char *arg, int from_t
> *** 553,558 ****
> --- 553,559 ----
> error ("Junk at end of expression");
> }
> breakpoints_changed ();
> + breakpoint_modify_event (b->number);
> return;
> }
>
> *************** commands_command (char *arg, int from_tt
> *** 592,597 ****
> --- 593,599 ----
> free_command_lines (&b->commands);
> b->commands = l;
> breakpoints_changed ();
> + breakpoint_modify_event (b->number);
> return;
> }
> error ("No breakpoint number %d.", bnum);
> *************** set_ignore_count (int bptnum, int count,
> *** 7071,7088 ****
> if (b->number == bptnum)
> {
> b->ignore_count = count;
> ! if (!from_tty)
> ! return;
> ! else if (count == 0)
> ! printf_filtered ("Will stop next time breakpoint %d is reached.",
> ! bptnum);
> ! else if (count == 1)
> ! printf_filtered ("Will ignore next crossing of breakpoint %d.",
> ! bptnum);
> ! else
> ! printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
> ! count, bptnum);
> breakpoints_changed ();
> return;
> }
>
> --- 7073,7092 ----
> if (b->number == bptnum)
> {
> b->ignore_count = count;
> ! if (from_tty)
> ! {
> ! if (count == 0)
> ! printf_filtered ("Will stop next time breakpoint %d is reached.",
> ! bptnum);
> ! else if (count == 1)
> ! printf_filtered ("Will ignore next crossing of breakpoint %d.",
> ! bptnum);
> ! else
> ! printf_filtered ("Will ignore next %d crossings of breakpoint %d.",
> ! count, bptnum);
> ! }
> breakpoints_changed ();
> + breakpoint_modify_event (b->number);
> return;
> }
>
> *************** ignore_command (char *args, int from_tty
> *** 7119,7126 ****
> set_ignore_count (num,
> longest_to_int (value_as_long (parse_and_eval (p))),
> from_tty);
> ! printf_filtered ("\n");
> ! breakpoints_changed ();
> }
>
> /* Call FUNCTION on each of the breakpoints
> --- 7123,7130 ----
> set_ignore_count (num,
> longest_to_int (value_as_long (parse_and_eval (p))),
> from_tty);
> ! if (from_tty)
> ! printf_filtered ("\n");
> }
>
> /* Call FUNCTION on each of the breakpoints
next prev parent reply other threads:[~2002-06-14 5:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-13 21:59 Keith Seitz
2002-06-13 22:49 ` Michael Snyder [this message]
2002-06-18 10:47 ` Keith Seitz
2002-06-18 14:40 ` Michael Snyder
2002-06-18 14:59 ` Keith Seitz
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=3D09804B.BD4E6526@redhat.com \
--to=msnyder@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=keiths@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