aboutsummaryrefslogtreecommitdiff
path: root/gdb/exec.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1992-09-15 06:27:18 +0000
committerStu Grossman <grossman@cygnus>1992-09-15 06:27:18 +0000
commita8e033f2a2dca7a104e66ab1351c46fc2c2baf03 (patch)
tree2a65792c4fd0585c290d7bf8a2bebafbe4f237dc /gdb/exec.c
parentb36e3a9b49aa9a2a24555e0a6a50f5cd3d5323b7 (diff)
downloadfsf-binutils-gdb-a8e033f2a2dca7a104e66ab1351c46fc2c2baf03.zip
fsf-binutils-gdb-a8e033f2a2dca7a104e66ab1351c46fc2c2baf03.tar.gz
fsf-binutils-gdb-a8e033f2a2dca7a104e66ab1351c46fc2c2baf03.tar.bz2
* breakpoint.c, core.c, exec.c, language.c, main.c, printcmd.c,
symfile.c, target.c, valprint.c: Use _filtered form of *printf. defs.h, utils.c: Make vfprintf_filtered global.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r--gdb/exec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/exec.c b/gdb/exec.c
index eb6a85a..79b07e4 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -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);
@@ -177,7 +180,7 @@ exec_file_command (args, from_tty)
(*exec_file_display_hook) (filename);
}
else if (from_tty)
- printf ("No exec file now.\n");
+ printf_filtered ("No exec file now.\n");
}
/* Set both the exec file and the symbol file, in one command.
@@ -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));