[Lldb-commits] [lldb] [debugserver] Implement MultiMemRead packet (PR #162670)

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 9 11:15:57 PDT 2025


================
@@ -3160,6 +3165,140 @@ rnb_err_t RNBRemote::HandlePacket_m(const char *p) {
   return SendPacket(ostrm.str());
 }
 
+/// Returns true if `str` starts with `prefix`.
+static bool starts_with(std::string_view str, std::string_view prefix) {
+  return str.size() >= prefix.size() &&
+         str.compare(0, prefix.size(), prefix) == 0;
----------------
kastiglione wrote:

> This will throw if `prefix.size()` > str.size()`

oh from my read of the docs it doesn't

https://github.com/llvm/llvm-project/pull/162670


More information about the lldb-commits mailing list