summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-06-15 14:00:25 +0000
committerAlexey Samsonov <samsonov@google.com>2012-06-15 14:00:25 +0000
commit0d76e8983f820d37496cc61eb2f2e8986274e3c9 (patch)
tree7c3d5c6c002ee39007c4e4207e47b010e62a26e9 /compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h
parentf500be025afd6eb1d2ca98937d710b2d5105c9fa (diff)
downloadbcm5719-llvm-0d76e8983f820d37496cc61eb2f2e8986274e3c9.tar.gz
bcm5719-llvm-0d76e8983f820d37496cc61eb2f2e8986274e3c9.zip
[Sanitizer] Use ProcessMaps in symbolizer to get module name and offset for instruction address
llvm-svn: 158522
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h21
1 files changed, 9 insertions, 12 deletions
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
OpenPOWER on IntegriCloud