aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-09-10 08:56:09 +0000
committerJohn Gilmore <gnu@cygnus>1991-09-10 08:56:09 +0000
commit81066208879cefefce3b900b852483a77ed23c2a (patch)
tree1297f375636d5d218cff99ebbef36f86d6470870 /gdb/utils.c
parentae07c044c3bf2e107226e9b719d9595a92e7af3e (diff)
downloadgdb-81066208879cefefce3b900b852483a77ed23c2a.zip
gdb-81066208879cefefce3b900b852483a77ed23c2a.tar.gz
gdb-81066208879cefefce3b900b852483a77ed23c2a.tar.bz2
* utils.c (error): if error_pre_print is set, print the string
first. * main.c (main, print_gnu_advertisement, print_gdb_version): Reformat legalese so it always prints, but acts as an "I'm here" message while symbols are being read. If any errors occur, print a few newlines to set off the message and start it at the left margin. Remove mention of "help" command, and don't yak about symbol reading. (catch_errors): Error string is now printed first in case of error, not last. * command.c (undef_cmd_error, lookup_cmd): On undefined command, suggest the "help" command. * Makefile.in (VERSION): Set to 4.0.2.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 632616e..98adad0 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -101,6 +101,10 @@ int asm_demangle = 0;
international character, and the terminal or window can cope.) */
int sevenbit_strings = 0;
+
+/* String to be printed before error messages, if any. */
+
+char *error_pre_print;
/* Add a new cleanup to the cleanup_chain,
and return the previous chain pointer
@@ -203,6 +207,8 @@ error (va_alist)
va_start (args);
target_terminal_ours ();
fflush (stdout);
+ if (error_pre_print)
+ fprintf (stderr, error_pre_print);
string = va_arg (args, char *);
vfprintf (stderr, string, args);
fprintf (stderr, "\n");