Bug ID 28026
Summary LLDB-MI doesn’t properly output CLI command response using console-stream-output
Product lldb
Version unspecified
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter aetf@unlimitedcodeworks.xyz
CC llvm-bugs@lists.llvm.org
Classification Unclassified
According to the MI specification [1], the response for CLI commands should be
output as a console-stream-output record. Right now they are just dumped out
without any stream prefix and quotation.
[1]
[https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records](https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Stream-Records.html#GDB_002fMI-Stream-Records)
Step to reproduce:
1. launch using command 'lldb-mi echo'
2. set set target.run-args 1 2 3
3. set show target.run-args
Result output:
(gdb)
-file-exec-and-symbols "echo"
^done
(gdb)
=library-loaded,id="/usr/bin/echo",target-name="/usr/bin/echo",host-name="/usr/bin/echo",symbols-loaded="0",loaded_addr="-",size="0"
set set target.run-args 1 2 3
^done
(gdb)
set show target.run-args
target.run-args (array of strings) =
[0]: "1"
[1]: "2"
[2]: "3"
^done
(gdb)
Expected output:
(gdb)
-file-exec-and-symbols "echo"
^done
(gdb)
=library-loaded,id="/usr/bin/echo",target-name="/usr/bin/echo",host-name="/usr/bin/echo",symbols-loaded="0",loaded_addr="-",size="0"
set set target.run-args 1 2 3
^done
(gdb)
set show target.run-args
~ "target.run-args (array of strings) =\n"
~ " [0]: \"1\"\n"
~ " [1]: \"2\"\n"
~ " [2]: \"3\"\n"
^done
(gdb)