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: __mem_fault_handler, RedBoot and no GDB stubs.


David Vrabel said:
> Hi,
>
> There appears to be some confusion regarding RedBoot use of
> __mem_fault_handler.  This would typically be provided by the GDB stubs
> (CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS) but ARM (but not i386 or powerpc,
> for example) provides it in hal/arm/arch/current/src/hal_misc.c if GDB
> stubs are disabled.  Additionally, RedBoot provides it if GDB stubs are
> disabled.
>
> Here's the patch I used to get it working on ARM.  It won't work on
> other archs as __mem_fault_handler is then undefined.  Is RedBoot at
> fault here, or ARM, or the other archs?

The ARM should be changed - it seems to be the only architecture which
does not have a line like this:
  hal/sh/arch/current/src/hal_misc.c:externC void* volatile __mem_fault_handler;

>
> diff -u -B -p -r1.10 main.c
> --- a/redboot/current/src/main.c 20 Apr 2004 15:11:31 -0000 1.10
> +++ b/redboot/current/src/main.c 13 May 2004 12:01:49 -0000
> @@ -225,10 +225,7 @@ _mon_write_char(char c, void **param)
>   // Handle illegal memory accesses (and other abort conditions)
>   //
>   static hal_jmp_buf error_jmpbuf;
> -#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
> -externC
> -#endif
> - void* volatile __mem_fault_handler;
> +externC void* volatile __mem_fault_handler;
>
>   static void error_handler(void)
>   {
>
> David Vrabel
> --
> David Vrabel, Design Engineer
>
> Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
> Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>




-- 
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]