Remove unused functions
* defs.h (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr): Remove. * util.c (umove_ulong_or_printaddr, umove_ulong_array_or_printaddr): Likewise.
This commit is contained in:
parent
17d1a1633d
commit
dc0dcf90d6
2
defs.h
2
defs.h
@ -510,8 +510,6 @@ extern int umoven(struct tcb *, long, unsigned int, void *);
|
||||
extern int umoven_or_printaddr(struct tcb *, long, unsigned int, void *);
|
||||
#define umove_or_printaddr(pid, addr, objp) \
|
||||
umoven_or_printaddr((pid), (addr), sizeof(*(objp)), (void *) (objp))
|
||||
extern int umove_ulong_or_printaddr(struct tcb *, long, unsigned long *);
|
||||
extern int umove_ulong_array_or_printaddr(struct tcb *, long, unsigned long *, size_t);
|
||||
extern int umovestr(struct tcb *, long, unsigned int, char *);
|
||||
extern int upeek(int pid, long, long *);
|
||||
|
||||
|
31
util.c
31
util.c
@ -1143,37 +1143,6 @@ umoven_or_printaddr(struct tcb *tcp, const long addr, const unsigned int len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
umove_ulong_or_printaddr(struct tcb *tcp, const long addr, unsigned long *ptr)
|
||||
{
|
||||
if (current_wordsize < sizeof(*ptr)) {
|
||||
uint32_t val32;
|
||||
int r = umove_or_printaddr(tcp, addr, &val32);
|
||||
if (!r)
|
||||
*ptr = (unsigned long) val32;
|
||||
return r;
|
||||
}
|
||||
return umove_or_printaddr(tcp, addr, ptr);
|
||||
}
|
||||
|
||||
int
|
||||
umove_ulong_array_or_printaddr(struct tcb *tcp, const long addr,
|
||||
unsigned long *ptr, size_t n)
|
||||
{
|
||||
if (current_wordsize < sizeof(*ptr)) {
|
||||
uint32_t ptr32[n];
|
||||
int r = umove_or_printaddr(tcp, addr, &ptr32);
|
||||
if (!r) {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < n; ++i)
|
||||
ptr[i] = (unsigned long) ptr32[i];
|
||||
}
|
||||
return r;
|
||||
}
|
||||
return umoven_or_printaddr(tcp, addr, n * sizeof(*ptr), ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Like `umove' but make the additional effort of looking
|
||||
* for a terminating zero byte.
|
||||
|
Loading…
Reference in New Issue
Block a user