From owner-svn-src-head@freebsd.org Thu Nov 1 22:11:27 2018 Return-Path: Delivered-To: svn-src-head@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 E4BF010DAB81; Thu, 1 Nov 2018 22:11:26 +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 9A3178EC32; Thu, 1 Nov 2018 22:11:26 +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 7ACBA21B61; Thu, 1 Nov 2018 22:11:26 +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 wA1MBQQx030300; Thu, 1 Nov 2018 22:11:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA1MBQ7v030299; Thu, 1 Nov 2018 22:11:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201811012211.wA1MBQ7v030299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 1 Nov 2018 22:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340025 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 340025 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.29 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: Thu, 01 Nov 2018 22:11:27 -0000 Author: jhb Date: Thu Nov 1 22:11:26 2018 New Revision: 340025 URL: https://svnweb.freebsd.org/changeset/base/340025 Log: Implement ptrace_set_pc() and fail PT_*STEP requests explicitly. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17769 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Thu Nov 1 21:51:41 2018 (r340024) +++ head/sys/riscv/riscv/machdep.c Thu Nov 1 22:11:26 2018 (r340025) @@ -254,7 +254,7 @@ int ptrace_set_pc(struct thread *td, u_long addr) { - panic("ptrace_set_pc"); + td->td_frame->tf_sepc = addr; return (0); } @@ -263,7 +263,7 @@ ptrace_single_step(struct thread *td) { /* TODO; */ - return (0); + return (EOPNOTSUPP); } int @@ -271,7 +271,7 @@ ptrace_clear_single_step(struct thread *td) { /* TODO; */ - return (0); + return (EOPNOTSUPP); } void