aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-09-21 16:36:33 +0000
committerAndrew Cagney <cagney@redhat.com>2002-09-21 16:36:33 +0000
commitcc3b68a5c7443fbeb8e78e5d8a877178ff27b6e4 (patch)
treeba065c39c8fcf1919f836805c96fb51616218526 /gdb
parentae03d6e27a98fe401dfb08f98048b08b81cc152e (diff)
downloadgdb-cc3b68a5c7443fbeb8e78e5d8a877178ff27b6e4.zip
gdb-cc3b68a5c7443fbeb8e78e5d8a877178ff27b6e4.tar.gz
gdb-cc3b68a5c7443fbeb8e78e5d8a877178ff27b6e4.tar.bz2
2002-09-21 Andrew Cagney <cagney@redhat.com>
* complaints.c (symfile_explanations): Remove new-line from ``isolated_message''. (vcomplaint): When ISOLATED_MESSAGE, force a line break. (clear_complaints): When a SUBSEQUENT_MESSAGE, force a line break.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/complaints.c37
2 files changed, 39 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 841ec04..a570734 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2002-09-21 Andrew Cagney <cagney@redhat.com>
+
+ * complaints.c (symfile_explanations): Remove new-line from
+ ``isolated_message''.
+ (vcomplaint): When ISOLATED_MESSAGE, force a line break.
+ (clear_complaints): When a SUBSEQUENT_MESSAGE, force a line break.
+
2002-09-20 Nick Clifton <nickc@redhat.com>
* NEWS: Announce that V850EA ISA is no longer supported.
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 95ded4c..84cf6a2 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -84,7 +84,7 @@ static struct complain complaint_sentinel;
/* The symbol table complaint table. */
static const char *symfile_explanations[] = {
- "During symbol reading, %s.\n",
+ "During symbol reading, %s.",
"During symbol reading...%s...",
"%s...",
"%s...",
@@ -181,6 +181,7 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
else
{
if (complaints->explanation == NULL)
+ /* A [v]warning() call always appends a newline. */
vwarning (complaint->fmt, args);
else
{
@@ -194,7 +195,17 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
fprintf_filtered (gdb_stderr,
complaints->explanation[series],
msg);
- wrap_here ("");
+ /* Force a line-break after any isolated message. For the
+ other cases, clear_complaints() takes care of any missing
+ trailing newline, the wrap_here() is just a hint. */
+ if (series == ISOLATED_MESSAGE)
+ /* It would be really nice to use begin_line() here.
+ Unfortunatly that function doesn't track GDB_STDERR and
+ consequently will sometimes supress a line when it
+ shouldn't. */
+ fputs_filtered ("\n", gdb_stderr);
+ else
+ wrap_here ("");
do_cleanups (cleanups);
}
}
@@ -267,10 +278,26 @@ clear_complaints (struct complaints **c, int less_verbose, int noisy)
p->counter = 0;
}
- if (complaints->series > 1 && !warning_hook)
+ switch (complaints->series)
{
- /* Terminate previous series, since caller won't. */
- puts_filtered ("\n");
+ case FIRST_MESSAGE:
+ /* Haven't yet printed anything. */
+ break;
+ case SHORT_FIRST_MESSAGE:
+ /* Haven't yet printed anything. */
+ break;
+ case ISOLATED_MESSAGE:
+ /* The code above, always forces a line-break. No need to do it
+ here. */
+ break;
+ case SUBSEQUENT_MESSAGE:
+ /* It would be really nice to use begin_line() here.
+ Unfortunatly that function doesn't track GDB_STDERR and
+ consequently will sometimes supress a line when it shouldn't. */
+ fputs_unfiltered ("\n", gdb_stderr);
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "bad switch");
}
if (!less_verbose)