aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/scripted/ScriptedProcess.h
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2022-12-05 13:54:21 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2023-01-12 12:49:05 -0800
commitd9f4d1b048520c50ca06e24b7886d77d3bb2fc29 (patch)
treec1edef810047d83881fd26635a0c6813faccc0a4 /lldb/source/Plugins/Process/scripted/ScriptedProcess.h
parentc17e40ba52f3946baec60c3b5feb182e6b3faefe (diff)
downloadllvm-d9f4d1b048520c50ca06e24b7886d77d3bb2fc29.zip
llvm-d9f4d1b048520c50ca06e24b7886d77d3bb2fc29.tar.gz
llvm-d9f4d1b048520c50ca06e24b7886d77d3bb2fc29.tar.bz2
[lldb/Interpreter] Make ScriptedProcessInfo more generic
This patch moves the ScriptedProcessInfo class out of the ScriptedProcess and hoist it as a standalone interpreter class, so it can be reused with the Scripted Platform. Differential Revision: https://reviews.llvm.org/D139247 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/source/Plugins/Process/scripted/ScriptedProcess.h')
-rw-r--r--lldb/source/Plugins/Process/scripted/ScriptedProcess.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/lldb/source/Plugins/Process/scripted/ScriptedProcess.h b/lldb/source/Plugins/Process/scripted/ScriptedProcess.h
index e8f8dd4..350c427 100644
--- a/lldb/source/Plugins/Process/scripted/ScriptedProcess.h
+++ b/lldb/source/Plugins/Process/scripted/ScriptedProcess.h
@@ -9,6 +9,7 @@
#ifndef LLDB_SOURCE_PLUGINS_SCRIPTED_PROCESS_H
#define LLDB_SOURCE_PLUGINS_SCRIPTED_PROCESS_H
+#include "lldb/Interpreter/ScriptedMetadata.h"
#include "lldb/Target/Process.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Status.h"
@@ -18,24 +19,7 @@
#include <mutex>
namespace lldb_private {
-
class ScriptedProcess : public Process {
-protected:
- class ScriptedProcessInfo {
- public:
- ScriptedProcessInfo(const ProcessLaunchInfo &launch_info) {
- m_class_name = launch_info.GetScriptedProcessClassName();
- m_args_sp = launch_info.GetScriptedProcessDictionarySP();
- }
-
- std::string GetClassName() const { return m_class_name; }
- StructuredData::DictionarySP GetArgsSP() const { return m_args_sp; }
-
- private:
- std::string m_class_name;
- StructuredData::DictionarySP m_args_sp;
- };
-
public:
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp,
lldb::ListenerSP listener_sp,
@@ -90,8 +74,7 @@ public:
protected:
ScriptedProcess(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp,
- const ScriptedProcess::ScriptedProcessInfo &launch_info,
- Status &error);
+ const ScriptedMetadata &scripted_metadata, Status &error);
Status DoStop();
@@ -111,7 +94,7 @@ private:
static bool IsScriptLanguageSupported(lldb::ScriptLanguage language);
// Member variables.
- const ScriptedProcessInfo m_scripted_process_info;
+ const ScriptedMetadata m_scripted_metadata;
lldb_private::ScriptInterpreter *m_interpreter = nullptr;
lldb_private::StructuredData::ObjectSP m_script_object_sp = nullptr;
//@}