* elflink.h (elf_bfd_final_link): Check if dynobj is not NULL
[binutils-gdb.git] / gdb / exec.c
index 29da0cc01001945d8795195683b53efd8b8321b1..6e4e85b4a1269d4a101c965231569a0fe41ddac5 100644 (file)
@@ -1,5 +1,6 @@
 /* Work with executable files, for GDB. 
-   Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1997, 1998, 2001
+   Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+   1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -28,6 +29,7 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "completer.h"
+#include "value.h"
 
 #ifdef USG
 #include <sys/types.h>
@@ -70,8 +72,6 @@ static void init_exec_ops (void);
 
 void _initialize_exec (void);
 
-extern int info_verbose;
-
 /* The target vector for executable files.  */
 
 struct target_ops exec_ops;
@@ -398,7 +398,7 @@ build_section_table (bfd *some_bfd, struct section_table **start,
   *end = *start;
   bfd_map_over_sections (some_bfd, add_to_section_table, (char *) end);
   if (*end > *start + count)
-    abort ();
+    internal_error (__FILE__, __LINE__, "failed internal consistency check");
   /* We could realloc the table, but it probably loses for most files.  */
   return 0;
 }
@@ -485,10 +485,10 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
   struct section_table *p;
   CORE_ADDR nextsectaddr, memend;
   boolean (*xfer_fn) (bfd *, sec_ptr, PTR, file_ptr, bfd_size_type);
-  asection *section;
+  asection *section = NULL;
 
   if (len <= 0)
-    abort ();
+    internal_error (__FILE__, __LINE__, "failed internal consistency check");
 
   if (overlay_debugging)
     {