Re: Loading debug symbols for load-foreign-library
| Newsgroups | gmane.lisp.guile.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Sep 12, 2024 at 02:15:48AM +0400, Artyom Bologov wrote: > Hi y'all, > > I'm working on a Guile-based tool (https://github.com/aartaka/mgamma) > reliant on (system foreign-library) FFI. So I'm doing multiple > load-foreign-library for the libraries used. But when I need to debug > the code at the intersection of Guile and these libraries in GDB, I > can't get debug symbols. > > I'm on Guix, which complicates things a bit. I've followed the > instructions for GDB setup from > https://guix.gnu.org/manual/en/html_node/Separate-Debug-Info.html It > makes C programs I compile debuggable with all the symbols present. But > it doesn't propagate to Guile somewhy, even though I'm loading the same > libraries C programs are linked against. > > The only thing that differs between C and Guile seems to be dlopen/dlsym > used in Guile instead of linking libraries into the binary C compiler > does. Might this be the reason? How do I fix that and get my debug > symbols, if anyhow? AFAIK, gdb "just" has to find the .so in question (provided that this has debug symbols, of course). Cheers -- t
signature.asc
(application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZuJt/AAKCRAFyCz1etHa Ri5KAJwPP2GkHDlqPJq9HIHjGkjhmW4mrwCfd7Q/tajJqTz1s1xNKqvNmGz2498= =0ltp -----END PGP SIGNATURE-----