From: Dmitry A. Kazakov on
http://people.debian.org/~lbrenta/debian-ada-policy.html

requires no static libraries. Is that consistent with GNAT symbolic
traceback, which for some unclear reasons is not included into GNAT
relocatable RTL.

BTW, Why there should be no traceback when relocatable libraries are used?

What would happen if g-trasym.o (symbolic traceback) were put into a static
library and then linked together with relocatable RTL?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: sjw on
On May 14, 2:16 pm, "Dmitry A. Kazakov" <mail...(a)dmitry-kazakov.de>
wrote:
> http://people.debian.org/~lbrenta/debian-ada-policy.html
>
> requires no static libraries. Is that consistent with GNAT symbolic
> traceback, which for some unclear reasons is not included into GNAT
> relocatable RTL.
>
> BTW, Why there should be no traceback when relocatable libraries are used?

The problem is, I think, that the GNAT RTL (libgnat, libgnarl) isn't
compiled with debug (-g), so there are no symbols available to
interpret the traceback.

This was certainly true with VxWorks static libraries a while back,
while we were compiling our own we used -g which allowed us to use
vxaddr2line and trace into the RTS. Since we changed to using the
standard RTS + changes compiled using powerpc-wrs-vxworks-gnatmake -a
I can't say we've missed the facility.

> What would happen if g-trasym.o (symbolic traceback) were put into a static
> library and then linked together with relocatable RTL?

I don't know whether you can debug into or get traceback from inside a
dynamic library. Probably depends on the target OS.

From: Dmitry A. Kazakov on
On Fri, 14 May 2010 07:57:49 -0700 (PDT), sjw wrote:

> On May 14, 2:16�pm, "Dmitry A. Kazakov" <mail...(a)dmitry-kazakov.de>
> wrote:
>> http://people.debian.org/~lbrenta/debian-ada-policy.html
>>
>> requires no static libraries. Is that consistent with GNAT symbolic
>> traceback, which for some unclear reasons is not included into GNAT
>> relocatable RTL.
>>
>> BTW, Why there should be no traceback when relocatable libraries are used?
>
> The problem is, I think, that the GNAT RTL (libgnat, libgnarl) isn't
> compiled with debug (-g), so there are no symbols available to
> interpret the traceback.

Maybe, but other shared libraries can well be compiled with -g as well as
the application. But linking them with shared RTL fails if any of them uses
Traceback.Symbolic.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: Ludovic Brenta on
"Dmitry A. Kazakov" <mailbox(a)dmitry-kazakov.de> writes:
> On Fri, 14 May 2010 07:57:49 -0700 (PDT), sjw wrote:
>
>> On May 14, 2:16 pm, "Dmitry A. Kazakov" <mail...(a)dmitry-kazakov.de>
>> wrote:
>>> http://people.debian.org/~lbrenta/debian-ada-policy.html
>>>
>>> requires no static libraries.

Yes, it does:

§ 5.3.3 Ada object files [...]
Rule: The -dev package SHALL provide a static library in
/usr/lib/libLIBRARY.a.

>>> Is that consistent with GNAT symbolic
>>> traceback, which for some unclear reasons is not included into GNAT
>>> relocatable RTL.

The debugging symbols are in additional packages with names ending in
-dbg. Re-read § 5.6 The separate debugging information package and §
6.1 Debugging programs that use shared libraries.

>>> BTW, Why there should be no traceback when relocatable libraries are
>>> used?

Traceback is always available, either in symbolic or numeric form. To
get the symbolic form, you need the -dbg package installed.

>> The problem is, I think, that the GNAT RTL (libgnat, libgnarl) isn't
>> compiled with debug (-g), so there are no symbols available to
>> interpret the traceback.

Yes, libgnat is compiled with -g but the debugging information is
detached into the -dbg packages.

> Maybe, but other shared libraries can well be compiled with -g as well
> as the application. But linking them with shared RTL fails if any of
> them uses Traceback.Symbolic.

That's because GNAT GPL includes a non-standard 'libaddr2line.a'
produced from binutils (and therefore pure GPL) and calls that to
produce the symbolic tracebacks. GCC (from the FSF) lacks this library.
I patched GCC to use an alternate mechanism instead, i.e. fork()/exec()
and call /usr/bin/addr2line. This restores the functionality in the FSF
version of GNAT.

--
Ludovic Brenta.
From: Dmitry A. Kazakov on
On Fri, 14 May 2010 20:43:27 +0200, Ludovic Brenta wrote:

> � 5.3.3 Ada object files [...]
> Rule: The -dev package SHALL provide a static library in
> /usr/lib/libLIBRARY.a.

OK.

>>>> BTW, Why there should be no traceback when relocatable libraries are
>>>> used?
>
> Traceback is always available, either in symbolic or numeric form. To
> get the symbolic form, you need the -dbg package installed.

I meant g-trasym.adb. In Fedora's gcc 4.4 it is in the static library, but
absent in the shared. I don't understand why.

>> Maybe, but other shared libraries can well be compiled with -g as well
>> as the application. But linking them with shared RTL fails if any of
>> them uses Traceback.Symbolic.
>
> That's because GNAT GPL includes a non-standard 'libaddr2line.a'
> produced from binutils (and therefore pure GPL) and calls that to
> produce the symbolic tracebacks. GCC (from the FSF) lacks this library.
> I patched GCC to use an alternate mechanism instead, i.e. fork()/exec()
> and call /usr/bin/addr2line. This restores the functionality in the FSF
> version of GNAT.

Does it mean that under Debian g-trasym.adb is in both libraries?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de