summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-01-09 16:45:11 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-01-09 16:45:50 -0800
commitdf76c54fc251904c2eaf4cc9354ed8726336c289 (patch)
tree71bf39cd31d397a118e898a519fe009b6bffec02 /common.mk
parent72eb33066fa9e7dacb7470cd140b219abe37667e (diff)
Allow overriding a gdb command on `make gdb`
With --enable-yjit, you see an annoying warning like this: warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts of file /home/k0kubun/src/github.com/ruby/ruby/.ruby/miniruby. Use `info auto-load python-scripts [REGEXP]' to list them. Using `rust-gdb` instead fixes it. I use this like `make gdb GDB=rust-gdb`.
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index 39b3aec0a6..0d230dd70b 100644
--- a/common.mk
+++ b/common.mk
@@ -1321,9 +1321,10 @@ run.gdb:
echo ' quit' >> run.gdb
echo end >> run.gdb
+GDB = gdb
gdb: miniruby$(EXEEXT) run.gdb PHONY
- gdb -x run.gdb --quiet --args $(MINIRUBY) $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
+ $(GDB) -x run.gdb --quiet --args $(MINIRUBY) $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
gdb-ruby: $(PROGRAM) run.gdb PHONY
$(Q) $(RUNRUBY_COMMAND) $(RUNRUBY_DEBUGGER) -- $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)