Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

I'll say it again for the logic impaired. -- Larry Wall


devel / comp.lang.ada / Re: Extra information in the message string of exceptions.

SubjectAuthor
* Extra information in the message string of exceptions.Rod Kay
+* Re: Extra information in the message string of exceptions.Fabien Chouteau
|+* Re: Extra information in the message string of exceptions.G.B.
||`- Re: Extra information in the message string of exceptions.Dmitry A. Kazakov
|+- Re: Extra information in the message string of exceptions.Rod Kay
|`* Re: Extra information in the message string of exceptions.Fabien Chouteau
| +- Re: Extra information in the message string of exceptions.Anh Vo
| `* Re: Extra information in the message string of exceptions.Jerry
|  +* Re: Extra information in the message string of exceptions.Dmitry A. Kazakov
|  |`- Re: Extra information in the message string of exceptions.Jerry
|  `* Re: Extra information in the message string of exceptions.Dmitry A. Kazakov
|   `* Re: Extra information in the message string of exceptions.Rod Kay
|    `* Re: Extra information in the message string of exceptions.Jerry
|     +* Re: Extra information in the message string of exceptions.Rod Kay
|     |+- Re: Extra information in the message string of exceptions.Gautier write-only address
|     |`- Re: Extra information in the message string of exceptions.G.B.
|     `- Re: Extra information in the message string of exceptions.Jerry
+* Re: Extra information in the message string of exceptions.Gautier write-only address
|+* Re: Extra information in the message string of exceptions.Randy Brukardt
||`- Re: Extra information in the message string of exceptions.Rod Kay
|`- Re: Extra information in the message string of exceptions.Rod Kay
+* Re: Extra information in the message string of exceptions.Luke A. Guest
|`* Re: Extra information in the message string of exceptions.Rod Kay
| `- Re: Extra information in the message string of exceptions.Luke A. Guest
+* Re: Extra information in the message string of exceptions.DrPi
|`* Re: Extra information in the message string of exceptions.Jerry
| `* Re: Extra information in the message string of exceptions.Gautier write-only address
|  +- Re: Extra information in the message string of exceptions.Randy Brukardt
|  +- Re: Extra information in the message string of exceptions.Simon Wright
|  `- Re: Extra information in the message string of exceptions.Jerry
`- Re: Extra information in the message string of exceptions.Robin Vowels

Pages:12
Re: Extra information in the message string of exceptions.

<tjdrlq$2olii$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8973&group=comp.lang.ada#8973

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rodakay5@gmail.com (Rod Kay)
Newsgroups: comp.lang.ada
Subject: Re: Extra information in the message string of exceptions.
Date: Thu, 27 Oct 2022 22:56:45 +1100
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <tjdrlq$2olii$1@dont-email.me>
References: <t7ktsu$178$1@dont-email.me>
<f22b1f5b-e436-412e-94ba-8cb177764a31n@googlegroups.com>
<3bc7a99c-d541-497b-b3fd-7a6db0ee0de9n@googlegroups.com>
<574017e3-d354-41b9-87a1-1f3aa6edf4a2n@googlegroups.com>
<t7pour$50r$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 27 Oct 2022 11:56:42 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="1312f7afe70cd3c46502295dfb19cb0c";
logging-data="2905682"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+rpFHUrRRF7uAnrdOm+WoLmRBXSsG5F2o="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:yHJva8rD2rwt9KvYC73uGsMzMMM=
Content-Language: en-US
In-Reply-To: <t7pour$50r$1@gioia.aioe.org>
 by: Rod Kay - Thu, 27 Oct 2022 11:56 UTC

On 8/6/22 19:08, Dmitry A. Kazakov wrote:
> On 2022-06-08 09:31, Jerry wrote:
>
>> But has no effect on this program;
>>
>> procedure CE_2 is
>>      i : Positive;
>>      j : Integer := 1;
>> begin
>>      i := -j;
>> end CE_2;
>
> I noticed that it requires a user-defined [sub]type AND nested subprogram:
>
>    procedure Test (A : Integer) is
>       subtype T is Integer range 0 .. 42;
>       i : T;
>    begin
>       i := A; -- This will work
>    end;
> begin
>    Test (-1);
>

Are you sure about this ?

I tried ...

procedure Example
is
X : Positive := 5;
begin
loop
X := X - 1;
end loop;
end Example;

.... with the -gnateE and saw this result ...

[rod@orth example]$ ./example

raised CONSTRAINT_ERROR : example.adb:6:14 range check failed
value 0 not in 1..2147483647
[./example]
0x55916975377f Example at example.adb:6
0x559169753b74 Main at b__example.adb:193
[/usr/lib/libc.so.6]
0x7f9230be728e
0x7f9230be7348
[./example]
0x559169753623 _start at start.S:115
0xfffffffffffffffe

Re: Extra information in the message string of exceptions.

<371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8974&group=comp.lang.ada#8974

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:2909:b0:6ee:6c83:9769 with SMTP id m9-20020a05620a290900b006ee6c839769mr1567843qkp.732.1667003719000;
Fri, 28 Oct 2022 17:35:19 -0700 (PDT)
X-Received: by 2002:a05:622a:1355:b0:39c:d13a:1e01 with SMTP id
w21-20020a05622a135500b0039cd13a1e01mr1922114qtk.596.1667003718878; Fri, 28
Oct 2022 17:35:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Fri, 28 Oct 2022 17:35:18 -0700 (PDT)
In-Reply-To: <tjdrlq$2olii$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=174.26.235.106; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG
NNTP-Posting-Host: 174.26.235.106
References: <t7ktsu$178$1@dont-email.me> <f22b1f5b-e436-412e-94ba-8cb177764a31n@googlegroups.com>
<3bc7a99c-d541-497b-b3fd-7a6db0ee0de9n@googlegroups.com> <574017e3-d354-41b9-87a1-1f3aa6edf4a2n@googlegroups.com>
<t7pour$50r$1@gioia.aioe.org> <tjdrlq$2olii$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com>
Subject: Re: Extra information in the message string of exceptions.
From: list_email@icloud.com (Jerry)
Injection-Date: Sat, 29 Oct 2022 00:35:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2656
 by: Jerry - Sat, 29 Oct 2022 00:35 UTC

On Thursday, October 27, 2022 at 4:57:08 AM UTC-7, roda...@gmail.com wrote:
> On 8/6/22 19:08, Dmitry A. Kazakov wrote:
> > On 2022-06-08 09:31, Jerry wrote:
> >
> >> But has no effect on this program;
> >>
> >> procedure CE_2 is
> >> i : Positive;
> >> j : Integer := 1;
> >> begin
> >> i := -j;
> >> end CE_2;
> >
> > I noticed that it requires a user-defined [sub]type AND nested subprogram:
> >
> > procedure Test (A : Integer) is
> > subtype T is Integer range 0 .. 42;
> > i : T;
> > begin
> > i := A; -- This will work
> > end;
> > begin
> > Test (-1);
> >
> Are you sure about this ?
>
> I tried ...
>
>
> procedure Example
> is
> X : Positive := 5;
> begin
> loop
> X := X - 1;
> end loop;
> end Example;
>
>
> ... with the -gnateE and saw this result ...
>
>
> [rod@orth example]$ ./example
>
> raised CONSTRAINT_ERROR : example.adb:6:14 range check failed
> value 0 not in 1..2147483647
> [./example]
> 0x55916975377f Example at example.adb:6
> 0x559169753b74 Main at b__example.adb:193
> [/usr/lib/libc.so.6]
> 0x7f9230be728e
> 0x7f9230be7348
> [./example]
> 0x559169753623 _start at start.S:115
> 0xfffffffffffffffe

So -gnateE works part of the time?
Jerry

Re: Extra information in the message string of exceptions.

<tji5i6$3bjhn$3@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8975&group=comp.lang.ada#8975

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rodakay5@gmail.com (Rod Kay)
Newsgroups: comp.lang.ada
Subject: Re: Extra information in the message string of exceptions.
Date: Sat, 29 Oct 2022 14:10:02 +1100
Organization: A noiseless patient Spider
Lines: 105
Message-ID: <tji5i6$3bjhn$3@dont-email.me>
References: <t7ktsu$178$1@dont-email.me>
<f22b1f5b-e436-412e-94ba-8cb177764a31n@googlegroups.com>
<3bc7a99c-d541-497b-b3fd-7a6db0ee0de9n@googlegroups.com>
<574017e3-d354-41b9-87a1-1f3aa6edf4a2n@googlegroups.com>
<t7pour$50r$1@gioia.aioe.org> <tjdrlq$2olii$1@dont-email.me>
<371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 29 Oct 2022 03:09:59 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="903a9aa28ae6585f7fa4018a74f4bc63";
logging-data="3526199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vrcV17InzhaMa6ptMxd877vU7vsDTDx4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:IDzSdFd8I5ELND6dfxFQnRIY03Q=
In-Reply-To: <371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com>
Content-Language: en-US
 by: Rod Kay - Sat, 29 Oct 2022 03:10 UTC

On 29/10/22 11:35, Jerry wrote:
> On Thursday, October 27, 2022 at 4:57:08 AM UTC-7, roda...@gmail.com
wrote:
>> On 8/6/22 19:08, Dmitry A. Kazakov wrote:
>>>
>>> I noticed that it requires a user-defined [sub]type AND nested
subprogram:
>>>
>>> procedure Test (A : Integer) is
>>> subtype T is Integer range 0 .. 42;
>>> i : T;
>>> begin
>>> i := A; -- This will work
>>> end;
>>> begin
>>> Test (-1);
>>>
>> Are you sure about this ?
>>
>> I tried ...
>>
>>
>> procedure Example
>> is
>> X : Positive := 5;
>> begin
>> loop
>> X := X - 1;
>> end loop;
>> end Example;
>>
>>
>> ... with the -gnateE and saw this result ...
>>
>>
>> [rod@orth example]$ ./example
>>
>> raised CONSTRAINT_ERROR : example.adb:6:14 range check failed
>> value 0 not in 1..2147483647
>> [./example]
>> 0x55916975377f Example at example.adb:6
>> 0x559169753b74 Main at b__example.adb:193
>> [/usr/lib/libc.so.6]
>> 0x7f9230be728e
>> 0x7f9230be7348
>> [./example]
>> 0x559169753623 _start at start.S:115
>> 0xfffffffffffffffe
>
> So -gnateE works part of the time?
> Jerry

I've not tested this extensively but assume the extra info would be
shown in most cases.

One exception is the following ...

procedure Example
is
X : Positive := 0 with Unreferenced;
begin
null;
end Example;

.... which shows a compile time warning ...

gprbuild -d -P/home/rod/Desktop/sandbox/ada/example/example.gpr
-XLace_Build_Mode=debug -XLace_Restrictions=xgc -XLace_OS=Linux
-Xrestrictions=xgc
Compile
[Ada] example.adb
example.adb:3:20: warning: value not in range of type
"Standard.Positive" [enabled by default]
example.adb:3:20: warning: Constraint_Error will be raised at run time
[enabled by default]
Bind
[gprbind] example.bexch
[Ada] example.ali
Link
[link] example.adb
[2022-10-29 13:56:36] process terminated successfully, elapsed time: 00.60s

.... and when run ...

[rod@orth example]$ ./example

raised CONSTRAINT_ERROR : example.adb:3 range check failed
[./example]
0x560439f23710 Example at example.adb:3
0x560439f23b00 Main at b__example.adb:193
[/usr/lib/libc.so.6]
0x7f746d52928e
0x7f746d529348
[./example]
0x560439f23623 _start at start.S:115
0xfffffffffffffffe

I'm a little surprised that the compiler shows a warning rather than
an error but I suppose there must be some reason for that.

Re: Extra information in the message string of exceptions.

<cc7b931e-db4e-499e-aa17-5a14517e293fn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8976&group=comp.lang.ada#8976

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:2905:b0:6ee:e598:a973 with SMTP id m5-20020a05620a290500b006eee598a973mr2167305qkp.338.1667025002244;
Fri, 28 Oct 2022 23:30:02 -0700 (PDT)
X-Received: by 2002:a05:622a:550:b0:39c:f017:4b0c with SMTP id
m16-20020a05622a055000b0039cf0174b0cmr2551759qtx.452.1667025002097; Fri, 28
Oct 2022 23:30:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Fri, 28 Oct 2022 23:30:01 -0700 (PDT)
In-Reply-To: <tji5i6$3bjhn$3@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:1210:282b:1d00:417d:2318:383b:f13c;
posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG
NNTP-Posting-Host: 2a02:1210:282b:1d00:417d:2318:383b:f13c
References: <t7ktsu$178$1@dont-email.me> <f22b1f5b-e436-412e-94ba-8cb177764a31n@googlegroups.com>
<3bc7a99c-d541-497b-b3fd-7a6db0ee0de9n@googlegroups.com> <574017e3-d354-41b9-87a1-1f3aa6edf4a2n@googlegroups.com>
<t7pour$50r$1@gioia.aioe.org> <tjdrlq$2olii$1@dont-email.me>
<371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com> <tji5i6$3bjhn$3@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cc7b931e-db4e-499e-aa17-5a14517e293fn@googlegroups.com>
Subject: Re: Extra information in the message string of exceptions.
From: gautier_niouzes@hotmail.com (Gautier write-only address)
Injection-Date: Sat, 29 Oct 2022 06:30:02 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 22
 by: Gautier write-only a - Sat, 29 Oct 2022 06:30 UTC

> One exception is the following ...
>
> procedure Example
> is
> X : Positive := 0 with Unreferenced;
> begin
> null;
> end Example;
>
> ... which shows a compile time warning ...
> [...]
> I'm a little surprised that the compiler shows a warning rather than
> an error but I suppose there must be some reason for that.

HAC (and perhaps other compilers) is stricter on that point:
procedure Example is
X : Positive := 0;
begin
null;
end Example;

example.adb: 2:20-21: error in range constraint: value of expression (0) is out the destination's range, 1 .. 9223372036854775807
E

Re: Extra information in the message string of exceptions.

<tjiq29$3dqso$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8977&group=comp.lang.ada#8977

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: bauhaus@notmyhomepage.invalid (G.B.)
Newsgroups: comp.lang.ada
Subject: Re: Extra information in the message string of exceptions.
Date: Sat, 29 Oct 2022 10:59:53 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <tjiq29$3dqso$1@dont-email.me>
References: <t7ktsu$178$1@dont-email.me>
<f22b1f5b-e436-412e-94ba-8cb177764a31n@googlegroups.com>
<3bc7a99c-d541-497b-b3fd-7a6db0ee0de9n@googlegroups.com>
<574017e3-d354-41b9-87a1-1f3aa6edf4a2n@googlegroups.com>
<t7pour$50r$1@gioia.aioe.org> <tjdrlq$2olii$1@dont-email.me>
<371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com>
<tji5i6$3bjhn$3@dont-email.me>
Reply-To: nonlegitur@notmyhomepage.de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 29 Oct 2022 08:59:53 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ec8d82d1a065ee0465ed087dc618aed0";
logging-data="3599256"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18v+w/bBeSkdOIr5nCvSDvJ6OMnD+H9kjQ="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.4.0
Cancel-Lock: sha1:AxsW6Yni2ie6HiRe78QxfmnijsY=
Content-Language: en-US
In-Reply-To: <tji5i6$3bjhn$3@dont-email.me>
 by: G.B. - Sat, 29 Oct 2022 08:59 UTC

On 29.10.22 05:10, Rod Kay wrote:

>    I'm a little surprised that the compiler shows a warning rather than an error but I suppose there must be some reason for that.

Formal language reasons aside, a program's author may have wanted
the program to raise an exception. (For example: "There is
a TODO here, so make sure the program never runs past this point.
Assign out of range.")

GNAT just emits a warning for the following program, albeit not the
same warning.
BTW, what would SPARK do here?

procedure Excpt
is
Works_As_Expected: exception;

procedure Test is
begin
if 1 = 1 then
raise Works_As_Expected;
else
raise Program_Error;
end if;
end Test;
begin
Test;
end Excpt;

Re: Extra information in the message string of exceptions.

<73e78776-5522-4f4f-b9da-a920d5174b17n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=8979&group=comp.lang.ada#8979

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a0c:9a0d:0:b0:4b1:982e:96d4 with SMTP id p13-20020a0c9a0d000000b004b1982e96d4mr13234738qvd.114.1667261105457;
Mon, 31 Oct 2022 17:05:05 -0700 (PDT)
X-Received: by 2002:a0c:8e89:0:b0:4bb:62a2:b3cb with SMTP id
x9-20020a0c8e89000000b004bb62a2b3cbmr13551861qvb.58.1667261105253; Mon, 31
Oct 2022 17:05:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Mon, 31 Oct 2022 17:05:04 -0700 (PDT)
In-Reply-To: <371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=174.26.235.106; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG
NNTP-Posting-Host: 174.26.235.106
References: <t7ktsu$178$1@dont-email.me> <f22b1f5b-e436-412e-94ba-8cb177764a31n@googlegroups.com>
<3bc7a99c-d541-497b-b3fd-7a6db0ee0de9n@googlegroups.com> <574017e3-d354-41b9-87a1-1f3aa6edf4a2n@googlegroups.com>
<t7pour$50r$1@gioia.aioe.org> <tjdrlq$2olii$1@dont-email.me> <371ba8ca-2304-4e8a-a77f-82548d706105n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <73e78776-5522-4f4f-b9da-a920d5174b17n@googlegroups.com>
Subject: Re: Extra information in the message string of exceptions.
From: list_email@icloud.com (Jerry)
Injection-Date: Tue, 01 Nov 2022 00:05:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4445
 by: Jerry - Tue, 1 Nov 2022 00:05 UTC

On Friday, October 28, 2022 at 5:35:20 PM UTC-7, Jerry wrote:
> On Thursday, October 27, 2022 at 4:57:08 AM UTC-7, roda...@gmail.com wrote:
> > On 8/6/22 19:08, Dmitry A. Kazakov wrote:
> > > On 2022-06-08 09:31, Jerry wrote:
> > >
> > >> But has no effect on this program;
> > >>
> > >> procedure CE_2 is
> > >> i : Positive;
> > >> j : Integer := 1;
> > >> begin
> > >> i := -j;
> > >> end CE_2;
> > >
> > > I noticed that it requires a user-defined [sub]type AND nested subprogram:
> > >
> > > procedure Test (A : Integer) is
> > > subtype T is Integer range 0 .. 42;
> > > i : T;
> > > begin
> > > i := A; -- This will work
> > > end;
> > > begin
> > > Test (-1);
> > >
> > Are you sure about this ?
> >
> > I tried ...
> >
> >
> > procedure Example
> > is
> > X : Positive := 5;
> > begin
> > loop
> > X := X - 1;
> > end loop;
> > end Example;
> >
> >
> > ... with the -gnateE and saw this result ...
> >
> >
> > [rod@orth example]$ ./example
> >
> > raised CONSTRAINT_ERROR : example.adb:6:14 range check failed
> > value 0 not in 1..2147483647
> > [./example]
> > 0x55916975377f Example at example.adb:6
> > 0x559169753b74 Main at b__example.adb:193
> > [/usr/lib/libc.so.6]
> > 0x7f9230be728e
> > 0x7f9230be7348
> > [./example]
> > 0x559169753623 _start at start.S:115
> > 0xfffffffffffffffe
> So -gnateE works part of the time?
> Jerry
I simply do not get the robust results others are reporting, and as I noted earlier in this thread, some of the suggested switches are flagged as illegal on macOS

From the docs at https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gnat_ugn_unw/Symbolic-Traceback.html#Symbolic-Traceback:
"Note that this feature is not supported on all platforms. See GNAT.Traceback.Symbolic spec in g-trasym.ads for a complete list of currently supported platforms."

I'm using an older version of GNAT (2017) on Mac and the list of supported platforms is actually in s-trasym.ads and reads as such:
-- The full capability is currently supported on the following targets:

-- HP-UX ia64
-- GNU/Linux x86, x86_64, ia64
-- FreeBSD x86, x86_64
-- Solaris sparc and x86
-- Windows

Maybe newer versions of GNAT are more Mac-friendly. So in order to get both extra information and symbolic tracebacks I've had to write my own garbage-y handler that redirects text output to a file, calls system stuff such as tail and atos, bla bla bla. I hope atos is still supported when I eventually move to ARM. atos I think is Apple's thing that works like addr2line.

BTW, for others attempting this on macOS, turn of address randomization with -no_pie. That is, in my gpr, I have this:
package Linker is
for Default_Switches ("Ada") use ("-Wl,-no_pie");
end Linker;


devel / comp.lang.ada / Re: Extra information in the message string of exceptions.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor