aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffexec.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-04-20 20:21:40 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-04-20 20:21:40 +0000
commit4cdcf3b9b33f22f90ba24fa198dc60d6086a6549 (patch)
tree374fe8cee7007f4676d6280ed176bbeb48a3c1e6 /gdb/xcoffexec.c
parentc0d63d1b60b72316516449ca6f4e33f6a0275e03 (diff)
downloadgdb-4cdcf3b9b33f22f90ba24fa198dc60d6086a6549.zip
gdb-4cdcf3b9b33f22f90ba24fa198dc60d6086a6549.tar.gz
gdb-4cdcf3b9b33f22f90ba24fa198dc60d6086a6549.tar.bz2
* xcoffexec.c (xcoff_relocate_core): If no exec file, error()
rather than dumping core.
Diffstat (limited to 'gdb/xcoffexec.c')
-rw-r--r--gdb/xcoffexec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/xcoffexec.c b/gdb/xcoffexec.c
index 400d3cd..c965488 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)
{