aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-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 96fb557..96c45d3 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 2e32e18..a7a4f7e 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