From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2298 invoked by alias); 24 Jan 2006 16:42:46 -0000 Received: (qmail 837 invoked by uid 22791); 24 Jan 2006 16:32:23 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Jan 2006 16:32:21 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1F1R5c-0005d9-Jg for gdb-patches@sources.redhat.com; Tue, 24 Jan 2006 19:32:18 +0300 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1F1R5c-0005d6-HT for gdb-patches@sources.redhat.com; Tue, 24 Jan 2006 19:32:16 +0300 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: [PATCH] Add fullname field for MI -break-info command Date: Tue, 24 Jan 2006 16:42:00 -0000 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Qal1DQ947S0B76x" Message-Id: <200601241932.16022.ghost@cs.msu.su> 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/msg00357.txt.bz2 --Boundary-00=_Qal1DQ947S0B76x Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 291 Hello! The attached patch adds the "fullname" field to the output of MI -break-info command. Changelog entry: 2006-01-24 Vladimir Prus * breakpoint.c (print_one_breakpoint): For MI-like UI, output 'fullname' field. Patch attached. - Volodya --Boundary-00=_Qal1DQ947S0B76x Content-Type: text/x-diff; charset="us-ascii"; name="break_info_fullname.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="break_info_fullname.diff" Content-length: 944 Index: breakpoint.c =================================================================== RCS file: /cvs/src/src/gdb/breakpoint.c,v retrieving revision 1.220 diff -u -r1.220 breakpoint.c --- breakpoint.c 16 Jan 2006 12:55:18 -0000 1.220 +++ breakpoint.c 24 Jan 2006 15:10:47 -0000 @@ -3603,6 +3603,23 @@ print_command_lines (uiout, l, 4); do_cleanups (script_chain); } + + 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) + { + 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); + } + } + } + do_cleanups (bkpt_chain); do_cleanups (old_chain); } --Boundary-00=_Qal1DQ947S0B76x--