]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* linux-thread-db.c (thread_db_pid_to_str): Print thread IDs
authorDaniel Jacobowitz <drow@false.org>
Mon, 14 May 2007 16:52:13 +0000 (16:52 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 14 May 2007 16:52:13 +0000 (16:52 +0000)
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.

gdb/ChangeLog
gdb/linux-thread-db.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.threads/linux-dp.exp
gdb/testsuite/gdb.threads/print-threads.exp

index 27d67b579802c6b5aefc6a328ac36ce9a914cb37..b8801619c4d36a41e660d49175e9c7d5a48f6c3a 100644 (file)
@@ -1,3 +1,8 @@
+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
index 787bec9032d05a205954426fe756ac8feda10c2a..63bd8525386977bd1b0a90b4ebdd1f24f06a4894 100644 (file)
@@ -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;
index a6b1d9722ff4cdb3c20729e6c960a1038130b384..f4f6305e3dd8aec7c593275d1fbd4d86f1b7da12 100644 (file)
@@ -1,3 +1,9 @@
+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
index 0edb4e23e2199d74929c045a5e6d373e26639a34..0849406476e5d9c06f61fd4a280cf0291bc0e632 100644 (file)
@@ -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]} {
index e766b5bbc33f1706a27362d31787bd3b9fa0fb4a..068029ca92d3181e573ccb4a2bc3a482adbb6146 100644 (file)
@@ -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 {