Open ryuukk opened 1 year ago
Differences i notice between a valid C program, and program that i provide
C:
20 | S_GDATA32 [size = 32] `notice_me_global`
type = 0x0074 (int), addr = 0003:0000
D:
0 | S_GDATA32 [size = 40] `app_d.notice_me_global`
type = 0x0074 (int), addr = 0003:3504
20 |
for C
0 |
for D
app_d.notice_me_global
for D (notice the . (dot))
notice_me_global
for C
For D:
(notice it stops at the .(dot) and only mention app_d
)
For C:
Both use the same linker, both are debug builds:
Ready to test project (source + build script + launch.json)
Requirements:
Here just for the executables + dump:
Something i noticed:
There are no entry for app_d
in the PDB (it seems)
I don't know how the debugger works, but i assume it splits the name
app_d.notice_me_global
-> search for: app_d
then if found, look for: notice_me_global
?
Since nothing for app_d
it complains nothing was found
Perhaps if nothing was found it needs to try the full name app_d.notice_me_global
? that would solve it?
Then it's a problem that need to be a solved in msvc debugger? if so, what's the proper issue tracker to use?
On linux, with gdb, i can inspect the global properly:
objdump content:
<1><70>: Abbrev Number: 4 (DW_TAG_variable)
<71> DW_AT_name : app_d.notice_me_global
<88> DW_AT_type : <0x69>
<8c> DW_AT_external : 1
<8d> DW_AT_location : 9 byte block: 3 10 40 0 0 0 0 0 0 (DW_OP_addr: 4010)
full: https://gist.github.com/ryuukk/124ba68b0c7c17e5ba8452c4adbd6170
Zig's executable also have the same issue, i'll upload executables tomorow
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
Problem:
I can't inspect global, but i can inspect locals
According to:
llvm-pdbutil.exe dump -globals app.pdb > dump
Therefore i should be able to watch it via:
app.notice_me_global
But it says:
"app" is undefined
I suspect the
.
is causing confusion for the debuggerHow to reproduce:
Debug this executable:
executable + pdb:
app.zip
Debugger Configurations
Debugger Logs
Other Extensions
No response
Additional Information
llvm-pdbutil.exe dump -globals app.pdb > dump
https://gist.github.com/ryuukk/8674e88822038c371a2ea7c631e6744e