[Lldb-commits] [lldb] [LLDB] ASanLibsanitizers Use `sanitizers_address_on_report` breakpoint (PR #84583)
Usama Hameed via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 8 15:56:27 PST 2024
https://github.com/usama54321 updated https://github.com/llvm/llvm-project/pull/84583
>From fbe08446991972f1fde90206d0281c506d668d6b Mon Sep 17 00:00:00 2001
From: usama <u_hameed at apple.com>
Date: Fri, 8 Mar 2024 15:55:25 -0800
Subject: [PATCH] [LLDB] ASanLibsanitizers Use `sanitizers_address_on_report`
breakpoint symbol
This patch puts the default breakpoint on the
sanitizers_address_on_report symbol, and uses the old symbol as a backup
if the default case is not found
rdar://123911522
---
.../InstrumentationRuntimeASanLibsanitizers.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp b/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp
index d84cd36d7ce17b..dd936fc07fc3c4 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp
@@ -90,9 +90,16 @@ void InstrumentationRuntimeASanLibsanitizers::Activate() {
if (!process_sp)
return;
+ lldb::ModuleSP module_sp = GetRuntimeModuleSP();
+
Breakpoint *breakpoint = ReportRetriever::SetupBreakpoint(
- GetRuntimeModuleSP(), process_sp,
- ConstString("_Z22raise_sanitizers_error23sanitizer_error_context"));
+ module_sp, process_sp, ConstString("_sanitizers_address_on_report"));
+
+ if (!breakpoint) {
+ breakpoint = ReportRetriever::SetupBreakpoint(
+ module_sp, process_sp,
+ ConstString("_Z22raise_sanitizers_error23sanitizer_error_context"));
+ }
if (!breakpoint)
return;
More information about the lldb-commits
mailing list