1 /* Handle OSF/1 shared libraries for GDB, the GNU Debugger.
2 Copyright 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 /* FIXME: Most of this code could be merged with solib.c by using
21 next_link_map_member and xfer_link_map_member in solib.c. */
25 #include <sys/types.h>
27 #include "gdb_string.h"
38 #include "gnu-regex.h"
43 #define MAX_PATH_SIZE 1024 /* FIXME: Should be dynamic */
45 /* When handling shared libraries, GDB has to find out the pathnames
46 of all shared libraries that are currently loaded (to read in their
47 symbols) and where the shared libraries are loaded in memory
48 (to relocate them properly from their prelinked addresses to the
49 current load address).
51 Under OSF/1 there are two possibilities to get at this information:
52 1) Peek around in the runtime loader structures.
53 These are not documented, and they are not defined in the system
54 header files. The definitions below were obtained by experimentation,
55 but they seem stable enough.
56 2) Use the undocumented libxproc.a library, which contains the
57 equivalent ldr_* routines.
58 This approach is somewhat cleaner, but it requires that the GDB
59 executable is dynamically linked. In addition it requires a
60 NAT_CLIBS= -lxproc -Wl,-expect_unresolved,ldr_process_context
61 linker specification for GDB and all applications that are using
63 We will use the peeking approach until it becomes unwieldy. */
65 #ifndef USE_LDR_ROUTINES
67 /* Definition of runtime loader structures, found by experimentation. */
68 #define RLD_CONTEXT_ADDRESS 0x3ffc0000000
76 CORE_ADDR modinfo_addr
;
81 CORE_ADDR regioninfo_addr
;
87 CORE_ADDR regionname_addr
;
103 static ldr_context_t ldr_context
;
108 static ldr_process_t fake_ldr_process
;
110 /* Called by ldr_* routines to read memory from the current target. */
112 static int ldr_read_memory
PARAMS ((CORE_ADDR
, char *, int, int));
115 ldr_read_memory (memaddr
, myaddr
, len
, readstring
)
126 target_read_string (memaddr
, &buffer
, len
, &result
);
128 strcpy (myaddr
, buffer
);
132 result
= target_read_memory (memaddr
, myaddr
, len
);
141 /* Define our own link_map structure.
142 This will help to share code with solib.c. */
145 CORE_ADDR l_offset
; /* prelink to load address offset */
146 char *l_name
; /* full name of loaded object */
147 ldr_module_info_t module_info
; /* corresponding module info */
150 #define LM_OFFSET(so) ((so) -> lm.l_offset)
151 #define LM_NAME(so) ((so) -> lm.l_name)
154 struct so_list
*next
; /* next structure in linked list */
155 struct link_map lm
; /* copy of link map from inferior */
156 struct link_map
*lmaddr
; /* addr in inferior lm was read from */
157 CORE_ADDR lmend
; /* upper addr bound of mapped object */
158 char so_name
[MAX_PATH_SIZE
]; /* shared object lib name (FIXME) */
159 char symbols_loaded
; /* flag: symbols read in yet? */
160 char from_tty
; /* flag: print msgs? */
161 struct objfile
*objfile
; /* objfile for loaded lib */
162 struct section_table
*sections
;
163 struct section_table
*sections_end
;
164 struct section_table
*textsection
;
168 static struct so_list
*so_list_head
; /* List of known shared objects */
171 fdmatch
PARAMS ((int, int)); /* In libiberty */
173 /* Local function prototypes */
176 sharedlibrary_command
PARAMS ((char *, int));
179 info_sharedlibrary_command
PARAMS ((char *, int));
182 symbol_add_stub
PARAMS ((char *));
184 static struct so_list
*
185 find_solib
PARAMS ((struct so_list
*));
187 static struct link_map
*
188 first_link_map_member
PARAMS ((void));
190 static struct link_map
*
191 next_link_map_member
PARAMS ((struct so_list
*));
194 xfer_link_map_member
PARAMS ((struct so_list
*, struct link_map
*));
197 solib_map_sections
PARAMS ((struct so_list
*));
203 solib_map_sections -- open bfd and build sections for shared lib
207 static void solib_map_sections (struct so_list *so)
211 Given a pointer to one of the shared objects in our list
212 of mapped objects, use the recorded name to open a bfd
213 descriptor for the object, build a section table, and then
214 relocate all the section addresses by the base address at
215 which the shared object was mapped.
219 In most (all?) cases the shared object file name recorded in the
220 dynamic linkage tables will be a fully qualified pathname. For
221 cases where it isn't, do we really mimic the systems search
222 mechanism correctly in the below code (particularly the tilde
227 solib_map_sections (so
)
231 char *scratch_pathname
;
233 struct section_table
*p
;
234 struct cleanup
*old_chain
;
237 filename
= tilde_expand (so
-> so_name
);
238 old_chain
= make_cleanup (free
, filename
);
240 scratch_chan
= openp (getenv ("PATH"), 1, filename
, O_RDONLY
, 0,
242 if (scratch_chan
< 0)
244 scratch_chan
= openp (getenv ("LD_LIBRARY_PATH"), 1, filename
,
245 O_RDONLY
, 0, &scratch_pathname
);
247 if (scratch_chan
< 0)
249 perror_with_name (filename
);
251 /* Leave scratch_pathname allocated. bfd->name will point to it. */
253 abfd
= bfd_fdopenr (scratch_pathname
, gnutarget
, scratch_chan
);
256 close (scratch_chan
);
257 error ("Could not open `%s' as an executable file: %s",
258 scratch_pathname
, bfd_errmsg (bfd_get_error ()));
260 /* Leave bfd open, core_xfer_memory and "info files" need it. */
262 abfd
-> cacheable
= true;
264 if (!bfd_check_format (abfd
, bfd_object
))
266 error ("\"%s\": not in executable format: %s.",
267 scratch_pathname
, bfd_errmsg (bfd_get_error ()));
269 if (build_section_table (abfd
, &so
-> sections
, &so
-> sections_end
))
271 error ("Can't find the file sections in `%s': %s",
272 bfd_get_filename (exec_bfd
), bfd_errmsg (bfd_get_error ()));
275 for (p
= so
-> sections
; p
< so
-> sections_end
; p
++)
277 /* Relocate the section binding addresses as recorded in the shared
278 object's file by the offset to get the address to which the
279 object was actually mapped. */
280 p
-> addr
+= LM_OFFSET (so
);
281 p
-> endaddr
+= LM_OFFSET (so
);
282 so
-> lmend
= (CORE_ADDR
) max (p
-> endaddr
, so
-> lmend
);
283 if (STREQ (p
-> the_bfd_section
-> name
, ".text"))
285 so
-> textsection
= p
;
289 /* Free the file names, close the file now. */
290 do_cleanups (old_chain
);
297 first_link_map_member -- locate first member in dynamic linker's map
301 static struct link_map *first_link_map_member (void)
305 Read in a copy of the first member in the inferior's dynamic
306 link map from the inferior's dynamic linker structures, and return
307 a pointer to the copy in our address space.
310 static struct link_map
*
311 first_link_map_member ()
313 struct link_map
*lm
= NULL
;
314 static struct link_map first_lm
;
316 #ifdef USE_LDR_ROUTINES
317 ldr_module_t mod_id
= LDR_NULL_MODULE
;
320 fake_ldr_process
= ldr_core_process ();
321 ldr_set_core_reader (ldr_read_memory
);
322 ldr_xdetach (fake_ldr_process
);
323 if (ldr_xattach (fake_ldr_process
) != 0
324 || ldr_next_module(fake_ldr_process
, &mod_id
) != 0
325 || mod_id
== LDR_NULL_MODULE
326 || ldr_inq_module(fake_ldr_process
, mod_id
,
327 &first_lm
.module_info
, sizeof(ldr_module_info_t
),
331 CORE_ADDR ldr_context_addr
;
333 if (target_read_memory ((CORE_ADDR
) RLD_CONTEXT_ADDRESS
,
334 (char *) &ldr_context_addr
,
335 sizeof (CORE_ADDR
)) != 0
336 || target_read_memory (ldr_context_addr
,
337 (char *) &ldr_context
,
338 sizeof (ldr_context_t
)) != 0
339 || target_read_memory ((CORE_ADDR
) ldr_context
.head
,
340 (char *) &first_lm
.module_info
,
341 sizeof (ldr_module_info_t
)) != 0)
347 /* The first entry is for the main program and should be skipped. */
353 static struct link_map
*
354 next_link_map_member (so_list_ptr
)
355 struct so_list
*so_list_ptr
;
357 struct link_map
*lm
= NULL
;
358 static struct link_map next_lm
;
359 #ifdef USE_LDR_ROUTINES
360 ldr_module_t mod_id
= so_list_ptr
->lm
.module_info
.lmi_modid
;
363 if (ldr_next_module(fake_ldr_process
, &mod_id
) != 0
364 || mod_id
== LDR_NULL_MODULE
365 || ldr_inq_module(fake_ldr_process
, mod_id
,
366 &next_lm
.module_info
, sizeof(ldr_module_info_t
),
371 lm
->l_name
= lm
->module_info
.lmi_name
;
373 CORE_ADDR ldr_context_addr
;
375 /* Reread context in case ldr_context.tail was updated. */
377 if (target_read_memory ((CORE_ADDR
) RLD_CONTEXT_ADDRESS
,
378 (char *) &ldr_context_addr
,
379 sizeof (CORE_ADDR
)) != 0
380 || target_read_memory (ldr_context_addr
,
381 (char *) &ldr_context
,
382 sizeof (ldr_context_t
)) != 0
383 || so_list_ptr
->lm
.module_info
.modinfo_addr
== ldr_context
.tail
384 || target_read_memory (so_list_ptr
->lm
.module_info
.next
,
385 (char *) &next_lm
.module_info
,
386 sizeof (ldr_module_info_t
)) != 0)
390 lm
->l_name
= lm
->module_info
.module_name
;
396 xfer_link_map_member (so_list_ptr
, lm
)
397 struct so_list
*so_list_ptr
;
401 so_list_ptr
->lm
= *lm
;
403 /* OSF/1 shared libraries are pre-linked to particular addresses,
404 but the runtime loader may have to relocate them if the
405 address ranges of the libraries used by the target executable clash,
406 or if the target executable is linked with the -taso option.
407 The offset is the difference between the address where the shared
408 library is mapped and the pre-linked address of the shared library.
410 FIXME: GDB is currently unable to relocate the shared library
411 sections by different offsets. If sections are relocated by
412 different offsets, put out a warning and use the offset of the
413 first section for all remaining sections. */
414 LM_OFFSET (so_list_ptr
) = 0;
416 /* There is one entry that has no name (for the inferior executable)
417 since it is not a shared object. */
418 if (LM_NAME (so_list_ptr
) != 0)
421 #ifdef USE_LDR_ROUTINES
422 int len
= strlen (LM_NAME (so_list_ptr
) + 1);
424 if (len
> MAX_PATH_SIZE
)
426 strncpy (so_list_ptr
->so_name
, LM_NAME (so_list_ptr
), MAX_PATH_SIZE
);
427 so_list_ptr
->so_name
[MAX_PATH_SIZE
- 1] = '\0';
429 for (i
= 0; i
< lm
->module_info
.lmi_nregion
; i
++)
431 ldr_region_info_t region_info
;
433 CORE_ADDR region_offset
;
435 if (ldr_inq_region (fake_ldr_process
, lm
->module_info
.lmi_modid
,
436 i
, ®ion_info
, sizeof (region_info
),
439 region_offset
= (CORE_ADDR
) region_info
.lri_mapaddr
440 - (CORE_ADDR
) region_info
.lri_vaddr
;
442 LM_OFFSET (so_list_ptr
) = region_offset
;
443 else if (LM_OFFSET (so_list_ptr
) != region_offset
)
444 warning ("cannot handle shared library relocation for %s (%s)",
445 so_list_ptr
->so_name
, region_info
.lri_name
);
450 target_read_string ((CORE_ADDR
) LM_NAME (so_list_ptr
), &buffer
,
451 MAX_PATH_SIZE
- 1, &errcode
);
453 error ("xfer_link_map_member: Can't read pathname for load map: %s\n",
454 safe_strerror (errcode
));
455 strncpy (so_list_ptr
->so_name
, buffer
, MAX_PATH_SIZE
- 1);
457 so_list_ptr
->so_name
[MAX_PATH_SIZE
- 1] = '\0';
459 for (i
= 0; i
< lm
->module_info
.region_count
; i
++)
461 ldr_region_info_t region_info
;
462 CORE_ADDR region_offset
;
464 if (target_read_memory (lm
->module_info
.regioninfo_addr
465 + i
* sizeof (region_info
),
466 (char *) ®ion_info
,
467 sizeof (region_info
)) != 0)
469 region_offset
= region_info
.mapaddr
- region_info
.vaddr
;
471 LM_OFFSET (so_list_ptr
) = region_offset
;
472 else if (LM_OFFSET (so_list_ptr
) != region_offset
)
475 target_read_string (region_info
.regionname_addr
, &buffer
,
476 MAX_PATH_SIZE
- 1, &errcode
);
478 region_name
= buffer
;
481 warning ("cannot handle shared library relocation for %s (%s)",
482 so_list_ptr
->so_name
, region_name
);
488 solib_map_sections (so_list_ptr
);
496 find_solib -- step through list of shared objects
500 struct so_list *find_solib (struct so_list *so_list_ptr)
504 This module contains the routine which finds the names of any
505 loaded "images" in the current process. The argument in must be
506 NULL on the first call, and then the returned value must be passed
507 in on subsequent calls. This provides the capability to "step" down
508 the list of loaded objects. On the last object, a NULL value is
511 The arg and return value are "struct link_map" pointers, as defined
515 static struct so_list
*
516 find_solib (so_list_ptr
)
517 struct so_list
*so_list_ptr
; /* Last lm or NULL for first one */
519 struct so_list
*so_list_next
= NULL
;
520 struct link_map
*lm
= NULL
;
523 if (so_list_ptr
== NULL
)
525 /* We are setting up for a new scan through the loaded images. */
526 if ((so_list_next
= so_list_head
) == NULL
)
528 /* Find the first link map list member. */
529 lm
= first_link_map_member ();
534 /* We have been called before, and are in the process of walking
535 the shared library list. Advance to the next shared object. */
536 lm
= next_link_map_member (so_list_ptr
);
537 so_list_next
= so_list_ptr
-> next
;
539 if ((so_list_next
== NULL
) && (lm
!= NULL
))
541 /* Get next link map structure from inferior image and build a local
542 abbreviated load_map structure */
543 new = (struct so_list
*) xmalloc (sizeof (struct so_list
));
544 memset ((char *) new, 0, sizeof (struct so_list
));
546 /* Add the new node as the next node in the list, or as the root
547 node if this is the first one. */
548 if (so_list_ptr
!= NULL
)
550 so_list_ptr
-> next
= new;
557 xfer_link_map_member (new, lm
);
559 return (so_list_next
);
562 /* A small stub to get us past the arg-passing pinhole of catch_errors. */
565 symbol_add_stub (arg
)
568 register struct so_list
*so
= (struct so_list
*) arg
; /* catch_errs bogon */
569 CORE_ADDR text_addr
= 0;
571 if (so
-> textsection
)
572 text_addr
= so
-> textsection
-> addr
;
575 asection
*lowest_sect
;
577 /* If we didn't find a mapped non zero sized .text section, set up
578 text_addr so that the relocation in symbol_file_add does no harm. */
580 lowest_sect
= bfd_get_section_by_name (so
-> abfd
, ".text");
581 if (lowest_sect
== NULL
)
582 bfd_map_over_sections (so
-> abfd
, find_lowest_section
,
585 text_addr
= bfd_section_vma (so
-> abfd
, lowest_sect
) + LM_OFFSET (so
);
588 so
-> objfile
= symbol_file_add (so
-> so_name
, so
-> from_tty
,
598 solib_add -- add a shared library file to the symtab and section list
602 void solib_add (char *arg_string, int from_tty,
603 struct target_ops *target)
610 solib_add (arg_string
, from_tty
, target
)
613 struct target_ops
*target
;
615 register struct so_list
*so
= NULL
; /* link map state variable */
617 /* Last shared library that we read. */
618 struct so_list
*so_last
= NULL
;
624 if ((re_err
= re_comp (arg_string
? arg_string
: ".")) != NULL
)
626 error ("Invalid regexp: %s", re_err
);
630 /* Add the shared library sections to the section table of the
631 specified target, if any. */
634 /* Count how many new section_table entries there are. */
637 while ((so
= find_solib (so
)) != NULL
)
639 if (so
-> so_name
[0])
641 count
+= so
-> sections_end
- so
-> sections
;
649 /* We must update the to_sections field in the core_ops structure
650 here, otherwise we dereference a potential dangling pointer
651 for each call to target_read/write_memory within this routine. */
652 update_coreops
= core_ops
.to_sections
== target
->to_sections
;
654 /* Reallocate the target's section table including the new size. */
655 if (target
-> to_sections
)
657 old
= target
-> to_sections_end
- target
-> to_sections
;
658 target
-> to_sections
= (struct section_table
*)
659 xrealloc ((char *)target
-> to_sections
,
660 (sizeof (struct section_table
)) * (count
+ old
));
665 target
-> to_sections
= (struct section_table
*)
666 xmalloc ((sizeof (struct section_table
)) * count
);
668 target
-> to_sections_end
= target
-> to_sections
+ (count
+ old
);
670 /* Update the to_sections field in the core_ops structure
674 core_ops
.to_sections
= target
->to_sections
;
675 core_ops
.to_sections_end
= target
->to_sections_end
;
678 /* Add these section table entries to the target's table. */
679 while ((so
= find_solib (so
)) != NULL
)
681 if (so
-> so_name
[0])
683 count
= so
-> sections_end
- so
-> sections
;
684 memcpy ((char *) (target
-> to_sections
+ old
),
686 (sizeof (struct section_table
)) * count
);
693 /* Now add the symbol files. */
695 while ((so
= find_solib (so
)) != NULL
)
697 if (so
-> so_name
[0] && re_exec (so
-> so_name
))
699 so
-> from_tty
= from_tty
;
700 if (so
-> symbols_loaded
)
704 printf_unfiltered ("Symbols already loaded for %s\n", so
-> so_name
);
707 else if (catch_errors
708 (symbol_add_stub
, (char *) so
,
709 "Error while reading shared library symbols:\n",
713 so
-> symbols_loaded
= 1;
718 /* Getting new symbols may change our opinion about what is
721 reinit_frame_cache ();
728 info_sharedlibrary_command -- code for "info sharedlibrary"
732 static void info_sharedlibrary_command ()
736 Walk through the shared library list and print information
737 about each attached library.
741 info_sharedlibrary_command (ignore
, from_tty
)
745 register struct so_list
*so
= NULL
; /* link map state variable */
748 if (exec_bfd
== NULL
)
750 printf_unfiltered ("No exec file.\n");
753 while ((so
= find_solib (so
)) != NULL
)
755 if (so
-> so_name
[0])
757 unsigned long txt_start
= 0;
758 unsigned long txt_end
= 0;
762 printf_unfiltered("%-20s%-20s%-12s%s\n", "From", "To", "Syms Read",
763 "Shared Object Library");
766 if (so
-> textsection
)
768 txt_start
= (unsigned long) so
-> textsection
-> addr
;
769 txt_end
= (unsigned long) so
-> textsection
-> endaddr
;
771 printf_unfiltered ("%-20s", local_hex_string_custom (txt_start
, "08l"));
772 printf_unfiltered ("%-20s", local_hex_string_custom (txt_end
, "08l"));
773 printf_unfiltered ("%-12s", so
-> symbols_loaded
? "Yes" : "No");
774 printf_unfiltered ("%s\n", so
-> so_name
);
777 if (so_list_head
== NULL
)
779 printf_unfiltered ("No shared libraries loaded at this time.\n");
787 solib_address -- check to see if an address is in a shared lib
791 char *solib_address (CORE_ADDR address)
795 Provides a hook for other gdb routines to discover whether or
796 not a particular address is within the mapped address space of
797 a shared library. Any address between the base mapping address
798 and the first address beyond the end of the last mapping, is
799 considered to be within the shared library address space, for
802 For example, this routine is called at one point to disable
803 breakpoints which are in shared libraries that are not currently
808 solib_address (address
)
811 register struct so_list
*so
= 0; /* link map state variable */
813 while ((so
= find_solib (so
)) != NULL
)
815 if (so
-> so_name
[0] && so
-> textsection
)
817 if ((address
>= (CORE_ADDR
) so
-> textsection
-> addr
) &&
818 (address
< (CORE_ADDR
) so
-> textsection
-> endaddr
))
819 return (so
->so_name
);
825 /* Called by free_all_symtabs */
830 struct so_list
*next
;
835 if (so_list_head
-> sections
)
837 free ((PTR
)so_list_head
-> sections
);
839 if (so_list_head
-> abfd
)
841 bfd_filename
= bfd_get_filename (so_list_head
-> abfd
);
842 if (!bfd_close (so_list_head
-> abfd
))
843 warning ("cannot close \"%s\": %s",
844 bfd_filename
, bfd_errmsg (bfd_get_error ()));
847 /* This happens for the executable on SVR4. */
850 next
= so_list_head
-> next
;
852 free ((PTR
)bfd_filename
);
853 free ((PTR
)so_list_head
);
862 solib_create_inferior_hook -- shared library startup support
866 void solib_create_inferior_hook()
870 When gdb starts up the inferior, it nurses it along (through the
871 shell) until it is ready to execute it's first instruction. At this
872 point, this function gets called via expansion of the macro
873 SOLIB_CREATE_INFERIOR_HOOK.
874 For a statically bound executable, this first instruction is the
875 one at "_start", or a similar text label. No further processing is
877 For a dynamically bound executable, this first instruction is somewhere
878 in the rld, and the actual user executable is not yet mapped in.
879 We continue the inferior again, rld then maps in the actual user
880 executable and any needed shared libraries and then sends
882 At that point we discover the names of all shared libraries and
883 read their symbols in.
887 This code does not properly handle hitting breakpoints which the
888 user might have set in the rld itself. Proper handling would have
889 to check if the SIGTRAP happened due to a kill call.
891 Also, what if child has exit()ed? Must exit loop somehow.
895 solib_create_inferior_hook()
898 /* Nothing to do for statically bound executables. */
900 if (symfile_objfile
== NULL
901 || symfile_objfile
->obfd
== NULL
902 || ((bfd_get_file_flags (symfile_objfile
->obfd
) & DYNAMIC
) == 0))
905 /* Now run the target. It will eventually get a SIGTRAP, at
906 which point all of the libraries will have been mapped in and we
907 can go groveling around in the rld structures to find
908 out what we need to know about them. */
910 clear_proceed_status ();
911 stop_soon_quietly
= 1;
912 stop_signal
= TARGET_SIGNAL_0
;
915 target_resume (-1, 0, stop_signal
);
916 wait_for_inferior ();
918 while (stop_signal
!= TARGET_SIGNAL_TRAP
);
920 /* solib_add will call reinit_frame_cache.
921 But we are stopped in the runtime loader and we do not have symbols
922 for the runtime loader. So heuristic_proc_start will be called
923 and will put out an annoying warning.
924 Delaying the resetting of stop_soon_quietly until after symbol loading
925 suppresses the warning. */
927 solib_add ((char *) 0, 0, (struct target_ops
*) 0);
928 stop_soon_quietly
= 0;
936 sharedlibrary_command -- handle command to explicitly add library
940 static void sharedlibrary_command (char *args, int from_tty)
947 sharedlibrary_command (args
, from_tty
)
952 solib_add (args
, from_tty
, (struct target_ops
*) 0);
958 add_com ("sharedlibrary", class_files
, sharedlibrary_command
,
959 "Load shared object library symbols for files matching REGEXP.");
960 add_info ("sharedlibrary", info_sharedlibrary_command
,
961 "Status of loaded shared object libraries.");
964 (add_set_cmd ("auto-solib-add", class_support
, var_zinteger
,
965 (char *) &auto_solib_add
,
966 "Set autoloading of shared library symbols.\n\
967 If nonzero, symbols from all shared object libraries will be loaded\n\
968 automatically when the inferior begins execution or when the dynamic linker\n\
969 informs gdb that a new library has been loaded. Otherwise, symbols\n\
970 must be loaded manually, using `sharedlibrary'.",