Change len's type to ULONGEST: remote_read_bytes and get_core_siginfo
[deliverable/binutils-gdb.git] / gdb / i386-cygwin-tdep.c
index 2bb216b99ccc24b60a91d825e5825374e664e9fd..4b8a00dee1c261b055b8fc4958f6f7278c14131f 100644 (file)
@@ -1,7 +1,6 @@
 /* Target-dependent code for Cygwin running on i386's, for GDB.
 
-   Copyright (C) 2003, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2003-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 #include "defs.h"
 #include "osabi.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "i386-tdep.h"
 #include "windows-tdep.h"
 #include "regset.h"
 #include "gdb_obstack.h"
 #include "xml-support.h"
 #include "gdbcore.h"
-#include "solib.h"
-#include "solib-target.h"
 #include "inferior.h"
 
 /* Core file support.  */
@@ -130,7 +127,7 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj)
   size_t module_name_size;
   CORE_ADDR base_addr;
 
-  char *buf = NULL;
+  gdb_byte *buf = NULL;
 
   if (strncmp (sect->name, ".module", 7) != 0)
     return;
@@ -155,9 +152,9 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj)
   module_name_size =
     extract_unsigned_integer (buf + 8, 4, byte_order);
 
-  module_name = buf + 12;
-  if (module_name - buf + module_name_size > bfd_get_section_size (sect))
+  if (12 + module_name_size > bfd_get_section_size (sect))
     goto out;
+  module_name = (char *) buf + 12;
 
   /* The first module is the .exe itself.  */
   if (data->module_count != 0)
@@ -174,7 +171,7 @@ out:
 static LONGEST
 windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
                                  gdb_byte *readbuf,
-                                 ULONGEST offset, LONGEST len)
+                                 ULONGEST offset, ULONGEST len)
 {
   struct obstack obstack;
   const char *buf;
@@ -234,6 +231,8 @@ i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
+  windows_init_abi (info, gdbarch);
+
   set_gdbarch_skip_trampoline_code (gdbarch, i386_cygwin_skip_trampoline_code);
 
   set_gdbarch_skip_main_prologue (gdbarch, i386_skip_main_prologue);
@@ -244,8 +243,6 @@ i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   tdep->gregset_num_regs = ARRAY_SIZE (i386_windows_gregset_reg_offset);
   tdep->sizeof_gregset = I386_WINDOWS_SIZEOF_GREGSET;
 
-  set_solib_ops (gdbarch, &solib_target_so_ops);
-
   /* Core file support.  */
   set_gdbarch_regset_from_core_section
     (gdbarch, i386_windows_regset_from_core_section);
@@ -254,10 +251,6 @@ i386_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
   set_gdbarch_core_pid_to_str (gdbarch, i386_windows_core_pid_to_str);
 
   set_gdbarch_auto_wide_charset (gdbarch, i386_cygwin_auto_wide_charset);
-
-  /* Canonical paths on this target look like
-     `c:\Program Files\Foo App\mydll.dll', for example.  */
-  set_gdbarch_has_dos_based_file_system (gdbarch, 1);
 }
 
 static enum gdb_osabi
@@ -265,8 +258,6 @@ i386_cygwin_osabi_sniffer (bfd *abfd)
 {
   char *target_name = bfd_get_target (abfd);
 
-  /* Interix also uses pei-i386.
-     We need a way to distinguish between the two. */
   if (strcmp (target_name, "pei-i386") == 0)
     return GDB_OSABI_CYGWIN;
 
This page took 0.041481 seconds and 4 git commands to generate.