vsk added a comment.
This looks very cool, thanks @clayborg! I think using JSON to describe the
trace data (what kind of trace is this, what's in it, etc.) sounds reasonable.
> For "trace load", I get the plugin for the JSON file by matching it up with
> the "name" field in the JSON, but I don't store the "trace_sp" anywhere. We
> will need to store it with the target that we create, or for later commands
> add it to a target that is stopped when the trace data is loaded via the
> process interface (through lldb-server is the current thinking for this).
Have you considered what might happen if there are multiple targets covered by
a single trace? Strawman proposal: would it make sense to register the trace
with a Debugger instance? This can be a list of traces if it makes sense to
support debugging more than one trace at a time.
> "trace dump" does nothing for now, but this is what we can use to test that
> "trace load" worked and was able to create a target.
It'd be great to have some test for this, even if all 'trace load' does at this
point is print an error about bad JSON input.
================
Comment at: lldb/include/lldb/Target/Trace.h:27
+/// that the data can be dumped, used for reverse and forward stepping to allow
+/// introspection into the reason your process may crashed or found its way to
+/// its current state.
----------------
nit: 'may have', or omit the 'may'?
================
Comment at: lldb/source/Commands/CommandObjectTrace.cpp:1
+//===-- CommandObjectTrace.cpp
+//---------------------------------------------===//
----------------
nit: formatting seems a bit off here?
================
Comment at: lldb/source/Commands/Options.td:206
+ Required, Completion<"SourceFile">,
+ Desc<"A specifier in the form filename:line[:column] for setting file &
line breakpoints.">;
/* Don't add this option till it actually does something useful...
----------------
nit: seems like an accidental change here?
================
Comment at: lldb/source/Commands/Options.td:754
def source_list_file_colon_line : Option<"joint-specifier", "y">, Group<5>,
- Arg<"FileLineColumn">, Completion<"SourceFile">,
+ Arg<"FileLineColumn">, Completion<"SourceFile">,
Desc<"A specifier in the form filename:line[:column] from which to display"
----------------
ditto
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85705/new/
https://reviews.llvm.org/D85705
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits