From fe07d32c75db7a8afa7f4e317234dd0e0849a2f1 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Thu, 18 Jul 2013 21:32:31 -0400 Subject: [PATCH] Debugger: Reorder unit finishing. Type units need to be finished before compilation units to ensure that e.g. modified types have their base types already set by the time we get to compilation unit attributes. --- src/apps/debugger/dwarf/DwarfFile.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index 517c4416a9..fd2c8531fa 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -575,16 +575,16 @@ DwarfFile::FinishLoading() return fFinishError; status_t error; - for (int32 i = 0; CompilationUnit* unit = fCompilationUnits.ItemAt(i); - i++) { - error = _FinishUnit(unit); + for (TypeUnitTable::Iterator it = fTypeUnits.GetIterator(); + TypeUnitTableEntry* entry = it.Next();) { + error = _FinishUnit(entry->unit); if (error != B_OK) return fFinishError = error; } - for (TypeUnitTable::Iterator it = fTypeUnits.GetIterator(); - TypeUnitTableEntry* entry = it.Next();) { - error = _FinishUnit(entry->unit); + for (int32 i = 0; CompilationUnit* unit = fCompilationUnits.ItemAt(i); + i++) { + error = _FinishUnit(unit); if (error != B_OK) return fFinishError = error; }