/* Handle shared libraries for GDB, the GNU Debugger.
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GDB.
struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
return *ops;
}
+
+/* Set the solib operations for GDBARCH to NEW_OPS. */
+
+void
+set_solib_ops (struct gdbarch *gdbarch, struct target_so_ops *new_ops)
+{
+ struct target_so_ops **ops = gdbarch_data (gdbarch, solib_data);
+ *ops = new_ops;
+}
\f
/* external data declarations */
-/* FIXME: gdbarch needs to control this variable */
+/* FIXME: gdbarch needs to control this variable, or else every
+ configuration needs to call set_solib_ops. */
struct target_so_ops *current_target_so_ops;
/* local data declarations */
int addr_width;
/* "0x", a little whitespace, and two hex digits per byte of pointers. */
- addr_width = 4 + (TARGET_PTR_BIT / 4);
+ addr_width = 4 + (gdbarch_ptr_bit (current_gdbarch) / 4);
update_solib_list (from_tty, 0);