diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index d4cb185c49..49b5a9c6da 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -351,14 +351,13 @@ DwarfFile::Load(const char* fileName) fDebugLineSection = fElfFile->GetSection(".debug_line"); fDebugFrameSection = fElfFile->GetSection(".debug_frame"); ElfSection* ehFrameSection = fElfFile->GetSection(".eh_frame"); - if (fDebugFrameSection != NULL) { - if (ehFrameSection != NULL && ehFrameSection->Size() - > fDebugFrameSection->Size()) { + if (fDebugFrameSection != NULL && ehFrameSection != NULL) { + if (ehFrameSection->Size() > fDebugFrameSection->Size()) { fElfFile->PutSection(fDebugFrameSection); fDebugFrameSection = ehFrameSection; fUsingEHFrameSection = true; - } - + } else + fElfFile->PutSection(ehFrameSection); } else if (ehFrameSection != NULL) { fDebugFrameSection = ehFrameSection; fUsingEHFrameSection = true; @@ -370,6 +369,7 @@ DwarfFile::Load(const char* fileName) // .eh_frame sections. The ones generated by GCC 2 are writable, // the ones generated by GCC 4 aren't. } + fDebugLocationSection = fElfFile->GetSection(".debug_loc"); fDebugPublicTypesSection = fElfFile->GetSection(".debug_pubtypes");