Report proper signal codes for SIGTRAP traps on MIPS.
- Use TRAP_TRACE for traps after stepping via PT_STEP. - Use TRAP_BRKPT for software breakpoint traps and watchpoint traps. This was tested via the recently added siginfo ptrace() tests. PT_STEP on MIPS has several bugs that prevent it from working yet, but this does fix the ptrace__breakpoint_siginfo test on MIPS.
This commit is contained in:
parent
643ce7de72
commit
93fc184b82
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332909
@ -840,6 +840,7 @@ trap(struct trapframe *trapframe)
|
||||
if (td->td_md.md_ss_addr != va ||
|
||||
instr != MIPS_BREAK_SSTEP) {
|
||||
i = SIGTRAP;
|
||||
ucode = TRAP_BRKPT;
|
||||
addr = trapframe->pc;
|
||||
break;
|
||||
}
|
||||
@ -851,6 +852,7 @@ trap(struct trapframe *trapframe)
|
||||
*/
|
||||
addr = trapframe->pc;
|
||||
i = SIGTRAP;
|
||||
ucode = TRAP_TRACE;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -865,6 +867,7 @@ trap(struct trapframe *trapframe)
|
||||
va += sizeof(int);
|
||||
printf("watch exception @ %p\n", (void *)va);
|
||||
i = SIGTRAP;
|
||||
ucode = TRAP_BRKPT;
|
||||
addr = va;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user