hrev44210 adds 1 changeset to branch 'master' old head: dbf07c84a22f5b395d00d66e7d3b0e1160cb2f13 new head: f4ee2d048e0d4e754b94ec1e5c271c2d3ecf96ec ---------------------------------------------------------------------------- f4ee2d0: Slight and cleanup and fix potential section leak. [ Rene Gollent <anevilyak@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev44210 Commit: f4ee2d048e0d4e754b94ec1e5c271c2d3ecf96ec URL: http://cgit.haiku-os.org/haiku/commit/?id=f4ee2d0 Author: Rene Gollent <anevilyak@xxxxxxxxx> Date: Mon May 28 19:48:00 2012 UTC ---------------------------------------------------------------------------- 1 file changed, 5 insertions(+), 5 deletions(-) src/apps/debugger/dwarf/DwarfFile.cpp | 10 +++++----- ---------------------------------------------------------------------------- diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index d4cb185..49b5a9c 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");