[PATCH] D26283: [ELF] - Partial support of --gdb-index command line option (Part 3).

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 01:42:08 PST 2016


grimar added a comment.

In https://reviews.llvm.org/D26283#615115, @clayborg wrote:

> Seems like the GdbIndex isn't specific to ELF. I know the file started off here and that some of the template classes you use are using ELF defines, but they don't really need to be in the ELF plug-in.
>
> Would we want to move this functionality to the lib/DebugInfo/Dwarf/DWARFGdbIndex.cpp file so that other file formats like mach-o and COFF could create the gdb index section and be able to emit it? This code accesses existing DWARF sections and then creates the .gdb-index section contents.


If so I am not sure what is better ?

1. Do that before landing this+https://reviews.llvm.org/D25821.
2. Continue with landing above for ELF, complete and test functionality and then move it to lib/Debuginfo/Dwarf/* ?.

I would also create separate file for this like lib/DebugInfo/Dwarf/DWARFGdbIndexBuilder.cpp as DWARFGdbIndex.cpp is a parser and probably
better not to mix them.


https://reviews.llvm.org/D26283





More information about the llvm-commits mailing list