<div dir="ltr">I think we can fix that by changing the line to:<div><br></div><div>```</div><div>if (!object_file || object_file->GetFileSpec() == symbol_fspec) {</div><div>}</div><div>```</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 13, 2018 at 12:04 PM Pavel Labath <<a href="mailto:pavel@labath.sk">pavel@labath.sk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 13/12/2018 19:32, Leonard Mosescu wrote:<br>
> What's the consensus?<br>
> <br>
> Personally I think that, even considering the potential issue that Paval <br>
> pointed out, the "target symbols add ..." is the most conservative <br>
> approach in terms of introducing new behavior. I'm fine with the current <br>
> directory lookup as well (the original change) since it's consistent <br>
> with DWARF lookup.<br>
<br>
<br>
Yes, but it also regresses existing functionality. Now if I do something <br>
completely nonsensical like:<br>
(lldb) target create "/bin/ls"<br>
Current executable set to '/bin/ls' (x86_64).<br>
(lldb) target symbols add  -s /bin/ls /tmp/a.txt<br>
error: symbol file '/tmp/a.txt' does not match any existing module<br>
<br>
lldb will print a nice error for me. If I remove the safeguards like you <br>
did in your patch, it turns into this:<br>
(lldb) target create "/bin/ls"<br>
Current executable set to '/bin/ls' (x86_64).<br>
(lldb) target symbols add  -s /bin/ls /tmp/a.txt<br>
symbol file '/tmp/a.txt' has been added to '/bin/ls'<br>
<br>
which is a blatant lie, because /bin/ls will continue to use symbols <br>
from the object file.<br>
</blockquote></div>