aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-05-14 16:52:13 +0000
committerDaniel Jacobowitz <drow@false.org>2007-05-14 16:52:13 +0000
commit027c0295d85769f2bcf07218d4296644f129cfc5 (patch)
treee65e9bac7c11985e9b5d76e1b2856b594ba0455a
parentdc5000e72188dd452616737a08bd11b320a8d25d (diff)
downloadfsf-binutils-gdb-027c0295d85769f2bcf07218d4296644f129cfc5.zip
fsf-binutils-gdb-027c0295d85769f2bcf07218d4296644f129cfc5.tar.gz
fsf-binutils-gdb-027c0295d85769f2bcf07218d4296644f129cfc5.tar.bz2
* linux-thread-db.c (thread_db_pid_to_str): Print thread IDs
as hexadecimal. * gdb.threads/linux-dp.exp: Expect hexadecimal thread IDs. * gdb.threads/print-threads.exp (test_all_threads): Allow negative and hexadecimal thread IDs.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/linux-thread-db.c4
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.threads/linux-dp.exp4
-rw-r--r--gdb/testsuite/gdb.threads/print-threads.exp2
5 files changed, 16 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27d67b5..b880161 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2007-05-14 Daniel Jacobowitz <dan@codesourcery.com>
+ * linux-thread-db.c (thread_db_pid_to_str): Print thread IDs
+ as hexadecimal.
+
+2007-05-14 Daniel Jacobowitz <dan@codesourcery.com>
+
* jv-exp.y (push_fieldnames): Use STRUCTOP_PTR instead of
STRUCTOP_STRUCT.
* jv-lang.c (evaluate_subexp_java): Handle STRUCTOP_PTR instead of
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 787bec9..63bd852 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1013,10 +1013,10 @@ thread_db_pid_to_str (ptid_t ptid)
thread_info = find_thread_pid (ptid);
if (thread_info == NULL)
- snprintf (buf, sizeof (buf), "Thread %ld (LWP %ld) (Missing)",
+ snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld) (Missing)",
GET_THREAD (ptid), GET_LWP (ptid));
else
- snprintf (buf, sizeof (buf), "Thread %ld (LWP %ld)",
+ snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
GET_THREAD (ptid), GET_LWP (ptid));
return buf;
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a6b1d97..f4f6305 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2007-05-14 Daniel Jacobowitz <dan@codesourcery.com>
+ * gdb.threads/linux-dp.exp: Expect hexadecimal thread IDs.
+ * gdb.threads/print-threads.exp (test_all_threads): Allow
+ negative and hexadecimal thread IDs.
+
+2007-05-14 Daniel Jacobowitz <dan@codesourcery.com>
+
* gdb.java/jprint.java (public): Avoid invalid call to static
method.
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index 0edb4e2..0849406 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -74,7 +74,7 @@ for {set i 0} {$i < 5} {incr i} {
-re "info threads\r\n" {
exp_continue
}
- -re "^. +(\[0-9\]+ Thread \[-0-9\]+) \[^\n\]*\n" {
+ -re "^. +(\[0-9\]+ Thread 0x\[0-9a-f\]+) \[^\n\]*\n" {
verbose -log "found thread $expect_out(1,string)" 2
lappend threads_before $expect_out(1,string)
exp_continue
@@ -147,7 +147,7 @@ for {set i 0} {$i < 5} {incr i} {
-re "info threads\r\n" {
exp_continue
}
- -re "^. +(\[0-9\]+ Thread \[-0-9\]+) \[^\n\]*\n" {
+ -re "^. +(\[0-9\]+ Thread 0x\[0-9a-f\]+) \[^\n\]*\n" {
set name $expect_out(1,string)
for {set j 0} {$j != [llength $threads_before] } {incr j} {
if {$name == [lindex $threads_before $j]} {
diff --git a/gdb/testsuite/gdb.threads/print-threads.exp b/gdb/testsuite/gdb.threads/print-threads.exp
index e766b5b..068029c 100644
--- a/gdb/testsuite/gdb.threads/print-threads.exp
+++ b/gdb/testsuite/gdb.threads/print-threads.exp
@@ -94,7 +94,7 @@ proc test_all_threads { name kill } {
fail "all threads ran once ($name) (total $i threads ran)"
}
}
- -re "Program received signal SIGTRAP.*(Thread \[0-9\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" {
+ -re "Program received signal SIGTRAP.*(Thread \[-0-9a-fx\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" {
if { $kill == 1 } {
kfail "gdb/1265" "Running threads ($name) (zombie thread)"
} else {