1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

LibDebug: Move Dwarf::LineProgram into Dwarf::CompilationUnit

Previously, the LineProgram objects were short-lived, and only created
inside DebugInfo::prepare_lines() to create a vector of sorted LineInfo
data.

However, Dwarf::LineProgram also contains other useful data, such as
index-to-string mapping of source directories and filenames.

This commit makes each Dwarf::CompilationUnit own its
Dwarf::LineProgram.
DebugInfo::prepare_lines() then iterates over the compilation units to
prepare its sorted vector of lines.
This commit is contained in:
Itamar 2021-06-18 15:25:27 +03:00 committed by Andreas Kling
parent e9e4358a93
commit 0d89f70b66
6 changed files with 30 additions and 17 deletions

View file

@ -102,6 +102,9 @@ inline InputStream& operator>>(InputStream& stream, LineProgramUnitHeader32& hea
}
class LineProgram {
AK_MAKE_NONCOPYABLE(LineProgram);
AK_MAKE_NONMOVABLE(LineProgram);
public:
explicit LineProgram(DwarfInfo& dwarf_info, InputMemoryStream& stream);