[Lldb-commits] [lldb] [lldb] Refactor InstrumentationRuntimeAsan and add a new plugin (PR #69388)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 18 08:56:48 PDT 2023


================
@@ -280,29 +81,13 @@ void InstrumentationRuntimeASan::Activate() {
   if (!process_sp)
     return;
 
-  ConstString symbol_name("_ZN6__asanL7AsanDieEv");
-  const Symbol *symbol = GetRuntimeModuleSP()->FindFirstSymbolWithNameAndType(
-      symbol_name, eSymbolTypeCode);
+  Breakpoint *breakpoint = ReportRetriever::SetupBreakpoint(GetRuntimeModuleSP(), process_sp, ConstString("_ZN6__asanL7AsanDieEv"));
 
-  if (symbol == nullptr)
+  if (!breakpoint)
     return;
 
-  if (!symbol->ValueIsAddress() || !symbol->GetAddressRef().IsValid())
-    return;
-
-  Target &target = process_sp->GetTarget();
-  addr_t symbol_address = symbol->GetAddressRef().GetOpcodeLoadAddress(&target);
-
-  if (symbol_address == LLDB_INVALID_ADDRESS)
-    return;
+  bool sync = false;
----------------
bulbazord wrote:

You dropped the `const` qualifier here, does something change `sync` now? If not, please re-add the `const` qualifier.

https://github.com/llvm/llvm-project/pull/69388


More information about the lldb-commits mailing list