X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fi386-cygwin-tdep.c;h=56fb049c13f2f52b9cdf07e0286f7e4046918a0b;hb=9cce227f8cd3081662b208e0067b23547afa5a83;hp=af1db70e171fc421f66b5912fd9319172c431340;hpb=dc05df573e1aa9dc6e970734e85d22f2f8bc4047;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c index af1db70e17..56fb049c13 100644 --- a/gdb/i386-cygwin-tdep.c +++ b/gdb/i386-cygwin-tdep.c @@ -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, "\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