* Re: gdb for AT91SAM7
[not found] ` <40a670230805141712n3afdf48dladfa89d669d2aeaa@mail.gmail.com>
@ 2008-05-15 12:09 ` Michael Snyder
0 siblings, 0 replies; only message in thread
From: Michael Snyder @ 2008-05-15 12:09 UTC (permalink / raw)
To: Roman Mashak; +Cc: gdb-patches
On Wed, 2008-05-14 at 17:12 -0700, Roman Mashak wrote:
> Hello,
>
> 2008/5/14 Michael Snyder <msnyder@specifix.com>:
> > When you say the application is linked to 0x100000,
> > do you mean that that is the start address?
>
> I mean, this is the address specified in the linker script and by
> which the image is burnt in flash.
Specified as what? The base load address? Or the start
of execution address? They're not the same, you know.
I'm developing a hunch that perhaps your linker script
does not specify a start-of-execution address.
>
> > Before you say "continue", or "jump *0x100000", if you
> > ask gdb for the current instruction pointer (presumably
> > "info reg pc"), what does it say?
>
> This is the strange point. The first time I run it says "pc =
> 0x100496", any other run gets PC equal to 0x0. Moreover ALL registers
> are set to 0x0.
>
> I guess there is something wrong with the initialization of JTAG in
> .gdbinit. T
Could very well be. If the PC contains some random address
(eg. zero) and you say "continue", gdb is just going to let
the target start executing code at that random address.
Elf files can have a start-of-execution address specified,
though. When you use gdb to load the file, gdb should
set the pc to that address.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-15 0:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <40a670230805140042m311ccf04xb948628d0fa4532c@mail.gmail.com>
[not found] ` <1210788778.4615.590.camel@localhost.localdomain>
[not found] ` <40a670230805141712n3afdf48dladfa89d669d2aeaa@mail.gmail.com>
2008-05-15 12:09 ` gdb for AT91SAM7 Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox