mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-25 00:07:09 -07:00
Mps branch unfixed-summary: better segdescribe:
all segs: say "buffer: NULL" if it is (rather than saying nothing) AMC: correct SEG_SUPERCLASS, so we see GCSeg fields, and say if there's a nailboard. Copied from Perforce Change: 161973 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
4329f8b9a5
commit
a3fb98af2e
2 changed files with 24 additions and 7 deletions
|
|
@ -26,6 +26,7 @@ typedef struct amcGenStruct *amcGen;
|
|||
|
||||
/* forward declarations */
|
||||
|
||||
static Bool amcSegHasNailboard(Seg seg);
|
||||
static Bool AMCCheck(AMC amc);
|
||||
static Res AMCFix(Pool pool, ScanState ss, Seg seg, Ref *refIO);
|
||||
static Res AMCHeaderFix(Pool pool, ScanState ss, Seg seg, Ref *refIO);
|
||||
|
|
@ -160,7 +161,7 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
if (!CHECKT(amcSeg, amcseg)) return ResFAIL;
|
||||
|
||||
/* Describe the superclass fields first via next-method call */
|
||||
super = SEG_SUPERCLASS(GCSegClass);
|
||||
super = SEG_SUPERCLASS(amcSegClass);
|
||||
res = super->describe(seg, stream);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
|
|
@ -179,10 +180,20 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = WriteF(stream,
|
||||
"AMC seg $P [$A,$A){\n",
|
||||
(WriteFP)seg, (WriteFA)base, (WriteFA)limit,
|
||||
" Map\n",
|
||||
NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
if (amcSegHasNailboard(seg)) {
|
||||
res = WriteF(stream, " Boarded\n", NULL);
|
||||
/* @@@@ should have AMCNailboardDescribe() */
|
||||
} else {
|
||||
res = WriteF(stream, " Mobile or Stuck\n", NULL);
|
||||
}
|
||||
if (res != ResOK) return res;
|
||||
|
||||
res = WriteF(stream, " Map\n", NULL);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
for(i = base; i < limit; i = AddrAdd(i, row)) {
|
||||
Addr j;
|
||||
char c;
|
||||
|
|
|
|||
|
|
@ -1569,14 +1569,20 @@ static Res gcSegDescribe(Seg seg, mps_lib_FILE *stream)
|
|||
res = super->describe(seg, stream);
|
||||
if (res != ResOK) return res;
|
||||
|
||||
if (gcseg->buffer != NULL) {
|
||||
res = BufferDescribe(gcseg->buffer, stream);
|
||||
if (res != ResOK) return res;
|
||||
}
|
||||
res = WriteF(stream,
|
||||
" summary $W\n", (WriteFW)gcseg->summary,
|
||||
NULL);
|
||||
return res;
|
||||
if (res != ResOK) return res;
|
||||
|
||||
if (gcseg->buffer == NULL) {
|
||||
res = WriteF(stream, " buffer: NULL\n", NULL);
|
||||
}
|
||||
else {
|
||||
res = BufferDescribe(gcseg->buffer, stream);
|
||||
}
|
||||
if (res != ResOK) return res;
|
||||
|
||||
return ResOK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue