aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/hppa-tdep.c1
-rw-r--r--gdb/somsolib.c36
3 files changed, 46 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ffb2bd9..6e4a122 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 8832f9e..b503ed2 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -708,6 +708,7 @@ rp_saved (pc)
switch (u->stub_type)
{
case EXPORT:
+ case IMPORT:
return -24;
case PARAMETER_RELOCATION:
return -8;
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 67d12ab..0418bd9 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -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)
{