[ECOS] [i386 PC platform] Problem with external GDB interrupt
Nick Garnett
nickg@cygnus.co.uk
Thu Aug 31 04:30:00 GMT 2000
Fabrice Gautier <Fabrice_Gautier@sdesigns.com> writes:
> Hi,
>
> When I do a external interrupt with gdb the PC is always one byte too far,
> so if i do not set $pc=$pc-1 the prgram crash when restarting.
>
> Does the HAL_STUB_PLATFORM_STUBS_FIXUP macro is suposed to do something to
> do about this ?
>
Yes. I suspect that this macro was added after the PC HAL was done,
and it was not updated.
It probably needs to look something like this:
// We have to rewind the PC in case of a breakpoint.
#define HAL_STUB_PLATFORM_STUBS_FIXUP() \
CYG_MACRO_START \
if (CYGNUM_HAL_VECTOR_BREAKPOINT == __get_trap_number()) \
put_register(PC, get_register(PC) - 1); \
CYG_MACRO_END
Define it in i386_stub.h, since, despite its name, it is architecture
rather than platform specific.
--
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK
More information about the Ecos-discuss
mailing list