Add flag to dump the raw SemIR in the event of a crash. (#6558)

This commit is contained in:
Geoff Romer
2026-01-06 21:56:08 +00:00
committed by GitHub
parent 0e5832d3c2
commit 2380be2ae1
5 changed files with 47 additions and 0 deletions
+8
View File
@@ -628,6 +628,10 @@ minimal context for how the current function is reached, we use LLVM's
`PrettyStackTrace` to include details about the state stack. The state stack
will be above the function stack in crash output.
You can also use the `--sem-ir-crash-dump=path/to/file` flag to get a raw SemIR
dump in the event of a crash in the check phase. This can be particularly useful
for interpreting IDs you encounter during interactive debugging.
#### Dumping objects in interactive debuggers
We provide namespace-scoped `Dump` functions in several components, such as
@@ -638,6 +642,10 @@ regarding support.
Objects which inherit from `Printable` also have `Dump` member functions, but
these will lack contextual information.
IDs are dumped in hexadecimal, so it's often convenient to set your interactive
debugger to print integers in hexadecimal as well. In LLDB you can do this with
`type format add --format hex int`.
#### Dumping prelude files
By default, prelude files are excluded from dumps by