aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSid Nayyar <sidnayyar@google.com>2024-03-08 13:54:50 +0000
committerGiuliano Procida <gprocida@google.com>2024-03-08 14:24:11 +0000
commit36f47bb4397505dcb523eee607fe44cc7383e7c0 (patch)
treee6166206f3ed692d3cd2c45e99365e238606fb34
parentc8070fe63aa2eac4387057b3e3417c927e0a8d77 (diff)
downloadstg-36f47bb4397505dcb523eee607fe44cc7383e7c0.tar.gz
DWARF processor: add language awareness to STG DWARF processor
This will enable STG to selectively apply file filters based on the language of the current compilation unit being processed. PiperOrigin-RevId: 613908095 Change-Id: I47edda1caf40c57cba8e7077687aec5fc6d53484
-rw-r--r--dwarf_processor.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/dwarf_processor.cc b/dwarf_processor.cc
index 99278d8..3d1d846 100644
--- a/dwarf_processor.cc
+++ b/dwarf_processor.cc
@@ -352,6 +352,7 @@ class Processor {
ProcessUnspecifiedType(entry);
break;
case DW_TAG_compile_unit:
+ language_ = entry.MustGetUnsignedConstant(DW_AT_language);
ProcessAllChildren(entry);
break;
case DW_TAG_typedef:
@@ -960,6 +961,7 @@ class Processor {
Scope scope_;
int version_;
dwarf::Files files_;
+ uint64_t language_;
};
Types Process(Handler& dwarf, bool is_little_endian_binary,