-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[lldb][lldb-dap] Basic implementation of a deferred request. #140260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,14 @@ class BaseRequestHandler { | |
|
||
virtual ~BaseRequestHandler() = default; | ||
|
||
void Run(const protocol::Request &); | ||
/// Return `true` if the request should be deferred. | ||
[[nodiscard]] | ||
bool Run(const protocol::Request &); | ||
|
||
[[nodiscard]] | ||
virtual bool DeferRequest() const { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is specifically about deferring until configurationDone is called. We don't really have support for an async request handler yet. I thought about implementing an Thats a long winded way of saying, should we make this more specific? Maybe |
||
return false; | ||
} | ||
|
||
virtual void operator()(const protocol::Request &request) const = 0; | ||
|
||
|
@@ -203,6 +210,7 @@ class AttachRequestHandler | |
static llvm::StringLiteral GetCommand() { return "attach"; } | ||
llvm::Error Run(const protocol::AttachRequestArguments &args) const override; | ||
void PostRun() const override; | ||
bool DeferRequest() const override; | ||
}; | ||
|
||
class BreakpointLocationsRequestHandler | ||
|
@@ -302,6 +310,7 @@ class LaunchRequestHandler | |
llvm::Error | ||
Run(const protocol::LaunchRequestArguments &arguments) const override; | ||
void PostRun() const override; | ||
bool DeferRequest() const override; | ||
}; | ||
|
||
class RestartRequestHandler : public LegacyRequestHandler { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check the deferred call here like?