* Rename remote-es1800.c to remote-es.c
[deliverable/binutils-gdb.git] / gdb / exec.c
index eb6a85a12ce185e7c98829982c0ed443509aca4b..ef78097ea44760a21f091eec5e53046a0c14465f 100644 (file)
@@ -35,6 +35,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <ctype.h>
 #include <sys/stat.h>
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
 
 /* Prototypes for local functions */
 
@@ -135,7 +138,7 @@ exec_file_command (args, from_tty)
       make_cleanup (free, filename);
       
       scratch_chan = openp (getenv ("PATH"), 1, filename, 
-                           write_files? O_RDWR: O_RDONLY, 0,
+                           write_files? O_RDWR|O_BINARY: O_RDONLY|O_BINARY, 0,
                            &scratch_pathname);
       if (scratch_chan < 0)
        perror_with_name (filename);
@@ -233,8 +236,6 @@ build_section_table (some_bfd, start, end)
   unsigned count;
 
   count = bfd_count_sections (some_bfd);
-  if (count == 0)
-    abort();   /* return 1? */
   if (*start)
     free ((PTR)*start);
   *start = (struct section_table *) xmalloc (count * sizeof (**start));
@@ -328,7 +329,7 @@ xfer_memory (memaddr, myaddr, len, write, target)
        wanna_xfer = coredata;
       }
 #endif                         /* REG_STACK_SEGMENT */
-#endif FIXME
+#endif /* FIXME */
 \f
 void
 print_section_info (t, abfd)
@@ -407,16 +408,18 @@ struct target_ops exec_ops = {
        "Use an executable file as a target.\n\
 Specify the filename of the executable file.",
        exec_file_command, exec_close, /* open, close */
-       child_attach, 0, 0, 0, /* attach, detach, resume, wait, */
+       find_default_attach, 0, 0, 0, /* attach, detach, resume, wait, */
        0, 0, /* fetch_registers, store_registers, */
-       0, 0, 0, /* prepare_to_store, conv_to, conv_from, */
+       0, /* prepare_to_store, */
        xfer_memory, exec_files_info,
        0, 0, /* insert_breakpoint, remove_breakpoint, */
        0, 0, 0, 0, 0, /* terminal stuff */
        0, 0, /* kill, load */
        0, /* lookup sym */
-       child_create_inferior,
+       find_default_create_inferior,
        0, /* mourn_inferior */
+       0, /* can_run */
+       0, /* notice_signals */
        file_stratum, 0, /* next */
        0, 1, 0, 0, 0,  /* all mem, mem, stack, regs, exec */
        0, 0,                   /* section pointers */
This page took 0.023882 seconds and 4 git commands to generate.