From owner-svn-src-stable-9@FreeBSD.ORG Thu May 17 19:01:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0FF261065674; Thu, 17 May 2012 19:01:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF0328FC16; Thu, 17 May 2012 19:01:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4HJ1D85011759; Thu, 17 May 2012 19:01:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4HJ1Dr1011756; Thu, 17 May 2012 19:01:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201205171901.q4HJ1Dr1011756@svn.freebsd.org> From: John Baldwin Date: Thu, 17 May 2012 19:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235559 - in stable/9/sys/amd64: amd64 include X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 19:01:14 -0000 Author: jhb Date: Thu May 17 19:01:13 2012 New Revision: 235559 URL: http://svn.freebsd.org/changeset/base/235559 Log: Partial MFC of 232520: For amd64 PT_GETXSTATE and PT_SETXSTATE have been redefined to match the i386 values. The old values are still supported but should no longer be used. Modified: stable/9/sys/amd64/amd64/ptrace_machdep.c stable/9/sys/amd64/include/ptrace.h Modified: stable/9/sys/amd64/amd64/ptrace_machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/ptrace_machdep.c Thu May 17 18:40:27 2012 (r235558) +++ stable/9/sys/amd64/amd64/ptrace_machdep.c Thu May 17 19:01:13 2012 (r235559) @@ -126,6 +126,12 @@ cpu_ptrace(struct thread *td, int req, v return (cpu32_ptrace(td, req, addr, data)); #endif + /* Support old values of PT_GETXSTATE and PT_SETXSTATE. */ + if (req == PT_FIRSTMACH + 0) + req = PT_GETXSTATE; + if (req == PT_FIRSTMACH + 1) + req = PT_SETXSTATE; + switch (req) { case PT_GETXSTATE: case PT_SETXSTATE: Modified: stable/9/sys/amd64/include/ptrace.h ============================================================================== --- stable/9/sys/amd64/include/ptrace.h Thu May 17 18:40:27 2012 (r235558) +++ stable/9/sys/amd64/include/ptrace.h Thu May 17 19:01:13 2012 (r235559) @@ -35,7 +35,14 @@ #define __HAVE_PTRACE_MACHDEP -#define PT_GETXSTATE (PT_FIRSTMACH + 0) -#define PT_SETXSTATE (PT_FIRSTMACH + 1) +/* + * On amd64 (PT_FIRSTMACH + 0) and (PT_FIRSTMACH + 1) are old values for + * PT_GETXSTATE and PT_SETXSTATE. They should not be (re)used. + */ + +#define PT_GETXMMREGS (PT_FIRSTMACH + 0) /* i386 only */ +#define PT_SETXMMREGS (PT_FIRSTMACH + 1) /* i386 only */ +#define PT_GETXSTATE (PT_FIRSTMACH + 2) +#define PT_SETXSTATE (PT_FIRSTMACH + 3) #endif