[Lldb-commits] [PATCH] D55142: Minidump debugging using the native PDB reader

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 13 12:22:30 PST 2018


I think we can fix that by changing the line to:

```
if (!object_file || object_file->GetFileSpec() == symbol_fspec) {
}
```

On Thu, Dec 13, 2018 at 12:04 PM Pavel Labath <pavel at labath.sk> wrote:

> On 13/12/2018 19:32, Leonard Mosescu wrote:
> > What's the consensus?
> >
> > Personally I think that, even considering the potential issue that Paval
> > pointed out, the "target symbols add ..." is the most conservative
> > approach in terms of introducing new behavior. I'm fine with the current
> > directory lookup as well (the original change) since it's consistent
> > with DWARF lookup.
>
>
> Yes, but it also regresses existing functionality. Now if I do something
> completely nonsensical like:
> (lldb) target create "/bin/ls"
> Current executable set to '/bin/ls' (x86_64).
> (lldb) target symbols add  -s /bin/ls /tmp/a.txt
> error: symbol file '/tmp/a.txt' does not match any existing module
>
> lldb will print a nice error for me. If I remove the safeguards like you
> did in your patch, it turns into this:
> (lldb) target create "/bin/ls"
> Current executable set to '/bin/ls' (x86_64).
> (lldb) target symbols add  -s /bin/ls /tmp/a.txt
> symbol file '/tmp/a.txt' has been added to '/bin/ls'
>
> which is a blatant lie, because /bin/ls will continue to use symbols
> from the object file.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181213/318691ff/attachment.html>


More information about the lldb-commits mailing list