From: Michael Snyder Date: Mon, 7 Jan 2002 19:45:14 +0000 (+0000) Subject: 2002-01-07 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0e1d48ef483c0b706f4ab3da46963a5881e4f04;p=binutils-gdb.git 2002-01-07 Michael Snyder * solib-legacy.c (legacy_svr4_fetch_link_map_offsets): Don't use exec_bfd if it's NULL. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 96fb5573606..96c45d3223e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-01-07 Michael Snyder + + * solib-legacy.c (legacy_svr4_fetch_link_map_offsets): + Don't use exec_bfd if it's NULL. + 2002-01-06 Mark Kettenis * valops.c (value_arg_coerce): Fix formatting. diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c index 2e32e187f0a..a7a4f7e043c 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