From 7a8dc28155491c6b40d9332591c2cc22b28c8a36 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Tue, 1 Mar 2016 20:43:45 +0000 Subject: [PATCH] Don't try to print words like addresses, as this results in illegal key lookups in the labeltable. Copied from Perforce Change: 190088 ServerID: perforce.ravenbrook.com --- mps/code/eventtxt.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mps/code/eventtxt.c b/mps/code/eventtxt.c index f739c55923d..aea7b478431 100644 --- a/mps/code/eventtxt.c +++ b/mps/code/eventtxt.c @@ -400,6 +400,13 @@ static void recordLabel(mps_pool_t pool, EventClock clock, char *p) static int hexWordWidth = (MPS_WORD_WIDTH+3)/4; +/* printWord -- output a ulongest_t in hex */ + +static void printWord(ulongest_t word, const char *ident) +{ + printf("%s:%0*" PRIXLONGEST " ", ident, hexWordWidth, word); +} + /* printAddr -- output a ulongest_t in hex, with the interned string * if the value is in the label table */ @@ -433,7 +440,10 @@ static void printAddr(EventClock clock, ulongest_t addr, const char *ident) printAddr(clock, val_hex, #ident); #define processParamP processParamA -#define processParamW processParamA + +#define processParamW(ident) \ + val_hex = parseHex(&p); \ + printWord(val_hex, #ident); #define processParamU(ident) \ val_hex = parseHex(&p); \