comp.lang.ada
 help / color / mirror / Atom feed
* Arm - ravenscar - exceptions - last chance handler
@ 2015-05-30 14:26 jan.de.kruyf
  2015-05-30 14:53 ` Jacob Sparre Andersen
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: jan.de.kruyf @ 2015-05-30 14:26 UTC (permalink / 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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-05-30 20:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-30 14:26 Arm - ravenscar - exceptions - last chance handler jan.de.kruyf
2015-05-30 14:53 ` 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

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