diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 12:31:45 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-28 12:31:45 -0400 |
| commit | db57ec047ba0e0fd73224b86736a4b40d425b802 (patch) | |
| tree | cbcc976e0c8c54babc6fab14b0da28cf87a86e8c /tools | |
| parent | b4268e6e67e6f4e11e0a5548b364f108fbaeabb1 (diff) | |
debugger: monitor handles lists each handle's type and service event name
gdbrsp.py gains raw and monitor commands.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/nx2/gdbrsp.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/nx2/gdbrsp.py b/tools/nx2/gdbrsp.py index 245ddc24a6..83318177ac 100644 --- a/tools/nx2/gdbrsp.py +++ b/tools/nx2/gdbrsp.py @@ -319,6 +319,16 @@ def main(): rsp.cmd(f"z2,{addr:x},8") rsp.cmd("s") rsp.cmd(f"Z2,{addr:x},8") + elif op == "monitor": + # monitor <command...>: run a gdbstub monitor command (qRcmd) and print its text. + reply = rsp.cmd("qRcmd," + " ".join(parts[1:]).encode().hex()) + try: + print(bytes.fromhex(reply).decode(errors="replace")) + except ValueError: + print("monitor:", reply) + elif op == "raw": + # raw <packet>: send one packet and print the reply (e.g. qXfer:threads:read::0,ffff). + print("raw:", rsp.cmd(parts[1])) elif op == "sleep": import time time.sleep(float(parts[1])) |
