diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-03-17 00:44:02 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-03-17 12:18:15 +0000 |
commit | 4cbc36fe4546bce70537bc65541f65b4d7259a5b (patch) | |
tree | 5238751d4306e19bc4f66920604a47a09e0890ab /base/gdevdrop.c | |
parent | d7961033ee224fc5d2c96a16bea3f3399dd29561 (diff) | |
download | ghostpdl-4cbc36fe4546bce70537bc65541f65b4d7259a5b.tar.gz |
Bug 702151: Avoid truncating pointers in debug code.
Introduce a PRI_INTPTR and use that to consistently display
pointers. We avoid using %p, as that displays inconsistently
between platforms. Sometimes it does 0x%x, sometimes just %x.
Diffstat (limited to 'base/gdevdrop.c')
-rw-r--r-- | base/gdevdrop.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/gdevdrop.c b/base/gdevdrop.c index dcd3f659a..8494a0138 100644 --- a/base/gdevdrop.c +++ b/base/gdevdrop.c @@ -54,17 +54,17 @@ trace_copy_rop(const char *cname, gx_device * dev, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop) { - dmlprintf4(dev->memory, "%s: dev=0x%lx(%s) depth=%d\n", - cname, (ulong) dev, dev->dname, dev->color_info.depth); - dmlprintf4(dev->memory, " source data=0x%lx x=%d raster=%u id=%lu colors=", - (ulong) sdata, sourcex, sraster, (ulong) id); + dmlprintf4(dev->memory, "%s: dev="PRI_INTPTR"(%s) depth=%d\n", + cname, (intptr_t)dev, dev->dname, dev->color_info.depth); + dmlprintf4(dev->memory, " source data="PRI_INTPTR" x=%d raster=%u id=%lu colors=", + (intptr_t)sdata, sourcex, sraster, (ulong) id); if (scolors) dmprintf2(dev->memory, "(%"PRIx64",%"PRIx64");\n", (uint64_t)scolors[0], (uint64_t)scolors[1]); else dmputs(dev->memory, "none;\n"); if (textures) - dmlprintf8(dev->memory, " textures=0x%lx size=%dx%d(%dx%d) raster=%u shift=%d(%d)", - (ulong) textures, textures->size.x, textures->size.y, + dmlprintf8(dev->memory, " textures="PRI_INTPTR" size=%dx%d(%dx%d) raster=%u shift=%d(%d)", + (intptr_t)textures, textures->size.x, textures->size.y, textures->rep_width, textures->rep_height, textures->raster, textures->shift, textures->rep_shift); else |