* 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.
This commit is contained in:
Daniel Jacobowitz
2007-05-14 16:52:13 +00:00
parent dc5000e721
commit 027c0295d8
5 changed files with 16 additions and 5 deletions

View 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;