struct cpms_data
{
+ struct gdbarch *gdbarch;
struct obstack *obstack;
int module_count;
};
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;
/* 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))
/* 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:
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");
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