[Lldb-commits] [PATCH] D62948: lit/Register: Avoid stdio in register write tests
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 7 02:47:09 PDT 2019
labath planned changes to this revision.
labath added a comment.
It looks like this problem is more widespread than we originally thought (a bunch of other tests are affected too). I'll need to think whether we can come up with a more general solution.
In D62948#1533088 <https://reviews.llvm.org/D62948#1533088>, @jgorbe wrote:
> About %T not working for "process launch", what about something like `RUN: %lldb -b --one-line-before-file "process launch --stdout %T/x86-zmm-write.out" -s %s %t` and then FileCheck-ing?
There are two issues with that. The first one is that with --one-line, lldb stops processing commands after hitting the int3 instruction. I think this is related to the fact that lldb aborts the script if the inferior crashes, and it considers an unexpected int3 instruction to be a "crash". However, it's not clear to me why should the behavior depend on whether the command is in the script or on the command line, so this may be a bug actually.
The second one is that putting complex commands on the command line creates a bit of a quoting nightmare, as the command is quote-processed both by the shell and by lldb. And shells (particularly windows ones) differ in how they handle that. If %T doesn't contain any funny characters, then everything is fine (and I expect a lot of our tests would fail if it did, so we kind of already assume that). However, I am reluctant to recommend that as the best practice for handling these kinds of things.
CHANGES SINCE LAST ACTION
More information about the lldb-commits