[Lldb-commits] [PATCH] D120792: [lldb] Fix python errors in gdbremote.py

Dominic Chen via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 2 16:29:46 PST 2022


ddcc added inline comments.


================
Comment at: lldb/examples/python/gdbremote.py:1224-1225
+        print(json.dumps(json_tree, indent=4, separators=(',', ': ')))
+    except json.JSONDecodeError:
+        return
 
----------------
kastiglione wrote:
> 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?
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120792/new/

https://reviews.llvm.org/D120792



More information about the lldb-commits mailing list