Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] New substitute-path commands
Date: Tue, 11 Jul 2006 20:30:00 -0000	[thread overview]
Message-ID: <20060711203042.GA1262@adacore.com> (raw)
In-Reply-To: <20060711124739.GA18324@nevyn.them.org>

Hi Daniel,

> > +static char *
> > +xrewrite_source_path (const char *path)
> 
> Why the x?  Is it because it allocates?  I believe we actually use the
> x to indicate replacements for system functionality which have a more
> reliable error behavior; so please don't use it here.

Oops, sorry, misunderstanding on my part. I just removed the x.
I was confused because of xfullpath...

> > +  /* Search for the first occurence of SUBSTITUTE_PATH_FROM.
> > +     No substitution needed of not found.  */
> 
> If not found.

Fixed. Thanks for catching it.

> > +  from_start = strstr (path, substitute_path_from);
> 
> This is the part of the patch I'm not sure about.  I have two
> questions.
> 
> 1.  Should the substitution rule be anchored to the beginning of the
> pathname?
> 
> 2.  Should the end of the rule be anchored to end of string or
> directory separator?
> 
> I think #1 should be yes, and #2 should probably be yes, but I'm less
> certain about it.  What do you think?

  (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.

Thanks for the review Daniel,
-- 
Joel


  reply	other threads:[~2006-07-11 20:30 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-05 21:58 Joel Brobecker
2006-07-05 22:49 ` Andreas Schwab
2006-07-05 23:01 ` Daniel Jacobowitz
2006-07-06  4:47   ` Joel Brobecker
2006-07-06 16:07     ` PAUL GILLIAM
2006-07-06 16:30       ` Daniel Jacobowitz
2006-07-06 21:28         ` Joel Brobecker
2006-07-07  5:22         ` Joel Brobecker
2006-07-07  9:40           ` Eli Zaretskii
2006-07-07 19:12             ` Joel Brobecker
2006-07-08 12:19               ` Eli Zaretskii
2006-07-10  5:40                 ` Joel Brobecker
2006-07-10 19:53                   ` Eli Zaretskii
2006-07-10 21:47                     ` Joel Brobecker
2006-07-10 21:51                       ` Daniel Jacobowitz
2006-07-10 21:56                         ` Joel Brobecker
2006-07-10 21:58                           ` Daniel Jacobowitz
2006-07-11  3:24                       ` Eli Zaretskii
2006-07-07 10:39           ` Andrew STUBBS
2006-07-07 16:12             ` Joel Brobecker
2006-07-07 16:45               ` Andrew STUBBS
2006-07-07 17:20                 ` Joel Brobecker
2006-07-11 12:47           ` Daniel Jacobowitz
2006-07-11 20:30             ` Joel Brobecker [this message]
2006-07-11 20:33               ` Daniel Jacobowitz
2006-07-11 20:45                 ` Joel Brobecker
2006-07-11 22:25             ` Joel Brobecker
2006-07-11 22:31               ` Christopher Faylor
2006-07-11 22:50               ` Daniel Jacobowitz
2006-07-11 23:00                 ` Joel Brobecker
2006-07-12  3:22                 ` Eli Zaretskii
2006-07-12  3:47                   ` Daniel Jacobowitz
2006-07-12  4:50                     ` Joel Brobecker
2006-07-12 14:09                       ` Daniel Jacobowitz
2006-07-06  3:31 ` Eli Zaretskii
2006-07-06  4:46   ` Joel Brobecker
2006-07-06  9:36 ` Andrew STUBBS
2006-07-06 21:19 ` Jason Molenda

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=20060711203042.GA1262@adacore.com \
    --to=brobecker@adacore.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