* Makefile.in (gencode): Provide explicit path to gencode.c.
[deliverable/binutils-gdb.git] / gdb / somsolib.c
index 8bb3e79e950943b673e0a5c6c71926bbc6716d89..fe188ca460a0f8a314653b34f0af233f36f4b0df 100644 (file)
@@ -1,5 +1,6 @@
 /* Handle HP SOM shared libraries for GDB, the GNU Debugger.
-   Copyright 1993, 1996, 1999, 2001 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -39,6 +40,7 @@
 #include "gdbcmd.h"
 #include "assert.h"
 #include "language.h"
+#include "regcache.h"
 
 #include <fcntl.h>
 
@@ -876,7 +878,7 @@ som_solib_create_inferior_hook (void)
     }
 
   anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
-  store_unsigned_integer (buf, 4, inferior_pid);
+  store_unsigned_integer (buf, 4, PIDGET (inferior_ptid));
   status = target_write_memory (anaddr, buf, 4);
   if (status != 0)
     {
@@ -1029,14 +1031,6 @@ keep_going:
   clear_symtab_users ();
 }
 
-
-static void
-reset_inferior_pid (int saved_inferior_pid)
-{
-  inferior_pid = saved_inferior_pid;
-}
-
-
 /* This operation removes the "hook" between GDB and the dynamic linker,
    which causes the dld to notify GDB of shared library events.
 
@@ -1055,11 +1049,10 @@ som_solib_remove_inferior_hook (int pid)
   int status;
   char dld_flags_buffer[TARGET_INT_BIT / TARGET_CHAR_BIT];
   unsigned int dld_flags_value;
-  int saved_inferior_pid = inferior_pid;
-  struct cleanup *old_cleanups = make_cleanup (reset_inferior_pid, saved_inferior_pid);
+  struct cleanup *old_cleanups = save_inferior_ptid ();
 
   /* Ensure that we're really operating on the specified process. */
-  inferior_pid = pid;
+  inferior_ptid = pid_to_ptid (pid);
 
   /* We won't bother to remove the solib breakpoints from this process.
 
This page took 0.024297 seconds and 4 git commands to generate.