diff options
| author | Jason Molenda <jmolenda@apple.com> | 2010-09-22 07:37:07 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2010-09-22 07:37:07 +0000 |
| commit | 0c7cc85649dc2f07676e7c10d3bc377fafd1bc90 (patch) | |
| tree | 830b042fa8ea14771800b4dfe878651ea6ac43b6 | |
| parent | 415624cf3f2b6a161499bff39cb6f5ad08ee992e (diff) | |
| download | bcm5719-llvm-0c7cc85649dc2f07676e7c10d3bc377fafd1bc90.tar.gz bcm5719-llvm-0c7cc85649dc2f07676e7c10d3bc377fafd1bc90.zip | |
Add a new ArchVolatileRegs plugin class to identify
whether a given register number is treated as volatile
or not for a given architecture/platform.
approx 450 lines of boilerplate, 50 lines of actual code. :)
llvm-svn: 114537
| -rw-r--r-- | lldb/include/lldb/Core/PluginManager.h | 17 | ||||
| -rw-r--r-- | lldb/include/lldb/Utility/ArchVolatileRegs.h | 53 | ||||
| -rw-r--r-- | lldb/include/lldb/lldb-forward.h | 1 | ||||
| -rw-r--r-- | lldb/include/lldb/lldb-private-interfaces.h | 1 | ||||
| -rw-r--r-- | lldb/lldb.xcodeproj/project.pbxproj | 12 | ||||
| -rw-r--r-- | lldb/source/Core/PluginManager.cpp | 119 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.cpp | 168 | ||||
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.h | 76 | ||||
| -rw-r--r-- | lldb/source/Utility/ArchVolatileRegs.cpp | 40 | ||||
| -rw-r--r-- | lldb/source/lldb.cpp | 5 |
10 files changed, 490 insertions, 2 deletions
diff --git a/lldb/include/lldb/Core/PluginManager.h b/lldb/include/lldb/Core/PluginManager.h index 9225140e42d..00bbf4010d0 100644 --- a/lldb/include/lldb/Core/PluginManager.h +++ b/lldb/include/lldb/Core/PluginManager.h @@ -213,6 +213,23 @@ public: static ArchDefaultUnwindPlanCreateInstance GetArchDefaultUnwindPlanCreateCallbackForPluginName (const char *name); + //------------------------------------------------------------------ + // ArchVolatileRegs + //------------------------------------------------------------------ + static bool + RegisterPlugin (const char *name, + const char *description, + ArchVolatileRegsCreateInstance create_callback); + + static bool + UnregisterPlugin (ArchVolatileRegsCreateInstance create_callback); + + static ArchVolatileRegsCreateInstance + GetArchVolatileRegsCreateCallbackAtIndex (uint32_t idx); + + static ArchVolatileRegsCreateInstance + GetArchVolatileRegsCreateCallbackForPluginName (const char *name); + }; diff --git a/lldb/include/lldb/Utility/ArchVolatileRegs.h b/lldb/include/lldb/Utility/ArchVolatileRegs.h new file mode 100644 index 00000000000..914a786244a --- /dev/null +++ b/lldb/include/lldb/Utility/ArchVolatileRegs.h @@ -0,0 +1,53 @@ +//===---------------------ArchVolatileRegs.h----- ---------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef utility_ArchVolatileRegs_h_ +#define utility_ArchVolatileRegs_h_ + +#include "lldb-private.h" +#include "lldb/Core/PluginInterface.h" + +namespace lldb_private { + +class ArchVolatileRegs : + public PluginInterface +{ +public: + + virtual + ~ArchVolatileRegs(); + + // Given a register number (in the eRegisterKindLLDB register numbering + // scheme), returns true if the register is defined to be "volatile" in + // this architecture -- that is, a function is not required to preserve + // the contents of the register. + // If r8 is defined to be volatile, it means that a function can put + // values in that register without saving the previous contents. + // If r8 is defined to be non-volatile (preseved), a function must save + // the value in the register before it is used. + + // The thread reference is needed to get a RegisterContext to look up by + // register names. + + virtual bool + RegisterIsVolatile (lldb_private::Thread& thread, uint32_t regnum) = 0; + + static ArchVolatileRegs* + FindPlugin (const ArchSpec &arch); + +protected: + ArchVolatileRegs(); +private: + DISALLOW_COPY_AND_ASSIGN (ArchVolatileRegs); +}; + +} // namespace lldb_private + +#endif //utility_ArchVolatileRegs_h_ + diff --git a/lldb/include/lldb/lldb-forward.h b/lldb/include/lldb/lldb-forward.h index ca5ebb9d389..bae6c4ac51e 100644 --- a/lldb/include/lldb/lldb-forward.h +++ b/lldb/include/lldb/lldb-forward.h @@ -23,6 +23,7 @@ class AddressRange; class AddressResolver; class ArchSpec; class ArchDefaultUnwindPlan; +class ArchVolatileRegs; class Args; class Baton; class Block; diff --git a/lldb/include/lldb/lldb-private-interfaces.h b/lldb/include/lldb/lldb-private-interfaces.h index 592ba75ac2f..ed6b08421f9 100644 --- a/lldb/include/lldb/lldb-private-interfaces.h +++ b/lldb/include/lldb/lldb-private-interfaces.h @@ -30,6 +30,7 @@ namespace lldb_private typedef ThreadPlan * (*ThreadPlanShouldStopHereCallback) (ThreadPlan *current_plan, Flags &flags, void *baton); typedef UnwindAssemblyProfiler* (*UnwindAssemblyProfilerCreateInstance) (const ArchSpec &arch); typedef ArchDefaultUnwindPlan* (*ArchDefaultUnwindPlanCreateInstance) (const ArchSpec &arch); + typedef ArchVolatileRegs* (*ArchVolatileRegsCreateInstance) (const ArchSpec &arch); } // namespace lldb_private #endif // #if defined(__cplusplus) diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj index 23839b5ff4d..752dc86fc99 100644 --- a/lldb/lldb.xcodeproj/project.pbxproj +++ b/lldb/lldb.xcodeproj/project.pbxproj @@ -369,6 +369,9 @@ 961FAC19123605A200F93A47 /* ArchDefaultUnwindPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FAC18123605A200F93A47 /* ArchDefaultUnwindPlan.cpp */; }; 961FAC1E12360C7D00F93A47 /* ArchDefaultUnwindPlan-x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FAC1C12360C7D00F93A47 /* ArchDefaultUnwindPlan-x86.cpp */; }; 961FAC1F12360C7D00F93A47 /* ArchDefaultUnwindPlan-x86.h in Headers */ = {isa = PBXBuildFile; fileRef = 961FAC1D12360C7D00F93A47 /* ArchDefaultUnwindPlan-x86.h */; }; + 96A6D9C61249D96F00250B38 /* ArchVolatileRegs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 96A6D9C51249D96F00250B38 /* ArchVolatileRegs.cpp */; }; + 96A6D9C91249D98800250B38 /* ArchVolatileRegs-x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 96A6D9C71249D98800250B38 /* ArchVolatileRegs-x86.cpp */; }; + 96A6D9CA1249D98800250B38 /* ArchVolatileRegs-x86.h in Headers */ = {isa = PBXBuildFile; fileRef = 96A6D9C81249D98800250B38 /* ArchVolatileRegs-x86.h */; }; 9A19A6AF1163BBB200E0D453 /* SBValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A19A6A51163BB7E00E0D453 /* SBValue.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9A19A6B01163BBB300E0D453 /* SBValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A19A6AD1163BB9800E0D453 /* SBValue.cpp */; }; 9A357583116CFDEE00E8ED2F /* SBValueList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A357582116CFDEE00E8ED2F /* SBValueList.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1024,6 +1027,9 @@ 9654F7B91197DA3F00F72B43 /* RemoteUnwindProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteUnwindProfile.h; sourceTree = "<group>"; }; 9654F7BA1197DA3F00F72B43 /* unw_getcontext.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = unw_getcontext.s; sourceTree = "<group>"; }; 9654F7BD1197DA3F00F72B43 /* UnwindCursor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = UnwindCursor.hpp; sourceTree = "<group>"; }; + 96A6D9C51249D96F00250B38 /* ArchVolatileRegs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArchVolatileRegs.cpp; path = source/Utility/ArchVolatileRegs.cpp; sourceTree = "<group>"; }; + 96A6D9C71249D98800250B38 /* ArchVolatileRegs-x86.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ArchVolatileRegs-x86.cpp"; path = "Utility/ArchVolatileRegs-x86.cpp"; sourceTree = "<group>"; }; + 96A6D9C81249D98800250B38 /* ArchVolatileRegs-x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ArchVolatileRegs-x86.h"; path = "Utility/ArchVolatileRegs-x86.h"; sourceTree = "<group>"; }; 9A19A6A51163BB7E00E0D453 /* SBValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBValue.h; path = include/lldb/API/SBValue.h; sourceTree = "<group>"; }; 9A19A6AD1163BB9800E0D453 /* SBValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBValue.cpp; path = source/API/SBValue.cpp; sourceTree = "<group>"; }; 9A2771FB1135A35C00E6ADB6 /* ScriptInterpreterNone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScriptInterpreterNone.h; path = include/lldb/Interpreter/ScriptInterpreterNone.h; sourceTree = "<group>"; }; @@ -1554,6 +1560,7 @@ 2682F168115ED9C800CCFF99 /* Utility */ = { isa = PBXGroup; children = ( + 96A6D9C51249D96F00250B38 /* ArchVolatileRegs.cpp */, 961FAC18123605A200F93A47 /* ArchDefaultUnwindPlan.cpp */, 961FABE41235F15900F93A47 /* UnwindAssemblyProfiler.cpp */, 264723A511FA076E00DE380C /* CleanUp.h */, @@ -1583,6 +1590,8 @@ 26B4666E11A2080F00CF6220 /* Utility */ = { isa = PBXGroup; children = ( + 96A6D9C71249D98800250B38 /* ArchVolatileRegs-x86.cpp */, + 96A6D9C81249D98800250B38 /* ArchVolatileRegs-x86.h */, 961FAC1C12360C7D00F93A47 /* ArchDefaultUnwindPlan-x86.cpp */, 961FAC1D12360C7D00F93A47 /* ArchDefaultUnwindPlan-x86.h */, 961FABE81235F26800F93A47 /* UnwindAssemblyProfiler-x86.cpp */, @@ -2285,6 +2294,7 @@ 2618D7901240115500F2B8FE /* SectionLoadList.h in Headers */, 2618D959124056C700F2B8FE /* NameToDIE.h in Headers */, 26C72C94124322890068DC16 /* SBStream.h in Headers */, + 96A6D9CA1249D98800250B38 /* ArchVolatileRegs-x86.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2750,6 +2760,8 @@ 2618D7921240116900F2B8FE /* SectionLoadList.cpp in Sources */, 2618D9EB12406FE600F2B8FE /* NameToDIE.cpp in Sources */, 26C72C961243229A0068DC16 /* SBStream.cpp in Sources */, + 96A6D9C61249D96F00250B38 /* ArchVolatileRegs.cpp in Sources */, + 96A6D9C91249D98800250B38 /* ArchVolatileRegs-x86.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp index a8242ce642c..0207c4b4d45 100644 --- a/lldb/source/Core/PluginManager.cpp +++ b/lldb/source/Core/PluginManager.cpp @@ -1371,4 +1371,123 @@ PluginManager::GetArchDefaultUnwindPlanCreateCallbackForPluginName (const char * return NULL; } +#pragma mark ArchVolatileRegs + +struct ArchVolatileRegsInstance +{ + ArchVolatileRegsInstance() : + name(), + description(), + create_callback(NULL) + { + } + + std::string name; + std::string description; + ArchVolatileRegsCreateInstance create_callback; +}; + +typedef std::vector<ArchVolatileRegsInstance> ArchVolatileRegsInstances; + +static bool +AccessArchVolatileRegsInstances (PluginAction action, ArchVolatileRegsInstance &instance, uint32_t index) +{ + static ArchVolatileRegsInstances g_plugin_instances; + + switch (action) + { + case ePluginRegisterInstance: + if (instance.create_callback) + { + g_plugin_instances.push_back (instance); + return true; + } + break; + + case ePluginUnregisterInstance: + if (instance.create_callback) + { + ArchVolatileRegsInstances::iterator pos, end = g_plugin_instances.end(); + for (pos = g_plugin_instances.begin(); pos != end; ++ pos) + { + if (pos->create_callback == instance.create_callback) + { + g_plugin_instances.erase(pos); + return true; + } + } + } + break; + + case ePluginGetInstanceAtIndex: + if (index < g_plugin_instances.size()) + { + instance = g_plugin_instances[index]; + return true; + } + break; + + default: + break; + } + return false; +} + +bool +PluginManager::RegisterPlugin +( + const char *name, + const char *description, + ArchVolatileRegsCreateInstance create_callback +) +{ + if (create_callback) + { + ArchVolatileRegsInstance instance; + assert (name && name[0]); + instance.name = name; + if (description && description[0]) + instance.description = description; + instance.create_callback = create_callback; + return AccessArchVolatileRegsInstances (ePluginRegisterInstance, instance, 0); + } + return false; +} + +bool +PluginManager::UnregisterPlugin (ArchVolatileRegsCreateInstance create_callback) +{ + if (create_callback) + { + ArchVolatileRegsInstance instance; + instance.create_callback = create_callback; + return AccessArchVolatileRegsInstances (ePluginUnregisterInstance, instance, 0); + } + return false; +} + +ArchVolatileRegsCreateInstance +PluginManager::GetArchVolatileRegsCreateCallbackAtIndex (uint32_t idx) +{ + ArchVolatileRegsInstance instance; + if (AccessArchVolatileRegsInstances (ePluginGetInstanceAtIndex, instance, idx)) + return instance.create_callback; + return NULL; +} + +ArchVolatileRegsCreateInstance +PluginManager::GetArchVolatileRegsCreateCallbackForPluginName (const char *name) +{ + if (name && name[0]) + { + ArchVolatileRegsInstance instance; + std::string ss_name(name); + for (uint32_t idx = 0; AccessArchVolatileRegsInstances (ePluginGetInstanceAtIndex, instance, idx); ++idx) + { + if (instance.name == ss_name) + return instance.create_callback; + } + } + return NULL; +} diff --git a/lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.cpp b/lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.cpp new file mode 100644 index 00000000000..59b6ca0f913 --- /dev/null +++ b/lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.cpp @@ -0,0 +1,168 @@ +//===-- ArchVolatileRegs-x86.cpp --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "ArchVolatileRegs-x86.h" + +#include "lldb/lldb-private.h" +#include "lldb/Utility/ArchVolatileRegs.h" +#include "lldb/Core/ArchSpec.h" +#include "lldb/Core/PluginManager.h" +#include "lldb/lldb-enumerations.h" +#include "lldb/Target/Thread.h" +#include "lldb/Target/RegisterContext.h" +#include <set> + +using namespace lldb; +using namespace lldb_private; + +bool +ArchVolatileRegs_x86::RegisterIsVolatile (Thread& thread, uint32_t regnum) +{ + initialize_regset (thread); + if (m_non_volatile_regs.find (regnum) == m_non_volatile_regs.end()) + return true; + else + return false; +} + +lldb_private::ArchVolatileRegs * +ArchVolatileRegs_x86::CreateInstance (const lldb_private::ArchSpec &arch) +{ + uint32_t cpu = arch.GetCPUType (); + if (cpu != CPU_TYPE_X86_64 && cpu != CPU_TYPE_I386) + return NULL; + + return new ArchVolatileRegs_x86 (cpu); +} + +ArchVolatileRegs_x86::ArchVolatileRegs_x86(int cpu) : + lldb_private::ArchVolatileRegs(), + m_cpu(cpu), + m_non_volatile_regs() +{ +} + +void + +ArchVolatileRegs_x86::initialize_regset(Thread& thread) +{ + if (m_non_volatile_regs.size() > 0) + return; + + + RegisterContext *rctx = thread.GetRegisterContext(); + const RegisterInfo *ri; + + const char *x86_64_regnames[] = { "rbx", + "rsp", + "rbp", + "r12", + "r13", + "r14", + "r15", + "rip" }; + + const char *i386_regnames[] = { "ebx", + "ebp", + "esi", + "edi", + "esp", + "eip" }; + + + const char **names; + int namecount; + if (m_cpu == CPU_TYPE_X86_64) + { + names = x86_64_regnames; + namecount = sizeof (x86_64_regnames) / sizeof (char *); + } + else + { + names = i386_regnames; + namecount = sizeof (i386_regnames) / sizeof (char *); + } + + for (int i = 0; i < namecount; i++) + { + ri = rctx->GetRegisterInfoByName (names[i]); + if (ri) + m_non_volatile_regs.insert (ri->kinds[eRegisterKindLLDB]); + } +} + + +//------------------------------------------------------------------ +// PluginInterface protocol in ArchVolatileRegs_x86 +//------------------------------------------------------------------ + +const char * +ArchVolatileRegs_x86::GetPluginName() +{ + return "ArchVolatileRegs_x86"; +} + +const char * +ArchVolatileRegs_x86::GetShortPluginName() +{ + return "archvolatileregs.x86"; +} + + +uint32_t +ArchVolatileRegs_x86::GetPluginVersion() +{ + return 1; +} + +void +ArchVolatileRegs_x86::GetPluginCommandHelp (const char *command, Stream *strm) +{ +} + +Error +ArchVolatileRegs_x86::ExecutePluginCommand (Args &command, Stream *strm) +{ + Error error; + error.SetErrorString("No plug-in command are currently supported."); + return error; +} + +Log * +ArchVolatileRegs_x86::EnablePluginLogging (Stream *strm, Args &command) +{ + return NULL; +} + +void +ArchVolatileRegs_x86::Initialize() +{ + PluginManager::RegisterPlugin (GetPluginNameStatic(), + GetPluginDescriptionStatic(), + CreateInstance); +} + +void +ArchVolatileRegs_x86::Terminate() +{ + PluginManager::UnregisterPlugin (CreateInstance); +} + + +const char * +ArchVolatileRegs_x86::GetPluginNameStatic() +{ + return "ArchVolatileRegs_x86"; +} + +const char * +ArchVolatileRegs_x86::GetPluginDescriptionStatic() +{ + return "i386 and x86_64 architecture volatile register information."; +} diff --git a/lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.h b/lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.h new file mode 100644 index 00000000000..97714b99da4 --- /dev/null +++ b/lldb/source/Plugins/Process/Utility/ArchVolatileRegs-x86.h @@ -0,0 +1,76 @@ +//===-- ArchVolatileRegs-x86.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_ArchVolatileRegs_x86_h_ +#define liblldb_ArchVolatileRegs_x86_h_ + +#include "lldb/lldb-private.h" +#include "lldb/Utility/ArchVolatileRegs.h" +#include <set> + +namespace lldb_private { + +class ArchVolatileRegs_x86 : public lldb_private::ArchVolatileRegs +{ +public: + + ~ArchVolatileRegs_x86 () { } + + bool + RegisterIsVolatile (lldb_private::Thread& thread, uint32_t regnum); + + static lldb_private::ArchVolatileRegs * + CreateInstance (const lldb_private::ArchSpec &arch); + + //------------------------------------------------------------------ + // PluginInterface protocol + //------------------------------------------------------------------ + static void + Initialize(); + + static void + Terminate(); + + static const char * + GetPluginNameStatic(); + + static const char * + GetPluginDescriptionStatic(); + + virtual const char * + GetPluginName(); + + virtual const char * + GetShortPluginName(); + + virtual uint32_t + GetPluginVersion(); + + virtual void + GetPluginCommandHelp (const char *command, lldb_private::Stream *strm); + + virtual lldb_private::Error + ExecutePluginCommand (lldb_private::Args &command, lldb_private::Stream *strm); + + virtual lldb_private::Log * + EnablePluginLogging (lldb_private::Stream *strm, lldb_private::Args &command); + +private: + ArchVolatileRegs_x86(int cpu); // Call CreateInstance instead. + + void initialize_regset(lldb_private::Thread& thread); + + int m_cpu; + std::set<int> m_non_volatile_regs; +}; + + +} // namespace lldb_private + +#endif // liblldb_ArchVolatileRegs_x86_h_ diff --git a/lldb/source/Utility/ArchVolatileRegs.cpp b/lldb/source/Utility/ArchVolatileRegs.cpp new file mode 100644 index 00000000000..041237f51a0 --- /dev/null +++ b/lldb/source/Utility/ArchVolatileRegs.cpp @@ -0,0 +1,40 @@ +//===-- ArchVolatileRegs.cpp ------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb-private.h" +#include "lldb/Core/PluginManager.h" +#include "lldb/Core/PluginInterface.h" +#include "lldb/Utility/ArchVolatileRegs.h" + +using namespace lldb; +using namespace lldb_private; + +ArchVolatileRegs* +ArchVolatileRegs::FindPlugin (const ArchSpec &arch) +{ + ArchVolatileRegsCreateInstance create_callback; + + for (uint32_t idx = 0; + (create_callback = PluginManager::GetArchVolatileRegsCreateCallbackAtIndex(idx)) != NULL; + ++idx) + { + std::auto_ptr<ArchVolatileRegs> default_volatile_regs_ap (create_callback (arch)); + if (default_volatile_regs_ap.get ()) + return default_volatile_regs_ap.release (); + } + return NULL; +} + +ArchVolatileRegs::ArchVolatileRegs () +{ +} + +ArchVolatileRegs::~ArchVolatileRegs () +{ +} diff --git a/lldb/source/lldb.cpp b/lldb/source/lldb.cpp index f3fa18f2fe2..ca6ed724df4 100644 --- a/lldb/source/lldb.cpp +++ b/lldb/source/lldb.cpp @@ -24,6 +24,7 @@ #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h" #include "Plugins/Process/Utility/UnwindAssemblyProfiler-x86.h" #include "Plugins/Process/Utility/ArchDefaultUnwindPlan-x86.h" +#include "Plugins/Process/Utility/ArchVolatileRegs-x86.h" #ifdef __APPLE__ #include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h" @@ -66,7 +67,7 @@ lldb_private::Initialize () SymbolFileDWARFDebugMap::Initialize(); SymbolFileSymtab::Initialize(); UnwindAssemblyProfiler_x86::Initialize(); - ArchDefaultUnwindPlan_x86::Initialize(); + ArchVolatileRegs_x86::Initialize(); #ifdef __APPLE__ ABIMacOSX_i386::Initialize(); @@ -105,7 +106,7 @@ lldb_private::Terminate () SymbolFileDWARFDebugMap::Terminate(); SymbolFileSymtab::Terminate(); UnwindAssemblyProfiler_x86::Terminate(); - ArchDefaultUnwindPlan_x86::Terminate(); + ArchVolatileRegs_x86::Terminate(); #ifdef __APPLE__ DynamicLoaderMacOSXDYLD::Terminate(); |

