[PATCH] D46502: [ELF] - Fix for "LLD can create incorrect debug PC ranges for functions in Comdat groups."

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 09:51:21 PDT 2018


peter.smith added a comment.

In https://reviews.llvm.org/D46502#1094602, @ruiu wrote:

> I wonder if we can simply discard debug records that refer discarded sections. If comdat section is discarded because there's another copy of it, there should be debug records for that section, so we have two copies of debug records, thus we can discard debug records for a discarded comdat section, no?


My understanding is that it depends on what action the debugger is trying to do. If it is single-stepping through a function from the selected comdat group there will be at least one set of .debug sections that have the correct PC range so mappings from Address to Source will work. The difficulty is with the Source to Address mapping for the objects where the group was discarded. For example show me all the symbols defined in this source file will not find the comdat group as the PC range won't be correct.


https://reviews.llvm.org/D46502





More information about the llvm-commits mailing list