Skip to content

Commit

Permalink
fix event and type handling so breakpoints work (after reconstituting
Browse files Browse the repository at this point in the history
	event.lua)
  • Loading branch information
jbalint committed Jun 11, 2015
1 parent 0279dd5 commit 0de4788
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
12 changes: 3 additions & 9 deletions debuglib/event.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
Event = {}
Event.TYPE_COMMAND = "COMMAND"
Event.TYPE_RESUME = "RESUME"

EventType = {}
--EventType.BREAKPOINT = "BREAKPOINT"
EventType.COMMAND = "COMMAND"
EventType.RESUME = "RESUME"
--EventType.METHOD_ENTRY = "METHOD_ENTRY"
--EventType.METHOD_EXIT = "METHOD_EXIT"
--EventType.SINGLE_STEP = "SINGLE_STEP"

function Event:new(thread, type, data)
function Event.new(thread, type, data)
local event = {thread=thread, type=type, data=data}
return event
end
Expand Down
2 changes: 1 addition & 1 deletion java_bridge/jclass.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function jclass:find_methods(search_name)
end

-- ============================================================
-- search up the class hierarchy for the first field called `name'
-- search up the class hierarchy for the first field called `search_name'
function jclass:find_field(search_name)
local superclass_method_id_raw = lj_get_method_id(lj_find_class("java/lang/Class"),
"getSuperclass", "", "Ljava/lang/Class;")
Expand Down
2 changes: 2 additions & 0 deletions java_bridge/jthread.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ function jthread:handle_events()
elseif m2 then
dbgio:print(m2)
end
else
error("Bad event type: " .. event.type)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/tsc/tsc_runner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ table.insert(arg, 2, "early_return.lua")
table.insert(arg, 3, "array_assignment.lua")

-- run tsc
tsc = loadfile("/home/jbalint/bin/tsc")
tsc = loadfile("tsc")
tsc()

-- finish
Expand Down

0 comments on commit 0de4788

Please sign in to comment.