Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
libcxx
libcxxabi
libunwind
lld
lldb
cmake
docs
examples
include
lit
lldb.xcodeproj
lldb.xcworkspace
packages
resources
scripts
source
API
Breakpoint
Commands
Core
DataFormatters
Expression
Host
Initialization
Interpreter
Plugins
ABI
Architecture
Disassembler
DynamicLoader
ExpressionParser
Instruction
InstrumentationRuntime
JITLoader
Language
LanguageRuntime
MemoryHistory
ObjectContainer
ObjectFile
OperatingSystem
Platform
Process
Darwin
FreeBSD
Linux
MacOSX-Kernel
NetBSD
POSIX
Utility
ARMDefines.h
ARMUtils.h
CMakeLists.txt
DynamicRegisterInfo.cpp
DynamicRegisterInfo.h
FreeBSDSignals.cpp
FreeBSDSignals.h
GDBRemoteSignals.cpp
GDBRemoteSignals.h
HistoryThread.cpp
HistoryThread.h
HistoryUnwind.cpp
HistoryUnwind.h
InferiorCallPOSIX.cpp
InferiorCallPOSIX.h
InstructionUtils.h
LinuxSignals.cpp
LinuxSignals.h
MipsLinuxSignals.cpp
MipsLinuxSignals.h
NativeRegisterContextRegisterInfo.cpp
NativeRegisterContextRegisterInfo.h
NetBSDSignals.cpp
NetBSDSignals.h
RegisterContextDarwin_arm.cpp
RegisterContextDarwin_arm.h
RegisterContextDarwin_arm64.cpp
RegisterContextDarwin_arm64.h
RegisterContextDarwin_i386.cpp
RegisterContextDarwin_i386.h
RegisterContextDarwin_x86_64.cpp
RegisterContextDarwin_x86_64.h
RegisterContextDummy.cpp
RegisterContextDummy.h
RegisterContextFreeBSD_i386.cpp
RegisterContextFreeBSD_i386.h
RegisterContextFreeBSD_mips64.cpp
RegisterContextFreeBSD_mips64.h
RegisterContextFreeBSD_powerpc.cpp
RegisterContextFreeBSD_powerpc.h
RegisterContextFreeBSD_x86_64.cpp
RegisterContextFreeBSD_x86_64.h
RegisterContextHistory.cpp
RegisterContextHistory.h
RegisterContextLLDB.cpp
RegisterContextLLDB.h
RegisterContextLinux_i386.cpp
RegisterContextLinux_i386.h
RegisterContextLinux_mips.cpp
RegisterContextLinux_mips.h
RegisterContextLinux_mips64.cpp
RegisterContextLinux_mips64.h
RegisterContextLinux_s390x.cpp
RegisterContextLinux_s390x.h
RegisterContextLinux_x86_64.cpp
RegisterContextLinux_x86_64.h
RegisterContextMacOSXFrameBackchain.cpp
RegisterContextMacOSXFrameBackchain.h
RegisterContextMach_arm.cpp
RegisterContextMach_arm.h
RegisterContextMach_i386.cpp
RegisterContextMach_i386.h
RegisterContextMach_x86_64.cpp
RegisterContextMach_x86_64.h
RegisterContextMemory.cpp
RegisterContextMemory.h
RegisterContextNetBSD_x86_64.cpp
RegisterContextNetBSD_x86_64.h
RegisterContextOpenBSD_i386.cpp
RegisterContextOpenBSD_i386.h
RegisterContextOpenBSD_x86_64.cpp
RegisterContextOpenBSD_x86_64.h
RegisterContextPOSIX_arm.cpp
RegisterContextPOSIX_arm.h
RegisterContextPOSIX_arm64.cpp
RegisterContextPOSIX_arm64.h
RegisterContextPOSIX_mips64.cpp
RegisterContextPOSIX_mips64.h
RegisterContextPOSIX_powerpc.cpp
RegisterContextPOSIX_powerpc.h
RegisterContextPOSIX_ppc64le.cpp
RegisterContextPOSIX_ppc64le.h
RegisterContextPOSIX_s390x.cpp
RegisterContextPOSIX_s390x.h
RegisterContextPOSIX_x86.cpp
RegisterContextPOSIX_x86.h
RegisterContextThreadMemory.cpp
RegisterContextThreadMemory.h
RegisterContext_mips.h
RegisterContext_powerpc.h
RegisterContext_s390x.h
RegisterContext_x86.h
RegisterInfoInterface.h
RegisterInfoPOSIX_arm.cpp
RegisterInfoPOSIX_arm.h
RegisterInfoPOSIX_arm64.cpp
RegisterInfoPOSIX_arm64.h
RegisterInfoPOSIX_ppc64le.cpp
RegisterInfoPOSIX_ppc64le.h
RegisterInfos_arm.h
RegisterInfos_arm64.h
RegisterInfos_i386.h
RegisterInfos_mips.h
RegisterInfos_mips64.h
RegisterInfos_powerpc.h
RegisterInfos_ppc64le.h
RegisterInfos_s390x.h
RegisterInfos_x86_64.h
StopInfoMachException.cpp
StopInfoMachException.h
ThreadMemory.cpp
ThreadMemory.h
UnwindLLDB.cpp
UnwindLLDB.h
UnwindMacOSXFrameBackchain.cpp
UnwindMacOSXFrameBackchain.h
lldb-arm-register-enums.h
lldb-arm64-register-enums.h
lldb-mips-freebsd-register-enums.h
lldb-mips-linux-register-enums.h
lldb-ppc64le-register-enums.h
lldb-s390x-register-enums.h
lldb-x86-register-enums.h
Windows
elf-core
gdb-remote
mach-core
minidump
CMakeLists.txt
ScriptInterpreter
StructuredData
SymbolFile
SymbolVendor
SystemRuntime
UnwindAssembly
CMakeLists.txt
Symbol
Target
Utility
CMakeLists.txt
lldb.cpp
third_party
tools
unittests
utils
www
.arcconfig
.clang-format
.gitignore
CMakeLists.txt
CODE_OWNERS.txt
INSTALL.txt
LICENSE.TXT
use_lldb_suite_root.py
llvm
openmp
polly
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mk
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

