diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2008-09-09 16:00:58 -0400 |
---|---|---|
committer | Masami Hiramatsu <mhiramat@redhat.com> | 2008-09-09 16:00:58 -0400 |
commit | 4a0e1ceaed41df14fa3a4870c00c334a6dd8384f (patch) | |
tree | 33fcac12359c72e271608436213f95e149204d6d /runtime | |
parent | 67a66a8b72d19dc1a1fd10db1c55e31a6e93b270 (diff) | |
download | systemtap-steved-4a0e1ceaed41df14fa3a4870c00c334a6dd8384f.tar.gz systemtap-steved-4a0e1ceaed41df14fa3a4870c00c334a6dd8384f.tar.xz systemtap-steved-4a0e1ceaed41df14fa3a4870c00c334a6dd8384f.zip |
Add ia64 utrace support
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/ChangeLog | 4 | ||||
-rw-r--r-- | runtime/syscall.h | 47 |
2 files changed, 50 insertions, 1 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 71cd97e4..9cca0759 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,7 @@ +2008-09-09 Masami Hiramatsu <mhiramat@redhat.com> + + * syscall.h: Added ia64 support. + 2008-09-09 Mark Wielaard <mwielaard@redhat.com> * sym.c (_stp_kallsyms_lookup): Correct this_section_offset diff --git a/runtime/syscall.h b/runtime/syscall.h index 24e93463..8416fd1d 100644 --- a/runtime/syscall.h +++ b/runtime/syscall.h @@ -66,7 +66,15 @@ #define MUNMAP_SYSCALL_NO(tsk) 91 #define MREMAP_SYSCALL_NO(tsk) 163 #endif - + +#if defined(__ia64__) +#define MMAP_SYSCALL_NO(tsk) 1151 +#define MMAP2_SYSCALL_NO(tsk) 1172 +#define MPROTECT_SYSCALL_NO(tsk) 1155 +#define MUNMAP_SYSCALL_NO(tsk) 1152 +#define MREMAP_SYSCALL_NO(tsk) 1156 +#endif + #if !defined(MMAP_SYSCALL_NO) || !defined(MMAP2_SYSCALL_NO) \ || !defined(MPROTECT_SYSCALL_NO) || !defined(MUNMAP_SYSCALL_NO) \ || !defined(MREMAP_SYSCALL_NO) @@ -95,6 +103,14 @@ __stp_user_syscall_nr(struct pt_regs *regs) } #endif +#if defined(__ia64__) +static inline unsigned long +__stp_user_syscall_nr(struct pt_regs *regs) +{ + return regs->r15; +} +#endif + #if defined(__i386__) || defined(__x86_64__) static inline long * __stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs) @@ -129,6 +145,14 @@ __stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs) } #endif +#if defined(__ia64__) +static inline long * +__stp_user_syscall_return_value(struct task_struct *task, struct pt_regs *regs) +{ + return ®s->r8; +} +#endif + #if defined(__i386__) || defined(__x86_64__) static inline long * __stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs, @@ -211,4 +235,25 @@ __stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs, } #endif +#if defined(__ia64__) +static inline long * +__stp_user_syscall_arg(struct task_struct *task, struct pt_regs *regs, + unsigned int n) +{ + struct ia64_stap_get_arbsp_param pa; + if (n > 5) { + _stp_error("syscall arg > 5"); + return NULL; + } + + pa.ip = regs->cr_iip; + unw_init_running(ia64_stap_get_arbsp, &pa); + if (pa.address == 0) + return NULL; + + return ia64_rse_skip_regs(pa.address, n); + +} +#endif + #endif /* _SYSCALL_H_ */ |