[Lldb-commits] [lldb] [lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (PR #82593)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 23 17:01:48 PST 2024


================
@@ -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:

> I'm thinking of having a SendErrorPacket() instead of SendPacket() with an error string optional argument, and having all error packets route through that, and having all SendPacket("Exx")'s go through that instead. @bulbazord @clayborg what do you think? I'm having trouble deciding if I want to have a method that constructs the error string and the caller passes it to SendPacket or if I want to have a method to do both.

I like that idea!

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


More information about the lldb-commits mailing list