From owner-svn-src-head@freebsd.org Fri Oct 20 03:03:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E415DE4DFE6; Fri, 20 Oct 2017 03:03:05 +0000 (UTC) (envelope-from jhibbits@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 mx1.freebsd.org (Postfix) with ESMTPS id B341A64E65; Fri, 20 Oct 2017 03:03:05 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9K334kH004117; Fri, 20 Oct 2017 03:03:04 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9K334oe004116; Fri, 20 Oct 2017 03:03:04 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201710200303.v9K334oe004116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 20 Oct 2017 03:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324783 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 324783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 03:03:06 -0000 Author: jhibbits Date: Fri Oct 20 03:03:04 2017 New Revision: 324783 URL: https://svnweb.freebsd.org/changeset/base/324783 Log: Book-E debug trace fixes * Book-E can have Altivec exceptions, so move it out of the AIM-only block. * Print the right DSI trap mode (read vs write) for Book-E While here, fix some whitespace found while reviewing other diffs. Modified: head/sys/powerpc/powerpc/db_trace.c Modified: head/sys/powerpc/powerpc/db_trace.c ============================================================================== --- head/sys/powerpc/powerpc/db_trace.c Fri Oct 20 00:38:01 2017 (r324782) +++ head/sys/powerpc/powerpc/db_trace.c Fri Oct 20 03:03:04 2017 (r324783) @@ -118,12 +118,12 @@ db_frame(struct db_variable *vp, db_expr_t *valuep, in if (kdb_frame == NULL) return (0); - reg = (register_t*)((uintptr_t)kdb_frame + (uintptr_t)vp->valuep); - if (op == DB_VAR_GET) - *valuep = *reg; - else - *reg = *valuep; - return (1); + reg = (register_t*)((uintptr_t)kdb_frame + (uintptr_t)vp->valuep); + if (op == DB_VAR_GET) + *valuep = *reg; + else + *reg = *valuep; + return (1); } @@ -215,12 +215,17 @@ db_backtrace(struct thread *td, db_addr_t fp, int coun switch (tf->exc) { case EXC_DSI: /* XXX take advantage of the union. */ +#ifdef BOOKE db_printf("DSI %s trap @ %#zx by ", + (tf->cpu.booke.esr & ESR_ST) ? "write" + : "read", tf->dar); +#else + db_printf("DSI %s trap @ %#zx by ", (tf->cpu.aim.dsisr & DSISR_STORE) ? "write" : "read", tf->dar); +#endif goto print_trap; case EXC_ALI: - /* XXX take advantage of the union. */ db_printf("ALI trap @ %#zx (xSR %#x) ", tf->dar, (uint32_t)tf->cpu.aim.dsisr); goto print_trap; @@ -237,8 +242,8 @@ db_backtrace(struct thread *td, db_addr_t fp, int coun case EXC_SC: trapstr = "SC"; break; case EXC_EXI: trapstr = "EXI"; break; case EXC_MCHK: trapstr = "MCHK"; break; -#if !defined(BOOKE) case EXC_VEC: trapstr = "VEC"; break; +#if !defined(BOOKE) case EXC_FPA: trapstr = "FPA"; break; case EXC_BPT: trapstr = "BPT"; break; case EXC_TRC: trapstr = "TRC"; break;