This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: find_and_open_source bug?
- From: Tom Tromey <tromey at redhat dot com>
- To: dje at google dot com (Doug Evans)
- Cc: gdb at sourceware dot org
- Date: Tue, 01 Nov 2011 13:11:01 -0600
- Subject: Re: find_and_open_source bug?
- References: <20111029204637.C44D9246191@ruffy.mtv.corp.google.com>
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> If find_and_open_source opens the file via rewrite_source_path,
Doug> should xfullname get called?
Doug> Grep for XXX below.
Doug> Seems so, otherwise the caller can't really assume what's
Doug> stored in *fullname is a "fullpath" (as defined by xfullpath).
Doug> [Maybe rewritten source paths shouldn't get passed through xfullpath
Doug> but then why does the rest of the function do that?]
Doug> [I'm trying to understand what invariants callers of find_and_open_source
Doug> can expect.]
Probably nobody has ever tried to do something weird here.
I think it would be safe for you to pick an approach that preserves
whatever sensible user scenarios there are. E.g., require that path
substitutions map full paths to full paths or something like that.
Tom