Wed Mar 4 16:50:18 1998 Jason Molenda (crash@bugshack.cygnus.com)
[deliverable/binutils-gdb.git] / gdb / xcoffsolib.c
index 0c98bece55e3b65c8f90bf161cc5b22bf4ce7fc7..13d8065ea1d3c213933c56eca4959fc8db992477 100644 (file)
@@ -16,7 +16,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #if 0
 #include <sys/types.h>
@@ -27,6 +27,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "bfd.h"
 #include "xcoffsolib.h"
 #include "inferior.h"
+#include "command.h"
+
+/* Hook to relocate symbols at runtime.  If gdb is build natively, this
+   hook is initialized in by rs6000-nat.c.  If not, it is currently left
+   NULL and never called. */
+
+void (*xcoff_relocate_symtab_hook) PARAMS ((unsigned int)) = NULL;
 
 #ifdef SOLIB_SYMBOLS_MANUAL
 
@@ -159,7 +166,8 @@ solib_info (args, from_tty)
   struct vmap *vp = vmap;
 
   /* Check for new shared libraries loaded with load ().  */
-  xcoff_relocate_symtab (inferior_pid);
+  if (xcoff_relocate_symtab_hook != NULL)
+    (*xcoff_relocate_symtab_hook) (inferior_pid);
 
   if (vp == NULL || vp->nxt == NULL)
     {
@@ -194,7 +202,8 @@ sharedlibrary_command (args, from_tty)
   dont_repeat ();
 
   /* Check for new shared libraries loaded with load ().  */
-  xcoff_relocate_symtab (inferior_pid);
+  if (xcoff_relocate_symtab_hook != NULL)
+    (*xcoff_relocate_symtab_hook) (inferior_pid);
 
 #ifdef SOLIB_SYMBOLS_MANUAL
   solib_add (args, from_tty, (struct target_ops *)0);
This page took 0.025982 seconds and 4 git commands to generate.