From: Joel Brobecker <brobecker@adacore.com>
To: Doug Evans <dje@google.com>
Cc: Michael Snyder <msnyder@specifix.com>,
Eli Zaretskii <eliz@gnu.org>,
gdb-patches@sourceware.org
Subject: Re: [RFA] mixed source+assembly from cli disassemble
Date: Thu, 17 Apr 2008 21:29:00 -0000 [thread overview]
Message-ID: <20080417212519.GD12735@adacore.com> (raw)
In-Reply-To: <e394668d0804161525t337703a6if245920db61bc225@mail.gmail.com>
> 2008-04-16 Doug Evans <dje@google.com>
>
> * NEWS: Mention new /m modifier for disassemble command.
> * cli/cli-cmds.c (print_disassembly): New function.
> (disassemble_current_function): New function
> (disassemble_command): Recognize /m modifier, print mixed
> source+assembly.
> (init_cli_cmds): Update disassemble help text.
The code part of your patch is good to go, with a couple of tiny
adjustments. Let's wait for Eli's feedback before checking in, since
there is some documentation being adjusted in the code too.
> + printf_filtered ("Dump of assembler code ");
> + if (name != NULL)
> + {
> + printf_filtered ("for function %s:\n", name);
> + }
> + else
> + {
> + printf_filtered ("from %s to %s:\n", paddress (low), paddress (high));
> + }
We don't need the curly braces in this case. Can you remove them?
> + if (*arg == '\0')
> + error (_("Missing modifier."));
> +
> + while (*arg && ! isspace (*arg))
> + {
> + switch (*arg++)
> + {
> + case 'm':
> + mixed_source_and_assembly = 1;
> + break;
> + default:
> + error (_("Invalid disassembly modifier."));
> + }
> + }
> +
> + while (isspace (*arg))
> + ++arg;
The formatting looks weird, because some of the lines (the "while" lines
for instance) are using spaces instead of tabs. Could you fix that to
use TABs, please?
> @@ -1383,6 +1439,7 @@ With two args if one is empty it stands
> c = add_com ("disassemble", class_vars, disassemble_command, _("\
> Disassemble a specified section of memory.\n\
> Default is the function surrounding the pc of the selected frame.\n\
> +With a /m modifier source lines, if available, are included.\n\
I'd like to have Eli's feedback on this change. I would phrase
differently (the current form is missing a coma to make it
intelligible):
With a /m modifier, source lines are included (if available).
--
Joel
next prev parent reply other threads:[~2008-04-17 21:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-04 3:26 Doug Evans
2008-04-04 9:17 ` Michael Snyder
2008-04-04 9:26 ` Doug Evans
2008-04-04 9:58 ` Eli Zaretskii
2008-04-09 22:27 ` Michael Snyder
2008-04-10 12:35 ` Joel Brobecker
2008-04-11 8:55 ` Michael Snyder
2008-04-15 20:32 ` Michael Snyder
2008-04-16 21:16 ` Joel Brobecker
2008-04-16 21:22 ` Doug Evans
2008-04-16 22:49 ` Doug Evans
2008-04-17 21:29 ` Joel Brobecker [this message]
2008-04-17 22:01 ` Daniel Jacobowitz
2008-04-17 22:45 ` Joel Brobecker
2008-04-28 18:52 ` Fwd: " Doug Evans
2008-04-29 0:54 ` Eli Zaretskii
2008-05-06 3:15 ` Doug Evans
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=20080417212519.GD12735@adacore.com \
--to=brobecker@adacore.com \
--cc=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@specifix.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