diff options
author | Srinivasa Ds <srinivasa@in.ibm.com> | 2008-09-23 05:53:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-23 07:26:52 -0400 |
commit | da654b74bda14c45a7d98c731bf3c1a43b6b74e2 (patch) | |
tree | e3cc6f1a1f7300c07e59c9091cd2ede0c5da8d4d /arch/x86/kernel/traps_64.c | |
parent | 101d5b713700b902b1c200cdd1925c3cb7d34567 (diff) |
signals: demultiplexing SIGTRAP signal
Currently a SIGTRAP can denote any one of below reasons.
- Breakpoint hit
- H/W debug register hit
- Single step
- Signal sent through kill() or rasie()
Architectures like powerpc/parisc provides infrastructure to demultiplex
SIGTRAP signal by passing down the information for receiving SIGTRAP through
si_code of siginfot_t structure. Here is an attempt is generalise this
infrastructure by extending it to x86 and x86_64 archs.
Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: akpm@linux-foundation.org
Cc: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps_64.c')
-rw-r--r-- | arch/x86/kernel/traps_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index 56d6f1147785..011d8e1fac6e 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -941,7 +941,7 @@ asmlinkage void __kprobes do_debug(struct pt_regs *regs, | |||
941 | tsk->thread.error_code = error_code; | 941 | tsk->thread.error_code = error_code; |
942 | info.si_signo = SIGTRAP; | 942 | info.si_signo = SIGTRAP; |
943 | info.si_errno = 0; | 943 | info.si_errno = 0; |
944 | info.si_code = TRAP_BRKPT; | 944 | info.si_code = get_si_code(condition); |
945 | info.si_addr = user_mode(regs) ? (void __user *)regs->ip : NULL; | 945 | info.si_addr = user_mode(regs) ? (void __user *)regs->ip : NULL; |
946 | force_sig_info(SIGTRAP, &info, tsk); | 946 | force_sig_info(SIGTRAP, &info, tsk); |
947 | 947 | ||