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.140.146.133 with SMTP id 127mr17743199qhs.8.1433011688803; Sat, 30 May 2015 11:48:08 -0700 (PDT) X-Received: by 10.140.95.135 with SMTP id i7mr200492qge.27.1433011688791; Sat, 30 May 2015 11:48:08 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!z60no4708318qgd.0!news-out.google.com!k20ni45031qgd.0!nntp.google.com!z60no4707452qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 30 May 2015 11:48:08 -0700 (PDT) In-Reply-To: <87617at8ub.fsf@adaheads.sparre-andersen.dk> 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 References: <41913ae0-7513-4be5-bb94-b834836f8525@googlegroups.com> <87617at8ub.fsf@adaheads.sparre-andersen.dk> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Arm - ravenscar - exceptions - last chance handler From: jan.de.kruyf@gmail.com Injection-Date: Sat, 30 May 2015 18:48:08 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:193414 Date: 2015-05-30T11:48:08-07:00 List-Id: > > > 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; > > > How is last chance handler going to know the --length-- of the > > message? > > Because it knows where 'First and 'Last of a string are stored > relatively to it's 'Address. > > Greetings, > > Jacob > -- > "It is very easy to get ridiculously confused about the > tenses of time travel, but most things can be resolved > by a sufficiently large ego." Hello Jacob, In the full runtime: probably. In the Arm Ravenscar: I doubt it. And the .ads file of the above says that the user of it shall provide a null terminated string (I spotted that after I posted.) But this has not been fixed in some of the ravenscar runtime sources. And from experience: my Arm board just kick the bucket on an exception, afterward I learned to put a break point in the last chance handler. Then I could see the string in memory. j.