/* 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.
#include "inferior.h"
#include "gdbthread.h"
#include "solist.h"
+#include "solib.h"
#ifdef USE_LDR_ROUTINES
# include <loader.h>
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. */
tp = inferior_thread ();
clear_proceed_status ();
- stop_soon = STOP_QUIETLY;
+ inf->stop_soon = STOP_QUIETLY;
tp->stop_signal = TARGET_SIGNAL_0;
do
{
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
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++)
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. */