================
@@ -3944,15 +3955,22 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) {
         // The order of these checks is important.  
         if (process_does_not_exist (pid_attaching_to)) {
           DNBLogError("Tried to attach to pid that doesn't exist");
-          std::string return_message = "E96;";
-          return_message += cstring_to_asciihex_string("no such process.");
+          std::string return_message = "E96";
----------------
clayborg wrote:

It might be nice to have a member function of RNBRemote that creates an error 
packet:
```
std::string RNBRemote::CreateEXXPacket(const char *exx_str, const char 
*error_detail) {
  std::string packet(exx_str);
  if (m_enable_error_strings)
    packet += ";" + cstring_to_asciihex_string(error_detail);
  return packet;
}
```
Similar to what Alex suggested above, but making a member function allows 
access to the `m_enable_error_strings` ivar.

https://github.com/llvm/llvm-project/pull/82593
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to