diff options
author | peter <peter@FreeBSD.org> | 1999-11-22 18:04:53 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-11-22 18:04:53 +0000 |
commit | 61388a47ab768a00b479e939f4a4cd11c056ec87 (patch) | |
tree | 16355bf6f43ebd0cb508f73c29f39045ac502d4e | |
parent | 2c7a9e5d5794d9e8bddf6a254ebc4e61fb70f85c (diff) | |
download | FreeBSD-src-61388a47ab768a00b479e939f4a4cd11c056ec87.zip FreeBSD-src-61388a47ab768a00b479e939f4a4cd11c056ec87.tar.gz |
Fix (I believe) Bill Paul's core dump when using gdb on shared executables.
This is an addition to rev 1.5. If lm == NULL, new->lm is uninitialized.
-rw-r--r-- | contrib/gdb/gdb/solib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/gdb/gdb/solib.c b/contrib/gdb/gdb/solib.c index 0612652..7f602f8 100644 --- a/contrib/gdb/gdb/solib.c +++ b/contrib/gdb/gdb/solib.c @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $FreeBSD$ */ #include "defs.h" @@ -1151,7 +1152,7 @@ find_solib (so_list_ptr, maybe_changed) SVR4, it has no name. For others (Solaris 2.3 for example), it does have a name, so we can no longer use a missing name to decide when to ignore it. */ - if (new && !IGNORE_FIRST_LINK_MAP_ENTRY (new -> lm)) + if (lm && new && !IGNORE_FIRST_LINK_MAP_ENTRY (new -> lm)) { int errcode; char *buffer; |