This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
[PATCH] Fix for thread debugging in the presence of software single step
- From: Nitin Gupta <ngupta at mvista dot com>
- To: gdb at sourceware dot org
- Cc: Jim Blandy <jimb at codesourcery dot com>, Rob Quill <rob dot quill at gmail dot com>
- Date: Tue, 28 Nov 2006 10:41:59 -0800
- Subject: [PATCH] Fix for thread debugging in the presence of software single step
Following patch fixes for thread debugging in the presence of software
single step:
Only allow one thread to single-step if SOFTWARE_SINGLE_STEP_P ()
If it looks OK, Could someone please check it in?
Index: gdb-6.5/gdb/infrun.c
===================================================================
--- gdb-6.5.orig/gdb/infrun.c
+++ gdb-6.5/gdb/infrun.c
@@ -618,10 +618,11 @@
}
if ((scheduler_mode == schedlock_on)
- || (scheduler_mode == schedlock_step
- && (step || singlestep_breakpoints_inserted_p)))
+ || (scheduler_mode == schedlock_step && step)
+ || singlestep_breakpoints_inserted_p)
{
/* User-settable 'scheduler' mode requires solo thread resume. */
+ /* Software single-step doesn't work right with multiple
threads. */
resume_ptid = inferior_ptid;
}