1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 20:03:43 +01:00

Convert from debug() to Debug().

(Logical change 1.162)
This commit is contained in:
hp.com!davidm 2004-01-30 00:01:24 +00:00
parent 1738b3b637
commit c67d345c33
15 changed files with 92 additions and 111 deletions

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2003 Hewlett-Packard Co
Copyright (C) 2003-2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -62,8 +62,7 @@ elf_w (lookup_symbol) (unw_word_t ip, struct elf_image *ei,
soff = ehdr->e_shoff;
if (soff + ehdr->e_shnum * ehdr->e_shentsize > ei->size)
{
debug (1, "%s: section table outside of image? (%lu > %lu)\n",
__FUNCTION__,
Debug (1, "section table outside of image? (%lu > %lu)\n",
(unsigned long) (soff + ehdr->e_shnum * ehdr->e_shentsize),
(unsigned long) ei->size);
return -UNW_ENOINFO;
@ -84,8 +83,7 @@ elf_w (lookup_symbol) (unw_word_t ip, struct elf_image *ei,
str_soff = soff + (shdr->sh_link * ehdr->e_shentsize);
if (str_soff + ehdr->e_shentsize >= ei->size)
{
debug (1, "%s: string table outside of image? (%lu >= %lu)\n",
__FUNCTION__,
Debug (1, "string table outside of image? (%lu >= %lu)\n",
(unsigned long) (str_soff + ehdr->e_shentsize),
(unsigned long) ei->size);
break;
@ -93,7 +91,7 @@ elf_w (lookup_symbol) (unw_word_t ip, struct elf_image *ei,
str_shdr = (Elf_W (Shdr) *) ((char *) ei->image + str_soff);
strtab = (char *) ei->image + str_shdr->sh_offset;
debug (160, "symtab=0x%lx[%d], strtab=0x%lx\n",
Debug (16, "symtab=0x%lx[%d], strtab=0x%lx\n",
(long) shdr->sh_offset, shdr->sh_type,
(long) str_shdr->sh_offset);
@ -107,7 +105,7 @@ elf_w (lookup_symbol) (unw_word_t ip, struct elf_image *ei,
val = sym->st_value;
if (sym->st_shndx != SHN_ABS)
val += load_offset;
debug (160, "0x%016lx info=0x%02x %s\n",
Debug (16, "0x%016lx info=0x%02x %s\n",
(long) val, sym->st_info, strtab + sym->st_name);
if ((Elf_W (Addr)) (ip - val) < min_dist)

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2002 Hewlett-Packard Co
Copyright (C) 2002, 2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -99,13 +99,13 @@ access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
{
if (write)
{
debug (100, "%s: mem[%x] <- %x\n", __FUNCTION__, addr, *val);
Debug (16, "mem[%x] <- %x\n", addr, *val);
*(unw_word_t *) addr = *val;
}
else
{
*val = *(unw_word_t *) addr;
debug (100, "%s: mem[%x] -> %x\n", __FUNCTION__, addr, *val);
Debug (16, "mem[%x] -> %x\n", addr, *val);
}
return 0;
}
@ -129,17 +129,17 @@ access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
if (write)
{
*(unw_word_t *) addr = *val;
debug (100, "%s: %s <- %x\n", __FUNCTION__, unw_regname (reg), *val);
Debug (16, "%s <- %x\n", unw_regname (reg), *val);
}
else
{
*val = *(unw_word_t *) addr;
debug (100, "%s: %s -> %x\n", __FUNCTION__, unw_regname (reg), *val);
Debug (16, "%s -> %x\n", unw_regname (reg), *val);
}
return 0;
badreg:
debug (1, "%s: bad register number %u\n", __FUNCTION__, reg);
Debug (1, "bad register number %u\n", reg);
return -UNW_EBADREG;
}
@ -163,20 +163,20 @@ access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
if (write)
{
debug (100, "%s: %s <- %016lx.%016lx\n", __FUNCTION__,
Debug (16, "%s <- %016lx.%016lx\n",
unw_regname (reg), val->raw.bits[1], val->raw.bits[0]);
*(unw_fpreg_t *) addr = *val;
}
else
{
*val = *(unw_fpreg_t *) addr;
debug (100, "%s: %s -> %016lx.%016lx\n", __FUNCTION__,
Debug (16, "%s -> %016lx.%016lx\n",
unw_regname (reg), val->raw.bits[1], val->raw.bits[0]);
}
return 0;
badreg:
debug (1, "%s: bad register number %u\n", __FUNCTION__, reg);
Debug (1, "bad register number %u\n", reg);
/* attempt to access a non-preserved register */
return -UNW_EBADREG;
#endif

View file

@ -1,6 +1,6 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2003 Hewlett-Packard Co
Contributed by ...
Copyright (C) 2003-2004 Hewlett-Packard Co
Contributed by David Mosberger
This file is part of libunwind.
@ -42,8 +42,7 @@ update_frame_state (struct cursor *c)
if (c->is_signal_frame)
{
ret = ia64_get (c, c->sp + 0x10 + SIGFRAME_ARG2_OFF, &c->sigcontext_loc);
debug (100, "%s: sigcontext_loc=%lx (ret=%d)\n",
__FUNCTION__, c->sigcontext_loc, ret);
Debug (12, "sigcontext_loc=%lx (ret=%d)\n", c->sigcontext_loc, ret);
if (ret < 0)
return ret;
@ -82,7 +81,7 @@ update_frame_state (struct cursor *c)
if ((ip & 0xc) != 0)
{
/* don't let obviously bad addresses pollute the cache */
debug (1, "%s: rejecting bad ip=0x%lx\n", __FUNCTION__, (long) c->ip);
Debug (1, "rejecting bad ip=0x%lx\n", (long) c->ip);
return -UNW_EINVALIDIP;
}
if (ip == 0)

View file

@ -157,13 +157,13 @@ access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
{
if (write)
{
debug (100, "%s: mem[%lx] <- %lx\n", __FUNCTION__, addr, *val);
Debug (16, "mem[%lx] <- %lx\n", addr, *val);
*(unw_word_t *) addr = *val;
}
else
{
*val = *(unw_word_t *) addr;
debug (100, "%s: mem[%lx] -> %lx\n", __FUNCTION__, addr, *val);
Debug (16, "mem[%lx] -> %lx\n", addr, *val);
}
return 0;
}
@ -281,15 +281,15 @@ access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
if (ret != 0)
{
debug (1, "%s: failed to %s %s\n",
__FUNCTION__, write ? "write" : "read", unw_regname (reg));
Debug (1, "failed to %s %s\n",
write ? "write" : "read", unw_regname (reg));
return -UNW_EBADREG;
}
if (write)
debug (100, "%s: %s <- %lx\n", __FUNCTION__, unw_regname (reg), *val);
Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
else
debug (100, "%s: %s -> %lx\n", __FUNCTION__, unw_regname (reg), *val);
Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
return 0;
}
@ -352,9 +352,9 @@ access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
*val = (uc->uc_mcontext.sc_nat & mask) != 0;
if (write)
debug (100, "%s: %s <- %lx\n", __FUNCTION__, unw_regname (reg), *val);
Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
else
debug (100, "%s: %s -> %lx\n", __FUNCTION__, unw_regname (reg), *val);
Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
return 0;
}
@ -365,17 +365,17 @@ access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
if (write)
{
*(unw_word_t *) addr = *val;
debug (100, "%s: %s <- %lx\n", __FUNCTION__, unw_regname (reg), *val);
Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
}
else
{
*val = *(unw_word_t *) addr;
debug (100, "%s: %s -> %lx\n", __FUNCTION__, unw_regname (reg), *val);
Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
}
return 0;
badreg:
debug (1, "%s: bad register number %u\n", __FUNCTION__, reg);
Debug (1, "bad register number %u\n", reg);
return -UNW_EBADREG;
}
@ -395,20 +395,20 @@ access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
if (write)
{
debug (100, "%s: %s <- %016lx.%016lx\n", __FUNCTION__,
Debug (12, "%s <- %016lx.%016lx\n",
unw_regname (reg), val->raw.bits[1], val->raw.bits[0]);
*(unw_fpreg_t *) addr = *val;
}
else
{
*val = *(unw_fpreg_t *) addr;
debug (100, "%s: %s -> %016lx.%016lx\n", __FUNCTION__,
Debug (12, "%s -> %016lx.%016lx\n",
unw_regname (reg), val->raw.bits[1], val->raw.bits[0]);
}
return 0;
badreg:
debug (1, "%s: bad register number %u\n", __FUNCTION__, reg);
Debug (1, "bad register number %u\n", reg);
/* attempt to access a non-preserved register */
return -UNW_EBADREG;
}
@ -458,7 +458,7 @@ ia64_uc_access_reg (struct cursor *c, ia64_loc_t loc, unw_word_t *valp,
ucontext_t *ucp;
int ret;
debug (100, "%s: %s locaction %s\n", __FUNCTION__,
Debug (16, "%s location %s\n",
write ? "writing" : "reading", ia64_strloc (loc));
if (c->as == unw_local_addr_space)

View file

@ -765,8 +765,7 @@ parse_dynamic (struct cursor *c, struct ia64_state_record *sr)
{
if (r->next)
{
debug (10, "libunwind: negative region length allowed in last "
"region only!");
Debug (1, "negative region length allowed in last region only!");
return -UNW_EINVAL;
}
len = -len;
@ -938,7 +937,7 @@ create_state_record_for (struct cursor *c, struct ia64_state_record *sr,
{
/* No info, return default unwinder (leaf proc, no mem stack, no
saved regs), rp in b0, pfs in ar.pfs. */
debug (1, "unwind.parser: no unwind info for ip=0x%lx (gp=%lx)\n",
Debug (1, "no unwind info for ip=0x%lx (gp=%lx)\n",
(long) ip, (long) c->pi.gp);
sr->curr.reg[IA64_REG_IP].where = IA64_WHERE_BR;
sr->curr.reg[IA64_REG_IP].when = -1;
@ -1003,8 +1002,7 @@ create_state_record_for (struct cursor *c, struct ia64_state_record *sr,
&& sr->when_target > sr->curr.reg[IA64_REG_BSPSTORE].when
&& sr->when_target > sr->curr.reg[IA64_REG_RNAT].when)
{
debug (10,
"libunwind: func 0x%lx may switch the register-backing-store\n",
Debug (8, "func 0x%lx may switch the register-backing-store\n",
c->pi.start_ip);
c->pi.flags |= UNW_PI_FLAG_IA64_RBS_SWITCH;
}

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2003 Hewlett-Packard Co
Copyright (C) 2003-2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -47,8 +47,7 @@ rbs_switch (struct cursor *c,
struct rbs_area *rbs = &c->rbs_area[c->rbs_curr];
unw_word_t lo, ndirty;
debug (10, "%s: (left=%u, curr=%u)\n\t",
__FUNCTION__, c->rbs_left_edge, c->rbs_curr);
Debug (10, "(left=%u, curr=%u)", c->rbs_left_edge, c->rbs_curr);
/* Calculate address "lo" at which the backing store starts: */
ndirty = ia64_rse_num_regs (saved_bspstore, saved_bsp);
@ -60,7 +59,7 @@ rbs_switch (struct cursor *c,
track it and we can simply overwrite it... */
if (rbs->size)
{
debug (10, "inner=[0x%lx-0x%lx)\n\t",
Debug (10, "inner=[0x%lx-0x%lx)",
(long) (rbs->end - rbs->size), (long) rbs->end);
c->rbs_curr = (c->rbs_curr + 1) % NELEMS (c->rbs_area);
@ -75,7 +74,7 @@ rbs_switch (struct cursor *c,
c->bsp = saved_bsp;
debug (10, "outer=[?????????????????\?-0x%llx), rnat@%s\n",
Debug (10, "outer=[?????????????????\?-0x%llx), rnat@%s\n",
(long long) rbs->end, ia64_strloc (rbs->rnat_loc));
return 0;
}
@ -94,7 +93,7 @@ rbs_find_stacked (struct cursor *c, unw_word_t regs_to_skip,
{
if (curr == left_edge)
{
debug (1, "%s: could not find register r%d!\n", __FUNCTION__, reg);
Debug (1, "could not find register r%d!\n", reg);
return -UNW_EBADREG;
}
@ -123,7 +122,7 @@ rbs_find_stacked (struct cursor *c, unw_word_t regs_to_skip,
if (curr == left_edge)
{
debug (1, "%s: could not find register r%d!\n", __FUNCTION__, reg);
Debug (1, "could not find register r%d!\n", reg);
return -UNW_EBADREG;
}
@ -203,9 +202,8 @@ rbs_cover_and_flush (struct cursor *c, unw_word_t nregs)
/* switch to next rbs-area, adjust src_bsp accordingly: */
if (curr == left_edge)
{
debug (1, "%s: rbs-underflow while flushing %lu regs, "
"src_bsp=0x%lx, dst_bsp=0x%lx\n",
__FUNCTION__, (unsigned long) nregs,
Debug (1, "rbs-underflow while flushing %lu regs, "
"src_bsp=0x%lx, dst_bsp=0x%lx\n", (unsigned long) nregs,
(unsigned long) src_bsp, (unsigned long) dst_bsp);
return -UNW_EBADREG;
}

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2001-2003 Hewlett-Packard Co
Copyright (C) 2001-2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -358,7 +358,7 @@ access_nat (struct cursor *c, ia64_loc_t loc, ia64_loc_t reg_loc,
}
HIDDEN int
ia64_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
int write)
{
ia64_loc_t loc, reg_loc, nat_loc;
@ -551,7 +551,7 @@ ia64_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
break;
default:
debug (1, "%s: bad register number %d\n", __FUNCTION__, reg);
Debug (1, "bad register number %d\n", reg);
return -UNW_EBADREG;
}
@ -566,7 +566,7 @@ ia64_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
}
HIDDEN int
ia64_access_fpreg (struct cursor *c, int reg, unw_fpreg_t *valp,
tdep_access_fpreg (struct cursor *c, int reg, unw_fpreg_t *valp,
int write)
{
ia64_loc_t loc;
@ -607,7 +607,7 @@ ia64_access_fpreg (struct cursor *c, int reg, unw_fpreg_t *valp,
break;
default:
debug (1, "%s: bad register number %d\n", __FUNCTION__, reg);
Debug (1, "bad register number %d\n", reg);
return -UNW_EBADREG;
}

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2001-2003 Hewlett-Packard Co
Copyright (C) 2001-2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -54,7 +54,7 @@ local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
# define GET_NAT(n) \
do \
{ \
ret = ia64_access_reg (c, UNW_IA64_NAT + (n), &val, 0); \
ret = tdep_access_reg (c, UNW_IA64_NAT + (n), &val, 0); \
if (ret < 0) \
return ret; \
if (val) \
@ -125,8 +125,8 @@ local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
if (c->eh_valid_mask & 0x2) sc->sc_gr[16] = c->eh_args[1];
if (c->eh_valid_mask & 0x4) sc->sc_gr[17] = c->eh_args[2];
if (c->eh_valid_mask & 0x8) sc->sc_gr[18] = c->eh_args[3];
debug (10, "%s: sc: r15=%lx,r16=%lx,r17=%lx,r18=%lx\n",
__FUNCTION__, (long) sc->sc_gr[15], (long) sc->sc_gr[16],
Debug (9, "sc: r15=%lx,r16=%lx,r17=%lx,r18=%lx\n",
(long) sc->sc_gr[15], (long) sc->sc_gr[16],
(long) sc->sc_gr[17], (long) sc->sc_gr[18]);
}
else
@ -143,11 +143,11 @@ local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
extra.r16 = c->eh_args[1];
extra.r17 = c->eh_args[2];
extra.r18 = c->eh_args[3];
debug (10, "%s: extra: r15=%lx,r16=%lx,r17=%lx,r18=%lx\n",
__FUNCTION__, (long) extra.r15, (long) extra.r16,
Debug (9, "extra: r15=%lx,r16=%lx,r17=%lx,r18=%lx\n",
(long) extra.r15, (long) extra.r16,
(long) extra.r17, (long) extra.r18);
}
debug (10, "%s: resuming at ip=%lx\n", __FUNCTION__, (long) c->ip);
Debug (8, "resuming at ip=%lx\n", (long) c->ip);
ia64_install_cursor (c, pri_unat, (unw_word_t *) &extra);
#elif defined(__hpux)
struct cursor *c = (struct cursor *) cursor;
@ -231,18 +231,18 @@ remote_install_cursor (struct cursor *c)
access_reg = c->as->acc.access_reg;
access_fpreg = c->as->acc.access_fpreg;
debug (1, "%s: copying out cursor state\n", __FUNCTION__);
Debug (8, "copying out cursor state\n");
for (reg = 0; reg < UNW_REG_LAST; ++reg)
{
if (unw_is_fpreg (reg))
{
if (ia64_access_fpreg (c, reg, &fpval, 0) >= 0)
if (tdep_access_fpreg (c, reg, &fpval, 0) >= 0)
(*access_fpreg) (c->as, reg, &fpval, 1, c->as_arg);
}
else
{
if (ia64_access_reg (c, reg, &val, 0) >= 0)
if (tdep_access_reg (c, reg, &val, 0) >= 0)
(*access_reg) (c->as, reg, &val, 1, c->as_arg);
}
}
@ -257,6 +257,8 @@ unw_resume (unw_cursor_t *cursor)
{
struct cursor *c = (struct cursor *) cursor;
Debug (2, "(cursor=%p)\n", c);
#ifdef UNW_LOCAL_ONLY
return local_resume (c->as, cursor, c->as_arg);
#else

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2001-2003 Hewlett-Packard Co
Copyright (C) 2001-2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -95,7 +95,7 @@ get_script_cache (unw_addr_space_t as, sigset_t *saved_sigmaskp)
sigprocmask (SIG_SETMASK, &unwi_full_sigmask, saved_sigmaskp);
if (likely (caching == UNW_CACHE_GLOBAL))
{
debug (200, "%s: acquiring lock\n", __FUNCTION__);
Debug (16, "%s: acquiring lock\n");
mutex_lock (&cache->lock);
}
#endif
@ -114,7 +114,7 @@ put_script_cache (unw_addr_space_t as, struct ia64_script_cache *cache,
{
assert (as->caching_policy != UNW_CACHE_NONE);
debug (200, "%s: unmasking signals/releasing lock\n", __FUNCTION__);
Debug (16, "unmasking signals/releasing lock\n");
#ifdef HAVE_ATOMIC_OPS_H
AO_CLEAR (&cache->busy);
#else
@ -554,14 +554,13 @@ ia64_find_save_locs (struct cursor *c)
cache = get_script_cache (c->as, &saved_sigmask);
if (!cache)
{
debug (125, "%s: contention on script-cached; doing uncached lookup\n",
__FUNCTION__);
Debug (1, "contention on script-cache; doing uncached lookup\n");
return uncached_find_save_locs (c);
}
{
script = script_lookup (cache, c);
debug (125, "%s: ip %lx %s in script cache\n",
__FUNCTION__, (long) c->ip, script ? "hit" : "missed");
Debug (8, "ip %lx %s in script cache\n", (long) c->ip,
script ? "hit" : "missed");
if (!script)
{
if ((ret = ia64_fetch_proc_info (c, c->ip, 1)) < 0)

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2001-2003 Hewlett-Packard Co
Copyright (C) 2001-2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -236,7 +236,7 @@ update_frame_state (struct cursor *c)
if ((ip & 0xc) != 0)
{
/* don't let obviously bad addresses pollute the cache */
debug (1, "%s: rejecting bad ip=0x%lx\n", __FUNCTION__, (long) c->ip);
Debug (1, "rejecting bad ip=0x%lx\n", (long) c->ip);
return -UNW_EINVALIDIP;
}
if (ip == 0)
@ -276,12 +276,12 @@ update_frame_state (struct cursor *c)
break;
default:
debug (1, "%s: unknown ABI marker: ABI=%u, context=%u\n",
__FUNCTION__, c->abi_marker >> 8, c->abi_marker & 0xff);
Debug (1, "unknown ABI marker: ABI=%u, context=%u\n",
c->abi_marker >> 8, c->abi_marker & 0xff);
return -UNW_EINVAL;
}
debug (100, "%s: sigcontext_addr=%lx (ret=%d)\n",
__FUNCTION__, (unsigned long) c->sigcontext_addr, ret);
Debug (12, "sigcontext_addr=%lx (ret=%d)\n",
(unsigned long) c->sigcontext_addr, ret);
c->sigcontext_off = c->sigcontext_addr - c->sp;

View file

@ -260,8 +260,7 @@ unw_search_ia64_unwind_table (unw_addr_space_t as, unw_word_t ip,
/* read the personality routine address (address is gp-relative): */
if ((ret = read_mem (as, info_end_addr, &handler_offset, arg)) < 0)
return ret;
debug (50, "%s: handler ptr @ offset=%lx, gp=%lx\n",
__FUNCTION__, handler_offset, di->gp);
Debug (4, "handler ptr @ offset=%lx, gp=%lx\n", handler_offset, di->gp);
if ((read_mem (as, handler_offset + di->gp, &pi->handler, arg)) < 0)
return ret;
}
@ -312,7 +311,7 @@ get_kernel_table (unw_dyn_info_t *di)
struct ia64_table_entry *ktab, *etab;
size_t size;
debug (100, "unwind: getting kernel table");
Debug (16, "getting kernel table");
size = getunwind (NULL, 0);
ktab = sos_alloc (size);
@ -337,7 +336,7 @@ get_kernel_table (unw_dyn_info_t *di)
di->u.ti.table_len = ((char *) etab - (char *) ktab) / sizeof (unw_word_t);
di->u.ti.table_data = (unw_word_t *) ktab;
debug (100, "unwind: found table `%s': [%lx-%lx) segbase=%lx len=%lu\n",
Debug (16, "found table `%s': [%lx-%lx) segbase=%lx len=%lu\n",
(char *) di->u.ti.name_ptr, di->start_ip, di->end_ip,
di->u.ti.segbase, di->u.ti.table_len);
return 0;
@ -468,7 +467,7 @@ callback (struct dl_phdr_info *info, size_t size, void *ptr)
+ sizeof (info->dlpi_phnum))
return -1;
debug (100, "unwind: checking `%s' (load_base=%lx)\n",
Debug (16, "checking `%s' (load_base=%lx)\n",
info->dlpi_name, info->dlpi_addr);
phdr = info->dlpi_phdr;
@ -541,7 +540,7 @@ callback (struct dl_phdr_info *info, size_t size, void *ptr)
di->u.ti.table_len = p_unwind->p_memsz / sizeof (unw_word_t);
di->u.ti.segbase = segbase;
debug (100, "unwind: found table `%s': segbase=%lx, len=%lu, gp=%lx, "
Debug (16, "found table `%s': segbase=%lx, len=%lu, gp=%lx, "
"table_data=%p\n", (char *) di->u.ti.name_ptr, di->u.ti.segbase,
di->u.ti.table_len, di->gp, di->u.ti.table_data);
return 1;
@ -642,14 +641,13 @@ tdep_find_proc_info (unw_addr_space_t as, unw_word_t ip,
if ((uhdr->header_version & ~UNWIND_TBL_32BIT) != 1
&& (uhdr->header_version & ~UNWIND_TBL_32BIT) != 2)
{
debug (1, "%s: encountered unknown unwind header version %ld\n",
__FUNCTION__, (long) (uhdr->header_version & ~UNWIND_TBL_32BIT));
Debug (1, "encountered unknown unwind header version %ld\n",
(long) (uhdr->header_version & ~UNWIND_TBL_32BIT));
return -UNW_EBADVERSION;
}
if (uhdr->header_version & UNWIND_TBL_32BIT)
{
debug (1, "%s: 32-bit unwind tables are not supported yet\n",
__FUNCTION__);
Debug (1, "32-bit unwind tables are not supported yet\n";
return -UNW_EINVAL;
}
@ -657,7 +655,7 @@ tdep_find_proc_info (unw_addr_space_t as, unw_word_t ip,
di.u.ti.table_len = ((uhdr->end_offset - uhdr->start_offset)
/ sizeof (unw_word_t));
debug (100, "unwind: found table `%s': segbase=%lx, len=%lu, gp=%lx, "
Debug (16, "found table `%s': segbase=%lx, len=%lu, gp=%lx, "
"table_data=%p\n", (char *) di.u.ti.name_ptr, di.u.ti.segbase,
di.u.ti.table_len, di.gp, di.u.ti.table_data);
#endif

View file

@ -108,7 +108,7 @@ common_init (struct cursor *c)
c->rbs_area[0].end = bspstore;
c->rbs_area[0].size = ((unw_word_t) 1) << 63; /* initial guess... */
c->rbs_area[0].rnat_loc = IA64_REG_LOC (c, UNW_IA64_AR_RNAT);
debug (10, "%s: initial rbs-area: [?-0x%llx), rnat@%s\n", __FUNCTION__,
Debug (10, "%s: initial rbs-area: [?-0x%llx), rnat@%s\n",
(long long) c->rbs_area[0].end,
ia64_strloc (c->rbs_area[0].rnat_loc));

View file

@ -20,8 +20,7 @@ rotate_gr (struct cursor *c, int reg)
preg -= sor; /* wrap around */
}
if (sor)
debug (100, "%s: sor=%u rrb.gr=%u, r%d -> r%d\n",
__FUNCTION__, sor, rrb_gr, reg, preg);
Debug (16, "sor=%u rrb.gr=%u, r%d -> r%d\n", sor, rrb_gr, reg, preg);
return preg;
}
@ -44,8 +43,7 @@ rotate_fr (struct cursor *c, int reg)
preg -= 96; /* wrap around */
}
if (rrb_fr)
debug (100, "%s: rrb.fr=%u, f%d -> f%d\n",
__FUNCTION__, rrb_fr, reg, preg);
Debug (16, "rrb.fr=%u, f%d -> f%d\n", rrb_fr, reg, preg);
return preg;
}

View file

@ -89,7 +89,7 @@ ia64_getfp (struct cursor *c, unw_word_t loc, unw_fpreg_t *val)
{
if (!loc)
{
debug (150, "%s: access to unsaved register\n", __FUNCTION__);
Debug (16, "access to unsaved register\n");
return -UNW_EBADREG;
}
*val = *(unw_fpreg_t *) IA64_GET_ADDR (loc);
@ -101,7 +101,7 @@ ia64_putfp (struct cursor *c, unw_word_t loc, unw_fpreg_t val)
{
if (!loc)
{
debug (150, "%s: access to unsaved register\n", __FUNCTION__);
Debug (16, "access to unsaved register\n");
return -UNW_EBADREG;
}
*(unw_fpreg_t *) IA64_GET_ADDR (loc) = val;
@ -113,7 +113,7 @@ ia64_get (struct cursor *c, unw_word_t loc, unw_word_t *val)
{
if (!loc)
{
debug (150, "%s: access to unsaved register\n", __FUNCTION__);
Debug (16, "access to unsaved register\n");
return -UNW_EBADREG;
}
*val = *(unw_word_t *) IA64_GET_ADDR (loc);
@ -125,7 +125,7 @@ ia64_put (struct cursor *c, unw_word_t loc, unw_word_t val)
{
if (!loc)
{
debug (150, "%s: access to unsaved register\n", __FUNCTION__);
Debug (16, "access to unsaved register\n");
return -UNW_EBADREG;
}
*(unw_word_t *) IA64_GET_ADDR (loc) = (val);
@ -371,8 +371,6 @@ struct ia64_labeled_state
#define ia64_validate_cache UNW_OBJ(ia64_validate_cache)
#define ia64_local_validate_cache UNW_OBJ(ia64_local_validate_cache)
#define ia64_per_thread_cache UNW_OBJ(per_thread_cache)
#define ia64_access_reg UNW_OBJ(access_reg)
#define ia64_access_fpreg UNW_OBJ(access_fpreg)
#define ia64_scratch_loc UNW_OBJ(scratch_loc)
#define ia64_local_resume UNW_OBJ(local_resume)
#define ia64_local_addr_space_init UNW_OBJ(local_addr_space_init)
@ -381,7 +379,6 @@ struct ia64_labeled_state
#define rbs_switch UNW_OBJ(rbs_switch)
#define rbs_find_stacked UNW_OBJ(rbs_find_stacked)
#define rbs_cover_and_flush UNW_OBJ(rbs_cover_and_flush)
#define ia64_init UNW_OBJ(init)
extern int ia64_make_proc_info (struct cursor *c);
extern int ia64_fetch_proc_info (struct cursor *c, unw_word_t ip,
@ -395,11 +392,6 @@ extern int ia64_find_save_locs (struct cursor *c);
extern void ia64_validate_cache (unw_addr_space_t as, void *arg);
extern int ia64_local_validate_cache (unw_addr_space_t as, void *arg);
extern void ia64_local_addr_space_init (void);
extern void ia64_init (void);
extern int ia64_access_reg (struct cursor *c, unw_regnum_t reg,
unw_word_t *valp, int write);
extern int ia64_access_fpreg (struct cursor *c, unw_regnum_t reg,
unw_fpreg_t *valp, int write);
extern ia64_loc_t ia64_scratch_loc (struct cursor *c, unw_regnum_t reg);
extern NORETURN void ia64_install_cursor (struct cursor *c,
@ -437,7 +429,7 @@ rbs_contains (struct rbs_area *rbs, unw_word_t bsp)
test is (bsp >= rbs->end - rbs->size) && (bsp < rbs->end). We
take advantage of the fact that -n == ~n + 1. */
result = bsp - rbs->end > ~rbs->size;
debug (150, "%s: 0x%lx in [0x%lx-0x%lx) => %d\n", __FUNCTION__,
Debug (16, "0x%lx in [0x%lx-0x%lx) => %d\n",
(long) bsp, (long) (rbs->end - rbs->size), (long) rbs->end, result);
return result;
}

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2003 Hewlett-Packard Co
Copyright (C) 2003-2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -56,8 +56,7 @@ tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
if (!path)
return -UNW_ENOINFO;
debug(1, "%s: segbase=%lx, mapoff=%lx, path=%s\n", __FUNCTION__, *segbase,
*mapoff, path);
Debug(1, "segbase=%lx, mapoff=%lx, path=%s\n", *segbase, *mapoff, path);
return elf_map_image (ei, path);
}