diff options
| author | Kuba Mracek <mracek@apple.com> | 2017-07-13 04:35:27 +0000 |
|---|---|---|
| committer | Kuba Mracek <mracek@apple.com> | 2017-07-13 04:35:27 +0000 |
| commit | b244c2bafea6c31bdbab4446f941b2c3f61778d7 (patch) | |
| tree | 341132762f2c97e4d0d7570781e9d50ee26304dc /lldb/source/Plugins/InstrumentationRuntime | |
| parent | 7876f2d34c3093c89eebe450a5958c0ddec7151b (diff) | |
| download | bcm5719-llvm-b244c2bafea6c31bdbab4446f941b2c3f61778d7.tar.gz bcm5719-llvm-b244c2bafea6c31bdbab4446f941b2c3f61778d7.zip | |
Upstreaming a patch from Github: When evaluation user expressions, ignore InstrumentationRuntime breakpoints. (#235)
llvm-svn: 307881
Diffstat (limited to 'lldb/source/Plugins/InstrumentationRuntime')
4 files changed, 16 insertions, 2 deletions
diff --git a/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp index af242d786a5..9a6e39be0bf 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp @@ -247,12 +247,16 @@ bool AddressSanitizerRuntime::NotifyBreakpointHit( AddressSanitizerRuntime *const instance = static_cast<AddressSanitizerRuntime *>(baton); + ProcessSP process_sp = instance->GetProcessSP(); + + if (process_sp->GetModIDRef().IsLastResumeForUserExpression()) + return false; + StructuredData::ObjectSP report = instance->RetrieveReportData(); std::string description; if (report) { description = instance->FormatDescription(report); } - ProcessSP process_sp = instance->GetProcessSP(); // Make sure this is the right process if (process_sp && process_sp == context->exe_ctx_ref.GetProcessSP()) { ThreadSP thread_sp = context->exe_ctx_ref.GetThreadSP(); diff --git a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp index 2ed70797ca1..eb238419ab1 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp @@ -163,6 +163,9 @@ bool MainThreadCheckerRuntime::NotifyBreakpointHit( process_sp != context->exe_ctx_ref.GetProcessSP()) return false; + if (process_sp->GetModIDRef().IsLastResumeForUserExpression()) + return false; + StructuredData::ObjectSP report = instance->RetrieveReportData(context->exe_ctx_ref); diff --git a/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp index f60df046334..cf9ba60c7b6 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp @@ -803,6 +803,11 @@ bool ThreadSanitizerRuntime::NotifyBreakpointHit( ThreadSanitizerRuntime *const instance = static_cast<ThreadSanitizerRuntime *>(baton); + ProcessSP process_sp = instance->GetProcessSP(); + + if (process_sp->GetModIDRef().IsLastResumeForUserExpression()) + return false; + StructuredData::ObjectSP report = instance->RetrieveReportData(context->exe_ctx_ref); std::string stop_reason_description; @@ -851,7 +856,6 @@ bool ThreadSanitizerRuntime::NotifyBreakpointHit( all_addresses_are_same); } - ProcessSP process_sp = instance->GetProcessSP(); // Make sure this is the right process if (process_sp && process_sp == context->exe_ctx_ref.GetProcessSP()) { ThreadSP thread_sp = context->exe_ctx_ref.GetThreadSP(); diff --git a/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp index 023af84179a..28c28e41ef4 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp @@ -217,6 +217,9 @@ bool UndefinedBehaviorSanitizerRuntime::NotifyBreakpointHit( process_sp != context->exe_ctx_ref.GetProcessSP()) return false; + if (process_sp->GetModIDRef().IsLastResumeForUserExpression()) + return false; + StructuredData::ObjectSP report = instance->RetrieveReportData(context->exe_ctx_ref); |

