From: jan.de.kruyf@gmail.com
Subject: Arm - ravenscar - exceptions - last chance handler
Date: Sat, 30 May 2015 07:26:54 -0700 (PDT)
Date: 2015-05-30T07:26:54-07:00 [thread overview]
Message-ID: <41913ae0-7513-4be5-bb94-b834836f8525@googlegroups.com> (raw)
Could someone interprete this code for me (from the runtime) and advise
-------------------------------
package body Ada.Exceptions is
---------------------
-- Raise_Exception --
---------------------
procedure Raise_Exception (E : Exception_Id; Message : String := "") is
pragma Unreferenced (E);
procedure Last_Chance_Handler (Msg : System.Address; Line : Integer);
pragma Import (C, Last_Chance_Handler, "__gnat_last_chance_handler");
pragma No_Return (Last_Chance_Handler);
begin
Last_Chance_Handler (Message'Address, 0);
end Raise_Exception;
end Ada.Exceptions;
--------------------------------
How is last chance handler going to know the --length-- of the message?
because I like to issue a printk before I die when in the linux kernel.
I have used last chance handler in gdb by looking at the memory, but kernel modules are not debugged that way.
If we say that I have to append an ASCII.NUL when I raise an exception then it runs havoc with the other runtime modules where exceptions are used.
Thanks,
j.
next reply other threads:[~2015-05-30 14:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 14:26 jan.de.kruyf [this message]
2015-05-30 14:53 ` Arm - ravenscar - exceptions - last chance handler Jacob Sparre Andersen
2015-05-30 18:48 ` jan.de.kruyf
2015-05-30 19:18 ` Simon Wright
2015-05-30 20:57 ` jan.de.kruyf
2015-05-30 15:31 ` Bob Duff
2015-05-30 16:10 ` jan.de.kruyf
2015-05-30 16:50 ` Simon Wright
2015-05-30 20:59 ` jan.de.kruyf
2015-05-30 15:43 ` Simon Wright
2015-05-30 16:14 ` jan.de.kruyf
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox