Obvious fix: in entries for 1998-02-10 and 1998-02-06,
[deliverable/binutils-gdb.git] / gdb / solib.c
index 5f9743f909ce57e90b061f02af8999177f9d49b8..291ac3386a1e8c44b811bafd7a82b93b63a9767d 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle shared libraries for GDB, the GNU Debugger.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 98, 1999, 2000
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 98, 1999, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -37,6 +37,7 @@
 #include "environ.h"
 #include "language.h"
 #include "gdbcmd.h"
+#include "completer.h"
 
 #include "solist.h"
 
@@ -143,7 +144,7 @@ solib_open (char *in_pathname, char **found_pathname)
   /* Done.  If not found, tough luck.  Return found_file and 
      (optionally) found_pathname.  */
   if (found_pathname != NULL && temp_pathname != NULL)
-    *found_pathname = strsave (temp_pathname);
+    *found_pathname = xstrdup (temp_pathname);
   return found_file;
 }
 
@@ -616,8 +617,9 @@ info_sharedlibrary_command (char *ignore, int from_tty)
     }
   else
     {
-      internal_error ("%s:%d: bfd_get_arch_size() returned unknown size %d",
-                     __FILE__, __LINE__, arch_size);
+      internal_error (__FILE__, __LINE__,
+                     "bfd_get_arch_size() returned unknown size %d",
+                     arch_size);
     }
 
   update_solib_list (from_tty, 0);
@@ -636,14 +638,14 @@ info_sharedlibrary_command (char *ignore, int from_tty)
 
          printf_unfiltered ("%-*s", addr_width,
                             so->textsection != NULL 
-                              ? local_hex_string_custom (
-                                  (unsigned long) so->textsection->addr,
+                              ? longest_local_hex_string_custom (
+                                  (LONGEST) so->textsection->addr,
                                   addr_fmt)
                               : "");
          printf_unfiltered ("%-*s", addr_width,
                             so->textsection != NULL 
-                              ? local_hex_string_custom (
-                                  (unsigned long) so->textsection->endaddr,
+                              ? longest_local_hex_string_custom (
+                                  (LONGEST) so->textsection->endaddr,
                                   addr_fmt)
                               : "");
          printf_unfiltered ("%-12s", so->symbols_loaded ? "Yes" : "No");
@@ -763,6 +765,27 @@ solib_create_inferior_hook (void)
   TARGET_SO_SOLIB_CREATE_INFERIOR_HOOK ();
 }
 
+/* GLOBAL FUNCTION
+
+   in_solib_dynsym_resolve_code -- check to see if an address is in
+                                   dynamic loader's dynamic symbol
+                                  resolution code
+
+   SYNOPSIS
+
+   int in_solib_dynsym_resolve_code (CORE_ADDR pc)
+
+   DESCRIPTION
+
+   Determine if PC is in the dynamic linker's symbol resolution
+   code.  Return 1 if so, 0 otherwise.
+*/
+
+int
+in_solib_dynsym_resolve_code (CORE_ADDR pc)
+{
+  return TARGET_SO_IN_DYNSYM_RESOLVE_CODE (pc);
+}
 
 /*
 
@@ -789,6 +812,8 @@ sharedlibrary_command (char *args, int from_tty)
 void
 _initialize_solib (void)
 {
+  struct cmd_list_element *c;
+
   add_com ("sharedlibrary", class_files, sharedlibrary_command,
           "Load shared object library symbols for files matching REGEXP.");
   add_info ("sharedlibrary", info_sharedlibrary_command,
@@ -805,19 +830,19 @@ must be loaded manually, using `sharedlibrary'.",
                  &setlist),
      &showlist);
 
-  add_show_from_set
-    (add_set_cmd ("solib-absolute-prefix", class_support, var_filename,
-                 (char *) &solib_absolute_prefix,
-                 "Set prefix for loading absolute shared library symbol files.\n\
+  c = add_set_cmd ("solib-absolute-prefix", class_support, var_filename,
+                  (char *) &solib_absolute_prefix,
+                  "Set prefix for loading absolute shared library symbol files.\n\
 For other (relative) files, you can add values using `set solib-search-path'.",
-                 &setlist),
-     &showlist);
-  add_show_from_set
-    (add_set_cmd ("solib-search-path", class_support, var_string,
-                 (char *) &solib_search_path,
-                 "Set the search path for loading non-absolute shared library symbol files.\n\
-This takes precedence over the environment variables PATH and LD_LIBRARY_PATH.",
-                 &setlist),
-     &showlist);
+                  &setlist);
+  add_show_from_set (c, &showlist);
+  c->completer = filename_completer;
 
+  c = add_set_cmd ("solib-search-path", class_support, var_string,
+                  (char *) &solib_search_path,
+                  "Set the search path for loading non-absolute shared library symbol files.\n\
+This takes precedence over the environment variables PATH and LD_LIBRARY_PATH.",
+                  &setlist);
+  add_show_from_set (c, &showlist);
+  c->completer = filename_completer;
 }
This page took 0.025158 seconds and 4 git commands to generate.