# Include debug symbols in sysimage from PackageCompiler.jl?

**URL:** <https://discourse.julialang.org/t/include-debug-symbols-in-sysimage-from-packagecompiler-jl/38034>\
**Category:** General Usage\
**Tags:** question, debugging, package-compiler, clang\
**Created:** [April 22, 2020, 4:15pm UTC](https://discourse.julialang.org/t/include-debug-symbols-in-sysimage-from-packagecompiler-jl/38034 "2020-04-22T16:15:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OliverEvans96](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliverevans96/32/4177_2.png) [@OliverEvans96](https://discourse.julialang.org/u/OliverEvans96)\
**Post date:** [April 22, 2020, 4:15pm UTC](https://discourse.julialang.org/t/include-debug-symbols-in-sysimage-from-packagecompiler-jl/38034/1 "2020-04-22T16:15:54Z")

</div>

I’m attempting to use PackageCompiler.jl to produce a `.so` containing Julia functions that can be called directly from C (after some julia initialization in the C code), as suggested by @kristoffer.carlsson in [this github comment](https://github.com/JuliaLang/PackageCompiler.jl/issues/257#issuecomment-614658462), but I’m getting a segfault and would like to investigate further. However, `gdb` isn’t very helpful here:

```julia
Thread 1 "test" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) backtrace
#0 0x0000000000000000 in ?? ()
#1 0x00007fffeba755fd in myotherfunc () from ./jpkg.so
#2 0x000055555555533d in main () at test.c:47

```

I’m assuming that this is because debugging symbols are disabled in the sysimage produced by `create_sysimage`. Is there any way to enable them?

Thanks,  
Oliver

---

<div class="post-metadata">

**Author:** ![oliver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliver/32/19264_2.png) [@oliver](https://discourse.julialang.org/u/oliver)\
**Post date:** [April 26, 2020, 6:21pm UTC](https://discourse.julialang.org/t/include-debug-symbols-in-sysimage-from-packagecompiler-jl/38034/2 "2020-04-26T18:21:03Z")

</div>

What about the clang debugger?

---

<div class="post-metadata">

**Author:** ![OliverEvans96](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliverevans96/32/4177_2.png) [@OliverEvans96](https://discourse.julialang.org/u/OliverEvans96)\
**Post date:** [April 26, 2020, 6:25pm UTC](https://discourse.julialang.org/t/include-debug-symbols-in-sysimage-from-packagecompiler-jl/38034/3 "2020-04-26T18:25:11Z")

</div>

Great suggestion! `lldb` seems significantly more helpful here than `gdb`. Thanks a lot!
