diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-07-31 11:51:26 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-07-31 11:51:26 +0000 |
commit | 41df5652a12b45998111ca2aca09fc0c63674684 (patch) | |
tree | aac785fb2681e0aa0b889bd8c1034a846bd36131 /lib/sanitizer_common/sanitizer_symbolizer.h | |
parent | b0bb7fb31301ee9ac9cf41f21d3a19987dc30609 (diff) | |
download | compiler-rt-41df5652a12b45998111ca2aca09fc0c63674684.tar.gz |
[Sanitizer] Wrapper around llvm::DIContext from LLVM DebugInfo library. If a macro SANITIZER_USES_LLVM_LIBS is defined (by default it is not), then sanitizer runtime includes llvm headers and tries to use LLVM libs for in-process symbolization. To make it functional, we have to link with these LLVM libs - either pass them to linker from Clang driver, or link them into static ASan runtime when we build it.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@161045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_symbolizer.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_symbolizer.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_symbolizer.h b/lib/sanitizer_common/sanitizer_symbolizer.h index c813e8088..d5574b244 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer.h +++ b/lib/sanitizer_common/sanitizer_symbolizer.h @@ -66,6 +66,14 @@ bool FindDWARFSection(uptr object_file_addr, const char *section_name, DWARFSection *section); bool IsFullNameOfDWARFSection(const char *full_name, const char *short_name); +class DWARFContext; +DWARFContext *getDWARFContext(DWARFSection debug_info, + DWARFSection debug_abbrev, + DWARFSection debug_aranges, + DWARFSection debug_line, + DWARFSection debug_str); +void getLineInfoFromContext(DWARFContext *context, AddressInfo *info); + class ModuleDIContext { public: ModuleDIContext(const char *module_name, uptr base_address); @@ -76,7 +84,7 @@ class ModuleDIContext { const char *full_name() const { return full_name_; } private: - void CreateDIContext(); + void CreateDWARFContext(); struct AddressRange { uptr beg; @@ -90,6 +98,7 @@ class ModuleDIContext { uptr n_ranges_; uptr mapped_addr_; uptr mapped_size_; + DWARFContext *dwarf_context_; }; // OS-dependent function that gets the linked list of all loaded modules. |