summaryrefslogtreecommitdiff
path: root/tools/incident_section_gen/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/incident_section_gen/main.cpp')
-rw-r--r--tools/incident_section_gen/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp
index ded4b916c452..786223a430ae 100644
--- a/tools/incident_section_gen/main.cpp
+++ b/tools/incident_section_gen/main.cpp
@@ -415,7 +415,7 @@ static bool generateSectionListCpp(Descriptor const* descriptor) {
}
const SectionFlags s = getSectionFlags(field);
- if (s.userdebug_and_eng_only()) {
+ if (s.userdebug_and_eng_only() || s.type() == SECTION_TEXT_DUMPSYS) {
printf("#if ALLOW_RESTRICTED_SECTIONS\n");
}
@@ -449,8 +449,13 @@ static bool generateSectionListCpp(Descriptor const* descriptor) {
printf(" new TombstoneSection(%d, \"%s\"),\n", field->number(),
s.args().c_str());
break;
+ case SECTION_TEXT_DUMPSYS:
+ printf(" new TextDumpsysSection(%d, ", field->number());
+ splitAndPrint(s.args());
+ printf(" NULL),\n");
+ break;
}
- if (s.userdebug_and_eng_only()) {
+ if (s.userdebug_and_eng_only() || s.type() == SECTION_TEXT_DUMPSYS) {
printf("#endif\n");
}
}