summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2023-08-26 09:59:45 +1200
committerGitHub <noreply@github.com>2023-08-26 09:59:45 +1200
commitb2d1c720ece67b110ab4ade6b8c9f3b640216c8a (patch)
tree330234c4af92556dd20d802ff8cd95663dcf2edf /doc
parent439f069b4b421964dab39b0a01e0afdae89ea26c (diff)
Add documentation regarding how to build Ruby for debugging. (#8290)
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/contributing/building_ruby.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/contributing/building_ruby.md b/doc/contributing/building_ruby.md
index 02efb2384f..b96fa4bc0b 100644
--- a/doc/contributing/building_ruby.md
+++ b/doc/contributing/building_ruby.md
@@ -157,6 +157,14 @@ with the Ruby script you'd like to run. You can use the following make targets:
* `make lldb-ruby`: Runs `test.rb` using Ruby in lldb
* `make gdb-ruby`: Runs `test.rb` using Ruby in gdb
+### Compiling for Debugging
+
+You should configure Ruby without optimization and other flags that may interfere with debugging:
+
+``` shell
+./configure --enable-debug-env optflags="-O0 -fno-omit-frame-pointer"
+```
+
### Building with Address Sanitizer
Using the address sanitizer is a great way to detect memory issues.