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);