From 0d76e8983f820d37496cc61eb2f2e8986274e3c9 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Fri, 15 Jun 2012 14:00:25 +0000 Subject: [Sanitizer] Use ProcessMaps in symbolizer to get module name and offset for instruction address llvm-svn: 158522 --- .../lib/sanitizer_common/sanitizer_symbolizer.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h') diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h index 17b3f6a97dd..c6104cd5d4f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h +++ b/compiler-rt/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 -- cgit v1.2.3