forked from OSchip/llvm-project
[asan] add a new interface function __asan_describe_address, useful for running asan-ified binary under a debugger (e.g. gdb)
llvm-svn: 171217
This commit is contained in:
parent
db7325e56e
commit
b3d04ede8c
|
@ -122,6 +122,10 @@ extern "C" {
|
|||
uptr __asan_region_is_poisoned(uptr beg, uptr size)
|
||||
SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
// Print the description of addr (useful when debugging in gdb).
|
||||
void __asan_describe_address(uptr addr)
|
||||
SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
// This is an internal function that is called to report an error.
|
||||
// However it is still a part of the interface because users may want to
|
||||
// set a breakpoint on this function in a debugger.
|
||||
|
|
|
@ -669,6 +669,10 @@ void NOINLINE __asan_set_error_report_callback(void (*callback)(const char*)) {
|
|||
}
|
||||
}
|
||||
|
||||
void __asan_describe_address(uptr addr) {
|
||||
DescribeAddress(addr, 1);
|
||||
}
|
||||
|
||||
#if !SANITIZER_SUPPORTS_WEAK_HOOKS
|
||||
// Provide default implementation of __asan_on_error that does nothing
|
||||
// and may be overriden by user.
|
||||
|
|
|
@ -254,6 +254,7 @@ static NOINLINE void force_interface_symbols() {
|
|||
case 32: __asan_poison_stack_memory(0, 0); break;
|
||||
case 33: __asan_unpoison_stack_memory(0, 0); break;
|
||||
case 34: __asan_region_is_poisoned(0, 0); break;
|
||||
case 35: __asan_describe_address(0); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue