forked from OSchip/llvm-project
Renamed UnwindAssemblyProfiler to UnwindAssembly along with its source files.
llvm-svn: 130156
This commit is contained in:
parent
078daac55d
commit
7be2542fc9
|
@ -254,21 +254,21 @@ public:
|
|||
GetSymbolVendorCreateCallbackForPluginName (const char *name);
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// UnwindAssemblyProfiler
|
||||
// UnwindAssembly
|
||||
//------------------------------------------------------------------
|
||||
static bool
|
||||
RegisterPlugin (const char *name,
|
||||
const char *description,
|
||||
UnwindAssemblyProfilerCreateInstance create_callback);
|
||||
UnwindAssemblyCreateInstance create_callback);
|
||||
|
||||
static bool
|
||||
UnregisterPlugin (UnwindAssemblyProfilerCreateInstance create_callback);
|
||||
UnregisterPlugin (UnwindAssemblyCreateInstance create_callback);
|
||||
|
||||
static UnwindAssemblyProfilerCreateInstance
|
||||
GetUnwindAssemblyProfilerCreateCallbackAtIndex (uint32_t idx);
|
||||
static UnwindAssemblyCreateInstance
|
||||
GetUnwindAssemblyCreateCallbackAtIndex (uint32_t idx);
|
||||
|
||||
static UnwindAssemblyProfilerCreateInstance
|
||||
GetUnwindAssemblyProfilerCreateCallbackForPluginName (const char *name);
|
||||
static UnwindAssemblyCreateInstance
|
||||
GetUnwindAssemblyCreateCallbackForPluginName (const char *name);
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// ArchDefaultUnwindPlan
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
// instructions are finished for migrating breakpoints past the
|
||||
// stack frame setup instructions when we don't have line table information.
|
||||
|
||||
FuncUnwinders (lldb_private::UnwindTable& unwind_table, lldb_private::UnwindAssemblyProfiler *assembly_profiler, AddressRange range);
|
||||
FuncUnwinders (lldb_private::UnwindTable& unwind_table, lldb_private::UnwindAssembly *assembly_profiler, AddressRange range);
|
||||
|
||||
~FuncUnwinders ();
|
||||
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
private:
|
||||
UnwindTable& m_unwind_table;
|
||||
UnwindAssemblyProfiler *m_assembly_profiler;
|
||||
UnwindAssembly *m_assembly_profiler;
|
||||
AddressRange m_range;
|
||||
|
||||
Mutex m_mutex;
|
||||
|
|
|
@ -48,7 +48,7 @@ private:
|
|||
|
||||
bool m_initialized; // delay some initialization until ObjectFile is set up
|
||||
|
||||
UnwindAssemblyProfiler* m_assembly_profiler;
|
||||
UnwindAssembly* m_assembly_profiler;
|
||||
|
||||
DWARFCallFrameInfo* m_eh_frame;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//===-- UnwindAssemblyProfiler.h --------------------------------*- C++ -*-===//
|
||||
//===-- UnwindAssembly.h --------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
|
@ -7,23 +7,23 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef utility_UnwindAssemblyProfiler_h_
|
||||
#define utility_UnwindAssemblyProfiler_h_
|
||||
#ifndef utility_UnwindAssembly_h_
|
||||
#define utility_UnwindAssembly_h_
|
||||
|
||||
#include "lldb/lldb-private.h"
|
||||
#include "lldb/Core/PluginInterface.h"
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
class UnwindAssemblyProfiler :
|
||||
class UnwindAssembly :
|
||||
public PluginInterface
|
||||
{
|
||||
public:
|
||||
static UnwindAssemblyProfiler*
|
||||
static UnwindAssembly*
|
||||
FindPlugin (const ArchSpec &arch);
|
||||
|
||||
virtual
|
||||
~UnwindAssemblyProfiler();
|
||||
~UnwindAssembly();
|
||||
|
||||
virtual bool
|
||||
GetNonCallSiteUnwindPlanFromAssembly (AddressRange& func,
|
||||
|
@ -43,13 +43,13 @@ public:
|
|||
Address& first_non_prologue_insn) = 0;
|
||||
|
||||
protected:
|
||||
UnwindAssemblyProfiler();
|
||||
UnwindAssembly();
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN (UnwindAssemblyProfiler);
|
||||
DISALLOW_COPY_AND_ASSIGN (UnwindAssembly);
|
||||
};
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif //utility_UnwindAssemblyProfiler_h_
|
||||
#endif //utility_UnwindAssembly_h_
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ class Type;
|
|||
class TypeList;
|
||||
class UUID;
|
||||
class Unwind;
|
||||
class UnwindAssemblyProfiler;
|
||||
class UnwindAssembly;
|
||||
class UnwindPlan;
|
||||
class UnwindTable;
|
||||
class UserSettingsController;
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace lldb_private
|
|||
typedef bool (*BreakpointHitCallback) (void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
|
||||
typedef bool (*WatchpointHitCallback) (void *baton, StoppointCallbackContext *context, lldb::user_id_t watch_id, uint32_t type);
|
||||
typedef ThreadPlan * (*ThreadPlanShouldStopHereCallback) (ThreadPlan *current_plan, Flags &flags, void *baton);
|
||||
typedef UnwindAssemblyProfiler* (*UnwindAssemblyProfilerCreateInstance) (const ArchSpec &arch);
|
||||
typedef UnwindAssembly* (*UnwindAssemblyCreateInstance) (const ArchSpec &arch);
|
||||
typedef ArchDefaultUnwindPlan* (*ArchDefaultUnwindPlanCreateInstance) (const ArchSpec &arch);
|
||||
typedef ArchVolatileRegs* (*ArchVolatileRegsCreateInstance) (const ArchSpec &arch);
|
||||
typedef int (*ComparisonFunction)(const void *, const void *);
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
261744781168585B005ADD65 /* SBType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 261744771168585B005ADD65 /* SBType.cpp */; };
|
||||
2617447A11685869005ADD65 /* SBType.h in Headers */ = {isa = PBXBuildFile; fileRef = 2617447911685869005ADD65 /* SBType.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
262CFC7711A4510000946C6C /* debugserver in Resources */ = {isa = PBXBuildFile; fileRef = 26CE05A0115C31E50022F371 /* debugserver */; };
|
||||
2630BFA91365F28C0070C534 /* UnwindAssemblyProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2630BFA81365F28C0070C534 /* UnwindAssemblyProfiler.cpp */; };
|
||||
2630BFAF1365F3220070C534 /* ArchDefaultUnwindPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2630BFAD1365F3220070C534 /* ArchDefaultUnwindPlan.cpp */; };
|
||||
2630BFB01365F3220070C534 /* ArchVolatileRegs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2630BFAE1365F3220070C534 /* ArchVolatileRegs.cpp */; };
|
||||
26368A3C126B697600E8659F /* darwin-debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26368A3B126B697600E8659F /* darwin-debug.cpp */; };
|
||||
|
@ -19,6 +18,7 @@
|
|||
263E949F13661AEA00E7D1CE /* UnwindAssembly-x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */; };
|
||||
264A97BF133918BC0017F0BE /* PlatformRemoteGDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A97BD133918BC0017F0BE /* PlatformRemoteGDBServer.cpp */; };
|
||||
264A97C0133918BC0017F0BE /* PlatformRemoteGDBServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 264A97BE133918BC0017F0BE /* PlatformRemoteGDBServer.h */; };
|
||||
264D8D5013661BD7003A368F /* UnwindAssembly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */; };
|
||||
265ABF6310F42EE900531910 /* DebugSymbols.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 265ABF6210F42EE900531910 /* DebugSymbols.framework */; };
|
||||
26651A16133BF9CD005B64B7 /* Opcode.h in Headers */ = {isa = PBXBuildFile; fileRef = 26651A15133BF9CC005B64B7 /* Opcode.h */; };
|
||||
26651A18133BF9E0005B64B7 /* Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26651A17133BF9DF005B64B7 /* Opcode.cpp */; };
|
||||
|
@ -634,8 +634,6 @@
|
|||
261B5A5311C3F2AD00AABD0A /* SharingPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharingPtr.h; path = include/lldb/Utility/SharingPtr.h; sourceTree = "<group>"; };
|
||||
26217930133BC8640083B112 /* lldb-private-types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-private-types.h"; path = "include/lldb/lldb-private-types.h"; sourceTree = "<group>"; };
|
||||
26217932133BCB850083B112 /* lldb-private-enumerations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-private-enumerations.h"; path = "include/lldb/lldb-private-enumerations.h"; sourceTree = "<group>"; };
|
||||
2630BFA81365F28C0070C534 /* UnwindAssemblyProfiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindAssemblyProfiler.cpp; path = source/Target/UnwindAssemblyProfiler.cpp; sourceTree = "<group>"; };
|
||||
2630BFAA1365F2BA0070C534 /* UnwindAssemblyProfiler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UnwindAssemblyProfiler.h; path = include/lldb/Target/UnwindAssemblyProfiler.h; sourceTree = "<group>"; };
|
||||
2630BFAB1365F3140070C534 /* ArchDefaultUnwindPlan.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ArchDefaultUnwindPlan.h; path = include/lldb/Target/ArchDefaultUnwindPlan.h; sourceTree = "<group>"; };
|
||||
2630BFAC1365F3140070C534 /* ArchVolatileRegs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ArchVolatileRegs.h; path = include/lldb/Target/ArchVolatileRegs.h; sourceTree = "<group>"; };
|
||||
2630BFAD1365F3220070C534 /* ArchDefaultUnwindPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArchDefaultUnwindPlan.cpp; path = source/Target/ArchDefaultUnwindPlan.cpp; sourceTree = "<group>"; };
|
||||
|
@ -657,6 +655,8 @@
|
|||
264A97BE133918BC0017F0BE /* PlatformRemoteGDBServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformRemoteGDBServer.h; path = "gdb-server/PlatformRemoteGDBServer.h"; sourceTree = "<group>"; };
|
||||
264AD83711095BA600E0B039 /* CommandObjectLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectLog.cpp; path = source/Commands/CommandObjectLog.cpp; sourceTree = "<group>"; };
|
||||
264AD83911095BBD00E0B039 /* CommandObjectLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectLog.h; path = source/Commands/CommandObjectLog.h; sourceTree = "<group>"; };
|
||||
264D8D4E13661BCC003A368F /* UnwindAssembly.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UnwindAssembly.h; path = include/lldb/Target/UnwindAssembly.h; sourceTree = "<group>"; };
|
||||
264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindAssembly.cpp; path = source/Target/UnwindAssembly.cpp; sourceTree = "<group>"; };
|
||||
26579F68126A25920007C5CB /* darwin-debug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "darwin-debug"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
265ABF6210F42EE900531910 /* DebugSymbols.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DebugSymbols.framework; path = /System/Library/PrivateFrameworks/DebugSymbols.framework; sourceTree = "<absolute>"; };
|
||||
265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = debugserver.xcodeproj; path = tools/debugserver/debugserver.xcodeproj; sourceTree = "<group>"; };
|
||||
|
@ -2340,8 +2340,8 @@
|
|||
4C00986F11500B4300F316B0 /* UnixSignals.h */,
|
||||
4C00987011500B4300F316B0 /* UnixSignals.cpp */,
|
||||
26E3EEBD11A9870400FBADB6 /* Unwind.h */,
|
||||
2630BFAA1365F2BA0070C534 /* UnwindAssemblyProfiler.h */,
|
||||
2630BFA81365F28C0070C534 /* UnwindAssemblyProfiler.cpp */,
|
||||
264D8D4E13661BCC003A368F /* UnwindAssembly.h */,
|
||||
264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */,
|
||||
);
|
||||
name = Target;
|
||||
sourceTree = "<group>";
|
||||
|
@ -3224,13 +3224,13 @@
|
|||
26A7A035135E6E4200FB369E /* NamedOptionValue.cpp in Sources */,
|
||||
9A22A161135E30370024DDC3 /* EmulateInstructionARM.cpp in Sources */,
|
||||
9A22A163135E30370024DDC3 /* EmulationStateARM.cpp in Sources */,
|
||||
2630BFA91365F28C0070C534 /* UnwindAssemblyProfiler.cpp in Sources */,
|
||||
2630BFAF1365F3220070C534 /* ArchDefaultUnwindPlan.cpp in Sources */,
|
||||
2630BFB01365F3220070C534 /* ArchVolatileRegs.cpp in Sources */,
|
||||
2692BA15136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp in Sources */,
|
||||
2692BA1F136614D800F9E14D /* ArchDefaultUnwindPlan-x86.cpp in Sources */,
|
||||
2692BA231366150100F9E14D /* ArchVolatileRegs-x86.cpp in Sources */,
|
||||
263E949F13661AEA00E7D1CE /* UnwindAssembly-x86.cpp in Sources */,
|
||||
264D8D5013661BD7003A368F /* UnwindAssembly.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -1558,11 +1558,11 @@ PluginManager::GetSymbolVendorCreateCallbackForPluginName (const char *name)
|
|||
}
|
||||
|
||||
|
||||
#pragma mark UnwindAssemblyProfiler
|
||||
#pragma mark UnwindAssembly
|
||||
|
||||
struct UnwindAssemblyProfilerInstance
|
||||
struct UnwindAssemblyInstance
|
||||
{
|
||||
UnwindAssemblyProfilerInstance() :
|
||||
UnwindAssemblyInstance() :
|
||||
name(),
|
||||
description(),
|
||||
create_callback(NULL)
|
||||
|
@ -1571,22 +1571,22 @@ struct UnwindAssemblyProfilerInstance
|
|||
|
||||
std::string name;
|
||||
std::string description;
|
||||
UnwindAssemblyProfilerCreateInstance create_callback;
|
||||
UnwindAssemblyCreateInstance create_callback;
|
||||
};
|
||||
|
||||
typedef std::vector<UnwindAssemblyProfilerInstance> UnwindAssemblyProfilerInstances;
|
||||
typedef std::vector<UnwindAssemblyInstance> UnwindAssemblyInstances;
|
||||
|
||||
static Mutex &
|
||||
GetUnwindAssemblyProfilerMutex ()
|
||||
GetUnwindAssemblyMutex ()
|
||||
{
|
||||
static Mutex g_instances_mutex (Mutex::eMutexTypeRecursive);
|
||||
return g_instances_mutex;
|
||||
}
|
||||
|
||||
static UnwindAssemblyProfilerInstances &
|
||||
GetUnwindAssemblyProfilerInstances ()
|
||||
static UnwindAssemblyInstances &
|
||||
GetUnwindAssemblyInstances ()
|
||||
{
|
||||
static UnwindAssemblyProfilerInstances g_instances;
|
||||
static UnwindAssemblyInstances g_instances;
|
||||
return g_instances;
|
||||
}
|
||||
|
||||
|
@ -1595,32 +1595,32 @@ PluginManager::RegisterPlugin
|
|||
(
|
||||
const char *name,
|
||||
const char *description,
|
||||
UnwindAssemblyProfilerCreateInstance create_callback
|
||||
UnwindAssemblyCreateInstance create_callback
|
||||
)
|
||||
{
|
||||
if (create_callback)
|
||||
{
|
||||
UnwindAssemblyProfilerInstance instance;
|
||||
UnwindAssemblyInstance instance;
|
||||
assert (name && name[0]);
|
||||
instance.name = name;
|
||||
if (description && description[0])
|
||||
instance.description = description;
|
||||
instance.create_callback = create_callback;
|
||||
Mutex::Locker locker (GetUnwindAssemblyProfilerMutex ());
|
||||
GetUnwindAssemblyProfilerInstances ().push_back (instance);
|
||||
Mutex::Locker locker (GetUnwindAssemblyMutex ());
|
||||
GetUnwindAssemblyInstances ().push_back (instance);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginManager::UnregisterPlugin (UnwindAssemblyProfilerCreateInstance create_callback)
|
||||
PluginManager::UnregisterPlugin (UnwindAssemblyCreateInstance create_callback)
|
||||
{
|
||||
if (create_callback)
|
||||
{
|
||||
Mutex::Locker locker (GetUnwindAssemblyProfilerMutex ());
|
||||
UnwindAssemblyProfilerInstances &instances = GetUnwindAssemblyProfilerInstances ();
|
||||
Mutex::Locker locker (GetUnwindAssemblyMutex ());
|
||||
UnwindAssemblyInstances &instances = GetUnwindAssemblyInstances ();
|
||||
|
||||
UnwindAssemblyProfilerInstances::iterator pos, end = instances.end();
|
||||
UnwindAssemblyInstances::iterator pos, end = instances.end();
|
||||
for (pos = instances.begin(); pos != end; ++ pos)
|
||||
{
|
||||
if (pos->create_callback == create_callback)
|
||||
|
@ -1633,27 +1633,27 @@ PluginManager::UnregisterPlugin (UnwindAssemblyProfilerCreateInstance create_cal
|
|||
return false;
|
||||
}
|
||||
|
||||
UnwindAssemblyProfilerCreateInstance
|
||||
PluginManager::GetUnwindAssemblyProfilerCreateCallbackAtIndex (uint32_t idx)
|
||||
UnwindAssemblyCreateInstance
|
||||
PluginManager::GetUnwindAssemblyCreateCallbackAtIndex (uint32_t idx)
|
||||
{
|
||||
Mutex::Locker locker (GetUnwindAssemblyProfilerMutex ());
|
||||
UnwindAssemblyProfilerInstances &instances = GetUnwindAssemblyProfilerInstances ();
|
||||
Mutex::Locker locker (GetUnwindAssemblyMutex ());
|
||||
UnwindAssemblyInstances &instances = GetUnwindAssemblyInstances ();
|
||||
if (idx < instances.size())
|
||||
return instances[idx].create_callback;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
UnwindAssemblyProfilerCreateInstance
|
||||
PluginManager::GetUnwindAssemblyProfilerCreateCallbackForPluginName (const char *name)
|
||||
UnwindAssemblyCreateInstance
|
||||
PluginManager::GetUnwindAssemblyCreateCallbackForPluginName (const char *name)
|
||||
{
|
||||
if (name && name[0])
|
||||
{
|
||||
llvm::StringRef name_sref(name);
|
||||
Mutex::Locker locker (GetUnwindAssemblyProfilerMutex ());
|
||||
UnwindAssemblyProfilerInstances &instances = GetUnwindAssemblyProfilerInstances ();
|
||||
Mutex::Locker locker (GetUnwindAssemblyMutex ());
|
||||
UnwindAssemblyInstances &instances = GetUnwindAssemblyInstances ();
|
||||
|
||||
UnwindAssemblyProfilerInstances::iterator pos, end = instances.end();
|
||||
UnwindAssemblyInstances::iterator pos, end = instances.end();
|
||||
for (pos = instances.begin(); pos != end; ++ pos)
|
||||
{
|
||||
if (name_sref.equals (pos->name))
|
||||
|
|
|
@ -104,4 +104,4 @@ private:
|
|||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // liblldb_UnwindAssemblyProfiler_x86_h_
|
||||
#endif // liblldb_UnwindAssembly_x86_h_
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "lldb/Target/RegisterContext.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Target/Target.h"
|
||||
#include "lldb/Target/UnwindAssemblyProfiler.h"
|
||||
#include "lldb/Target/UnwindAssembly.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
@ -50,7 +50,7 @@ UnwindAssemblyInstEmulation::FirstNonPrologueInsn (AddressRange& func, Target& t
|
|||
return false;
|
||||
}
|
||||
|
||||
UnwindAssemblyProfiler *
|
||||
UnwindAssembly *
|
||||
UnwindAssemblyInstEmulation::CreateInstance (const ArchSpec &arch)
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#define liblldb_UnwindAssemblyInstEmulation_h_
|
||||
|
||||
#include "lldb/lldb-private.h"
|
||||
#include "lldb/Target/UnwindAssemblyProfiler.h"
|
||||
#include "lldb/Target/UnwindAssembly.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
|
||||
class UnwindAssemblyInstEmulation : public lldb_private::UnwindAssemblyProfiler
|
||||
class UnwindAssemblyInstEmulation : public lldb_private::UnwindAssembly
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
|||
lldb_private::Thread* thread,
|
||||
lldb_private::Address& first_non_prologue_insn);
|
||||
|
||||
static lldb_private::UnwindAssemblyProfiler *
|
||||
static lldb_private::UnwindAssembly *
|
||||
CreateInstance (const lldb_private::ArchSpec &arch);
|
||||
|
||||
|
||||
|
@ -72,7 +72,7 @@ private:
|
|||
|
||||
// Call CreateInstance to get an instance of this class
|
||||
UnwindAssemblyInstEmulation(int cpu) :
|
||||
lldb_private::UnwindAssemblyProfiler(), m_cpu(cpu)
|
||||
lldb_private::UnwindAssembly(), m_cpu(cpu)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "lldb/Target/RegisterContext.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Target/Target.h"
|
||||
#include "lldb/Target/UnwindAssemblyProfiler.h"
|
||||
#include "lldb/Target/UnwindAssembly.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
@ -839,7 +839,7 @@ UnwindAssembly_x86::FirstNonPrologueInsn (AddressRange& func, Target& target, Th
|
|||
return asm_parse.find_first_non_prologue_insn (first_non_prologue_insn);
|
||||
}
|
||||
|
||||
UnwindAssemblyProfiler *
|
||||
UnwindAssembly *
|
||||
UnwindAssembly_x86::CreateInstance (const ArchSpec &arch)
|
||||
{
|
||||
const llvm::Triple::ArchType cpu = arch.GetMachine ();
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
#define liblldb_UnwindAssembly_x86_h_
|
||||
|
||||
#include "lldb/lldb-private.h"
|
||||
#include "lldb/Target/UnwindAssemblyProfiler.h"
|
||||
#include "lldb/Target/UnwindAssembly.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
|
||||
namespace lldb_private {
|
||||
|
||||
class UnwindAssembly_x86 : public lldb_private::UnwindAssemblyProfiler
|
||||
class UnwindAssembly_x86 : public lldb_private::UnwindAssembly
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
|||
virtual bool
|
||||
FirstNonPrologueInsn (AddressRange& func, lldb_private::Target& target, lldb_private::Thread* thread, Address& first_non_prologue_insn);
|
||||
|
||||
static lldb_private::UnwindAssemblyProfiler *
|
||||
static lldb_private::UnwindAssembly *
|
||||
CreateInstance (const lldb_private::ArchSpec &arch);
|
||||
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
|||
|
||||
private:
|
||||
UnwindAssembly_x86(int cpu) :
|
||||
lldb_private::UnwindAssemblyProfiler(), m_cpu(cpu) { } // Call CreateInstance instead.
|
||||
lldb_private::UnwindAssembly(), m_cpu(cpu) { } // Call CreateInstance instead.
|
||||
|
||||
int m_cpu;
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "lldb/Target/ArchDefaultUnwindPlan.h"
|
||||
#include "lldb/Target/Thread.h"
|
||||
#include "lldb/Target/Target.h"
|
||||
#include "lldb/Target/UnwindAssemblyProfiler.h"
|
||||
#include "lldb/Target/UnwindAssembly.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
@ -26,7 +26,7 @@ using namespace lldb_private;
|
|||
FuncUnwinders::FuncUnwinders
|
||||
(
|
||||
UnwindTable& unwind_table,
|
||||
UnwindAssemblyProfiler *assembly_profiler,
|
||||
UnwindAssembly *assembly_profiler,
|
||||
AddressRange range
|
||||
) :
|
||||
m_unwind_table(unwind_table),
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "lldb/Symbol/FuncUnwinders.h"
|
||||
#include "lldb/Symbol/SymbolContext.h"
|
||||
#include "lldb/Symbol/DWARFCallFrameInfo.h"
|
||||
#include "lldb/Target/UnwindAssemblyProfiler.h"
|
||||
#include "lldb/Target/UnwindAssembly.h"
|
||||
|
||||
// There is one UnwindTable object per ObjectFile.
|
||||
// It contains a list of Unwind objects -- one per function, populated lazily -- for the ObjectFile.
|
||||
|
@ -57,7 +57,7 @@ UnwindTable::Initialize ()
|
|||
ArchSpec arch;
|
||||
if (m_object_file.GetArchitecture (arch))
|
||||
{
|
||||
m_assembly_profiler = UnwindAssemblyProfiler::FindPlugin (arch);
|
||||
m_assembly_profiler = UnwindAssembly::FindPlugin (arch);
|
||||
m_initialized = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//===-- UnwindAssemblyProfiler.cpp ------------------------------*- C++ -*-===//
|
||||
//===-- UnwindAssembly.cpp ------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
|
@ -10,31 +10,31 @@
|
|||
#include "lldb/lldb-private.h"
|
||||
#include "lldb/Core/PluginManager.h"
|
||||
#include "lldb/Core/PluginInterface.h"
|
||||
#include "lldb/Target/UnwindAssemblyProfiler.h"
|
||||
#include "lldb/Target/UnwindAssembly.h"
|
||||
|
||||
using namespace lldb;
|
||||
using namespace lldb_private;
|
||||
|
||||
UnwindAssemblyProfiler*
|
||||
UnwindAssemblyProfiler::FindPlugin (const ArchSpec &arch)
|
||||
UnwindAssembly*
|
||||
UnwindAssembly::FindPlugin (const ArchSpec &arch)
|
||||
{
|
||||
UnwindAssemblyProfilerCreateInstance create_callback;
|
||||
UnwindAssemblyCreateInstance create_callback;
|
||||
|
||||
for (uint32_t idx = 0;
|
||||
(create_callback = PluginManager::GetUnwindAssemblyProfilerCreateCallbackAtIndex(idx)) != NULL;
|
||||
(create_callback = PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(idx)) != NULL;
|
||||
++idx)
|
||||
{
|
||||
std::auto_ptr<UnwindAssemblyProfiler> assembly_profiler_ap (create_callback (arch));
|
||||
std::auto_ptr<UnwindAssembly> assembly_profiler_ap (create_callback (arch));
|
||||
if (assembly_profiler_ap.get ())
|
||||
return assembly_profiler_ap.release ();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
UnwindAssemblyProfiler::UnwindAssemblyProfiler ()
|
||||
UnwindAssembly::UnwindAssembly ()
|
||||
{
|
||||
}
|
||||
|
||||
UnwindAssemblyProfiler::~UnwindAssemblyProfiler ()
|
||||
UnwindAssembly::~UnwindAssembly ()
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue