From: Joel Brobecker <brobecker@adacore.com>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] set/unset/show substitute-path commands (take 2)
Date: Mon, 17 Jul 2006 17:09:00 -0000 [thread overview]
Message-ID: <20060717170933.GD1280@adacore.com> (raw)
In-Reply-To: <44BB586E.7040107@st.com>
> >+ /* Otherwise, skip to the last rule in our list and then append
> >+ the new rule. */
> >+
> >+ last = substitute_path_rules;
> >+ while (last->next != NULL)
> >+ last = last->next;
> >+
> >+ last->next = rule;
>
> What if the user tries to substitute the same path twice? I think it
> should delete the old rule (maybe query) and add the new one to the end.
I think we are getting dragged into over-engineering this feature.
If documentation is clear enough that it just adds, then he knows
he has to remove the previous rule before he introduces the new one.
That's plenty good enough in my opinion.
> >+ /* If no rule matching the argument was found, then print an error
> >+ message to the user. */
> >+
> >+ if (!rule_found)
> >+ {
> >+ if (from != NULL)
> >+ error (_("No substitution rule defined for `%s'"), from);
> >+ else
> >+ error (_("No substitution rule defined"));
>
> Is the latter case really an error? I would have thought not, since
> there's no way for a script to check the status before giving the command.
I personally think so, but I don't have a strong opinion on this.
The error can be removed if this is the consensus.
--
Joel
next prev parent reply other threads:[~2006-07-17 17:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-15 5:49 Joel Brobecker
2006-07-17 9:19 ` Andrew STUBBS
2006-07-17 9:29 ` Andrew STUBBS
2006-07-17 17:09 ` Joel Brobecker [this message]
2006-07-17 17:32 ` Daniel Jacobowitz
2006-07-17 17:46 ` Andrew STUBBS
2006-07-19 18:15 ` Joel Brobecker
2006-07-24 20:25 ` Daniel Jacobowitz
2006-07-25 16:28 ` Joel Brobecker
2006-07-25 16:38 ` Daniel Jacobowitz
2006-08-08 22:19 ` Joel Brobecker
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=20060717170933.GD1280@adacore.com \
--to=brobecker@adacore.com \
--cc=andrew.stubbs@st.com \
--cc=gdb-patches@sources.redhat.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