From owner-svn-src-all@FreeBSD.ORG Fri Mar 23 23:07:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1FF971065670; Fri, 23 Mar 2012 23:07:03 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BFF58FC17; Fri, 23 Mar 2012 23:07:03 +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 q2NN722g098217; Fri, 23 Mar 2012 23:07:02 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2NN727v098214; Fri, 23 Mar 2012 23:07:02 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203232307.q2NN727v098214@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 23 Mar 2012 23:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233402 - head/lib/libproc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 23:07:03 -0000 Author: gonzo Date: Fri Mar 23 23:07:02 2012 New Revision: 233402 URL: http://svn.freebsd.org/changeset/base/233402 Log: Make libproc compilable for MIPS Modified: head/lib/libproc/proc_bkpt.c head/lib/libproc/proc_regs.c Modified: head/lib/libproc/proc_bkpt.c ============================================================================== --- head/lib/libproc/proc_bkpt.c Fri Mar 23 22:55:37 2012 (r233401) +++ head/lib/libproc/proc_bkpt.c Fri Mar 23 23:07:02 2012 (r233402) @@ -44,6 +44,9 @@ __FBSDID("$FreeBSD$"); #if defined(__i386__) || defined(__amd64__) #define BREAKPOINT_INSTR 0xcc /* int 0x3 */ #define BREAKPOINT_INSTR_SZ 1 +#elif defined(__mips__) +#define BREAKPOINT_INSTR 0xd /* break */ +#define BREAKPOINT_INSTR_SZ 4 #else #error "Add support for your architecture" #endif Modified: head/lib/libproc/proc_regs.c ============================================================================== --- head/lib/libproc/proc_regs.c Fri Mar 23 22:55:37 2012 (r233401) +++ head/lib/libproc/proc_regs.c Fri Mar 23 23:07:02 2012 (r233402) @@ -58,6 +58,8 @@ proc_regget(struct proc_handle *phdl, pr *regvalue = regs.r_rip; #elif defined(__i386__) *regvalue = regs.r_eip; +#elif defined(__mips__) + *regvalue = regs.r_regs[PC]; #endif break; case REG_SP: @@ -65,6 +67,8 @@ proc_regget(struct proc_handle *phdl, pr *regvalue = regs.r_rsp; #elif defined(__i386__) *regvalue = regs.r_esp; +#elif defined(__mips__) + *regvalue = regs.r_regs[SP]; #endif break; default: @@ -93,6 +97,8 @@ proc_regset(struct proc_handle *phdl, pr regs.r_rip = regvalue; #elif defined(__i386__) regs.r_eip = regvalue; +#elif defined(__mips__) + regs.r_regs[PC] = regvalue; #endif break; case REG_SP: @@ -100,6 +106,8 @@ proc_regset(struct proc_handle *phdl, pr regs.r_rsp = regvalue; #elif defined(__i386__) regs.r_esp = regvalue; +#elif defined(__mips__) + regs.r_regs[PC] = regvalue; #endif break; default: