diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2011-12-23 00:50:49 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2011-12-23 00:50:49 +0000 |
commit | a5a839a920da9d54c4174ebc82b29d7718839029 (patch) | |
tree | e44bcac06e54707d90a4c62989b63b537dd7f554 /util.c | |
parent | b05fc5463be8df587b4acc8f522f51e21bc22be8 (diff) | |
download | strace-a5a839a920da9d54c4174ebc82b29d7718839029.tar.gz strace-a5a839a920da9d54c4174ebc82b29d7718839029.tar.bz2 strace-a5a839a920da9d54c4174ebc82b29d7718839029.tar.xz |
Enhance personality switching
On syscall entry, save current personality in the tcb structure
along with scno.
On syscall exit, restore current personality from the tcb structure.
* defs.h (struct tcb) [SUPPORTED_PERSONALITIES > 1]: Add currpers
field.
* strace.c (alloc_tcb) [SUPPORTED_PERSONALITIES > 1]: Initialize
tcp->currpers.
* syscall.c (update_personality) [SUPPORTED_PERSONALITIES > 1]: New
function.
(get_scno, trace_syscall_exiting): Use it.
Reported-by: Michael A Fetterman <mafetter@nvidia.com>
Diffstat (limited to 'util.c')
0 files changed, 0 insertions, 0 deletions