[Lldb-commits] [PATCH] D58564: [Reproducers] Add command provider

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 27 14:05:07 PST 2019


JDevlieghere updated this revision to Diff 188617.
JDevlieghere added a comment.

Pavel made a good point that with the previous implementation, the first call to RunCommandInterpreter would replay every recorded commands. This is indeed incorrect, because it's possible and likely that the state of the debugger has changed between different runs of the commands interpreter.

Now every call to RunCommandInterpreter gets its own buffer. During replay, we will change the input file handler before invocation of "RunCommandInterpreter". This works because this function is only called through the SB layer.

I'm not convinced doing the recorded at a lower level has any benefits. I investigated this route before and the IOHandler seems basically the same things as the command interpreter. We would still need to make the distinction between things that should and shouldn't be recorded (e.g. sourcing a file vs every command in the file). This would be a lot harder to do there, because we have less information.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58564/new/

https://reviews.llvm.org/D58564

Files:
  lldb/include/lldb/Interpreter/CommandInterpreter.h
  lldb/lit/Reproducer/Inputs/CommandRepro.in
  lldb/lit/Reproducer/TestCommandRepro.test
  lldb/source/Interpreter/CommandInterpreter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58564.188617.patch
Type: text/x-patch
Size: 9630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190227/c6c71891/attachment.bin>


More information about the lldb-commits mailing list