summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionParser.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-02-18 05:35:26 +0000
committerGreg Clayton <gclayton@apple.com>2012-02-18 05:35:26 +0000
commitd9e416c0ea61c13440e99fdab86e44c6e71a8eff (patch)
tree7cdcdc10fb941cb0658a5a651a5f6ceb2cd40e63 /lldb/source/Expression/ClangExpressionParser.cpp
parent0dea49e324ecb836ddad859495bde8ffc48a8ae0 (diff)
downloadbcm5719-llvm-d9e416c0ea61c13440e99fdab86e44c6e71a8eff.tar.gz
bcm5719-llvm-d9e416c0ea61c13440e99fdab86e44c6e71a8eff.zip
The second part in thread hardening the internals of LLDB where we make
the lldb_private::StackFrame objects hold onto a weak pointer to the thread object. The lldb_private::StackFrame objects the the most volatile objects we have as when we are doing single stepping, frames can often get lost or thrown away, only to be re-created as another object that still refers to the same frame. We have another bug tracking that. But we need to be able to have frames no longer be able to get the thread when they are not part of a thread anymore, and this is the first step (this fix makes that possible but doesn't implement it yet). Also changed lldb_private::ExecutionContextScope to return shared pointers to all objects in the execution context to further thread harden the internals. llvm-svn: 150871
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 958d18b5a40..3a8c697d47c 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -224,15 +224,15 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
break;
}
- Process *process = NULL;
+ lldb::ProcessSP process_sp;
if (exe_scope)
- process = exe_scope->CalculateProcess();
+ process_sp = exe_scope->CalculateProcess();
- if (process && m_compiler->getLangOpts().ObjC1)
+ if (process_sp && m_compiler->getLangOpts().ObjC1)
{
- if (process->GetObjCLanguageRuntime())
+ if (process_sp->GetObjCLanguageRuntime())
{
- if (process->GetObjCLanguageRuntime()->GetRuntimeVersion() == eAppleObjC_V2)
+ if (process_sp->GetObjCLanguageRuntime()->GetRuntimeVersion() == eAppleObjC_V2)
{
m_compiler->getLangOpts().ObjCNonFragileABI = true; // NOT i386
m_compiler->getLangOpts().ObjCNonFragileABI2 = true; // NOT i386
@@ -256,18 +256,18 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
m_compiler->getDiagnosticOpts().Warnings.push_back("no-unused-value");
// Set the target triple.
- Target *target = NULL;
+ lldb::TargetSP target_sp;
if (exe_scope)
- target = exe_scope->CalculateTarget();
+ target_sp = exe_scope->CalculateTarget();
// TODO: figure out what to really do when we don't have a valid target.
// Sometimes this will be ok to just use the host target triple (when we
// evaluate say "2+3", but other expressions like breakpoint conditions
// and other things that _are_ target specific really shouldn't just be
// using the host triple. This needs to be fixed in a better way.
- if (target && target->GetArchitecture().IsValid())
+ if (target_sp && target_sp->GetArchitecture().IsValid())
{
- std::string triple = target->GetArchitecture().GetTriple().str();
+ std::string triple = target_sp->GetArchitecture().GetTriple().str();
int dash_count = 0;
for (size_t i = 0; i < triple.size(); ++i)
OpenPOWER on IntegriCloud