* infrun.c (adjust_pc_after_break): Do not assume software single-step
[deliverable/binutils-gdb.git] / gdb / solib.c
index 0b5e2e3938c4436c2486b1c2c168d26d6f362034..4cdb3a532ccd3f73e5cc731fcb26e654c1aaacfa 100644 (file)
@@ -67,11 +67,21 @@ solib_ops (struct gdbarch *gdbarch)
   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 */
@@ -715,7 +725,7 @@ info_sharedlibrary_command (char *ignore, int from_tty)
   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);
 
This page took 0.024689 seconds and 4 git commands to generate.