From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 556 invoked by alias); 9 Dec 2004 11:21:42 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 421 invoked from network); 9 Dec 2004 11:21:27 -0000 Received: from unknown (HELO smtp.cs.nthu.edu.tw) (140.114.87.30) by sourceware.org with SMTP; 9 Dec 2004 11:21:27 -0000 Received: from webmail.cs.nthu.edu.tw (webmail.cs.nthu.edu.tw [140.114.87.10]) by smtp.cs.nthu.edu.tw (Postfix) with ESMTP id 3F16333034 for ; Thu, 9 Dec 2004 19:21:26 +0800 (CST) Received: by webmail.cs.nthu.edu.tw (Postfix, from userid 60001) id B9E7F1FBE9; Thu, 9 Dec 2004 19:20:51 +0800 (CST) Received: from mcs6.cs.nthu.edu.tw (mcs6.cs.nthu.edu.tw [140.114.88.126]) by webmail.cs.nthu.edu.tw (IMP) with HTTP for ; Thu, 9 Dec 2004 19:20:51 +0800 Message-ID: <1102591251.41b8351391e24@webmail.cs.nthu.edu.tw> Date: Thu, 09 Dec 2004 11:21:00 -0000 From: libra To: gdb@sources.redhat.com Subject: Some problem in ARM (armemu.c) MIME-Version: 1.0 Content-Type: text/plain; charset=BIG5 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-SW-Source: 2004-12/txt/msg00064.txt.bz2 Hello,all I am trying to modify the arm file (gdb/sim/arm/armemu.c) to fit my research purpose. In this file(armemu.c), the function "ARMul_Emulate32 (ARMul_State * state)" simulate the ARM instruction set. My question is that when i modify the instrction operation (see below 1), and rebuild the gdb, i also write a test program(see below 2). Once exexuting the test program(see below 3), the whole program halt. I do not know what happen, because i think the modifying is simple. Thanks a lot!! Best Regards!! 1. the origin code : case 0x08: /* ADD reg */ .... ..... rhs = DPRegRHS; dest = LHS + rhs; WRITEDEST (dest); break; after modifying : case 0x08: /* ADD reg */ .... ..... rhs = DPRegRHS; dest = LHS + rhs + 1; /*add one*/ WRITEDEST (dest); break; 2. test program : #include void main() { int a=0,b=1,c=2; a=b+c; printf("the result is %d\n",a); } 3. execution process : arm-elf-run a.out /*The program halt*/ ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. Computer Science Department, National Tsing Hua University