diff options
author | William Cohen <wcohen@redhat.com> | 2009-04-23 11:13:59 -0400 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2009-04-23 11:13:59 -0400 |
commit | 927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a (patch) | |
tree | 1cd2cc946800969a9816883a8b2f2edc27caccdb /runtime/syscall.h | |
parent | 1e0a708d560ed69405e94a45d11067abae7f79a5 (diff) | |
parent | 4fecf7f1c9fd8ae54ff13677c710b75a10d8cc91 (diff) | |
download | systemtap-steved-927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a.tar.gz systemtap-steved-927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a.tar.xz systemtap-steved-927dab9f7b4298b4ef28ae87cdb7dafe43e5d76a.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/syscall.h')
-rw-r--r-- | runtime/syscall.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/runtime/syscall.h b/runtime/syscall.h index ffc21efc..38b523e1 100644 --- a/runtime/syscall.h +++ b/runtime/syscall.h @@ -345,6 +345,10 @@ struct syscall_get_set_args { int rw; }; +#define CFM_SOF(cfm) ((cfm) & 0x7f) /* Size of frame */ +#define CFM_SOL(cfm) (((cfm) >> 7) & 0x7f) /* Size of locals */ +#define CFM_OUT(cfm) (CFM_SOF(cfm) - CFM_SOL(cfm)) /* Size of outputs */ + static void syscall_get_set_args_cb(struct unw_frame_info *info, void *data) { struct syscall_get_set_args *args = data; @@ -361,15 +365,18 @@ static void syscall_get_set_args_cb(struct unw_frame_info *info, void *data) count = 0; if (in_syscall(pt)) - count = min_t(int, args->n, cfm & 0x7f); + /* args->i + args->n must be less equal than nr outputs */ + count = min_t(int, args->n, CFM_OUT(cfm) - args->i); for (i = 0; i < count; i++) { + /* Skips dirties and locals */ if (args->rw) - *ia64_rse_skip_regs(krbs, ndirty + i + args->i) = + *ia64_rse_skip_regs(krbs, + ndirty + CFM_SOL(cfm) + args->i + i) = args->args[i]; else args->args[i] = *ia64_rse_skip_regs(krbs, - ndirty + i + args->i); + ndirty + CFM_SOL(cfm) + args->i + i); } if (!args->rw) { |