traps.c (c58310bf4933986513020fa90b4190c7492995ae) | traps.c (f82796214a95b1ec00c2f121c1080d10f2b099a1) |
---|---|
1/* 2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 1016 unchanged lines hidden (view full) --- 1025#else 1026 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); 1027#endif 1028} 1029#endif /* CONFIG_8xx */ 1030 1031#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) 1032 | 1/* 2 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 1016 unchanged lines hidden (view full) --- 1025#else 1026 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); 1027#endif 1028} 1029#endif /* CONFIG_8xx */ 1030 1031#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) 1032 |
1033void DebugException(struct pt_regs *regs, unsigned long debug_status) | 1033void __kprobes DebugException(struct pt_regs *regs, unsigned long debug_status) |
1034{ 1035 if (debug_status & DBSR_IC) { /* instruction completion */ 1036 regs->msr &= ~MSR_DE; | 1034{ 1035 if (debug_status & DBSR_IC) { /* instruction completion */ 1036 regs->msr &= ~MSR_DE; |
1037 1038 /* Disable instruction completion */ 1039 mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~DBCR0_IC); 1040 /* Clear the instruction completion event */ 1041 mtspr(SPRN_DBSR, DBSR_IC); 1042 1043 if (notify_die(DIE_SSTEP, "single_step", regs, 5, 1044 5, SIGTRAP) == NOTIFY_STOP) { 1045 return; 1046 } 1047 1048 if (debugger_sstep(regs)) 1049 return; 1050 |
|
1037 if (user_mode(regs)) { 1038 current->thread.dbcr0 &= ~DBCR0_IC; | 1051 if (user_mode(regs)) { 1052 current->thread.dbcr0 &= ~DBCR0_IC; |
1039 } else { 1040 /* Disable instruction completion */ 1041 mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~DBCR0_IC); 1042 /* Clear the instruction completion event */ 1043 mtspr(SPRN_DBSR, DBSR_IC); 1044 if (debugger_sstep(regs)) 1045 return; | |
1046 } | 1053 } |
1047 _exception(SIGTRAP, regs, TRAP_TRACE, 0); | 1054 1055 _exception(SIGTRAP, regs, TRAP_TRACE, regs->nip); |
1048 } 1049} 1050#endif /* CONFIG_4xx || CONFIG_BOOKE */ 1051 1052#if !defined(CONFIG_TAU_INT) 1053void TAUException(struct pt_regs *regs) 1054{ 1055 printk("TAU trap at PC: %lx, MSR: %lx, vector=%lx %s\n", --- 134 unchanged lines hidden --- | 1056 } 1057} 1058#endif /* CONFIG_4xx || CONFIG_BOOKE */ 1059 1060#if !defined(CONFIG_TAU_INT) 1061void TAUException(struct pt_regs *regs) 1062{ 1063 printk("TAU trap at PC: %lx, MSR: %lx, vector=%lx %s\n", --- 134 unchanged lines hidden --- |