Date: Thu, 6 Sep 2018 22:30:34 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338515 - stable/11/sys/mips/mips Message-ID: <201809062230.w86MUYvF068356@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Sep 6 22:30:34 2018 New Revision: 338515 URL: https://svnweb.freebsd.org/changeset/base/338515 Log: MFC 332909: 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. Modified: stable/11/sys/mips/mips/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/mips/mips/trap.c ============================================================================== --- stable/11/sys/mips/mips/trap.c Thu Sep 6 22:23:39 2018 (r338514) +++ stable/11/sys/mips/mips/trap.c Thu Sep 6 22:30:34 2018 (r338515) @@ -852,6 +852,7 @@ dofault: if (td->td_md.md_ss_addr != va || instr != MIPS_BREAK_SSTEP) { i = SIGTRAP; + ucode = TRAP_BRKPT; addr = trapframe->pc; break; } @@ -863,6 +864,7 @@ dofault: */ addr = trapframe->pc; i = SIGTRAP; + ucode = TRAP_TRACE; break; } @@ -877,6 +879,7 @@ dofault: va += sizeof(int); printf("watch exception @ %p\n", (void *)va); i = SIGTRAP; + ucode = TRAP_BRKPT; addr = va; break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809062230.w86MUYvF068356>