From 2f6ecd577a91af57d617dfec5d6d4c33819dabcb Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 28 May 2013 22:31:54 -0400 Subject: [PATCH] Add parsing for several new attribute classes. - Collectively the previous set of changes get us minimally parsing some of the new DWARF4 output from gcc 4.7 as well as some of the draft DWARF5 extensions, which allows us to handle such executables a bit more gracefully. Not all of the new information is made use of as yet though. Should resolve #9799. --- src/apps/debugger/dwarf/DwarfFile.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/dwarf/DwarfFile.cpp b/src/apps/debugger/dwarf/DwarfFile.cpp index 14ba4bbb7b..02322bf567 100644 --- a/src/apps/debugger/dwarf/DwarfFile.cpp +++ b/src/apps/debugger/dwarf/DwarfFile.cpp @@ -1,6 +1,6 @@ /* * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. - * Copyright 2012, Rene Gollent, rene@gollent.com. + * Copyright 2012-2013, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -1253,7 +1253,17 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, case DW_FORM_ref_udata: value = dataReader.ReadUnsignedLEB128(0); break; + case DW_FORM_exprloc: + value = dataReader.ReadUnsignedLEB128(0); + break; + case DW_FORM_flag_present: + attributeValue.SetToFlag(dataReader.Read(0) != 0); + break; + case DW_FORM_ref_sig8: + value = dataReader.Read(0); + break; case DW_FORM_indirect: + case DW_FORM_sec_offset: default: WARNING("Unsupported attribute form: %" B_PRIu32 "\n", attributeForm); @@ -1322,6 +1332,10 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader, case ATTRIBUTE_CLASS_STRING: // already set break; + case ATTRIBUTE_CLASS_EXPRESSION: + // TODO: implement + dataReader.Skip(value); + break; } if (dataReader.HasOverflow()) {