|
Message
From: "Robert Cragie" <rcc@j...>
Date: Wed, 10 Sep 2003 18:19:20 +0100
Subject: [openrisc] SIGBUS when using eCos diag_printf
This is a bit of a long shot posting here, but I was wondering if anyone
else has experienced this problem. I am getting a SIGBUS (bus error)
exception when trying to call the printf supplied with eCos. This is generic
code and works fine on all other eCos platforms, so the problem must be
something to do with the OpenRISC environment.
If I do:
diag_printf("Just a string\n");
it seems to work OK.
However, if I do:
diag_printf("Print an integer %d\n", integer);
it bombs out of GDB with something like this:
Program received signal SIGBUS, Bus error.
0x00007f9c in _cvt(unsigned long long, char*, long, char*) (val=1987,
buf=0xcc0c "", radix=10, digits=0x1116c "0123456789")
at /home/rcc/ecos-sr/ecos/packages/infra/current/src/diag.cxx:273
273 *cp++ = digits[val % radix];
Current language: auto; currently c++
I am using GDB 5.3 and GCC 3.2.3 from the OpenCores CVS server.
Anyone seen this, or any ideas what might be going on? My feeling is it's
something to do with the 'val % radix' expression - 'val' being unsigned
long long etc and the associated math library. I will continue to
investigate further and see if I can spot anything odd.
Robert Cragie, Design Engineer
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
http://www.jennic.com Tel: +44 (0) 114 281 2655
_______________________________________________________________
|
 |