From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22294 invoked by alias); 8 Sep 2007 11:46:55 -0000 Received: (qmail 22277 invoked by uid 22791); 8 Sep 2007 11:46:54 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Sep 2007 11:46:49 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-141-251.inter.net.il [80.230.141.251]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DOM33563 (AUTH halo1); Sat, 8 Sep 2007 14:46:45 +0300 (IDT) Date: Sat, 08 Sep 2007 11:46:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus CC: gdb-patches@sources.redhat.com In-reply-to: <200709080248.52539.vladimir@codesourcery.com> (message from Vladimir Prus on Sat, 8 Sep 2007 02:48:52 +0400) Subject: Re: [8/9] multiple locations Reply-to: Eli Zaretskii References: <200709080248.52539.vladimir@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00111.txt.bz2 > From: Vladimir Prus > Date: Sat, 8 Sep 2007 02:48:52 +0400 > > @@ -3397,30 +3448,79 @@ print_one_breakpoint (struct breakpoint > struct cleanup *old_chain = make_cleanup_ui_out_stream_delete (stb); > struct cleanup *bkpt_chain; > [...] > - ui_out_field_int (uiout, "number", b->number); > + if (part_of_multiple) > + { > + char buf[30]; Why 30? GNU coding standards frown on arbitrary constant sizes. > + sprintf (buf, "%d.%d", b->number, loc_number); > + ui_out_field_string (uiout, "number", buf); I'm worried about this N.M thing: when the number of locations takes 2 or 3 digits, won't it disrupt the display alignment? > - ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int) b->enable_state]); > - ui_out_spaces (uiout, 2); > + if (part_of_multiple) > + ui_out_field_string (uiout, "enabled", > + loc->shlib_disabled > + ? (loc->enabled ? "y(p)" : "n(p)") > + : (loc->enabled ? "y" : "n")); These changes in the breakpoint display should be documented in the user manual. > + else if (header_of_multiple) > + ui_out_field_string (uiout, "addr", ""); And this. > +/* set_raw_breakpoint() is a low level routine for allocating and Another GNU coding standards thing: foo() should not be used as an indication that `foo' is a function. Just say `foo' instead; foo() looks like a call to `foo' with no arguments, which is not what you mean. > @@ -7579,6 +7874,13 @@ disable_command (char *args, int from_tt > default: > continue; > } > + else if (strchr (args, '.')) > + { > + struct bp_location *loc = find_location_by_number (args); > + if (loc) > + loc->enabled = 0; > + check_duplicates (loc->owner); > + } This new feature needs documentation.