summaryrefslogtreecommitdiff
path: root/gdb/i386-cygwin-tdep.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-11-27 17:06:12 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-11-27 17:06:12 +0000
commit27a869e52455db99ae8532701a500d127fe5ee46 (patch)
tree7b53d769efe923acde3a2e46f98c95c9f58fca2a /gdb/i386-cygwin-tdep.c
parentf3c5ef43d2b3f174c727ed9dd4e352182ec7704b (diff)
downloadgdb-27a869e52455db99ae8532701a500d127fe5ee46.tar.gz
* Makefile.in (ALL_TARGET_OBS): Remove object files that require
64-bit CORE_ADDR and BFD support, move them to ... (ALL_64_TARGET_OBS): ... this new variable. * configure.ac: Check for --enable-64-bit-bfd option. Only add 64-bit targets with --enable-targets=all if BFD supports 64-bit. * configure: Regenerate. * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Do not claim all elf32-i386 executables, only cygwin core files.
Diffstat (limited to 'gdb/i386-cygwin-tdep.c')
-rw-r--r--gdb/i386-cygwin-tdep.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index b3111944fce..b79ec4a4ad0 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -252,9 +252,15 @@ i386_cygwin_osabi_sniffer (bfd *abfd)
if (strcmp (target_name, "pei-i386") == 0)
return GDB_OSABI_CYGWIN;
- /* Cygwin uses elf core dumps. */
+ /* Cygwin uses elf core dumps. Do not claim all ELF executables,
+ check whether there is a .reg section of proper size. */
if (strcmp (target_name, "elf32-i386") == 0)
- return GDB_OSABI_CYGWIN;
+ {
+ asection *section = bfd_get_section_by_name (abfd, ".reg");
+ if (section
+ && bfd_section_size (abfd, section) == I386_WIN32_SIZEOF_GREGSET)
+ return GDB_OSABI_CYGWIN;
+ }
return GDB_OSABI_UNKNOWN;
}