Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] gdb: error if /r and /b are used with disassemble command
Date: Sat, 21 Oct 2023 10:22:57 +0300	[thread overview]
Message-ID: <83fs24salq.fsf@gnu.org> (raw)
In-Reply-To: <90a53b19bd317ff337041c495f338a2b0b5ad727.1697837538.git.aburgess@redhat.com> (message from Andrew Burgess on Fri, 20 Oct 2023 22:33:09 +0100)

> From: Andrew Burgess <aburgess@redhat.com>
> Cc: Andrew Burgess <aburgess@redhat.com>
> Date: Fri, 20 Oct 2023 22:33:09 +0100
> 
> The disassembler gained a new /b flag in this commit:
> 
>   commit d4ce49b7ac077a9882d6a5e689e260300045ca88
>   Date:   Tue Jun 21 20:23:35 2022 +0100
> 
>       gdb: disassembler opcode display formatting
> 
> The /b and /r flags result in the instruction opcodes displayed in
> different formats, so it's not possible to have both at the same
> time.  Currently the /b flag overrides the /r flag.
> 
> We have a similar situation with the /m and /s flags, but here, if the
> user tries to use both flags then they will get an error.
> 
> I think the error is clearer, so in this commit I propose that we add
> an error if /r and /b are both used.
> 
> Obviously this change breaks backwards compatibility.  I don't have a
> compelling argument for why we should make the change beyond my
> feeling that it was a mistake not to add this error from the start,
> and that the new behaviour is better.
> ---
>  gdb/NEWS                            |  7 ++++++
>  gdb/cli/cli-cmds.c                  |  4 +++
>  gdb/doc/gdb.texinfo                 | 20 ++++++++++-----
>  gdb/testsuite/gdb.disasm/basics.c   | 22 ++++++++++++++++
>  gdb/testsuite/gdb.disasm/basics.exp | 39 +++++++++++++++++++++++++++++
>  5 files changed, 86 insertions(+), 6 deletions(-)
>  create mode 100644 gdb/testsuite/gdb.disasm/basics.c
>  create mode 100644 gdb/testsuite/gdb.disasm/basics.exp

Thanks, the documentation parts are OK.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>

  reply	other threads:[~2023-10-21  7:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 21:33 [PATCH 0/3] Improve disassemble command completion Andrew Burgess
2023-10-20 21:33 ` [PATCH 1/3] gdb: error if /r and /b are used with disassemble command Andrew Burgess
2023-10-21  7:22   ` Eli Zaretskii [this message]
2023-10-20 21:33 ` [PATCH 2/3] gdb: make skip_over_slash_fmt available outside printcmd.c Andrew Burgess
2023-10-20 21:33 ` [PATCH 3/3] gdb: add a custom command completer for disassemble command Andrew Burgess
2023-11-08 11:21 ` [PATCH 0/3] Improve disassemble command completion Andrew Burgess

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=83fs24salq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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