* hppa-tdep.c (rp_saved): Handle IMPORT stubs too.
* somsolib.c (som_solib_add): Check the value of __dld_flags, if it indicates __dld_list is not valid return an error. If it indicates that libraries were not mapped privately, issue a warning.
This commit is contained in:
parent
63ba709f37
commit
c2e00af68e
3 changed files with 46 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
Fri Nov 11 10:51:07 1994 Jeff Law (law@snake.cs.utah.edu)
|
||||
|
||||
* hppa-tdep.c (rp_saved): Handle IMPORT stubs too.
|
||||
|
||||
* somsolib.c (som_solib_add): Check the value of __dld_flags, if
|
||||
it indicates __dld_list is not valid return an error. If it
|
||||
indicates that libraries were not mapped privately, issue a
|
||||
warning.
|
||||
|
||||
Thu Nov 10 23:17:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||
|
||||
* symfile.c (syms_from_objfile): Only call find_lowest_section if
|
||||
|
|
|
@ -708,6 +708,7 @@ rp_saved (pc)
|
|||
switch (u->stub_type)
|
||||
{
|
||||
case EXPORT:
|
||||
case IMPORT:
|
||||
return -24;
|
||||
case PARAMETER_RELOCATION:
|
||||
return -8;
|
||||
|
|
|
@ -83,8 +83,44 @@ som_solib_add (arg_string, from_tty, target)
|
|||
struct minimal_symbol *msymbol;
|
||||
CORE_ADDR addr;
|
||||
int status;
|
||||
unsigned int dld_flags;
|
||||
char buf[4];
|
||||
|
||||
/* If we're debugging a core file, or have attached to a running
|
||||
process, then som_solib_create_inferior_hook will not have been
|
||||
called.
|
||||
|
||||
We need to examine __dld_flags to determine if the shared library
|
||||
list is valid, and to determine if the libraries have been privately
|
||||
mapped. */
|
||||
msymbol = lookup_minimal_symbol ("__dld_flags", (struct objfile *) NULL);
|
||||
if (msymbol == NULL)
|
||||
{
|
||||
error ("Unable to find __dld_flags symbol in object file.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
addr = SYMBOL_VALUE_ADDRESS (msymbol);
|
||||
/* Read the current contents. */
|
||||
status = target_read_memory (addr, buf, 4);
|
||||
if (status != 0)
|
||||
{
|
||||
error ("Unable to read __dld_flags\n");
|
||||
return;
|
||||
}
|
||||
dld_flags = extract_unsigned_integer (buf, 4);
|
||||
|
||||
/* __dld_list may not be valid. If it's not valid tell the user. */
|
||||
if ((dld_flags & 4) == 0)
|
||||
{
|
||||
error ("__dld_list is not valid according to __dld_flags.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the libraries were not mapped private, warn the user. */
|
||||
if ((dld_flags & 1) == 0)
|
||||
warning ("The shared libraries were not privately mapped;\nsetting a breakpoint in a shared library will not work.\n");
|
||||
|
||||
msymbol = lookup_minimal_symbol ("__dld_list", (struct objfile *) NULL);
|
||||
if (!msymbol)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue