* somsolib.c (auto_solib_add_at_startup): Define new global variable.

(som_solib_create_inferior_hook): Don't add libraries if
	auto_solib_add_at_startup is zero.
	(_initialize_som_solib): Add command to toggle
	auto_solib_add_at_startup.
This commit is contained in:
Jeff Law 1995-09-13 14:50:51 +00:00
parent 5be86c5672
commit 2e977a3ae4
2 changed files with 32 additions and 1 deletions

View File

@ -1,3 +1,11 @@
Wed Sep 13 08:45:02 1995 Jeff Law (law@fast.cs.utah.edu)
* somsolib.c (auto_solib_add_at_startup): Define new global variable.
(som_solib_create_inferior_hook): Don't add libraries if
auto_solib_add_at_startup is zero.
(_initialize_som_solib): Add command to toggle
auto_solib_add_at_startup.
Tue Sep 12 19:37:24 1995 Jeff Law (law@snake.cs.utah.edu)
* monitor.c (monitor_make_srec): Fix thinkos in computation

View File

@ -34,6 +34,7 @@ and by Cygnus Support. */
#include "objfiles.h"
#include "inferior.h"
#include "gdb-stabs.h"
#include "gdbcmd.h"
/* TODO:
@ -95,6 +96,17 @@ struct so_list
struct so_list *next;
};
/* If true, then shared library symbols will be added automatically
when the inferior is created. This is almost always what users
will want to have happen; but for very large programs, the startup
time will be excessive, and so if this is a problem, the user can
clear this flag and then add the shared library symbols as needed.
Note that there is a potential for confusion, since if the shared
library symbols are not loaded, commands like "info fun" will *not*
report all the functions that are actually present. */
int auto_solib_add_at_startup = 1;
static struct so_list *so_list_head;
static void som_sharedlibrary_info_command PARAMS ((char *, int));
@ -559,7 +571,8 @@ som_solib_create_inferior_hook()
return;
}
som_solib_add ((char *) 0, 0, (struct target_ops *) 0);
if (auto_solib_add_at_startup)
som_solib_add ((char *) 0, 0, (struct target_ops *) 0);
}
/* Return the GOT value for the shared library in which ADDR belongs. If
@ -692,4 +705,14 @@ _initialize_som_solib ()
"Load shared object library symbols for files matching REGEXP.");
add_info ("sharedlibrary", som_sharedlibrary_info_command,
"Status of loaded shared object libraries.");
add_show_from_set
(add_set_cmd ("auto-solib-add", class_support, var_zinteger,
(char *) &auto_solib_add_at_startup,
"Set autoloading of shared library symbols at startup.\n\
If nonzero, symbols from all shared object libraries will be loaded\n\
automatically when the inferior begins execution. Otherwise, symbols\n\
must be loaded manually, using `sharedlibrary'.",
&setlist),
&showlist);
}