This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gdb for egcs/sh-elf
- To: corsepiu at faw dot uni-ulm dot de
- Subject: Re: gdb for egcs/sh-elf
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 15 Jan 1998 00:26:35 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <34BCDD3E.85DA8B14@faw.uni-ulm.de>you write:
> Here is only an excerpt of some observations during a debug session:
>
> 1) Setting a break point
>
> > (gdb) >br bsp_start
> > Breakpoint 1 at 0xa0484ea
>
> According to the disassembled code this isn't the address of the
> function but at some small offset close beside it.
> > 0a0484e8 <_bsp_start>:
> > a0484e8: 2f 86 mov.l r8,@-r15
> > a0484ea: d1 34 mov.l a0485bc <_bsp_start+0xd4>,r1
> ! 0xa04
> > a0484ec: 2f 96 mov.l r9,@-r15
This is normal - when setting a breakpoint gdb will try to set it
at the first instruction beyond the prologue.
> 2) Setting another break point:
>
> > (gdb) br bsp_cleanup
> > Breakpoint 2 at 0xa0484b0:file
> /users/corsepiu/src/rtems/corsepiu/rtems/c/src/lib/libbsp/sh/amos/startup/.
> ./../shared/main.c,
> line 42.
>
> This time this is a complete false location, not even related to this
> function.
> > 0a0484b0 <_set_vector>:
> > a0484b0: 62 43 mov r4,r2
> > a0484b2: 2f e6 mov.l r14,@-r15
> > a0484b4: 64 53 mov r5,r4
According to "nm" what is the value of "bsp_cleanup"? Is it immediately
before _set_vector? Might be skip_prologue not stopping when it should
at the end of a function.
> 3) After starting the program anything crashes and no breakpoint was
> trapped.
This sounds more like a problem with gdb, your stub, your application
or something else.
jeff