Peter Collingbourne
2014-Nov-20 00:58 UTC
[LLVMdev] Proposal: add Go frontend subproject based on llgo
On Thu, Nov 20, 2014 at 12:19:06AM +0100, Joerg Sonnenberger wrote:> On Wed, Nov 19, 2014 at 01:53:17PM -0800, Peter Collingbourne wrote: > > llgo depends on certain third-party components, namely a copy of the Go > > standard library (libgo), a Go program analysis library (go.tools) and two > > library dependencies of the standard library (libbacktrace and libffi). > > I think providing a better alternative to libffi is already a goal of > some people, but what is libbacktrace needed for? What is not provided > by the Itanium Unwind ABI?According to the libbacktrace readme file:> As of September 2012, libbacktrace only supports ELF executables with > DWARF debugging information. The library is written to make it > straightforward to add support for other object file and debugging > formats.Ian (the author of libbacktrace) may be able to provide more context. Thanks, -- Peter
Ian Taylor
2014-Nov-20 02:15 UTC
[LLVMdev] Proposal: add Go frontend subproject based on llgo
On Wed, Nov 19, 2014 at 4:58 PM, Peter Collingbourne <peter at pcc.me.uk> wrote:> On Thu, Nov 20, 2014 at 12:19:06AM +0100, Joerg Sonnenberger wrote: >> On Wed, Nov 19, 2014 at 01:53:17PM -0800, Peter Collingbourne wrote: >> > llgo depends on certain third-party components, namely a copy of the Go >> > standard library (libgo), a Go program analysis library (go.tools) and two >> > library dependencies of the standard library (libbacktrace and libffi). >> >> I think providing a better alternative to libffi is already a goal of >> some people, but what is libbacktrace needed for? What is not provided >> by the Itanium Unwind ABI? > > According to the libbacktrace readme file: > >> As of September 2012, libbacktrace only supports ELF executables with >> DWARF debugging information. The library is written to make it >> straightforward to add support for other object file and debugging >> formats. > > Ian (the author of libbacktrace) may be able to provide more context.I'm not sure I know the context for which I am providing context. That said, libbacktrace is not an instantiation of the unwind ABI, it is a client. The unwind ABI gives you a call stack but only provides PC and SP values. libbacktrace gives you function names, file names, and line numbers. It does this by reading the debug info at runtime; at present it only supports DWARF. Ian
Joerg Sonnenberger
2014-Nov-20 14:16 UTC
[LLVMdev] Proposal: add Go frontend subproject based on llgo
On Wed, Nov 19, 2014 at 04:58:08PM -0800, Peter Collingbourne wrote:> On Thu, Nov 20, 2014 at 12:19:06AM +0100, Joerg Sonnenberger wrote: > > On Wed, Nov 19, 2014 at 01:53:17PM -0800, Peter Collingbourne wrote: > > > llgo depends on certain third-party components, namely a copy of the Go > > > standard library (libgo), a Go program analysis library (go.tools) and two > > > library dependencies of the standard library (libbacktrace and libffi). > > > > I think providing a better alternative to libffi is already a goal of > > some people, but what is libbacktrace needed for? What is not provided > > by the Itanium Unwind ABI? > > According to the libbacktrace readme file: > > > As of September 2012, libbacktrace only supports ELF executables with > > DWARF debugging information. The library is written to make it > > straightforward to add support for other object file and debugging > > formats.My question still stands. Do you use it for nice backtraces in debugging situations? Joerg
Peter Collingbourne
2014-Nov-20 20:46 UTC
[LLVMdev] Proposal: add Go frontend subproject based on llgo
On Thu, Nov 20, 2014 at 03:16:49PM +0100, Joerg Sonnenberger wrote:> On Wed, Nov 19, 2014 at 04:58:08PM -0800, Peter Collingbourne wrote: > > On Thu, Nov 20, 2014 at 12:19:06AM +0100, Joerg Sonnenberger wrote: > > > On Wed, Nov 19, 2014 at 01:53:17PM -0800, Peter Collingbourne wrote: > > > > llgo depends on certain third-party components, namely a copy of the Go > > > > standard library (libgo), a Go program analysis library (go.tools) and two > > > > library dependencies of the standard library (libbacktrace and libffi). > > > > > > I think providing a better alternative to libffi is already a goal of > > > some people, but what is libbacktrace needed for? What is not provided > > > by the Itanium Unwind ABI? > > > > According to the libbacktrace readme file: > > > > > As of September 2012, libbacktrace only supports ELF executables with > > > DWARF debugging information. The library is written to make it > > > straightforward to add support for other object file and debugging > > > formats. > > My question still stands. Do you use it for nice backtraces in debugging > situations?It appears so. I did not write the code in libgo that deals with stack traces; Ian did. If you have any other questions about this, it would be best to ask him. Thanks, -- Peter