PROTECTED int unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) { #ifdef UNW_LOCAL_ONLY return -UNW_EINVAL; #else /* !UNW_LOCAL_ONLY */ struct cursor *c = (struct cursor *) cursor; if (tdep_needs_initialization) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = as; c->dwarf.as_arg = as_arg; #ifdef UNW_TARGET_PPC64 return common_init_ppc64(c); #elif UNW_TARGET_PPC32 return common_init_ppc32 (c); #else #error init_remote :: NO VALID PPC ARCH! #endif #endif /* !UNW_LOCAL_ONLY */ }
PROTECTED int unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) { #ifdef UNW_LOCAL_ONLY return -UNW_EINVAL; #else /* !UNW_LOCAL_ONLY */ struct cursor *c = (struct cursor *) cursor; if (tdep_needs_initialization) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = as; c->dwarf.as_arg = as_arg; if (as == unw_local_addr_space) { c->dwarf.as_arg = c; c->uc = as_arg; } else { c->dwarf.as_arg = as_arg; c->uc = 0; } return common_init (c, 0); #endif /* !UNW_LOCAL_ONLY */ }
int unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) { #ifdef UNW_LOCAL_ONLY return -UNW_EINVAL; #else /* !UNW_LOCAL_ONLY */ struct cursor *c = (struct cursor *) cursor; if (!atomic_read(&tdep_init_done)) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = as; if (as == unw_local_addr_space) { c->dwarf.as_arg = c; c->uc = as_arg; } else { c->dwarf.as_arg = as_arg; c->uc = NULL; } return common_init (c, 0); #endif /* !UNW_LOCAL_ONLY */ }
PROTECTED unw_accessors_t * unw_get_accessors (unw_addr_space_t as) { if (tdep_needs_initialization) tdep_init (); return &as->acc; }
PROTECTED unw_accessors_t * unw_get_accessors (unw_addr_space_t as) { if (!tdep_init_done) tdep_init (); return &as->acc; }
static int unw_init_local_common (unw_cursor_t *cursor, ucontext_t *uc, unsigned use_prev_instr) { struct cursor *c = (struct cursor *) cursor; if (!tdep_init_done) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = unw_local_addr_space; c->dwarf.as_arg = uc; return common_init (c, use_prev_instr); }
PROTECTED int unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) { struct cursor *c = (struct cursor *) cursor; if (tdep_needs_initialization) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = unw_local_addr_space; c->dwarf.as_arg = uc; return common_init (c); }
PROTECTED int unw_init_local (unw_cursor_t *cursor, unw_context_t *uc) { struct cursor *c = (struct cursor *) cursor; if (!tdep_init_done) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = unw_local_addr_space; c->dwarf.as_arg = uc; return common_init (c, 1); }
PROTECTED int unw_set_caching_policy (unw_addr_space_t as, unw_caching_policy_t policy) { if (!tdep_init_done) tdep_init (); // We don't support per-thread caching (not warranted/helpful), mutate it. if (policy == UNW_CACHE_PER_THREAD) policy = UNW_CACHE_GLOBAL; if (policy == as->caching_policy) return 0; /* no change */ as->caching_policy = policy; /* Ensure caches are empty (and initialized). */ unw_flush_cache (as, 0, 0); return 0; }
int unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) { #ifdef UNW_LOCAL_ONLY return -UNW_EINVAL; #else /* !UNW_LOCAL_ONLY */ struct cursor *c = (struct cursor *) cursor; if (!tdep_init_done) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = as; c->dwarf.as_arg = as_arg; return common_init (c, 0); #endif /* !UNW_LOCAL_ONLY */ }
PROTECTED int unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) { struct cursor *c = (struct cursor *) cursor; if (tdep_needs_initialization) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = unw_local_addr_space; c->dwarf.as_arg = uc; #ifdef UNW_TARGET_PPC64 return common_init_ppc64 (c); #else return common_init_ppc32 (c); #endif }
PROTECTED int unw_set_caching_policy (unw_addr_space_t as, unw_caching_policy_t policy) { if (!tdep_init_done) tdep_init (); #ifndef HAVE___THREAD if (policy == UNW_CACHE_PER_THREAD) policy = UNW_CACHE_GLOBAL; #endif if (policy == as->caching_policy) return 0; /* no change */ as->caching_policy = policy; /* Ensure caches are empty (and initialized). */ unw_flush_cache (as, 0, 0); return 0; }
PROTECTED int unw_init_local (unw_cursor_t *cursor, ucontext_t *uc) { struct cursor *c = (struct cursor *) cursor; if (tdep_needs_initialization) tdep_init (); Debug (1, "(cursor=%p)\n", c); c->dwarf.as = unw_local_addr_space; c->dwarf.as_arg = c; c->uc = uc; #if CONSERVATIVE_CHECKS c->validate = 1; #else c->validate = 0; #endif return common_init (c, 1); }
PROTECTED int unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg) { struct cursor *c = (struct cursor *) cursor; Debug (1, "(cursor=%p)\n", c); if (!tdep_init_done) tdep_init (); c->dwarf.as = as; if (as == unw_local_addr_space) { c->dwarf.as_arg = c; c->uc = as_arg; } else { c->dwarf.as_arg = as_arg; c->uc = NULL; } return common_init (c, 0); }