diff --git a/Documentation/AdvancedBuildInstructions.md b/Documentation/AdvancedBuildInstructions.md index ddb7f416cdf..11f21c5f23c 100644 --- a/Documentation/AdvancedBuildInstructions.md +++ b/Documentation/AdvancedBuildInstructions.md @@ -96,3 +96,59 @@ export CCACHE_COMPILERCHECK="%compiler% -v" By default, ccache will include the plugins themselves in file hashes. So if a plugin changes, the hash of every file will change, and you will be stuck with an uncached build. This setting will prevent ccache from using plugins in the file hashes. + +## Debugging without any optimizations + +It’s possible that when trying to inspect certain frame variables in your debugger, you’ll get an error similar to the following: + +> error: Couldn't look up symbols: __ZN2AK6Detail10StringBaseD2Ev +> Hint: The expression tried to call a function that is not present in the target, perhaps because it was optimized out by the compiler. + +If you do run into such an error, the rest of this section explains how to deal with it. + +> [!WARNING] +> You probably only want to make the build-file change described below while you’re in the middle of examining the state of a particular build in your debugger — and then you’ll want to revert it after you’re done debugging. You otherwise probably don’t want to have the build-file change in place while you’re running WPT tests or in-tree tests and checking the results. + +1. At your command-line prompt in your shell environment, copy and paste the following: + + ```diff + $ patch -p1 <