2006-07-31 Frederic Riss * infrun.c (handle_inferior_event): Set the $_gdb_thread convenience variable. Don't call breakpoint_thread_match anymore. Suggested by Vladimir Prus Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.213 diff -u -p -r1.213 infrun.c --- infrun.c 22 Jul 2006 14:48:03 -0000 1.213 +++ infrun.c 31 Jul 2006 19:26:33 -0000 @@ -1250,6 +1250,10 @@ handle_inferior_event (struct execution_ int sw_single_step_trap_p = 0; int stopped_by_watchpoint = -1; /* Mark as unknown. */ + static struct internalvar *gdb_thread_var = NULL; + + if (gdb_thread_var == NULL) + gdb_thread_var = lookup_internalvar("_gdb_thread"); /* Cache the last pid/waitstatus. */ target_last_wait_ptid = ecs->ptid; @@ -1307,6 +1311,10 @@ handle_inferior_event (struct execution_ ui_out_text (uiout, "]\n"); } + set_internalvar (gdb_thread_var, + value_from_longest (builtin_type_int, + pid_to_thread_id (ecs->ptid))); + switch (ecs->ws.kind) { case TARGET_WAITKIND_LOADED: @@ -1589,8 +1597,6 @@ handle_inferior_event (struct execution_ if (breakpoints_inserted && breakpoint_here_p (stop_pc)) { ecs->random_signal = 0; - if (!breakpoint_thread_match (stop_pc, ecs->ptid)) - thread_hop_needed = 1; } else if (SOFTWARE_SINGLE_STEP_P () && singlestep_breakpoints_inserted_p) {