summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Sharma <aruns@google.com>2009-03-16 18:42:27 +0000
committerArun Sharma <aruns@google.com>2009-03-16 21:37:11 -0700
commitec53de82ec7c00adb56c9e8b1b03d489a69c494b (patch)
tree160d069ee4734e522a07fa15fad1aa80424383c5
parentff0ae70cc3c3c1498724deed519cd18dde6c1e80 (diff)
downloadlibunwind-ec53de82ec7c00adb56c9e8b1b03d489a69c494b.tar.gz
[PATCH] Avoiding name conflict with the GNU-specific dprintf in stdio.h
Signed-off-by: Yang Zhang <yaaang@gmail.com>
-rw-r--r--include/libunwind_i.h4
-rw-r--r--src/dwarf/Gparser.c4
-rw-r--r--src/ia64/Gparser.c32
-rw-r--r--src/ia64/Gscript.c12
-rw-r--r--src/ia64/Gstep.c2
-rw-r--r--src/ia64/Gtables.c2
6 files changed, 28 insertions, 28 deletions
diff --git a/include/libunwind_i.h b/include/libunwind_i.h
index 17b3cf83..333ee378 100644
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -255,14 +255,14 @@ do { \
fprintf (stderr, format); \
} \
} while (0)
-# define dprintf(format...) fprintf (stderr, format)
+# define Dprintf(format...) fprintf (stderr, format)
# ifdef __GNUC__
# undef inline
# define inline UNUSED
# endif
#else
# define Debug(level,format...)
-# define dprintf(format...)
+# define Dprintf(format...)
#endif
static ALWAYS_INLINE void
diff --git a/src/dwarf/Gparser.c b/src/dwarf/Gparser.c
index aa87d618..01a37437 100644
--- a/src/dwarf/Gparser.c
+++ b/src/dwarf/Gparser.c
@@ -771,7 +771,7 @@ apply_reg_state (struct dwarf_cursor *c, struct dwarf_reg_state *rs)
if (c->ip == prev_ip && c->cfa == prev_cfa)
{
- dprintf ("%s: ip and cfa unchanged; stopping here (ip=0x%lx)\n",
+ Dprintf ("%s: ip and cfa unchanged; stopping here (ip=0x%lx)\n",
__FUNCTION__, (long) c->ip);
return -UNW_EBADFRAME;
}
@@ -835,7 +835,7 @@ dwarf_find_save_locs (struct dwarf_cursor *c)
memcpy(rs, rs1, offsetof(struct dwarf_reg_state, ip));
if (!rs)
{
- dprintf ("%s: failed to create unwind rs\n", __FUNCTION__);
+ Dprintf ("%s: failed to create unwind rs\n", __FUNCTION__);
ret = -UNW_EUNSPEC;
goto out;
}
diff --git a/src/ia64/Gparser.c b/src/ia64/Gparser.c
index 001581db..88ea90f4 100644
--- a/src/ia64/Gparser.c
+++ b/src/ia64/Gparser.c
@@ -147,7 +147,7 @@ decode_abreg (unsigned char abreg, int memory)
default:
break;
}
- dprintf ("libunwind: bad abreg=0x%x\n", abreg);
+ Dprintf ("libunwind: bad abreg=0x%x\n", abreg);
return IA64_REG_LC;
}
@@ -193,7 +193,7 @@ spill_next_when (struct ia64_reg_info **regp, struct ia64_reg_info *lim,
return;
}
}
- dprintf ("libunwind: excess spill!\n");
+ Dprintf ("libunwind: excess spill!\n");
}
static inline void
@@ -735,7 +735,7 @@ lookup_preg (int regnum, int memory, struct ia64_state_record *sr)
break;
default:
- dprintf ("%s: invalid register number %d\n", __FUNCTION__, regnum);
+ Dprintf ("%s: invalid register number %d\n", __FUNCTION__, regnum);
return NULL;
}
return sr->curr.reg + preg;
@@ -842,7 +842,7 @@ parse_dynamic (struct cursor *c, struct ia64_state_record *sr)
where = IA64_WHERE_BR;
else
{
- dprintf ("%s: can't save to register number %d\n",
+ Dprintf ("%s: can't save to register number %d\n",
__FUNCTION__, (int) op->reg);
return -UNW_EBADREG;
}
@@ -872,7 +872,7 @@ parse_dynamic (struct cursor *c, struct ia64_state_record *sr)
{
if (val & 0xf)
{
- dprintf ("%s: frame-size %ld not an integer "
+ Dprintf ("%s: frame-size %ld not an integer "
"multiple of 16\n",
__FUNCTION__, (long) op->val);
return -UNW_EINVAL;
@@ -881,7 +881,7 @@ parse_dynamic (struct cursor *c, struct ia64_state_record *sr)
}
else
{
- dprintf ("%s: can only ADD to stack-pointer\n",
+ Dprintf ("%s: can only ADD to stack-pointer\n",
__FUNCTION__);
return -UNW_EBADREG;
}
@@ -1047,40 +1047,40 @@ create_state_record_for (struct cursor *c, struct ia64_state_record *sr,
#if UNW_DEBUG
if (unwi_debug_level > 2)
{
- dprintf ("%s: state record for func 0x%lx, t=%u (flags=0x%lx):\n",
+ Dprintf ("%s: state record for func 0x%lx, t=%u (flags=0x%lx):\n",
__FUNCTION__,
(long) c->pi.start_ip, sr->when_target, (long) c->pi.flags);
for (r = sr->curr.reg; r < sr->curr.reg + IA64_NUM_PREGS; ++r)
{
if (r->where != IA64_WHERE_NONE || r->when != IA64_WHEN_NEVER)
{
- dprintf (" %s <- ", unw.preg_name[r - sr->curr.reg]);
+ Dprintf (" %s <- ", unw.preg_name[r - sr->curr.reg]);
switch (r->where)
{
case IA64_WHERE_GR:
- dprintf ("r%lu", (long) r->val);
+ Dprintf ("r%lu", (long) r->val);
break;
case IA64_WHERE_FR:
- dprintf ("f%lu", (long) r->val);
+ Dprintf ("f%lu", (long) r->val);
break;
case IA64_WHERE_BR:
- dprintf ("b%lu", (long) r->val);
+ Dprintf ("b%lu", (long) r->val);
break;
case IA64_WHERE_SPREL:
- dprintf ("[sp+0x%lx]", (long) r->val);
+ Dprintf ("[sp+0x%lx]", (long) r->val);
break;
case IA64_WHERE_PSPREL:
- dprintf ("[psp+0x%lx]", (long) r->val);
+ Dprintf ("[psp+0x%lx]", (long) r->val);
break;
case IA64_WHERE_NONE:
- dprintf ("%s+0x%lx",
+ Dprintf ("%s+0x%lx",
unw.preg_name[r - sr->curr.reg], (long) r->val);
break;
default:
- dprintf ("BADWHERE(%d)", r->where);
+ Dprintf ("BADWHERE(%d)", r->where);
break;
}
- dprintf ("\t\t%d\n", r->when);
+ Dprintf ("\t\t%d\n", r->when);
}
}
}
diff --git a/src/ia64/Gscript.c b/src/ia64/Gscript.c
index bf9ca02f..edeee1de 100644
--- a/src/ia64/Gscript.c
+++ b/src/ia64/Gscript.c
@@ -255,7 +255,7 @@ script_emit (struct ia64_script *script, struct ia64_script_insn insn)
{
if (script->count >= IA64_MAX_SCRIPT_LEN)
{
- dprintf ("%s: script exceeds maximum size of %u instructions!\n",
+ Dprintf ("%s: script exceeds maximum size of %u instructions!\n",
__FUNCTION__, IA64_MAX_SCRIPT_LEN);
return;
}
@@ -366,7 +366,7 @@ compile_reg (struct ia64_state_record *sr, int i, struct ia64_reg_info *r,
break;
default:
- dprintf ("%s: register %u has unexpected `where' value of %u\n",
+ Dprintf ("%s: register %u has unexpected `where' value of %u\n",
__FUNCTION__, i, r->where);
break;
}
@@ -631,7 +631,7 @@ uncached_find_save_locs (struct cursor *c)
if ((ret = build_script (c, &script)) < 0)
{
if (ret != -UNW_ESTOPUNWIND)
- dprintf ("%s: failed to build unwind script for ip %lx\n",
+ Dprintf ("%s: failed to build unwind script for ip %lx\n",
__FUNCTION__, (long) c->ip);
return ret;
}
@@ -671,7 +671,7 @@ ia64_find_save_locs (struct cursor *c)
script = script_new (cache, c->ip);
if (!script)
{
- dprintf ("%s: failed to create unwind script\n", __FUNCTION__);
+ Dprintf ("%s: failed to create unwind script\n", __FUNCTION__);
ret = -UNW_EUNSPEC;
goto out;
}
@@ -689,7 +689,7 @@ ia64_find_save_locs (struct cursor *c)
if (ret < 0)
{
if (ret != -UNW_ESTOPUNWIND)
- dprintf ("%s: failed to locate/build unwind script for ip %lx\n",
+ Dprintf ("%s: failed to locate/build unwind script for ip %lx\n",
__FUNCTION__, (long) c->ip);
goto out;
}
@@ -735,7 +735,7 @@ ia64_cache_proc_info (struct cursor *c)
script = script_new (cache, c->ip);
if (!script)
{
- dprintf ("%s: failed to create unwind script\n", __FUNCTION__);
+ Dprintf ("%s: failed to create unwind script\n", __FUNCTION__);
ret = -UNW_EUNSPEC;
goto out;
}
diff --git a/src/ia64/Gstep.c b/src/ia64/Gstep.c
index 4390d26a..e6329107 100644
--- a/src/ia64/Gstep.c
+++ b/src/ia64/Gstep.c
@@ -324,7 +324,7 @@ update_frame_state (struct cursor *c)
if (c->ip == prev_ip && c->sp == prev_sp && c->bsp == prev_bsp)
{
- dprintf ("%s: ip, sp, and bsp unchanged; stopping here (ip=0x%lx)\n",
+ Dprintf ("%s: ip, sp, and bsp unchanged; stopping here (ip=0x%lx)\n",
__FUNCTION__, (long) ip);
return -UNW_EBADFRAME;
}
diff --git a/src/ia64/Gtables.c b/src/ia64/Gtables.c
index c3448c8a..63725e80 100644
--- a/src/ia64/Gtables.c
+++ b/src/ia64/Gtables.c
@@ -411,7 +411,7 @@ get_kernel_table (unw_dyn_info_t *di)
ktab = sos_alloc (size);
if (!ktab)
{
- dprintf (__FILE__".%s: failed to allocate %zu bytes",
+ Dprintf (__FILE__".%s: failed to allocate %zu bytes",
__FUNCTION__, size);
return -UNW_ENOMEM;
}