diff options
author | Greg Clayton <gclayton@apple.com> | 2011-09-22 04:58:26 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-09-22 04:58:26 +0000 |
commit | 567e7f3ba16eb48cb9fd6a2f26f2f7269eb6983c (patch) | |
tree | 598ef5e434a526178dc9add911852d880300c63d /source/Breakpoint | |
parent | 16ccbfd37a50cb596baa7d11fa69261634a2f8be (diff) | |
download | lldb-567e7f3ba16eb48cb9fd6a2f26f2f7269eb6983c.tar.gz |
Converted the lldb_private::Process over to use the intrusive
shared pointers.
Changed the ExecutionContext over to use shared pointers for
the target, process, thread and frame since these objects can
easily go away at any time and any object that was holding onto
an ExecutionContext was running the risk of using a bad object.
Now that the shared pointers for target, process, thread and
frame are just a single pointer (they all use the instrusive
shared pointers) the execution context is much safer and still
the same size.
Made the shared pointers in the the ExecutionContext class protected
and made accessors for all of the various ways to get at the pointers,
references, and shared pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Breakpoint')
-rw-r--r-- | source/Breakpoint/BreakpointOptions.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/Breakpoint/BreakpointOptions.cpp b/source/Breakpoint/BreakpointOptions.cpp index df41339ab..16e710121 100644 --- a/source/Breakpoint/BreakpointOptions.cpp +++ b/source/Breakpoint/BreakpointOptions.cpp @@ -180,7 +180,8 @@ BreakpointOptions::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx, return NULL; // FIXME: I shouldn't have to do this, the process should handle it for me: - if (!exe_ctx.process->GetDynamicCheckers()) + Process *process = exe_ctx.GetProcessPtr(); + if (!process->GetDynamicCheckers()) { DynamicCheckerFunctions *dynamic_checkers = new DynamicCheckerFunctions(); @@ -192,11 +193,11 @@ BreakpointOptions::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx, return NULL; } - exe_ctx.process->SetDynamicCheckers(dynamic_checkers); + process->SetDynamicCheckers(dynamic_checkers); } // Get the boolean type from the process's scratch AST context - ClangASTContext *ast_context = exe_ctx.target->GetScratchClangASTContext(); + ClangASTContext *ast_context = exe_ctx.GetTargetRef().GetScratchClangASTContext(); TypeFromUser bool_type(ast_context->GetBuiltInType_bool(), ast_context->getASTContext()); const bool keep_in_memory = false; @@ -209,7 +210,7 @@ BreakpointOptions::GetThreadPlanToTestCondition (ExecutionContext &exe_ctx, // FIXME: When we can execute static expressions without running the target, we should check that here, // and return something to indicate we should stop or just continue. - ThreadPlan *new_plan = new ThreadPlanTestCondition (*exe_ctx.thread, + ThreadPlan *new_plan = new ThreadPlanTestCondition (exe_ctx.GetThreadRef(), exe_ctx, m_condition_ap.get(), break_loc_sp, |