Skip to content

Commit 327fd70

Browse files
committed
More lldb-like breakpoint setting
1 parent fa117ee commit 327fd70

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

lib/ruby-debug-ide/attach/gdb.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ def switch_to_thread(thread_num)
3737
execute "thread #{thread_num}"
3838
end
3939

40+
def set_break(str)
41+
execute "tbreak #{str}"
42+
end
43+
4044
def call_start_attach
4145
super()
4246
execute "call dlopen(\"#{@path_to_attach}\", 2)"
4347
execute 'call start_attach()'
44-
set_tbreak(@tbreak)
48+
set_break(@tbreak)
4549
end
4650

4751
def print_delimiter

lib/ruby-debug-ide/attach/lldb.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ def switch_to_thread(thread_num)
3535
execute "thread select #{thread_num}"
3636
end
3737

38+
def set_break(str)
39+
execute "breakpoint set --shlib #{@path_to_attach} --name #{str}"
40+
end
41+
3842
def call_start_attach
3943
super()
4044
execute "expr (void *) dlopen(\"#{@path_to_attach}\", 2)"
4145
execute 'expr (int) start_attach()'
42-
set_tbreak(@tbreak)
46+
set_break(@tbreak)
4347
end
4448

4549
def print_delimiter

lib/ruby-debug-ide/attach/native_debugger.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ def switch_to_thread
8989

9090
end
9191

92-
def set_tbreak(str)
93-
execute "tbreak #{str}"
92+
def set_break(str)
93+
9494
end
9595

9696
def continue

0 commit comments

Comments
 (0)