[coldfire-gnu-discuss] zero divide trap when running Debug Sprite Example "Fibo"
Nathan Sidwell
nathan at codesourcery.com
Fri Jul 4 06:44:12 UTC 2008
Mark Mitchell wrote:
> Christof Frey wrote:
>
>> when running the example on page 51 of the Getting Started guide on a
>> BCC5235 Coldfire board I am getting a zero divide trap.
>
> I suspect that you're actually getting some other trap; the default trap
> handlers are all mapped at the same address, so the debugger picks a
> name somewhat at random.
>
>> Is this related to the library used ? (note: the board has still the
>> Freescale dBug monitor application in flash - is there an interference ?)
>
>> Program received signal SIGTRAP, Trace/breakpoint trap.
>> 0x00000d3a in __cs3_isr_divide_by_zero ()
>> (gdb)
>
> Nathan, do you have ideas about how to figure out exactly what's going
> wrong here?
you have to examine the call stack. in gdb do (something like)
x/8xw $sp
you should be able to see the exception information there and the exception
address. consult the CFPRM for a description of the exception word.
It is unfortunate that gcc doesn't emit sufficient debug information on
interrupt functions for this to just look like parameters (we have an internal
enhancement issue for that)
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
More information about the coldfire-gnu-discuss
mailing list