int JvmtiBreakpoints::clear(JvmtiBreakpoint& bp) { if ( _bps.find(bp) == -1) { return JVMTI_ERROR_NOT_FOUND; } VM_ChangeBreakpoints clear_breakpoint(VM_ChangeBreakpoints::CLEAR_BREAKPOINT, &bp); VMThread::execute(&clear_breakpoint); return JVMTI_ERROR_NONE; }
void clear_breakpoints (void) { struct bp *ptr = first_bp_ptr; while (ptr != NULL) { clear_breakpoint (ptr); ptr = ptr->next; } }
int clear_mon_breakpoint (mem_addr_t location) { int error = 0; struct bp *ptr = first_bp_ptr; struct bp *prev_ptr = NULL; /* Scan the list looking for the address to clear */ while (ptr != NULL && !MEM_ADDR_EQ_P (ptr->address, location)) { /* keep a pointer one behind the current position */ prev_ptr = ptr; ptr = ptr->next; } if (ptr == NULL) { xprintf ("That address has no breakpoint on it.\n"); error = 1; } else { /* Just in case it's still in memory. */ clear_breakpoint (ptr); /* now we'll point the previous bp->next at the one after the one we're deleting, unless there is no previous bp. */ if (prev_ptr != NULL) { prev_ptr->next = ptr->next; } if (first_bp_ptr == ptr) first_bp_ptr = ptr->next; if (last_bp_ptr == ptr) last_bp_ptr = prev_ptr; /* eliminate the offending bp struct */ #ifdef NO_MALLOC ptr->next = free_bp_list; free_bp_list = ptr; #else free (ptr); #endif } return error; }