Lines Matching refs:rp
230 kdp_connect_reply_t *rp = &pkt->connect_reply;
249 rp->error = KDPERR_NO_ERROR;
251 rp->error = KDPERR_ALREADY_CONNECTED;
260 rp->error = KDPERR_NO_ERROR;
263 rp->hdr.is_reply = 1;
264 rp->hdr.len = sizeof (*rp);
267 *len = rp->hdr.len;
284 kdp_disconnect_reply_t *rp = &pkt->disconnect_reply;
309 rp->hdr.is_reply = 1;
310 rp->hdr.len = sizeof (*rp);
312 *len = rp->hdr.len;
345 kdp_hostinfo_reply_t *rp = &pkt->hostinfo_reply;
352 rp->hdr.is_reply = 1;
353 rp->hdr.len = sizeof (*rp);
355 kdp_machine_hostinfo(&rp->hostinfo);
358 *len = rp->hdr.len;
372 kdp_kernelversion_reply_t *rp = &pkt->kernelversion_reply;
378 rp->hdr.is_reply = 1;
379 rp->hdr.len = sizeof (*rp);
382 slen = strlcpy(rp->version, kdp_kernelversion_string, MAX_KDP_DATA_SIZE);
384 rp->hdr.len += slen + 1; /* strlcpy returns the amount copied with NUL */
387 *len = rp->hdr.len;
401 kdp_suspend_reply_t *rp = &pkt->suspend_reply;
406 rp->hdr.is_reply = 1;
407 rp->hdr.len = sizeof (*rp);
414 *len = rp->hdr.len;
428 kdp_resumecpus_reply_t *rp = &pkt->resumecpus_reply;
433 rp->hdr.is_reply = 1;
434 rp->hdr.len = sizeof (*rp);
441 *len = rp->hdr.len;
455 kdp_writemem_reply_t *rp = &pkt->writemem_reply;
462 rp->error = KDPERR_BAD_NBYTES;
467 rp->error = KDPERR_NO_ERROR;
470 rp->hdr.is_reply = 1;
471 rp->hdr.len = sizeof (*rp);
474 *len = rp->hdr.len;
488 kdp_writemem64_reply_t *rp = &pkt->writemem64_reply;
495 rp->error = KDPERR_BAD_NBYTES;
500 rp->error = KDPERR_NO_ERROR;
503 rp->hdr.is_reply = 1;
504 rp->hdr.len = sizeof (*rp);
507 *len = rp->hdr.len;
521 kdp_writephysmem64_reply_t *rp = &pkt->writephysmem64_reply;
527 rp->error = KDPERR_BAD_NBYTES;
531 rp->error = KDPERR_NO_ERROR;
534 rp->hdr.is_reply = 1;
535 rp->hdr.len = sizeof (*rp);
538 *len = rp->hdr.len;
552 kdp_readmem_reply_t *rp = &pkt->readmem_reply;
561 rp->hdr.is_reply = 1;
562 rp->hdr.len = sizeof (*rp);
565 rp->error = KDPERR_BAD_NBYTES;
585 cnt = kdp_machine_vm_read((mach_vm_address_t)rq->address, (caddr_t)rp->data, n);
586 rp->error = KDPERR_NO_ERROR;
588 rp->hdr.len += cnt;
592 *len = rp->hdr.len;
606 kdp_readmem64_reply_t *rp = &pkt->readmem64_reply;
612 rp->hdr.is_reply = 1;
613 rp->hdr.len = sizeof (*rp);
616 rp->error = KDPERR_BAD_NBYTES;
621 cnt = kdp_machine_vm_read((mach_vm_address_t)rq->address, (caddr_t)rp->data, rq->nbytes);
622 rp->error = KDPERR_NO_ERROR;
624 rp->hdr.len += cnt;
628 *len = rp->hdr.len;
642 kdp_readphysmem64_reply_t *rp = &pkt->readphysmem64_reply;
648 rp->hdr.is_reply = 1;
649 rp->hdr.len = sizeof (*rp);
652 rp->error = KDPERR_BAD_NBYTES;
657 cnt = (int)kdp_machine_phys_read(rq, rp->data, rq->lcpu);
658 rp->error = KDPERR_NO_ERROR;
660 rp->hdr.len += cnt;
664 *len = rp->hdr.len;
678 kdp_maxbytes_reply_t *rp = &pkt->maxbytes_reply;
683 rp->hdr.is_reply = 1;
684 rp->hdr.len = sizeof (*rp);
688 rp->max_bytes = MAX_KDP_DATA_SIZE;
691 *len = rp->hdr.len;
705 kdp_version_reply_t *rp = &pkt->version_reply;
710 rp->hdr.is_reply = 1;
711 rp->hdr.len = sizeof (*rp);
715 rp->version = KDP_VERSION;
717 rp->feature = KDP_FEATURE_BP;
719 rp->feature = 0;
722 *len = rp->hdr.len;
736 kdp_regions_reply_t *rp = &pkt->regions_reply;
742 rp->hdr.is_reply = 1;
743 rp->hdr.len = sizeof (*rp);
747 r = rp->regions;
748 rp->nregions = 0;
753 r->protection = VM_PROT_ALL; r++; rp->nregions++;
755 rp->hdr.len += rp->nregions * sizeof (kdp_region_t);
758 *len = rp->hdr.len;
773 kdp_writeregs_reply_t *rp = &pkt->writeregs_reply;
779 rp->error = kdp_machine_write_regs(rq->cpu, rq->flavor, rq->data, &size);
781 rp->hdr.is_reply = 1;
782 rp->hdr.len = sizeof (*rp);
785 *len = rp->hdr.len;
799 kdp_readregs_reply_t *rp = &pkt->readregs_reply;
805 rp->hdr.is_reply = 1;
806 rp->hdr.len = sizeof (*rp);
808 rp->error = kdp_machine_read_regs(rq->cpu, rq->flavor, rp->data, &size);
809 rp->hdr.len += size;
812 *len = rp->hdr.len;
826 kdp_breakpoint_reply_t *rp = &pkt->breakpoint_reply;
837 rp->error = kerr;
839 rp->hdr.is_reply = 1;
840 rp->hdr.len = sizeof (*rp);
842 *len = rp->hdr.len;
855 kdp_breakpoint64_reply_t *rp = &pkt->breakpoint64_reply;
866 rp->error = kerr;
868 rp->hdr.is_reply = 1;
869 rp->hdr.len = sizeof (*rp);
871 *len = rp->hdr.len;
884 kdp_breakpoint_reply_t *rp = &pkt->breakpoint_reply;
894 rp->error = kerr;
896 rp->hdr.is_reply = 1;
897 rp->hdr.len = sizeof (*rp);
899 *len = rp->hdr.len;
912 kdp_breakpoint64_reply_t *rp = &pkt->breakpoint64_reply;
923 rp->error = kerr;
925 rp->hdr.is_reply = 1;
926 rp->hdr.len = sizeof (*rp);
928 *len = rp->hdr.len;
1363 kdp_readioport_reply_t *rp = &pkt->readioport_reply;
1369 rp->hdr.is_reply = 1;
1370 rp->hdr.len = sizeof (*rp);
1373 rp->error = KDPERR_BAD_NBYTES;
1381 rp->error = kdp_machine_ioport_read(rq, rp->data, rq->lcpu);
1382 if (rp->error == KDPERR_NO_ERROR)
1383 rp->hdr.len += size;
1387 *len = rp->hdr.len;
1400 kdp_writeioport_reply_t *rp = &pkt->writeioport_reply;
1407 rp->error = KDPERR_BAD_NBYTES;
1412 rp->error = kdp_machine_ioport_write(rq, rq->data, rq->lcpu);
1415 rp->hdr.is_reply = 1;
1416 rp->hdr.len = sizeof (*rp);
1419 *len = rp->hdr.len;
1431 kdp_readmsr64_reply_t *rp = &pkt->readmsr64_reply;
1437 rp->hdr.is_reply = 1;
1438 rp->hdr.len = sizeof (*rp);
1441 rp->error = kdp_machine_msr64_read(rq, rp->data, rq->lcpu);
1442 if (rp->error == KDPERR_NO_ERROR)
1443 rp->hdr.len += sizeof(uint64_t);
1446 *len = rp->hdr.len;
1459 kdp_writemsr64_reply_t *rp = &pkt->writemsr64_reply;
1466 rp->error = kdp_machine_msr64_write(rq, rq->data, rq->lcpu);
1468 rp->hdr.is_reply = 1;
1469 rp->hdr.len = sizeof (*rp);
1472 *len = rp->hdr.len;
1485 kdp_dumpinfo_reply_t *rp = &pkt->dumpinfo_reply;
1492 rp->hdr.is_reply = 1;
1493 rp->hdr.len = sizeof (*rp);
1501 kdp_get_dump_info(&rp->type, rp->name, rp->destip, rp->routerip,
1502 &rp->port);
1505 *len = rp->hdr.len;