This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with JEENI jtag module

"J.T. Conklin" wrote:
> >>>>> "Fernando" == Fernando Nasser <> writes:
> Fernando> The sequence to download a program is:
> Fernando> (gdb) file YOURFILENAME
> Fernando> (gdb) load
> Fernando> Only after the load command your executable will be in the
> Fernando> board memory and the PC will be set to your program entry
> Fernando> point (and the stack pointer to the stack etc.).
> Does load really set the stack pointer?  I thought that was typically
> done in the c startup code, along with clearing the bss and moving
> initialized data from ROM to RAM.

You're absolutely right for any target that uses generic_load().  It only
sets the PC.

But targets that use their own loading mechanisms do the weirds't things.
I was recently having to set manually the SP plus a few other things to one
of this beasts.  They have now added it to their startup code, as you say,
and we could use the standard generic_load().

Fernando Nasser
Red Hat - Toronto                       E-Mail:
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]