blob: d2bd858c6dd9e0dfe43e10f006adf662ad505e79 [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:241//===-- ThreadPlanCallFunction.cpp ------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lldb/Target/ThreadPlanCallFunction.h"
11
12// C Includes
13// C++ Includes
14// Other libraries and framework includes
Sean Callanan6db73ca2010-11-03 01:37:5215#include "llvm/Support/MachO.h"
Chris Lattner30fdc8d2010-06-08 16:52:2416// Project includes
17#include "lldb/lldb-private-log.h"
Jim Ingham40d871f2010-10-26 00:27:4518#include "lldb/Breakpoint/Breakpoint.h"
19#include "lldb/Breakpoint/BreakpointLocation.h"
Chris Lattner30fdc8d2010-06-08 16:52:2420#include "lldb/Core/Address.h"
21#include "lldb/Core/Log.h"
22#include "lldb/Core/Stream.h"
Sean Callananf2115102010-11-03 22:19:3823#include "lldb/Target/LanguageRuntime.h"
Chris Lattner30fdc8d2010-06-08 16:52:2424#include "lldb/Target/Process.h"
25#include "lldb/Target/RegisterContext.h"
Jim Ingham40d871f2010-10-26 00:27:4526#include "lldb/Target/StopInfo.h"
Chris Lattner30fdc8d2010-06-08 16:52:2427#include "lldb/Target/Target.h"
28#include "lldb/Target/Thread.h"
29#include "lldb/Target/ThreadPlanRunToAddress.h"
30
31using namespace lldb;
32using namespace lldb_private;
33
34//----------------------------------------------------------------------
35// ThreadPlanCallFunction: Plan to call a single function
36//----------------------------------------------------------------------
37
38ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
39 Address &function,
Greg Clayton2a48f522011-05-14 01:50:3540 addr_t arg,
Chris Lattner30fdc8d2010-06-08 16:52:2441 bool stop_other_threads,
Sean Callananfc55f5d2010-09-21 00:44:1242 bool discard_on_error,
Greg Clayton2a48f522011-05-14 01:50:3543 addr_t *this_arg,
44 addr_t *cmd_arg) :
Jim Inghamb01e742a2010-06-19 04:45:3245 ThreadPlan (ThreadPlan::eKindCallFunction, "Call function plan", thread, eVoteNoOpinion, eVoteNoOpinion),
Benjamin Kramer1ee0d4f2010-07-16 12:32:3346 m_valid (false),
47 m_stop_other_threads (stop_other_threads),
Peter Collingbourne6b5f17a2011-06-03 20:41:0948 m_function_sp (NULL),
Benjamin Kramer1ee0d4f2010-07-16 12:32:3349 m_process (thread.GetProcess()),
Jim Ingham9da36832011-01-22 01:27:2350 m_thread (thread),
Peter Collingbourne6b5f17a2011-06-03 20:41:0951 m_takedown_done (false)
Chris Lattner30fdc8d2010-06-08 16:52:2452{
Chris Lattner30fdc8d2010-06-08 16:52:2453 SetOkayToDiscard (discard_on_error);
54
55 Process& process = thread.GetProcess();
56 Target& target = process.GetTarget();
Greg Clayton31f1d2f2011-05-11 18:39:1857 const ABI *abi = process.GetABI().get();
Sean Callanan6db73ca2010-11-03 01:37:5258
Chris Lattner30fdc8d2010-06-08 16:52:2459 if (!abi)
60 return;
Sean Callanan6db73ca2010-11-03 01:37:5261
Jim Ingham77787032011-01-20 02:03:1862 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
63
Sean Callanan6db73ca2010-11-03 01:37:5264 SetBreakpoints();
65
Sean Callanane359d9b2011-05-09 22:04:3666 m_function_sp = thread.GetRegisterContext()->GetSP() - abi->GetRedZoneSize();
Chris Lattner30fdc8d2010-06-08 16:52:2467
Greg Claytonaa149cb2011-08-11 02:48:4568 Module *exe_module = target.GetExecutableModulePointer();
Chris Lattner30fdc8d2010-06-08 16:52:2469
Greg Claytonaa149cb2011-08-11 02:48:4570 if (exe_module == NULL)
Jim Ingham672e6f52011-03-07 23:44:0871 {
Johnny Chen9e916e82011-08-10 17:58:1172 if (log)
73 log->Printf ("Can't execute code without an executable module.");
Chris Lattner30fdc8d2010-06-08 16:52:2474 return;
Jim Ingham672e6f52011-03-07 23:44:0875 }
76 else
77 {
Greg Claytonaa149cb2011-08-11 02:48:4578 ObjectFile *objectFile = exe_module->GetObjectFile();
Jim Ingham672e6f52011-03-07 23:44:0879 if (!objectFile)
80 {
Johnny Chen9e916e82011-08-10 17:58:1181 if (log)
82 log->Printf ("Could not find object file for module \"%s\".",
83 executableModuleSP->GetFileSpec().GetFilename().AsCString());
Jim Ingham672e6f52011-03-07 23:44:0884 return;
85 }
86 m_start_addr = objectFile->GetEntryPointAddress();
87 if (!m_start_addr.IsValid())
88 {
Johnny Chen9e916e82011-08-10 17:58:1189 if (log)
90 log->Printf ("Could not find entry point address for executable module \"%s\".",
91 executableModuleSP->GetFileSpec().GetFilename().AsCString());
Jim Ingham672e6f52011-03-07 23:44:0892 return;
93 }
94 }
Chris Lattner30fdc8d2010-06-08 16:52:2495
Greg Clayton2a48f522011-05-14 01:50:3596 addr_t start_load_addr = m_start_addr.GetLoadAddress(&target);
Jim Ingham672e6f52011-03-07 23:44:0897
Jim Ingham77787032011-01-20 02:03:1898 // Checkpoint the thread state so we can restore it later.
Jim Ingham9da36832011-01-22 01:27:2399 if (log && log->GetVerbose())
100 ReportRegisterState ("About to checkpoint thread before function call. Original register state was:");
101
Jim Ingham77787032011-01-20 02:03:18102 if (!thread.CheckpointThreadState (m_stored_thread_state))
103 {
104 if (log)
105 log->Printf ("Setting up ThreadPlanCallFunction, failed to checkpoint thread state.");
Chris Lattner30fdc8d2010-06-08 16:52:24106 return;
Jim Ingham77787032011-01-20 02:03:18107 }
108 // Now set the thread state to "no reason" so we don't run with whatever signal was outstanding...
109 thread.SetStopInfoToNothing();
110
Chris Lattner30fdc8d2010-06-08 16:52:24111 m_function_addr = function;
Greg Clayton2a48f522011-05-14 01:50:35112 addr_t FunctionLoadAddr = m_function_addr.GetLoadAddress(&target);
Chris Lattner30fdc8d2010-06-08 16:52:24113
Greg Claytonfdeb1562011-05-12 02:14:56114 if (this_arg && cmd_arg)
115 {
116 if (!abi->PrepareTrivialCall (thread,
117 m_function_sp,
118 FunctionLoadAddr,
Greg Clayton2a48f522011-05-14 01:50:35119 start_load_addr,
Greg Claytonfdeb1562011-05-12 02:14:56120 this_arg,
121 cmd_arg,
Greg Clayton2a48f522011-05-14 01:50:35122 &arg))
Greg Claytonfdeb1562011-05-12 02:14:56123 return;
124 }
125 else if (this_arg)
126 {
127 if (!abi->PrepareTrivialCall (thread,
128 m_function_sp,
129 FunctionLoadAddr,
Greg Clayton2a48f522011-05-14 01:50:35130 start_load_addr,
Greg Claytonfdeb1562011-05-12 02:14:56131 this_arg,
Greg Clayton2a48f522011-05-14 01:50:35132 &arg))
Greg Claytonfdeb1562011-05-12 02:14:56133 return;
134 }
135 else
136 {
137 if (!abi->PrepareTrivialCall (thread,
138 m_function_sp,
139 FunctionLoadAddr,
Greg Clayton2a48f522011-05-14 01:50:35140 start_load_addr,
141 &arg))
142 return;
143 }
144
145 ReportRegisterState ("Function call was set up. Register state was:");
146
147 m_valid = true;
148}
149
150
151ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
152 Address &function,
153 bool stop_other_threads,
154 bool discard_on_error,
155 addr_t *arg1_ptr,
156 addr_t *arg2_ptr,
157 addr_t *arg3_ptr,
158 addr_t *arg4_ptr,
159 addr_t *arg5_ptr,
160 addr_t *arg6_ptr) :
161 ThreadPlan (ThreadPlan::eKindCallFunction, "Call function plan", thread, eVoteNoOpinion, eVoteNoOpinion),
162 m_valid (false),
163 m_stop_other_threads (stop_other_threads),
Peter Collingbourne6b5f17a2011-06-03 20:41:09164 m_function_sp(NULL),
Greg Clayton2a48f522011-05-14 01:50:35165 m_process (thread.GetProcess()),
166 m_thread (thread),
Peter Collingbourne6b5f17a2011-06-03 20:41:09167 m_takedown_done (false)
Greg Clayton2a48f522011-05-14 01:50:35168{
169 SetOkayToDiscard (discard_on_error);
170
171 Process& process = thread.GetProcess();
172 Target& target = process.GetTarget();
173 const ABI *abi = process.GetABI().get();
174
175 if (!abi)
176 return;
177
178 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
179
180 SetBreakpoints();
181
182 m_function_sp = thread.GetRegisterContext()->GetSP() - abi->GetRedZoneSize();
183
Greg Claytonaa149cb2011-08-11 02:48:45184 Module *exe_module = target.GetExecutableModulePointer();
Greg Clayton2a48f522011-05-14 01:50:35185
Greg Claytonaa149cb2011-08-11 02:48:45186 if (exe_module == NULL)
Greg Clayton2a48f522011-05-14 01:50:35187 {
Johnny Chen9e916e82011-08-10 17:58:11188 if (log)
189 log->Printf ("Can't execute code without an executable module.");
Greg Clayton2a48f522011-05-14 01:50:35190 return;
191 }
192 else
193 {
Greg Claytonaa149cb2011-08-11 02:48:45194 ObjectFile *objectFile = exe_module->GetObjectFile();
Greg Clayton2a48f522011-05-14 01:50:35195 if (!objectFile)
196 {
Johnny Chen9e916e82011-08-10 17:58:11197 if (log)
198 log->Printf ("Could not find object file for module \"%s\".",
199 executableModuleSP->GetFileSpec().GetFilename().AsCString());
Greg Clayton2a48f522011-05-14 01:50:35200 return;
201 }
202 m_start_addr = objectFile->GetEntryPointAddress();
203 if (!m_start_addr.IsValid())
204 {
Greg Claytonaf247d72011-05-19 03:54:16205 if (log)
206 log->Printf ("Could not find entry point address for executable module \"%s\".",
Greg Claytonaa149cb2011-08-11 02:48:45207 exe_module->GetFileSpec().GetFilename().AsCString());
Greg Clayton2a48f522011-05-14 01:50:35208 return;
209 }
210 }
211
212 addr_t start_load_addr = m_start_addr.GetLoadAddress(&target);
213
214 // Checkpoint the thread state so we can restore it later.
215 if (log && log->GetVerbose())
216 ReportRegisterState ("About to checkpoint thread before function call. Original register state was:");
217
218 if (!thread.CheckpointThreadState (m_stored_thread_state))
219 {
220 if (log)
221 log->Printf ("Setting up ThreadPlanCallFunction, failed to checkpoint thread state.");
222 return;
223 }
224 // Now set the thread state to "no reason" so we don't run with whatever signal was outstanding...
225 thread.SetStopInfoToNothing();
226
227 m_function_addr = function;
228 addr_t FunctionLoadAddr = m_function_addr.GetLoadAddress(&target);
229
230 if (!abi->PrepareTrivialCall (thread,
231 m_function_sp,
232 FunctionLoadAddr,
233 start_load_addr,
234 arg1_ptr,
235 arg2_ptr,
236 arg3_ptr,
237 arg4_ptr,
238 arg5_ptr,
239 arg6_ptr))
240 {
Greg Claytonfdeb1562011-05-12 02:14:56241 return;
242 }
Chris Lattner30fdc8d2010-06-08 16:52:24243
Jim Ingham9da36832011-01-22 01:27:23244 ReportRegisterState ("Function call was set up. Register state was:");
245
246 m_valid = true;
247}
248
249ThreadPlanCallFunction::~ThreadPlanCallFunction ()
250{
251}
252
253void
254ThreadPlanCallFunction::ReportRegisterState (const char *message)
255{
Greg Claytonaf247d72011-05-19 03:54:16256 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_VERBOSE));
Sean Callananece96492010-11-08 03:49:50257 if (log)
258 {
Greg Claytonaf247d72011-05-19 03:54:16259 StreamString strm;
Greg Clayton5ccbd292011-01-06 22:15:06260 RegisterContext *reg_ctx = m_thread.GetRegisterContext().get();
Jim Ingham9da36832011-01-22 01:27:23261
262 log->PutCString(message);
263
Greg Claytonaf247d72011-05-19 03:54:16264 RegisterValue reg_value;
265
266 for (uint32_t reg_idx = 0, num_registers = reg_ctx->GetRegisterCount();
267 reg_idx < num_registers;
268 ++reg_idx)
Sean Callananece96492010-11-08 03:49:50269 {
Greg Claytonaf247d72011-05-19 03:54:16270 const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex (reg_idx);
271 if (reg_ctx->ReadRegister(reg_info, reg_value))
272 {
273 reg_value.Dump(&strm, reg_info, true, false, eFormatDefault);
274 strm.EOL();
275 }
Sean Callananece96492010-11-08 03:49:50276 }
Greg Claytonaf247d72011-05-19 03:54:16277 log->PutCString(strm.GetData());
Sean Callananece96492010-11-08 03:49:50278 }
Sean Callanan10af7c42010-11-04 01:51:38279}
280
281void
282ThreadPlanCallFunction::DoTakedown ()
283{
Jim Ingham9da36832011-01-22 01:27:23284 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
285 if (!m_takedown_done)
Jim Ingham77787032011-01-20 02:03:18286 {
Greg Clayton70b57652011-05-15 01:25:55287 // TODO: how do we tell if all went well?
288 if (m_return_value_sp)
289 {
290 const ABI *abi = m_thread.GetProcess().GetABI().get();
291 if (abi)
292 abi->GetReturnValue(m_thread, *m_return_value_sp);
293 }
Jim Ingham9da36832011-01-22 01:27:23294 if (log)
295 log->Printf ("DoTakedown called for thread 0x%4.4x, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
296 m_takedown_done = true;
Jim Ingham160f78c2011-05-17 01:10:11297 m_real_stop_info_sp = GetPrivateStopReason();
Jim Ingham77787032011-01-20 02:03:18298 m_thread.RestoreThreadStateFromCheckpoint(m_stored_thread_state);
299 SetPlanComplete();
300 ClearBreakpoints();
Jim Ingham9da36832011-01-22 01:27:23301 if (log && log->GetVerbose())
302 ReportRegisterState ("Restoring thread state after function call. Restored register state:");
Jim Ingham2c364392011-01-26 19:13:09303
Jim Ingham9da36832011-01-22 01:27:23304 }
305 else
306 {
307 if (log)
308 log->Printf ("DoTakedown called as no-op for thread 0x%4.4x, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
Jim Ingham77787032011-01-20 02:03:18309 }
Chris Lattner30fdc8d2010-06-08 16:52:24310}
311
312void
Jim Inghambda4e5eb2011-01-18 01:58:06313ThreadPlanCallFunction::WillPop ()
314{
Jim Ingham77787032011-01-20 02:03:18315 DoTakedown();
Jim Inghambda4e5eb2011-01-18 01:58:06316}
317
318void
Greg Clayton2a48f522011-05-14 01:50:35319ThreadPlanCallFunction::GetDescription (Stream *s, DescriptionLevel level)
Chris Lattner30fdc8d2010-06-08 16:52:24320{
Greg Clayton2a48f522011-05-14 01:50:35321 if (level == eDescriptionLevelBrief)
Chris Lattner30fdc8d2010-06-08 16:52:24322 {
323 s->Printf("Function call thread plan");
324 }
325 else
326 {
Greg Clayton2a48f522011-05-14 01:50:35327 s->Printf("Thread plan to call 0x%llx", m_function_addr.GetLoadAddress(&m_process.GetTarget()));
Chris Lattner30fdc8d2010-06-08 16:52:24328 }
329}
330
331bool
332ThreadPlanCallFunction::ValidatePlan (Stream *error)
333{
334 if (!m_valid)
335 return false;
336
337 return true;
338}
339
340bool
341ThreadPlanCallFunction::PlanExplainsStop ()
Sean Callanan6db73ca2010-11-03 01:37:52342{
Jim Ingham160f78c2011-05-17 01:10:11343 m_real_stop_info_sp = GetPrivateStopReason();
344
Jim Ingham40d871f2010-10-26 00:27:45345 // If our subplan knows why we stopped, even if it's done (which would forward the question to us)
346 // we answer yes.
Enrico Granata20edcdb2011-07-19 18:03:25347 if (m_subplan_sp.get() != NULL && m_subplan_sp->PlanExplainsStop())
Jim Ingham40d871f2010-10-26 00:27:45348 return true;
Sean Callanan3e6fedc2010-10-19 22:24:06349
Sean Callananc98aca62010-11-03 19:36:28350 // Check if the breakpoint is one of ours.
351
352 if (BreakpointsExplainStop())
353 return true;
354
Jim Ingham40d871f2010-10-26 00:27:45355 // If we don't want to discard this plan, than any stop we don't understand should be propagated up the stack.
356 if (!OkayToDiscard())
357 return false;
358
359 // Otherwise, check the case where we stopped for an internal breakpoint, in that case, continue on.
360 // If it is not an internal breakpoint, consult OkayToDiscard.
Sean Callanan6db73ca2010-11-03 01:37:52361
Jim Ingham160f78c2011-05-17 01:10:11362 if (m_real_stop_info_sp && m_real_stop_info_sp->GetStopReason() == eStopReasonBreakpoint)
Jim Ingham40d871f2010-10-26 00:27:45363 {
Jim Ingham160f78c2011-05-17 01:10:11364 uint64_t break_site_id = m_real_stop_info_sp->GetValue();
Greg Clayton2a48f522011-05-14 01:50:35365 BreakpointSiteSP bp_site_sp = m_thread.GetProcess().GetBreakpointSiteList().FindByID(break_site_id);
Jim Ingham40d871f2010-10-26 00:27:45366 if (bp_site_sp)
367 {
368 uint32_t num_owners = bp_site_sp->GetNumberOfOwners();
369 bool is_internal = true;
370 for (uint32_t i = 0; i < num_owners; i++)
371 {
Sean Callanan6db73ca2010-11-03 01:37:52372 Breakpoint &bp = bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint();
Sean Callanan6db73ca2010-11-03 01:37:52373
374 if (!bp.IsInternal())
Jim Ingham40d871f2010-10-26 00:27:45375 {
376 is_internal = false;
377 break;
378 }
379 }
380 if (is_internal)
381 return false;
382 }
383
384 return OkayToDiscard();
385 }
386 else
387 {
388 // If the subplan is running, any crashes are attributable to us.
Jim Ingham2c364392011-01-26 19:13:09389 // If we want to discard the plan, then we say we explain the stop
390 // but if we are going to be discarded, let whoever is above us
391 // explain the stop.
392 return ((m_subplan_sp.get() != NULL) && !OkayToDiscard());
Jim Ingham40d871f2010-10-26 00:27:45393 }
Chris Lattner30fdc8d2010-06-08 16:52:24394}
395
396bool
397ThreadPlanCallFunction::ShouldStop (Event *event_ptr)
398{
399 if (PlanExplainsStop())
400 {
Jim Ingham9da36832011-01-22 01:27:23401 ReportRegisterState ("Function completed. Register state was:");
Sean Callanan5300d372010-07-31 01:32:05402
Sean Callanan10af7c42010-11-04 01:51:38403 DoTakedown();
Sean Callanan6db73ca2010-11-03 01:37:52404
Chris Lattner30fdc8d2010-06-08 16:52:24405 return true;
406 }
407 else
408 {
409 return false;
410 }
411}
412
413bool
414ThreadPlanCallFunction::StopOthers ()
415{
416 return m_stop_other_threads;
417}
418
419void
420ThreadPlanCallFunction::SetStopOthers (bool new_value)
421{
422 if (m_subplan_sp)
423 {
424 ThreadPlanRunToAddress *address_plan = static_cast<ThreadPlanRunToAddress *>(m_subplan_sp.get());
425 address_plan->SetStopOthers(new_value);
426 }
427 m_stop_other_threads = new_value;
428}
429
430StateType
Jim Ingham06e827c2010-11-11 19:26:09431ThreadPlanCallFunction::GetPlanRunState ()
Chris Lattner30fdc8d2010-06-08 16:52:24432{
433 return eStateRunning;
434}
435
436void
437ThreadPlanCallFunction::DidPush ()
438{
Sean Callananbe3a1b12010-10-26 00:31:56439//#define SINGLE_STEP_EXPRESSIONS
440
441#ifndef SINGLE_STEP_EXPRESSIONS
Chris Lattner30fdc8d2010-06-08 16:52:24442 m_subplan_sp.reset(new ThreadPlanRunToAddress(m_thread, m_start_addr, m_stop_other_threads));
443
444 m_thread.QueueThreadPlan(m_subplan_sp, false);
Jim Ingham77787032011-01-20 02:03:18445 m_subplan_sp->SetPrivate (true);
Sean Callananbe3a1b12010-10-26 00:31:56446#endif
Chris Lattner30fdc8d2010-06-08 16:52:24447}
448
449bool
450ThreadPlanCallFunction::WillStop ()
451{
452 return true;
453}
454
455bool
456ThreadPlanCallFunction::MischiefManaged ()
457{
458 if (IsPlanComplete())
459 {
Greg Clayton2d4edfb2010-11-06 01:53:30460 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Chris Lattner30fdc8d2010-06-08 16:52:24461
462 if (log)
463 log->Printf("Completed call function plan.");
464
465 ThreadPlan::MischiefManaged ();
466 return true;
467 }
468 else
469 {
470 return false;
471 }
472}
Sean Callanan6db73ca2010-11-03 01:37:52473
474void
475ThreadPlanCallFunction::SetBreakpoints ()
476{
Sean Callananf2115102010-11-03 22:19:38477 m_cxx_language_runtime = m_process.GetLanguageRuntime(eLanguageTypeC_plus_plus);
478 m_objc_language_runtime = m_process.GetLanguageRuntime(eLanguageTypeObjC);
Sean Callanan6db73ca2010-11-03 01:37:52479
Sean Callananf2115102010-11-03 22:19:38480 if (m_cxx_language_runtime)
481 m_cxx_language_runtime->SetExceptionBreakpoints();
482 if (m_objc_language_runtime)
483 m_objc_language_runtime->SetExceptionBreakpoints();
Sean Callanan6db73ca2010-11-03 01:37:52484}
485
486void
487ThreadPlanCallFunction::ClearBreakpoints ()
488{
Sean Callananf2115102010-11-03 22:19:38489 if (m_cxx_language_runtime)
490 m_cxx_language_runtime->ClearExceptionBreakpoints();
491 if (m_objc_language_runtime)
492 m_objc_language_runtime->ClearExceptionBreakpoints();
Sean Callanan6db73ca2010-11-03 01:37:52493}
Sean Callananc98aca62010-11-03 19:36:28494
495bool
496ThreadPlanCallFunction::BreakpointsExplainStop()
497{
Greg Clayton2a48f522011-05-14 01:50:35498 StopInfoSP stop_info_sp = GetPrivateStopReason();
Sean Callananc98aca62010-11-03 19:36:28499
Sean Callananf2115102010-11-03 22:19:38500 if (m_cxx_language_runtime &&
501 m_cxx_language_runtime->ExceptionBreakpointsExplainStop(stop_info_sp))
502 return true;
Sean Callananc98aca62010-11-03 19:36:28503
Sean Callananf2115102010-11-03 22:19:38504 if (m_objc_language_runtime &&
505 m_objc_language_runtime->ExceptionBreakpointsExplainStop(stop_info_sp))
506 return true;
Sean Callananc98aca62010-11-03 19:36:28507
508 return false;
509}