[Lldb-commits] [PATCH] D90490: [intel-pt][trace] Implement a "get supported trace type" packet

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 10 05:23:08 PST 2020

labath added inline comments.

Comment at: lldb/docs/lldb-gdb-remote.txt:262
+send packet: jLLDBTraceSupportedType
+read packet: {"name": <name>, "description", <description>}/E<error code>
clayborg wrote:
> I know the deprecated trace packets allows an error code to be returned, but since we already have JSON being used here, I would be a shame to not return an error in the JSON with a string that is human readable instead of a EXX where XX are two hex digits. can we say the response is either:
> ```
> {"name": <name>, "description", <description>}
> ```
> or
> ```
> {"error": <error-string>}
> ```
> Or just have no error code? What would the error be able to tell us?
An error response might be suitable in case the client sends this packet without a running process.

I think we just stick to the established error code format, which already contains provisions for returning textual errors. I don't believe any of our existing json packets use json-encoded errors...

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list