diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-08-05 02:44:50 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-08-05 02:44:50 +0000 |
commit | 19842fe9a00159d9cb20ff3dc43bb0d0cda40452 (patch) | |
tree | a0d7ff144deb1c50d5d0e80dd940a29686edd0c5 | |
parent | 6fb473cee09e60c9fffe9604358d0bc5f10cf6c3 (diff) | |
download | gdb-19842fe9a00159d9cb20ff3dc43bb0d0cda40452.tar.gz |
2003-08-04 Andrew Cagney <cagney@redhat.com>
* monitor.h (monitor_dump_reg_block): Remove ATTR_FORMAT.
* cli/cli-script.c (define_command): Call query directly, instead
of passing it a buffer.
* ocd.c (ocd_error): Pass error a constant format string.
* remote-mips.c (mips_error): Use fputs_filtered.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/cli/cli-script.c | 7 | ||||
-rw-r--r-- | gdb/monitor.h | 8 | ||||
-rw-r--r-- | gdb/ocd.c | 2 | ||||
-rw-r--r-- | gdb/remote-mips.c | 2 |
5 files changed, 18 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c81d7f6114d..83ae7c429cd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2003-08-04 Andrew Cagney <cagney@redhat.com> + * monitor.h (monitor_dump_reg_block): Remove ATTR_FORMAT. + * cli/cli-script.c (define_command): Call query directly, instead + of passing it a buffer. + * ocd.c (ocd_error): Pass error a constant format string. + * remote-mips.c (mips_error): Use fputs_filtered. + * solib-svr4.c (_initialize_svr4_solib): Update register_gdbarch_data call. * mips-linux-tdep.c (_initialize_mips_linux_tdep): Ditto. diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 0f789bb1627..ab69ca49980 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -1092,11 +1092,12 @@ define_command (char *comname, int from_tty) if (c) { + int q; if (c->class == class_user || c->class == class_alias) - tem = "Redefine command \"%s\"? "; + q = query ("Redefine command \"%s\"? ", c->name); else - tem = "Really redefine built-in command \"%s\"? "; - if (!query (tem, c->name)) + q = query ("Really redefine built-in command \"%s\"? ", c->name); + if (!q) error ("Command \"%s\" not redefined.", c->name); } diff --git a/gdb/monitor.h b/gdb/monitor.h index 9141450d6ac..2f8ca22a454 100644 --- a/gdb/monitor.h +++ b/gdb/monitor.h @@ -245,8 +245,12 @@ extern void monitor_close (int quitting); extern char *monitor_supply_register (int regno, char *valstr); extern int monitor_expect (char *prompt, char *buf, int buflen); extern int monitor_expect_prompt (char *buf, int buflen); -extern void monitor_printf (char *, ...) ATTR_FORMAT (printf, 1, 2); -extern void monitor_printf_noecho (char *, ...) ATTR_FORMAT (printf, 1, 2); +/* Note: The variable argument functions monitor_printf and + monitor_printf_noecho vararg do not take take standard format style + arguments. Instead they take custom formats interpretered directly + by monitor_vsprintf. */ +extern void monitor_printf (char *, ...); +extern void monitor_printf_noecho (char *, ...); extern void monitor_write (char *buf, int buflen); extern int monitor_readchar (void); extern char *monitor_get_dev_name (void); diff --git a/gdb/ocd.c b/gdb/ocd.c index 3c8d5d2936d..6b381592345 100644 --- a/gdb/ocd.c +++ b/gdb/ocd.c @@ -146,7 +146,7 @@ ocd_error (char *s, int error_code) s = buf; } - error (s); + error ("%s", s); } /* Return nonzero if the thread TH is still alive on the remote system. */ diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 96f39728f54..c50c5044387 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -483,7 +483,7 @@ mips_error (char *string,...) wrap_here (""); /* Force out any buffered output */ gdb_flush (gdb_stdout); if (error_pre_print) - fprintf_filtered (gdb_stderr, error_pre_print); + fputs_filtered (error_pre_print, gdb_stderr); vfprintf_filtered (gdb_stderr, string, args); fprintf_filtered (gdb_stderr, "\n"); va_end (args); |