[Lldb-commits] [PATCH] [compiler-rt] ASan debugging API for report info extraction and locating addresses
kuba.brecka at gmail.com
Tue Jul 15 15:00:47 PDT 2014
Hi kcc, glider,
This patch is part of an effort to implement a more generic debugging API, as proposed in http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-July/074656.html, with first part reviewed at http://reviews.llvm.org/D4466.
Now adding two new APIs:
* __asan_get_report_data which returns a 0 if no asan report happened yet, or 1 if yes and also returns the PC, BP, SP, address, access type (read/write), access size and bug description (e.g. "heap-use-after-free")
* __asan_locate_address which takes a pointer and tries to locate it, i.e. say whether it is a heap pointer, a global or a stack, or whether it's a pointer into the shadow memory. If global or stack, tries to also return the variable name, address and size. If heap, tries to return the chunk address and size.
Generally these should serve as an alternative to "__asan_describe_address", which only returns all the data in text form. Having an API to get these data could allow having debugging scripts/extensions that could show additional information about a variable/expression/pointer. The idea behind having __asan_get_report_data is that we could have a special lldb stop reason that could show much more information than just "EXC_BAD_ACCESS".
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 17191 bytes
Desc: not available
More information about the lldb-commits