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 <cmetcalf@tilera.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
Chris Metcalf
2013-02-05 13:02:42 -05:00
committed by Dmitry V. Levin
parent 9e1a7d818a
commit af8dc6b3a5
2 changed files with 5 additions and 4 deletions

3
defs.h
View File

@ -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);

View File

@ -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 *)&regs, 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