aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-09-11 13:20:19 -0400
committerAva Chow <github@achow101.com>2024-09-11 13:20:19 -0400
commitf6298a878f4f764838895a0028b4d5304e7c605e (patch)
tree7eb084291d77479c8e6f52c0bc0ac1fbf096a89a
parenta8809aeb6e1e91c980490e117ea43de3c76b9b84 (diff)
parent0b003e1ff7e09b56cd013b15f1998495994b7211 (diff)
downloadbitcoin-f6298a878f4f764838895a0028b4d5304e7c605e.tar.xz
Merge bitcoin/bitcoin#30840: docs: Updated debug build instructions for cmake
0b003e1ff7e09b56cd013b15f1998495994b7211 docs: Updated debug build instructions for cmake (ion-) Pull request description: In the [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md) the section on [compiling for debug](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#compiling-for-debugging) displays outdated instructions that were applicable before the move to cmake build system. This PR just gives instructions on how to build for debugging in the context of cmake. ACKs for top commit: kevkevinpal: ACK [0b003e1](https://github.com/bitcoin/bitcoin/pull/30840/commits/0b003e1ff7e09b56cd013b15f1998495994b7211) achow101: ACK 0b003e1ff7e09b56cd013b15f1998495994b7211 tdb3: ACK 0b003e1ff7e09b56cd013b15f1998495994b7211 Tree-SHA512: fc8b4824d68e47b3e64320b4ce728df4242d00c2e8c75dcf5daa60af3050c62d94fa9741e447c7d81e72194470ed68a4e19bbee8cf6a1412d6566c7b699cf242
-rw-r--r--doc/developer-notes.md10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index 8a6fb0c49a..a630957f41 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -354,8 +354,14 @@ Development tips and tricks
### Compiling for debugging
-Run configure with `--enable-debug` to add additional compiler flags that
-produce better debugging builds.
+When using the default build configuration by running `cmake -B build`, the
+`-DCMAKE_BUILD_TYPE` is set to `RelWithDebInfo`. This option adds debug symbols
+but also performs some compiler optimizations that may make debugging trickier
+as the code may not correspond directly to the source.
+
+If you need to build exclusively for debugging, set the `-DCMAKE_BUILD_TYPE`
+to `Debug` (i.e. `-DCMAKE_BUILD_TYPE=Debug`). You can always check the cmake
+build options of an existing build with `ccmake build`.
### Show sources in debugging