aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-08-28 14:03:27 +0000
committerPedro Alves <palves@redhat.com>2010-08-28 14:03:27 +0000
commitb4d51a55f99ed33da4f4d061c18d0e4fca63a29b (patch)
treeded980d194c1b6bc268877d197d82ecd602f078c /gdb
parent46a9699269daf00ad6665c630c841ba160c27326 (diff)
downloadgdb-b4d51a55f99ed33da4f4d061c18d0e4fca63a29b.zip
gdb-b4d51a55f99ed33da4f4d061c18d0e4fca63a29b.tar.gz
gdb-b4d51a55f99ed33da4f4d061c18d0e4fca63a29b.tar.bz2
* linux-low.c (linux_stabilize_threads): Wrap debug output in a
debug_threads check. Avoid a linear search when not doing debug output.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/linux-low.c15
2 files changed, 14 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 6ba13dd..fc7bb90 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-28 Pedro Alves <pedro@codesourcery.com>
+
+ * linux-low.c (linux_stabilize_threads): Wrap debug output in a
+ debug_threads check. Avoid a linear search when not doing debug
+ output.
+
2010-08-27 Pedro Alves <pedro@codesourcery.com>
* event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 0f6c543..cbcb840 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1884,8 +1884,9 @@ linux_stabilize_threads (void)
stuck_in_jump_pad_callback, NULL);
if (lwp_stuck != NULL)
{
- fprintf (stderr, "can't stabilize, LWP %ld is stuck in jump pad\n",
- lwpid_of (lwp_stuck));
+ if (debug_threads)
+ fprintf (stderr, "can't stabilize, LWP %ld is stuck in jump pad\n",
+ lwpid_of (lwp_stuck));
return;
}
@@ -1931,12 +1932,12 @@ linux_stabilize_threads (void)
current_inferior = save_inferior;
- lwp_stuck
- = (struct lwp_info *) find_inferior (&all_lwps,
- stuck_in_jump_pad_callback, NULL);
- if (lwp_stuck != NULL)
+ if (debug_threads)
{
- if (debug_threads)
+ lwp_stuck
+ = (struct lwp_info *) find_inferior (&all_lwps,
+ stuck_in_jump_pad_callback, NULL);
+ if (lwp_stuck != NULL)
fprintf (stderr, "couldn't stabilize, LWP %ld got stuck in jump pad\n",
lwpid_of (lwp_stuck));
}