[all-commits] [llvm/llvm-project] c04fdf: Update callers to SendPacket with std::string's to...

Jason Molenda via All-commits all-commits at lists.llvm.org
Thu Mar 31 23:47:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c04fdfa17e6df33f6805f083bee22f5901d88344
      https://github.com/llvm/llvm-project/commit/c04fdfa17e6df33f6805f083bee22f5901d88344
  Author: Jason Molenda <jason at molenda.com>
  Date:   2022-03-31 (Thu, 31 Mar 2022)

  Changed paths:
    M lldb/tools/debugserver/source/RNBRemote.cpp

  Log Message:
  -----------
  Update callers to SendPacket with std::string's to not devolve to c-strs

Many callers of SendPacket() in RNBRemote.cpp have a local std::string
object, call c_str() on it to pass a c-string, which is then copied into
a std::string temporary object.

Also free JSONGenerator objects once we've formatted them into
ostringstream and don't need the objects any longer, to reduce max
memory use in debugserver.

Differential Revision: https://reviews.llvm.org/D122848
rdar://91117263




More information about the All-commits mailing list