提交 367f3fcd 编写于 作者: V Vineet Gupta

ARC: Fix the typo in event identifier flags used by ptrace

orig_r8_IS_EXCPN and orig_r8_IS_BRKPT were same values due to a
copy/paste error. Although it looks bad and is wrong, it really doesn't
affect gdb working.

orig_r8_IS_BRKPT is the one relevant to debugging (breakpoints), since
it is used to provide EFA vs. ERET to a ptrace "stop_pc" request.

So when gdb has inserted a breakpoint, orig_r8_IS_BRKPT is already set,
and anything else (i.e. orig_r8_IS_EXCPN) becoming same as it, really
doesn't hurt gdb. The corollary case, could be nasty but nobody uses the
ptrace "stop_pc" request in that case
Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
上级 2105fd55
...@@ -415,7 +415,7 @@ ...@@ -415,7 +415,7 @@
*-------------------------------------------------------------*/ *-------------------------------------------------------------*/
.macro SAVE_ALL_EXCEPTION marker .macro SAVE_ALL_EXCEPTION marker
st \marker, [sp, 8] st \marker, [sp, 8] /* orig_r8 */
st r0, [sp, 4] /* orig_r0, needed only for sys calls */ st r0, [sp, 4] /* orig_r0, needed only for sys calls */
/* Restore r9 used to code the early prologue */ /* Restore r9 used to code the early prologue */
......
...@@ -123,7 +123,7 @@ static inline long regs_return_value(struct pt_regs *regs) ...@@ -123,7 +123,7 @@ static inline long regs_return_value(struct pt_regs *regs)
#define orig_r8_IS_SCALL 0x0001 #define orig_r8_IS_SCALL 0x0001
#define orig_r8_IS_SCALL_RESTARTED 0x0002 #define orig_r8_IS_SCALL_RESTARTED 0x0002
#define orig_r8_IS_BRKPT 0x0004 #define orig_r8_IS_BRKPT 0x0004
#define orig_r8_IS_EXCPN 0x0004 #define orig_r8_IS_EXCPN 0x0008
#define orig_r8_IS_IRQ1 0x0010 #define orig_r8_IS_IRQ1 0x0010
#define orig_r8_IS_IRQ2 0x0020 #define orig_r8_IS_IRQ2 0x0020
......
...@@ -452,7 +452,7 @@ tracesys: ...@@ -452,7 +452,7 @@ tracesys:
; using ERET won't work since next-PC has already committed ; using ERET won't work since next-PC has already committed
lr r12, [efa] lr r12, [efa]
GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11 GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11
st r12, [r11, THREAD_FAULT_ADDR] st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address
; PRE Sys Call Ptrace hook ; PRE Sys Call Ptrace hook
mov r0, sp ; pt_regs needed mov r0, sp ; pt_regs needed
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册