Add kalimba as a platform.
This change comprises of additions and some minor changes in order that "kalimba" is listed as a supported platform and that debugging any kalimbas results in PlatformKalimba being associated with the target. The changes are as follows: * The PlatformKalimba implementation itself * A tweak to ArchSpec * .note parsing for Kalimba in ObjectFileELF.cpp * Plugin registration * Makefile additions Change by Matthew Gardiner Minor tweak for cmake and Xcode by Todd Fiala Tested: Ubuntu 14.04 x86_64, clang 3.5-built lldb, all tests pass. MacOSX 10.9.4, Xcode 6.0 Beta 1-built lldb, all tests pass. llvm-svn: 213158
This commit is contained in:
@@ -46,6 +46,7 @@ namespace {
|
||||
const char *const LLDB_NT_OWNER_FREEBSD = "FreeBSD";
|
||||
const char *const LLDB_NT_OWNER_GNU = "GNU";
|
||||
const char *const LLDB_NT_OWNER_NETBSD = "NetBSD";
|
||||
const char *const LLDB_NT_OWNER_CSR = "csr";
|
||||
|
||||
// ELF note type definitions
|
||||
const elf_word LLDB_NT_FREEBSD_ABI_TAG = 0x01;
|
||||
@@ -1221,6 +1222,24 @@ ObjectFileELF::RefineModuleDetailsFromNote (lldb_private::DataExtractor &data, l
|
||||
if (log)
|
||||
log->Printf ("ObjectFileELF::%s detected NetBSD, min version constant %" PRIu32, __FUNCTION__, version_info);
|
||||
}
|
||||
// Process CSR kalimba notes
|
||||
else if ((note.n_type == LLDB_NT_GNU_ABI_TAG) &&
|
||||
(note.n_name == LLDB_NT_OWNER_CSR))
|
||||
{
|
||||
// We'll consume the payload below.
|
||||
processed = true;
|
||||
arch_spec.GetTriple().setOS(llvm::Triple::OSType::UnknownOS);
|
||||
arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::CSR);
|
||||
|
||||
// TODO At some point the description string could be processed.
|
||||
// It could provide a steer towards the kalimba variant which
|
||||
// this ELF targets.
|
||||
if(note.n_descsz)
|
||||
{
|
||||
const char *cstr = data.GetCStr(&offset, llvm::RoundUpToAlignment (note.n_descsz, 4));
|
||||
(void)cstr;
|
||||
}
|
||||
}
|
||||
|
||||
if (!processed)
|
||||
offset += llvm::RoundUpToAlignment(note.n_descsz, 4);
|
||||
|
||||
Reference in New Issue
Block a user