diff -ru gdb-20000610/bfd/bfd-in2.h gdb-new/bfd/bfd-in2.h --- gdb-20000610/bfd/bfd-in2.h Tue May 23 11:32:28 2000 +++ gdb-new/bfd/bfd-in2.h Sun Aug 20 12:41:14 2000 @@ -2750,6 +2750,12 @@ bfd_format format; + /* Set if we opened this BFD to read symbols. borland_tds_vec + (which is a debugging symbols target type only) uses this to + avoid matching as an executable type: */ + + boolean opened_for_symbols; + /* The direction the BFD was opened with*/ enum bfd_direction {no_direction = 0, @@ -3069,7 +3075,8 @@ bfd_target_versados_flavour, bfd_target_msdos_flavour, bfd_target_ovax_flavour, - bfd_target_evax_flavour + bfd_target_evax_flavour, + bfd_target_borland_flavour }; enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; diff -ru gdb-20000610/bfd/bfd.c gdb-new/bfd/bfd.c --- gdb-20000610/bfd/bfd.c Sat Dec 11 05:51:34 1999 +++ gdb-new/bfd/bfd.c Sat Aug 19 12:16:16 2000 @@ -92,6 +92,12 @@ . . bfd_format format; . +. {* Set if we opened this BFD to read symbols. borland_tds_vec +. (which is a debugging symbols target type only) uses this to +. avoid matching as an executable type: *} +. +. boolean opened_for_symbols; +. . {* The direction the BFD was opened with*} . . enum bfd_direction {no_direction = 0, diff -ru gdb-20000610/bfd/config.bfd gdb-new/bfd/config.bfd --- gdb-20000610/bfd/config.bfd Fri Jun 2 08:06:18 2000 +++ gdb-new/bfd/config.bfd Sun Aug 20 12:41:52 2000 @@ -360,7 +360,7 @@ ;; i[3456]86-*-mingw32* | i[3456]86-*-cygwin* | i[3456]86-*-winnt | i[3456]86-*-pe) targ_defvec=i386pe_vec - targ_selvecs="i386pe_vec i386pei_vec bfd_elf32_i386_vec" + targ_selvecs="borland_tds_vec i386pe_vec i386pei_vec bfd_elf32_i386_vec" ;; i[3456]86-none-*) targ_defvec=i386coff_vec diff -ru gdb-20000610/bfd/configure gdb-new/bfd/configure --- gdb-20000610/bfd/configure Sat Jun 10 03:21:44 2000 +++ gdb-new/bfd/configure Sun Aug 20 12:42:10 2000 @@ -5163,6 +5163,7 @@ target64=true ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" target64=true ;; + borland_tds_vec) tb="$tb borland.lo" ;; cisco_core_big_vec) tb="$tb cisco-core.lo" ;; cisco_core_little_vec) tb="$tb cisco-core.lo" ;; demo_64_vec) tb="$tb demo64.lo aout64.lo" diff -ru gdb-20000610/bfd/configure.in gdb-new/bfd/configure.in --- gdb-20000610/bfd/configure.in Sat Jun 10 03:21:34 2000 +++ gdb-new/bfd/configure.in Sun Aug 20 12:42:24 2000 @@ -520,6 +520,7 @@ target64=true ;; bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf" target64=true ;; + borland_tds_vec) tb="$tb borland.lo" ;; cisco_core_big_vec) tb="$tb cisco-core.lo" ;; cisco_core_little_vec) tb="$tb cisco-core.lo" ;; demo_64_vec) tb="$tb demo64.lo aout64.lo" diff -ru gdb-20000610/bfd/opncls.c gdb-new/bfd/opncls.c --- gdb-20000610/bfd/opncls.c Fri May 26 17:32:26 2000 +++ gdb-new/bfd/opncls.c Sun Aug 20 12:42:52 2000 @@ -75,6 +75,7 @@ nbfd->cacheable = false; nbfd->flags = BFD_NO_FLAGS; nbfd->mtime_set = false; + nbfd->opened_for_symbols = false; return nbfd; } diff -ru gdb-20000610/bfd/peicode.h gdb-new/bfd/peicode.h --- gdb-20000610/bfd/peicode.h Thu Apr 13 11:08:04 2000 +++ gdb-new/bfd/peicode.h Sat Aug 19 12:30:14 2000 @@ -221,8 +221,11 @@ correctly for a PEI file, check the e_magic number here, and, if it doesn't match, clobber the f_magic number so that we don't get a false match. */ + /* This is bogus - it makes an assumption about the distance between the + DOS header and the PE header. If the PE header isn't exactly, 0x80 bytes + from the DOS header, this will fail. if (bfd_h_get_16 (abfd, (bfd_byte *) filehdr_src->e_magic) != DOSMAGIC) - filehdr_dst->f_magic = -1; + filehdr_dst->f_magic = -1; */ #endif /* Other people's tools sometimes generate headers with an nsyms but diff -ru gdb-20000610/bfd/targets.c gdb-new/bfd/targets.c --- gdb-20000610/bfd/targets.c Fri May 12 16:07:04 2000 +++ gdb-new/bfd/targets.c Sun Aug 20 12:43:16 2000 @@ -153,7 +153,8 @@ . bfd_target_versados_flavour, . bfd_target_msdos_flavour, . bfd_target_ovax_flavour, -. bfd_target_evax_flavour +. bfd_target_evax_flavour, +. bfd_target_borland_flavour .}; . .enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; @@ -550,6 +551,7 @@ extern const bfd_target bfd_elf64_big_generic_vec; extern const bfd_target bfd_elf64_little_generic_vec; extern const bfd_target bfd_elf64_sparc_vec; +extern const bfd_target borland_tds_vec; extern const bfd_target demo_64_vec; extern const bfd_target ecoff_big_vec; extern const bfd_target ecoff_little_vec; @@ -754,6 +756,9 @@ #endif #if 0 &bfd_elf64_sparc_vec, +#endif +#if 0 + &borland_tds_vec, #endif /* We don't include cisco_core_*_vec. Although it has a magic number, the magic number isn't at the beginning of the file, and thus