Description
The compiler option -Qsource_in_debug_module is not documented in -help where users are likely to look for it when trying to use debug info as generated by -Zi.
Steps to Reproduce
When building a module with separate debug info using -Zi -Fd ..., if -Qsource_in_debug_module is not specified then the debug info module doesn't have any source for the hlsl files in the debug metadata.
This flag is only needed if separate debug info is used - if the debug info is embedded in the module then the source is there as expected. The flag isn't documented anywhere though as far as I can tell, at least it's not mentioned in -help along with the other debug options - I'd expect it near -Qembed_debug.
$ dxc -Od -Zi a.hlsl -Qembed_debug -Fo a.dxbc -T cs_6_0
$ dxc -dumpbin a.dxbc | grep 'void main'
!38 = !{!"a.hlsl", !"RWByteAddressBuffer a : register(u0);\0D\0A\0D\0A[numthreads(1,1,1)]\0D\0Avoid main() {\0D\0A\09a.Store(0, uint(4));\0D\0A\09a.Store(128, float(4));\0D\0A\09a.Store(256, float4(4,5,6,7));\0D\0A\09a.Store(512, double(8));\0D\0A\09a.Store(768, double4(8,9,10,11));\0D\0A}\0D\0A"}
$ dxc -Od -Zi a.hlsl -Fd a.pdb -Fo a.dxbc -T cs_6_0
$ dxc -dumpbin a.dxbc | grep 'void main'
$ dxc -dumpbin a.pdb | grep 'void main'
Actual Behavior
Since the source is a big part of the value of the debug data I would expect the necessary flag to be documented in -help and in the documentation like SourceLevelDebuggingHLSL.rst.
Environment
- DXC version dxcompiler.dll: 1.7 - 1.7.2308.7 (69e54e2); dxil.dll: 1.7(101.7.2308.12)
- Host Operating System Windows 10 19045
Description
The compiler option
-Qsource_in_debug_moduleis not documented in-helpwhere users are likely to look for it when trying to use debug info as generated by-Zi.Steps to Reproduce
When building a module with separate debug info using
-Zi -Fd ..., if-Qsource_in_debug_moduleis not specified then the debug info module doesn't have any source for the hlsl files in the debug metadata.This flag is only needed if separate debug info is used - if the debug info is embedded in the module then the source is there as expected. The flag isn't documented anywhere though as far as I can tell, at least it's not mentioned in -help along with the other debug options - I'd expect it near
-Qembed_debug.Actual Behavior
Since the source is a big part of the value of the debug data I would expect the necessary flag to be documented in
-helpand in the documentation like SourceLevelDebuggingHLSL.rst.Environment