From 4cdcf3b9b33f22f90ba24fa198dc60d6086a6549 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 20 Apr 1993 20:21:40 +0000 Subject: [PATCH] * xcoffexec.c (xcoff_relocate_core): If no exec file, error() rather than dumping core. --- gdb/ChangeLog | 5 ++++- gdb/xcoffexec.c | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0b359ce47f4..51428465615 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,7 +1,10 @@ Tue Apr 20 08:55:11 1993 Jim Kingdon (kingdon@cygnus.com) + * xcoffexec.c (xcoff_relocate_core): If no exec file, error() + rather than dumping core. + * Makefile.in: Add ${srcdir}/ to all source files. - (alldeps.mak): Add "${srcdir}/" to files in alldeps.mak. + (alldeps.mak): Add "${srcdir}/" to files when generating alldeps.mak. (TAGS): Deal with srcdir and new config directory scheme. createtags: Remove. Makefile.in (NONSRC): Remove createtags. diff --git a/gdb/xcoffexec.c b/gdb/xcoffexec.c index 400d3cd914d..c9654889b42 100644 --- a/gdb/xcoffexec.c +++ b/gdb/xcoffexec.c @@ -868,12 +868,18 @@ xcoff_relocate_core () int offset = 0; struct ld_info *ldip; struct vmap *vp; - + /* Allocated size of buffer. */ int buffer_size = LDINFO_SIZE; char *buffer = xmalloc (buffer_size); struct cleanup *old = make_cleanup (free_current_contents, &buffer); + /* FIXME, this restriction should not exist. For now, though I'll + avoid coredumps with error() pending a real fix. */ + if (vmap == NULL) + error + ("Can't debug a core file without an executable file (on the RS/6000)"); + ldinfo_sec = bfd_get_section_by_name (core_bfd, ".ldinfo"); if (ldinfo_sec == NULL) { -- 2.30.2