diff options
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r-- | arch/x86/kernel/ptrace.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 9e43a48ad6e0..bf45cdf1aaca 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -1358,7 +1358,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) | |||
1358 | #endif | 1358 | #endif |
1359 | } | 1359 | } |
1360 | 1360 | ||
1361 | void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | 1361 | void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, |
1362 | int error_code, int si_code) | ||
1362 | { | 1363 | { |
1363 | struct siginfo info; | 1364 | struct siginfo info; |
1364 | 1365 | ||
@@ -1367,7 +1368,7 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | |||
1367 | 1368 | ||
1368 | memset(&info, 0, sizeof(info)); | 1369 | memset(&info, 0, sizeof(info)); |
1369 | info.si_signo = SIGTRAP; | 1370 | info.si_signo = SIGTRAP; |
1370 | info.si_code = TRAP_BRKPT; | 1371 | info.si_code = si_code; |
1371 | 1372 | ||
1372 | /* User-mode ip? */ | 1373 | /* User-mode ip? */ |
1373 | info.si_addr = user_mode_vm(regs) ? (void __user *) regs->ip : NULL; | 1374 | info.si_addr = user_mode_vm(regs) ? (void __user *) regs->ip : NULL; |
@@ -1454,5 +1455,5 @@ asmregparm void syscall_trace_leave(struct pt_regs *regs) | |||
1454 | */ | 1455 | */ |
1455 | if (test_thread_flag(TIF_SINGLESTEP) && | 1456 | if (test_thread_flag(TIF_SINGLESTEP) && |
1456 | tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL)) | 1457 | tracehook_consider_fatal_signal(current, SIGTRAP, SIG_DFL)) |
1457 | send_sigtrap(current, regs, 0); | 1458 | send_sigtrap(current, regs, 0, TRAP_BRKPT); |
1458 | } | 1459 | } |