* RFC: add table headers to "info thread" output
@ 2010-12-20 21:50 Tom Tromey
2010-12-21 4:01 ` Joel Brobecker
2010-12-21 9:39 ` Pedro Alves
0 siblings, 2 replies; 6+ messages in thread
From: Tom Tromey @ 2010-12-20 21:50 UTC (permalink / raw)
To: gdb-patches
I would appreciate comments on this. In the absence of comments I will
check it in a few days.
On the CLI, "info threads" displays a table without any column
headings. This patch adds column headings.
In order to retain MI compatibility, the code now checks the ui-out
object and reverts to the old style for MI.
Built and regtested on x86-64 (compile farm).
I updated various tests to reflect the new syntax.
Tom
2010-12-20 Tom Tromey <tromey@redhat.com>
* thread.c (print_thread_info): Make a ui-out table in CLI mode.
2010-12-20 Tom Tromey <tromey@redhat.com>
* gdb.threads/execl.exp: Update.
* gdb.threads/linux-dp.exp: Update.
* gdb.threads/manythreads.exp: Update.
* gdb.threads/tls.exp: Update.
diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp
index cd4a801..9cafeda 100644
--- a/gdb/testsuite/gdb.threads/execl.exp
+++ b/gdb/testsuite/gdb.threads/execl.exp
@@ -46,7 +46,7 @@ gdb_test "b [gdb_get_line_number "breakpoint here"]" \
gdb_test "continue" ".*breakpoint here.*" "continue to exec"
-gdb_test "info threads" ".*3 Thread.*2 Thread.*1 Thread.*" "info threads before exec"
+gdb_test "info threads" ".*3 *Thread.*2 *Thread.*1 *Thread.*" "info threads before exec"
# When continuing from this point we'll hit the breakpoint in main()
# again, this time in the exec'd process.
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index fb2a2ed..abb4f87 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -70,7 +70,10 @@ for {set i 0} {$i < 5} {incr i} {
-re "info threads\r\n" {
exp_continue
}
- -re "^. +(\[0-9\]+ Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
+ -re "^ *Id.*Frame *\[\r\n\]+" {
+ exp_continue
+ }
+ -re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
verbose -log "found thread $expect_out(1,string)" 2
lappend threads_before $expect_out(1,string)
exp_continue
@@ -136,7 +139,10 @@ for {set i 0} {$i < 5} {incr i} {
-re "info threads\r\n" {
exp_continue
}
- -re "^. +(\[0-9\]+ Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
+ -re "^ *Id.*Frame *\[\r\n\]+" {
+ exp_continue
+ }
+ -re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
set name $expect_out(1,string)
for {set j 0} {$j != [llength $threads_before] } {incr j} {
if {$name == [lindex $threads_before $j]} {
@@ -177,12 +183,12 @@ set nthreads 6
# Run until there are some threads.
gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"]
gdb_continue_to_breakpoint "main thread's sleep"
-set info_threads_ptn ""
+set info_threads_ptn ".*"
for {set i $nthreads} {$i > 0} {incr i -1} {
- append info_threads_ptn "$i Thread .*"
+ append info_threads_ptn "$i *Thread .*"
}
append info_threads_ptn "\[\r\n\]+$gdb_prompt $"
-set info_threads_manager_ptn "[expr $nthreads + 1] Thread .*$info_threads_ptn"
+set info_threads_manager_ptn "[expr $nthreads + 1] *Thread .*$info_threads_ptn"
gdb_test_multiple "info threads" "info threads 2" {
-re "$info_threads_manager_ptn" {
@@ -245,7 +251,7 @@ set only_five 1
for {set i 0} {$only_five > 0 && $i < 10} {incr i} {
gdb_continue_to_breakpoint "thread 5's print, pass: $i"
gdb_test_multiple "info threads" "" {
- -re "\\* 5 Thread .* print_philosopher .*\r\n$gdb_prompt $" {
+ -re "\[*\] 5 *Thread .* +print_philosopher .*\r\n$gdb_prompt $" {
# Okay this time.
}
-re ".*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
index cfdd0e7..644f5f9 100644
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -82,7 +82,7 @@ gdb_test_multiple "" "stop threads 1" {
set cmd "info threads"
set ok 0
gdb_test_multiple $cmd $cmd {
- -re " 1 Thread " {
+ -re " 1 *Thread " {
set ok 1
exp_continue
}
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index eb76f1a..bf21104 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -214,7 +214,7 @@ gdb_test "continue" ".*Breakpoint 3.*still alive.*" "continue to synch point"
set no_of_threads 0
send_gdb "info thread\n"
gdb_expect {
- -re "^info thread\[ \t\r\n\]+(\[0-9\]+) Thread.*$gdb_prompt $" {
+ -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]|(\[0-9\]+) *Thread.*$gdb_prompt $" {
set no_of_threads $expect_out(1,string)
pass "get number of threads"
}
@@ -262,10 +262,10 @@ gdb_test "continue" ".*Breakpoint 4.*before exit.*" "threads exited"
send_gdb "info thread\n"
gdb_expect {
- -re ".* 1 Thread.*2 Thread.*$gdb_prompt $" {
+ -re ".* 1 *Thread.*2 *Thread.*$gdb_prompt $" {
fail "Too many threads left at end"
}
- -re ".*\\\* 1 Thread.*main.*$gdb_prompt $" {
+ -re ".*\\\* 1 *Thread.*main.*$gdb_prompt $" {
pass "Expect only base thread at end"
}
-re ".*No stack.*$gdb_prompt $" {
diff --git a/gdb/thread.c b/gdb/thread.c
index 1be325f..88dc24f 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -778,7 +778,49 @@ print_thread_info (struct ui_out *uiout, int requested_thread, int pid)
/* We'll be switching threads temporarily. */
old_chain = make_cleanup_restore_current_thread ();
- make_cleanup_ui_out_list_begin_end (uiout, "threads");
+ /* For backward compatibility, we make a list for MI. A table is
+ preferable for the CLI, though, because it shows table
+ headers. */
+ if (ui_out_is_mi_like_p (uiout))
+ make_cleanup_ui_out_list_begin_end (uiout, "threads");
+ else
+ {
+ int n_threads = 0;
+
+ for (tp = thread_list; tp; tp = tp->next)
+ {
+ if (requested_thread != -1 && tp->num != requested_thread)
+ continue;
+
+ if (pid != -1 && PIDGET (tp->ptid) != pid)
+ continue;
+
+ if (tp->state_ == THREAD_EXITED)
+ continue;
+
+ ++n_threads;
+ }
+
+ if (n_threads == 0)
+ {
+ if (requested_thread == -1)
+ ui_out_message (uiout, 0, _("No threads.\n"));
+ else
+ ui_out_message (uiout, 0, _("No thread %d.\n"), requested_thread);
+ do_cleanups (old_chain);
+ return;
+ }
+
+ make_cleanup_ui_out_table_begin_end (uiout, 5, n_threads, "threads");
+
+ ui_out_table_header (uiout, 1, ui_left, "current", "");
+ ui_out_table_header (uiout, 4, ui_left, "id", "Id");
+ ui_out_table_header (uiout, 17, ui_left, "target-id", "Target ID");
+ ui_out_table_header (uiout, 1, ui_noalign, "details", "");
+ ui_out_table_header (uiout, 1, ui_left, "frame", "Frame");
+ ui_out_table_body (uiout);
+ }
+
for (tp = thread_list; tp; tp = tp->next)
{
struct cleanup *chain2;
@@ -802,13 +844,23 @@ print_thread_info (struct ui_out *uiout, int requested_thread, int pid)
chain2 = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- if (ptid_equal (tp->ptid, current_ptid))
- ui_out_text (uiout, "* ");
+ if (ui_out_is_mi_like_p (uiout))
+ {
+ /* Compatibility. */
+ if (ptid_equal (tp->ptid, current_ptid))
+ ui_out_text (uiout, "* ");
+ else
+ ui_out_text (uiout, " ");
+ }
else
- ui_out_text (uiout, " ");
+ {
+ if (ptid_equal (tp->ptid, current_ptid))
+ ui_out_field_string (uiout, "current", "*");
+ else
+ ui_out_field_skip (uiout, "current");
+ }
ui_out_field_int (uiout, "id", tp->num);
- ui_out_text (uiout, " ");
ui_out_field_string (uiout, "target-id", target_pid_to_str (tp->ptid));
extra_info = target_extra_thread_info (tp);
@@ -818,7 +870,8 @@ print_thread_info (struct ui_out *uiout, int requested_thread, int pid)
ui_out_field_string (uiout, "details", extra_info);
ui_out_text (uiout, ")");
}
- ui_out_text (uiout, " ");
+ else if (! ui_out_is_mi_like_p (uiout))
+ ui_out_field_skip (uiout, "details");
if (tp->state_ == THREAD_RUNNING)
ui_out_text (uiout, "(running)\n");
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: RFC: add table headers to "info thread" output
2010-12-20 21:50 RFC: add table headers to "info thread" output Tom Tromey
@ 2010-12-21 4:01 ` Joel Brobecker
2010-12-21 9:39 ` Pedro Alves
1 sibling, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2010-12-21 4:01 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
> 2010-12-20 Tom Tromey <tromey@redhat.com>
>
> * thread.c (print_thread_info): Make a ui-out table in CLI mode.
FWIW, the change of output seems OK to me.
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC: add table headers to "info thread" output
2010-12-20 21:50 RFC: add table headers to "info thread" output Tom Tromey
2010-12-21 4:01 ` Joel Brobecker
@ 2010-12-21 9:39 ` Pedro Alves
2010-12-21 19:10 ` Tom Tromey
1 sibling, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2010-12-21 9:39 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
On Monday 20 December 2010 21:50:34, Tom Tromey wrote:
> + ui_out_table_header (uiout, 4, ui_left, "id", "Id");
> + ui_out_table_header (uiout, 17, ui_left, "target-id", "Target ID");
IMO, you should make up your mind on "Id" vs "ID".
--
Pedro Alves
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC: add table headers to "info thread" output
2010-12-21 9:39 ` Pedro Alves
@ 2010-12-21 19:10 ` Tom Tromey
2010-12-25 19:23 ` Andreas Schwab
2010-12-27 8:20 ` Andreas Schwab
0 siblings, 2 replies; 6+ messages in thread
From: Tom Tromey @ 2010-12-21 19:10 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
Pedro> On Monday 20 December 2010 21:50:34, Tom Tromey wrote:
>> + ui_out_table_header (uiout, 4, ui_left, "id", "Id");
>> + ui_out_table_header (uiout, 17, ui_left, "target-id", "Target ID");
Pedro> IMO, you should make up your mind on "Id" vs "ID".
Thanks for pointing that out.
I picked "Id", since that is already in use in progspace.c.
I'm committing the appended.
Tom
2010-12-20 Tom Tromey <tromey@redhat.com>
* thread.c (print_thread_info): Make a ui-out table in CLI mode.
2010-12-20 Tom Tromey <tromey@redhat.com>
* gdb.threads/execl.exp: Update.
* gdb.threads/linux-dp.exp: Update.
* gdb.threads/manythreads.exp: Update.
* gdb.threads/tls.exp: Update.
diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp
index cd4a801..9cafeda 100644
--- a/gdb/testsuite/gdb.threads/execl.exp
+++ b/gdb/testsuite/gdb.threads/execl.exp
@@ -46,7 +46,7 @@ gdb_test "b [gdb_get_line_number "breakpoint here"]" \
gdb_test "continue" ".*breakpoint here.*" "continue to exec"
-gdb_test "info threads" ".*3 Thread.*2 Thread.*1 Thread.*" "info threads before exec"
+gdb_test "info threads" ".*3 *Thread.*2 *Thread.*1 *Thread.*" "info threads before exec"
# When continuing from this point we'll hit the breakpoint in main()
# again, this time in the exec'd process.
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index fb2a2ed..abb4f87 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -70,7 +70,10 @@ for {set i 0} {$i < 5} {incr i} {
-re "info threads\r\n" {
exp_continue
}
- -re "^. +(\[0-9\]+ Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
+ -re "^ *Id.*Frame *\[\r\n\]+" {
+ exp_continue
+ }
+ -re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
verbose -log "found thread $expect_out(1,string)" 2
lappend threads_before $expect_out(1,string)
exp_continue
@@ -136,7 +139,10 @@ for {set i 0} {$i < 5} {incr i} {
-re "info threads\r\n" {
exp_continue
}
- -re "^. +(\[0-9\]+ Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
+ -re "^ *Id.*Frame *\[\r\n\]+" {
+ exp_continue
+ }
+ -re "^. +(\[0-9\]+ *Thread \[-0-9a-fx\]+) \[^\n\]*\n" {
set name $expect_out(1,string)
for {set j 0} {$j != [llength $threads_before] } {incr j} {
if {$name == [lindex $threads_before $j]} {
@@ -177,12 +183,12 @@ set nthreads 6
# Run until there are some threads.
gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"]
gdb_continue_to_breakpoint "main thread's sleep"
-set info_threads_ptn ""
+set info_threads_ptn ".*"
for {set i $nthreads} {$i > 0} {incr i -1} {
- append info_threads_ptn "$i Thread .*"
+ append info_threads_ptn "$i *Thread .*"
}
append info_threads_ptn "\[\r\n\]+$gdb_prompt $"
-set info_threads_manager_ptn "[expr $nthreads + 1] Thread .*$info_threads_ptn"
+set info_threads_manager_ptn "[expr $nthreads + 1] *Thread .*$info_threads_ptn"
gdb_test_multiple "info threads" "info threads 2" {
-re "$info_threads_manager_ptn" {
@@ -245,7 +251,7 @@ set only_five 1
for {set i 0} {$only_five > 0 && $i < 10} {incr i} {
gdb_continue_to_breakpoint "thread 5's print, pass: $i"
gdb_test_multiple "info threads" "" {
- -re "\\* 5 Thread .* print_philosopher .*\r\n$gdb_prompt $" {
+ -re "\[*\] 5 *Thread .* +print_philosopher .*\r\n$gdb_prompt $" {
# Okay this time.
}
-re ".*$gdb_prompt $" {
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
index cfdd0e7..644f5f9 100644
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -82,7 +82,7 @@ gdb_test_multiple "" "stop threads 1" {
set cmd "info threads"
set ok 0
gdb_test_multiple $cmd $cmd {
- -re " 1 Thread " {
+ -re " 1 *Thread " {
set ok 1
exp_continue
}
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index eb76f1a..bf21104 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -214,7 +214,7 @@ gdb_test "continue" ".*Breakpoint 3.*still alive.*" "continue to synch point"
set no_of_threads 0
send_gdb "info thread\n"
gdb_expect {
- -re "^info thread\[ \t\r\n\]+(\[0-9\]+) Thread.*$gdb_prompt $" {
+ -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]|(\[0-9\]+) *Thread.*$gdb_prompt $" {
set no_of_threads $expect_out(1,string)
pass "get number of threads"
}
@@ -262,10 +262,10 @@ gdb_test "continue" ".*Breakpoint 4.*before exit.*" "threads exited"
send_gdb "info thread\n"
gdb_expect {
- -re ".* 1 Thread.*2 Thread.*$gdb_prompt $" {
+ -re ".* 1 *Thread.*2 *Thread.*$gdb_prompt $" {
fail "Too many threads left at end"
}
- -re ".*\\\* 1 Thread.*main.*$gdb_prompt $" {
+ -re ".*\\\* 1 *Thread.*main.*$gdb_prompt $" {
pass "Expect only base thread at end"
}
-re ".*No stack.*$gdb_prompt $" {
diff --git a/gdb/thread.c b/gdb/thread.c
index 1be325f..387b00a 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -778,7 +778,49 @@ print_thread_info (struct ui_out *uiout, int requested_thread, int pid)
/* We'll be switching threads temporarily. */
old_chain = make_cleanup_restore_current_thread ();
- make_cleanup_ui_out_list_begin_end (uiout, "threads");
+ /* For backward compatibility, we make a list for MI. A table is
+ preferable for the CLI, though, because it shows table
+ headers. */
+ if (ui_out_is_mi_like_p (uiout))
+ make_cleanup_ui_out_list_begin_end (uiout, "threads");
+ else
+ {
+ int n_threads = 0;
+
+ for (tp = thread_list; tp; tp = tp->next)
+ {
+ if (requested_thread != -1 && tp->num != requested_thread)
+ continue;
+
+ if (pid != -1 && PIDGET (tp->ptid) != pid)
+ continue;
+
+ if (tp->state_ == THREAD_EXITED)
+ continue;
+
+ ++n_threads;
+ }
+
+ if (n_threads == 0)
+ {
+ if (requested_thread == -1)
+ ui_out_message (uiout, 0, _("No threads.\n"));
+ else
+ ui_out_message (uiout, 0, _("No thread %d.\n"), requested_thread);
+ do_cleanups (old_chain);
+ return;
+ }
+
+ make_cleanup_ui_out_table_begin_end (uiout, 5, n_threads, "threads");
+
+ ui_out_table_header (uiout, 1, ui_left, "current", "");
+ ui_out_table_header (uiout, 4, ui_left, "id", "Id");
+ ui_out_table_header (uiout, 17, ui_left, "target-id", "Target Id");
+ ui_out_table_header (uiout, 1, ui_noalign, "details", "");
+ ui_out_table_header (uiout, 1, ui_left, "frame", "Frame");
+ ui_out_table_body (uiout);
+ }
+
for (tp = thread_list; tp; tp = tp->next)
{
struct cleanup *chain2;
@@ -802,13 +844,23 @@ print_thread_info (struct ui_out *uiout, int requested_thread, int pid)
chain2 = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- if (ptid_equal (tp->ptid, current_ptid))
- ui_out_text (uiout, "* ");
+ if (ui_out_is_mi_like_p (uiout))
+ {
+ /* Compatibility. */
+ if (ptid_equal (tp->ptid, current_ptid))
+ ui_out_text (uiout, "* ");
+ else
+ ui_out_text (uiout, " ");
+ }
else
- ui_out_text (uiout, " ");
+ {
+ if (ptid_equal (tp->ptid, current_ptid))
+ ui_out_field_string (uiout, "current", "*");
+ else
+ ui_out_field_skip (uiout, "current");
+ }
ui_out_field_int (uiout, "id", tp->num);
- ui_out_text (uiout, " ");
ui_out_field_string (uiout, "target-id", target_pid_to_str (tp->ptid));
extra_info = target_extra_thread_info (tp);
@@ -818,7 +870,8 @@ print_thread_info (struct ui_out *uiout, int requested_thread, int pid)
ui_out_field_string (uiout, "details", extra_info);
ui_out_text (uiout, ")");
}
- ui_out_text (uiout, " ");
+ else if (! ui_out_is_mi_like_p (uiout))
+ ui_out_field_skip (uiout, "details");
if (tp->state_ == THREAD_RUNNING)
ui_out_text (uiout, "(running)\n");
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: RFC: add table headers to "info thread" output
2010-12-21 19:10 ` Tom Tromey
@ 2010-12-25 19:23 ` Andreas Schwab
2010-12-27 8:20 ` Andreas Schwab
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2010-12-25 19:23 UTC (permalink / raw)
To: Tom Tromey; +Cc: Pedro Alves, gdb-patches
Tested on ppc-linux and checked in as obvious.
Andreas.
2010-12-25 Andreas Schwab <schwab@linux-m68k.org>
* gdb.threads/thread-specific.exp (get_thread_list): Update.
* gdb.threads/execl.exp: Update.
Index: gdb.threads/execl.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/execl.exp,v
retrieving revision 1.4
diff -u -a -p -r1.4 execl.exp
--- gdb.threads/execl.exp 21 Dec 2010 19:10:15 -0000 1.4
+++ gdb.threads/execl.exp 25 Dec 2010 17:52:30 -0000
@@ -57,11 +57,11 @@ gdb_test "info threads" ".*" "info threa
set test "info threads after exec"
gdb_test_multiple "info threads" "$test" {
- -re "2 Thread .*$gdb_prompt $" {
+ -re "2 *Thread .*$gdb_prompt $" {
# Old threads left behind.
fail "$test"
}
- -re "4 Thread .*$gdb_prompt $" {
+ -re "4 *Thread .*$gdb_prompt $" {
# New threads registered.
fail "$test"
}
Index: gdb.threads/thread-specific.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/thread-specific.exp,v
retrieving revision 1.13
diff -u -a -p -r1.13 thread-specific.exp
--- gdb.threads/thread-specific.exp 18 Jun 2010 17:44:40 -0000 1.13
+++ gdb.threads/thread-specific.exp 25 Dec 2010 17:52:30 -0000
@@ -44,11 +44,14 @@ proc get_thread_list { } {
-re "New Thread \[^\n\]*\n" {
exp_continue
}
- -re "^\\* *(\[0-9\]*) Thread \[^\n\]*main\[^\n\]*\n" {
+ -re "^ *Id *Target Id\[^\n\]*\n" {
+ exp_continue
+ }
+ -re "^\\* *(\[0-9\]*) *Thread \[^\n\]*main\[^\n\]*\n" {
set thr_list "$expect_out(1,string) $thr_list"
exp_continue
}
- -re "^ *(\[0-9\]*) Thread \[^\n\]*\n" {
+ -re "^ *(\[0-9\]*) *Thread \[^\n\]*\n" {
lappend thr_list $expect_out(1,string)
exp_continue
}
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: RFC: add table headers to "info thread" output
2010-12-21 19:10 ` Tom Tromey
2010-12-25 19:23 ` Andreas Schwab
@ 2010-12-27 8:20 ` Andreas Schwab
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2010-12-27 8:20 UTC (permalink / raw)
To: Tom Tromey; +Cc: Pedro Alves, gdb-patches
2010-12-25 Andreas Schwab <schwab@linux-m68k.org>
* gdb.threads/tls.exp: Fix typo.
--- gdb.threads/tls.exp.~1.15.~ 2010-12-23 10:49:28.000000000 +0100
+++ gdb.threads/tls.exp 2010-12-25 20:13:55.000000000 +0100
@@ -214,7 +214,7 @@ gdb_test "continue" ".*Breakpoint 3.*sti
set no_of_threads 0
send_gdb "info thread\n"
gdb_expect {
- -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]|(\[0-9\]+) *Thread.*$gdb_prompt $" {
+ -re "^info thread\[ \t\r\n\]+ *Id .*Frame\[ \t\r\n\]+(\[0-9\]+) *Thread.*$gdb_prompt $" {
set no_of_threads $expect_out(1,string)
pass "get number of threads"
}
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-25 19:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 21:50 RFC: add table headers to "info thread" output Tom Tromey
2010-12-21 4:01 ` Joel Brobecker
2010-12-21 9:39 ` Pedro Alves
2010-12-21 19:10 ` Tom Tromey
2010-12-25 19:23 ` Andreas Schwab
2010-12-27 8:20 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox