aboutsummaryrefslogtreecommitdiff
path: root/gdb/somsolib.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-10-13 17:05:53 +0000
committerJeff Law <law@redhat.com>1995-10-13 17:05:53 +0000
commit95037710caf0f84b0adc1d366c8b92eda8aeb255 (patch)
treeb5c40957e4e50393f5a51977438561a1b8ee0114 /gdb/somsolib.c
parenta1fe883fd031cc24c18dc4d21bbca8069641d212 (diff)
downloadfsf-binutils-gdb-95037710caf0f84b0adc1d366c8b92eda8aeb255.zip
fsf-binutils-gdb-95037710caf0f84b0adc1d366c8b92eda8aeb255.tar.gz
fsf-binutils-gdb-95037710caf0f84b0adc1d366c8b92eda8aeb255.tar.bz2
* somsolib.c (som_solib_add): Just give a warning if a file
mentioned in the dld_list can't be found. Warning seems more reasonable than croaking. * config/pa/tm-hppah.h (FRAME_SAVED_PC_IN_SIGTRAMP): Dig out the PC from the PC queues rather than %r31. Fixes net bug. Might also fix one of the hpux10 corefile.exp failures, not sure (will test when I get back monday morning).
Diffstat (limited to 'gdb/somsolib.c')
-rw-r--r--gdb/somsolib.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index 2744e5c..595752c 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -234,6 +234,7 @@ som_solib_add (arg_string, from_tty, target)
struct so_list *new_so;
struct so_list *so_list = so_list_head;
struct section_table *p;
+ struct stat statbuf;
if (addr == 0)
break;
@@ -268,7 +269,22 @@ som_solib_add (arg_string, from_tty, target)
so_list = so_list->next;
}
- /* We've already loaded this one or it's the main program, skip it. */
+ /* See if the file exists. If not, give a warning, but don't
+ die. */
+ status = stat (name, &statbuf);
+ if (status == -1)
+ {
+ warning ("Can't find file %s referenced in dld_list.", name);
+
+ status = target_read_memory (addr + 36, buf, 4);
+ if (status != 0)
+ goto err;
+
+ addr = (CORE_ADDR) extract_unsigned_integer (buf, 4);
+ continue;
+ }
+
+ /* If we've already loaded this one or it's the main program, skip it. */
if (so_list || !strcmp (name, symfile_objfile->name))
{
status = target_read_memory (addr + 36, buf, 4);