112 lines
3.1 KiB
C++

//===-- ThreadMemory.h ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_ThreadMemory_h_
#define liblldb_ThreadMemory_h_
// C Includes
// C++ Includes
#include <string>
// Other libraries and framework includes
// Project includes
#include "lldb/Target/Thread.h"
class ThreadMemory : public lldb_private::Thread {
public:
ThreadMemory(lldb_private::Process &process, lldb::tid_t tid,
const lldb::ValueObjectSP &thread_info_valobj_sp);
ThreadMemory(lldb_private::Process &process, lldb::tid_t tid,
llvm::StringRef name, llvm::StringRef queue,
lldb::addr_t register_data_addr);
~ThreadMemory() override;
lldb::RegisterContextSP GetRegisterContext() override;
lldb::RegisterContextSP
CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
bool CalculateStopInfo() override;
const char *GetInfo() override {
if (m_backing_thread_sp)
m_backing_thread_sp->GetInfo();
return nullptr;
}
const char *GetName() override {
if (!m_name.empty())
return m_name.c_str();
if (m_backing_thread_sp)
m_backing_thread_sp->GetName();
return nullptr;
}
const char *GetQueueName() override {
if (!m_queue.empty())
return m_queue.c_str();
if (m_backing_thread_sp)
m_backing_thread_sp->GetQueueName();
return nullptr;
}
void WillResume(lldb::StateType resume_state) override;
void DidResume() override {
if (m_backing_thread_sp)
m_backing_thread_sp->DidResume();
}
lldb::user_id_t GetProtocolID() const override {
if (m_backing_thread_sp)
return m_backing_thread_sp->GetProtocolID();
return Thread::GetProtocolID();
}
void RefreshStateAfterStop() override;
lldb::ValueObjectSP &GetValueObject() { return m_thread_info_valobj_sp; }
void ClearStackFrames() override;
void ClearBackingThread() override { m_backing_thread_sp.reset(); }
bool SetBackingThread(const lldb::ThreadSP &thread_sp) override {
// printf ("Thread 0x%llx is being backed by thread 0x%llx\n", GetID(),
// thread_sp->GetID());
m_backing_thread_sp = thread_sp;
return (bool)thread_sp;
}
lldb::ThreadSP GetBackingThread() const override {
return m_backing_thread_sp;
}
protected:
bool IsOperatingSystemPluginThread() const override { return true; }
// If this memory thread is actually represented by a thread from the
// lldb_private::Process subclass, then fill in the thread here and
// all APIs will be routed through this thread object. If m_backing_thread_sp
// is empty, then this thread is simply in memory with no representation
// through the process plug-in.
lldb::ThreadSP m_backing_thread_sp;
lldb::ValueObjectSP m_thread_info_valobj_sp;
std::string m_name;
std::string m_queue;
lldb::addr_t m_register_data_addr;
private:
DISALLOW_COPY_AND_ASSIGN(ThreadMemory);
};
#endif // liblldb_ThreadMemory_h_