Lines Matching refs:bkpt
71 register db_breakpoint_t bkpt,
77 register db_breakpoint_t bkpt,
81 db_breakpoint_t bkpt,
85 db_breakpoint_t bkpt,
91 void db_breakpoint_free(register db_breakpoint_t bkpt);
109 register db_breakpoint_t bkpt;
111 if ((bkpt = db_free_breakpoints) != 0) {
112 db_free_breakpoints = bkpt->link;
113 return (bkpt);
119 bkpt = db_next_free_breakpoint;
122 return (bkpt);
126 db_breakpoint_free(register db_breakpoint_t bkpt)
128 bkpt->link = db_free_breakpoints;
129 db_free_breakpoints = bkpt;
134 register db_breakpoint_t bkpt,
159 tp->tb_next = bkpt->threads;
160 bkpt->threads = tp;
166 register db_breakpoint_t bkpt,
175 for (tpp = &bkpt->threads; (tp = *tpp) != 0; tpp = &tp->tb_next)
179 db_free_thread_break_list = bkpt->threads;
180 bkpt->threads = 0;
185 for (tpp = &bkpt->threads; (tp = *tpp) != 0; tpp = &tp->tb_next)
200 db_breakpoint_t bkpt,
208 for (tp = bkpt->threads; tp; tp = tp->tb_next) {
225 db_breakpoint_t bkpt;
227 bkpt = db_find_breakpoint(task, (db_addr_t)addr);
228 if (bkpt == 0)
230 return(db_find_thread_breakpoint(bkpt, current_thread()));
239 register db_breakpoint_t bkpt;
241 for (bkpt = db_breakpoint_list; bkpt != 0; bkpt = bkpt->link) {
242 for (tp = bkpt->threads; tp; tp = tp->tb_next) {
245 *bkptp = bkpt;
255 db_breakpoint_t bkpt,
260 if (bkpt->task == TASK_NULL || db_lookup_task(bkpt->task) >= 0)
261 db_task_printsym(bkpt->address, DB_STGY_PROC, bkpt->task);
263 db_printf("%#X", bkpt->address);
264 if (bkpt->task)
265 db_printf(" in task %X", bkpt->task);
269 db_delete_thread_breakpoint(bkpt, task_thd);
276 register db_breakpoint_t bkpt, *bkptp;
279 for (bkpt = *bkptp; bkpt; bkpt = *bkptp) {
280 if (bkpt->task != TASK_NULL) {
281 if (db_lookup_task(bkpt->task) < 0) {
282 db_force_delete_breakpoint(bkpt, 0, FALSE);
283 *bkptp = bkpt->link;
284 db_breakpoint_free(bkpt);
288 for (tbp = bkpt->threads; tbp; tbp = tbp_next) {
296 db_force_delete_breakpoint(bkpt,
300 if (bkpt->threads == 0) {
301 db_put_task_value(bkpt->address, BKPT_SIZE,
302 bkpt->bkpt_inst, bkpt->task);
303 *bkptp = bkpt->link;
304 db_breakpoint_free(bkpt);
308 bkptp = &bkpt->link;
320 register db_breakpoint_t bkpt;
324 bkpt = db_find_breakpoint(task, addr);
325 if (bkpt) {
327 || db_find_thread_breakpoint(bkpt, thr_act)) {
343 alloc_bkpt = bkpt = db_breakpoint_alloc();
344 if (bkpt == 0) {
348 bkpt->task = task;
349 bkpt->flags = (task && thr_act == THREAD_NULL)?
351 bkpt->address = addr;
352 bkpt->threads = 0;
358 if (db_add_thread_breakpoint(bkpt, task_thd, count, task_bpt) < 0) {
365 bkpt->link = db_breakpoint_list;
366 db_breakpoint_list = bkpt;
377 register db_breakpoint_t bkpt;
380 for (prev = &db_breakpoint_list; (bkpt = *prev) != 0;
381 prev = &bkpt->link) {
382 if ((bkpt->task == task
383 || (task != TASK_NULL && (bkpt->flags & BKPT_USR_GLOBAL)))
384 && bkpt->address == addr)
387 if (bkpt && (bkpt->flags & BKPT_SET_IN_MEM)) {
391 if (bkpt == 0
392 || db_delete_thread_breakpoint(bkpt, task_thd) < 0) {
396 if (bkpt->threads == 0) {
397 *prev = bkpt->link;
398 db_breakpoint_free(bkpt);
407 register db_breakpoint_t bkpt;
409 for (bkpt = db_breakpoint_list; bkpt != 0; bkpt = bkpt->link) {
410 if ((bkpt->task == task
411 || (task != TASK_NULL && (bkpt->flags & BKPT_USR_GLOBAL)))
412 && bkpt->address == addr)
413 return (bkpt);
423 register db_breakpoint_t bkpt;
425 for (bkpt = db_breakpoint_list; bkpt != 0; bkpt = bkpt->link) {
426 if ((bkpt->task == task
427 || (task != TASK_NULL && (bkpt->flags & BKPT_USR_GLOBAL)))
428 && bkpt->address == addr)
430 if ((bkpt->flags & BKPT_USR_GLOBAL) == 0 &&
431 DB_PHYS_EQ(task, addr, bkpt->task, bkpt->address))
442 register db_breakpoint_t bkpt;
452 for (bkpt = db_breakpoint_list; bkpt != 0; bkpt = bkpt->link) {
453 if (bkpt->flags & BKPT_SET_IN_MEM)
455 task = bkpt->task;
456 if (bkpt->flags & BKPT_USR_GLOBAL) {
457 if ((bkpt->flags & BKPT_1ST_SET) == 0) {
462 bkpt->flags &= ~BKPT_1ST_SET;
464 if (DB_CHECK_ACCESS(bkpt->address, BKPT_SIZE, task)) {
465 inst = db_get_task_value(bkpt->address, BKPT_SIZE, FALSE,
469 bkpt->bkpt_inst = inst;
470 db_put_task_value(bkpt->address,
472 BKPT_SET(bkpt->bkpt_inst), task);
473 bkpt->flags |= BKPT_SET_IN_MEM;
485 register db_breakpoint_t bkpt, *bkptp;
494 for (bkpt = *bkptp; bkpt; bkpt = *bkptp) {
495 task = bkpt->task;
496 if (bkpt->flags & BKPT_USR_GLOBAL) {
498 bkptp = &bkpt->link;
503 if ((bkpt->flags & BKPT_SET_IN_MEM)
504 && DB_CHECK_ACCESS(bkpt->address, BKPT_SIZE, task)) {
505 inst = db_get_task_value(bkpt->address, BKPT_SIZE, FALSE,
508 if (bkpt->flags & BKPT_USR_GLOBAL) {
509 bkptp = &bkpt->link;
512 db_force_delete_breakpoint(bkpt, 0, FALSE);
513 *bkptp = bkpt->link;
514 db_breakpoint_free(bkpt);
517 db_put_task_value(bkpt->address, BKPT_SIZE,
518 bkpt->bkpt_inst, task);
519 bkpt->flags &= ~BKPT_SET_IN_MEM;
521 bkptp = &bkpt->link;
537 register db_breakpoint_t bkpt;
539 bkpt = db_breakpoint_alloc();
540 if (bkpt == 0) {
544 bkpt->task = task;
545 bkpt->address = addr;
546 bkpt->flags = BKPT_TEMP;
547 bkpt->threads = 0;
548 if (db_add_thread_breakpoint(bkpt, 0, 1, FALSE) < 0) {
549 if (bkpt)
550 db_breakpoint_free(bkpt);
554 bkpt->bkpt_inst = db_get_task_value(bkpt->address, BKPT_SIZE,
556 db_put_task_value(bkpt->address, BKPT_SIZE,
557 BKPT_SET(bkpt->bkpt_inst), task);
558 return bkpt;
564 db_breakpoint_t bkpt)
566 db_put_task_value(bkpt->address, BKPT_SIZE, bkpt->bkpt_inst, task);
567 db_delete_thread_breakpoint(bkpt, 0);
568 db_breakpoint_free(bkpt);
577 register db_breakpoint_t bkpt;
585 for (bkpt = db_breakpoint_list;
586 bkpt != 0;
587 bkpt = bkpt->link)
593 if (bkpt->threads) {
594 for (tp = bkpt->threads; tp; tp = tp->tb_next) {
596 if (bkpt->flags & BKPT_USR_GLOBAL)
598 else if (bkpt->task == TASK_NULL)
600 else if ((task_id = db_lookup_task(bkpt->task)) < 0)
601 db_printf("%0*X ", 2*sizeof(vm_offset_t), bkpt->task);
626 db_task_printsym(bkpt->address, DB_STGY_PROC, bkpt->task);
635 if (bkpt->task == TASK_NULL)
638 db_printf("%*X ", 2*sizeof(vm_offset_t), bkpt->task);
640 db_task_printsym(bkpt->address, DB_STGY_PROC, bkpt->task);
650 register db_breakpoint_t bkpt;
652 bkpt = db_breakpoint_list;
653 while ( bkpt != 0 ) {
654 if (bkpt->task == task ||
655 (task != TASK_NULL && (bkpt->flags & BKPT_USR_GLOBAL))) {
656 db_delete_breakpoint(task, bkpt->address, 0);
657 bkpt = db_breakpoint_list;
660 bkpt = bkpt->link;
703 db_breakpoint_t bkpt = 0;
709 if ((tbp = db_find_breakpoint_number(db_tok_number, &bkpt)) == 0) {
713 db_delete_breakpoint(bkpt->task, bkpt->address, tbp->tb_task_thd);