Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: libra <mr924352@cs.nthu.edu.tw>
To: gdb@sources.redhat.com
Subject: Some problem in ARM (armemu.c)
Date: Thu, 09 Dec 2004 11:21:00 -0000	[thread overview]
Message-ID: <1102591251.41b8351391e24@webmail.cs.nthu.edu.tw> (raw)

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


             reply	other threads:[~2004-12-09 11:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-09 11:21 libra [this message]
2004-12-09 14:24 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1102591251.41b8351391e24@webmail.cs.nthu.edu.tw \
    --to=mr924352@cs.nthu.edu.tw \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox