Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Debug symbols on Linux

Discussion in 'Linux' started by joepadmiraal, Oct 31, 2022.

  1. joepadmiraal

    joepadmiraal

    Joined:
    Feb 16, 2017
    Posts:
    27
    Hi,

    I'm developing a native plugin.
    I'm able to use it within my Unity example app but I'm now looking into a bug in my C code.
    It crashes with `Caught fatal signal - signo:11 code:1 errno:0 addr:0x55002d981430`.
    It generates a core file in `/var/lib/apport/coredump`.
    In the build settings I enabled `Development build`, hoping it will add debug symbols.
    However the core file does not seem to have any debug symbols as `gdb -c core....` gives:
    Code (CSharp):
    1. (gdb) bt
    2. #0  0x00007f00b785d100 in ?? ()
    3. #1  0x00007faab785d429 in ?? ()
    4. #2  0x0000000002967400 in ?? ()
    5. #3  0x00000000029674c0 in ?? ()
    6. #4  0x00000000029675b0 in ?? ()
    7. #5  0x00007faab7867a8c in ?? ()
    8. #6  0x00000000024b0480 in ?? ()
    9. #7  0x00000000024b0480 in ?? ()
    10. #8  0x00000000028dc480 in ?? ()
    11. #9  0x0000000002967400 in ?? ()
    12. #10 0x00007fab587cf924 in ?? ()
    13. #11 0x00007faab702908e in ?? ()
    14. #12 0x00000000024b0480 in ?? ()
    15. #13 0x00007faa00000000 in ?? ()
    16. #14 0x0000000002967180 in ?? ()
    17. #15 0x03cda0741bcd1800 in ?? ()
    18. #16 0x0000000000000008 in ?? ()
    19. #17 0x00000000024b0480 in ?? ()
    20. #18 0x00000000028dc480 in ?? ()
    21. #19 0x0000000002a01880 in ?? ()
    22. #20 0x0000000000000000 in ?? ()
    23.  
    Does anyone have an idea on how to get a stack trace with debug symbols?
    Thanks,
    Joep
     
    VRGroupRWTH likes this.
  2. VRGroupRWTH

    VRGroupRWTH

    Joined:
    Oct 23, 2021
    Posts:
    10
    I'm having a similar issue of getting (il2cpp) debug symbols in Linux to actually work for anything (mainly want them for profiling). Did you get any update on this or have any hints?
     
  3. joepadmiraal

    joepadmiraal

    Joined:
    Feb 16, 2017
    Posts:
    27
    Hi, unfortunately not.
    I ended up creating a small wrapper executable in C which I use to test and debug my plugin without using Unity.
    But I guess that's not helpful at all when we are talking about il2cpp :(
    Did you see this page about stack traces for il2cpp in the manual?