strace/strace-4.5.14.diff

120 lines
3.0 KiB
Diff

--- mem.c
+++ mem.c
@@ -551,7 +551,7 @@
#if defined(LINUX) && defined(__i386__)
void
print_ldt_entry (ldt_entry)
-struct modify_ldt_ldt_s *ldt_entry;
+struct user_desc *ldt_entry;
{
tprintf("base_addr:%#08lx, "
"limit:%d, "
@@ -576,10 +576,10 @@
struct tcb *tcp;
{
if (entering(tcp)) {
- struct modify_ldt_ldt_s copy;
+ struct user_desc copy;
tprintf("%ld", tcp->u_arg[0]);
if (tcp->u_arg[1] == 0
- || tcp->u_arg[2] != sizeof (struct modify_ldt_ldt_s)
+ || tcp->u_arg[2] != sizeof (struct user_desc)
|| umove(tcp, tcp->u_arg[1], &copy) == -1)
tprintf(", %lx", tcp->u_arg[1]);
else {
@@ -599,7 +599,7 @@
sys_set_thread_area(tcp)
struct tcb *tcp;
{
- struct modify_ldt_ldt_s copy;
+ struct user_desc copy;
if (entering(tcp)) {
if (umove(tcp, tcp->u_arg[0], &copy) != -1) {
if (copy.entry_number == -1)
@@ -628,7 +628,7 @@
sys_get_thread_area(tcp)
struct tcb *tcp;
{
- struct modify_ldt_ldt_s copy;
+ struct user_desc copy;
if (exiting(tcp)) {
if (umove(tcp, tcp->u_arg[0], &copy) != -1) {
tprintf("{entry_number:%d, ", copy.entry_number);
--- process.c
+++ process.c
@@ -589,7 +589,7 @@
tprintf(", parent_tidptr=%#lx", tcp->u_arg[ARG_PTID]);
if (flags & CLONE_SETTLS) {
# ifdef I386
- struct modify_ldt_ldt_s copy;
+ struct user_desc copy;
if (umove(tcp, tcp->u_arg[ARG_TLS], &copy) != -1) {
tprintf(", {entry_number:%d, ",
copy.entry_number);
--- signal.c
+++ signal.c
@@ -1692,7 +1692,7 @@
struct tcb *tcp;
{
if (entering(tcp)) {
- tprintf("%ld, %s", tcp->u_arg[0], signame(tcp->u_arg[1]));
+ tprintf("%d, %s", (pid_t)tcp->u_arg[0], signame(tcp->u_arg[1]));
}
return 0;
}
--- strace.c
+++ strace.c
@@ -1382,7 +1382,7 @@
#ifdef LINUX
if (zombie != NULL)
- error = detach(zombie) || error;
+ error = detach(zombie, 0) || error;
#endif
return error;
@@ -1962,7 +1962,7 @@
fprintf(stderr,
"PANIC: handle_group_exit: %d leader %d\n",
tcp->pid, leader ? leader->pid : -1);
- detach(tcp); /* Already died. */
+ detach(tcp, 0); /* Already died. */
}
else {
/* Mark that we are taking the process down. */
@@ -2259,6 +2259,7 @@
&& (qual_flags[WSTOPSIG(status)] & QUAL_SIGNAL)) {
unsigned long addr = 0, pc = 0;
#ifdef PT_GETSIGINFO
+# if defined IA64 && defined LINUX
# define PSR_RI 41
struct siginfo si;
unsigned long psr;
@@ -2269,7 +2270,7 @@
pc += (psr >> PSR_RI) & 0x3;
ptrace(PT_GETSIGINFO, pid, 0, (long) &si);
addr = (unsigned long) si.si_addr;
-#elif defined PTRACE_GETSIGINFO
+# else
if (WSTOPSIG(status) == SIGSEGV ||
WSTOPSIG(status) == SIGBUS) {
siginfo_t si;
@@ -2278,6 +2279,7 @@
addr = (unsigned long)
si.si_addr;
}
+# endif
#endif
printleader(tcp);
tprintf("--- %s (%s) @ %lx (%lx) ---",
--- system.c
+++ system.c
@@ -1578,7 +1578,6 @@
{ CTL_KERN, "CTL_KERN" },
{ CTL_VM, "CTL_VM" },
{ CTL_NET, "CTL_NET" },
- { CTL_PROC, "CTL_PROC" },
{ CTL_FS, "CTL_FS" },
{ CTL_DEBUG, "CTL_DEBUG" },
{ CTL_DEV, "CTL_DEV" },