[Lldb-commits] [PATCH] D136697: Add formatting support for VSCode logpoints message

jeffrey tan via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 27 11:16:08 PDT 2022


yinghuitan added inline comments.


================
Comment at: lldb/tools/lldb-vscode/BreakpointBase.cpp:306
   }
+  output.push_back('\n'); // Ensure log message has line break.
   g_vsc.SendOutput(OutputType::Console, output.c_str());
----------------
clayborg wrote:
> I would still only push one if the output doesn't end with one and add a test for this.
> ```
> if (!output.empty() && output.back() != '\n')
>   output.push_back('\n'); // Ensure log message has line break.
> ```
Ok, I can do this. But the existing tests (which has ending newline removed) should be testing this -- they do not have newline in log-message, but we still can correctly split-lines to get message boundary.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136697/new/

https://reviews.llvm.org/D136697



More information about the lldb-commits mailing list