summaryrefslogtreecommitdiff
path: root/src/vm/gdbjit.h
diff options
context:
space:
mode:
authorDmitri-Botcharnikov <dmitry.b@samsung.com>2016-09-06 21:27:13 +0400
committerMike McLaughlin <mikem@microsoft.com>2016-09-06 10:27:13 -0700
commit365fab07c3e49c9b3ca824aad822a17e3e8061c9 (patch)
tree92e4fbb4d77e251214a04c4cffa31b22fab895d4 /src/vm/gdbjit.h
parent527edfc09a2bd1060bd66fcce1fc99932a332645 (diff)
downloadcoreclr-365fab07c3e49c9b3ca824aad822a17e3e8061c9.tar.gz
coreclr-365fab07c3e49c9b3ca824aad822a17e3e8061c9.tar.bz2
coreclr-365fab07c3e49c9b3ca824aad822a17e3e8061c9.zip
[Linux][LLDB][GDB/JIT] Add support for lldb 'breakpoint set' for jitted code (#6956)
* Add support for lldb 'breakpoint set' for jitted code * Updated after review * Enlarge buffer for line program
Diffstat (limited to 'src/vm/gdbjit.h')
-rw-r--r--src/vm/gdbjit.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vm/gdbjit.h b/src/vm/gdbjit.h
index 5c7f24b34c..467a970c0b 100644
--- a/src/vm/gdbjit.h
+++ b/src/vm/gdbjit.h
@@ -22,10 +22,12 @@
#if defined(_TARGET_X86_) || defined(_TARGET_ARM_)
typedef Elf32_Ehdr Elf_Ehdr;
typedef Elf32_Shdr Elf_Shdr;
+ typedef Elf32_Sym Elf_Sym;
#define ADDRESS_SIZE 4
#elif defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
typedef Elf64_Ehdr Elf_Ehdr;
typedef Elf64_Shdr Elf_Shdr;
+ typedef Elf64_Sym Elf_Sym;
#define ADDRESS_SIZE 8
#else
#error "Target is not supported"
@@ -86,6 +88,8 @@ private:
static bool BuildELFHeader(MemBuf& buf);
static bool BuildSectionNameTable(MemBuf& buf);
static bool BuildSectionTable(MemBuf& buf);
+ static bool BuildSymbolTableSection(MemBuf& buf, PCODE addr, TADDR codeSize);
+ static bool BuildStringTableSection(MemBuf& strTab);
static bool BuildDebugStrings(MemBuf& buf);
static bool BuildDebugAbbrev(MemBuf& buf);
static bool BuildDebugInfo(MemBuf& buf);
@@ -102,6 +106,9 @@ private:
static void SplitPathname(const char* path, const char*& pathName, const char*& fileName);
static int Leb128Encode(uint32_t num, char* buf, int size);
static int Leb128Encode(int32_t num, char* buf, int size);
+#ifdef _DEBUG
+ static void DumpElf(const char* methodName, const MemBuf& buf);
+#endif
};
#endif // #ifndef __GDBJIT_H__