diff options
author | Shuai Xue <xueshuai@linux.alibaba.com> | 2022-09-14 22:20:20 +0800 |
---|---|---|
committer | Shuai Xue <xueshuai@linux.alibaba.com> | 2022-09-14 22:24:50 +0800 |
commit | 31afc0db520db03fedaf6f207858ec26097adae8 (patch) | |
tree | d6b6a59830a49e923f42f5a5669c627c27ac2f26 | |
parent | a98884b2782ab8e3d0e4465fa3788f29be00f171 (diff) | |
download | ras-tools-31afc0db520db03fedaf6f207858ec26097adae8.tar.gz |
einj_mem_uc: enhance sig action to explicitly print si_code
The current sig action only prints fault address and restores the
environment saved before and , we can not tell the SIGBUS reason.
Therefore, explictly print si_code, 4 for BUS_MCEERR_AR, and 5 for
BUS_MCEERR_AO.
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
-rw-r--r-- | einj_mem_uc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/einj_mem_uc.c b/einj_mem_uc.c index 44b8358..89af626 100644 --- a/einj_mem_uc.c +++ b/einj_mem_uc.c @@ -920,7 +920,7 @@ static jmp_buf env; static void recover(int sig, siginfo_t *si, void *v) { - printf("SIGBUS: addr = %p\n", si->si_addr); + printf("signal %d code %d addr %p\n", sig, si->si_code, si->si_addr); siglongjmp(env, 1); } |