This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB stub for RAM startup.


On Tue, Feb 10, 2004 at 09:20:11PM -0800, Ottawa Guy wrote:
> Hi Jonathan,
> Thanks for the response. Thanks for pointing out the
> option.
> I have few more more question. I am having problem
> doing single step in command line GDB. Following is
> what I am doing.
> 
> In my application main() function, I call
> "breakpoint()".Once my programs start up it would hit
> the breakpoint(), thus starting up my GDBs stub. Now I
> use the normal gdb client to connect to my target.
> 
> linux > sparc-elf-gdb -s helloWorld.out
> (gdb) target extended-remote /dev/ttyS1
> Remote debugging using /dev/ttyS1
> 0x010075f0 in _breakinst ()
>     at
> /users/hdewan/ecos/ecos-2.0/packages/language/c/libc/startup/v2_0/src/atexit.cxx:85
> 85      cyg_libc_invoke_atexit_handlers( void )
> Current language:  auto; currently c++
> (gdb) step
> 
> As you can see my breakpoint is at 0x010075f0. Is the
> "step" command suppose to single step in my program?

Yes, but there is a little problem. GDB knowns nothing about this
breakpoint. It did not place it there. So it does not known how the
correctly continue in its own. You need to increment the PC by 4
before doing the step command and then it should work.

       Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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