comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: About static libraries and Debian policy
Date: Sun, 16 May 2010 11:13:47 +0100
Date: 2010-05-16T11:13:47+01:00	[thread overview]
Message-ID: <m2y6fkupb8.fsf@pushface.org> (raw)
In-Reply-To: 87sk5sdega.fsf@ludovic-brenta.org

Ludovic Brenta <ludovic@ludovic-brenta.org> writes:

> Simon Wright writes on comp.lang.ada:
>> Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
>>
>>> 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, could you point me towards the patch for this? On Mac OS X, we
>> don't have addr2line, the equivalent is atos.
>
> Latest version:
> http://green.ada-france.org:8081/revision/file/adfe332edf9057b6de622519fd9161421c5c9c76/debian/patches/ada-symbolic-tracebacks.diff
>
> HTH

Thanks for that, I'm sure it'll help. As an alternative, could use one
of the GNAT.OS_Lib.Spawn calls?

I notice that towards the end the comment says

+      --  version dependant variants for the option names. Therefore our
+      --  implementation spawns a shell script that does normalization of
+      --  the option and then executes addr2line and communicates with it
+      --  through a bidirectional pipe.

but it looks to me as though it spawns addr2line drectly?

+          char *const argv[] = { "addr2line",
+                                 exe_name,
+                                 "--demangle=gnat",
+                                 "--functions",
+                                 "--basenames",
+                                 NULL };
+          char *const envp[] = { NULL };
+          if (execve("/usr/bin/addr2line", argv, envp) < 0) {
+            CLOSE1; CLOSE2;
+          }



  reply	other threads:[~2010-05-16 10:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14 13:16 About static libraries and Debian policy Dmitry A. Kazakov
2010-05-14 14:57 ` sjw
2010-05-14 15:29   ` Dmitry A. Kazakov
2010-05-14 18:43     ` Ludovic Brenta
2010-05-14 19:54       ` Dmitry A. Kazakov
2010-05-14 20:38         ` Ludovic Brenta
2010-05-15  7:46           ` Dmitry A. Kazakov
2010-05-15 10:07             ` Ludovic Brenta
2010-05-15 11:07       ` Simon Wright
2010-05-15 21:48         ` Ludovic Brenta
2010-05-16 10:13           ` Simon Wright [this message]
2010-05-16 10:31             ` Ludovic Brenta
2010-05-19 21:59       ` Björn Persson
2010-05-20  7:20         ` Symbolic tracebacks on Debian (Was: About static libraries and Debian policy) Ludovic Brenta
2010-05-20  8:38           ` Alex R. Mosteo
2010-05-21 12:26             ` Ludovic Brenta
2010-05-25  8:39               ` Symbolic tracebacks on Debian Ludovic Brenta
2010-05-20 14:04           ` Symbolic tracebacks on Debian (Was: About static libraries and Debian policy) Dmitry A. Kazakov
2010-05-21  8:52           ` Symbolic tracebacks on Debian Stephen Leake
2010-05-22 11:03             ` (see below)
2010-05-22 11:25               ` Simon Wright
2010-05-22 21:37                 ` (see below)
2010-05-23 13:28                 ` Stephen Leake
2010-05-23 15:52                   ` Simon Wright
2010-05-23 18:35                     ` (see below)
2010-05-23 19:46                       ` Simon Wright
2010-05-24  9:04                         ` Stephen Leake
2010-05-24 19:14                           ` Simon Wright
2010-05-25  2:13                             ` Stephen Leake
2010-05-25  9:02                               ` Alex R. Mosteo
2010-05-25 19:16                               ` Simon Wright
2010-05-26  7:30                                 ` Stephen Leake
2010-05-24  9:03                   ` Stephen Leake
2010-05-22 11:30               ` Yannick Duchêne (Hibou57)
2010-05-22 13:20             ` Björn Persson
2010-05-22 13:56               ` Dmitry A. Kazakov
2010-05-22 12:53           ` Symbolic tracebacks on Debian (Was: About static libraries and Debian policy) Björn Persson
replies disabled

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