aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPreston Gurd <preston.gurd@intel.com>2012-04-16 22:12:58 +0000
committerPreston Gurd <preston.gurd@intel.com>2012-04-16 22:12:58 +0000
commit689ff9c00f4f3dcf3491778bcdbda79e19e2285d (patch)
tree5b27bacb0f581a45e9274eb9894e0fd4bb259bf8 /include
parentf1a60c734c2edb97ab75e67328935538fae5bae6 (diff)
downloadexternal_llvm-689ff9c00f4f3dcf3491778bcdbda79e19e2285d.zip
external_llvm-689ff9c00f4f3dcf3491778bcdbda79e19e2285d.tar.gz
external_llvm-689ff9c00f4f3dcf3491778bcdbda79e19e2285d.tar.bz2
Implement GDB integration for source level debugging of code JITed using
the MCJIT execution engine. The GDB JIT debugging integration support works by registering a loaded object image with a pre-defined function that GDB will monitor if GDB is attached. GDB integration support is implemented for ELF only at this time. This integration requires GDB version 7.0 or newer. Patch by Andy Kaylor! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Object/ELF.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h
index 0828985..e493f5b 100644
--- a/include/llvm/Object/ELF.h
+++ b/include/llvm/Object/ELF.h
@@ -33,6 +33,15 @@
namespace llvm {
namespace object {
+// Subclasses of ELFObjectFile may need this for template instantiation
+inline std::pair<unsigned char, unsigned char>
+getElfArchType(MemoryBuffer *Object) {
+ if (Object->getBufferSize() < ELF::EI_NIDENT)
+ return std::make_pair((uint8_t)ELF::ELFCLASSNONE,(uint8_t)ELF::ELFDATANONE);
+ return std::make_pair( (uint8_t)Object->getBufferStart()[ELF::EI_CLASS]
+ , (uint8_t)Object->getBufferStart()[ELF::EI_DATA]);
+}
+
// Templates to choose Elf_Addr and Elf_Off depending on is64Bits.
template<support::endianness target_endianness>
struct ELFDataTypeTypedefHelperCommon {