comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: What do you think about this?
Date: Thu, 25 Jun 2015 08:29:44 +0100
Date: 2015-06-25T08:29:44+01:00	[thread overview]
Message-ID: <lylhf85jpz.fsf@pushface.org> (raw)
In-Reply-To: f5d4d901-fb45-4f83-8661-1f8551502bd1@googlegroups.com

Laurent <lutgenl@icloud.com> writes:

> Houston we have a problem: Exception name: SYSTEM.ASSERTIONS.ASSERT_FAILURE
> Message: failed precondition from common_defs_bci.ads:19
> Load address: 0x1070dc000
> Call stack traceback locations:
> 0x107111931 0x1070e35f1 0x1070ddf8c 0x1070de763 0x1070de147 0x1070df063
>
> 0x0000000107111931
> 0x00000001070E35F1
> 0x00000001070DDF8C
> 0x00000001070DE763
> 0x00000001070DE147
> 0x00000001070DF063
>
> I can interpret the 3 first lines. For the rest I will ask my cat(s).

GNAT.Traceback.Symbolic isn't useful on Mac OS X; all it does is report
the absolute addresses of the stack trace without interpretation. The
fact it does so on multiple lines addes to the inconvenience.

My little example (written for another purpose) is:

   with Ada.Exceptions;
   with Ada.Text_IO; use Ada.Text_IO;
   procedure Raiser is
   begin
      begin
         raise Constraint_Error;
      exception
         when E : Constraint_Error =>
            Put_Line ("CE raised.");
            Put_Line (Ada.Exceptions.Exception_Information (E));
            raise;
      end;
   end Raiser;

and when I run it I get (GNAT GPL 201[4,5], FSF GCC)

   $ ./raiser 
   CE raised.
   Exception name: CONSTRAINT_ERROR
   Message: raiser.adb:6 explicit raise
   Load address: 0x101819000
   Call stack traceback locations:
   0x10181a987 0x10181a925


   Execution terminated by unhandled exception
   Exception name: CONSTRAINT_ERROR
   Message: raiser.adb:6 explicit raise
   Load address: 0x101819000
   Call stack traceback locations:
   0x10181a987 0x10181a925

The first set of messages is from Exception_Information, the last
because of dropping out of the main program.

The linker, by default, generates position-independent executables
(protection against viruses); the Load address line is where we happened
to get loaded this time.

To decode the stack traceback, use atos

   $ atos -d -o raiser -l 0x101819000 0x10181a987 0x10181a925
   got symbolicator for raiser, base address 100000000
   _ada_raiser (in raiser) (raiser.adb:6)
   main (in raiser) (b~raiser.adb:197)

(run atos without -d to see why it's there!)


  parent reply	other threads:[~2015-06-25  7:29 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-21 18:38 Is there an easier way for this? Laurent
2015-06-21 19:15 ` Niklas Holsti
2015-06-21 19:41   ` Laurent
2015-06-21 19:25 ` Jeffrey R. Carter
2015-06-21 19:42   ` Laurent
2015-06-22 12:23   ` Laurent
2015-06-22 15:01     ` G.B.
2015-06-22 15:40       ` Laurent
2015-06-22 16:47     ` Jeffrey R. Carter
2015-06-22 16:41   ` Laurent
2015-06-22 16:47     ` Jeffrey R. Carter
2015-06-22 17:18       ` Laurent
2015-06-22 18:04         ` What do you think about this? Laurent
2015-06-23 14:21           ` Stephen Leake
2015-06-23 19:51             ` Laurent
2015-06-23 20:20               ` Anh Vo
2015-06-23 21:03                 ` Laurent
2015-06-23 22:17                   ` Shark8
2015-06-24  5:57                     ` Anh Vo
2015-06-24  7:58                       ` Laurent
2015-06-24 21:06                       ` Laurent
2015-06-24 21:45                         ` Anh Vo
2015-06-24 21:59                           ` Laurent
2015-06-24 22:35                           ` Simon Wright
2015-06-24 22:59                             ` Laurent
2015-06-25  2:56                               ` Anh Vo
2015-06-25  7:29                               ` Simon Wright [this message]
2015-06-25 16:55                                 ` Anh Vo
2015-06-25 17:27                                   ` Simon Wright
2015-06-25 18:13                                 ` Laurent
2015-06-25 18:36                                   ` Simon Wright
2015-06-24 23:10                             ` Anh Vo
2015-06-24 10:17               ` Stephen Leake
2015-06-24 17:20                 ` Jeffrey R. Carter
2015-06-24 20:50                   ` Laurent
2015-06-24 22:30                     ` Jeffrey R. Carter
2015-06-24 22:52                       ` Laurent
2015-06-27 17:12                       ` Laurent
2015-06-27 17:43                         ` Jeffrey R. Carter
2015-06-27 17:47                         ` J-P. Rosen
2015-06-27 18:54                         ` Simon Wright
2015-06-27 19:37                           ` Laurent
2015-06-27 19:47                             ` Jeffrey R. Carter
2015-06-27 20:39                             ` Simon Wright
2015-06-28  4:45                             ` J-P. Rosen
2015-06-28 14:08                         ` Stephen Leake
2015-06-28 16:10                           ` Laurent
2015-06-25 13:16                   ` Stephen Leake
2015-06-25 17:20                     ` Jeffrey R. Carter
2015-07-02 21:51                       ` Randy Brukardt
2015-07-03 12:31                         ` Stephen Leake
2015-07-03 17:11                           ` Laurent
2015-07-03 17:46                             ` Jeffrey R. Carter
2015-07-03 18:49                               ` Laurent
2015-07-04  3:26                                 ` Randy Brukardt
2015-07-03 19:17                             ` Simon Wright
2015-07-04  3:30                               ` Randy Brukardt
2015-07-04  4:19                                 ` Laurent
2015-07-04  7:43                                   ` Simon Wright
2015-07-04  9:07                                     ` Laurent
2015-07-04  7:42                                 ` Simon Wright
2015-07-05  0:56                                   ` Randy Brukardt
2015-07-03 17:35                           ` Randy Brukardt
2015-07-05 13:55                             ` Stephen Leake
2015-07-06 20:07                               ` Randy Brukardt
2015-06-24 20:21                 ` Laurent
2015-06-21 19:38 ` Is there an easier way for this? Pascal Obry
2015-06-21 19:54   ` Laurent
2015-06-21 20:39     ` Pascal Obry
2015-06-24  7:14 ` gautier_niouzes
2015-06-24 21:08   ` Laurent
replies disabled

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