diff options
| author | Jim Ingham <jingham@apple.com> | 2017-12-05 02:50:45 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2017-12-05 02:50:45 +0000 |
| commit | ba205c1b76ff72f383dc82ffe9f6f1fc2d6b362a (patch) | |
| tree | b86a0011f3ddd3224b40e84edaefa22de28985b2 /lldb/source/Target/Process.cpp | |
| parent | 45816d6b917c27a55230ba096067c64797ccbbe9 (diff) | |
| download | bcm5719-llvm-ba205c1b76ff72f383dc82ffe9f6f1fc2d6b362a.tar.gz bcm5719-llvm-ba205c1b76ff72f383dc82ffe9f6f1fc2d6b362a.zip | |
Add target.process.stop-on-exec setting, and obey it.
Also add a test. There should also be control for this
in ProcessLaunchInfo and a "target launch" flag, but at least
this will allow you to control it somehow.
<rdar://problem/35842137>
llvm-svn: 319731
Diffstat (limited to 'lldb/source/Target/Process.cpp')
| -rw-r--r-- | lldb/source/Target/Process.cpp | 12 |
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) |

