This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: [i386 PC platform] Problem with external GDB interrupt
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: Re: [ECOS] [i386 PC platform] Problem with external GDB interrupt
- From: Nick Garnett <nickg at cygnus dot co dot uk>
- Date: 31 Aug 2000 12:19:09 +0100
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Cygnus Solutions, a Red Hat company (Cambridge, UK)
- References: <8AE4B526B977D411841F00A0CC334020052C36@cuz-exchange.sdesigns.net>
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