Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: markus.t.metzger@intel.com
To: jan.kratochvil@redhat.com
Cc: gdb-patches@sourceware.org, markus.t.metzger@gmail.com,
	       Markus Metzger <markus.t.metzger@intel.com>
Subject: [rfc 6/8] record disas: omit function names by default
Date: Thu, 14 Feb 2013 16:30:00 -0000	[thread overview]
Message-ID: <1360859352-30399-7-git-send-email-markus.t.metzger@intel.com> (raw)
In-Reply-To: <1360859352-30399-1-git-send-email-markus.t.metzger@intel.com>

From: Markus Metzger <markus.t.metzger@intel.com>

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 <markus.t.metzger@intel.com>

	* 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


  parent reply	other threads:[~2013-02-14 16:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14 16:31 [rfc 0/8] refactor record markus.t.metzger
2013-02-14 16:30 ` [rfc 5/8] record: add "record disassemble" command markus.t.metzger
2013-02-14 16:30 ` [rfc 4/8] record: default target methods markus.t.metzger
2013-02-14 16:30 ` [rfc 7/8] record: add "record backtrace" command markus.t.metzger
2013-02-14 16:30 ` markus.t.metzger [this message]
2013-02-15 16:11   ` [rfc 6/8] record disas: omit function names by default Jan Kratochvil
2013-02-15 18:21     ` Eli Zaretskii
2013-02-15 18:33       ` Jan Kratochvil
2013-02-15 19:05         ` Eli Zaretskii
2013-02-15 19:10           ` Jan Kratochvil
2013-02-18  9:43             ` Metzger, Markus T
2013-02-18 13:03               ` Jan Kratochvil
2013-02-18 13:30                 ` Metzger, Markus T
2013-02-18 14:13                   ` Jan Kratochvil
2013-02-18 14:51                     ` Metzger, Markus T
2013-02-18 15:54                       ` Jan Kratochvil
2013-02-19  8:34                         ` Metzger, Markus T
2013-02-19  8:52                           ` [RFC on command names] " Jan Kratochvil
2013-02-18 16:17               ` Eli Zaretskii
2013-02-15 20:43         ` Tom Tromey
2013-02-14 16:30 ` [rfc 8/8] record: add "record list" command markus.t.metzger
2013-02-14 16:31 ` [rfc 3/8] record-full.h: rename record_ into record_full_ markus.t.metzger
2013-02-14 16:31 ` [rfc 2/8] record-full.c: rename record_ in record_full_ markus.t.metzger
2013-02-15  8:45   ` Jan Kratochvil
2013-02-14 16:32 ` [rfc 1/8] record: make it build again markus.t.metzger
2013-02-15 11:18 ` [rfc 0/8] refactor record Metzger, Markus T
2013-02-15 16:15 ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360859352-30399-7-git-send-email-markus.t.metzger@intel.com \
    --to=markus.t.metzger@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=markus.t.metzger@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox