From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3618 invoked by alias); 14 Jun 2002 04:59:15 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3585 invoked from network); 14 Jun 2002 04:59:13 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 14 Jun 2002 04:59:13 -0000 Received: from makita.cygnus.com (makita.sfbay.redhat.com [192.168.30.83]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id VAA23036 for ; Thu, 13 Jun 2002 21:59:12 -0700 (PDT) Received: from localhost (keiths@localhost) by makita.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id VAA11726 for ; Thu, 13 Jun 2002 21:59:12 -0700 (PDT) X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Thu, 13 Jun 2002 21:59:00 -0000 From: Keith Seitz X-X-Sender: To: Subject: [RFA] Missing breakpoint-modify events Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-06/txt/msg00239.txt.bz2 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. 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...) 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. Keith ChangeLog 2002-06-13 Keith Seitz * 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