This is the mail archive of the 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: Build question

On Fri, 2009-08-21 at 15:56 -0600, Tom Tromey wrote:
> >>>>> "Danny" == Danny Backx <> writes:
> Danny> I am building i386-mingw32ce-gdb (or arm-mingw32ce-gdb). The targets
> Danny> specified are Windows CE based, so they all have this "DOS BASED" file
> Danny> system. So why test this at run time ?
> IIUC, the problem is that gdb doesn't really differentiate between
> target file names and host file names.  This matters because some things
> are searched for on the host but some on the target.
> If you want to always define HAVE_DOS_BASED_FILE_SYSTEM, I guess that is
> possible.  It is hard to picture when that would be appropriate for CVS
> GDB, though, due to --enable-targets=all.
> If you don't want to mix different kinds of file names, then could you
> further explain this note?
> It looks to me that the "good" scenario here mixes Unix-like and
> DOS-like filenames, but I don't understand that.

Looks like I didn't think this through completely.

Yes, the "good" scenario does mix things source and target file names (I
guess the "info share" will always do that). If the file names have
different syntax, then this is potentially hard.

Without going too deep : without changes, gdbserver reports Windows file
names. The gdb will try to find these locally (mixup 1), then if it
fails, try to separate path from file name (mixup 2), and then try to
find the file name locally again.

In a cross-debugging case, mixup 1 is almost certain to fail. That
doesn't bother me much. The other issue is, though. I've shown the issue
with "info share" but obviously the impact goes further than that : if
gdb can't find the DLL locally then its debugging capabilities will be

I can think of several ways out of this.
1. The one I suggested earlier. May not be the right solution.
2. Generalize target filename handling in gdb. Might be much harder than
3. Separate directory and file name in the communication between
   gdbserver and gdb, so mixup 2 is avoided.
4. Extend gdbserver/gdb communication so the target file name syntax
   is reported back.
5. Do (4) but in gdb target properties (this may be what Eli said).
   Would require extending the gdb target definitions.

Comments ?

Danny Backx ; danny.backx - at - ;

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