From: Daniel Jacobowitz <drow@false.org>
To: Michael Snyder <Michael.Snyder@palmsource.com>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
GDB Patches ML <gdb-patches@sourceware.org>
Subject: Re: PING Re: [RFC] thread tests, linux/gdbserver
Date: Tue, 17 Oct 2006 15:53:00 -0000 [thread overview]
Message-ID: <20061017155310.GB30823@nevyn.them.org> (raw)
In-Reply-To: <20061017154611.GA30823@nevyn.them.org>
On Tue, Oct 17, 2006 at 11:46:11AM -0400, Daniel Jacobowitz wrote:
> It fixes a bunch of failures in linux-dp.exp and thread-specific.exp,
> and lets more tests run for pthreads.exp.
I noticed that Michael's patch fixed manythreads.exp, but I didn't see
that in my changes. So I looked closer: it wasn't being run at all,
because it wasn't 64-bit safe, and then it had an additional
assumption.
I tested and committed the attached obvious fixups.
--
Daniel Jacobowitz
CodeSourcery
2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.threads/manythreads.c (thread_function, main): Don't cast
int to pointer or pointer to int.
* gdb.threads/manythreads.exp: Don't expect the string "LWP".
Index: testsuite/gdb.threads/manythreads.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.c,v
retrieving revision 1.3
diff -u -p -r1.3 manythreads.c
--- testsuite/gdb.threads/manythreads.c 23 Apr 2004 19:01:17 -0000 1.3
+++ testsuite/gdb.threads/manythreads.c 17 Oct 2006 15:50:27 -0000
@@ -1,5 +1,5 @@
/* Manythreads test program.
- Copyright 2004
+ Copyright 2004, 2006
Free Software Foundation, Inc.
Written by Jeff Johnston <jjohnstn@redhat.com>
@@ -29,7 +29,7 @@
void *
thread_function (void *arg)
{
- int x = (int)arg;
+ int x = * (int *) arg;
printf ("Thread <%d> executing\n", x);
@@ -41,6 +41,7 @@ main (int argc, char **argv)
{
pthread_attr_t attr;
pthread_t threads[256];
+ int args[256];
int i, j;
pthread_attr_init (&attr);
@@ -52,8 +53,8 @@ main (int argc, char **argv)
{
for (j = 0; j < 256; ++j)
{
- pthread_create (&threads[j], &attr, thread_function,
- (void *)(i * 1000 + j));
+ args[j] = i * 1000 + j;
+ pthread_create (&threads[j], &attr, thread_function, &args[j]);
}
for (j = 0; j < 256; ++j)
Index: testsuite/gdb.threads/manythreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/manythreads.exp,v
retrieving revision 1.2
diff -u -p -r1.2 manythreads.exp
--- testsuite/gdb.threads/manythreads.exp 3 Jun 2004 22:10:56 -0000 1.2
+++ testsuite/gdb.threads/manythreads.exp 17 Oct 2006 15:50:27 -0000
@@ -1,5 +1,5 @@
# manythreads.exp -- Expect script to test stopping many threads
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -81,7 +81,7 @@ gdb_test_multiple "" "stop threads 1" {
}
}
-gdb_test "info threads" ".*1 Thread.*.LWP.*"
+gdb_test "info threads" ".*1 Thread .*"
set message "second continue"
gdb_test_multiple "continue" "second continue" {
next prev parent reply other threads:[~2006-10-17 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 22:26 Michael Snyder
2006-10-05 21:51 ` PING " Michael Snyder
2006-10-06 10:53 ` Mark Kettenis
2006-10-06 18:31 ` Michael Snyder
2006-10-17 15:46 ` Daniel Jacobowitz
2006-10-17 15:53 ` Daniel Jacobowitz [this message]
2006-10-17 20:08 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061017155310.GB30823@nevyn.them.org \
--to=drow@false.org \
--cc=Michael.Snyder@palmsource.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox