aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Target/Target.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Target/Target.h')
-rw-r--r--include/lldb/Target/Target.h92
1 files changed, 65 insertions, 27 deletions
diff --git a/include/lldb/Target/Target.h b/include/lldb/Target/Target.h
index 1c90ea6f15eb..d874891a6aff 100644
--- a/include/lldb/Target/Target.h
+++ b/include/lldb/Target/Target.h
@@ -189,8 +189,10 @@ public:
m_unwind_on_error(true),
m_ignore_breakpoints (false),
m_keep_in_memory(false),
- m_run_others(true),
+ m_try_others(true),
+ m_stop_others(true),
m_debug(false),
+ m_trap_exceptions(true),
m_use_dynamic(lldb::eNoDynamicValues),
m_timeout_usec(default_timeout)
{}
@@ -201,11 +203,10 @@ public:
return m_execution_policy;
}
- EvaluateExpressionOptions&
+ void
SetExecutionPolicy (ExecutionPolicy policy = eExecutionPolicyAlways)
{
m_execution_policy = policy;
- return *this;
}
lldb::LanguageType
@@ -214,11 +215,10 @@ public:
return m_language;
}
- EvaluateExpressionOptions&
+ void
SetLanguage(lldb::LanguageType language)
{
m_language = language;
- return *this;
}
bool
@@ -227,11 +227,10 @@ public:
return m_coerce_to_id;
}
- EvaluateExpressionOptions&
+ void
SetCoerceToId (bool coerce = true)
{
m_coerce_to_id = coerce;
- return *this;
}
bool
@@ -240,11 +239,10 @@ public:
return m_unwind_on_error;
}
- EvaluateExpressionOptions&
+ void
SetUnwindOnError (bool unwind = false)
{
m_unwind_on_error = unwind;
- return *this;
}
bool
@@ -253,11 +251,10 @@ public:
return m_ignore_breakpoints;
}
- EvaluateExpressionOptions&
+ void
SetIgnoreBreakpoints (bool ignore = false)
{
m_ignore_breakpoints = ignore;
- return *this;
}
bool
@@ -266,11 +263,10 @@ public:
return m_keep_in_memory;
}
- EvaluateExpressionOptions&
+ void
SetKeepInMemory (bool keep = true)
{
m_keep_in_memory = keep;
- return *this;
}
lldb::DynamicValueType
@@ -279,11 +275,10 @@ public:
return m_use_dynamic;
}
- EvaluateExpressionOptions&
+ void
SetUseDynamic (lldb::DynamicValueType dynamic = lldb::eDynamicCanRunTarget)
{
m_use_dynamic = dynamic;
- return *this;
}
uint32_t
@@ -292,24 +287,34 @@ public:
return m_timeout_usec;
}
- EvaluateExpressionOptions&
+ void
SetTimeoutUsec (uint32_t timeout = 0)
{
m_timeout_usec = timeout;
- return *this;
}
bool
- GetRunOthers () const
+ GetTryAllThreads () const
{
- return m_run_others;
+ return m_try_others;
}
- EvaluateExpressionOptions&
- SetRunOthers (bool run_others = true)
+ void
+ SetTryAllThreads (bool try_others = true)
+ {
+ m_try_others = try_others;
+ }
+
+ bool
+ GetStopOthers () const
+ {
+ return m_stop_others;
+ }
+
+ void
+ SetStopOthers (bool stop_others = true)
{
- m_run_others = run_others;
- return *this;
+ m_stop_others = stop_others;
}
bool
@@ -318,11 +323,22 @@ public:
return m_debug;
}
- EvaluateExpressionOptions&
+ void
SetDebug(bool b)
{
m_debug = b;
- return *this;
+ }
+
+ bool
+ GetTrapExceptions() const
+ {
+ return m_trap_exceptions;
+ }
+
+ void
+ SetTrapExceptions (bool b)
+ {
+ m_trap_exceptions = b;
}
private:
@@ -332,8 +348,10 @@ private:
bool m_unwind_on_error;
bool m_ignore_breakpoints;
bool m_keep_in_memory;
- bool m_run_others;
+ bool m_try_others;
+ bool m_stop_others;
bool m_debug;
+ bool m_trap_exceptions;
lldb::DynamicValueType m_use_dynamic;
uint32_t m_timeout_usec;
};
@@ -741,9 +759,23 @@ public:
SymbolsDidLoad (ModuleList &module_list);
void
- ClearModules();
+ ClearModules(bool delete_locations);
//------------------------------------------------------------------
+ /// Called as the last function in Process::DidExec().
+ ///
+ /// Process::DidExec() will clear a lot of state in the process,
+ /// then try to reload a dynamic loader plugin to discover what
+ /// binaries are currently available and then this function should
+ /// be called to allow the target to do any cleanup after everything
+ /// has been figured out. It can remove breakpoints that no longer
+ /// make sense as the exec might have changed the target
+ /// architecture, and unloaded some modules that might get deleted.
+ //------------------------------------------------------------------
+ void
+ DidExec ();
+
+ //------------------------------------------------------------------
/// Gets the module for the main executable.
///
/// Each process has a notion of a main executable that is the file
@@ -1009,6 +1041,12 @@ public:
ClangASTImporter *
GetClangASTImporter();
+ //----------------------------------------------------------------------
+ // Install any files through the platform that need be to installed
+ // prior to launching or attaching.
+ //----------------------------------------------------------------------
+ Error
+ Install(ProcessLaunchInfo *launch_info);
// Since expressions results can persist beyond the lifetime of a process,
// and the const expression results are available after a process is gone,