diff options
author | Dave Brolley <brolley@redhat.com> | 2008-09-10 12:24:44 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2008-09-10 12:24:44 -0400 |
commit | 4efa91dd26956c961b2999470ced965a448ed31b (patch) | |
tree | b27b7b323eefbe3303e630809776b626987aa421 /runtime/regs-ia64.c | |
parent | bb997bd81d90b94e734c8c93402353eddd0bc408 (diff) | |
parent | 675fb1ddeec8cd22e17ab989f8a813a375ae6226 (diff) | |
download | systemtap-steved-4efa91dd26956c961b2999470ced965a448ed31b.tar.gz systemtap-steved-4efa91dd26956c961b2999470ced965a448ed31b.tar.xz systemtap-steved-4efa91dd26956c961b2999470ced965a448ed31b.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'runtime/regs-ia64.c')
-rw-r--r-- | runtime/regs-ia64.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/runtime/regs-ia64.c b/runtime/regs-ia64.c index fd8d8ca8..8ce3e4c3 100644 --- a/runtime/regs-ia64.c +++ b/runtime/regs-ia64.c @@ -61,27 +61,36 @@ static void ia64_stap_get_arbsp(struct unw_frame_info *info, void *arg) -(__offset + (regs->cr_ifs & 127)));\ } -static long ia64_fetch_register(int regno, struct pt_regs *pt_regs, unsigned long **cache) +static long * +__ia64_fetch_register(int regno, struct pt_regs *pt_regs, unsigned long **cache) { struct ia64_stap_get_arbsp_param pa; if (regno == 12) - return pt_regs->r12; + return &pt_regs->r12; if (regno >= 8 && regno <= 11) - return *(unsigned long *)(&pt_regs->r8 + regno - 8); + return (long *)(&pt_regs->r8 + regno - 8); else if (regno < 32 || regno > 127) - return 0; + return NULL; if (!*cache) { pa.ip = pt_regs->cr_iip; unw_init_running(ia64_stap_get_arbsp, &pa); if (pa.address == 0) - return 0; + return NULL; *cache = pa.address; } - return *ia64_rse_skip_regs(*cache, regno-32); + return ia64_rse_skip_regs(*cache, regno-32); +} + +static long +ia64_fetch_register(int regno, struct pt_regs *pt_regs, unsigned long **cache) +{ + long *reg; + reg = __ia64_fetch_register(regno, pt_regs, cache); + return (reg != NULL)? *reg : 0; } static void ia64_store_register(int regno, |