[Lldb-commits] [PATCH] D42955: Make Module::GetSectionList output consistent

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 6 05:52:35 PST 2018


labath added a comment.

In https://reviews.llvm.org/D42955#1027142, @clayborg wrote:

> Again, we need any objects coming out of the ObjectFile to have the correct sections. Not sure how we would accomplish that with a solution where the dSYM file uses it own useless sections.


I think we have different definitions of "correct" sections. I agree that the nulled out sections in the dSYM file are (nearly) useless, but I think they are also correct, because that's exactly what's in that object file (and I think a single ObjectFile instance should represent information from a single object file -- nothing more, nothing less). If we need  (and we do need) to have a view of combined information from multiple object files, then there should be a separate entity that does that (I think that's what the unified section list is supposed to be). Then, anything that needs to operate on the unified view should be taught to operate on the unified view and not on the individual object files.

Now, I have no idea how hard is it to achieve this, but the fact that this is already how things work for elf gives me hope that it will not be that hard.

Btw, do you know how much I can rely on the test suite to catch any issues here? I've tried simply commenting out the line where we add the section from the unified list into the dsym file, and all tests still passed. Is there any particular scenario I should look at in more detail?


https://reviews.llvm.org/D42955





More information about the lldb-commits mailing list