void variable_oops_do(void do_oop(OopDesc**)) {
   Thread::Raw thread = _thread;
   if (thread.not_null()) { 
     // GC handles &_next_stack
     do_oop(&_thread);
     thread().stack_oops_do(do_oop);
   }
 }
Exemple #2
0
void VMEvent::clear_event_request(VMEvent *ep)
{
  LocationModifier::Raw mod;
  Thread::Raw thread;

  VMEvent::remove_event_request(ep);
#ifdef AZZERT
  if (TraceDebugger) {
    tty->print_cr("VMEvent: clear 0x%x, id 0x%x", (int)ep->obj(), ep->event_id());
  }
#endif
  switch (ep->event_kind()) {
  case JDWP_EventKind_BREAKPOINT:
    mod = get_modifier(ep,
        JDWP_EventRequest_Set_Out_modifiers_Modifier_LocationOnly);
    GUARANTEE(!mod.is_null(), "No location modifier for breakpoint event");
    if (!mod.is_null()) {
#if ENABLE_ISOLATES
      // See if any other task already has a breakpoint here.
      VMEvent::Raw epb = find_breakpoint_event(&mod);
      if (!epb.is_null()) {
        // Has to be some other task since we have unlinked this event
        GUARANTEE(epb().task_id() != ep->task_id(),
                  "Duplicate breakpoint event for this task");
      } else {
#endif
        mod().set_method_opcode(mod().save_opcode(), false);
#if ENABLE_ISOLATES
      }
#endif
    }
    break;
  case JDWP_EventKind_SINGLE_STEP:
    mod = get_modifier(ep,
        JDWP_EventRequest_Set_Out_modifiers_Modifier_Step);
    if (mod.not_null()) {
      thread = JavaDebugger::get_thread_by_id(mod().thread_id());
      if (thread.not_null())
        thread().set_is_stepping(false);
      JavaDebugger::set_stepping(false);
    }
    break;
  }
  // see if there are any other breakpoints in this method.  If no other 
  // breakpoints and the compiler is active then clear the
  // impossible_to_compile flag.
  if (mod.not_null() && (ep->event_kind() == JDWP_EventKind_BREAKPOINT ||
         ep->event_kind() == JDWP_EventKind_SINGLE_STEP)) {
    clear_impossible_to_compile(&mod, ep);
  }
}