* thread-db.c (thread_from_lwp): Fix error format string.
* stack.c (parse_frame_specification): Ditto.
* cli/cli-decode.c (undef_cmd_error): Ditto.
* scm-lang.c (scm_lookup_name): Ditto.
* tracepoint.c (trace_error): Ditto.
* remote-utils.c (usage): Ditto.
* remote.c (compare_sections_command): Ditto.
Fix PR gdb/328.
+2002-03-23 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (error): Add printf format attribute.
+ * thread-db.c (thread_from_lwp): Fix error format string.
+ * stack.c (parse_frame_specification): Ditto.
+ * cli/cli-decode.c (undef_cmd_error): Ditto.
+ * scm-lang.c (scm_lookup_name): Ditto.
+ * tracepoint.c (trace_error): Ditto.
+ * remote-utils.c (usage): Ditto.
+ * remote.c (compare_sections_command): Ditto.
+ Fix PR gdb/328.
+
2002-03-22 Andrew Cagney <ac131313@redhat.com>
* gdbtypes.c (append_composite_type_field): New function.
cmdtype,
q,
*cmdtype ? " " : "",
- strlen (cmdtype) - 1,
+ (int) strlen (cmdtype) - 1,
cmdtype);
}
extern NORETURN void verror (const char *fmt, va_list ap) ATTR_NORETURN;
-extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN;
+extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN ATTR_FORMAT (printf, 1, 2);
extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
fprintf_unfiltered (gdb_stderr, "Unrecognized arguments: `%s'.\n", junk);
error ("Usage: target %s [DEVICE [SPEED [DEBUG]]]\n\
-where DEVICE is the name of a device or HOST:PORT", proto, proto);
+where DEVICE is the name of a device or HOST:PORT", proto);
return;
}
getpkt (buf, (rs->remote_packet_size), 0);
if (buf[0] == 'E')
- error ("target memory fault, section %s, range 0x%08x -- 0x%08x",
- sectname, lma, lma + size);
+ error ("target memory fault, section %s, range 0x%s -- 0x%s",
+ sectname, paddr (lma), paddr (lma + size));
if (buf[0] != 'C')
error ("remote target does not support this operation");
(struct symtab **) NULL);
if (sym)
return value_of_variable (sym, NULL);
- error ("No symbol \"%s\" in current context.");
+ error ("No symbol \"%s\" in current context.", str);
}
struct value *
really should be used instead of spaces to delimit; using spaces
normally works in an expression). */
#ifdef SETUP_ARBITRARY_FRAME
- error ("No frame %d", args[0]);
+ error ("No frame %s", paddr_d (args[0]));
#endif
/* If (s)he specifies the frame with an address, he deserves what
err = td_ta_map_lwp2thr_p (thread_agent, GET_LWP (ptid), &th);
if (err != TD_OK)
- error ("Cannot find user-level thread for LWP %d: %s",
+ error ("Cannot find user-level thread for LWP %ld: %s",
GET_LWP (ptid), thread_db_err_str (err));
err = td_thr_get_info_p (&th, &ti);
if (*++buf == '0') /* general case: */
error ("tracepoint.c: error in outgoing packet.");
else
- error ("tracepoint.c: error in outgoing packet at field #%d.",
+ error ("tracepoint.c: error in outgoing packet at field #%ld.",
strtol (buf, NULL, 16));
case '2':
error ("trace API error 0x%s.", ++buf);