llvm.org GIT mirror llvm / 178dbd4
llvm-objdump: Fix dumping of multiple symbols with the same address. This happens in COFF because there is a symbol for the beginning of each section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141885 91177308-0d34-0410-b5e6-96231b3b80d8 Michael J. Spencer 9 years ago
1 changed file(s) with 12 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
233233 // Disassemble symbol by symbol.
234234 for (unsigned si = 0, se = Symbols.size(); si != se; ++si) {
235235 uint64_t Start = Symbols[si].first;
236 uint64_t End = si == se-1 ? SectSize : Symbols[si + 1].first - 1;
236 uint64_t End;
237 // The end is either the size of the section or the beginning of the next
238 // symbol.
239 if (si == se - 1)
240 End = SectSize;
241 // Make sure this symbol takes up space.
242 else if (Symbols[si + 1].first != Start)
243 End = Symbols[si + 1].first - 1;
244 else
245 // This symbol has the same address as the next symbol. Skip it.
246 continue;
247
237248 outs() << '\n' << Symbols[si].second << ":\n";
238249
239250 #ifndef NDEBUG