void LocationModifier::find_and_set_rom_method_id(Method *debug_rom_method) { VMEventStream es; VMEvent::Raw ep; LocationModifier::Raw mod; Method::Raw dm; ep = es.next_by_kind(JDWP_EventKind_BREAKPOINT); while(!ep.is_null()) { mod = VMEvent::get_modifier(&ep, JDWP_EventRequest_Set_Out_modifiers_Modifier_LocationOnly); if (!mod.is_null()) { dm = mod().rom_debug_method(); if (!dm.is_null() && dm.obj() == debug_rom_method->obj()) { set_method_id(mod().method_id()); break; } } ep = es.next_by_kind(JDWP_EventKind_BREAKPOINT); } }
ReturnOop LocationModifier::get_dup_rom_method(Method *in_rom_method) { VMEventStream es; VMEvent::Raw ep; LocationModifier::Raw mod; Method::Raw sm; ep = es.next_by_kind(JDWP_EventKind_BREAKPOINT); while(!ep.is_null()) { mod = VMEvent::get_modifier(&ep, JDWP_EventRequest_Set_Out_modifiers_Modifier_LocationOnly); if (!mod.is_null()) { sm = mod().method(); if (!sm.is_null() && sm.obj() == in_rom_method->obj()) { return mod().rom_debug_method(); } } ep = es.next_by_kind(JDWP_EventKind_BREAKPOINT); } return NULL; }
address get_rom_debug_method(Thread *thread, OopDesc *md) { (void)thread; // always passed from interpreter but not used here. VMEventStream es; Method::Raw m = md; VMEvent::Raw ep; LocationModifier::Raw mod; ep = es.next_by_kind(JDWP_EventKind_BREAKPOINT); while(!ep.is_null()) { mod = VMEvent::get_modifier(&ep, JDWP_EventRequest_Set_Out_modifiers_Modifier_LocationOnly); if (!mod.is_null() && mod().method_id() == JavaDebugger::get_method_id(&m)) { Method::Raw dm = mod().rom_debug_method(); if (!dm.is_null()) { return (address)((char *)dm.obj()); } } ep = es.next_by_kind(JDWP_EventKind_BREAKPOINT); } return (address)md; }