aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-tdep.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-10-01 13:17:57 +0000
committerYao Qi <yao@codesourcery.com>2013-10-01 13:17:57 +0000
commit64870a42a92fd40e6b94d5a0632fbe1431a68d42 (patch)
tree37b6d6c724e88befceb97db968cd6551593c54b1 /gdb/windows-tdep.c
parent97ad458125294fc16d151177c5278ea3288dfbce (diff)
downloadgdb-64870a42a92fd40e6b94d5a0632fbe1431a68d42.zip
gdb-64870a42a92fd40e6b94d5a0632fbe1431a68d42.tar.gz
gdb-64870a42a92fd40e6b94d5a0632fbe1431a68d42.tar.bz2
gdb/
* 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.
Diffstat (limited to 'gdb/windows-tdep.c')
-rw-r--r--gdb/windows-tdep.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index f90323f..fbbca0c 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -31,6 +31,8 @@
#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;
@@ -427,7 +429,7 @@ windows_xfer_shared_library (const char* so_name, CORE_ADDR load_addr,
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,
@@ -481,6 +483,22 @@ init_w32_command_list (void)
}
}
+/* 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;