-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zig doesn't produce global variable debug information #15095
Comments
Does adding |
It's not only a Windows problem, I believe. |
I don't think that's because of it, D has the same problem, even thought you can see the !dbg https://godbolt.org/z/5GGz3W1To |
Yeah, I think I was wrong and I apologize. Actually exporting the variable works for me on Linux, you could try that in the meantime. The problem seems to be with namespaced non-exported global variables... I can't get to inspect them with GDB. |
Not fixed by #15349: var global: i32 = 0;
pub fn main() !void {
global += 124;
}
|
Is there any progress on this? I'd like to help but I'm not really familiar with the Zig compiler infrastructure yet.. |
Can confirm this also happens while targeting thumb-freestanding-none and using the Cortex-Debug VSCode extension. At first I thought it could have been an extension issue but it's GDB that doesn't "see" the variable. |
This is not solved for me. This is using a default exe setup I think. Here is my tasks.json: {
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "zig build --summary failures",
"group": "build",
"problemMatcher": [
"$gcc"
],
"presentation": {
"clear": true
}
},
]
} and here is launch.json {
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/zig-out/bin/zigtesting.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"preLaunchTask": "build"
},
]
} Running on Windows 11 Home. |
On a separate note, would it be possible to get a specific github label for bugs about missing debug information, or actually debug-related issues in general? I would love to report more, as they are at the top of the list of Zig things we would like improved for Tides, but it's hard to know which ones are already reported (long list of issues to look through). |
Are you able to see the value of
Sure! |
Zig Version
zig-windows-x86_64-0.11.0-dev.2287+1de64dba2.zip
OS: Windows 10 x64
Steps to Reproduce and Observed Behavior
break and try to inspect
global
vscode:
remedybg:
vscode launch config:
Expected Behavior
I should be able to inspect
global
in the debugger's watch menuThe text was updated successfully, but these errors were encountered: