/* 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, 2002
Free Software Foundation, Inc.
This file is part of GDB.
#include "symfile.h"
#include "objfiles.h"
#include "completer.h"
+#include "value.h"
#ifdef USG
#include <sys/types.h>
void _initialize_exec (void);
-extern int info_verbose;
-
/* The target vector for executable files. */
struct target_ops exec_ops;
*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;
}
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)
{
return 0;
}
+/* Find mapped memory. */
+
+extern void
+exec_set_find_memory_regions (int (*func) (int (*) (CORE_ADDR,
+ unsigned long,
+ int, int, int,
+ void *),
+ void *))
+{
+ exec_ops.to_find_memory_regions = func;
+}
+
+static char *exec_make_note_section (bfd *, int *);
+
/* Fill in the exec file target vector. Very few entries need to be
defined. */
-void
+static void
init_exec_ops (void)
{
exec_ops.to_shortname = "exec";
exec_ops.to_clone_and_follow_inferior = find_default_clone_and_follow_inferior;
exec_ops.to_stratum = file_stratum;
exec_ops.to_has_memory = 1;
+ exec_ops.to_make_corefile_notes = exec_make_note_section;
exec_ops.to_magic = OPS_MAGIC;
}
add_target (&exec_ops);
}
+
+static char *
+exec_make_note_section (bfd *obfd, int *note_size)
+{
+ error ("Can't create a corefile");
+}