I’m new to zig and low-level programming, I’ve been debugging in LLDB, and for LLDB to let me watch the variables in my code I found that I need to set the dwarf_format to either @"64" or @"32", however when I do that, the stack trace that zig prints on @panic becomes a lot less understandable.
???:?:?: 0x7ff79d7816a2 in ??? (my-exe.exe)
???:?:?: 0x7ff79d7811ae in ??? (my-exe.exe)
???:?:?: 0x7ff79d781120 in ??? (my-exe.exe)
C:\Program Files\Zig\zig-x86_64-windows-0.16.0\lib\libc\mingw\crt\crtexe.c:259: 0x7ff79d8b6d6b in __tmainCRTStartup (crt2.obj)
mainret = _tmain (argc, argv, envp);
C:\Program Files\Zig\zig-x86_64-windows-0.16.0\lib\libc\mingw\crt\crtexe.c:179: 0x7ff79d8b6dcb in mainCRTStartup (crt2.obj)
ret = __tmainCRTStartup ();
???:?:?: 0x7ff9af55e956 in ??? (KERNEL32.DLL)
???:?:?: 0x7ff9b0b07c1b in ??? (ntdll.dll)
As a workaround, I’ve set a build option that sets the dwarf_format to be not null just when I’m doing debugging with LLDB, so this isn’t a big deal. But I would greatly appreciate if someone could tell me how I can make both the printed stack trace and LLDB work at the same time or just explain why this happens. I’m on windows, targeting x86_64 windows gnu, in case that’s relevant, and I am using CodeLLDB which is a vs code plugin.