public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
@ 2020-03-04 15:09 gdb-buildbot
2020-03-04 15:03 ` Failures on Fedora-i686, branch master gdb-buildbot
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-04 15:09 UTC (permalink / raw)
To: gdb-testers
*** TEST RESULTS FOR COMMIT 3f702acd7d562d3a33c59d6398ae74058438d2c7 ***
commit 3f702acd7d562d3a33c59d6398ae74058438d2c7
Author: Sergio Durigan Junior <sergiodj@redhat.com>
AuthorDate: Wed Feb 19 16:40:48 2020 -0500
Commit: Sergio Durigan Junior <sergiodj@redhat.com>
CommitDate: Thu Feb 20 16:02:37 2020 -0500
Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
There is currently a regression when using
'{putchar,fputc}_unfiltered' with 'puts_unfiltered' which was
introduced by one of the commits that reworked the unfiltered print
code.
The regression makes it impossible to use '{putchar,fputc}_unfiltered'
with 'puts_unfiltered', because the former writes directly to the
ui_file stream using 'stream->write', while the latter uses a buffered
mechanism (see 'wrap_buffer') and delays the printing.
If you do a quick & dirty hack on e.g. top.c:show_gdb_datadir:
@@ -2088,6 +2088,13 @@ static void
show_gdb_datadir (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
+ putchar_unfiltered ('\n');
+ puts_unfiltered ("TEST");
+ putchar_unfiltered ('>');
+ puts_unfiltered ("PUTS");
+ putchar_unfiltered ('\n');
rebuild GDB and invoke the "show data-directory" command, you will
see:
(gdb) show data-directory
>
TESTPUTSGDB's data directory is "/usr/local/share/gdb".
Note how the '>' was printed before the output, and "TEST" and "PUTS"
were printed together.
My first attempt to fix this was to always call 'flush_wrap_buffer' at
the end of 'fputs_maybe_filtered', since it seemed to me that the
function should always print what was requested. But I wasn't sure
this was the right thing to do, so I talked to Tom on IRC and he gave
me another, simpler idea: make '{putchar,fputc}_unfiltered' call into
the already existing 'fputs_unfiltered' function.
This patch implements the idea. I regtested it on the Buildbot, and
no regressions were detected.
gdb/ChangeLog:
2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey <tom@tromey.com>
* utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
of 'fputc_unfiltered'.
(putchar_unfiltered): Call 'fputc_unfiltered'.
(fputc_unfiltered): Call 'fputs_unfiltered'.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 405eecf79b..40bee39c1e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2020-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
+ Tom Tromey <tom@tromey.com>
+
+ * utils.c (fputs_maybe_filtered): Call 'stream->puts' instead
+ of 'fputc_unfiltered'.
+ (putchar_unfiltered): Call 'fputc_unfiltered'.
+ (fputc_unfiltered): Call 'fputs_unfiltered'.
+
2020-02-20 Andrew Burgess <andrew.burgess@embecosm.com>
* config.in: Regenerate.
diff --git a/gdb/utils.c b/gdb/utils.c
index 0200a8621f..0b470120a2 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1776,7 +1776,12 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
newline -- if chars_per_line is right, we
probably just overflowed anyway; if it's wrong,
let us keep going. */
- fputc_unfiltered ('\n', stream);
+ /* XXX: The ideal thing would be to call
+ 'stream->putc' here, but we can't because it
+ currently calls 'fputc_unfiltered', which ends up
+ calling us, which generates an infinite
+ recursion. */
+ stream->puts ("\n");
}
else
{
@@ -1821,7 +1826,12 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
wrap_here ((char *) 0); /* Spit out chars, cancel
further wraps. */
lines_printed++;
- fputc_unfiltered ('\n', stream);
+ /* XXX: The ideal thing would be to call
+ 'stream->putc' here, but we can't because it
+ currently calls 'fputc_unfiltered', which ends up
+ calling us, which generates an infinite
+ recursion. */
+ stream->puts ("\n");
lineptr++;
}
}
@@ -1916,10 +1926,7 @@ fputs_highlighted (const char *str, const compiled_regex &highlight,
int
putchar_unfiltered (int c)
{
- char buf = c;
-
- gdb_stdout->write (&buf, 1);
- return c;
+ return fputc_unfiltered (c, gdb_stdout);
}
/* Write character C to gdb_stdout using GDB's paging mechanism and return C.
@@ -1934,9 +1941,11 @@ putchar_filtered (int c)
int
fputc_unfiltered (int c, struct ui_file *stream)
{
- char buf = c;
+ char buf[2];
- stream->write (&buf, 1);
+ buf[0] = c;
+ buf[1] = 0;
+ fputs_unfiltered (buf, stream);
return c;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-i686, branch master
2020-03-04 15:09 [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered' gdb-buildbot
@ 2020-03-04 15:03 ` gdb-buildbot
2020-03-04 15:21 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-04 15:03 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-i686
Worker:
fedora-x86-64-3
Full Build URL:
https://gdb-buildbot.osci.io/#builders/18/builds/2252
Author:
Sergio Durigan Junior <sergiodj@redhat.com>
Commit tested:
3f702acd7d562d3a33c59d6398ae74058438d2c7
Subject of commit:
Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-i686/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7/
*** Diff to previous build ***
==============================================
new FAIL: gdb.base/catch-syscall.exp: multiple targets: insert catch syscall on syscall 1 -- write on i386:x86-64
new FAIL: gdb.server/server-kill-python.exp: ensure inferior is running
new KFAIL: gdb.xml/tdesc-arch.exp: crlf: set tdesc filename tdesc-arch.xml
new KFAIL: gdb.xml/tdesc-arch.exp: set tdesc filename tdesc-arch.xml
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-i686/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-i686/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-m32, branch master
2020-03-04 15:09 [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered' gdb-buildbot
2020-03-04 15:03 ` Failures on Fedora-i686, branch master gdb-buildbot
@ 2020-03-04 15:21 ` gdb-buildbot
2020-03-04 16:03 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-04 15:21 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-m32
Worker:
fedora-x86-64-3
Full Build URL:
https://gdb-buildbot.osci.io/#builders/17/builds/2248
Author:
Sergio Durigan Junior <sergiodj@redhat.com>
Commit tested:
3f702acd7d562d3a33c59d6398ae74058438d2c7
Subject of commit:
Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7/
*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m32/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-m64, branch master
2020-03-04 15:09 [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered' gdb-buildbot
2020-03-04 15:03 ` Failures on Fedora-i686, branch master gdb-buildbot
2020-03-04 15:21 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
@ 2020-03-04 16:03 ` gdb-buildbot
2020-03-04 16:30 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-04 16:03 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-m64
Worker:
fedora-x86-64-1
Full Build URL:
https://gdb-buildbot.osci.io/#builders/3/builds/2309
Author:
Sergio Durigan Junior <sergiodj@redhat.com>
Commit tested:
3f702acd7d562d3a33c59d6398ae74058438d2c7
Subject of commit:
Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7/
*** Diff to previous build ***
==============================================
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "" "" : second pass: breakpoint foo in first file
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: breakpoint foo in first file
PASS -> KFAIL: gdb.threads/non-ldr-exit.exp: program exits normally
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
2020-03-04 15:09 [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered' gdb-buildbot
` (2 preceding siblings ...)
2020-03-04 16:03 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
@ 2020-03-04 16:30 ` gdb-buildbot
2020-03-04 16:46 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2020-03-05 11:47 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-04 16:30 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-extended-gdbserver-m32
Worker:
fedora-x86-64-3
Full Build URL:
https://gdb-buildbot.osci.io/#builders/4/builds/2144
Author:
Sergio Durigan Junior <sergiodj@redhat.com>
Commit tested:
3f702acd7d562d3a33c59d6398ae74058438d2c7
Subject of commit:
Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7/
*** Diff to previous build ***
==============================================
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
UNRESOLVED -> FAIL: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
PASS -> FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: continue until exit
PASS -> FAIL: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: print re_run_var_2
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m32/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
2020-03-04 15:09 [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered' gdb-buildbot
` (3 preceding siblings ...)
2020-03-04 16:30 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
@ 2020-03-04 16:46 ` gdb-buildbot
2020-03-05 11:47 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-04 16:46 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-extended-gdbserver-m64
Worker:
fedora-x86-64-1
Full Build URL:
https://gdb-buildbot.osci.io/#builders/2/builds/2144
Author:
Sergio Durigan Junior <sergiodj@redhat.com>
Commit tested:
3f702acd7d562d3a33c59d6398ae74058438d2c7
Subject of commit:
Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7/
*** Diff to previous build ***
==============================================
new FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugIN: BINprelinkNOdebugNOpieNO: INNER: symbol-less: entry point reached
new FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugIN: BINprelinkNOdebugNOpieYES: INNER: symbol-less: entry point reached
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "" "" : second pass: breakpoint foo in first file
PASS -> UNRESOLVED: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : second pass: breakpoint foo in first file
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=main: mi=separate: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=main: force-fail=1: run failure detected
FAIL -> UNRESOLVED: gdb.mi/mi-exec-run.exp: inferior-tty=separate: mi=separate: force-fail=1: run failure detected
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 2nd call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print j
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-extended-gdbserver-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Failures on Fedora-x86_64-native-gdbserver-m64, branch master
2020-03-04 15:09 [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered' gdb-buildbot
` (4 preceding siblings ...)
2020-03-04 16:46 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
@ 2020-03-05 11:47 ` gdb-buildbot
5 siblings, 0 replies; 7+ messages in thread
From: gdb-buildbot @ 2020-03-05 11:47 UTC (permalink / raw)
To: gdb-testers
Buildername:
Fedora-x86_64-native-gdbserver-m64
Worker:
fedora-x86-64-2
Full Build URL:
https://gdb-buildbot.osci.io/#builders/22/builds/2145
Author:
Sergio Durigan Junior <sergiodj@redhat.com>
Commit tested:
3f702acd7d562d3a33c59d6398ae74058438d2c7
Subject of commit:
Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered'
Testsuite logs (gdb.sum, gdb.log and others):
https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7/
*** Diff to previous build ***
==============================================
new FAIL: gdb.base/gdb-caching-proc.exp: set print elements unlimited
new FAIL: gdb.base/gdb-caching-proc.exp: set print repeats unlimited
new FAIL: gdb.base/gdb-caching-proc.exp: show print repeats
PASS -> FAIL: gdb.gdb/unittest.exp: maintenance selftest
PASS -> FAIL: gdb.threads/forking-threads-plus-breakpoint.exp: cond_bp_target=0: detach_on_fork=on: displaced=off: inferior 1 exited
PASS -> FAIL: gdb.threads/interrupted-hand-call.exp: continue until exit
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print k
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print r
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_func: 1st call: 2nd thread: print z
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print i
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: nested_parallel: inner_threads: 1st stop: print j
PASS -> KFAIL: gdb.threads/omp-par-scope.exp: single_scope: first thread: print i3
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=0: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
new KFAIL: gdb.threads/watchthreads2.exp: gdb can drop watchpoints in multithreaded app
==============================================
*** Complete list of XFAILs for this builder ***
To obtain the list of XFAIL tests for this builder, go to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.gz>
You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:
<https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/3f/3f702acd7d562d3a33c59d6398ae74058438d2c7//xfail.table.gz>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-03-05 10:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 15:09 [binutils-gdb] Make '{putchar,fputc}_unfiltered' use 'fputs_unfiltered' gdb-buildbot
2020-03-04 15:03 ` Failures on Fedora-i686, branch master gdb-buildbot
2020-03-04 15:21 ` Failures on Fedora-x86_64-m32, " gdb-buildbot
2020-03-04 16:03 ` Failures on Fedora-x86_64-m64, " gdb-buildbot
2020-03-04 16:30 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot
2020-03-04 16:46 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot
2020-03-05 11:47 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).