zturner added a comment.

In https://reviews.llvm.org/D54680#1302408, @davide wrote:

> Is there a way of fixing this that doesn't require scattering the test 
> between two files?


Unless we create a utility that extracts lines based on prefixes and outputs 
them to a temporary file, I don't have any great ideas.

FWIW I actually find it easier to read this way, the interaction between the 
various command line options makes it pretty confusing to follow the order in 
which the various commands are executed.  combining -O, -o, -S, and -s makes it 
quite hard to figure out what commands are actually being executed and in what 
order.

Another advantage to having the commands be in their own file is that it's easy 
to reproduce the failure by just running `lldb -s script.lldbinit`.

I'd even go so far as to say that maybe the .test file should be the source 
code + check lines, and each of the 3 test cases should be a separate script 
file with all the commands together in one file.  It could use the `command 
source` command to avoid duplication.  So, for example, `stop-hook-1.lldbinit` 
could be something like:

  target stop-hook add -f stop-hook.c -l 30 -e 34 -o "expr ptr"
  command source stop-hook-common.lldbinit




https://reviews.llvm.org/D54680



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to