@@ -2357,29 +2357,33 @@ static uptr GetArmRegister(ucontext_t *ctx, int RegNum) {
2357
2357
UNUSED
2358
2358
static void DumpSingleReg (ucontext_t *ctx, int RegNum) {
2359
2359
const char *RegName = RegNumToRegName (RegNum);
2360
- # if defined(__x86_64__)
2360
+ # if SANITIZER_LINUX && SANITIZER_GLIBC || SANITIZER_NETBSD
2361
+ # if defined(__x86_64__)
2361
2362
Printf (" %s%s = 0x%016llx " , internal_strlen (RegName) == 2 ? " " : " " ,
2362
2363
RegName,
2363
- # if SANITIZER_LINUX
2364
+ # if SANITIZER_LINUX
2364
2365
ctx->uc_mcontext .gregs [RegNum]
2365
- # elif SANITIZER_NETBSD
2366
+ # elif SANITIZER_NETBSD
2366
2367
ctx->uc_mcontext .__gregs [RegNum]
2367
- # endif
2368
+ # endif
2368
2369
);
2369
- # elif defined(__i386__)
2370
+ # elif defined(__i386__)
2370
2371
Printf (" %s = 0x%08x " , RegName,
2371
- # if SANITIZER_LINUX
2372
+ # if SANITIZER_LINUX
2372
2373
ctx->uc_mcontext .gregs [RegNum]
2373
- # elif SANITIZER_NETBSD
2374
+ # elif SANITIZER_NETBSD
2374
2375
ctx->uc_mcontext .__gregs [RegNum]
2375
- # endif
2376
+ # endif
2376
2377
);
2377
- # elif defined(__arm__)
2378
+ # elif defined(__arm__)
2378
2379
Printf (" %s%s = 0x%08zx " , internal_strlen (RegName) == 2 ? " " : " " , RegName,
2379
2380
GetArmRegister (ctx, RegNum));
2380
- # elif defined(__aarch64__)
2381
+ # elif defined(__aarch64__)
2381
2382
Printf (" %s%s = 0x%016zx " , internal_strlen (RegName) == 2 ? " " : " " , RegName,
2382
2383
GetArmRegister (ctx, RegNum));
2384
+ # else
2385
+ (void )RegName;
2386
+ # endif
2383
2387
# else
2384
2388
(void )RegName;
2385
2389
# endif
@@ -2496,6 +2500,8 @@ void SignalContext::DumpAllRegisters(void *context) {
2496
2500
# else
2497
2501
(void )ucontext;
2498
2502
# endif
2503
+ # else
2504
+ (void )ucontext;
2499
2505
# endif
2500
2506
// FIXME: Implement this for other OSes and architectures.
2501
2507
}
0 commit comments