diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-06-15 14:00:25 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-06-15 14:00:25 +0000 |
commit | fa82b0887fd558b77a856730a0656460d5bf078d (patch) | |
tree | d35a58d7bc617005ab3dc0fdeb3dd55590b23142 /lib/sanitizer_common/sanitizer_symbolizer.h | |
parent | c925697df6626bb0ea27ea96539bf0580f8f3d3d (diff) | |
download | compiler-rt-fa82b0887fd558b77a856730a0656460d5bf078d.tar.gz compiler-rt-fa82b0887fd558b77a856730a0656460d5bf078d.tar.bz2 compiler-rt-fa82b0887fd558b77a856730a0656460d5bf078d.tar.xz |
[Sanitizer] Use ProcessMaps in symbolizer to get module name and offset for instruction address
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_symbolizer.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_symbolizer.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/sanitizer_common/sanitizer_symbolizer.h b/lib/sanitizer_common/sanitizer_symbolizer.h index 17b3f6a9..c6104cd5 100644 --- a/lib/sanitizer_common/sanitizer_symbolizer.h +++ b/lib/sanitizer_common/sanitizer_symbolizer.h @@ -39,21 +39,18 @@ struct AddressInfo { int line; int column; - // Deletes all strings. + AddressInfo() { + internal_memset(this, 0, sizeof(AddressInfo)); + } + // Deletes all strings and sets all fields to zero. void Clear(); }; -struct AddressInfoList { - AddressInfoList *next; - AddressInfo info; - - // Deletes all nodes in a list. - void Clear(); -}; - -// Returns a list of descriptions for a given address (in all inlined -// functions). The ownership is transferred to the caller. -AddressInfoList* SymbolizeCode(uptr address); +// Fills at most "max_frames" elements of "frames" with descriptions +// for a given address (in all inlined functions). Returns the number +// of descriptions actually filled. +// This function should NOT be called from two threads simultaneously. +uptr SymbolizeCode(uptr address, AddressInfo *frames, uptr max_frames); } // namespace __sanitizer |