diff --git a/src/apps/debugger/dwarf/DebugInfoEntries.cpp b/src/apps/debugger/dwarf/DebugInfoEntries.cpp index 976684090c..9c2ecf47a9 100644 --- a/src/apps/debugger/dwarf/DebugInfoEntries.cpp +++ b/src/apps/debugger/dwarf/DebugInfoEntries.cpp @@ -2697,6 +2697,7 @@ DebugInfoEntryFactory::CreateDebugInfoEntry(uint16 tag, DebugInfoEntry*& _entry) entry = new(std::nothrow) DIESharedType; break; default: + return B_ENTRY_NOT_FOUND; break; } diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index f07f10ae2a..f95d18ea4a 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -825,8 +825,12 @@ DwarfFile::_ParseDebugInfoEntry(DataReader& dataReader, DebugInfoEntry* entry; status_t error = fDebugInfoFactory.CreateDebugInfoEntry( abbreviationEntry.Tag(), entry); - if (error != B_OK) + if (error != B_OK) { + WARNING("Failed to generate entry for tag %lu, code %lu\n", + abbreviationEntry.Tag(), code); return error; + } + ObjectDeleter entryDeleter(entry); TRACE_DIE("%*sentry %p at %lld: %lu, tag: %s (%lu), children: %d\n",