I have a situation where I have 2 C functions. These C functions have many error checking scenarios where I use a exit(1) to cop out. A million places in system verilog code calls these 2 C functions via DPI calls.
I used execinfo.h and backtrace() functions in my C routines but the stack trace info displays the C function but above that it just shows some random vcs_exe.sim.1234_1.so as the main caller function.
I even tried looking for this vcs_exe.sim.1234.so in the published area but it does not point to any known Sv file.
So, how can I get the caller non-C/SV function when stack trace is being displayed?