summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2014-07-16 15:03:10 +0000
committerTodd Fiala <todd.fiala@gmail.com>2014-07-16 15:03:10 +0000
commitcfee963282b6bd20ff80e8c2ef8314c4667f052e (patch)
treebc1055c91bea9787b7259b181545fc08163c3ece /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parent806bcabcdafbb1deb8e3f1821d848f33f67a8dd5 (diff)
downloadbcm5719-llvm-cfee963282b6bd20ff80e8c2ef8314c4667f052e.tar.gz
bcm5719-llvm-cfee963282b6bd20ff80e8c2ef8314c4667f052e.zip
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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 50cdd18a8fb..bd819c44930 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -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);
OpenPOWER on IntegriCloud