Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Finding source files under Cygwin
@ 2002-09-13 17:57 Earl Chew
  2002-09-13 21:40 ` Finding source files under cygwin Christopher Faylor
  2002-09-16 12:07 ` Finding source files under Cygwin Earl Chew
  0 siblings, 2 replies; 8+ messages in thread
From: Earl Chew @ 2002-09-13 17:57 UTC (permalink / raw)
  To: gdb-patches

I have object files compiled that have directory names such as:

	D:/xxx/yyy/zzz

embedded in them. In source.c, open_source_file() tries to use
this information to locate the source files.

Unfortunately, it gets confused because the directory gets
substituted for $cdir, and the embedded colon confuses
openp() which considers two separate path components: D and
/xxx/yyy/zzz.

One fix I can think of is to fix open_source_file() using
#ifdef __CYGWIN__ to silently subsitute /cygdrive/d/xxx/yyy/zzz
instead.

A variation on this is to make the fix in buildsym.c instead
(ie store the corrected version of the directory instead of
patching it later). I don't think this is the best way to go.

Another fix is to make source.c use ; (semicolon) as a path
separator instead of : (colon) should HAVE_DOS_BASED_FILE_SYSTEM
be true. The downside here is that it might be surprising
to current cygwin users.

A variation is to have open_source_file() build a new path string,
replacing : with ; (under HAVE_DOS_BASED_FILE_SYSTEM), and have
openp deal with ;. Thus the user interface sees : -- but internally
openp breaks up the path at ;.

Sigh.

Earl


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-09-16 22:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13 17:57 Finding source files under Cygwin Earl Chew
2002-09-13 21:40 ` Finding source files under cygwin Christopher Faylor
2002-09-16 12:07 ` Finding source files under Cygwin Earl Chew
2002-09-16 12:48   ` Finding source files under cygwin Christopher Faylor
2002-09-16 13:14   ` Finding source files under Cygwin Earl Chew
2002-09-16 13:37   ` [RFC PATCH] Finding files in source trees (was Re: Finding source files under Cygwin) Earl Chew
2002-09-16 15:02     ` Daniel Jacobowitz
2002-09-16 15:17       ` Earl Chew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox