diff --git a/mps/code/abq.c b/mps/code/abq.c index 22286354c77..869b0676bdd 100644 --- a/mps/code/abq.c +++ b/mps/code/abq.c @@ -166,10 +166,10 @@ Res ABQDescribe(ABQ abq, ABQDescribeElement describeElement, mps_lib_FILE *strea res = WriteF(stream, "ABQ $P\n{\n", (WriteFP)abq, - " elements: $U \n", (WriteFU)abq->elements, - " in: $U \n", (WriteFU)abq->in, - " out: $U \n", (WriteFU)abq->out, - " queue: \n", + "elements: $U \n", (WriteFU)abq->elements, + "in: $U \n", (WriteFU)abq->in, + "out: $U \n", (WriteFU)abq->out, + "queue: \n", NULL); if(res != ResOK) return res; diff --git a/mps/code/arena.c b/mps/code/arena.c index 30f7687ce81..d61f7da106f 100644 --- a/mps/code/arena.c +++ b/mps/code/arena.c @@ -47,8 +47,7 @@ static Res ArenaTrivDescribe(Arena arena, mps_lib_FILE *stream) * subclass describe method should avoid invoking * ARENA_SUPERCLASS()->describe. RHSK 2007-04-27. */ - return WriteF(stream, - " No class-specific description available.\n", NULL); + return WriteF(stream, "No class-specific description available.\n", NULL); } @@ -437,14 +436,14 @@ Res ArenaDescribe(Arena arena, mps_lib_FILE *stream) if (stream == NULL) return ResFAIL; res = WriteF(stream, "Arena $P {\n", (WriteFP)arena, - " class $P (\"$S\")\n", + "class $P (\"$S\")\n", (WriteFP)arena->class, arena->class->name, NULL); if (res != ResOK) return res; if (arena->poolReady) { res = WriteF(stream, - " controlPool $P\n", (WriteFP)&arena->controlPoolStruct, + "controlPool $P\n", (WriteFP)&arena->controlPoolStruct, NULL); if (res != ResOK) return res; } @@ -452,26 +451,26 @@ Res ArenaDescribe(Arena arena, mps_lib_FILE *stream) /* Note: this Describe clause calls a function */ reserved = ArenaReserved(arena); res = WriteF(stream, - " reserved $W <-- " + "reserved $W <-- " "total size of address-space reserved\n", (WriteFW)reserved, NULL); if (res != ResOK) return res; res = WriteF(stream, - " committed $W <-- " + "committed $W <-- " "total bytes currently stored (in RAM or swap)\n", (WriteFW)arena->committed, - " commitLimit $W\n", (WriteFW)arena->commitLimit, - " spareCommitted $W\n", (WriteFW)arena->spareCommitted, - " spareCommitLimit $W\n", (WriteFW)arena->spareCommitLimit, - " zoneShift $U\n", (WriteFU)arena->zoneShift, - " alignment $W\n", (WriteFW)arena->alignment, + "commitLimit $W\n", (WriteFW)arena->commitLimit, + "spareCommitted $W\n", (WriteFW)arena->spareCommitted, + "spareCommitLimit $W\n", (WriteFW)arena->spareCommitLimit, + "zoneShift $U\n", (WriteFU)arena->zoneShift, + "alignment $W\n", (WriteFW)arena->alignment, NULL); if (res != ResOK) return res; res = WriteF(stream, - " droppedMessages $U$S\n", (WriteFU)arena->droppedMessages, + "droppedMessages $U$S\n", (WriteFU)arena->droppedMessages, (arena->droppedMessages == 0 ? "" : " -- MESSAGES DROPPED!"), NULL); if (res != ResOK) return res; @@ -479,13 +478,8 @@ Res ArenaDescribe(Arena arena, mps_lib_FILE *stream) res = (*arena->class->describe)(arena, stream); if (res != ResOK) return res; - /* Do not call GlobalsDescribe: it makes too much output, thanks. - * RHSK 2007-04-27 - */ -#if 0 res = GlobalsDescribe(ArenaGlobals(arena), stream); if (res != ResOK) return res; -#endif res = WriteF(stream, "} Arena $P ($U)\n", (WriteFP)arena, diff --git a/mps/code/arenavm.c b/mps/code/arenavm.c index 81e0684c436..ea0fcb812e5 100644 --- a/mps/code/arenavm.c +++ b/mps/code/arenavm.c @@ -205,13 +205,13 @@ static Res VMArenaDescribe(Arena arena, mps_lib_FILE *stream) */ res = WriteF(stream, - " spareSize: $U\n", (WriteFU)vmArena->spareSize, + "spareSize $U\n", (WriteFU)vmArena->spareSize, + "extendBy $U\n", (WriteFU)vmArena->extendBy, + "extendMin $U\n", (WriteFU)vmArena->extendMin, NULL); if(res != ResOK) return res; - /* (incomplete: some fields are not Described) */ - return ResOK; } diff --git a/mps/code/buffer.c b/mps/code/buffer.c index 27314924600..ee25847b3b6 100644 --- a/mps/code/buffer.c +++ b/mps/code/buffer.c @@ -163,23 +163,22 @@ Res BufferDescribe(Buffer buffer, mps_lib_FILE *stream) res = WriteF(stream, "Buffer $P ($U) {\n", (WriteFP)buffer, (WriteFU)buffer->serial, - " class $P (\"$S\")\n", + "class $P (\"$S\")\n", (WriteFP)buffer->class, buffer->class->name, - " Arena $P\n", (WriteFP)buffer->arena, - " Pool $P\n", (WriteFP)buffer->pool, - buffer->isMutator ? - " Mutator Buffer\n" : " Internal Buffer\n", - " mode $S (TRANSITION, LOGGED, FLIPPED, ATTACHED)\n", - (WriteFS)abzMode, - " fillSize $UKb\n", (WriteFU)(buffer->fillSize / 1024), - " emptySize $UKb\n", (WriteFU)(buffer->emptySize / 1024), - " alignment $W\n", (WriteFW)buffer->alignment, - " base $A\n", buffer->base, - " initAtFlip $A\n", buffer->initAtFlip, - " init $A\n", buffer->ap_s.init, - " alloc $A\n", buffer->ap_s.alloc, - " limit $A\n", buffer->ap_s.limit, - " poolLimit $A\n", buffer->poolLimit, + "Arena $P\n", (WriteFP)buffer->arena, + "Pool $P\n", (WriteFP)buffer->pool, + buffer->isMutator ? "Mutator" : "Internal", " Buffer\n", + "mode $S (TRANSITION, LOGGED, FLIPPED, ATTACHED)\n", + (WriteFS)abzMode, + "fillSize $UKb\n", (WriteFU)(buffer->fillSize / 1024), + "emptySize $UKb\n", (WriteFU)(buffer->emptySize / 1024), + "alignment $W\n", (WriteFW)buffer->alignment, + "base $A\n", buffer->base, + "initAtFlip $A\n", buffer->initAtFlip, + "init $A\n", buffer->ap_s.init, + "alloc $A\n", buffer->ap_s.alloc, + "limit $A\n", buffer->ap_s.limit, + "poolLimit $A\n", buffer->poolLimit, NULL); if (res != ResOK) return res; @@ -1444,8 +1443,8 @@ static Res segBufDescribe(Buffer buffer, mps_lib_FILE *stream) if (res != ResOK) return res; res = WriteF(stream, - " Seg $P\n", (WriteFP)segbuf->seg, - " rankSet $U\n", (WriteFU)segbuf->rankSet, + "Seg $P\n", (WriteFP)segbuf->seg, + "rankSet $U\n", (WriteFU)segbuf->rankSet, NULL); return res; diff --git a/mps/code/cbs.c b/mps/code/cbs.c index 118d226a603..6335f581fc2 100644 --- a/mps/code/cbs.c +++ b/mps/code/cbs.c @@ -1066,11 +1066,11 @@ Res CBSDescribe(CBS cbs, mps_lib_FILE *stream) res = WriteF(stream, "CBS $P {\n", (WriteFP)cbs, - " alignment: $U\n", (WriteFU)cbs->alignment, - " blockPool: $P\n", (WriteFP)cbsBlockPool(cbs), - " fastFind: $U\n", (WriteFU)cbs->fastFind, - " inCBS: $U\n", (WriteFU)cbs->inCBS, - " treeSize: $U\n", (WriteFU)cbs->treeSize, + "alignment: $U\n", (WriteFU)cbs->alignment, + "blockPool: $P\n", (WriteFP)cbsBlockPool(cbs), + "fastFind: $U\n", (WriteFU)cbs->fastFind, + "inCBS: $U\n", (WriteFU)cbs->inCBS, + "treeSize: $U\n", (WriteFU)cbs->treeSize, NULL); if (res != ResOK) return res; @@ -1079,7 +1079,7 @@ Res CBSDescribe(CBS cbs, mps_lib_FILE *stream) METER_WRITE(cbs->treeSearch, stream); - res = WriteF(stream, "}\n", NULL); + res = WriteF(stream, "} CBS $P\n", (WriteFP)cbs, NULL); return res; } diff --git a/mps/code/event.c b/mps/code/event.c index 475fa4f875c..558d874a0f5 100644 --- a/mps/code/event.c +++ b/mps/code/event.c @@ -331,24 +331,24 @@ Res EventDescribe(Event event, mps_lib_FILE *stream) res = WriteF(stream, "Event $P {\n", (WriteFP)event, - " code $U\n", (WriteFU)event->any.code, - " clock ", NULL); + "code $U\n", (WriteFU)event->any.code, + "clock ", NULL); if (res != ResOK) return res; res = EVENT_CLOCK_WRITE(stream, event->any.clock); if (res != ResOK) return res; - res = WriteF(stream, "\n size $U\n", (WriteFU)event->any.size, NULL); + res = WriteF(stream, "\nsize $U\n", (WriteFU)event->any.size, NULL); if (res != ResOK) return res; switch (event->any.code) { #define EVENT_DESC_PARAM(name, index, sort, ident) \ - "\n $S", (WriteFS)#ident, \ + "\n$S", (WriteFS)#ident, \ EVENT_WRITE_PARAM_##sort(name, index, sort, ident) #define EVENT_DESC(X, name, _code, always, kind) \ case _code: \ res = WriteF(stream, \ - " event \"$S\"", (WriteFS)#name, \ + "event \"$S\"", (WriteFS)#name, \ EVENT_##name##_PARAMS(EVENT_DESC_PARAM, name) \ NULL); \ if (res != ResOK) return res; \ @@ -357,7 +357,7 @@ Res EventDescribe(Event event, mps_lib_FILE *stream) EVENT_LIST(EVENT_DESC, X) default: - res = WriteF(stream, " event type unknown", NULL); + res = WriteF(stream, "event type unknown", NULL); if (res != ResOK) return res; /* TODO: Hexdump unknown event contents. */ break; diff --git a/mps/code/format.c b/mps/code/format.c index 88a86283ef8..9d74d541921 100644 --- a/mps/code/format.c +++ b/mps/code/format.c @@ -199,14 +199,14 @@ Res FormatDescribe(Format format, mps_lib_FILE *stream) res = WriteF(stream, "Format $P ($U) {\n", (WriteFP)format, (WriteFU)format->serial, - " arena $P ($U)\n", + "arena $P ($U)\n", (WriteFP)format->arena, (WriteFU)format->arena->serial, - " alignment $W\n", (WriteFW)format->alignment, - " scan $F\n", (WriteFF)format->scan, - " skip $F\n", (WriteFF)format->skip, - " move $F\n", (WriteFF)format->move, - " isMoved $F\n", (WriteFF)format->isMoved, - " pad $F\n", (WriteFF)format->pad, + "alignment $W\n", (WriteFW)format->alignment, + "scan $F\n", (WriteFF)format->scan, + "skip $F\n", (WriteFF)format->skip, + "move $F\n", (WriteFF)format->move, + "isMoved $F\n", (WriteFF)format->isMoved, + "pad $F\n", (WriteFF)format->pad, "} Format $P ($U)\n", (WriteFP)format, (WriteFU)format->serial, NULL); if (res != ResOK) return res; diff --git a/mps/code/freelist.c b/mps/code/freelist.c index 6260451ff59..24df0645ecf 100644 --- a/mps/code/freelist.c +++ b/mps/code/freelist.c @@ -558,7 +558,7 @@ static Bool freelistDescribeIterateMethod(Bool *deleteReturn, Range range, UNUSED(closureS); res = WriteF(stream, - " [$P,", (WriteFP)RangeBase(range), + "[$P,", (WriteFP)RangeBase(range), "$P)", (WriteFP)RangeLimit(range), " {$U}\n", (WriteFU)RangeSize(range), NULL); @@ -577,8 +577,8 @@ Res FreelistDescribe(Freelist fl, mps_lib_FILE *stream) res = WriteF(stream, "Freelist $P {\n", (WriteFP)fl, - " alignment = $U\n", (WriteFU)fl->alignment, - " listSize = $U\n", (WriteFU)fl->listSize, + "alignment $U\n", (WriteFU)fl->alignment, + "listSize $U\n", (WriteFU)fl->listSize, NULL); FreelistIterate(fl, freelistDescribeIterateMethod, stream, 0); diff --git a/mps/code/global.c b/mps/code/global.c index 5f635206bd9..58cc3e8fcbd 100644 --- a/mps/code/global.c +++ b/mps/code/global.c @@ -1046,51 +1046,54 @@ Res GlobalsDescribe(Globals arenaGlobals, mps_lib_FILE *stream) arena = GlobalsArena(arenaGlobals); res = WriteF(stream, - " mpsVersion $S\n", arenaGlobals->mpsVersionString, - " lock $P\n", (WriteFP)arenaGlobals->lock, - " pollThreshold $U kB\n", + "Globals $P {\n", (WriteFP)arenaGlobals, + "mpsVersion $S\n", arenaGlobals->mpsVersionString, + "lock $P\n", (WriteFP)arenaGlobals->lock, + "pollThreshold $U kB\n", (WriteFU)(arenaGlobals->pollThreshold / 1024), arenaGlobals->insidePoll ? "inside poll\n" : "outside poll\n", arenaGlobals->clamped ? "clamped\n" : "released\n", - " fillMutatorSize $U kB\n", - (WriteFU)(arenaGlobals->fillMutatorSize / 1024), - " emptyMutatorSize $U kB\n", - (WriteFU)(arenaGlobals->emptyMutatorSize / 1024), - " allocMutatorSize $U kB\n", - (WriteFU)(arenaGlobals->allocMutatorSize / 1024), - " fillInternalSize $U kB\n", - (WriteFU)(arenaGlobals->fillInternalSize / 1024), - " emptyInternalSize $U kB\n", - (WriteFU)(arenaGlobals->emptyInternalSize / 1024), - " poolSerial $U\n", (WriteFU)arenaGlobals->poolSerial, - " rootSerial $U\n", (WriteFU)arenaGlobals->rootSerial, - " formatSerial $U\n", (WriteFU)arena->formatSerial, - " threadSerial $U\n", (WriteFU)arena->threadSerial, + "fillMutatorSize $U kB\n", + (WriteFU)(arenaGlobals->fillMutatorSize / 1024), + "emptyMutatorSize $U kB\n", + (WriteFU)(arenaGlobals->emptyMutatorSize / 1024), + "allocMutatorSize $U kB\n", + (WriteFU)(arenaGlobals->allocMutatorSize / 1024), + "fillInternalSize $U kB\n", + (WriteFU)(arenaGlobals->fillInternalSize / 1024), + "emptyInternalSize $U kB\n", + (WriteFU)(arenaGlobals->emptyInternalSize / 1024), + "poolSerial $U\n", (WriteFU)arenaGlobals->poolSerial, + "rootSerial $U\n", (WriteFU)arenaGlobals->rootSerial, + "formatSerial $U\n", (WriteFU)arena->formatSerial, + "threadSerial $U\n", (WriteFU)arena->threadSerial, arena->insideShield ? "inside shield\n" : "outside shield\n", - " busyTraces $B\n", (WriteFB)arena->busyTraces, - " flippedTraces $B\n", (WriteFB)arena->flippedTraces, + "busyTraces $B\n", (WriteFB)arena->busyTraces, + "flippedTraces $B\n", (WriteFB)arena->flippedTraces, /* @@@@ no TraceDescribe function */ - " epoch $U\n", (WriteFU)arena->epoch, + "epoch $U\n", (WriteFU)arena->epoch, + "history {\n", NULL); if (res != ResOK) return res; for(i=0; i < LDHistoryLENGTH; ++ i) { res = WriteF(stream, - " history[$U] = $B\n", i, arena->history[i], + "[$U] = $B\n", i, arena->history[i], NULL); if (res != ResOK) return res; } res = WriteF(stream, - " [note: indices are raw, not rotated]\n" - " prehistory = $B\n", (WriteFB)arena->prehistory, + "[note: indices are raw, not rotated]\n" + "prehistory = $B\n", (WriteFB)arena->prehistory, + "}\n", NULL); if (res != ResOK) return res; res = WriteF(stream, - " suspended $S\n", arena->suspended ? "YES" : "NO", - " shDepth $U\n", arena->shDepth, - " shCacheI $U\n", arena->shCacheI, + "suspended $S\n", arena->suspended ? "YES" : "NO", + "shDepth $U\n", arena->shDepth, + "shCacheI $U\n", arena->shCacheI, /* @@@@ should SegDescribe the cached segs? */ NULL); if (res != ResOK) return res; @@ -1117,6 +1120,8 @@ Res GlobalsDescribe(Globals arenaGlobals, mps_lib_FILE *stream) } /* @@@@ What about grey rings? */ + + res = WriteF(stream, "} Globals $P\n", (WriteFP)arenaGlobals, NULL); return res; } diff --git a/mps/code/mpm.c b/mps/code/mpm.c index a46fdf5fb10..99cccb2ae4f 100644 --- a/mps/code/mpm.c +++ b/mps/code/mpm.c @@ -454,6 +454,8 @@ Res WriteF_v(mps_lib_FILE *stream, va_list args) Res WriteF_firstformat_v(mps_lib_FILE *stream, const char *firstformat, va_list args) { + static size_t depth = 0; + static Bool line_start = TRUE; const char *format; int r; size_t i; @@ -468,9 +470,30 @@ Res WriteF_firstformat_v(mps_lib_FILE *stream, break; while(*format != '\0') { + if (*format == '}') { + AVER(depth > 0); + -- depth; + } + if (line_start) { + for (i = 0; i < depth; ++i) { + r = mps_lib_fputs(" ", stream); + if (r == mps_lib_EOF) return ResIO; + } + line_start = FALSE; + } if (*format != '$') { r = mps_lib_fputc(*format, stream); /* Could be more efficient */ if (r == mps_lib_EOF) return ResIO; + switch (*format) { + case '{': + ++ depth; + break; + case '\n': + line_start = TRUE; + break; + default: + break; + } } else { ++format; AVER(*format != '\0'); diff --git a/mps/code/nailboard.c b/mps/code/nailboard.c index 852c98949e7..1783bca27c1 100644 --- a/mps/code/nailboard.c +++ b/mps/code/nailboard.c @@ -414,12 +414,12 @@ Res NailboardDescribe(Nailboard board, mps_lib_FILE *stream) return ResFAIL; res = WriteF(stream, - "Nailboard $P\n{\n", (WriteFP)board, - " base: $P\n", (WriteFP)RangeBase(&board->range), - " limit: $P\n", (WriteFP)RangeLimit(&board->range), - " levels: $U\n", (WriteFU)board->levels, - " newNails: $S\n", board->newNails ? "TRUE" : "FALSE", - " alignShift: $U\n", (WriteFU)board->alignShift, + "Nailboard $P {\n", (WriteFP)board, + "base $P\n", (WriteFP)RangeBase(&board->range), + "limit $P\n", (WriteFP)RangeLimit(&board->range), + "levels $U\n", (WriteFU)board->levels, + "newNails $S\n", board->newNails ? "TRUE" : "FALSE", + "alignShift $U\n", (WriteFU)board->alignShift, NULL); if (res != ResOK) return res; @@ -427,7 +427,7 @@ Res NailboardDescribe(Nailboard board, mps_lib_FILE *stream) for(i = 0; i < board->levels; ++i) { Count levelNails = nailboardLevelBits(nailboardNails(board), i); Count resetNails = BTCountResRange(board->level[i], 0, levelNails); - res = WriteF(stream, " Level $U ($U bits, $U set): ", + res = WriteF(stream, "Level $U ($U bits, $U set): ", i, levelNails, levelNails - resetNails, NULL); if (res != ResOK) return res; @@ -441,7 +441,7 @@ Res NailboardDescribe(Nailboard board, mps_lib_FILE *stream) if (res != ResOK) return res; } - res = WriteF(stream, "}\n", NULL); + res = WriteF(stream, "} Nailboard $P\n", (WriteFP)board, NULL); if (res != ResOK) return res; diff --git a/mps/code/pool.c b/mps/code/pool.c index 5741470457a..606acb82b15 100644 --- a/mps/code/pool.c +++ b/mps/code/pool.c @@ -532,11 +532,11 @@ Res PoolDescribe(Pool pool, mps_lib_FILE *stream) res = WriteF(stream, "Pool $P ($U) {\n", (WriteFP)pool, (WriteFU)pool->serial, - " class $P (\"$S\")\n", + "class $P (\"$S\")\n", (WriteFP)pool->class, pool->class->name, - " arena $P ($U)\n", + "arena $P ($U)\n", (WriteFP)pool->arena, (WriteFU)pool->arena->serial, - " alignment $W\n", (WriteFW)pool->alignment, + "alignment $W\n", (WriteFW)pool->alignment, NULL); if (res != ResOK) return res; if (NULL != pool->format) { @@ -544,14 +544,14 @@ Res PoolDescribe(Pool pool, mps_lib_FILE *stream) if (res != ResOK) return res; } res = WriteF(stream, - " fillMutatorSize $UKb\n", - (WriteFU)(pool->fillMutatorSize / 1024), - " emptyMutatorSize $UKb\n", - (WriteFU)(pool->emptyMutatorSize / 1024), - " fillInternalSize $UKb\n", - (WriteFU)(pool->fillInternalSize / 1024), - " emptyInternalSize $UKb\n", - (WriteFU)(pool->emptyInternalSize / 1024), + "fillMutatorSize $UKb\n", + (WriteFU)(pool->fillMutatorSize / 1024), + "emptyMutatorSize $UKb\n", + (WriteFU)(pool->emptyMutatorSize / 1024), + "fillInternalSize $UKb\n", + (WriteFU)(pool->fillInternalSize / 1024), + "emptyInternalSize $UKb\n", + (WriteFU)(pool->emptyInternalSize / 1024), NULL); if (res != ResOK) return res; diff --git a/mps/code/poolabs.c b/mps/code/poolabs.c index aa2ee5adcbd..6f08703d126 100644 --- a/mps/code/poolabs.c +++ b/mps/code/poolabs.c @@ -315,7 +315,7 @@ Res PoolTrivDescribe(Pool pool, mps_lib_FILE *stream) { AVERT(Pool, pool); AVER(stream != NULL); - return WriteF(stream, " No class-specific description available.\n", NULL); + return WriteF(stream, "No class-specific description available.\n", NULL); } diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index aeb04454efe..8cb6b38cf03 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c @@ -259,23 +259,23 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream) limit = SegLimit(seg); res = WriteF(stream, - "AMC seg $P [$A,$A){\n", + "AMC seg $P [$A,$A) {\n", (WriteFP)seg, (WriteFA)base, (WriteFA)limit, NULL); if(res != ResOK) return res; if(amcSegHasNailboard(seg)) { - res = WriteF(stream, " Boarded\n", NULL); + res = WriteF(stream, "Boarded\n", NULL); } else if(SegNailed(seg) == TraceSetEMPTY) { - res = WriteF(stream, " Mobile\n", NULL); + res = WriteF(stream, "Mobile\n", NULL); } else { - res = WriteF(stream, " Stuck\n", NULL); + res = WriteF(stream, "Stuck\n", NULL); } if(res != ResOK) return res; - res = WriteF(stream, " Map: *===:object @+++:nails bbbb:buffer\n", NULL); + res = WriteF(stream, "Map: *===:object @+++:nails bbbb:buffer {\n", NULL); if(res != ResOK) return res; @@ -288,7 +288,7 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream) Addr j; char c; - res = WriteF(stream, " $A ", i, NULL); + res = WriteF(stream, "$A ", i, NULL); if(res != ResOK) return res; @@ -319,7 +319,7 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream) } AMCSegSketch(seg, abzSketch, NELEMS(abzSketch)); - res = WriteF(stream, " Sketch: $S\n", (WriteFS)abzSketch, NULL); + res = WriteF(stream, "}\nSketch: $S\n", (WriteFS)abzSketch, NULL); if(res != ResOK) return res; @@ -715,14 +715,14 @@ static Res amcGenDescribe(amcGen gen, mps_lib_FILE *stream) return ResFAIL; res = WriteF(stream, - " amcGen $P ($U) {\n", + "amcGen $P ($U) {\n", (WriteFP)gen, (WriteFU)amcGenNr(gen), - " buffer $P\n", gen->forward, - " segs $U, totalSize $U, newSize $U\n", + "buffer $P\n", gen->forward, + "segs $U, totalSize $U, newSize $U\n", (WriteFU)gen->segs, (WriteFU)gen->pgen.totalSize, (WriteFU)gen->pgen.newSize, - " } amcGen\n", NULL); + "} amcGen\n", NULL); return res; } @@ -2279,7 +2279,7 @@ static Res AMCDescribe(Pool pool, mps_lib_FILE *stream) res = WriteF(stream, (amc->rankSet == RankSetEMPTY) ? "AMCZ" : "AMC", - " $P {\n", (WriteFP)amc, " pool $P ($U)\n", + " $P {\n", (WriteFP)amc, "pool $P ($U)\n", (WriteFP)AMC2Pool(amc), (WriteFU)AMC2Pool(amc)->serial, NULL); if(res != ResOK) @@ -2300,9 +2300,7 @@ static Res AMCDescribe(Pool pool, mps_lib_FILE *stream) break; } - res = WriteF(stream, - " ", rampmode, " ($U)\n", (WriteFU)amc->rampCount, - NULL); + res = WriteF(stream, rampmode, " ($U)\n", (WriteFU)amc->rampCount, NULL); if(res != ResOK) return res; diff --git a/mps/code/poolams.c b/mps/code/poolams.c index 65b2dcf754f..135c308b92c 100644 --- a/mps/code/poolams.c +++ b/mps/code/poolams.c @@ -551,24 +551,24 @@ static Res AMSSegDescribe(Seg seg, mps_lib_FILE *stream) buffer = SegBuffer(seg); res = WriteF(stream, - " AMS $P\n", (WriteFP)amsseg->ams, - " grains $W\n", (WriteFW)amsseg->grains, + "AMS $P\n", (WriteFP)amsseg->ams, + "grains $W\n", (WriteFW)amsseg->grains, NULL); if (res != ResOK) return res; if (amsseg->allocTableInUse) res = WriteF(stream, - " alloctable $P\n", (WriteFP)amsseg->allocTable, + "alloctable $P\n", (WriteFP)amsseg->allocTable, NULL); else res = WriteF(stream, - " firstFree $W\n", (WriteFW)amsseg->firstFree, + "firstFree $W\n", (WriteFW)amsseg->firstFree, NULL); if (res != ResOK) return res; res = WriteF(stream, - " tables: nongrey $P, nonwhite $P\n", + "tables: nongrey $P, nonwhite $P\n", (WriteFP)amsseg->nongreyTable, (WriteFP)amsseg->nonwhiteTable, - " map: \n", + "map: {\n", NULL); if (res != ResOK) return res; @@ -576,7 +576,7 @@ static Res AMSSegDescribe(Seg seg, mps_lib_FILE *stream) char c = 0; if (i % 64 == 0) { - res = WriteF(stream, "\n ", NULL); + res = WriteF(stream, "\n", NULL); if (res != ResOK) return res; } @@ -606,7 +606,7 @@ static Res AMSSegDescribe(Seg seg, mps_lib_FILE *stream) WRITE_BUFFER_LIMIT(stream, seg, i+1, buffer, BufferLimit, "]"); } - res = WriteF(stream, "\n", NULL); + res = WriteF(stream, "}\n", NULL); return res; } @@ -1661,21 +1661,21 @@ static Res AMSDescribe(Pool pool, mps_lib_FILE *stream) res = WriteF(stream, "AMS $P {\n", (WriteFP)ams, - " pool $P ($U)\n", + "pool $P ($U)\n", (WriteFP)pool, (WriteFU)pool->serial, - " size $W\n", + "size $W\n", (WriteFW)ams->size, - " grain shift $U\n", (WriteFU)ams->grainShift, - " chain $P\n", + "grain shift $U\n", (WriteFU)ams->grainShift, + "chain $P\n", (WriteFP)ams->chain, NULL); if (res != ResOK) return res; res = WriteF(stream, - " segments\n" + "segments\n" " * = black, + = grey, - = white, . = alloc, ! = bad\n" - " buffers: [ = base, < = scan limit, | = init,\n" - " > = alloc, ] = limit\n", + " buffers: [ = base, < = scan limit, | = init," + " > = alloc, ] = limit\n", NULL); if (res != ResOK) return res; diff --git a/mps/code/poolmfs.c b/mps/code/poolmfs.c index 214b2b232d3..54ebbffeff0 100644 --- a/mps/code/poolmfs.c +++ b/mps/code/poolmfs.c @@ -323,11 +323,11 @@ static Res MFSDescribe(Pool pool, mps_lib_FILE *stream) AVER(stream != NULL); res = WriteF(stream, - " unrounded unit size $W\n", (WriteFW)mfs->unroundedUnitSize, - " unit size $W\n", (WriteFW)mfs->unitSize, - " extent size $W\n", (WriteFW)mfs->extendBy, - " free list begins at $P\n", (WriteFP)mfs->freeList, - " tract list begin at $P\n", (WriteFP)mfs->tractList, + "unrounded unit size $W\n", (WriteFW)mfs->unroundedUnitSize, + "unit size $W\n", (WriteFW)mfs->unitSize, + "extent size $W\n", (WriteFW)mfs->extendBy, + "free list begins at $P\n", (WriteFP)mfs->freeList, + "tract list begin at $P\n", (WriteFP)mfs->tractList, NULL); if(res != ResOK) return res; diff --git a/mps/code/poolmrg.c b/mps/code/poolmrg.c index 93d9f8bd25e..36850e62b21 100644 --- a/mps/code/poolmrg.c +++ b/mps/code/poolmrg.c @@ -806,17 +806,19 @@ static Res MRGDescribe(Pool pool, mps_lib_FILE *stream) if (stream == NULL) return ResFAIL; arena = PoolArena(pool); - res = WriteF(stream, " extendBy $W\n", mrg->extendBy, NULL); + res = WriteF(stream, "extendBy $W\n", mrg->extendBy, NULL); if (res != ResOK) return res; - res = WriteF(stream, " Entry queue:\n", NULL); + res = WriteF(stream, "Entry queue {\n", NULL); if (res != ResOK) return res; RING_FOR(node, &mrg->entryRing, nextNode) { refPart = MRGRefPartOfLink(linkOfRing(node), arena); - res = WriteF(stream, " at $A Ref $A\n", + res = WriteF(stream, "at $A Ref $A\n", (WriteFA)refPart, (WriteFA)MRGRefPartRef(arena, refPart), NULL); if (res != ResOK) return res; } + res = WriteF(stream, "}\n", NULL); + if (res != ResOK) return res; return ResOK; } diff --git a/mps/code/poolmv.c b/mps/code/poolmv.c index 0ce4f28c95d..71058cef712 100644 --- a/mps/code/poolmv.c +++ b/mps/code/poolmv.c @@ -688,18 +688,18 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream) if(stream == NULL) return ResFAIL; res = WriteF(stream, - " blockPool $P ($U)\n", + "blockPool $P ($U)\n", (WriteFP)mvBlockPool(mv), (WriteFU)mvBlockPool(mv)->serial, - " spanPool $P ($U)\n", + "spanPool $P ($U)\n", (WriteFP)mvSpanPool(mv), (WriteFU)mvSpanPool(mv)->serial, - " extendBy $W\n", (WriteFW)mv->extendBy, - " avgSize $W\n", (WriteFW)mv->avgSize, - " maxSize $W\n", (WriteFW)mv->maxSize, - " space $P\n", (WriteFP)mv->space, + "extendBy $W\n", (WriteFW)mv->extendBy, + "avgSize $W\n", (WriteFW)mv->avgSize, + "maxSize $W\n", (WriteFW)mv->maxSize, + "space $P\n", (WriteFP)mv->space, NULL); if(res != ResOK) return res; - res = WriteF(stream, " Spans\n", NULL); + res = WriteF(stream, "Spans {\n", NULL); if(res != ResOK) return res; spans = &mv->spans; @@ -708,11 +708,11 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream) AVERT(MVSpan, span); res = WriteF(stream, - " span $P", (WriteFP)span, - " tract $P", (WriteFP)span->tract, - " space $W", (WriteFW)span->space, - " blocks $U", (WriteFU)span->blockCount, - " largest ", + "span $P ", (WriteFP)span, + "tract $P ", (WriteFP)span->tract, + "space $W ", (WriteFW)span->space, + "blocks $U ", (WriteFU)span->blockCount, + "largest ", NULL); if(res != ResOK) return res; @@ -720,11 +720,10 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream) res = WriteF(stream, "$W\n", (WriteFW)span->largest, NULL); else res = WriteF(stream, "unknown\n", NULL); - if(res != ResOK) return res; } - res = WriteF(stream, " Span allocation maps\n", NULL); + res = WriteF(stream, "}\nSpan allocation maps {\n", NULL); if(res != ResOK) return res; step = pool->alignment; @@ -735,13 +734,13 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream) Addr i, j; MVBlock block; span = RING_ELT(MVSpan, spans, node); - res = WriteF(stream, " MVSpan $P\n", (WriteFP)span, NULL); + res = WriteF(stream, "MVSpan $P {\n", (WriteFP)span, NULL); if(res != ResOK) return res; block = span->blocks; for(i = span->base.base; i < span->limit.limit; i = AddrAdd(i, length)) { - res = WriteF(stream, " $A ", i, NULL); + res = WriteF(stream, "$A ", i, NULL); if(res != ResOK) return res; for(j = i; @@ -770,8 +769,13 @@ static Res MVDescribe(Pool pool, mps_lib_FILE *stream) res = WriteF(stream, "\n", NULL); if(res != ResOK) return res; } + + res = WriteF(stream, "} MVSpan $P\n", (WriteFP)span, NULL); + if(res != ResOK) return res; } + res = WriteF(stream, "}\n", NULL); + if(res != ResOK) return res; return ResOK; } diff --git a/mps/code/poolmv2.c b/mps/code/poolmv2.c index f6d85b1b134..207624c6dea 100644 --- a/mps/code/poolmv2.c +++ b/mps/code/poolmv2.c @@ -1015,21 +1015,21 @@ static Res MVTDescribe(Pool pool, mps_lib_FILE *stream) res = WriteF(stream, "MVT $P\n{\n", (WriteFP)mvt, - " minSize: $U \n", (WriteFU)mvt->minSize, - " meanSize: $U \n", (WriteFU)mvt->meanSize, - " maxSize: $U \n", (WriteFU)mvt->maxSize, - " fragLimit: $U \n", (WriteFU)mvt->fragLimit, - " reuseSize: $U \n", (WriteFU)mvt->reuseSize, - " fillSize: $U \n", (WriteFU)mvt->fillSize, - " availLimit: $U \n", (WriteFU)mvt->availLimit, - " abqOverflow: $S \n", mvt->abqOverflow?"TRUE":"FALSE", - " splinter: $S \n", mvt->splinter?"TRUE":"FALSE", - " splinterBase: $A \n", (WriteFA)mvt->splinterBase, - " splinterLimit: $A \n", (WriteFU)mvt->splinterLimit, - " size: $U \n", (WriteFU)mvt->size, - " allocated: $U \n", (WriteFU)mvt->allocated, - " available: $U \n", (WriteFU)mvt->available, - " unavailable: $U \n", (WriteFU)mvt->unavailable, + "minSize: $U \n", (WriteFU)mvt->minSize, + "meanSize: $U \n", (WriteFU)mvt->meanSize, + "maxSize: $U \n", (WriteFU)mvt->maxSize, + "fragLimit: $U \n", (WriteFU)mvt->fragLimit, + "reuseSize: $U \n", (WriteFU)mvt->reuseSize, + "fillSize: $U \n", (WriteFU)mvt->fillSize, + "availLimit: $U \n", (WriteFU)mvt->availLimit, + "abqOverflow: $S \n", mvt->abqOverflow?"TRUE":"FALSE", + "splinter: $S \n", mvt->splinter?"TRUE":"FALSE", + "splinterBase: $A \n", (WriteFA)mvt->splinterBase, + "splinterLimit: $A \n", (WriteFU)mvt->splinterLimit, + "size: $U \n", (WriteFU)mvt->size, + "allocated: $U \n", (WriteFU)mvt->allocated, + "available: $U \n", (WriteFU)mvt->available, + "unavailable: $U \n", (WriteFU)mvt->unavailable, NULL); if(res != ResOK) return res; @@ -1074,7 +1074,7 @@ static Res MVTDescribe(Pool pool, mps_lib_FILE *stream) METER_WRITE(mvt->exceptionSplinters, stream); METER_WRITE(mvt->exceptionReturns, stream); - res = WriteF(stream, "}\n", NULL); + res = WriteF(stream, "} MVT $P\n", (WriteFP)mvt, NULL); return res; } diff --git a/mps/code/poolmvff.c b/mps/code/poolmvff.c index fc4307d50a2..892cd175d31 100644 --- a/mps/code/poolmvff.c +++ b/mps/code/poolmvff.c @@ -681,12 +681,12 @@ static Res MVFFDescribe(Pool pool, mps_lib_FILE *stream) res = WriteF(stream, "MVFF $P {\n", (WriteFP)mvff, - " pool $P ($U)\n", + "pool $P ($U)\n", (WriteFP)pool, (WriteFU)pool->serial, - " extendBy $W\n", (WriteFW)mvff->extendBy, - " avgSize $W\n", (WriteFW)mvff->avgSize, - " total $U\n", (WriteFU)mvff->total, - " free $U\n", (WriteFU)mvff->free, + "extendBy $W\n", (WriteFW)mvff->extendBy, + "avgSize $W\n", (WriteFW)mvff->avgSize, + "total $U\n", (WriteFU)mvff->total, + "free $U\n", (WriteFU)mvff->free, NULL); if (res != ResOK) return res; @@ -699,7 +699,7 @@ static Res MVFFDescribe(Pool pool, mps_lib_FILE *stream) if (res != ResOK) return res; - res = WriteF(stream, "}\n", NULL); + res = WriteF(stream, "} MVFF $P\n", (WriteFP)mvff, NULL); return res; } diff --git a/mps/code/range.c b/mps/code/range.c index b54a001db2f..7f562bfb688 100644 --- a/mps/code/range.c +++ b/mps/code/range.c @@ -48,9 +48,9 @@ Res RangeDescribe(Range range, mps_lib_FILE *stream) res = WriteF(stream, "Range $P\n{\n", (WriteFP)range, - " base: $P\n", (WriteFP)RangeBase(range), - " limit: $P\n", (WriteFP)RangeLimit(range), - " size: $U\n", (WriteFU)RangeSize(range), + "base $P\n", (WriteFP)RangeBase(range), + "limit $P\n", (WriteFP)RangeLimit(range), + "size $U\n", (WriteFU)RangeSize(range), "}\n", NULL); if (res != ResOK) { return res; diff --git a/mps/code/root.c b/mps/code/root.c index 4277550a7fb..fcf7d88ba80 100644 --- a/mps/code/root.c +++ b/mps/code/root.c @@ -589,25 +589,25 @@ Res RootDescribe(Root root, mps_lib_FILE *stream) res = WriteF(stream, "Root $P ($U) {\n", (WriteFP)root, (WriteFU)root->serial, - " arena $P ($U)\n", (WriteFP)root->arena, + "arena $P ($U)\n", (WriteFP)root->arena, (WriteFU)root->arena->serial, - " rank $U\n", (WriteFU)root->rank, - " grey $B\n", (WriteFB)root->grey, - " summary $B\n", (WriteFB)root->summary, + "rank $U\n", (WriteFU)root->rank, + "grey $B\n", (WriteFB)root->grey, + "summary $B\n", (WriteFB)root->summary, NULL); if (res != ResOK) return res; switch(root->var) { case RootTABLE: res = WriteF(stream, - " table base $A limit $A\n", + "table base $A limit $A\n", root->the.table.base, root->the.table.limit, NULL); if (res != ResOK) return res; break; case RootTABLE_MASKED: - res = WriteF(stream, " table base $A limit $A mask $B\n", + res = WriteF(stream, "table base $A limit $A mask $B\n", root->the.tableMasked.base, root->the.tableMasked.limit, root->the.tableMasked.mask, NULL); @@ -616,8 +616,8 @@ Res RootDescribe(Root root, mps_lib_FILE *stream) case RootFUN: res = WriteF(stream, - " scan function $F\n", (WriteFF)root->the.fun.scan, - " environment p $P s $W\n", + "scan function $F\n", (WriteFF)root->the.fun.scan, + "environment p $P s $W\n", root->the.fun.p, (WriteFW)root->the.fun.s, NULL); if (res != ResOK) return res; @@ -625,16 +625,16 @@ Res RootDescribe(Root root, mps_lib_FILE *stream) case RootREG: res = WriteF(stream, - " thread $P\n", (WriteFP)root->the.reg.thread, - " environment p $P", root->the.reg.p, + "thread $P\n", (WriteFP)root->the.reg.thread, + "environment p $P", root->the.reg.p, NULL); if (res != ResOK) return res; break; case RootFMT: res = WriteF(stream, - " scan function $F\n", (WriteFF)root->the.fmt.scan, - " format base $A limit $A\n", + "scan function $F\n", (WriteFF)root->the.fmt.scan, + "format base $A limit $A\n", root->the.fmt.base, root->the.fmt.limit, NULL); if (res != ResOK) return res; diff --git a/mps/code/seg.c b/mps/code/seg.c index 31dd0759ff9..1302cd4cd3e 100644 --- a/mps/code/seg.c +++ b/mps/code/seg.c @@ -368,9 +368,9 @@ Res SegDescribe(Seg seg, mps_lib_FILE *stream) res = WriteF(stream, "Segment $P [$A,$A) {\n", (WriteFP)seg, (WriteFA)SegBase(seg), (WriteFA)SegLimit(seg), - " class $P (\"$S\")\n", + "class $P (\"$S\")\n", (WriteFP)seg->class, seg->class->name, - " pool $P ($U)\n", + "pool $P ($U)\n", (WriteFP)pool, (WriteFU)pool->serial, NULL); if (res != ResOK) return res; @@ -378,8 +378,7 @@ Res SegDescribe(Seg seg, mps_lib_FILE *stream) res = seg->class->describe(seg, stream); if (res != ResOK) return res; - res = WriteF(stream, "\n", - "} Segment $P\n", (WriteFP)seg, NULL); + res = WriteF(stream, "} Segment $P\n", (WriteFP)seg, NULL); return res; } @@ -1031,8 +1030,8 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream) if (stream == NULL) return ResFAIL; res = WriteF(stream, - " shield depth $U\n", (WriteFU)seg->depth, - " protection mode:", + "shield depth $U\n", (WriteFU)seg->depth, + "protection mode:", NULL); if (res != ResOK) return res; if (SegPM(seg) & AccessREAD) { @@ -1043,7 +1042,7 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream) res = WriteF(stream, " write", NULL); if (res != ResOK) return res; } - res = WriteF(stream, "\n shield mode:", NULL); + res = WriteF(stream, "\nshield mode:", NULL); if (res != ResOK) return res; if (SegSM(seg) & AccessREAD) { res = WriteF(stream, " read", NULL); @@ -1053,7 +1052,7 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream) res = WriteF(stream, " write", NULL); if (res != ResOK) return res; } - res = WriteF(stream, "\n ranks:", NULL); + res = WriteF(stream, "\nranks:", NULL); if (res != ResOK) return res; /* This bit ought to be in a RankSetDescribe in ref.c. */ if (RankSetIsMember(seg->rankSet, RankAMBIG)) { @@ -1072,10 +1071,10 @@ static Res segTrivDescribe(Seg seg, mps_lib_FILE *stream) res = WriteF(stream, " weak", NULL); if (res != ResOK) return res; } - res = WriteF(stream, "\n", - " white $B\n", (WriteFB)seg->white, - " grey $B\n", (WriteFB)seg->grey, - " nailed $B\n", (WriteFB)seg->nailed, + res = WriteF(stream, "\n" + "white $B\n", (WriteFB)seg->white, + "grey $B\n", (WriteFB)seg->grey, + "nailed $B\n", (WriteFB)seg->nailed, NULL); return res; } @@ -1627,17 +1626,13 @@ static Res gcSegDescribe(Seg seg, mps_lib_FILE *stream) res = super->describe(seg, stream); if (res != ResOK) return res; - res = WriteF(stream, - " summary $W\n", (WriteFW)gcseg->summary, - NULL); + res = WriteF(stream, "summary $W\n", (WriteFW)gcseg->summary, NULL); if (res != ResOK) return res; - if (gcseg->buffer == NULL) { - res = WriteF(stream, " buffer: NULL\n", NULL); - } - else { + if (gcseg->buffer == NULL) + res = WriteF(stream, "buffer: NULL\n", NULL); + else res = BufferDescribe(gcseg->buffer, stream); - } if (res != ResOK) return res; return ResOK; diff --git a/mps/code/splay.c b/mps/code/splay.c index 7e061cd14f4..b0fbeb4d326 100644 --- a/mps/code/splay.c +++ b/mps/code/splay.c @@ -1335,7 +1335,7 @@ Res SplayTreeDescribe(SplayTree splay, mps_lib_FILE *stream, res = WriteF(stream, "Splay $P {\n", (WriteFP)splay, - " compare $F\n", (WriteFF)splay->compare, + "compare $F\n", (WriteFF)splay->compare, NULL); if (res != ResOK) return res; @@ -1344,7 +1344,7 @@ Res SplayTreeDescribe(SplayTree splay, mps_lib_FILE *stream, if (res != ResOK) return res; } - res = WriteF(stream, "\n}\n", NULL); + res = WriteF(stream, "\n} Splay $P\n", (WriteFP)splay, NULL); return res; } diff --git a/mps/code/than.c b/mps/code/than.c index a1dab12adc8..199f2321e4d 100644 --- a/mps/code/than.c +++ b/mps/code/than.c @@ -134,7 +134,7 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream) res = WriteF(stream, "Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial, - " arena $P ($U)\n", + "arena $P ($U)\n", (WriteFP)thread->arena, (WriteFU)thread->arena->serial, "} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial, NULL); diff --git a/mps/code/thix.c b/mps/code/thix.c index cc380dd040f..3bd4b1fb846 100644 --- a/mps/code/thix.c +++ b/mps/code/thix.c @@ -278,9 +278,9 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream) res = WriteF(stream, "Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial, - " arena $P ($U)\n", + "arena $P ($U)\n", (WriteFP)thread->arena, (WriteFU)thread->arena->serial, - " id $U\n", (WriteFU)thread->id, + "id $U\n", (WriteFU)thread->id, "} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial, NULL); if(res != ResOK) diff --git a/mps/code/thw3.c b/mps/code/thw3.c index 701ffc53cdd..c2c0988bb91 100644 --- a/mps/code/thw3.c +++ b/mps/code/thw3.c @@ -218,10 +218,10 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream) res = WriteF(stream, "Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial, - " arena $P ($U)\n", + "arena $P ($U)\n", (WriteFP)thread->arena, (WriteFU)thread->arena->serial, - " handle $W\n", (WriteFW)thread->handle, - " id $U\n", (WriteFU)thread->id, + "handle $W\n", (WriteFW)thread->handle, + "id $U\n", (WriteFU)thread->id, "} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial, NULL); if(res != ResOK) diff --git a/mps/code/thxc.c b/mps/code/thxc.c index 9e6a6bd325c..48d497d67f0 100644 --- a/mps/code/thxc.c +++ b/mps/code/thxc.c @@ -254,9 +254,9 @@ Res ThreadDescribe(Thread thread, mps_lib_FILE *stream) res = WriteF(stream, "Thread $P ($U) {\n", (WriteFP)thread, (WriteFU)thread->serial, - " arena $P ($U)\n", + "arena $P ($U)\n", (WriteFP)thread->arena, (WriteFU)thread->arena->serial, - " port $U\n", (WriteFU)thread->port, + "port $U\n", (WriteFU)thread->port, "} Thread $P ($U)\n", (WriteFP)thread, (WriteFU)thread->serial, NULL); if(res != ResOK) return res;