* [RFC] win32-nat.c: fix "info threads" test failures
@ 2008-06-19 3:54 Pierre Muller
2008-06-19 4:38 ` Christopher Faylor
0 siblings, 1 reply; 7+ messages in thread
From: Pierre Muller @ 2008-06-19 3:54 UTC (permalink / raw)
To: gdb-patches
This one line patch fixes an issue of
testsuite failures due to an assumption in
several tests that "info threads" should return "Thread "
while it does return "thread " currently for cygwin/mingw32.
The reason why this is a RFC rather than a RFA is that
when I tried to find out where the difference was coming from,
I realized that the process and thread strings used by gdb
where not very uniform and win32-nat.c does not
seem to be the only place where "thread" is used...
The proc_string function in gnu-nat.c at line 2559
seems to also use "thread" for the same purpose.
Of course, another option would be to
leave the sources unchanged and to only
change the testsuite by changing all "Thread" into "\[Tt\]hread",
in the tests using "info threads".
Anyhow, as Christopher told recently that he wanted to
reduce the number of differences between the mingw32/cygwin
gdb port and others, I finally decided to send
the win32-nat.c change as a RFC.
Pierre Muller
Pascal language support maintainer for GDB
ChangeLog entry:
2008-12-18 Pierre Muller <muller@ics.u-strasbg.fr>
* win32-nat.c (win32_pid_to_str): Use capital T for "Thread".
Pierre@d620-muller ~/gdbcvs/purecvs
$ cat win32thread.patch
Index: gdb/win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.152
diff -u -p -r1.152 win32-nat.c
--- gdb/win32-nat.c 20 May 2008 18:36:36 -0000 1.152
+++ gdb/win32-nat.c 17 Jun 2008 08:11:26 -0000
@@ -2006,7 +2006,7 @@ win32_pid_to_str (ptid_t ptid)
if ((DWORD) pid == current_event.dwProcessId)
sprintf (buf, "process %d", pid);
else
- sprintf (buf, "thread %ld.0x%x", current_event.dwProcessId, pid);
+ sprintf (buf, "Thread %ld.0x%x", current_event.dwProcessId, pid);
return buf;
}
Differences between testsuite without/with that patch.
--- gdb-cvs.sum 2008-06-19 00:26:27.968750000 +0200
+++ gdb-win32thread.sum 2008-06-19 01:42:19.421875000 +0200
@@ -1,4 +1,4 @@
-Test Run By Pierre on Wed Jun 18 23:12:11 2008
+Test Run By Pierre on Thu Jun 19 00:27:04 2008
Native configuration is i686-pc-cygwin
=== gdb tests ===
@@ -6294,7 +6294,7 @@
FAIL: gdb.base/signull.exp: code; backtrace from keeper through SIGSEGV
Running ../../../purecvs/gdb/testsuite/gdb.base/sigrepeat.exp ...
PASS: gdb.base/sigrepeat.exp: advance to infinite loop
-FAIL: gdb.base/sigrepeat.exp: next (timeout)
+FAIL: gdb.base/sigrepeat.exp: next
Running ../../../purecvs/gdb/testsuite/gdb.base/sigstep.exp ...
PASS: gdb.base/sigstep.exp: display/i $pc
PASS: gdb.base/sigstep.exp: break handler
@@ -11848,7 +11848,7 @@
PASS: gdb.threads/execl.exp: successfully compiled posix threads test case
PASS: gdb.threads/execl.exp: set breakpoint at execl
PASS: gdb.threads/execl.exp: continue to exec
-FAIL: gdb.threads/execl.exp: info threads before exec
+PASS: gdb.threads/execl.exp: info threads before exec
FAIL: gdb.threads/execl.exp: continue across exec
PASS: gdb.threads/execl.exp: info threads after exec
PASS: gdb.threads/execl.exp: info threads after exec
@@ -11908,7 +11908,37 @@
PASS: gdb.threads/pthreads.exp: set print sevenbit-strings
PASS: gdb.threads/pthreads.exp: set width 0
PASS: gdb.threads/pthreads.exp: shell stty intr '^C'
-UNSUPPORTED: gdb.threads/pthreads.exp: gdb does not support pthreads for
this m
achine
+PASS: gdb.threads/pthreads.exp: info threads
+PASS: gdb.threads/pthreads.exp: break thread1
+FAIL: gdb.threads/pthreads.exp: Continue to creation of first thread (the
progr
am exited)
+PASS: gdb.threads/pthreads.exp: disable
+FAIL: gdb.threads/pthreads.exp: break thread2
+FAIL: gdb.threads/pthreads.exp: Continue to creation of second thread (the
prog
ram is no longer running)
+PASS: gdb.threads/pthreads.exp: set var common_routine::hits=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread1=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread2=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::from_main=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::full_coverage=0
+PASS: gdb.threads/pthreads.exp: disable
+PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15
+FAIL: gdb.threads/pthreads.exp: continue until common routine run 15 times
+FAIL: gdb.threads/pthreads.exp: Continue with all threads running (timeout)
+PASS: gdb.threads/pthreads.exp: Stopped with a ^C
+PASS: gdb.threads/pthreads.exp: bt
+PASS: gdb.threads/pthreads.exp: set var common_routine::hits=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread1=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::from_thread2=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::from_main=0
+PASS: gdb.threads/pthreads.exp: set var common_routine::full_coverage=0
+PASS: gdb.threads/pthreads.exp: disable
+PASS: gdb.threads/pthreads.exp: tbreak common_routine if hits >= 15
+FAIL: gdb.threads/pthreads.exp: continue until common routine run 15 times
+FAIL: gdb.threads/pthreads.exp: check backtrace from main thread (the
program i
s no longer running)
+FAIL: gdb.threads/pthreads.exp: check backtrace from thread 1
+FAIL: gdb.threads/pthreads.exp: check backtrace from thread 2
+FAIL: gdb.threads/pthreads.exp: apply backtrace command to all three
threads
+PASS: gdb.threads/pthreads.exp: set break at common_routine in thread 2
+FAIL: gdb.threads/pthreads.exp: continue to bkpt at common_routine in
thread 2
Running ../../../purecvs/gdb/testsuite/gdb.threads/schedlock.exp ...
PASS: gdb.threads/schedlock.exp: successfully compiled posix threads test
case
PASS: gdb.threads/schedlock.exp: shell stty intr '^C'
@@ -11930,7 +11960,9 @@
PASS: gdb.threads/thread-specific.exp: set print sevenbit-strings
PASS: gdb.threads/thread-specific.exp: set width 0
PASS: gdb.threads/thread-specific.exp: continue to breakpoint: all threads
star
ted
-FAIL: gdb.threads/thread-specific.exp: get threads list (no threads)
+PASS: gdb.threads/thread-specific.exp: get threads list
+PASS: gdb.threads/thread-specific.exp: breakpoint 59 main thread
+PASS: gdb.threads/thread-specific.exp: continue to thread-specific
breakpoint
Running ../../../purecvs/gdb/testsuite/gdb.threads/thread_check.exp ...
PASS: gdb.threads/thread_check.exp: successfully compiled posix threads
test ca
se
PASS: gdb.threads/thread_check.exp: breakpoint at tf
@@ -12125,13 +12157,13 @@
=== gdb Summary ===
-# of expected passes 10970
-# of unexpected failures 389
+# of expected passes 10994
+# of unexpected failures 398
# of expected failures 59
# of unknown successes 2
# of known failures 23
# of unresolved testcases 40
# of untested testcases 14
-# of unsupported tests 23
+# of unsupported tests 22
/usr/local/src/gdbcvs/build-bare/gdb/testsuite/../../gdb/gdb version
6.8.50.20
080618-cvs -nx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] win32-nat.c: fix "info threads" test failures
2008-06-19 3:54 [RFC] win32-nat.c: fix "info threads" test failures Pierre Muller
@ 2008-06-19 4:38 ` Christopher Faylor
2008-06-19 10:23 ` Pierre Muller
0 siblings, 1 reply; 7+ messages in thread
From: Christopher Faylor @ 2008-06-19 4:38 UTC (permalink / raw)
To: gdb-patches, Pierre Muller
On Thu, Jun 19, 2008 at 02:01:42AM +0200, Pierre Muller wrote:
>2008-12-18 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * win32-nat.c (win32_pid_to_str): Use capital T for "Thread".
Approved.
cgf
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [RFC] win32-nat.c: fix "info threads" test failures
2008-06-19 4:38 ` Christopher Faylor
@ 2008-06-19 10:23 ` Pierre Muller
2008-06-19 18:57 ` Daniel Jacobowitz
0 siblings, 1 reply; 7+ messages in thread
From: Pierre Muller @ 2008-06-19 10:23 UTC (permalink / raw)
To: gdb-patches
Thanks,
committed now.
Should I submit a similar patch for gnu-nat.c?
The main problem is that I have no way to
run a testsuite that would use the modified code...
Pierre Muller
Pascal language support maintainer for GDB
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Christopher Faylor
> Envoyé : Thursday, June 19, 2008 5:54 AM
> À : gdb-patches@sourceware.org; Pierre Muller
> Objet : Re: [RFC] win32-nat.c: fix "info threads" test failures
>
> On Thu, Jun 19, 2008 at 02:01:42AM +0200, Pierre Muller wrote:
> >2008-12-18 Pierre Muller <muller@ics.u-strasbg.fr>
> >
> > * win32-nat.c (win32_pid_to_str): Use capital T for "Thread".
>
> Approved.
>
> cgf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] win32-nat.c: fix "info threads" test failures
2008-06-19 10:23 ` Pierre Muller
@ 2008-06-19 18:57 ` Daniel Jacobowitz
2008-06-19 18:58 ` [RFC] gnu-nat.c: possibly " Pierre Muller
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2008-06-19 18:57 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Thu, Jun 19, 2008 at 08:43:09AM +0200, Pierre Muller wrote:
> Thanks,
> committed now.
>
> Should I submit a similar patch for gnu-nat.c?
> The main problem is that I have no way to
> run a testsuite that would use the modified code...
I think you should go ahead.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [RFC] gnu-nat.c: possibly fix "info threads" test failures
2008-06-19 18:57 ` Daniel Jacobowitz
@ 2008-06-19 18:58 ` Pierre Muller
2008-06-19 20:35 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Pierre Muller @ 2008-06-19 18:58 UTC (permalink / raw)
To: 'Daniel Jacobowitz'; +Cc: gdb-patches
Here you are:
but as I said, I cannot even compile
gdb that is using this... far less
run the testsuite.
There might also be some specific test that,
on the contrary relies on the lower case "thread"
to pass.
Anyhow, I am willing to commit this
if anyone either tests it or takes the
responsibility to accept it without testing...
Pierre Muller
Pascal language support maintainer for GDB
ChangeLog entry:
2008-12-19 Pierre Muller <muller@ics.u-strasbg.fr>
* gnu-nat.c (proc_string): Use capital T for "Thread".
$ cat gnu-nat-thread.patch
Index: gdb/gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.46
diff -u -p -r1.46 gnu-nat.c
--- gdb/gnu-nat.c 1 Jan 2008 22:53:10 -0000 1.46
+++ gdb/gnu-nat.c 19 Jun 2008 16:24:36 -0000
@@ -2556,7 +2556,7 @@ proc_string (struct proc *proc)
if (proc_is_task (proc))
sprintf (tid_str, "process %d", proc->inf->pid);
else
- sprintf (tid_str, "thread %d.%d",
+ sprintf (tid_str, "Thread %d.%d",
proc->inf->pid, pid_to_thread_id (MERGEPID (proc->tid, 0)));
return tid_str;
}
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Daniel Jacobowitz
> Envoyé : Thursday, June 19, 2008 3:57 PM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFC] win32-nat.c: fix "info threads" test failures
>
> On Thu, Jun 19, 2008 at 08:43:09AM +0200, Pierre Muller wrote:
> > Thanks,
> > committed now.
> >
> > Should I submit a similar patch for gnu-nat.c?
> > The main problem is that I have no way to
> > run a testsuite that would use the modified code...
>
> I think you should go ahead.
>
> --
> Daniel Jacobowitz
> CodeSourcery
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC] gnu-nat.c: possibly fix "info threads" test failures
2008-06-19 18:58 ` [RFC] gnu-nat.c: possibly " Pierre Muller
@ 2008-06-19 20:35 ` Joel Brobecker
2008-06-20 14:30 ` Pierre Muller
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2008-06-19 20:35 UTC (permalink / raw)
To: Pierre Muller; +Cc: 'Daniel Jacobowitz', gdb-patches
> 2008-12-19 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * gnu-nat.c (proc_string): Use capital T for "Thread".
This looks fine. I checked really carefully that you only changed
that one letter inside the string, so hopefully two pair of eyes
is enough :).
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [RFC] gnu-nat.c: possibly fix "info threads" test failures
2008-06-19 20:35 ` Joel Brobecker
@ 2008-06-20 14:30 ` Pierre Muller
0 siblings, 0 replies; 7+ messages in thread
From: Pierre Muller @ 2008-06-20 14:30 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: 'Daniel Jacobowitz', gdb-patches
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Thursday, June 19, 2008 8:57 PM
> À : Pierre Muller
> Cc : 'Daniel Jacobowitz'; gdb-patches@sourceware.org
> Objet : Re: [RFC] gnu-nat.c: possibly fix "info threads" test failures
>
> > 2008-12-19 Pierre Muller <muller@ics.u-strasbg.fr>
> >
> > * gnu-nat.c (proc_string): Use capital T for "Thread".
>
> This looks fine. I checked really carefully that you only changed
> that one letter inside the string, so hopefully two pair of eyes
> is enough :).
OK, thus committed without test compilation.
Thanks,
Pierre Muller
Pascal language support maintainer for GDB
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-06-20 6:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-19 3:54 [RFC] win32-nat.c: fix "info threads" test failures Pierre Muller
2008-06-19 4:38 ` Christopher Faylor
2008-06-19 10:23 ` Pierre Muller
2008-06-19 18:57 ` Daniel Jacobowitz
2008-06-19 18:58 ` [RFC] gnu-nat.c: possibly " Pierre Muller
2008-06-19 20:35 ` Joel Brobecker
2008-06-20 14:30 ` Pierre Muller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox