This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: cyg_hal_gdb_interrupt
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: John Newlin <jnewlin at rawbw dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 20 May 2004 11:12:43 +0100
- Subject: Re: [ECOS] cyg_hal_gdb_interrupt
- References: <20040519122935.U108@shell.rawbw.com>
John Newlin <jnewlin@rawbw.com> writes:
> In file:
> packages/hal/common/current/src/hal_stub.c
>
> There is this wonderful function: cyg_hal_gdb_interrupt
>
> This function saves the current instruction, and installs a break
> instruction. Generally this is safe, but on the Xtensa architecture
> instructions can be on any address alignment, which will cause the load of
> the old instruction and store of the new instruction to generate an
> exception.
>
> Is there a general way to override this function, or if I made a change to
> do a memcpy instead of load/store would you accept that back into the
> tree?
The ususal approach here is for the HAL to supply a substitute
routine. The ARM HAL does this since it has to deal with 32 bit ARM
breakpoints and 16 bit Thumb breakpoints, and has to decide which to
plant at runtime.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss