From: Pedro Alves <palves@redhat.com>
To: Doug Evans <xdje42@gmail.com>, gdb-patches@sourceware.org, eliz@gnu.org
Subject: Re: [PATCH] Improve maint print symbols,psymbols,msymbols
Date: Fri, 22 Apr 2016 13:31:00 -0000 [thread overview]
Message-ID: <571A27C0.1070507@redhat.com> (raw)
In-Reply-To: <m3d1pkrxwa.fsf@sspiff.org>
On 04/20/2016 06:30 PM, Doug Evans wrote:
> Hi.
>
> More old sandbox spring cleaning.
>
> At the time I needed this, I used it a lot.
Thanks, I think this is quite useful and helpful.
> I've since also added msymbol improvements if only for consistency sake.
> It's helpful to have more control over what to print,
> and to have the output appear on the screen
> without having to go looking for it. Bleah.
Yeah...
No real comments on the patch itself. Only a small
passer-by comment below.
> + else if (strcmp (argv[i], "-source") == 0)
> + {
> + if (argv[i + 1] == NULL)
> + error (_("Missing source file"));
> + source_arg = argv[++i];
> + }
> + else if (strcmp (argv[i], "-objfile") == 0)
> + {
> + if (argv[i + 1] == NULL)
> + error (_("Missing objfile name"));
> + objfile_arg = argv[++i];
> + }
> + else if (argv[i][0] == '-')
> + {
> + /* Future proofing: Don't allow OUTFILE to begin with "-". */
> + error (_("Unknown option: %s"), argv[i]);
> + }
We don't do this often, but it's usual for tools to
understand "--" as meaning end of "-" options. I'd
instead do:
else if (strcmp (argv[i], "--") == 0)
{
/* Explicit "--" marks end of options. */
break;
}
else if (argv[i][0] == '-')
error (_("Unknown option: %s"), argv[i]);
else
break;
So anyone wanting a filename that begins with "-" could still have it.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-04-22 13:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 17:30 Doug Evans
2016-04-20 17:33 ` Doug Evans
2016-04-20 17:45 ` Eli Zaretskii
2016-04-22 13:31 ` Pedro Alves [this message]
2016-12-19 18:04 ` Doug Evans
2016-12-20 12:52 ` Pedro Alves
2016-12-22 23:53 ` 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=571A27C0.1070507@redhat.com \
--to=palves@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=xdje42@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).