Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266463AbUFQM24 (ORCPT ); Thu, 17 Jun 2004 08:28:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266468AbUFQM2z (ORCPT ); Thu, 17 Jun 2004 08:28:55 -0400 Received: from p060192.ppp.asahi-net.or.jp ([221.113.60.192]:20467 "EHLO mitou.ysato.dip.jp") by vger.kernel.org with ESMTP id S266463AbUFQM2w (ORCPT ); Thu, 17 Jun 2004 08:28:52 -0400 Date: Thu, 17 Jun 2004 21:28:46 +0900 Message-ID: From: Yoshinori Sato To: Linus Torvalds Cc: linux kernel Mailing List Subject: [PATCH] H8/300 update (1/3) ptrace fix User-Agent: Wanderlust/2.11.24 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3445 Lines: 102 - Kconfig typo fix - PTRACE_PEEKUSER read process info support - exr restore fix - ptrace register offset fix -- Yoshinori Sato diff -ru -X .exclude-diff linux-2.6.7/arch/h8300/Kconfig linux-2.6.7-h8300/arch/h8300/Kconfig --- linux-2.6.7/arch/h8300/Kconfig 2004-06-16 14:19:44.000000000 +0900 +++ linux-2.6.7-h8300/arch/h8300/Kconfig 2004-06-07 00:50:45.000000000 +0900 @@ -223,7 +223,7 @@ config CONFIG_SH_STANDARD_BIOS bool "Use gdb protocol serial console" - depends on (!H8300H_SIM && H8S_SIM) + depends on (!H8300H_SIM && !H8S_SIM) help serial console output using GDB protocol. Require eCos/RedBoot diff -ru -X .exclude-diff linux-2.6.7/arch/h8300/kernel/ptrace.c linux-2.6.7-h8300/arch/h8300/kernel/ptrace.c --- linux-2.6.7/arch/h8300/kernel/ptrace.c 2004-06-16 14:19:09.000000000 +0900 +++ linux-2.6.7-h8300/arch/h8300/kernel/ptrace.c 2004-06-17 20:28:05.000000000 +0900 @@ -116,18 +116,36 @@ case PTRACE_PEEKUSR: { unsigned long tmp; - if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) + if ((addr & 3) || addr < 0 || addr >= sizeof(struct user)) { ret = -EIO; + break ; + } - tmp = 0; /* Default return condition */ + ret = 0; /* Default return condition */ addr = addr >> 2; /* temporary hack. */ + if (addr < H8300_REGS_NO) tmp = h8300_get_reg(child, addr); else { - ret = -EIO; - break ; + switch(addr) { + case 49: + tmp = child->mm->start_code; + break ; + case 50: + tmp = child->mm->start_data; + break ; + case 51: + tmp = child->mm->end_code; + break ; + case 52: + tmp = child->mm->end_data; + break ; + default: + ret = -EIO; + } } - ret = put_user(tmp,(unsigned long *) data); + if (!ret) + ret = put_user(tmp,(unsigned long *) data); break ; } diff -ru -X .exclude-diff linux-2.6.7/arch/h8300/platform/h8s/entry.S linux-2.6.7-h8300/arch/h8300/platform/h8s/entry.S --- linux-2.6.7/arch/h8300/platform/h8s/entry.S 2004-06-16 14:19:52.000000000 +0900 +++ linux-2.6.7-h8300/arch/h8300/platform/h8s/entry.S 2004-06-17 00:29:35.000000000 +0900 @@ -83,6 +83,7 @@ mov.l @(LER0-LER1:16,sp),er1 /* restore ER0 */ mov.l er1,@er0 mov.w @(LEXR-LER1:16,sp),r1 /* restore EXR */ + mov.b r1l,r1h mov.w r1,@(8:16,er0) mov.w @(LCCR-LER1:16,sp),r1 /* restore the RET addr */ mov.b r1l,r1h @@ -214,7 +215,6 @@ jsr @SYMBOL_NAME(syscall_trace) bra SYMBOL_NAME(ret_from_exception):8 - SYMBOL_NAME_LABEL(ret_from_fork) mov.l er2,er0 jsr @SYMBOL_NAME(schedule_tail) diff -ru -X .exclude-diff linux-2.6.7/arch/h8300/platform/h8s/ptrace_h8s.c linux-2.6.7-h8300/arch/h8300/platform/h8s/ptrace_h8s.c --- linux-2.6.7/arch/h8300/platform/h8s/ptrace_h8s.c 2004-06-16 14:19:01.000000000 +0900 +++ linux-2.6.7-h8300/arch/h8300/platform/h8s/ptrace_h8s.c 2004-06-02 23:33:03.000000000 +0900 @@ -23,7 +23,7 @@ static const int h8300_register_offset[] = { PT_REG(er1), PT_REG(er2), PT_REG(er3), PT_REG(er4), PT_REG(er5), PT_REG(er6), PT_REG(er0), PT_REG(orig_er0), - PT_REG(ccr), PT_REG(pc), PT_REG(exr) + PT_REG(ccr), PT_REG(pc), 0, PT_REG(exr) }; /* read register */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/