2002-01-07 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Mon, 7 Jan 2002 19:45:14 +0000 (19:45 +0000)
committerMichael Snyder <msnyder@vmware.com>
Mon, 7 Jan 2002 19:45:14 +0000 (19:45 +0000)
* solib-legacy.c (legacy_svr4_fetch_link_map_offsets):
Don't use exec_bfd if it's NULL.

gdb/ChangeLog
gdb/solib-legacy.c

index 96fb5573606566c4785b2475c17b6d4dfecb45d5..96c45d3223e2f11c891179069898af94ca1283aa 100644 (file)
@@ -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. 
index 2e32e187f0ad47dc906e8ce7e4cecdf7baa9da2f..a7a4f7e043c571879544dccfceaabcd1d47d8c7f 100644 (file)
@@ -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