From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21502 invoked by alias); 24 Jan 2006 21:13:38 -0000 Received: (qmail 21494 invoked by uid 22791); 24 Jan 2006 21:13:38 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 24 Jan 2006 21:13:37 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F1VTq-00075d-9U; Tue, 24 Jan 2006 16:13:34 -0500 Date: Tue, 24 Jan 2006 21:13:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Add fullname field for MI -break-info command Message-ID: <20060124211334.GB26974@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb-patches@sources.redhat.com References: <200601241932.16022.ghost@cs.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601241932.16022.ghost@cs.msu.su> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00372.txt.bz2 On Tue, Jan 24, 2006 at 07:32:15PM +0300, Vladimir Prus wrote: > > Hello! > > The attached patch adds the "fullname" field to the output of MI -break-info > command. In addition to what Bob said, formatting points: > + if (ui_out_is_mi_like_p (uiout)) > + { > + if (b->loc->loc_type == bp_loc_software_breakpoint || > + b->loc->loc_type == bp_loc_hardware_watchpoint) if (b->loc->loc_type == bp_loc_software_breakpoint || b->loc->loc_type == bp_loc_hardware_watchpoint) > + { > + struct symtab_and_line sal = find_pc_line (b->loc->address, 0); > + symtab_to_fullname (sal.symtab); > + > + if (sal.symtab->fullname) > + { > + annotate_field(10); annotate_field (10); But I don't think you need this at all; there's no point emitting annotations when we're guarded by ui_out_is_mi_like_p. Also, you can use the return value from symtab_to_fullname. -- Daniel Jacobowitz CodeSourcery