Give `frame recognizer add -l` a formal ScriptedStackFrameRecognizerInterface, matching the architecture already used by ScriptedProcess, ScriptedBreakpoint, etc.: a C++ interface header, a Python-backed implementation built on ScriptedPythonInterface's CreatePluginObject/Dispatch machinery, PluginManager registration, and a generatable Python ABC template (scripted_stackframe_recognizer.py). get_recognized_arguments' documented contract returns a plain list of lldb.SBValue (not an lldb.SBValueList), so it bypasses the generic Dispatch<ValueObjectListSP>() extractor and calls the SWIG bridge directly, matching the legacy behavior exactly. ScriptedStackFrameRecognizer now holds a single interface object created once in its constructor and reused across every RecognizeFrame() call, same lifecycle as before. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma> (cherry picked from commit a07b91d8243b8a8051dbbe5739eacc7942269c61)
39 lines
1.5 KiB
C++
39 lines
1.5 KiB
C++
//===-- ScriptInterpreterPythonInterfaces.h ---------------------*- 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_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTINTERPRETERPYTHONINTERFACES_H
|
|
#define LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTINTERPRETERPYTHONINTERFACES_H
|
|
|
|
#include "lldb/Core/PluginInterface.h"
|
|
#include "lldb/lldb-private.h"
|
|
|
|
#include "OperatingSystemPythonInterface.h"
|
|
#include "ScriptedBreakpointPythonInterface.h"
|
|
#include "ScriptedFrameProviderPythonInterface.h"
|
|
#include "ScriptedFramePythonInterface.h"
|
|
#include "ScriptedHookPythonInterface.h"
|
|
#include "ScriptedPlatformPythonInterface.h"
|
|
#include "ScriptedProcessPythonInterface.h"
|
|
#include "ScriptedStackFrameRecognizerPythonInterface.h"
|
|
#include "ScriptedThreadPlanPythonInterface.h"
|
|
#include "ScriptedThreadPythonInterface.h"
|
|
|
|
namespace lldb_private {
|
|
class ScriptInterpreterPythonInterfaces : public PluginInterface {
|
|
public:
|
|
static void Initialize();
|
|
static void Terminate();
|
|
static llvm::StringRef GetPluginNameStatic() {
|
|
return "script-interpreter-python-interfaces";
|
|
}
|
|
static llvm::StringRef GetPluginDescriptionStatic();
|
|
};
|
|
} // namespace lldb_private
|
|
|
|
#endif // LLDB_SOURCE_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTINTERPRETERPYTHONINTERFACES_H
|