* gas/mips/mips.exp (run_dump_test_arch): Check for the presence
[deliverable/binutils-gdb.git] / gdb / solib-irix.c
index 596f9a01a240700236866a2613e0b3d9533f8b88..303d3bfc3746a6dbacd27e7afb01aadef6ecd8bb 100644 (file)
@@ -163,6 +163,7 @@ fetch_lm_info (CORE_ADDR addr)
       CORE_ADDR obj_addr = extract_mips_address (&buf.ol32.data,
                                                 sizeof (buf.ol32.data),
                                                 byte_order);
+
       li.next = extract_mips_address (&buf.ol32.next,
                                      sizeof (buf.ol32.next), byte_order);
 
@@ -326,7 +327,6 @@ disable_break (void)
 {
   int status = 1;
 
-
   /* Note that breakpoint address and original contents are in our address
      space, so we just need to write the original contents back. */
 
@@ -392,7 +392,7 @@ enable_break (void)
 
    SYNOPSIS
 
-   void solib_create_inferior_hook ()
+   void solib_create_inferior_hook (int from_tty)
 
    DESCRIPTION
 
@@ -437,11 +437,23 @@ enable_break (void)
  */
 
 static void
-irix_solib_create_inferior_hook (void)
+irix_solib_create_inferior_hook (int from_tty)
 {
   struct inferior *inf;
   struct thread_info *tp;
 
+  inf = current_inferior ();
+
+  /* If we are attaching to the inferior, the shared libraries
+     have already been mapped, so nothing more to do.  */
+  if (inf->attach_flag)
+    return;
+
+  /* Likewise when debugging from a core file, the shared libraries
+     have already been mapped, so nothing more to do.  */
+  if (!target_can_run (&current_target))
+    return;
+
   if (!enable_break ())
     {
       warning (_("shared library handler failed to enable breakpoint"));
@@ -453,7 +465,6 @@ irix_solib_create_inferior_hook (void)
      can go groveling around in the dynamic linker structures to find
      out what we need to know about them. */
 
-  inf = current_inferior ();
   tp = inferior_thread ();
 
   clear_proceed_status ();
This page took 0.023796 seconds and 4 git commands to generate.