diff --git a/src/kits/debugger/dwarf/DwarfFile.cpp b/src/kits/debugger/dwarf/DwarfFile.cpp index e382d6200e..774803af54 100644 --- a/src/kits/debugger/dwarf/DwarfFile.cpp +++ b/src/kits/debugger/dwarf/DwarfFile.cpp @@ -1156,6 +1156,11 @@ DwarfFile::_ParseFrameSection(ElfSection* section, uint8 addressSize, return B_BAD_DATA; off_t lengthOffset = dataReader.Offset(); + // If the length is 0, it means a terminator of the CIE. + // Then just skip this .debug_frame/.eh_frame section. + if (length == 0) + return B_OK; + // CIE ID/CIE pointer uint64 cieID = dwarf64 ? dataReader.Read(0) : dataReader.Read(0);