+2013-10-01 Yao Qi <yao@codesourcery.com>
+
+ * amd64-windows-tdep.c: Remove inclusion of "solib.h" and
+ "solib-target.h".
+ (amd64_windows_init_abi): Don't call set_solib_ops and
+ set_gdbarch_iterate_over_objfiles_in_search_order. Call
+ windows_init_abi instead.
+ * i386-cygwin-tdep.c: Remove inclusion of "solib.h" and
+ "solib-target.h".
+ (i386_cygwin_init_abi): Don't call set_solib_ops,
+ set_gdbarch_has_dos_based_file_system and
+ set_gdbarch_iterate_over_objfiles_in_search_order. Call
+ windows_init_abi instead.
+ * windows-tdep.c: Include "solib.h" and "solib-target.h".
+ (windows_init_abi): New function.
+ (windows_iterate_over_objfiles_in_search_order): Make it
+ static.
+ * windows-tdep.h (windows_init_abi): Declare.
+ (windows_iterate_over_objfiles_in_search_order): Remove
+ declaration.
+
2013-10-01 Jerome Guitton <guitton@adacore.com>
Checked in by Joel Brobecker <brobecker@adacore.com>
#include "defs.h"
#include "osabi.h"
#include "amd64-tdep.h"
-#include "solib.h"
-#include "solib-target.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "regcache.h"
amd64_init_abi (info, gdbarch);
+ windows_init_abi (info, gdbarch);
+
/* On Windows, "long"s are only 32bit. */
set_gdbarch_long_bit (gdbarch, 32);
set_gdbarch_skip_trampoline_code (gdbarch,
amd64_windows_skip_trampoline_code);
- set_gdbarch_iterate_over_objfiles_in_search_order
- (gdbarch, windows_iterate_over_objfiles_in_search_order);
-
set_gdbarch_skip_prologue (gdbarch, amd64_windows_skip_prologue);
set_gdbarch_auto_wide_charset (gdbarch, amd64_windows_auto_wide_charset);
-
- set_solib_ops (gdbarch, &solib_target_so_ops);
}
/* -Wmissing-prototypes */
#include "gdb_obstack.h"
#include "xml-support.h"
#include "gdbcore.h"
-#include "solib.h"
-#include "solib-target.h"
#include "inferior.h"
/* Core file support. */
{
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);
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);
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);
-
- set_gdbarch_iterate_over_objfiles_in_search_order
- (gdbarch, windows_iterate_over_objfiles_in_search_order);
}
static enum gdb_osabi
#include "coff-pe-read.h"
#include "gdb_bfd.h"
#include "complaints.h"
+#include "solib.h"
+#include "solib-target.h"
struct cmd_list_element *info_w32_cmdlist;
to print the value of another global variable defined with the same
name, but in a different DLL. */
-void
+static void
windows_iterate_over_objfiles_in_search_order
(struct gdbarch *gdbarch,
iterate_over_objfiles_in_search_order_cb_ftype *cb,
}
}
+/* To be called from the various GDB_OSABI_CYGWIN handlers for the
+ various Windows architectures and machine types. */
+
+void
+windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ /* 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);
+
+ set_gdbarch_iterate_over_objfiles_in_search_order
+ (gdbarch, windows_iterate_over_objfiles_in_search_order);
+
+ set_solib_ops (gdbarch, &solib_target_so_ops);
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
extern initialize_file_ftype _initialize_windows_tdep;
struct gdbarch *gdbarch,
struct obstack *obstack);
-extern void windows_iterate_over_objfiles_in_search_order
- (struct gdbarch *gdbarch,
- iterate_over_objfiles_in_search_order_cb_ftype *cb,
- void *cb_data, struct objfile *current_objfile);
+extern void windows_init_abi (struct gdbarch_info info,
+ struct gdbarch *gdbarch);
#endif