summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 6da4ed292f1..8fb149fab06 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -144,6 +144,9 @@ static PropertyDefinition g_properties[] = {
{"optimization-warnings", OptionValue::eTypeBoolean, false, true, nullptr,
nullptr, "If true, warn when stopped in code that is optimized where "
"stepping and variable availability may not behave as expected."},
+ {"stop-on-exec", OptionValue::eTypeBoolean, true, true,
+ nullptr, nullptr,
+ "If true, stop when a shared library is loaded or unloaded."},
{nullptr, OptionValue::eTypeInvalid, false, 0, nullptr, nullptr, nullptr}};
enum {
@@ -155,7 +158,8 @@ enum {
ePropertyStopOnSharedLibraryEvents,
ePropertyDetachKeepsStopped,
ePropertyMemCacheLineSize,
- ePropertyWarningOptimization
+ ePropertyWarningOptimization,
+ ePropertyStopOnExec
};
ProcessProperties::ProcessProperties(lldb_private::Process *process)
@@ -272,6 +276,12 @@ bool ProcessProperties::GetWarningsOptimization() const {
nullptr, idx, g_properties[idx].default_uint_value != 0);
}
+bool ProcessProperties::GetStopOnExec() const {
+ const uint32_t idx = ePropertyStopOnExec;
+ return m_collection_sp->GetPropertyAtIndexAsBoolean(
+ nullptr, idx, g_properties[idx].default_uint_value != 0);
+}
+
void ProcessInstanceInfo::Dump(Stream &s, Platform *platform) const {
const char *cstr;
if (m_pid != LLDB_INVALID_PROCESS_ID)
OpenPOWER on IntegriCloud