This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

libiberty patch for gdb cross-debugging support


Hi,

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 . I mistakenly believed
I had to talk to the binutils maintainers about this.

I'm including a proposed patch that has been created with guidance
from the gdb maintainers and later the binutils list. But obviously this
is on your territory.

Is this the way to handle this type of change ?

Please comment, I'm prepared to do the extra work necessary to make this
fit into everyone's standards.

Thanks,

        Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
/* Support for filesystem naming differences (DOS filesystems).
   Copyright (C) 2009 Free Software Foundation, Inc.
   Written by Danny Backx.

   This file is part of the libiberty library.
   Libiberty is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   Libiberty is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with libiberty; see the file COPYING.LIB.  If
   not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
   Boston, MA 02110-1301, USA.  */

#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
static int _have_dos_based_file_system = 1;
#else
static int _have_dos_based_file_system = 0;
#endif

int have_dos_based_file_system(void)
{
	return _have_dos_based_file_system;
}

void set_dos_based_file_system(int v)
{
	_have_dos_based_file_system = v;
}

Attachment: gdb-dos-5
Description: Text document


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