LLDB mainline
ScriptedFrame.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_SCRIPTED_FRAME_H
10#define LLDB_SOURCE_PLUGINS_SCRIPTED_FRAME_H
11
13#include "ScriptedThread.h"
17#include <string>
18
19namespace lldb_private {
20class ScriptedThread;
21}
22
23namespace lldb_private {
24
26
27public:
31 SymbolContext &sym_ctx, lldb::RegisterContextSP reg_ctx_sp,
32 std::shared_ptr<DynamicRegisterInfo> reg_info_sp,
33 StructuredData::GenericSP script_object_sp = nullptr);
34
35 ~ScriptedFrame() override;
36
37 static llvm::Expected<std::shared_ptr<ScriptedFrame>>
39 StructuredData::Generic *script_object = nullptr);
40
41 bool IsInlined() override;
42 bool IsArtificial() const override;
43 bool IsHidden() override;
44 const char *GetFunctionName() override;
45 const char *GetDisplayFunctionName() override;
46
47private:
50
51 ScriptedFrame(const ScriptedFrame &) = delete;
52 const ScriptedFrame &operator=(const ScriptedFrame &) = delete;
53
54 std::shared_ptr<DynamicRegisterInfo> GetDynamicRegisterInfo();
55
58 std::shared_ptr<DynamicRegisterInfo> m_register_info_sp;
59};
60
61} // namespace lldb_private
62
63#endif // LLDB_SOURCE_PLUGINS_SCRIPTED_FRAME_H
std::shared_ptr< DynamicRegisterInfo > m_register_info_sp
ScriptedFrame(ScriptedThread &thread, lldb::ScriptedFrameInterfaceSP interface_sp, lldb::user_id_t frame_idx, lldb::addr_t pc, SymbolContext &sym_ctx, lldb::RegisterContextSP reg_ctx_sp, std::shared_ptr< DynamicRegisterInfo > reg_info_sp, StructuredData::GenericSP script_object_sp=nullptr)
bool IsArtificial() const override
Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frame...
const char * GetFunctionName() override
Get the frame's demangled name.
lldb::ScriptedFrameInterfaceSP GetInterface() const
void CheckInterpreterAndScriptObject() const
lldb::ScriptedFrameInterfaceSP m_scripted_frame_interface_sp
static llvm::Expected< std::shared_ptr< ScriptedFrame > > Create(ScriptedThread &thread, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_object=nullptr)
ScriptedFrame(const ScriptedFrame &)=delete
const ScriptedFrame & operator=(const ScriptedFrame &)=delete
lldb_private::StructuredData::GenericSP m_script_object_sp
bool IsHidden() override
Query whether this frame should be hidden from backtraces.
bool IsInlined() override
Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived ...
const char * GetDisplayFunctionName() override
Get the frame's demangled display name.
std::shared_ptr< DynamicRegisterInfo > GetDynamicRegisterInfo()
This base class provides an interface to stack frames.
Definition StackFrame.h:44
std::shared_ptr< Generic > GenericSP
std::shared_ptr< Dictionary > DictionarySP
Defines a symbol context baton that can be handed other debug core functions.
A class that represents a running process on the host machine.
uint64_t user_id_t
Definition lldb-types.h:82
uint64_t addr_t
Definition lldb-types.h:80
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
std::shared_ptr< lldb_private::ScriptedFrameInterface > ScriptedFrameInterfaceSP