@@ -76,27 +76,29 @@ bool Symbolizer::SymbolizeData(uptr addr, DataInfo *info) {
76
76
return true ;
77
77
}
78
78
79
- // We ignore the format argument to __sanitizer_symbolize_global.
80
- void FormattedStackTracePrinter::RenderData (InternalScopedString *buffer,
81
- const char *format,
82
- const DataInfo *DI,
83
- const char *strip_path_prefix) {
84
- buffer->AppendF (kFormatData , DI->start );
85
- }
86
-
87
- bool FormattedStackTracePrinter::RenderNeedsSymbolization (const char *format) {
88
- return false ;
89
- }
90
-
91
- // We don't support the stack_trace_format flag at all.
92
- void FormattedStackTracePrinter::RenderFrame (InternalScopedString *buffer,
93
- const char *format, int frame_no,
94
- uptr address,
95
- const AddressInfo *info,
96
- bool vs_style,
97
- const char *strip_path_prefix) {
98
- CHECK (!RenderNeedsSymbolization (format));
99
- buffer->AppendF (kFormatFrame , frame_no, address);
79
+ class MarkupStackTracePrinter : public StackTracePrinter {
80
+ // We ignore the format argument to __sanitizer_symbolize_global.
81
+ void RenderData (InternalScopedString *buffer, const char *format,
82
+ const DataInfo *DI, const char *strip_path_prefix) override {
83
+ buffer->AppendF (kFormatData , DI->start );
84
+ }
85
+
86
+ bool RenderNeedsSymbolization (const char *format) override { return false ; }
87
+
88
+ // We don't support the stack_trace_format flag at all.
89
+ void RenderFrame (InternalScopedString *buffer, const char *format,
90
+ int frame_no, uptr address, const AddressInfo *info,
91
+ bool vs_style, const char *strip_path_prefix) override {
92
+ CHECK (!RenderNeedsSymbolization (format));
93
+ buffer->AppendF (kFormatFrame , frame_no, address);
94
+ }
95
+
96
+ protected:
97
+ ~MarkupStackTracePrinter ();
98
+ };
99
+
100
+ StackTracePrinter *StackTracePrinter::NewStackTracePrinter () {
101
+ return new (GetGlobalLowLevelAllocator ()) MarkupStackTracePrinter ();
100
102
}
101
103
102
104
Symbolizer *Symbolizer::PlatformInit () {
0 commit comments