When I attempt to compile my program after trimming down all the stuff zig.build needs to do, I finally get a much mroe constrained, but unhelpful, fault after running commands manually:
Did you explain how to build a debug “zig” executable and I missed it? My issue is that zig is segfaulting and gdb doesn’t seem to even give me a useful backtrace without a debug build.
I’m currently following the instructions from “zig-bootstrap” to build from source, but I do not see any references to what to tweak to make a debug build.
Ah, sorry, I misunderstood your initial question. I thought you were looking for information regarding how to use gdb with Zig and were looking for an example.
And yes, if the cmake build flags are set to release, they’ll alter the behaviour of the C ecosystem. Unfortunately the cmake flags are very poorly documented but it’s generally excepted that you’ll need to be building with debug flags to do get you’re looking for.
I’m going to edit the title of your post to include this because I think it will help direct people to this post.