blob: 2494c7cacfd233df4e851403c90427821e48059f [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),
Jim Ingham16e0c682011-08-12 23:34:3148 m_function_addr (function),
Peter Collingbourne6b5f17a2011-06-03 20:41:0949 m_function_sp (NULL),
Jim Inghamce553d82011-11-01 02:46:5450 m_takedown_done (false),
51 m_stop_address (LLDB_INVALID_ADDRESS)
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\".",
Greg Clayton0c02e4e2011-08-11 04:30:3983 exe_module->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\".",
Greg Clayton0c02e4e2011-08-11 04:30:3991 exe_module->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
Greg Clayton2a48f522011-05-14 01:50:35111 addr_t FunctionLoadAddr = m_function_addr.GetLoadAddress(&target);
Chris Lattner30fdc8d2010-06-08 16:52:24112
Greg Claytonfdeb1562011-05-12 02:14:56113 if (this_arg && cmd_arg)
114 {
115 if (!abi->PrepareTrivialCall (thread,
116 m_function_sp,
117 FunctionLoadAddr,
Greg Clayton2a48f522011-05-14 01:50:35118 start_load_addr,
Greg Claytonfdeb1562011-05-12 02:14:56119 this_arg,
120 cmd_arg,
Greg Clayton2a48f522011-05-14 01:50:35121 &arg))
Greg Claytonfdeb1562011-05-12 02:14:56122 return;
123 }
124 else if (this_arg)
125 {
126 if (!abi->PrepareTrivialCall (thread,
127 m_function_sp,
128 FunctionLoadAddr,
Greg Clayton2a48f522011-05-14 01:50:35129 start_load_addr,
Greg Claytonfdeb1562011-05-12 02:14:56130 this_arg,
Greg Clayton2a48f522011-05-14 01:50:35131 &arg))
Greg Claytonfdeb1562011-05-12 02:14:56132 return;
133 }
134 else
135 {
136 if (!abi->PrepareTrivialCall (thread,
137 m_function_sp,
138 FunctionLoadAddr,
Greg Clayton2a48f522011-05-14 01:50:35139 start_load_addr,
140 &arg))
141 return;
142 }
143
144 ReportRegisterState ("Function call was set up. Register state was:");
145
146 m_valid = true;
147}
148
149
150ThreadPlanCallFunction::ThreadPlanCallFunction (Thread &thread,
151 Address &function,
152 bool stop_other_threads,
153 bool discard_on_error,
154 addr_t *arg1_ptr,
155 addr_t *arg2_ptr,
156 addr_t *arg3_ptr,
157 addr_t *arg4_ptr,
158 addr_t *arg5_ptr,
159 addr_t *arg6_ptr) :
160 ThreadPlan (ThreadPlan::eKindCallFunction, "Call function plan", thread, eVoteNoOpinion, eVoteNoOpinion),
161 m_valid (false),
162 m_stop_other_threads (stop_other_threads),
Jim Ingham16e0c682011-08-12 23:34:31163 m_function_addr (function),
Peter Collingbourne6b5f17a2011-06-03 20:41:09164 m_function_sp(NULL),
Peter Collingbourne6b5f17a2011-06-03 20:41:09165 m_takedown_done (false)
Greg Clayton2a48f522011-05-14 01:50:35166{
167 SetOkayToDiscard (discard_on_error);
168
169 Process& process = thread.GetProcess();
170 Target& target = process.GetTarget();
171 const ABI *abi = process.GetABI().get();
172
173 if (!abi)
174 return;
175
176 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
177
178 SetBreakpoints();
179
180 m_function_sp = thread.GetRegisterContext()->GetSP() - abi->GetRedZoneSize();
181
Greg Claytonaa149cb2011-08-11 02:48:45182 Module *exe_module = target.GetExecutableModulePointer();
Greg Clayton2a48f522011-05-14 01:50:35183
Greg Claytonaa149cb2011-08-11 02:48:45184 if (exe_module == NULL)
Greg Clayton2a48f522011-05-14 01:50:35185 {
Johnny Chen9e916e82011-08-10 17:58:11186 if (log)
187 log->Printf ("Can't execute code without an executable module.");
Greg Clayton2a48f522011-05-14 01:50:35188 return;
189 }
190 else
191 {
Greg Claytonaa149cb2011-08-11 02:48:45192 ObjectFile *objectFile = exe_module->GetObjectFile();
Greg Clayton2a48f522011-05-14 01:50:35193 if (!objectFile)
194 {
Johnny Chen9e916e82011-08-10 17:58:11195 if (log)
196 log->Printf ("Could not find object file for module \"%s\".",
Greg Clayton0c02e4e2011-08-11 04:30:39197 exe_module->GetFileSpec().GetFilename().AsCString());
Greg Clayton2a48f522011-05-14 01:50:35198 return;
199 }
200 m_start_addr = objectFile->GetEntryPointAddress();
201 if (!m_start_addr.IsValid())
202 {
Greg Claytonaf247d72011-05-19 03:54:16203 if (log)
204 log->Printf ("Could not find entry point address for executable module \"%s\".",
Greg Claytonaa149cb2011-08-11 02:48:45205 exe_module->GetFileSpec().GetFilename().AsCString());
Greg Clayton2a48f522011-05-14 01:50:35206 return;
207 }
208 }
209
210 addr_t start_load_addr = m_start_addr.GetLoadAddress(&target);
211
212 // Checkpoint the thread state so we can restore it later.
213 if (log && log->GetVerbose())
214 ReportRegisterState ("About to checkpoint thread before function call. Original register state was:");
215
216 if (!thread.CheckpointThreadState (m_stored_thread_state))
217 {
218 if (log)
219 log->Printf ("Setting up ThreadPlanCallFunction, failed to checkpoint thread state.");
220 return;
221 }
222 // Now set the thread state to "no reason" so we don't run with whatever signal was outstanding...
223 thread.SetStopInfoToNothing();
224
Greg Clayton2a48f522011-05-14 01:50:35225 addr_t FunctionLoadAddr = m_function_addr.GetLoadAddress(&target);
226
227 if (!abi->PrepareTrivialCall (thread,
228 m_function_sp,
229 FunctionLoadAddr,
230 start_load_addr,
231 arg1_ptr,
232 arg2_ptr,
233 arg3_ptr,
234 arg4_ptr,
235 arg5_ptr,
236 arg6_ptr))
237 {
Greg Claytonfdeb1562011-05-12 02:14:56238 return;
239 }
Chris Lattner30fdc8d2010-06-08 16:52:24240
Jim Ingham9da36832011-01-22 01:27:23241 ReportRegisterState ("Function call was set up. Register state was:");
242
243 m_valid = true;
244}
245
246ThreadPlanCallFunction::~ThreadPlanCallFunction ()
247{
248}
249
250void
251ThreadPlanCallFunction::ReportRegisterState (const char *message)
252{
Greg Claytonaf247d72011-05-19 03:54:16253 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP | LIBLLDB_LOG_VERBOSE));
Sean Callananece96492010-11-08 03:49:50254 if (log)
255 {
Greg Claytonaf247d72011-05-19 03:54:16256 StreamString strm;
Greg Clayton5ccbd292011-01-06 22:15:06257 RegisterContext *reg_ctx = m_thread.GetRegisterContext().get();
Jim Ingham9da36832011-01-22 01:27:23258
259 log->PutCString(message);
260
Greg Claytonaf247d72011-05-19 03:54:16261 RegisterValue reg_value;
262
263 for (uint32_t reg_idx = 0, num_registers = reg_ctx->GetRegisterCount();
264 reg_idx < num_registers;
265 ++reg_idx)
Sean Callananece96492010-11-08 03:49:50266 {
Greg Claytonaf247d72011-05-19 03:54:16267 const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex (reg_idx);
268 if (reg_ctx->ReadRegister(reg_info, reg_value))
269 {
270 reg_value.Dump(&strm, reg_info, true, false, eFormatDefault);
271 strm.EOL();
272 }
Sean Callananece96492010-11-08 03:49:50273 }
Greg Claytonaf247d72011-05-19 03:54:16274 log->PutCString(strm.GetData());
Sean Callananece96492010-11-08 03:49:50275 }
Sean Callanan10af7c42010-11-04 01:51:38276}
277
278void
279ThreadPlanCallFunction::DoTakedown ()
280{
Jim Ingham9da36832011-01-22 01:27:23281 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
282 if (!m_takedown_done)
Jim Ingham77787032011-01-20 02:03:18283 {
Greg Clayton70b57652011-05-15 01:25:55284 // TODO: how do we tell if all went well?
285 if (m_return_value_sp)
286 {
287 const ABI *abi = m_thread.GetProcess().GetABI().get();
288 if (abi)
289 abi->GetReturnValue(m_thread, *m_return_value_sp);
290 }
Jim Ingham9da36832011-01-22 01:27:23291 if (log)
Greg Clayton81c22f62011-10-19 18:09:39292 log->Printf ("DoTakedown called for thread 0x%4.4llx, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
Jim Ingham9da36832011-01-22 01:27:23293 m_takedown_done = true;
Jim Inghamce553d82011-11-01 02:46:54294 m_stop_address = m_thread.GetStackFrameAtIndex(0)->GetRegisterContext()->GetPC();
Jim Ingham160f78c2011-05-17 01:10:11295 m_real_stop_info_sp = GetPrivateStopReason();
Jim Ingham77787032011-01-20 02:03:18296 m_thread.RestoreThreadStateFromCheckpoint(m_stored_thread_state);
297 SetPlanComplete();
298 ClearBreakpoints();
Jim Ingham9da36832011-01-22 01:27:23299 if (log && log->GetVerbose())
300 ReportRegisterState ("Restoring thread state after function call. Restored register state:");
Jim Ingham2c364392011-01-26 19:13:09301
Jim Ingham9da36832011-01-22 01:27:23302 }
303 else
304 {
305 if (log)
Greg Clayton81c22f62011-10-19 18:09:39306 log->Printf ("DoTakedown called as no-op for thread 0x%4.4llx, m_valid: %d complete: %d.\n", m_thread.GetID(), m_valid, IsPlanComplete());
Jim Ingham77787032011-01-20 02:03:18307 }
Chris Lattner30fdc8d2010-06-08 16:52:24308}
309
310void
Jim Inghambda4e5eb2011-01-18 01:58:06311ThreadPlanCallFunction::WillPop ()
312{
Jim Ingham77787032011-01-20 02:03:18313 DoTakedown();
Jim Inghambda4e5eb2011-01-18 01:58:06314}
315
316void
Greg Clayton2a48f522011-05-14 01:50:35317ThreadPlanCallFunction::GetDescription (Stream *s, DescriptionLevel level)
Chris Lattner30fdc8d2010-06-08 16:52:24318{
Greg Clayton2a48f522011-05-14 01:50:35319 if (level == eDescriptionLevelBrief)
Chris Lattner30fdc8d2010-06-08 16:52:24320 {
321 s->Printf("Function call thread plan");
322 }
323 else
324 {
Jim Inghamce553d82011-11-01 02:46:54325 s->Printf("Thread plan to call 0x%llx", m_function_addr.GetLoadAddress(&m_thread.GetProcess().GetTarget()));
Chris Lattner30fdc8d2010-06-08 16:52:24326 }
327}
328
329bool
330ThreadPlanCallFunction::ValidatePlan (Stream *error)
331{
332 if (!m_valid)
333 return false;
334
335 return true;
336}
337
338bool
339ThreadPlanCallFunction::PlanExplainsStop ()
Sean Callanan6db73ca2010-11-03 01:37:52340{
Jim Ingham160f78c2011-05-17 01:10:11341 m_real_stop_info_sp = GetPrivateStopReason();
342
Jim Ingham40d871f2010-10-26 00:27:45343 // If our subplan knows why we stopped, even if it's done (which would forward the question to us)
344 // we answer yes.
Enrico Granata20edcdb2011-07-19 18:03:25345 if (m_subplan_sp.get() != NULL && m_subplan_sp->PlanExplainsStop())
Jim Ingham40d871f2010-10-26 00:27:45346 return true;
Sean Callanan3e6fedc2010-10-19 22:24:06347
Sean Callananc98aca62010-11-03 19:36:28348 // Check if the breakpoint is one of ours.
349
350 if (BreakpointsExplainStop())
351 return true;
352
Jim Ingham40d871f2010-10-26 00:27:45353 // If we don't want to discard this plan, than any stop we don't understand should be propagated up the stack.
354 if (!OkayToDiscard())
355 return false;
356
357 // Otherwise, check the case where we stopped for an internal breakpoint, in that case, continue on.
358 // If it is not an internal breakpoint, consult OkayToDiscard.
Sean Callanan6db73ca2010-11-03 01:37:52359
Jim Ingham160f78c2011-05-17 01:10:11360 if (m_real_stop_info_sp && m_real_stop_info_sp->GetStopReason() == eStopReasonBreakpoint)
Jim Ingham40d871f2010-10-26 00:27:45361 {
Jim Ingham160f78c2011-05-17 01:10:11362 uint64_t break_site_id = m_real_stop_info_sp->GetValue();
Greg Clayton2a48f522011-05-14 01:50:35363 BreakpointSiteSP bp_site_sp = m_thread.GetProcess().GetBreakpointSiteList().FindByID(break_site_id);
Jim Ingham40d871f2010-10-26 00:27:45364 if (bp_site_sp)
365 {
366 uint32_t num_owners = bp_site_sp->GetNumberOfOwners();
367 bool is_internal = true;
368 for (uint32_t i = 0; i < num_owners; i++)
369 {
Sean Callanan6db73ca2010-11-03 01:37:52370 Breakpoint &bp = bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint();
Sean Callanan6db73ca2010-11-03 01:37:52371
372 if (!bp.IsInternal())
Jim Ingham40d871f2010-10-26 00:27:45373 {
374 is_internal = false;
375 break;
376 }
377 }
378 if (is_internal)
379 return false;
380 }
381
382 return OkayToDiscard();
383 }
384 else
385 {
386 // If the subplan is running, any crashes are attributable to us.
Jim Ingham2c364392011-01-26 19:13:09387 // If we want to discard the plan, then we say we explain the stop
388 // but if we are going to be discarded, let whoever is above us
389 // explain the stop.
390 return ((m_subplan_sp.get() != NULL) && !OkayToDiscard());
Jim Ingham40d871f2010-10-26 00:27:45391 }
Chris Lattner30fdc8d2010-06-08 16:52:24392}
393
394bool
395ThreadPlanCallFunction::ShouldStop (Event *event_ptr)
396{
397 if (PlanExplainsStop())
398 {
Jim Ingham9da36832011-01-22 01:27:23399 ReportRegisterState ("Function completed. Register state was:");
Sean Callanan5300d372010-07-31 01:32:05400
Sean Callanan10af7c42010-11-04 01:51:38401 DoTakedown();
Sean Callanan6db73ca2010-11-03 01:37:52402
Chris Lattner30fdc8d2010-06-08 16:52:24403 return true;
404 }
405 else
406 {
407 return false;
408 }
409}
410
411bool
412ThreadPlanCallFunction::StopOthers ()
413{
414 return m_stop_other_threads;
415}
416
417void
418ThreadPlanCallFunction::SetStopOthers (bool new_value)
419{
420 if (m_subplan_sp)
421 {
422 ThreadPlanRunToAddress *address_plan = static_cast<ThreadPlanRunToAddress *>(m_subplan_sp.get());
423 address_plan->SetStopOthers(new_value);
424 }
425 m_stop_other_threads = new_value;
426}
427
428StateType
Jim Ingham06e827c2010-11-11 19:26:09429ThreadPlanCallFunction::GetPlanRunState ()
Chris Lattner30fdc8d2010-06-08 16:52:24430{
431 return eStateRunning;
432}
433
434void
435ThreadPlanCallFunction::DidPush ()
436{
Sean Callananbe3a1b12010-10-26 00:31:56437//#define SINGLE_STEP_EXPRESSIONS
438
439#ifndef SINGLE_STEP_EXPRESSIONS
Chris Lattner30fdc8d2010-06-08 16:52:24440 m_subplan_sp.reset(new ThreadPlanRunToAddress(m_thread, m_start_addr, m_stop_other_threads));
441
442 m_thread.QueueThreadPlan(m_subplan_sp, false);
Jim Ingham77787032011-01-20 02:03:18443 m_subplan_sp->SetPrivate (true);
Sean Callananbe3a1b12010-10-26 00:31:56444#endif
Chris Lattner30fdc8d2010-06-08 16:52:24445}
446
447bool
448ThreadPlanCallFunction::WillStop ()
449{
450 return true;
451}
452
453bool
454ThreadPlanCallFunction::MischiefManaged ()
455{
456 if (IsPlanComplete())
457 {
Greg Clayton2d4edfb2010-11-06 01:53:30458 LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
Chris Lattner30fdc8d2010-06-08 16:52:24459
460 if (log)
461 log->Printf("Completed call function plan.");
462
463 ThreadPlan::MischiefManaged ();
464 return true;
465 }
466 else
467 {
468 return false;
469 }
470}
Sean Callanan6db73ca2010-11-03 01:37:52471
472void
473ThreadPlanCallFunction::SetBreakpoints ()
474{
Jim Inghamce553d82011-11-01 02:46:54475 m_cxx_language_runtime = m_thread.GetProcess().GetLanguageRuntime(eLanguageTypeC_plus_plus);
476 m_objc_language_runtime = m_thread.GetProcess().GetLanguageRuntime(eLanguageTypeObjC);
Sean Callanan6db73ca2010-11-03 01:37:52477
Sean Callananf2115102010-11-03 22:19:38478 if (m_cxx_language_runtime)
479 m_cxx_language_runtime->SetExceptionBreakpoints();
480 if (m_objc_language_runtime)
481 m_objc_language_runtime->SetExceptionBreakpoints();
Sean Callanan6db73ca2010-11-03 01:37:52482}
483
484void
485ThreadPlanCallFunction::ClearBreakpoints ()
486{
Sean Callananf2115102010-11-03 22:19:38487 if (m_cxx_language_runtime)
488 m_cxx_language_runtime->ClearExceptionBreakpoints();
489 if (m_objc_language_runtime)
490 m_objc_language_runtime->ClearExceptionBreakpoints();
Sean Callanan6db73ca2010-11-03 01:37:52491}
Sean Callananc98aca62010-11-03 19:36:28492
493bool
494ThreadPlanCallFunction::BreakpointsExplainStop()
495{
Greg Clayton2a48f522011-05-14 01:50:35496 StopInfoSP stop_info_sp = GetPrivateStopReason();
Sean Callananc98aca62010-11-03 19:36:28497
Sean Callananf2115102010-11-03 22:19:38498 if (m_cxx_language_runtime &&
499 m_cxx_language_runtime->ExceptionBreakpointsExplainStop(stop_info_sp))
500 return true;
Sean Callananc98aca62010-11-03 19:36:28501
Sean Callananf2115102010-11-03 22:19:38502 if (m_objc_language_runtime &&
503 m_objc_language_runtime->ExceptionBreakpointsExplainStop(stop_info_sp))
504 return true;
Sean Callananc98aca62010-11-03 19:36:28505
506 return false;
507}