From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12651 invoked by alias); 14 Feb 2013 16:30:16 -0000 Received: (qmail 12565 invoked by uid 22791); 14 Feb 2013 16:30:13 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Feb 2013 16:30:06 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 14 Feb 2013 08:28:35 -0800 X-ExtLoop1: 1 Received: from swsutil001.isw.intel.com ([10.237.237.11]) by orsmga002.jf.intel.com with ESMTP; 14 Feb 2013 08:29:50 -0800 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by swsutil001.isw.intel.com (8.13.6/8.13.6/MailSET/Hub) with ESMTP id r1EGTMKN019681; Thu, 14 Feb 2013 16:29:26 GMT Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id r1EGTLQv030690; Thu, 14 Feb 2013 17:29:21 +0100 Received: (from mmetzger@localhost) by ulslx001.iul.intel.com with id r1EGTLVA030686; Thu, 14 Feb 2013 17:29:21 +0100 From: markus.t.metzger@intel.com To: jan.kratochvil@redhat.com Cc: gdb-patches@sourceware.org, markus.t.metzger@gmail.com, Markus Metzger Subject: [rfc 6/8] record disas: omit function names by default Date: Thu, 14 Feb 2013 16:30:00 -0000 Message-Id: <1360859352-30399-7-git-send-email-markus.t.metzger@intel.com> In-Reply-To: <1360859352-30399-1-git-send-email-markus.t.metzger@intel.com> References: <1360859352-30399-1-git-send-email-markus.t.metzger@intel.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: 2013-02/txt/msg00351.txt.bz2 From: Markus Metzger Omit function names in the disassembly of the "record disassemble" command unless the "/f" modifier is specified. This helps align the disassembly output across functions. The branch destination is already obvious from the instruction order. 2013-02-14 Markus Metzger * record.c (get_disas_modifiers): Set DISASSEMBLY_OMIT_FNAME unless /f is given. (_initialize_record): Update the "record disassemble" help text. --- gdb/record.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/gdb/record.c b/gdb/record.c index 4f848ce..3ac4765 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -328,8 +328,13 @@ get_disas_modifiers (char **arg) modifiers = 0; args = *arg; + /* By default, we omit the function name to keep the disassembly better + aligned. The branch destination is obvious from the instruction order + in the disassembly. */ + modifiers |= DISASSEMBLY_OMIT_FNAME; + if (args == NULL) - return 0; + return modifiers; while (*args == '/') { @@ -355,6 +360,9 @@ get_disas_modifiers (char **arg) case 'r': modifiers |= DISASSEMBLY_RAW_INSN; break; + case 'f': + modifiers &= ~DISASSEMBLY_OMIT_FNAME; + break; default: error (_("Invalid modifier: %c."), *args); } @@ -485,6 +493,7 @@ Argument is instruction number, as shown by 'info record'."), Disassemble a section of the execution log.\n\ With a /m modifier, source lines are included (if available).\n\ With a /r modifier, raw instructions in hex are included.\n\ +With a /f modifier, function names are included.\n\ With no argument, disassembles ten more instructions after or around the \ previous disassembly.\n\ \"disassemble -\" disassembles ten instructions before a previous ten-line \ -- 1.7.1