diff options
author | Petr Machata <pmachata@redhat.com> | 2012-05-04 17:04:58 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-08-29 19:03:16 +0200 |
commit | dcf518472b0f8581bac5af8a55d3a3c23472aaca (patch) | |
tree | 61ae734abdbf88cebad5c09bb288b97f06aabf06 /sysdeps/linux-gnu/x86_64/trace.c | |
parent | 2fb192b7bb49b659343f6dec89931168de00660c (diff) | |
download | ltrace-dcf518472b0f8581bac5af8a55d3a3c23472aaca.tar.gz |
Use struct Process.e_machine in conditions, not .mask_32bit
Though what we need in fact is a field determining ABI of the process.
e_machine is just one aspect of the used ABI, it doesn't include ELF class,
which we need to tell x86_64 binary from x32 binary.
Diffstat (limited to 'sysdeps/linux-gnu/x86_64/trace.c')
-rw-r--r-- | sysdeps/linux-gnu/x86_64/trace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/linux-gnu/x86_64/trace.c b/sysdeps/linux-gnu/x86_64/trace.c index e82adb9..ed7e885 100644 --- a/sysdeps/linux-gnu/x86_64/trace.c +++ b/sysdeps/linux-gnu/x86_64/trace.c @@ -692,7 +692,7 @@ arch_fetch_arg_init(enum tof type, Process *proc, } struct fetch_context *ret; - if (proc->mask_32bit) + if (proc->e_machine == EM_386) ret = arch_fetch_arg_init_32(ctx, type, proc, ret_info); else ret = arch_fetch_arg_init_64(ctx, type, proc, ret_info); @@ -788,7 +788,7 @@ int arch_fetch_arg_next(struct fetch_context *context, enum tof type, Process *proc, struct arg_type_info *info, struct value *valuep) { - if (proc->mask_32bit) + if (proc->e_machine == EM_386) return arch_fetch_arg_next_32(context, type, proc, info, valuep); @@ -811,7 +811,7 @@ int arch_fetch_retval(struct fetch_context *context, enum tof type, Process *proc, struct arg_type_info *info, struct value *valuep) { - if (proc->mask_32bit) + if (proc->e_machine == EM_386) return arch_fetch_retval_32(context, type, proc, info, valuep); return arch_fetch_fun_retval(context, type, proc, info, valuep); @@ -827,7 +827,7 @@ arch_fetch_arg_done(struct fetch_context *context) size_t arch_type_sizeof(Process *proc, struct arg_type_info *info) { - if (proc == NULL || !proc->mask_32bit) + if (proc == NULL || proc->e_machine != EM_386) return (size_t)-2; switch (info->type) { @@ -855,7 +855,7 @@ arch_type_sizeof(Process *proc, struct arg_type_info *info) size_t arch_type_alignof(Process *proc, struct arg_type_info *info) { - if (proc == NULL || !proc->mask_32bit) + if (proc == NULL || proc->e_machine != EM_386) return (size_t)-2; switch (info->type) { |