Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldfire-gnu-discuss] zero divide trap when running Debug Sprite Example "Fibo"


  • To: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
  • Subject: Re: [coldfire-gnu-discuss] zero divide trap when running Debug Sprite Example "Fibo"
  • From: Nathan Sidwell <nathan@xxxxxxxxxxxxxxxx>
  • Date: Fri, 04 Jul 2008 07:44:12 +0100

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