comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Unhandled Exception in Tartan generated code for M68040
Date: Wed, 12 Jul 2017 22:30:25 +0300
Date: 2017-07-12T22:30:25+03:00	[thread overview]
Message-ID: <esnbmiFlhnuU1@mid.individual.net> (raw)
In-Reply-To: <ef7cb295-37db-41e5-aad2-0f1ffcc553a3@googlegroups.com>

On 17-07-07 12:58 , Petter Fryklund wrote:
> Hi, I'm trying to locate an Unhandled Exception. The printout
> received is
>
> Unhandled Exception vector 37 at 45E6C
>
> or
>
> Unhandled Exception vector 18 at 10A40E
>
> I assume there is a way to use the .map file to find out where these
> exceptions occur, but endless googling has come up with nil.

And in another message, Petter continued:

 > the Unexpected Exception is erronous, the code has exception
 > handler everywhere.

Are you sure, Petter, that "exception" in "Unhandled Exception" means an 
Ada exception? I seem to remember that some processors use the term 
"exception" for what is more commonly called a "trap". Perhaps these are 
HW traps that are _not_ mapped to Ada exceptions?

The Wikipedia page on M68000 
(https://en.wikipedia.org/wiki/Motorola_68000_series) uses the term 
"exception" for HW events,and so does the M68040 User Manual 
(http://cache.freescale.com/files/32bit/doc/ref_manual/MC68040UM.pdf).

Table 8-1 in the User Manual lists these HW exceptions, by number. It 
seems that numbers 32..47 are of SW origin, triggered by the TRAP 
instruction, while number 18 is described as "Unassigned, Reserved". 
Numbers 25..31 are "Interrupt Autovectors". This suggests that these HW 
exceptions should be treated as interrupts in the Ada program, that is, 
processed by interrupt handlers, not by exception handlers. On the other 
hand, the Tartan run-time system may map some of these HW exceptions to 
Ada exceptions, for example number 5, which is "Integer Divide by Zero".

(Disclaimer: I know nothing about the Tartan compiler.)

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .


  parent reply	other threads:[~2017-07-12 19:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  9:58 Unhandled Exception in Tartan generated code for M68040 Petter Fryklund
2017-07-07 16:05 ` Anh Vo
2017-07-07 16:09   ` Simon Wright
2017-07-12 15:20   ` Petter Fryklund
2017-07-12 19:30 ` Niklas Holsti [this message]
2017-08-07  5:48   ` Petter Fryklund
2017-08-07  6:21     ` Niklas Holsti
2017-08-08  5:33       ` Petter Fryklund
2017-08-16 11:04         ` Petter Fryklund
2017-09-04  8:46           ` Petter Fryklund
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox