From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Pedro Alves <pedro@palves.net>
Cc: fam@euphon.net, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] disass: Add /x modifier to print offsets in hex
Date: Thu, 24 Sep 2020 14:22:47 +0100 [thread overview]
Message-ID: <20200924132247.GL1540618@embecosm.com> (raw)
In-Reply-To: <22205c9c-aab7-c160-661a-e1a500d28f7d@palves.net>
* Pedro Alves <pedro@palves.net> [2020-09-24 13:20:56 +0100]:
> On 9/24/20 12:05 PM, Andrew Burgess wrote:
> > * fam@euphon.net <fam@euphon.net> [2020-09-23 10:19:06 +0000]:
> >
> >> From: Fam Zheng <famzheng@amazon.com>
> >>
> >> Backtrace messages printed by Linux kernel and Xen have hex offsets,
> >> e.g.:
> >>
> >> (XEN) Xen call trace:
> >> (XEN) [<ffff82d0402eefbb>] R guest_walk_tables_2_levels+0x189/0x66d
> >> (XEN) [<ffff82d0402edbbd>] F hap_p2m_ga_to_gfn_2_levels+0x112/0x25b
> >> (XEN) [<ffff82d0402edd22>] F hap_gva_to_gfn_2_levels+0x1c/0x1e
> >> (XEN) [<ffff82d0402f832e>] F paging_gva_to_gfn+0x14a/0x167
> >>
> >> Having this modifier saves converting between hex values from the
> >> backtrace log and offsets in gdb disass output.
> >>
> >> ---
> >>
> >> v2: Drop a overlooked change on file header.
> >> ---
> >> gdb/cli/cli-cmds.c | 17 ++++++++++++-----
> >> gdb/disasm.c | 6 +++++-
> >> gdb/disasm.h | 1 +
> >> gdb/record.c | 3 +++
> >> 4 files changed, 21 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
> >> index e3965fea07..2266f67695 100644
> >> --- a/gdb/cli/cli-cmds.c
> >> +++ b/gdb/cli/cli-cmds.c
> >> @@ -1456,12 +1456,12 @@ disassemble_current_function (gdb_disassembly_flags flags)
> >> /* Dump a specified section of assembly code.
> >>
> >> Usage:
> >> - disassemble [/mrs]
> >> + disassemble [/mrsx]
> >> - dump the assembly code for the function of the current pc
> >> - disassemble [/mrs] addr
> >> + disassemble [/mrsx] addr
> >> - dump the assembly code for the function at ADDR
> >> - disassemble [/mrs] low,high
> >> - disassemble [/mrs] low,+length
> >> + disassemble [/mrsx] low,high
> >> + disassemble [/mrsx] low,+length
> >> - dump the assembly code in the range [LOW,HIGH), or [LOW,LOW+length)
> >>
> >> A /m modifier will include source code with the assembly in a
> >> @@ -1472,6 +1472,8 @@ disassemble_current_function (gdb_disassembly_flags flags)
> >>
> >> A /r modifier will include raw instructions in hex with the assembly.
> >>
> >> + A /x modifier will print offsets in hex.
> >
> > Shouldn't this be 'An /x modified ...' ? Saying it out loud it
> > certainly seems that way.
>
> Not if you read it as "a slash x modifier".
>
> I would guess that that's why it's also written "A /r" and "A /m modifier"?
I withdraw my suggestion then.
Sorry for the noise.
Andrew
prev parent reply other threads:[~2020-09-24 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 10:19 fam
2020-09-23 10:39 ` Andreas Schwab
2020-09-23 11:12 ` Fam Zheng
2020-09-24 3:25 ` Simon Marchi
2020-09-24 7:26 ` Fam Zheng
2020-09-24 11:05 ` Andrew Burgess
2020-09-24 12:20 ` Pedro Alves
2020-09-24 13:22 ` Andrew Burgess [this message]
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=20200924132247.GL1540618@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=fam@euphon.net \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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