Fix exceptions encountered while debugging gdb protocol
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lldb/examples/python/gdbremote.py | ||
---|---|---|
1224–1225 | I don't know this tool, but should it print the original json (rsp) if there's an issue when decoding the json? Or should it print a message saying invalid json was given? |
lldb/examples/python/gdbremote.py | ||
---|---|---|
1224–1225 | The contents of each packet are already printed earlier, this change only affects the "jThreadsInfo" message which is supposed to return a JSON response. But servers are allowed to return an empty response if they don't support a protocol message, which will fail to decode as valid JSON. |
other than the comment about the json, looks all good to me!
lldb/examples/python/gdbremote.py | ||
---|---|---|
1224–1225 | thanks for the explanation. My only suggestion is to handle that case explicitly, by checking that the response is not empty before decoding. |
I don't know this tool, but should it print the original json (rsp) if there's an issue when decoding the json? Or should it print a message saying invalid json was given?