Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Nov 2018 22:11:26 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340025 - head/sys/riscv/riscv
Message-ID:  <201811012211.wA1MBQ7v030299@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811012211.wA1MBQ7v030299>