From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2082 invoked by alias); 24 Jan 2006 16:42:34 -0000 Received: (qmail 32722 invoked by uid 22791); 24 Jan 2006 16:28:01 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Jan 2006 16:28:00 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1F1QuG-0007Qt-5m for gdb-patches@sources.redhat.com; Tue, 24 Jan 2006 17:20:32 +0100 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jan 2006 17:20:32 +0100 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Jan 2006 17:20:32 +0100 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: [PATCH] Add fullname field for MI -break-info command Date: Tue, 24 Jan 2006 16:42:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart2155248.aq4YZ9rYLF" Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 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/msg00356.txt.bz2 --nextPart2155248.aq4YZ9rYLF Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8Bit Content-length: 296 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 --nextPart2155248.aq4YZ9rYLF Content-Type: text/x-diff; name="break_info_fullname.diff" Content-Transfer-Encoding: 8Bit 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); } --nextPart2155248.aq4YZ9rYLF--