[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:31:40 PST 2024
https://github.com/usama54321 created https://github.com/llvm/llvm-project/pull/84583
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
>From aa8f732f4d6d2cdae5b32462b7be8f3afda512fc Mon Sep 17 00:00:00 2001
From: usama <u_hameed at apple.com>
Date: Fri, 8 Mar 2024 15:30:46 -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 | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp b/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp
index d84cd36d7ce17b..e095d3e6b2e339 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/ASanLibsanitizers/InstrumentationRuntimeASanLibsanitizers.cpp
@@ -90,9 +90,17 @@ 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