#include "completer.h"
#include "value.h"
#include "exec.h"
+#include "observer.h"
#include <fcntl.h>
#include "readline/readline.h"
static void exec_files_info (struct target_ops *);
-static int ignore (CORE_ADDR, char *);
+static int ignore (CORE_ADDR, bfd_byte *);
static void init_exec_ops (void);
/* Whether to open exec and core files read-only or read-write. */
int write_files = 0;
+static void
+show_write_files (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("Writing into executable and core files is %s.\n"),
+ value);
+}
+
struct vmap *vmap;
(*deprecated_exec_file_display_hook) (filename);
}
bfd_cache_close_all ();
+ observer_notify_executable_changed (NULL);
}
/* Process the first arg in ARGS as the new exec file.
if ((bfd_get_section_flags (abfd, sect) & SEC_LOAD) == 0)
return;
- if (DEPRECATED_STREQ (bfd_section_name (abfd, sect), ".text"))
+ if (strcmp (bfd_section_name (abfd, sect), ".text") == 0)
{
vp->tstart = bfd_section_vma (abfd, sect);
vp->tend = vp->tstart + bfd_section_size (abfd, sect);
vp->tvma = bfd_section_vma (abfd, sect);
vp->toffs = sect->filepos;
}
- else if (DEPRECATED_STREQ (bfd_section_name (abfd, sect), ".data"))
+ else if (strcmp (bfd_section_name (abfd, sect), ".data") == 0)
{
vp->dstart = bfd_section_vma (abfd, sect);
vp->dend = vp->dstart + bfd_section_size (abfd, sect);
we just tail-call it with more arguments to select between them. */
int
-xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target)
+xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
+ struct mem_attrib *attrib, struct target_ops *target)
{
int res;
struct section_table *p;
breakpoint_init_inferior). */
static int
-ignore (CORE_ADDR addr, char *contents)
+ignore (CORE_ADDR addr, bfd_byte *contents)
{
return 0;
}
Set writing into executable and core files."), _("\
Show writing into executable and core files."), NULL,
NULL,
- NULL, /* FIXME: i18n: */
+ show_write_files,
&setlist, &showlist);
add_target (&exec_ops);