diff options
author | Igor Kulaychuk <igor.kulaychuk@gmail.com> | 2017-09-27 16:32:39 +0300 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-09-27 15:32:39 +0200 |
commit | 9509fc86a50ad107ee4d601e917cf072f135aa5e (patch) | |
tree | ed61d7ff53cf086920dd586eace8d575ba930e4b /src/vm/gdbjit.h | |
parent | 863625426be65b96f2a3c085fc049cfcd2f1a82a (diff) | |
download | coreclr-9509fc86a50ad107ee4d601e917cf072f135aa5e.tar.gz coreclr-9509fc86a50ad107ee4d601e917cf072f135aa5e.tar.bz2 coreclr-9509fc86a50ad107ee4d601e917cf072f135aa5e.zip |
[GDBJIT] Provide full file names in generated DWARF (#14172)
* Fix compile unit info
Provide full path to source in SequencePoints for GDBJIT
Use source file and directory path for compile unit info in DWARF instead of module name.
* Add a class for building Directory Table and File Table
* Fix code inconsistencies and add comments
Diffstat (limited to 'src/vm/gdbjit.h')
-rw-r--r-- | src/vm/gdbjit.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vm/gdbjit.h b/src/vm/gdbjit.h index f7267ad2a1..6cfe52c36d 100644 --- a/src/vm/gdbjit.h +++ b/src/vm/gdbjit.h @@ -340,6 +340,7 @@ class Elf_Builder; class NotifyGdb { public: + class FileTableBuilder; static void MethodPrepared(MethodDesc* methodDescPtr); static void MethodPitched(MethodDesc* methodDescPtr); template <typename PARENT_TRAITS> @@ -422,7 +423,7 @@ private: #ifdef FEATURE_GDBJIT_SYMTAB static bool EmitSymtab(Elf_Builder &, MethodDesc* methodDescPtr, PCODE pCode, TADDR codeSize); #endif // FEATURE_GDBJIT_SYMTAB - static bool EmitDebugInfo(Elf_Builder &, MethodDesc* methodDescPtr, PCODE pCode, TADDR codeSize, const char *szModuleFile); + static bool EmitDebugInfo(Elf_Builder &, MethodDesc* methodDescPtr, PCODE pCode, TADDR codeSize); static bool BuildSymbolTableSection(MemBuf& buf, PCODE addr, TADDR codeSize, int methodCount, NewArrayHolder<Elf_Symbol> &symbolNames, int symbolCount, @@ -432,14 +433,15 @@ private: static bool BuildDebugAbbrev(MemBuf& buf); static bool BuildDebugInfo(MemBuf& buf, PTK_TypeInfoMap pTypeMap, FunctionMemberPtrArrayHolder &method); static bool BuildDebugPub(MemBuf& buf, const char* name, uint32_t size, uint32_t dieOffset); - static bool BuildLineTable(MemBuf& buf, PCODE startAddr, TADDR codeSize, SymbolsInfo* lines, unsigned nlines); - static bool BuildFileTable(MemBuf& buf, SymbolsInfo* lines, unsigned nlines); + static bool BuildLineTable(MemBuf& buf, PCODE startAddr, TADDR codeSize, SymbolsInfo* lines, unsigned nlines, + const char * &cuPath); + static bool BuildFileTable(MemBuf& buf, SymbolsInfo* lines, unsigned nlines, const char * &cuPath); static bool BuildLineProg(MemBuf& buf, PCODE startAddr, TADDR codeSize, SymbolsInfo* lines, unsigned nlines); static void IssueSetAddress(char*& ptr, PCODE addr); static void IssueEndOfSequence(char*& ptr); static void IssueSimpleCommand(char*& ptr, uint8_t command); static void IssueParamCommand(char*& ptr, uint8_t command, char* param, int param_len); - static void SplitPathname(const char* path, const char*& pathName, const char*& fileName); + static const char* SplitFilename(const char* path); static bool CollectCalledMethods(CalledMethod* pCM, TADDR nativeCode, FunctionMemberPtrArrayHolder &method, NewArrayHolder<Elf_Symbol> &symbolNames, int &symbolCount); }; |