[Lldb-commits] [PATCH] D59015: [lldb-mi] Include full path in the -data-disassemble response

Anton Kolesov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 16 07:47:58 PDT 2019


anton.kolesov added inline comments.


================
Comment at: lldb/tools/lldb-mi/MICmdCmdData.cpp:420
+      std::unique_ptr<char[]> pPathBuffer(new char[PATH_MAX]);
+      lineEntry.GetFileSpec().GetPath(pPathBuffer.get(), PATH_MAX);
 
----------------
clayborg wrote:
> There is a variant of FileSpec::GetPath() that returns a std::string:
> ```
> std::string path = lineEntry.GetFileSpec().GetPath();
> ```
> Then you can get rid of the code above:
> ```
> std::unique_ptr<char[]> pPathBuffer(new char[PATH_MAX]);
> ```
LLDB MI uses SBFileSpec rather then FileSpec, and SBFileSpec doesn't have such a function.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D59015





More information about the lldb-commits mailing list