aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/cli/cli-dump.c26
2 files changed, 18 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 96c422a..673a629 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * cli/cli-dump.c: Change fopen modes to use binary open modes
+ as defined in include/fopen-bin.h throughout.
+
2002-08-08 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c: Minor whitespace and indentation clean-ups.
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 7aa6092..a648093 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -360,61 +360,61 @@ dump_filetype (char *cmd, char *mode, char *filetype)
static void
dump_srec_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "srec");
+ dump_memory_to_file (args, FOPEN_WB, "srec");
}
static void
dump_srec_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "srec");
+ dump_value_to_file (args, FOPEN_WB, "srec");
}
static void
dump_ihex_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "ihex");
+ dump_memory_to_file (args, FOPEN_WB, "ihex");
}
static void
dump_ihex_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "ihex");
+ dump_value_to_file (args, FOPEN_WB, "ihex");
}
static void
dump_tekhex_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "tekhex");
+ dump_memory_to_file (args, FOPEN_WB, "tekhex");
}
static void
dump_tekhex_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "tekhex");
+ dump_value_to_file (args, FOPEN_WB, "tekhex");
}
static void
dump_binary_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "w", "binary");
+ dump_memory_to_file (args, FOPEN_WB, "binary");
}
static void
dump_binary_value (char *args, int from_tty)
{
- dump_value_to_file (args, "w", "binary");
+ dump_value_to_file (args, FOPEN_WB, "binary");
}
static void
append_binary_memory (char *args, int from_tty)
{
- dump_memory_to_file (args, "a", "binary");
+ dump_memory_to_file (args, FOPEN_AB, "binary");
}
static void
append_binary_value (char *args, int from_tty)
{
- dump_value_to_file (args, "a", "binary");
+ dump_value_to_file (args, FOPEN_AB, "binary");
}
struct dump_context
@@ -442,7 +442,7 @@ add_dump_command (char *name, void (*func) (char *args, char *mode),
c->completer = filename_completer;
d = XMALLOC (struct dump_context);
d->func = func;
- d->mode = "wb";
+ d->mode = FOPEN_WB;
set_cmd_context (c, d);
c->func = call_dump_func;
@@ -450,7 +450,7 @@ add_dump_command (char *name, void (*func) (char *args, char *mode),
c->completer = filename_completer;
d = XMALLOC (struct dump_context);
d->func = func;
- d->mode = "ab";
+ d->mode = FOPEN_AB;
set_cmd_context (c, d);
c->func = call_dump_func;
@@ -547,7 +547,7 @@ restore_section_callback (bfd *ibfd, asection *isec, void *args)
static void
restore_binary_file (char *filename, struct callback_data *data)
{
- FILE *file = fopen_with_cleanup (filename, "r");
+ FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
int status;
char *buf;
long len;