aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-legacy.c
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 /gdb/solib-legacy.c
parenta9fa5e1fae49bae5b47503e13dbd61b9b890315d (diff)
downloadgdb-d0e1d48ef483c0b706f4ab3da46963a5881e4f04.zip
gdb-d0e1d48ef483c0b706f4ab3da46963a5881e4f04.tar.gz
gdb-d0e1d48ef483c0b706f4ab3da46963a5881e4f04.tar.bz2
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.
Diffstat (limited to 'gdb/solib-legacy.c')
-rw-r--r--gdb/solib-legacy.c7
1 files changed, 6 insertions, 1 deletions
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