NORETURN void
error_stream (struct ui_file *stream)
{
- long len;
- char *message = ui_file_xstrdup (stream, &len);
+ char *message = ui_file_xstrdup (stream, NULL);
make_cleanup (xfree, message);
error (("%s"), message);
}
/* Default (yes/batch case) is to quit GDB. When in batch mode
this lessens the likelihood of GDB going into an infinite
loop. */
- quit_p = query (_("%s\nQuit this debugging session? "), reason);
+ if (caution == 0)
+ {
+ /* Emit the message and quit. */
+ fputs_unfiltered (reason, gdb_stderr);
+ fputs_unfiltered ("\n", gdb_stderr);
+ quit_p = 1;
+ }
+ else
+ quit_p = query (_("%s\nQuit this debugging session? "), reason);
}
else if (problem->should_quit == internal_problem_yes)
quit_p = 1;
set_cmd_list,
show_cmd_list);
+ xfree (set_doc);
+ xfree (show_doc);
+
set_doc = xstrprintf (_("\
Set whether GDB should create a core file of GDB when %s is detected"),
problem->name);
NULL, /* showfunc */
set_cmd_list,
show_cmd_list);
+
+ xfree (set_doc);
+ xfree (show_doc);
}
/* Print the system error message for errno, and also mention STRING
}
/* Automatically answer the default value if the user did not want
- prompts. */
- if (! caution)
+ prompts or the command was issued with the server prefix. */
+ if (! caution || server_command)
return def_value;
/* If input isn't coming from the user directly, just say what
- question we're asking, and then answer "yes" automatically. This
+ question we're asking, and then answer the default automatically. This
way, important error messages don't get lost when talking to GDB
over a pipe. */
if (! input_from_terminal_p ())
return def_value;
}
- /* Automatically answer the default value if input is not from the user
- directly, or if the user did not want prompts. */
- if (!input_from_terminal_p () || !caution)
- return def_value;
-
if (deprecated_query_hook)
{
return deprecated_query_hook (ctlstr, args);
unsigned long
gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len)
{
- static const unsigned long crc32_table[256] = {
+ static const unsigned int crc32_table[256] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,