diff options
author | Petr Machata <pmachata@redhat.com> | 2013-03-26 13:26:23 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2013-03-26 13:26:23 +0100 |
commit | cb58fdb5a072ad70087a07f67d0c094ff77ca4b7 (patch) | |
tree | e78f82021fbf0904f1e1ba334648bfd082c188a9 /sysdeps | |
parent | 09489a36a9f0b7fda7bf9d0806301e8d712001b9 (diff) | |
download | ltrace-cb58fdb5a072ad70087a07f67d0c094ff77ca4b7.tar.gz |
s390 set_instruction_pointer: Set highest bit in 31-bit tracer
- The highest bit is used to distinguish between 24-bit and 31-bit
addressing modes. Up until about 3.1, Linux did this automatically,
but stopped doing so with the following commit:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d4e81b35b882d96f059afdb0f98e5b6025973b09
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/linux-gnu/s390/regs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/linux-gnu/s390/regs.c b/sysdeps/linux-gnu/s390/regs.c index 656654a..51410d7 100644 --- a/sysdeps/linux-gnu/s390/regs.c +++ b/sysdeps/linux-gnu/s390/regs.c @@ -65,6 +65,9 @@ set_instruction_pointer(struct process *proc, arch_addr_t addr) if (proc->mask_32bit) /* XXX double cast. */ addr = (arch_addr_t)((uintptr_t)addr & PSW_MASK31); +#else + /* XXX double cast. */ + addr = (arch_addr_t)((uintptr_t)addr | ~PSW_MASK); #endif ptrace(PTRACE_POKEUSER, proc->pid, PT_PSWADDR, addr); } |