mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibDebug: Don't create compilation units for embedded resources
Our implementation (naively) assumes that there is a one-to-one correspondence between compilation units and line programs, and that their orders are identical. This is not the case for embedded resources, as Clang only creates line programs for it, but not compilation units. This mismatch caused an assertion failure, which made generating backtraces for GUI applications impossible. This commit introduces a hack that skips creating CompilationUnit objects for LinePrograms that come from embedded resources.
This commit is contained in:
parent
622d408d82
commit
a60d960420
2 changed files with 18 additions and 7 deletions
|
@ -122,6 +122,12 @@ public:
|
|||
};
|
||||
DirectoryAndFile get_directory_and_file(size_t file_index) const;
|
||||
|
||||
struct FileEntry {
|
||||
FlyString name;
|
||||
size_t directory_index { 0 };
|
||||
};
|
||||
Vector<FileEntry> const& source_files() const { return m_source_files; }
|
||||
|
||||
private:
|
||||
void parse_unit_header();
|
||||
void parse_source_directories();
|
||||
|
@ -159,11 +165,6 @@ private:
|
|||
SetDiscriminator,
|
||||
};
|
||||
|
||||
struct FileEntry {
|
||||
FlyString name;
|
||||
size_t directory_index { 0 };
|
||||
};
|
||||
|
||||
static constexpr u16 MIN_DWARF_VERSION = 3;
|
||||
static constexpr u16 MAX_DWARF_VERSION = 5;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue