From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16847 invoked by alias); 26 Jan 2006 11:27:28 -0000 Received: (qmail 16839 invoked by uid 22791); 26 Jan 2006 11:27:27 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jan 2006 11:27:25 +0000 Received: from kahikatea.snap.net.nz (p120-tnt1.snap.net.nz [202.124.110.120]) by viper.snap.net.nz (Postfix) with ESMTP id A859E740945; Fri, 27 Jan 2006 00:27:20 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 814DB8884; Fri, 27 Jan 2006 00:26:28 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17368.45539.671403.826516@kahikatea.snap.net.nz> Date: Thu, 26 Jan 2006 11:27:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Add fullname field for MI -break-info command 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/msg00424.txt.bz2 + 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) ^^^^^^^^^^ Should this be bp_loc_hardware_breakpoint? + { + struct symtab_and_line sal = find_pc_line (b->loc->address, 0); + symtab_to_fullname (sal.symtab); + + if (sal.symtab->fullname) + { + annotate_field(10); + ui_out_field_string (uiout, "fullname", sal.symtab->fullname); + } + } + } + Also, I would move it up breakpoint.c (without the call to annotate_field) to here: if (b->source_file) { sym = find_pc_sect_function (b->loc->address, b->loc->section); if (sym) { ui_out_text (uiout, "in "); ui_out_field_string (uiout, "func", SYMBOL_PRINT_NAME (sym)); ui_out_wrap_hint (uiout, wrap_indent); ui_out_text (uiout, " at "); } ui_out_field_string (uiout, "file", b->source_file); ui_out_text (uiout, ":"); ---> ui_out_field_int (uiout, "line", b->line_number); } to be consistent with the output of print_frame, where the order is file, fullname, line. Putting it here might also mean that the test for b->loc->loc_type isn't needed, but I don't really know. Nick http://www.inet.net.nz/~nickrob