From 5d21c1244db94552c3acddbcf23ad4bca4d91e73 Mon Sep 17 00:00:00 2001 From: Pierre-Marie de Rodat Date: Mon, 24 Apr 2017 14:55:42 +0200 Subject: Ignore, but still allow block and string forms for DW_AT_const_value --- src/readDwarf.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/readDwarf.cpp b/src/readDwarf.cpp index f993f68..c91776c 100644 --- a/src/readDwarf.cpp +++ b/src/readDwarf.cpp @@ -506,9 +506,22 @@ bool DIECursor::readNext(DWARF_InfoData& id, bool stopAtNull) case DW_AT_frame_base: id.frame_base = a; break; case DW_AT_language: assert(a.type == Const); id.language = a.cons; break; case DW_AT_const_value: - assert(a.type == Const); - id.const_value = a.cons; - id.has_const_value = true; + switch (a.type) + { + case Const: + id.const_value = a.cons; + id.has_const_value = true; + break; + + // TODO: handle these + case String: + case Block: + break; + + default: + assert(false); + break; + } break; } } -- cgit v0.12