This PR makes `PlatformWasm` a `RemoteAwarePlatform` that can connect to a remote GDB platform server. `PlatformWasmRemoteGDBServer` inherits from `PlatformRemoteGDBServer`, with the only difference that it picks the correct Process plugin when launching and attaching. The approach is identical to the one taken by `PlatformAndroid`. The context is that we're working on a platform based approach for discovering and attaching Wasm processes running under JSC with the [newly added debugging support](https://github.com/WebKit/WebKit/pull/51462).
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLDB_SOURCE_PLUGINS_PLATFORM_WASM_PLATFORMWASMREMOTEGDBSERVER_H
|
|
#define LLDB_SOURCE_PLUGINS_PLATFORM_WASM_PLATFORMWASMREMOTEGDBSERVER_H
|
|
|
|
#include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h"
|
|
|
|
namespace lldb_private {
|
|
|
|
class PlatformWasmRemoteGDBServer
|
|
: public platform_gdb_server::PlatformRemoteGDBServer {
|
|
public:
|
|
PlatformWasmRemoteGDBServer() = default;
|
|
|
|
~PlatformWasmRemoteGDBServer() override;
|
|
|
|
virtual llvm::StringRef GetDefaultProcessPluginName() const override;
|
|
|
|
private:
|
|
PlatformWasmRemoteGDBServer(const PlatformWasmRemoteGDBServer &) = delete;
|
|
const PlatformWasmRemoteGDBServer &
|
|
operator=(const PlatformWasmRemoteGDBServer &) = delete;
|
|
};
|
|
|
|
} // namespace lldb_private
|
|
|
|
#endif // LLDB_SOURCE_PLUGINS_PLATFORM_WASM_PLATFORMWASMREMOTEGDBSERVER_H
|