[compiler-rt] [sanitizer_symbolizer] Symbolizer Markup for linux. (PR #65543)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 11:28:27 PDT 2023
================
@@ -248,6 +248,44 @@ static void PrintStackAllocations(StackAllocationsRingBuffer *sa,
if (SymbolizedStack *frame = Symbolizer::GetOrInit()->SymbolizePC(pc)) {
RenderFrame(&frame_desc, " %F %L", 0, frame->info.address, &frame->info,
common_flags()->symbolize_vs_style,
+ common_flags()->enable_symbolizer_markup,
+ common_flags()->strip_path_prefix);
+ frame->ClearAll();
+ }
+ Printf("%s\n", frame_desc.data());
+ frame_desc.clear();
+ }
+}
+
+
+static void PrintStackAllocationsMarkup(StackAllocationsRingBuffer *sa) {
+ // For symbolizer markup it is just necessary to have dump stack
+ // frames for offline symbolization.
+
+ uptr frames = Min((uptr)flags()->stack_history_size, sa->size());
+ if (const ListOfModules *modules =
+ Symbolizer::GetOrInit()->GetRefreshedListOfModules()) {
+ InternalScopedString modules_res;
+ RenderModules(&modules_res, modules,
+ /*symbolizer_markup=*/ true);
+ Printf("%s", modules_res.data());
----------------
fmayer wrote:
Would it be helpful to add an example of how this looks as a comment? Makes it easier to grep for as well.
https://github.com/llvm/llvm-project/pull/65543
More information about the llvm-commits
mailing list