return set_tcb_priv_data(tcp, (void *) val, 0);
}
-extern int umoven(struct tcb *, long, unsigned int, void *);
+extern int
+umoven(struct tcb *tcp, kernel_ureg_t addr, unsigned int len, void *laddr);
#define umove(pid, addr, objp) \
umoven((pid), (addr), sizeof(*(objp)), (void *) (objp))
-extern int umoven_or_printaddr(struct tcb *, long, unsigned int, void *);
+
+extern int
+umoven_or_printaddr(struct tcb *tcp, kernel_ureg_t addr,
+ unsigned int len, void *laddr);
#define umove_or_printaddr(pid, addr, objp) \
umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
+
extern int
-umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const long addr,
- const unsigned int len, void *our_addr);
-extern int umovestr(struct tcb *, long, unsigned int, char *);
+umoven_or_printaddr_ignore_syserror(struct tcb *tcp, kernel_ureg_t addr,
+ unsigned int len, void *laddr);
+
+extern int
+umovestr(struct tcb *tcp, kernel_ureg_t addr, unsigned int len, char *laddr);
+
extern int upeek(int pid, long, long *);
extern int upoke(int pid, long, long);
void *elem_buf,
size_t elem_size,
int (*umoven_func)(struct tcb *,
- long,
+ kernel_ureg_t,
unsigned int,
void *),
bool (*print_func)(struct tcb *,
}
static int
-umove_kulong_array_or_printaddr(struct tcb *tcp, const long addr,
- kernel_ulong_t *ptr, size_t n)
+umove_kulong_array_or_printaddr(struct tcb *const tcp, const kernel_ureg_t addr,
+ kernel_ulong_t *const ptr, const size_t n)
{
#ifndef current_klongsize
if (current_klongsize < sizeof(*ptr)) {
#include <limits.h>
static int
-fetch_struct_mmsghdr_or_printaddr(struct tcb *tcp, const long addr,
+fetch_struct_mmsghdr_or_printaddr(struct tcb *const tcp,
+ const kernel_ureg_t addr,
const unsigned int len, void *const mh)
{
if ((entering(tcp) || !syserror(tcp))
#endif /* end of hack */
static ssize_t
-vm_read_mem(pid_t pid, void *laddr, long raddr, size_t len)
+vm_read_mem(const pid_t pid, void *const laddr,
+ const kernel_ureg_t raddr, const size_t len)
{
const struct iovec local = {
.iov_base = laddr,
* at address `addr' to our space at `our_addr'
*/
int
-umoven(struct tcb *tcp, long addr, unsigned int len, void *our_addr)
+umoven(struct tcb *const tcp, kernel_ureg_t addr, unsigned int len,
+ void *const our_addr)
{
char *laddr = our_addr;
int pid = tcp->pid;
}
int
-umoven_or_printaddr(struct tcb *tcp, const long addr, const unsigned int len,
- void *our_addr)
+umoven_or_printaddr(struct tcb *const tcp, const kernel_ureg_t addr,
+ const unsigned int len, void *const our_addr)
{
if (!addr || !verbose(tcp) || (exiting(tcp) && syserror(tcp)) ||
umoven(tcp, addr, len, our_addr) < 0) {
}
int
-umoven_or_printaddr_ignore_syserror(struct tcb *tcp, const long addr,
- const unsigned int len, void *our_addr)
+umoven_or_printaddr_ignore_syserror(struct tcb *const tcp,
+ const kernel_ureg_t addr,
+ const unsigned int len,
+ void *const our_addr)
{
if (!addr || !verbose(tcp) || umoven(tcp, addr, len, our_addr) < 0) {
printaddr(addr);
* we never write past laddr[len-1]).
*/
int
-umovestr(struct tcb *tcp, long addr, unsigned int len, char *laddr)
+umovestr(struct tcb *const tcp, kernel_ureg_t addr, unsigned int len, char *laddr)
{
const unsigned long x01010101 = (unsigned long) 0x0101010101010101ULL;
const unsigned long x80808080 = (unsigned long) 0x8080808080808080ULL;
void *const elem_buf,
const size_t elem_size,
int (*const umoven_func)(struct tcb *,
- long,
+ kernel_ureg_t,
unsigned int,
void *),
bool (*const print_func)(struct tcb *,