<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - LLDB-MI doesn't properly output CLI command response using console-stream-output"
   href="https://llvm.org/bugs/show_bug.cgi?id=28026">28026</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLDB-MI doesn't properly output CLI command response using console-stream-output
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>aetf@unlimitedcodeworks.xyz
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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]
<a href="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</a>

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)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>