Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "David Mc Kenna" <mckennad@esatclear.ie>
To: Richard Earnshaw <rearnsha@arm.com>,
	mckennad@esatclear.ie, gdb@sources.redhat.com,
	insight@sources.redhat.com,   Richard.Earnshaw@arm.com
Cc: gdb@sources.redhat.com, insight@sources.redhat.com
Subject: Re: ARM Simulator Bug?
Date: Wed, 03 Sep 2003 09:13:00 -0000	[thread overview]
Message-ID: <3f55b0d1.2580.0@esatclear.ie> (raw)

Hi Richard,

>Try using an 
>
>	LDR r0, =__thumb
>

This command places the correct value into R0 for the BX command, but the bug
within the simulator is still present. 

Take the following code as an example.

0000005c <TST_start>:
  5c:   e3a0da12        mov     sp, #73728      ; 0x12000
  60:   e59f00a4        ldr     r0, [pc, #164]  ; 10c <IRQ_Interrupt+0x50>
  64:   e12fff10        bx      r0

00000068 <__start_of_thumb>:

void    IRQ_Interrupt(void);

int main()
{
  68:   b580            push    {r7, lr}
  6a:   466f            mov     r7, sp
  6c:   b082            sub     sp, #8

If I place a breakpoint at 0x6c and run the code gdb loses itself, i.e. if I
interrupt it with ctrl-c it says the PC is 0x0580fa70 or some thing similar.
Again, if I place a breakpoint at 0x5c, I can single step successfully. If I
single step to 0x68 and place a breakpoint at 0x6c and continue, gdb loses itself
again.

This problem only occurs when I attempt to use thumb. If I remove the bx command
and compile my C file in ARM mode the simulator works perfectly.

Is it possible to see which commands the simulator is executing? 

Thanks,
Dave


--
http://www.iol.ie


             reply	other threads:[~2003-09-03  9:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-03  9:13 David Mc Kenna [this message]
2003-09-03  9:51 ` Richard Earnshaw
  -- strict thread matches above, loose matches on Subject: below --
2003-09-03 14:57 David Mc Kenna
2003-09-03 15:20 ` Richard Earnshaw
2003-09-04 11:45   ` Richard Earnshaw
2003-09-03 10:36 David Mc Kenna
2003-09-03 13:53 ` Richard Earnshaw
2003-09-02 14:31 David Mc Kenna
2003-09-02 18:17 ` Richard Earnshaw
2003-09-02 11:27 David Mc Kenna
2003-09-02 12:43 ` Richard Earnshaw

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=3f55b0d1.2580.0@esatclear.ie \
    --to=mckennad@esatclear.ie \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gdb@sources.redhat.com \
    --cc=insight@sources.redhat.com \
    --cc=rearnsha@arm.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