Skip to content

[docs][tools][DirectX] Document DXContainer debug info parts#163

Open
dzhidzhoev wants to merge 2 commits into
dx-debug-mainfrom
dzhidzhoev/dx/docs/base
Open

[docs][tools][DirectX] Document DXContainer debug info parts#163
dzhidzhoev wants to merge 2 commits into
dx-debug-mainfrom
dzhidzhoev/dx/docs/base

Conversation

@dzhidzhoev

Copy link
Copy Markdown
Contributor

This patch adds ILDB, ILDN, VERS, SRCI parts format documentation. It describes how to use LLVM tools to inspect them. Additionally, llvm-pdbutil documentation has been expanded with information on how to inspect PDB files generated by the DirectX compiler.

This patch adds ILDB, ILDN, VERS, SRCI parts format documentation.
It describes how to use LLVM tools to inspect them.
Additionally, llvm-pdbutil documentation has been expanded with information
on how to inspect PDB files generated by the DirectX compiler.
@dzhidzhoev dzhidzhoev requested review from asavonic and kuilpd June 8, 2026 01:15
@dzhidzhoev

Copy link
Copy Markdown
Contributor Author

To check html version:

  • run ninja docs-llvm-html,
  • open ./docs/html/DirectX/DXContainer.html, ./docs/html/CommandGuide/llvm-pdbutil.html.

Comment thread llvm/docs/CommandGuide/llvm-pdbutil.rst Outdated
Comment on lines +411 to +418
.. option:: -dxcontainer

When used with :option:`-streams`, dump a summary of the DXContainer stored in
the PDB file's DXContainer stream. Shader companion PDB files produced by the
DirectX backend store debug-related container parts in this stream. For
example::

llvm-pdbutil dump --streams --dxcontainer shader.pdb

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These options work independently, --streams prints the list of all PDB streams, --dxcontainer tries to print only the DXContainer stream if there is one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Fixed that.

Comment thread llvm/docs/CommandGuide/llvm-pdbutil.rst Outdated
Comment on lines +557 to +560
.. option:: -all

Dump everything :program:`llvm-pdbutil` knows how to dump, including the
DXContainer stream when present.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't mention DXContainer here, maybe just make the description the same as in other commands, "Implies most other options."?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I agree with you.

Comment on lines +630 to +634
.. option:: --dxcontainer

Export the DXContainer stored in the PDB file's DXContainer stream. This is
the usual way to recover the debug-related container parts from a shader
companion PDB file.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add that it's effectively a synonym to --stream=5?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added that.

Comment on lines +162 to +164
companion PDB file is requested, the ILDB part is written to the PDB unless
llc's ``--dx-embed-debug`` is specified, in which case it is written to both the main
DXContainer and the PDB.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this mention the Driver's flags too? Here and where other options are referenced. I know it's technically llvm docs, not clang, but where else would we write about driver flags and where to use them?

@dzhidzhoev dzhidzhoev Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I think it should not mention clang-dxc flags here, because of the reason you mention, and because this doc is rather DXContainer format description (I was in doubt even about adding examples of tool flags, but Andrew asked for that specifically, since tools help to investigate DXContainers).

We could add dxc flags description to some clang document. However, I haven't found where we could add it:

  1. AFAIK there are some HLSL-specific documents, but they mention only a couple of dxc flags.
  2. Some dxc driver flags appear in tools/clang/docs/html/ClangCommandLineReference.html, which is automatically generated from HelpText<> of options described in clang/include/clang/Options/Options.td. However, only options usable with clang tool are visible in that doc file (not clang-dxc-only options, but those which have ClangOption visibility).

I think we should discuss separately where to document clang-dxc options, if we choose to add separate rst documentation for them.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ask people tomorrow how to approach this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants