#Debug Symbols not included?

1 messages · Page 1 of 1 (latest)

cold kite
#

I tried to debug Zig using GDB.

main.zig:

const std = @import("std");

pub fn main() !void {
    var val: i32 = 100;
    val += 1;
    std.debug.print("try debug {d}.\n", .{val});
}

command:

zig build-exe main.zig
gdb main.exe
b main.zig:4

However, I got an No symbol table is loaded. Use the "file" command. and could not add a breakpoint.
Do I need to add any additional arguments to add Debug Symbol?

platform:
os: windows10
zig: 0.11.0-dev.1987+a2c6ecd6d

clear oak
#

Do you have a pdb file next to the exe? You can consider using a windows debugger instead of gdb like WinDbgX , RemedyBG, or (if you are really desperate) visual studio.

cold kite
#

Yes, pdb files are also generated.

clear oak
#

I doubt any gdb version supports that format

cold kite
#

Thanks .
I will try a debugger other than GDB.

naive notch