From 4a20baa3ea5efd1dae78d0f85c22ccd7d62c184b Mon Sep 17 00:00:00 2001 From: Pierre-Marie de Rodat Date: Wed, 22 Mar 2017 15:48:04 +0100 Subject: DWARF_InfoData: track the DW_AT_language attribute --- src/readDwarf.cpp | 1 + src/readDwarf.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/readDwarf.cpp b/src/readDwarf.cpp index 690cb8e..e5895fc 100644 --- a/src/readDwarf.cpp +++ b/src/readDwarf.cpp @@ -500,6 +500,7 @@ bool DIECursor::readNext(DWARF_InfoData& id, bool stopAtNull) case DW_AT_data_member_location: id.member_location = a; break; case DW_AT_location: id.location = a; break; case DW_AT_frame_base: id.frame_base = a; break; + case DW_AT_language: assert(a.type == Const); id.language = a.cons; break; } } diff --git a/src/readDwarf.h b/src/readDwarf.h index 4d077c8..8d98a00 100644 --- a/src/readDwarf.h +++ b/src/readDwarf.h @@ -163,6 +163,7 @@ struct DWARF_InfoData DWARF_Attribute frame_base; long upper_bound; long lower_bound; + unsigned language; void clear() { @@ -191,6 +192,7 @@ struct DWARF_InfoData frame_base.type = Invalid; upper_bound = 0; lower_bound = 0; + language = 0; } void merge(const DWARF_InfoData& id) -- cgit v0.12