Skip to content

Commit

Permalink
fix for setting breakpoints with jmethod_id objects
Browse files Browse the repository at this point in the history
  • Loading branch information
jbalint committed Jun 11, 2015
1 parent e0ad373 commit 0279dd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debuglib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ function bp(method, line_num)
if not b.method_id then
error("Cannot find method to set breakpoint")
end
elseif type(method) == "userdata" then
elseif type(method) == "table" and method.classname == "jmethod_id" then
b.method_id = method
else
error("Invalid method, must be method declaration of form \"pkg/Class.name()V\" or a method_id object")
error("Invalid method, must be method declaration of form \"pkg/Class.name()V\" or a jmethod_id object")
end

b.location = method_location_for_line_num(b.method_id, b.line_num)
Expand Down

0 comments on commit 0279dd5

Please sign in to comment.