Ejemplo n.º 1
0
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 */
}
Ejemplo n.º 2
0
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 */
}
Ejemplo n.º 3
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 (!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 */
}
Ejemplo n.º 4
0
PROTECTED unw_accessors_t *
unw_get_accessors (unw_addr_space_t as)
{
  if (tdep_needs_initialization)
    tdep_init ();
  return &as->acc;
}
Ejemplo n.º 5
0
PROTECTED unw_accessors_t *
unw_get_accessors (unw_addr_space_t as)
{
    if (!tdep_init_done)
        tdep_init ();
    return &as->acc;
}
Ejemplo n.º 6
0
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);
}
Ejemplo n.º 7
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 = uc;
  return common_init (c);
}
Ejemplo n.º 8
0
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);
}
Ejemplo n.º 9
0
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;
}
Ejemplo n.º 10
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 */
}
Ejemplo n.º 11
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 = uc;
  #ifdef UNW_TARGET_PPC64
    return common_init_ppc64 (c);
  #else
    return common_init_ppc32 (c);
  #endif
}
Ejemplo n.º 12
0
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;
}
Ejemplo n.º 13
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);
}
Ejemplo n.º 14
0
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);
}