diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2017-02-10 20:35:12 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2017-02-10 20:35:12 +0900 |
commit | 4b11dc566a5bbfa1378d6266525c281b028abcc8 (patch) | |
tree | b48831a898906734f8884d08b6e18f1144ee2b82 /src/vm/gdbjit.h | |
parent | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff) | |
download | coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.gz coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.bz2 coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.zip |
Imported Upstream version 1.0.0.9910upstream/1.0.0.9910
Diffstat (limited to 'src/vm/gdbjit.h')
-rw-r--r-- | src/vm/gdbjit.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/src/vm/gdbjit.h b/src/vm/gdbjit.h index 3160eccf57..1bc75772b6 100644 --- a/src/vm/gdbjit.h +++ b/src/vm/gdbjit.h @@ -24,12 +24,14 @@ typedef Elf32_Ehdr Elf_Ehdr; typedef Elf32_Shdr Elf_Shdr; typedef Elf32_Sym Elf_Sym; + const uint16_t DW_FORM_size = DW_FORM_data4; #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 + const uint16_t DW_FORM_size = DW_FORM_data8; +#define ADDRESS_SIZE 8 #else #error "Target is not supported" #endif @@ -184,6 +186,43 @@ public: int m_type_encoding; }; +class TypeDefInfo : public DwarfDumpable +{ +public: + TypeDefInfo(char *typedef_name,int typedef_type): + m_typedef_name(typedef_name), m_typedef_type(typedef_type) {} + void DumpStrings(char* ptr, int& offset) override; + void DumpDebugInfo(char* ptr, int& offset) override; + virtual ~TypeDefInfo() + { + if (m_typedef_name != nullptr) + { + delete [] m_typedef_name; + } + } + char *m_typedef_name; + int m_typedef_type; + int m_typedef_type_offset; + int m_typedef_name_offset; +}; + +class ByteTypeInfo : public PrimitiveTypeInfo +{ +public: + ByteTypeInfo(TypeHandle typeHandle, int encoding) : PrimitiveTypeInfo(typeHandle, encoding) + { + m_typedef_info = new (nothrow) TypeDefInfo(nullptr, 0); + } + virtual ~ByteTypeInfo() + { + delete m_typedef_info; + } + void DumpDebugInfo(char* ptr, int& offset) override; + void DumpStrings(char* ptr, int& offset) override; + + TypeDefInfo* m_typedef_info; +}; + class RefTypeInfo: public TypeInfoBase { public: @@ -208,6 +247,7 @@ public: int m_num_members; TypeMember* members; + TypeInfoBase* m_parent; }; class TypeMember: public DwarfDumpable @@ -431,6 +471,8 @@ public: m_sub_loc[0] = 1; #if defined(_TARGET_AMD64_) m_sub_loc[1] = DW_OP_reg6; +#elif defined(_TARGET_X86_) + m_sub_loc[1] = DW_OP_reg5; #elif defined(_TARGET_ARM_) m_sub_loc[1] = DW_OP_reg11; #else |