This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]