summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-01-07 19:45:14 +0000
committerMichael Snyder <msnyder@vmware.com>2002-01-07 19:45:14 +0000
commitd0e1d48ef483c0b706f4ab3da46963a5881e4f04 (patch)
tree9be3ea1b18e3b480823c05bea43b2490c556a793
parenta9fa5e1fae49bae5b47503e13dbd61b9b890315d (diff)
downloadppe42-binutils-d0e1d48ef483c0b706f4ab3da46963a5881e4f04.tar.gz
ppe42-binutils-d0e1d48ef483c0b706f4ab3da46963a5881e4f04.zip
2002-01-07 Michael Snyder <msnyder@redhat.com>
* solib-legacy.c (legacy_svr4_fetch_link_map_offsets): Don't use exec_bfd if it's NULL.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/solib-legacy.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 96fb557360..96c45d3223 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-07 Michael Snyder <msnyder@redhat.com>
+
+ * solib-legacy.c (legacy_svr4_fetch_link_map_offsets):
+ Don't use exec_bfd if it's NULL.
+
2002-01-06 Mark Kettenis <kettenis@gnu.org>
* valops.c (value_arg_coerce): Fix formatting.
diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c
index 2e32e187f0..a7a4f7e043 100644
--- a/gdb/solib-legacy.c
+++ b/gdb/solib-legacy.c
@@ -130,7 +130,12 @@ legacy_svr4_fetch_link_map_offsets (void)
#endif /* defined (HAVE_STRUCT_LINK_MAP32) */
#if defined (HAVE_STRUCT_LINK_MAP32)
- if (bfd_get_arch_size (exec_bfd) == 32)
+ if (exec_bfd != NULL)
+ {
+ if (bfd_get_arch_size (exec_bfd) == 32)
+ return lmp32;
+ }
+ else if (TARGET_PTR_BIT == 32)
return lmp32;
else
#endif
OpenPOWER on IntegriCloud