From: Chris Metcalf Date: Tue, 5 Feb 2013 18:02:42 +0000 (-0500) Subject: tile: fix merge skew with new get_regs architecture X-Git-Tag: v4.8~191 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af8dc6b3a562193c27c89531e7ac6d94e7c3c322;p=strace tile: fix merge skew with new get_regs architecture * defs.h [TILE]: Declare clear_regs(), get_regs() and get_regs_error. * syscall.c (get_regs) [TILE]: Fix merge skew. (printcall) [TILE]: fix a compiler warning about pt_reg_t in a printf expression. Signed-off-by: Chris Metcalf Signed-off-by: Dmitry V. Levin --- diff --git a/defs.h b/defs.h index d2c17e31..a45fa62b 100644 --- a/defs.h +++ b/defs.h @@ -560,7 +560,8 @@ extern void call_summary(FILE *); || defined(X86_64) || defined(X32) \ || defined(AARCH64) \ || defined(ARM) \ - || defined(SPARC) || defined(SPARC64) + || defined(SPARC) || defined(SPARC64) \ + || defined(TILE) extern long get_regs_error; # define clear_regs() (get_regs_error = -1) extern void get_regs(pid_t pid); diff --git a/syscall.c b/syscall.c index 3851c9dc..ec588b12 100644 --- a/syscall.c +++ b/syscall.c @@ -845,9 +845,9 @@ printcall(struct tcb *tcp) tprintf("[%08lx] ", pc); #elif defined(TILE) # ifdef _LP64 - tprintf("[%016lx] ", tile_regs.pc); + tprintf("[%016lx] ", (unsigned long) tile_regs.pc); # else - tprintf("[%08lx] ", tile_regs.pc); + tprintf("[%08lx] ", (unsigned long) tile_regs.pc); # endif #endif /* architecture */ } @@ -886,7 +886,7 @@ void get_regs(pid_t pid) # elif defined(SPARC) || defined(SPARC64) get_regs_error = ptrace(PTRACE_GETREGS, pid, (char *)®s, 0); # elif defined(TILE) - get_regs_error = ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &tile_regs); + get_regs_error = ptrace(PTRACE_GETREGS, pid, NULL, (long) &tile_regs); # endif } #endif