GeorgeHuyubo wrote:

> I don't yet understand how changing the priority of the plugins prevents the 
> "double download" you mention. Your problem statements talks about the 
> callback and the debuginfod plugin, but your solution talks about the 
> debuginfod plugin and the default symbol locator. What confuses me is that 
> `locate_module` mechanism isn't using the symbol locator plugin mechanism. 
> How does prioritizing one plugin over another prevent us from invoking the 
> callback? Is this somehow called from the default symbol locator (I tried to 
> look at the code but couldn't immediately find something like that).

So I believe the locate_module callback is designed for user to do something 
like:
```
symbol_file_spec.SetDirectory(symbol_dir)
symbol_file_spec.SetFilename(symbol_name + suffix)
```
...after the callback function finish downloading the symbol. This means that 
we still rely on the Default symbol locator(which should simply look for symbol 
locally by the dir&filename) to actually locate the symbol file. But if 
debuginfod is also enabled and called first, debuginfod plugin will ignore the 
local symbol file(even if it exist), but query the debuginfod server by the 
gnu_build_id, and do a double downloading.

https://github.com/llvm/llvm-project/pull/144406
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to