[Lldb-commits] [lldb] [lldb-dap] Refactor request handlers (NFC) (PR #128262)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 24 11:27:30 PST 2025
ashgti wrote:
I think making the `operator ()` const makes sense, to help ensure we don't add any state accidentally. I can't think of any requests that have state at the moment. All the state is stored in the DAP object. Create an instance for each request might be helpful if we have more complex request handlers but I can't think of any uses for that at the moment, so maybe we keep it simple and just make them const.
> Should the request know they're interrupted before they complete?
Thats definitely an interesting question. I think its possible for request to check this if they're about to perform an expensive operation and bail out early. I think it may be possible to check this with the other changes I had prototyped. I can try out trying to strategically check `SBDebugger.InterruptRequested` to see how that works with my prototype.
https://github.com/llvm/llvm-project/pull/128262
More information about the lldb-commits
mailing list