Drop unused patches
This commit is contained in:
parent
8c4195b426
commit
fbf52e6130
@ -1,94 +0,0 @@
|
||||
From cb58fdb5a072ad70087a07f67d0c094ff77ca4b7 Mon Sep 17 00:00:00 2001
|
||||
From: Petr Machata <pmachata@redhat.com>
|
||||
Date: Tue, 26 Mar 2013 13:26:23 +0100
|
||||
Subject: [PATCH] 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
|
||||
---
|
||||
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 bb16c61..656654a 100644
|
||||
--- a/sysdeps/linux-gnu/s390/regs.c
|
||||
+++ b/sysdeps/linux-gnu/s390/regs.c
|
||||
@@ -46,7 +46,7 @@
|
||||
#define PSW_MASK 0x7fffffff
|
||||
#endif
|
||||
|
||||
-void *
|
||||
+arch_addr_t
|
||||
get_instruction_pointer(struct process *proc)
|
||||
{
|
||||
long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_PSWADDR, 0) & PSW_MASK;
|
||||
@@ -54,20 +54,22 @@ get_instruction_pointer(struct process *proc)
|
||||
if (proc->mask_32bit)
|
||||
ret &= PSW_MASK31;
|
||||
#endif
|
||||
- return (void *)ret;
|
||||
+ /* XXX double cast. */
|
||||
+ return (arch_addr_t)ret;
|
||||
}
|
||||
|
||||
void
|
||||
-set_instruction_pointer(struct process *proc, void *addr)
|
||||
+set_instruction_pointer(struct process *proc, arch_addr_t addr)
|
||||
{
|
||||
#ifdef __s390x__
|
||||
if (proc->mask_32bit)
|
||||
- addr = (void *)((long)addr & PSW_MASK31);
|
||||
+ /* XXX double cast. */
|
||||
+ addr = (arch_addr_t)((uintptr_t)addr & PSW_MASK31);
|
||||
#endif
|
||||
ptrace(PTRACE_POKEUSER, proc->pid, PT_PSWADDR, addr);
|
||||
}
|
||||
|
||||
-void *
|
||||
+arch_addr_t
|
||||
get_stack_pointer(struct process *proc)
|
||||
{
|
||||
long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR15, 0) & PSW_MASK;
|
||||
@@ -75,16 +77,18 @@ get_stack_pointer(struct process *proc)
|
||||
if (proc->mask_32bit)
|
||||
ret &= PSW_MASK31;
|
||||
#endif
|
||||
- return (void *)ret;
|
||||
+ /* XXX double cast. */
|
||||
+ return (arch_addr_t)ret;
|
||||
}
|
||||
|
||||
-void *
|
||||
-get_return_addr(struct process *proc, void *stack_pointer)
|
||||
+arch_addr_t
|
||||
+get_return_addr(struct process *proc, arch_addr_t stack_pointer)
|
||||
{
|
||||
long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR14, 0) & PSW_MASK;
|
||||
#ifdef __s390x__
|
||||
if (proc->mask_32bit)
|
||||
ret &= PSW_MASK31;
|
||||
#endif
|
||||
- return (void *)ret;
|
||||
+ /* XXX double cast. */
|
||||
+ return (arch_addr_t)ret;
|
||||
}
|
||||
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);
|
||||
}
|
||||
--
|
||||
1.7.6.5
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
diff --git a/value.c b/value.c
|
||||
index d18db17..b98298e 100644
|
||||
--- a/value.c
|
||||
+++ b/value.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ltrace.
|
||||
- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc.
|
||||
+ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -282,9 +282,9 @@ value_init_deref(struct value *ret_val, struct value *valp)
|
||||
if (value_extract_word(valp, &l, NULL) < 0)
|
||||
return -1;
|
||||
|
||||
- /* We need "long" to be long enough to hold platform
|
||||
+ /* We need "long" to be long enough to hold target
|
||||
* pointers. */
|
||||
- typedef char assert__long_enough_long[-(sizeof(l) < sizeof(void *))];
|
||||
+ assert(sizeof(l) >= sizeof(arch_addr_t));
|
||||
|
||||
value_common_init(ret_val, valp->inferior, valp,
|
||||
valp->type->u.ptr_info.info, 0);
|
||||
diff --git a/lens_default.c b/lens_default.c
|
||||
index ed3d0e1..5d00814 100644
|
||||
--- a/lens_default.c
|
||||
+++ b/lens_default.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ltrace.
|
||||
- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc.
|
||||
+ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc.
|
||||
* Copyright (C) 1998,2004,2007,2008,2009 Juan Cespedes
|
||||
* Copyright (C) 2006 Ian Wienand
|
||||
* Copyright (C) 2006 Steve Fink
|
||||
@@ -342,9 +342,9 @@ format_array(FILE *stream, struct value *value, struct value_dict *arguments,
|
||||
struct expr_node *length, size_t maxlen, int before,
|
||||
const char *open, const char *close, const char *delim)
|
||||
{
|
||||
- /* We need "long" to be long enough to cover the whole address
|
||||
- * space. */
|
||||
- typedef char assert__long_enough_long[-(sizeof(long) < sizeof(void *))];
|
||||
+ /* We need "long" to be long enough to cover the whole target
|
||||
+ * address space. */
|
||||
+ assert(sizeof(long) >= sizeof(arch_addr_t));
|
||||
long l;
|
||||
if (expr_eval_word(length, value, arguments, &l) < 0)
|
||||
return -1;
|
||||
Loading…
Reference in New Issue
Block a user