1*a8778fd7Skamil /* $NetBSD: ptrace.h,v 1.3 2019/06/18 21:18:12 kamil Exp $ */ 227620987Smatt 327620987Smatt /*- 427620987Smatt * Copyright (c) 2014 The NetBSD Foundation, Inc. 527620987Smatt * All rights reserved. 627620987Smatt * 727620987Smatt * This code is derived from software contributed to The NetBSD Foundation 827620987Smatt * by Matt Thomas of 3am Software Foundry. 927620987Smatt * 1027620987Smatt * Redistribution and use in source and binary forms, with or without 1127620987Smatt * modification, are permitted provided that the following conditions 1227620987Smatt * are met: 1327620987Smatt * 1. Redistributions of source code must retain the above copyright 1427620987Smatt * notice, this list of conditions and the following disclaimer. 1527620987Smatt * 2. Redistributions in binary form must reproduce the above copyright 1627620987Smatt * notice, this list of conditions and the following disclaimer in the 1727620987Smatt * documentation and/or other materials provided with the distribution. 1827620987Smatt * 1927620987Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2027620987Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2127620987Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2227620987Smatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2327620987Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2427620987Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2527620987Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2627620987Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2727620987Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2827620987Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2927620987Smatt * POSSIBILITY OF SUCH DAMAGE. 3027620987Smatt */ 3127620987Smatt 3227620987Smatt #ifndef _OR1K_PTRACE_H_ 3327620987Smatt #define _OR1K_PTRACE_H_ 3427620987Smatt 3527620987Smatt /* 3627620987Smatt * OR1K-dependent ptrace definitions. 3727620987Smatt * Note that PT_STEP is _not_ supported. 3827620987Smatt */ 3927620987Smatt #define PT_GETREGS (PT_FIRSTMACH + 0) 4027620987Smatt #define PT_SETREGS (PT_FIRSTMACH + 1) 4127620987Smatt 4227620987Smatt #define PT_MACHDEP_STRINGS \ 4327620987Smatt "PT_GETREGS", \ 4427620987Smatt "PT_SETREGS" 4527620987Smatt 465020ab68Schristos #include <machine/reg.h> 47*a8778fd7Skamil #define PTRACE_REG_PC(r) (r)->r_reg[31] 48*a8778fd7Skamil #define PTRACE_REG_FP(r) (r)->r_reg[1] 495020ab68Schristos #define PTRACE_REG_SET_PC(r, v) (r)->r_reg[31] = (v) 505020ab68Schristos #define PTRACE_REG_SP(r) (r)->r_reg[11] 515020ab68Schristos #define PTRACE_REG_INTRV(r) (r)->r_reg[0] 525020ab68Schristos 5327620987Smatt #endif /* _OR1K_PTRACE_H_ */ 54