54 int mdb_prop_datamodel = 0; /* Data model (see mdb_target_impl.h) */
55
56 ssize_t
57 mdb_vread(void *buf, size_t nbytes, uintptr_t addr)
58 {
59 ssize_t rbytes = mdb_tgt_vread(mdb.m_target, buf, nbytes, addr);
60
61 if (rbytes > 0 && rbytes < nbytes)
62 return (set_errbytes(rbytes, nbytes));
63
64 return (rbytes);
65 }
66
67 ssize_t
68 mdb_vwrite(const void *buf, size_t nbytes, uintptr_t addr)
69 {
70 return (mdb_tgt_vwrite(mdb.m_target, buf, nbytes, addr));
71 }
72
73 ssize_t
74 mdb_fread(void *buf, size_t nbytes, uintptr_t addr)
75 {
76 ssize_t rbytes = mdb_tgt_fread(mdb.m_target, buf, nbytes, addr);
77
78 if (rbytes > 0 && rbytes < nbytes)
79 return (set_errbytes(rbytes, nbytes));
80
81 return (rbytes);
82 }
83
84 ssize_t
85 mdb_fwrite(const void *buf, size_t nbytes, uintptr_t addr)
86 {
87 return (mdb_tgt_fwrite(mdb.m_target, buf, nbytes, addr));
88 }
89
90 ssize_t
91 mdb_pread(void *buf, size_t nbytes, physaddr_t addr)
92 {
93 ssize_t rbytes = mdb_tgt_pread(mdb.m_target, buf, nbytes, addr);
|
54 int mdb_prop_datamodel = 0; /* Data model (see mdb_target_impl.h) */
55
56 ssize_t
57 mdb_vread(void *buf, size_t nbytes, uintptr_t addr)
58 {
59 ssize_t rbytes = mdb_tgt_vread(mdb.m_target, buf, nbytes, addr);
60
61 if (rbytes > 0 && rbytes < nbytes)
62 return (set_errbytes(rbytes, nbytes));
63
64 return (rbytes);
65 }
66
67 ssize_t
68 mdb_vwrite(const void *buf, size_t nbytes, uintptr_t addr)
69 {
70 return (mdb_tgt_vwrite(mdb.m_target, buf, nbytes, addr));
71 }
72
73 ssize_t
74 mdb_aread(void *buf, size_t nbytes, uintptr_t addr, void *as)
75 {
76 ssize_t rbytes = mdb_tgt_aread(mdb.m_target, as, buf, nbytes, addr);
77
78 if (rbytes > 0 && rbytes < nbytes)
79 return (set_errbytes(rbytes, nbytes));
80
81 return (rbytes);
82 }
83
84 ssize_t
85 mdb_awrite(const void *buf, size_t nbytes, uintptr_t addr, void *as)
86 {
87 return (mdb_tgt_awrite(mdb.m_target, as, buf, nbytes, addr));
88 }
89
90 ssize_t
91 mdb_fread(void *buf, size_t nbytes, uintptr_t addr)
92 {
93 ssize_t rbytes = mdb_tgt_fread(mdb.m_target, buf, nbytes, addr);
94
95 if (rbytes > 0 && rbytes < nbytes)
96 return (set_errbytes(rbytes, nbytes));
97
98 return (rbytes);
99 }
100
101 ssize_t
102 mdb_fwrite(const void *buf, size_t nbytes, uintptr_t addr)
103 {
104 return (mdb_tgt_fwrite(mdb.m_target, buf, nbytes, addr));
105 }
106
107 ssize_t
108 mdb_pread(void *buf, size_t nbytes, physaddr_t addr)
109 {
110 ssize_t rbytes = mdb_tgt_pread(mdb.m_target, buf, nbytes, addr);
|