================
@@ -340,14 +340,12 @@ BreakpointResolverName::SearchCallback(SearchFilter 
&filter,
           break_addr.Slide(prologue_byte_size);
       }
     } else if (sc.symbol) {
-      if (sc.symbol->GetType() == eSymbolTypeReExported) {
-        const Symbol *actual_symbol =
-            sc.symbol->ResolveReExportedSymbol(breakpoint.GetTarget());
-        if (actual_symbol) {
-          is_reexported = true;
-          break_addr = actual_symbol->GetAddress();
-        }
-      } else {
+      const Symbol *actual_symbol = sc.symbol->ResolveReExportedSymbol(
+          breakpoint.GetTarget(), sc.module_sp);
+      if (actual_symbol) {
+        is_reexported = true;
+        break_addr = actual_symbol->GetAddress();
+      } else if (sc.symbol->GetType() != eSymbolTypeReExported) {
----------------
aokblast wrote:

This model doesn't perfectly match the ELF specification. In Mach-O, each 
ReExportedSymbol has a per-symbol tag, so every symbol knows which filtee it 
comes from. In ELF, however, it behaves more like a list that defines libraries 
whose symbols can override the current symbol. If a symbol is found in one of 
the filtees, rtld uses it.

As a result, there is no way to correctly determine whether a symbol is 
eSymbolTypeReExported without consulting the resolver each time.

https://github.com/llvm/llvm-project/pull/208905
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to