with_test_prefix "stopping threads" {
gdb_test "call (void) stop_thread()" \
- "\\\[Thread \[^\r\n\]+ exited\\\]" \
+ "\\\[Thread \[^\r\n\]+ \\\(id $decimal\\\) exited\\\]" \
"stop a thread, return value discarded"
check_thread_count -1
set after_new_thread_message "created new thread"
foreach_with_prefix thread {5 4 3} {
gdb_test_multiple "continue" "${after_new_thread_message}" {
- -re "\\\[New Thread ${hex} \\\(LWP \[0-9\]+\\\)\\\].*${gdb_prompt}" {
+ -re "\\\[New Thread ${hex} \\\(LWP \[0-9\]+\\\) \\\(id $decimal\\\)\\\].*${gdb_prompt}" {
pass "${after_new_thread_message}"
}
-re -wrap "\\\[New Thread $decimal\\.$decimal\\\]\r\n.*" {
if (!silent && print_thread_events)
{
if (exit_code.has_value ())
- gdb_printf (_("[%s exited with code %s]\n"),
+ gdb_printf (_("[%s (id %s) exited with code %s]\n"),
target_pid_to_str (t->ptid).c_str (),
+ print_thread_id (t),
pulongest (*exit_code));
else
- gdb_printf (_("[%s exited]\n"),
- target_pid_to_str (t->ptid).c_str ());
+ gdb_printf (_("[%s (id %s) exited]\n"),
+ target_pid_to_str (t->ptid).c_str (),
+ print_thread_id (t));
}
interps_notify_thread_exited (t, exit_code, silent);
result->priv = std::move (priv);
if (print_thread_events)
- gdb_printf (_("[New %s]\n"), target_pid_to_str (ptid).c_str ());
+ gdb_printf (_("[New %s (id %s)]\n"), target_pid_to_str (ptid).c_str (),
+ print_thread_id (result));
annotate_new_thread ();
return result;