Add documentation regarding how to build Ruby for debugging. (#8290)

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
Samuel Williams 2023-08-26 09:59:45 +12:00 committed by GitHub
parent 439f069b4b
commit b2d1c720ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-08-25 22:00:08 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>

View File

@ -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.