public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug dap/31036] New: More type checking in DAP Date: Mon, 06 Nov 2023 18:55:16 +0000 [thread overview] Message-ID: <bug-31036-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=31036 Bug ID: 31036 Summary: More type checking in DAP Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: dap Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org Target Milestone: --- The DAP implementation tries to type-check the JSON objects that are arriving. This also helps keep the implementation correct. Some things, like a JSON "Source" object, aren't checked. And some things are checked via an ad hoc procedure -- for instance some breakpoint objects are checked by passing them to a second no-op function just to get type-checking. Perhaps this could be done more nicely by having a namedtuple argument. It would have to be an extension so that unexpected keywords could be ignored. And some layer would have to transform from a JSON dict to a namedtuple. There are also some spots that just have Sequence as the type, these could be fixed. Finally, maybe it would make sense to type-check the results of DAP calls, as an added safety measure. We had at least one bug along these lines -- but the danger here is that the failures may depend on the details of the inferior and not be visible in ordinary testing. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2023-11-06 18:55 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-06 18:55 tromey at sourceware dot org [this message] 2024-05-10 18:08 ` [Bug dap/31036] " cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31036-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).