https://llvm.org/bugs/show_bug.cgi?id=29129
Bug ID: 29129 Summary: lldb-mi expressions that have spaces aren't parsed properly for -var-create Product: lldb Version: 3.9 Hardware: All OS: All Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: edmu...@microsoft.com CC: llvm-b...@lists.llvm.org Classification: Unclassified When creating a variable in lldb-mi through "-var-create", if the expression has any spaces, the parsing will fail. Sample debug session -gdb-set solib-search-path "/Users/edmunoz/code/cpp" ^done (gdb) -file-exec-and-symbols /Users/edmunoz/code/cpp/test2 ^done (gdb) -break-insert main (gdb) [...] -exec-run ^running [...] -var-create - - "x = 2" --thread 1 --frame 0 ^error,msg="Command 'var-create'. Command Args. Validation failed. Args missing additional information: thread, frame. Not all arguments or options were recognised: 1 0" (gdb) # Executing it with no spaces succeeds -var-create - - "x=2" --thread 1 --frame 0 ^done,name="var1",numchild="0",value="2",type="int",thread-id="1",has_more="0" The problem lies in the extraction of the options for "long options" (starting with "--"). It's using `MIUtilString::SplitConsiderQuotes` or `MIUtilString::Split` depending on the type it expects the next option to be. For example, for the option "--thread", it expects the next option to be a number (thread id). However, splitting the whole command considering quotes or not based on the type of the next option is incorrect. I will be sending a patch with a fix. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev