Skip to content

CV8 source line debug info only works with VS2022 if data includes are the first byte-emission in a file #156

@Gargaj

Description

@Gargaj

I have isolated a rather entertaining bug that's still there in NASM v3.0

Given the following file... (test.inc is just a single db 0)

section .data

testval db 0

testinc:
%include "test.inc"

section .text

global _main
_main:
	ret

...even though -g -F cv8 is on, Visual Studio 2022 fails to display the source files when stepping into _main (F10) and you get the "Source Not Available - View Disassembly?" screen.

HOWEVER, if you move the %include in FRONT of testval db 0 like so...

section .data

testinc:
%include "test.inc"

testval db 0

section .text

global _main
_main:
	ret

Then stepping into the file displays no error and the source info is loaded correctly with the program position placed on the entry point in the debugger.

The bug still appears if you add additional section .data-s before the %include or inside the included file, but doesn't appear if the include doesn't contain any data (but only e.g. struc definitions); incbin doesn't seem to cause any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions