Files
llvm/lldb/source/Target/ABI.cpp
Greg Clayton 31f1d2f535 Moved all code from ArchDefaultUnwindPlan and ArchVolatileRegs into their
respective ABI plugins as they were plug-ins that supplied ABI specfic info.

Also hookep up the UnwindAssemblyInstEmulation so that it can generate the
unwind plans for ARM.

Changed the way ABI plug-ins are handed out when you get an instance from
the plug-in manager. They used to return pointers that would be mananged
individually by each client that requested them, but now they are handed out
as shared pointers since there is no state in the ABI objects, they can be
shared.

llvm-svn: 131193
2011-05-11 18:39:18 +00:00

48 lines
1.2 KiB
C++

//===-- ABI.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/Target/ABI.h"
#include "lldb/Core/PluginManager.h"
using namespace lldb;
using namespace lldb_private;
ABISP
ABI::FindPlugin (const ArchSpec &arch)
{
ABISP abi_sp;
ABICreateInstance create_callback;
for (uint32_t idx = 0;
(create_callback = PluginManager::GetABICreateCallbackAtIndex(idx)) != NULL;
++idx)
{
abi_sp = create_callback(arch);
if (abi_sp)
return abi_sp;
}
abi_sp.reset();
return abi_sp;
}
//----------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------
ABI::ABI()
{
}
//----------------------------------------------------------------------
// Destructor
//----------------------------------------------------------------------
ABI::~ABI()
{
}