From owner-svn-src-stable-11@freebsd.org Wed Aug 1 20:38:02 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CE521068A96; Wed, 1 Aug 2018 20:38:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C698086BC4; Wed, 1 Aug 2018 20:38:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A37FF27806; Wed, 1 Aug 2018 20:38:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w71Kc1c7079966; Wed, 1 Aug 2018 20:38:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w71Kc14u079965; Wed, 1 Aug 2018 20:38:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201808012038.w71Kc14u079965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 1 Aug 2018 20:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337061 - stable/11/sys/sparc64/sparc64 X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/sys/sparc64/sparc64 X-SVN-Commit-Revision: 337061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 20:38:02 -0000 Author: jhb Date: Wed Aug 1 20:38:01 2018 New Revision: 337061 URL: https://svnweb.freebsd.org/changeset/base/337061 Log: MFC 333416: Report TRAP_BRKPT for breakpoint traps on sparc64. Modified: stable/11/sys/sparc64/sparc64/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/11/sys/sparc64/sparc64/trap.c Wed Aug 1 20:08:20 2018 (r337060) +++ stable/11/sys/sparc64/sparc64/trap.c Wed Aug 1 20:38:01 2018 (r337061) @@ -257,7 +257,7 @@ trap(struct trapframe *tf) struct thread *td; struct proc *p; int error; - int sig; + int sig, ucode; register_t addr; ksiginfo_t ksi; @@ -277,6 +277,7 @@ trap(struct trapframe *tf) td->td_pticks = 0; td->td_frame = tf; addr = tf->tf_tpc; + ucode = (int)tf->tf_type; /* XXX not POSIX */ if (td->td_cowgen != p->p_cowgen) thread_cow_update(td); @@ -300,6 +301,10 @@ trap(struct trapframe *tf) case T_CORRECTED_ECC_ERROR: sig = trap_cecc(); break; + case T_BREAKPOINT: + sig = SIGTRAP; + ucode = TRAP_BRKPT; + break; default: if (tf->tf_type > T_MAX) panic("trap: bad trap type %#lx (user)", @@ -322,7 +327,7 @@ trap(struct trapframe *tf) kdb_enter(KDB_WHY_TRAPSIG, "trapsig"); ksiginfo_init_trap(&ksi); ksi.ksi_signo = sig; - ksi.ksi_code = (int)tf->tf_type; /* XXX not POSIX */ + ksi.ksi_code = ucode; ksi.ksi_addr = (void *)addr; ksi.ksi_trapno = (int)tf->tf_type; trapsignal(td, &ksi);