diff options
author | Wichert Akkerman <wichert@deephackmode.org> | 2000-04-10 22:22:31 +0000 |
---|---|---|
committer | Wichert Akkerman <wichert@deephackmode.org> | 2000-04-10 22:22:31 +0000 |
commit | c792698a99b640e7d256e8692c992bd967f0c5b2 (patch) | |
tree | 94ba5950aa4503c433438c5d6746ba2cf2145ea8 /bjm.c | |
parent | faf722234dc8af97776f94fdda7e100fb60650a2 (diff) | |
download | strace-c792698a99b640e7d256e8692c992bd967f0c5b2.tar.gz strace-c792698a99b640e7d256e8692c992bd967f0c5b2.tar.bz2 strace-c792698a99b640e7d256e8692c992bd967f0c5b2.tar.xz |
README-linux: updated to note that strace might not compile
with development kernels
bjm.c: sys_query_module: check if malloc succeeds
system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
linux/syscallent.h: updated for 2.3.99pre3
linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
even though Linux doesn't implement them
syscall.c: add global variables for MIPS registers as well
syscall.c: move global variables to before get_scno since that uses them
util.c: oops, misspelled defined
process.c: fix ptrace calls in change_syscall
mem.c: decode sys_madvise
Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
+ add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
+ small fix for RLIMIT_* and RUSAGE_BOTH
+ enhace support for capget and capset
Diffstat (limited to 'bjm.c')
-rw-r--r-- | bjm.c | 34 |
1 files changed, 22 insertions, 12 deletions
@@ -102,14 +102,19 @@ struct tcb *tcp; char* mod = data; size_t idx; - umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data); - for (idx=0; idx<ret; idx++) { - if (idx!=0) - tprintf(","); - tprintf(mod); - mod+=strlen(mod)+1; + if (data==NULL) { + fprintf(stderr, "sys_query_module: No memory\n"); + tprintf(" /* %Zu entries */ ", ret); + } else { + umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data); + for (idx=0; idx<ret; idx++) { + if (idx!=0) + tprintf(","); + tprintf(mod); + mod+=strlen(mod)+1; + } + free(data); } - free(data); } else tprintf(" /* %Zu entries */ ", ret); tprintf("}, %Zu", ret); @@ -122,12 +127,17 @@ struct tcb *tcp; struct module_symbol* sym = (struct module_symbol*)data; size_t idx; - umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data); - for (idx=0; idx<ret; idx++) { - tprintf("{name=%s, value=%lu} ", data+(long)sym->name, sym->value); - sym++; + if (data==NULL) { + fprintf(stderr, "sys_query_module: No memory\n"); + tprintf(" /* %Zu entries */ ", ret); + } else { + umoven(tcp, tcp->u_arg[2], tcp->u_arg[3], data); + for (idx=0; idx<ret; idx++) { + tprintf("{name=%s, value=%lu} ", data+(long)sym->name, sym->value); + sym++; + } + free(data); } - free(data); } else tprintf(" /* %Zu entries */ ", ret); tprintf("}, %Zd", ret); |