[RFA] New substitute-path commands
Daniel Jacobowitz
drow@false.org
Thu Jul 13 21:41:00 GMT 2006
On Thu, Jul 13, 2006 at 02:27:46PM -0700, Joel Brobecker wrote:
> My question is the following: When you enter a second rule, should it
> take precedence over the first one you entered? More generally, should
> the substitution rules entered last be used first, or the opposite?
Good question. I'm strongly in favor of intelligent users picking
rules where it doesn't make a difference! :-)
> I'm 50-50 on this:
>
> . With first-entered/first-used, you enter the rules following the
> logic "if blah, then replace with [...]; else if bloh, then replace
> with [...]; else if [...], then [...]". In other words, you enter
> the rules in the same order you would write a "program". It seems
> pretty natural.
>
> . With last-entered/first-used, it's possible to override previous
> entries without having to delete the previous rules. Not so natural
> to "program", though.
>
> Actually, as I'm writing this, I now favor first-entered/first-used.
> One can delete a rule if he wants to override it. It's marginal anyway.
>
> What do you guys think?
I think that's fine.
Let's not overdesign this. I was only half-kidding about calling a
Python function to transform the source pathnames if you want to do
anything more complicated - if someone comes up with a legitimate use
for anything more complex than a simple list of prefixes, we can do
something along those lines.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list