This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] New substitute-path commands


On Tue, Jul 11, 2006 at 01:30:42PM -0700, Joel Brobecker wrote:
>   (1): Anchoring means that we replace from the start right, so
>        no search within the path, just a strncmp, correct?
> 
>        It might be simpler, but on the other hand less flexible.
>        I would personally prefer to have it non anchored, but
>        it's only a mild preference and I don't know of any
>        situation where having the replacement rule anchored
>        would cause us any problem in practice.
> 
>   (2): I am personally not against this, and it would fit what
>        we would do at AdaCore, but I don't see this as a necessary
>        constraint that the debugger should check. Again, a mild
>        preference.
> 
> What do others think? I'm happy to implement whatever the group
> thinks is best.

The reason for anchoring is to reduce surprising behavior.  Especially
since this only replaces one occurance, it seems like the path of least
astonishment.  For instance, "substitute-path foo bar" would replace
/fool with /barl and /tmp/myfoo with /tmp/mybar.

I'd much prefer (1); I'm ambivalent on (2); whatever anyone prefers is
fine.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]