2009-12-02 Tristan Gingold <gingold@adacore.com>
[deliverable/binutils-gdb.git] / gdb / i386-cygwin-tdep.c
index af1db70e171fc421f66b5912fd9319172c431340..56fb049c13f2f52b9cdf07e0286f7e4046918a0b 100644 (file)
@@ -113,6 +113,7 @@ i386_windows_regset_from_core_section (struct gdbarch *gdbarch,
 
 struct cpms_data
 {
+  struct gdbarch *gdbarch;
   struct obstack *obstack;
   int module_count;
 };
@@ -121,6 +122,7 @@ static void
 core_process_module_section (bfd *abfd, asection *sect, void *obj)
 {
   struct cpms_data *data = obj;
+  enum bfd_endian byte_order = gdbarch_byte_order (data->gdbarch);
 
   char *module_name;
   size_t module_name_size;
@@ -146,10 +148,10 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj)
   /* A DWORD (data_type) followed by struct windows_core_module_info.  */
 
   base_addr =
-    extract_unsigned_integer (buf + 4, 4);
+    extract_unsigned_integer (buf + 4, 4, byte_order);
 
   module_name_size =
-    extract_unsigned_integer (buf + 8, 4);
+    extract_unsigned_integer (buf + 8, 4, byte_order);
 
   module_name = buf + 12;
   if (module_name - buf + module_name_size > bfd_get_section_size (sect))
@@ -157,7 +159,8 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj)
 
   /* The first module is the .exe itself.  */
   if (data->module_count != 0)
-    windows_xfer_shared_library (module_name, base_addr, data->obstack);
+    windows_xfer_shared_library (module_name, base_addr,
+                                data->gdbarch, data->obstack);
   data->module_count++;
 
 out:
@@ -174,7 +177,7 @@ windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
   struct obstack obstack;
   const char *buf;
   LONGEST len_avail;
-  struct cpms_data data = { &obstack, 0 };
+  struct cpms_data data = { gdbarch, &obstack, 0 };
 
   obstack_init (&obstack);
   obstack_grow_str (&obstack, "<library-list>\n");
@@ -199,7 +202,7 @@ windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
 static CORE_ADDR
 i386_cygwin_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
 {
-  return i386_pe_skip_trampoline_code (pc, NULL);
+  return i386_pe_skip_trampoline_code (frame, pc, NULL);
 }
 
 static void
This page took 0.023936 seconds and 4 git commands to generate.