Skip to content

Commit 9effefb

Browse files
committed
Revert "[lldb] Reland 2402b32 with /H to debug the windows build issue"
This reverts commit e72cdae, which broke LLVM's lldb builder for Windows msvc.
1 parent c6a3f4e commit 9effefb

File tree

5 files changed

+12
-72
lines changed

5 files changed

+12
-72
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ endif()
2121

2222
add_lldb_library(lldbPluginScriptInterpreterPythonInterfaces
2323
ScriptedPythonInterface.cpp
24+
ScriptedProcessPythonInterface.cpp
2425
ScriptedThreadPythonInterface.cpp
2526

2627
LINK_LIBS
@@ -37,13 +38,5 @@ add_lldb_library(lldbPluginScriptInterpreterPythonInterfaces
3738

3839
add_subdirectory(OperatingSystemPythonInterface)
3940
add_subdirectory(ScriptedPlatformPythonInterface)
40-
if (WIN32)
41-
set(ORIGINAL_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
42-
set(CMAKE_CXX_FLAGS "${ORIGINAL_CMAKE_CXX_FLAGS} /H")
43-
endif()
44-
add_subdirectory(ScriptedProcessPythonInterface)
45-
if (WIN32)
46-
set(CMAKE_CXX_FLAGS "${ORIGINAL_CMAKE_CXX_FLAGS}")
47-
endif()
4841
add_subdirectory(ScriptedThreadPlanPythonInterface)
4942

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,29 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "lldb/Core/PluginManager.h"
109
#include "lldb/Host/Config.h"
10+
#if LLDB_ENABLE_PYTHON
11+
// LLDB Python header must be included first
12+
#include "../lldb-python.h"
13+
#endif
1114
#include "lldb/Target/Process.h"
1215
#include "lldb/Utility/Log.h"
1316
#include "lldb/Utility/Status.h"
1417
#include "lldb/lldb-enumerations.h"
1518

1619
#if LLDB_ENABLE_PYTHON
1720

18-
// clang-format off
19-
// LLDB Python header must be included first
20-
#include "../../lldb-python.h"
21-
//clang-format on
22-
23-
#include "../../SWIGPythonBridge.h"
24-
#include "../../ScriptInterpreterPythonImpl.h"
25-
#include "../ScriptedThreadPythonInterface.h"
21+
#include "../SWIGPythonBridge.h"
22+
#include "../ScriptInterpreterPythonImpl.h"
2623
#include "ScriptedProcessPythonInterface.h"
27-
24+
#include "ScriptedThreadPythonInterface.h"
2825
#include <optional>
2926

3027
using namespace lldb;
3128
using namespace lldb_private;
3229
using namespace lldb_private::python;
3330
using Locker = ScriptInterpreterPythonImpl::Locker;
3431

35-
LLDB_PLUGIN_DEFINE_ADV(ScriptedProcessPythonInterface, ScriptInterpreterPythonScriptedProcessPythonInterface)
36-
3732
ScriptedProcessPythonInterface::ScriptedProcessPythonInterface(
3833
ScriptInterpreterPythonImpl &interpreter)
3934
: ScriptedProcessInterface(), ScriptedPythonInterface(interpreter) {}
@@ -213,24 +208,4 @@ StructuredData::DictionarySP ScriptedProcessPythonInterface::GetMetadata() {
213208
return dict;
214209
}
215210

216-
void ScriptedProcessPythonInterface::Initialize() {
217-
const std::vector<llvm::StringRef> ci_usages = {
218-
"process attach -C <script-name> [-k key -v value ...]",
219-
"process launch -C <script-name> [-k key -v value ...]"};
220-
const std::vector<llvm::StringRef> api_usages = {
221-
"SBAttachInfo.SetScriptedProcessClassName",
222-
"SBAttachInfo.SetScriptedProcessDictionary",
223-
"SBTarget.Attach",
224-
"SBLaunchInfo.SetScriptedProcessClassName",
225-
"SBLaunchInfo.SetScriptedProcessDictionary",
226-
"SBTarget.Launch"};
227-
PluginManager::RegisterPlugin(
228-
GetPluginNameStatic(), llvm::StringRef("Mock process state"),
229-
CreateInstance, eScriptLanguagePython, {ci_usages, api_usages});
230-
}
231-
232-
void ScriptedProcessPythonInterface::Terminate() {
233-
PluginManager::UnregisterPlugin(CreateInstance);
234-
}
235-
236211
#endif
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPROCESSPYTHONINTERFACE_H
1111

1212
#include "lldb/Host/Config.h"
13-
#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h"
1413

1514
#if LLDB_ENABLE_PYTHON
1615

17-
#include "../ScriptedPythonInterface.h"
18-
16+
#include "ScriptedPythonInterface.h"
17+
#include "lldb/Interpreter/Interfaces/ScriptedProcessInterface.h"
1918
#include <optional>
2019

2120
namespace lldb_private {
2221
class ScriptedProcessPythonInterface : public ScriptedProcessInterface,
23-
public ScriptedPythonInterface,
24-
public PluginInterface {
22+
public ScriptedPythonInterface {
2523
public:
2624
ScriptedProcessPythonInterface(ScriptInterpreterPythonImpl &interpreter);
2725

@@ -69,16 +67,6 @@ class ScriptedProcessPythonInterface : public ScriptedProcessInterface,
6967

7068
StructuredData::DictionarySP GetMetadata() override;
7169

72-
static void Initialize();
73-
74-
static void Terminate();
75-
76-
static llvm::StringRef GetPluginNameStatic() {
77-
return "ScriptedProcessPythonInterface";
78-
}
79-
80-
llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
81-
8270
private:
8371
lldb::ScriptedThreadInterfaceSP CreateScriptedThreadInterface() override;
8472
};

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "Interfaces/OperatingSystemPythonInterface/OperatingSystemPythonInterface.h"
1818
#include "Interfaces/ScriptedPlatformPythonInterface/ScriptedPlatformPythonInterface.h"
19-
#include "Interfaces/ScriptedProcessPythonInterface/ScriptedProcessPythonInterface.h"
19+
#include "Interfaces/ScriptedProcessPythonInterface.h"
2020
#include "Interfaces/ScriptedThreadPlanPythonInterface/ScriptedThreadPlanPythonInterface.h"
2121
#include "PythonDataObjects.h"
2222
#include "PythonReadline.h"

0 commit comments

Comments
 (0)