This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Some problem in ARM (armemu.c)
- From: libra <mr924352 at cs dot nthu dot edu dot tw>
- To: gdb at sources dot redhat dot com
- Date: Thu, 9 Dec 2004 19:20:51 +0800
- Subject: Some problem in ARM (armemu.c)
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 <stdio.h>
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