From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.61.230 with SMTP id w66mr16566215yhc.26.1432996014434; Sat, 30 May 2015 07:26:54 -0700 (PDT) X-Received: by 10.140.29.119 with SMTP id a110mr182493qga.20.1432996014416; Sat, 30 May 2015 07:26:54 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!z60no4670726qgd.1!news-out.google.com!k20ni45027qgd.0!nntp.google.com!z60no4671569qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 30 May 2015 07:26:54 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.237.62.132; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 105.237.62.132 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <41913ae0-7513-4be5-bb94-b834836f8525@googlegroups.com> Subject: Arm - ravenscar - exceptions - last chance handler From: jan.de.kruyf@gmail.com Injection-Date: Sat, 30 May 2015 14:26:54 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:193403 Date: 2015-05-30T07:26:54-07:00 List-Id: 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.