From 1b54c88cc4f8582222644d65dfd61703206430ef Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 16 Jun 2010 02:00:15 +0000 Subject: Add a "thread specification" class that specifies thread specific breakpoints by name, index, queue or TID. Push this through all the breakpoint management code. Allow this to be set when the breakpoint is created. Fix the Process classes so that a breakpoint hit that is not for a particular thread is not reported as a breakpoint hit event for that thread. Added a "breakpoint configure" command to allow you to reset any of the thread specific options (or the ignore count.) llvm-svn: 106078 --- .../Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote') diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 81369c2368f..a528120915d 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1034,8 +1034,8 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) else if (exc_type == EXC_BREAKPOINT && exc_data[0] == MACH_EXC_DATA0_SOFTWARE_BREAKPOINT) { addr_t pc = gdb_thread->GetRegisterContext()->GetPC(); - user_id_t break_id = GetBreakpointSiteList().FindIDByAddress(pc); - if (break_id == LLDB_INVALID_BREAK_ID) + lldb::BreakpointSiteSP bp_site_sp = GetBreakpointSiteList().FindByAddress(pc); + if (!bp_site_sp) { //log->Printf("got EXC_BREAKPOINT at 0x%llx but didn't find a breakpoint site.\n", pc); stop_info.SetStopReasonWithException(exc_type, exc_data.size()); @@ -1044,8 +1044,17 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) } else { - stop_info.Clear (); - stop_info.SetStopReasonWithBreakpointSiteID (break_id); + if (bp_site_sp->ValidForThisThread (thread_sp.get())) + { + stop_info.Clear (); + stop_info.SetStopReasonWithBreakpointSiteID (bp_site_sp->GetID()); + } + else + { + stop_info.Clear (); + stop_info.SetStopReasonToNone(); + } + } } #endif -- cgit v1.2.3