/* Target-dependent code for Cygwin running on i386's, for GDB.
- Copyright (C) 2003, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GDB.
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))
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 const char *
+i386_cygwin_auto_wide_charset (void)
+{
+ return "UTF-16";
}
static void
(gdbarch, i386_windows_regset_from_core_section);
set_gdbarch_core_xfer_shared_libraries
(gdbarch, windows_core_xfer_shared_libraries);
+
+ 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