Hello, I've seen the following session log while GDB is stepping over a thread specific breakpoint: -------- GNU gdb (GDB) 6.8.50.20080707-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". For bug reporting instructions, please see: ... (gdb) b 9 Breakpoint 1 at 0x80484a1: file main.c, line 9. (gdb) run Starting program: /home/suzuki/test/thread [Thread debugging using libthread_db enabled] [New Thread 0xb7f9db90 (LWP 5271)] [Switching to Thread 0xb7f9db90 (LWP 5271)] Breakpoint 1, thread_entry (args=0x0) at main.c:9 9 i+=1; (gdb) l 4 void * 5 thread_entry (void* args) 6 { 7 int i = 0; 8 9 i+=1; 10 i+=2; 11 i+=3; 12 13 return NULL; (gdb) info threads * 2 Thread 0xb7f9db90 (LWP 5271) thread_entry (args=0x0) at main.c:9 1 Thread 0xb7f9e940 (LWP 5268) 0x0012b402 in __kernel_vsyscall () (gdb) b 10 thread 1 Breakpoint 2 at 0x80484a5: file main.c, line 10. (gdb) step 11 i+=3; (gdb) -------- After the program reached to line 9, I set a breakpoint for only thread 1 at line 10. And I invoked step for thread 2. I expected thread 2 would stop at line 10, but it hopped over there and stopped at line 11. (I've attached the program I used to this mail.) The cause is in the below: infrun.c:2117 if (regular_breakpoint_inserted_here_p (stop_pc)) { ecs->random_signal = 0; if (!breakpoint_thread_match (stop_pc, ecs->ptid)) thread_hop_needed = 1; } thread_hop_needed would be set as 1, in the case that the stopped thread does not match the condition of the breakpoint. The thread which is currently single-stepping would also go into here. But the stepping thread should not hop over the breakpoints unconditionally, but check if it has reached the location where stepping would end. I think I've add a check for it with the attached diff. Does it make sense? -- Emi SUZUKI / emi-suzuki at tjsys.co.jp