JDevlieghere wrote:

@slackito @dwblaikie  I'm really puzzled, I've audited every change in this 
patch and I can't figure out where things could be going wrong.

My first guess was that we're not updating the FileSpec. There's only 3 places 
that explicitly modify the file in the line entry: 2 in 
`SBLineEntry::SetFileSpec` and of course `LineEntry::ApplyFileMapping`. All of 
them seem to be doing the right thing. I thought maybe somewhere we were taking 
a reference and modifying it later, but the new `GetFile()` getter returns a 
const ref so the compiler would've caught that. The same thing goes for all the 
call sites using the `SupportFile` directly, you can only access the `FileSpec` 
as a `const ref`.

My second guess was that the code is behaving differently because we're 
comparing `SupportFile`s instead of their FileSpec. The equals operator for 
`SupportFile` also compares the checksum so that could cause two `SupportFile`s 
to be different while their FileSpecs might not. But the only place we do a 
compare, we explicitly compare the `FileSpec`s,  no the `SupportFile`s or the 
shared pointer.

Unless you can think of something else I'm out of ideas. I'll split up the 
patch into the part that introduces the getter and the part that swaps out the 
FileSpec for the support file. If you could apply those and tell me which one 
causes the test to fail that'd be helpful. 

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

Reply via email to