Lines Matching refs:nbytes

2427 pt_vread(mdb_tgt_t *t, void *buf, size_t nbytes, uintptr_t addr)
2436 bzero(buf, nbytes);
2437 return (nbytes);
2440 if ((n = Pread(t->t_pshandle, buf, nbytes, addr)) <= 0)
2447 pt_vwrite(mdb_tgt_t *t, const void *buf, size_t nbytes, uintptr_t addr)
2456 return (nbytes);
2458 n = Pwrite(t->t_pshandle, buf, nbytes, addr);
2467 pt_fread(mdb_tgt_t *t, void *buf, size_t nbytes, uintptr_t addr)
2472 return (mdb_gelf_rw(pt->p_file, buf, nbytes, addr,
2476 bzero(buf, nbytes);
2477 return (nbytes);
2481 pt_fwrite(mdb_tgt_t *t, const void *buf, size_t nbytes, uintptr_t addr)
2486 return (mdb_gelf_rw(pt->p_file, (void *)buf, nbytes, addr,
2490 return (nbytes);
2738 char *buf, size_t nbytes, GElf_Sym *symp, mdb_syminfo_t *sip)
2778 nbytes, symp, &sip->sym_id) != 0 || symp->st_value == 0)
2823 n = mdb_iob_snprintf(buf, nbytes, "PLT=");
2825 if (n > nbytes) {
2826 buf += nbytes;
2827 nbytes = 0;
2830 nbytes -= n;
2834 (void) mdb_iob_snprintf(buf, nbytes, "PLT:%s", pltsym);
2848 rv = Pxlookup_by_addr_resolved(P, addr, buf, nbytes,
2851 rv = Pxlookup_by_addr(P, addr, buf, nbytes,
2901 if (buf != NULL && nbytes > 1) {
2911 (void) mdb_iob_snprintf(buf, nbytes, "LM%lr`%s`%s",
2914 (void) mdb_iob_snprintf(buf, nbytes, "%s`%s",
2918 } else if (gst != NULL && buf != NULL && nbytes > 0) {
2919 (void) strncpy(buf, mdb_gelf_sym_name(gst, symp), nbytes);
2920 buf[nbytes - 1] = '\0';
3690 mdb_tgt_spec_desc_t *sp, char *buf, size_t nbytes)
3701 (void) mdb_iob_snprintf(buf, nbytes, "stop on entry to %s", name);
3750 mdb_tgt_spec_desc_t *sp, char *buf, size_t nbytes)
3761 (void) mdb_iob_snprintf(buf, nbytes, "stop on exit from %s", name);
3810 mdb_tgt_spec_desc_t *sp, char *buf, size_t nbytes)
3821 (void) mdb_iob_snprintf(buf, nbytes, "stop on %s", name);
3873 mdb_tgt_spec_desc_t *sp, char *buf, size_t nbytes)
3884 (void) mdb_iob_snprintf(buf, nbytes, "stop on %s", name);
3982 mdb_tgt_spec_desc_t *sp, char *buf, size_t nbytes)
3990 (void) mdb_iob_snprintf(buf, nbytes, "stop at %s",
3993 (void) mdb_iob_snprintf(buf, nbytes, "stop at %a",
4000 (void) mdb_iob_snprintf(buf, nbytes, "stop at %a", addr);
4174 mdb_tgt_spec_desc_t *sp, char *buf, size_t nbytes)
4201 (void) mdb_iob_snprintf(buf, nbytes, "stop on %s of [%la, %la)",
5074 pt_xd_auxv(mdb_tgt_t *t, void *buf, size_t nbytes)
5086 if (buf == NULL && nbytes == 0)
5092 nbytes = MIN(nbytes, sizeof (auxv_t) * auxn);
5093 bcopy(auxv, buf, nbytes);
5094 return (nbytes);
5098 pt_xd_cred(mdb_tgt_t *t, void *buf, size_t nbytes)
5108 if (buf == NULL && nbytes == 0)
5119 nbytes = MIN(nbytes, cbytes);
5120 bcopy(crp, buf, nbytes);
5122 return (nbytes);
5126 pt_xd_ehdr(mdb_tgt_t *t, void *buf, size_t nbytes)
5130 if (buf == NULL && nbytes == 0)
5136 nbytes = MIN(nbytes, sizeof (GElf_Ehdr));
5137 bcopy(&pt->p_file->gf_ehdr, buf, nbytes);
5138 return (nbytes);
5150 pt_xd_lwpstatus(mdb_tgt_t *t, void *buf, size_t nbytes)
5159 if (buf == NULL && nbytes == 0)
5166 nbytes = MIN(nbytes, sizeof (lwpstatus_t) * nlwp);
5169 bcopy(lbuf, buf, nbytes);
5172 return (nbytes);
5176 pt_xd_pshandle(mdb_tgt_t *t, void *buf, size_t nbytes)
5178 if (buf == NULL && nbytes == 0)
5181 if (t->t_pshandle == NULL || nbytes != sizeof (struct ps_prochandle *))
5184 bcopy(&t->t_pshandle, buf, nbytes);
5185 return (nbytes);
5189 pt_xd_psinfo(mdb_tgt_t *t, void *buf, size_t nbytes)
5193 if (buf == NULL && nbytes == 0)
5199 nbytes = MIN(nbytes, sizeof (psinfo_t));
5200 bcopy(psp, buf, nbytes);
5201 return (nbytes);
5205 pt_xd_pstatus(mdb_tgt_t *t, void *buf, size_t nbytes)
5209 if (buf == NULL && nbytes == 0)
5215 nbytes = MIN(nbytes, sizeof (pstatus_t));
5216 bcopy(psp, buf, nbytes);
5217 return (nbytes);
5221 pt_xd_utsname(mdb_tgt_t *t, void *buf, size_t nbytes)
5225 if (buf == NULL && nbytes == 0)
5231 nbytes = MIN(nbytes, sizeof (struct utsname));
5232 bcopy(&uts, buf, nbytes);
5233 return (nbytes);