* i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
[deliverable/binutils-gdb.git] / gdb / solib-osf.c
index 00f1cd278a5955e44aa3da410b94c262ca34f57a..5bd2895eed9162718d5dd9279f239c246d83d892 100644 (file)
@@ -1,7 +1,7 @@
 /* Handle OSF/1, Digital UNIX, and Tru64 shared libraries
    for GDB, the GNU Debugger.
-   Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2007, 2008
-   Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2007, 2008,
+   2009 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -53,7 +53,9 @@
 #include "objfiles.h"
 #include "target.h"
 #include "inferior.h"
+#include "gdbthread.h"
 #include "solist.h"
+#include "solib.h"
 
 #ifdef USE_LDR_ROUTINES
 # include <loader.h>
@@ -232,7 +234,7 @@ fetch_sec_names (struct lm_info *lmi)
 
 static void
 osf_relocate_section_addresses (struct so_list *so,
-                               struct section_table *sec)
+                               struct target_section *sec)
 {
   struct lm_info *lmi;
   struct lm_sec lms_key, *lms;
@@ -306,9 +308,14 @@ osf_clear_solib (void)
 static void
 osf_solib_create_inferior_hook (void)
 {
+  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 (attach_flag)
+  if (inf->attach_flag)
     return;
 
   /* Nothing to do for statically bound executables.  */
@@ -330,15 +337,16 @@ osf_solib_create_inferior_hook (void)
   if (!target_can_run (&current_target))
     return;
 
+  tp = inferior_thread ();
   clear_proceed_status ();
-  stop_soon = STOP_QUIETLY;
-  stop_signal = TARGET_SIGNAL_0;
+  inf->stop_soon = STOP_QUIETLY;
+  tp->stop_signal = TARGET_SIGNAL_0;
   do
     {
-      target_resume (minus_one_ptid, 0, stop_signal);
+      target_resume (minus_one_ptid, 0, tp->stop_signal);
       wait_for_inferior (0);
     }
-  while (stop_signal != TARGET_SIGNAL_TRAP);
+  while (tp->stop_signal != TARGET_SIGNAL_TRAP);
 
   /*  solib_add will call reinit_frame_cache.
      But we are stopped in the runtime loader and we do not have symbols
@@ -347,7 +355,7 @@ osf_solib_create_inferior_hook (void)
      Delaying the resetting of stop_soon until after symbol loading
      suppresses the warning.  */
   solib_add ((char *) 0, 0, (struct target_ops *) 0, auto_solib_add);
-  stop_soon = NO_STOP_QUIETLY;
+  inf->stop_soon = NO_STOP_QUIETLY;
 }
 
 /* target_so_ops callback.  Do additional symbol handling, lookup, etc. after
@@ -416,8 +424,8 @@ init_so (struct so_list *so, char *name, int isloader, int nsecs)
   memcpy (so->so_name, so->so_original_name, namelen + 1);
 
   /* Allocate section space.  */
-  so->lm_info = xmalloc ((unsigned) &(((struct lm_info *)0)->secs) +
-                        nsecs * sizeof *so->lm_info);
+  so->lm_info = xmalloc (sizeof (struct lm_info)
+                         + (nsecs - 1) * sizeof (struct lm_sec));
   so->lm_info->isloader = isloader;
   so->lm_info->nsecs = nsecs;
   for (i = 0; i < nsecs; i++)
@@ -576,7 +584,7 @@ osf_open_symbol_file_object (void *from_ttyp)
   int found;
 
   if (symfile_objfile)
-    if (!query ("Attempt to reload symbols from process? "))
+    if (!query (_("Attempt to reload symbols from process? ")))
       return 0;
 
   /* The first module after /sbin/loader is the main program.  */
@@ -606,7 +614,7 @@ osf_in_dynsym_resolve_code (CORE_ADDR pc)
      for the user: When stepping inside a subprogram located in a shared
      library, gdb might stop inside the dynamic loader code instead of
      inside the subprogram itself. See the explanations in infrun.c about
-     the IN_SOLIB_DYNSYM_RESOLVE_CODE macro for more details. */
+     the in_solib_dynsym_resolve_code() function for more details. */
   return 0;
 }
 
This page took 0.027678 seconds and 4 git commands to generate.