[Lldb-commits] [PATCH] D85705: Add a "Trace" plug-in to LLDB to add process trace support in stages.
Fangrui Song via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 21 18:14:18 PDT 2020
MaskRay added inline comments.
================
Comment at: lldb/source/Target/TraceSettingsParser.cpp:123
+ if (schema.empty()) {
+ std::ostringstream schema_builder;
+ schema_builder << "{\n \"trace\": ";
----------------
This requires `sstream`. Fixed.
================
Comment at: lldb/source/Target/TraceSettingsParser.cpp:128
+ std::string plugin_schema(GetPluginSchema());
+ plugin_schema = std::regex_replace(plugin_schema, std::regex("\n"), "\n ");
+ schema_builder << plugin_schema << ",\n";
----------------
The replacement here looks strange.
`<regex>` implementations tend to be large, slow and buggy. It'd be best if <regex> can be avoided. (llvm has llvm/Support/Regex.h)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85705/new/
https://reviews.llvm.org/D85705
More information about the lldb-commits
mailing list