Skip to content

Commit 0e668d0

Browse files
committed
rename to ModuleSymbolsRequestHandler
1 parent c499355 commit 0e668d0

File tree

6 files changed

+18
-24
lines changed

6 files changed

+18
-24
lines changed

lldb/tools/lldb-dap/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ add_lldb_library(lldbDAP
3636
Handler/CompletionsHandler.cpp
3737
Handler/ConfigurationDoneRequestHandler.cpp
3838
Handler/ContinueRequestHandler.cpp
39-
Handler/DAPGetModuleSymbolsRequestHandler.cpp
4039
Handler/DataBreakpointInfoRequestHandler.cpp
4140
Handler/DisassembleRequestHandler.cpp
4241
Handler/DisconnectRequestHandler.cpp
@@ -46,6 +45,7 @@ add_lldb_library(lldbDAP
4645
Handler/LaunchRequestHandler.cpp
4746
Handler/LocationsRequestHandler.cpp
4847
Handler/ModulesRequestHandler.cpp
48+
Handler/ModuleSymbolsRequestHandler.cpp
4949
Handler/NextRequestHandler.cpp
5050
Handler/PauseRequestHandler.cpp
5151
Handler/ReadMemoryRequestHandler.cpp

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ void DAP::RegisterRequests() {
16141614
// Custom requests
16151615
RegisterRequest<CompileUnitsRequestHandler>();
16161616
RegisterRequest<ModulesRequestHandler>();
1617-
RegisterRequest<DAPGetModuleSymbolsRequestHandler>();
1617+
RegisterRequest<ModuleSymbolsRequestHandler>();
16181618

16191619
// Testing requests
16201620
RegisterRequest<TestGetTargetBreakpointsRequestHandler>();

lldb/tools/lldb-dap/Handler/DAPGetModuleSymbolsRequestHandler.cpp renamed to lldb/tools/lldb-dap/Handler/ModuleSymbolsRequestHandler.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,9 @@ static std::string SymbolTypeToString(lldb::SymbolType symbol_type) {
8787
llvm_unreachable("unhandled symbol type.");
8888
}
8989

90-
/// Modules can be retrieved from the debug adapter with this request which can
91-
/// either return all modules or a range of modules to support paging.
92-
///
93-
/// Clients should only call this request if the corresponding capability
94-
/// `supportsModulesRequest` is true.
95-
llvm::Expected<DAPGetModuleSymbolsResponseBody>
96-
DAPGetModuleSymbolsRequestHandler::Run(
97-
const DAPGetModuleSymbolsArguments &args) const {
98-
DAPGetModuleSymbolsResponseBody response;
90+
llvm::Expected<ModuleSymbolsResponseBody>
91+
ModuleSymbolsRequestHandler::Run(const ModuleSymbolsArguments &args) const {
92+
ModuleSymbolsResponseBody response;
9993

10094
lldb::SBModuleSpec module_spec;
10195
if (args.moduleId) {

lldb/tools/lldb-dap/Handler/RequestHandler.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,15 @@ class CancelRequestHandler : public RequestHandler<protocol::CancelArguments,
594594
llvm::Error Run(const protocol::CancelArguments &args) const override;
595595
};
596596

597-
class DAPGetModuleSymbolsRequestHandler
597+
class ModuleSymbolsRequestHandler
598598
: public RequestHandler<
599-
protocol::DAPGetModuleSymbolsArguments,
600-
llvm::Expected<protocol::DAPGetModuleSymbolsResponseBody>> {
599+
protocol::ModuleSymbolsArguments,
600+
llvm::Expected<protocol::ModuleSymbolsResponseBody>> {
601601
public:
602602
using RequestHandler::RequestHandler;
603-
static llvm::StringLiteral GetCommand() { return "dapGetModuleSymbols"; }
604-
llvm::Expected<protocol::DAPGetModuleSymbolsResponseBody>
605-
Run(const protocol::DAPGetModuleSymbolsArguments &args) const override;
603+
static llvm::StringLiteral GetCommand() { return "moduleSymbols"; }
604+
llvm::Expected<protocol::ModuleSymbolsResponseBody>
605+
Run(const protocol::ModuleSymbolsArguments &args) const override;
606606
};
607607

608608
/// A request used in testing to get the details on all breakpoints that are

lldb/tools/lldb-dap/Protocol/ProtocolRequests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,14 @@ json::Value toJSON(const WriteMemoryResponseBody &WMR) {
598598
return result;
599599
}
600600

601-
bool fromJSON(const llvm::json::Value &Params,
602-
DAPGetModuleSymbolsArguments &Args, llvm::json::Path P) {
601+
bool fromJSON(const llvm::json::Value &Params, ModuleSymbolsArguments &Args,
602+
llvm::json::Path P) {
603603
json::ObjectMapper O(Params, P);
604604
return O && O.mapOptional("moduleId", Args.moduleId) &&
605605
O.mapOptional("moduleName", Args.moduleName);
606606
}
607607

608-
llvm::json::Value toJSON(const DAPGetModuleSymbolsResponseBody &DGMSR) {
608+
llvm::json::Value toJSON(const ModuleSymbolsResponseBody &DGMSR) {
609609
json::Object result;
610610
result.insert({"symbols", DGMSR.symbols});
611611
return result;

lldb/tools/lldb-dap/Protocol/ProtocolRequests.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -981,22 +981,22 @@ struct WriteMemoryResponseBody {
981981
};
982982
llvm::json::Value toJSON(const WriteMemoryResponseBody &);
983983

984-
struct DAPGetModuleSymbolsArguments {
984+
struct ModuleSymbolsArguments {
985985
/// The module UUID for which to retrieve symbols.
986986
std::optional<std::string> moduleId;
987987

988988
/// The module path.
989989
std::optional<std::string> moduleName;
990990
};
991-
bool fromJSON(const llvm::json::Value &, DAPGetModuleSymbolsArguments &,
991+
bool fromJSON(const llvm::json::Value &, ModuleSymbolsArguments &,
992992
llvm::json::Path);
993993

994994
/// Response to `getModuleSymbols` request.
995-
struct DAPGetModuleSymbolsResponseBody {
995+
struct ModuleSymbolsResponseBody {
996996
/// The symbols for the specified module.
997997
std::vector<dap::Symbol> symbols;
998998
};
999-
llvm::json::Value toJSON(const DAPGetModuleSymbolsResponseBody &);
999+
llvm::json::Value toJSON(const ModuleSymbolsResponseBody &);
10001000

10011001
} // namespace lldb_dap::protocol
10021002

0 commit comments

Comments
 (0)