This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: bfd patch for gdb cross-debugging support


On Sun, 2009-09-13 at 19:40 -0700, Ian Lance Taylor wrote:
> Danny Backx <danny.backx@scarlet.be> writes:
> 
> > When using gdb as a cross-debugger from e.g. a linux development pc to a
> > windows ce target (e.g. an embedded system), the source and target can
> > have different filesystem naming standards.
> >
> > This causes gdb to have trouble locating the right file on the host, to
> > match the DLL loaded on the target : a path such as
> >   \network\x86\libgcc_s_sjlj-1.dll
> > doesn't get translated into
> >   /opt/x86mingw32ce/bin/libgcc_s_sjlj-1.dll
> > so some of the functionality in gdb doesn't work.
> >
> > The cause lies in macros in include/filenames.h which gdb inherits from
> > bfd. I'm including a proposed patch that has been created with guidance
> > from the gdb maintainers. But obviously this is on your territory.
> 
> > +#ifndef FALSE
> > +#define FALSE 0
> > +#endif
> > +#ifndef TRUE
> > +#define TRUE 1
> >  #endif
> 
> Please don't add unnecessary preprocessor macros.

Ah, I see that these are defined in bfd/bfd-in2.h . Am I to include that
inside filenames.h ?

The alternative appears to imply that all sources that include
filenames.h should also include bfd/bfd-in2.h .

> > +extern int have_dos_based_file_system;
> 
> If we're going to change this to require a .c file, I personally would
> much prefer to see a function based interface rather than one based on a
> global variable.

So I can change this variable into a function that reads the contents of
a static variable hidden in bfd/init.c or so ? Obviously then I'd also
have to implement a function to set its value, in the same source.

If I do this, is the consequence also that I replace all occurrences of
HAVE_DOS_BASED_FILE_SYSTEM by uses of this new function, or should I go
for a minimalistic change ?

Thanks,

	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


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