Skip to content

Commit 6ae52ee

Browse files
equivalence1dmitrii.kravchenko
authored andcommitted
Gdb does not understand ruby symbol table under OS X (I guess it does not understand darwin debug format). That make it essential to prefer lldb over gdb (lldb works fine).
1 parent 9026873 commit 6ae52ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/gdb_wrapper

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@ def command_exists(command)
365365
end
366366

367367
def choose_debugger(ruby_path, pid, gems_to_include, debugger_loader_path, argv)
368-
if command_exists('gdb')
369-
debugger = GDB.new(ruby_path, pid, '-nh -nx', gems_to_include, debugger_loader_path, argv)
370-
elsif command_exists('lldb')
368+
if command_exists('lldb')
371369
debugger = LLDB.new(ruby_path, pid, '--no-lldbinit', gems_to_include, debugger_loader_path, argv)
370+
elsif command_exists('gdb')
371+
debugger = GDB.new(ruby_path, pid, '-nh -nx', gems_to_include, debugger_loader_path, argv)
372372
else
373373
raise 'Neither gdb nor lldb was found. Aborting.'
374374
end

0 commit comments

Comments
 (0)