debug --- gdb/testsuite/lib/read1.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/read1.c b/gdb/testsuite/lib/read1.c index 1f3cd4393a1..eded36d6c1f 100644 --- a/gdb/testsuite/lib/read1.c +++ b/gdb/testsuite/lib/read1.c @@ -32,6 +32,7 @@ ssize_t read (int fd, void *buf, size_t count) { static ssize_t (*read2) (int fd, void *buf, size_t count) = NULL; + static FILE *log = NULL; if (read2 == NULL) { /* Use setenv (v, "", 1) rather than unsetenv (v) to work around @@ -40,6 +41,7 @@ read (int fd, void *buf, size_t count) for existence from another interp". */ setenv ("LD_PRELOAD", "", 1); read2 = dlsym (RTLD_NEXT, "read"); + log = fopen ("/home/vries/gdb_versions/devel/LOG", "a"); } #ifdef READMORE @@ -48,10 +50,13 @@ read (int fd, void *buf, size_t count) #if 1 /* READMORE, method 1. */ +#if 0 if (isatty (fd) != 0) usleep (10 * 1000); - return read2 (fd, buf, count); - +#endif + ssize_t res = read2 (fd, buf, count); + fprintf (log, "READ: fd: %d, COUNT: %zd, RES: %zd\n", fd, count, res); + return res; #else /* READMORE, method 2. */ ssize_t res, res2;