| @@ -380,38 +380,38 @@ bool MemoryMappingLayout::GetObjectNameA | | | @@ -380,38 +380,38 @@ bool MemoryMappingLayout::GetObjectNameA |
380 | return IterateForObjectNameAndOffset(addr, offset, filename, filename_size); | | 380 | return IterateForObjectNameAndOffset(addr, offset, filename, filename_size); |
381 | } | | 381 | } |
382 | | | 382 | |
383 | bool SanitizerSetThreadName(const char *name) { | | 383 | bool SanitizerSetThreadName(const char *name) { |
384 | return 0 == pthread_setname_np(pthread_self(), "%s", (void *)(intptr_t)name); | | 384 | return 0 == pthread_setname_np(pthread_self(), "%s", (void *)(intptr_t)name); |
385 | } | | 385 | } |
386 | | | 386 | |
387 | bool SanitizerGetThreadName(char *name, int max_len) { | | 387 | bool SanitizerGetThreadName(char *name, int max_len) { |
388 | return 0 == pthread_getname_np(pthread_self(), name, max_len); | | 388 | return 0 == pthread_getname_np(pthread_self(), name, max_len); |
389 | } | | 389 | } |
390 | | | 390 | |
391 | #ifndef SANITIZER_GO | | 391 | #ifndef SANITIZER_GO |
392 | //------------------------- SlowUnwindStack ----------------------------------- | | 392 | //------------------------- SlowUnwindStack ----------------------------------- |
393 | #ifdef __arm__ | | 393 | #if defined(__arm__) && defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__) |
394 | #include "unwind-arm-common.h" | | 394 | #include "unwind-arm-common.h" |
395 | #define UNWIND_STOP _URC_END_OF_STACK | | 395 | #define UNWIND_STOP _URC_END_OF_STACK |
396 | #define UNWIND_CONTINUE _URC_NO_REASON | | 396 | #define UNWIND_CONTINUE _URC_NO_REASON |
397 | #else | | 397 | #else |
398 | #include <unwind.h> | | 398 | #include <unwind.h> |
399 | #define UNWIND_STOP _URC_NORMAL_STOP | | 399 | #define UNWIND_STOP _URC_NORMAL_STOP |
400 | #define UNWIND_CONTINUE _URC_NO_REASON | | 400 | #define UNWIND_CONTINUE _URC_NO_REASON |
401 | #endif | | 401 | #endif |
402 | | | 402 | |
403 | uptr Unwind_GetIP(struct _Unwind_Context *ctx) { | | 403 | uptr Unwind_GetIP(struct _Unwind_Context *ctx) { |
404 | #ifdef __arm__ | | 404 | #if defined(__arm__) && defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__) |
405 | uptr val; | | 405 | uptr val; |
406 | _Unwind_VRS_Result res = _Unwind_VRS_Get(ctx, _UVRSC_CORE, | | 406 | _Unwind_VRS_Result res = _Unwind_VRS_Get(ctx, _UVRSC_CORE, |
407 | 15 /* r15 = PC */, _UVRSD_UINT32, &val); | | 407 | 15 /* r15 = PC */, _UVRSD_UINT32, &val); |
408 | CHECK(res == _UVRSR_OK && "_Unwind_VRS_Get failed"); | | 408 | CHECK(res == _UVRSR_OK && "_Unwind_VRS_Get failed"); |
409 | // Clear the Thumb bit. | | 409 | // Clear the Thumb bit. |
410 | return val & ~(uptr)1; | | 410 | return val & ~(uptr)1; |
411 | #else | | 411 | #else |
412 | return (uptr)_Unwind_GetIP(ctx); | | 412 | return (uptr)_Unwind_GetIP(ctx); |
413 | #endif | | 413 | #endif |
414 | } | | 414 | } |
415 | | | 415 | |
416 | _Unwind_Reason_Code Unwind_Trace(struct _Unwind_Context *ctx, void *param) { | | 416 | _Unwind_Reason_Code Unwind_Trace(struct _Unwind_Context *ctx, void *param) { |
417 | StackTrace *b = (StackTrace*)param; | | 417 | StackTrace *b = (StackTrace*)param; |