diff --git a/common.mk b/common.mk index 4202dbddb2a..e47d0307243 100644 --- a/common.mk +++ b/common.mk @@ -1469,8 +1469,9 @@ run.gdb: echo '# handle SIGINT nostop' >> run.gdb echo '# handle SIGPIPE nostop' >> run.gdb echo '# b rb_longjmp' >> run.gdb - echo source $(srcdir)/breakpoints.gdb >> run.gdb - echo source $(srcdir)/.gdbinit >> run.gdb + echo directory $(srcdir) >> run.gdb + echo source -s breakpoints.gdb >> run.gdb + echo source -s .gdbinit >> run.gdb echo 'set $$_exitcode = -999' >> run.gdb echo run >> run.gdb echo 'if $$_exitcode != -999' >> run.gdb diff --git a/tool/runruby.rb b/tool/runruby.rb index 1f7268bd411..d610e2ec89e 100755 --- a/tool/runruby.rb +++ b/tool/runruby.rb @@ -163,10 +163,12 @@ ENV.update env if debugger case debugger when :gdb - debugger = %W'gdb -x #{srcdir}/.gdbinit' + debugger = %W'gdb' if File.exist?(gdb = 'run.gdb') or File.exist?(gdb = File.join(abs_archdir, 'run.gdb')) debugger.push('-x', gdb) + else + debugger.push('-x', "#{srcdir}/.gdbinit") end debugger << '--args' when :lldb