Add documentation on objdump's -M option for RISC-V target

Message ID ygftunj7r46.fsf@tehran.isnogud.escape.de
State New
Headers show
Series
  • Add documentation on objdump's -M option for RISC-V target
Related show

Commit Message

Urs Thuermann May 3, 2021, 3:39 p.m.
---
 binutils/doc/binutils.texi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

-- 
2.25.1

Comments

Andreas Schwab May 3, 2021, 4:11 p.m. | #1
On Mai 03 2021, Urs Thuermann wrote:

> +For RISC-V, this option controls the printing of instruction mnemonic

> +names and register names in disassembly.

> +

> +@item no-aliases

> +Print raw instructions instead of pseudo instructions.

> +

> +@item numeric

> +Print numeric register names instead of ABI names.

> +

> +@item priv-spec

> +Print the CSR according to the chosen privilege spec (1.9, 1.9.1,

> +1.10, 1.11).

> +


How about using the same descriptions as the --help output?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Urs Thuermann May 3, 2021, 4:43 p.m. | #2
Andreas Schwab <schwab@linux-m68k.org> writes:

> How about using the same descriptions as the --help output?


OK (In fact, I had already done that for priv-spec).  Also changed the
order to match the --help output.

diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 9578c083ef8..d591908deb7 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -2671,6 +2671,20 @@ rather than names, for the selected types of registers.
 You can list the available values of @var{ABI} and @var{ARCH} using
 the @option{--help} option.
 
+For RISC-V, this option controls the printing of instruction mnemonic
+names and register names in disassembly.
+
+@item numeric
+Print numeric register names, rather than ABI names.
+
+@item no-aliases
+Disassemble only into canonical instructions, rather than into
+pseudoinstructions.
+
+@item priv-spec
+Print the CSR according to the chosen privilege spec (1.9, 1.9.1,
+1.10, 1.11).
+
 For VAX, you can specify function entry addresses with @option{-M
 entry:0xf00ba}.  You can use this multiple times to properly
 disassemble VAX binary files that don't contain symbol tables (like


urs
Jim Wilson May 3, 2021, 5:57 p.m. | #3
On Mon, May 3, 2021 at 9:45 AM Urs Thuermann <urs@isnogud.escape.de> wrote:

> Andreas Schwab <schwab@linux-m68k.org> writes:

>

> > How about using the same descriptions as the --help output?

>

> OK (In fact, I had already done that for priv-spec).  Also changed the

> order to match the --help output.

>


Please keep in mind that contributions to the GNU toolchain require an FSF
copyright assignment.  Except for some trivial changes.  I don't see a
copyright assignment for you.  Are you interested in trying to get one?  If
so, great.  If not, then you shouldn't spend a lot of time on this.  It is
better to file a bug report and let someone with a copyright assignment
write the patch.

Jim
Urs Thuermann May 3, 2021, 7:02 p.m. | #4
Jim Wilson <jimw@sifive.com> writes:

> Please keep in mind that contributions to the GNU toolchain require an FSF

> copyright assignment.  Except for some trivial changes.  I don't see a

> copyright assignment for you.  Are you interested in trying to get one?  If

> so, great.  If not, then you shouldn't spend a lot of time on this.  It is

> better to file a bug report and let someone with a copyright assignment

> write the patch.


Hm, I think this patch can be considered trivial, especially, since
more than half of it is copied from the source code.

urs

Patch

diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 9578c083ef8..98e4f41b744 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -2671,6 +2671,19 @@  rather than names, for the selected types of registers.
 You can list the available values of @var{ABI} and @var{ARCH} using
 the @option{--help} option.
 
+For RISC-V, this option controls the printing of instruction mnemonic
+names and register names in disassembly.
+
+@item no-aliases
+Print raw instructions instead of pseudo instructions.
+
+@item numeric
+Print numeric register names instead of ABI names.
+
+@item priv-spec
+Print the CSR according to the chosen privilege spec (1.9, 1.9.1,
+1.10, 1.11).
+
 For VAX, you can specify function entry addresses with @option{-M
 entry:0xf00ba}.  You can use this multiple times to properly
 disassemble VAX binary files that don't contain symbol tables (like