diff options
| author | Richard Kistruck | 2007-03-21 17:35:45 +0000 |
|---|---|---|
| committer | Richard Kistruck | 2007-03-21 17:35:45 +0000 |
| commit | 6f9eea08def78ca4273b759b428f66814b660a38 (patch) | |
| tree | c8444607ecc5a1497d4280cf7596d48a4b8ce624 /mps/code | |
| parent | fa6f33d5e506eff8fbf7b1557d1a93c3ead8be7c (diff) | |
| download | emacs-6f9eea08def78ca4273b759b428f66814b660a38.tar.gz emacs-6f9eea08def78ca4273b759b428f66814b660a38.zip | |
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
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/poolamc.c | 15 | ||||
| -rw-r--r-- | mps/code/seg.c | 16 |
2 files changed, 24 insertions, 7 deletions
diff --git a/mps/code/poolamc.c b/mps/code/poolamc.c index df0716571cb..67cf3eff7f5 100644 --- a/mps/code/poolamc.c +++ b/mps/code/poolamc.c | |||
| @@ -26,6 +26,7 @@ typedef struct amcGenStruct *amcGen; | |||
| 26 | 26 | ||
| 27 | /* forward declarations */ | 27 | /* forward declarations */ |
| 28 | 28 | ||
| 29 | static Bool amcSegHasNailboard(Seg seg); | ||
| 29 | static Bool AMCCheck(AMC amc); | 30 | static Bool AMCCheck(AMC amc); |
| 30 | static Res AMCFix(Pool pool, ScanState ss, Seg seg, Ref *refIO); | 31 | static Res AMCFix(Pool pool, ScanState ss, Seg seg, Ref *refIO); |
| 31 | static Res AMCHeaderFix(Pool pool, ScanState ss, Seg seg, Ref *refIO); | 32 | static Res AMCHeaderFix(Pool pool, ScanState ss, Seg seg, Ref *refIO); |
| @@ -160,7 +161,7 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream) | |||
| 160 | if (!CHECKT(amcSeg, amcseg)) return ResFAIL; | 161 | if (!CHECKT(amcSeg, amcseg)) return ResFAIL; |
| 161 | 162 | ||
| 162 | /* Describe the superclass fields first via next-method call */ | 163 | /* Describe the superclass fields first via next-method call */ |
| 163 | super = SEG_SUPERCLASS(GCSegClass); | 164 | super = SEG_SUPERCLASS(amcSegClass); |
| 164 | res = super->describe(seg, stream); | 165 | res = super->describe(seg, stream); |
| 165 | if (res != ResOK) return res; | 166 | if (res != ResOK) return res; |
| 166 | 167 | ||
| @@ -179,10 +180,20 @@ static Res AMCSegDescribe(Seg seg, mps_lib_FILE *stream) | |||
| 179 | res = WriteF(stream, | 180 | res = WriteF(stream, |
| 180 | "AMC seg $P [$A,$A){\n", | 181 | "AMC seg $P [$A,$A){\n", |
| 181 | (WriteFP)seg, (WriteFA)base, (WriteFA)limit, | 182 | (WriteFP)seg, (WriteFA)base, (WriteFA)limit, |
| 182 | " Map\n", | ||
| 183 | NULL); | 183 | NULL); |
| 184 | if (res != ResOK) return res; | 184 | if (res != ResOK) return res; |
| 185 | 185 | ||
| 186 | if (amcSegHasNailboard(seg)) { | ||
| 187 | res = WriteF(stream, " Boarded\n", NULL); | ||
| 188 | /* @@@@ should have AMCNailboardDescribe() */ | ||
| 189 | } else { | ||
| 190 | res = WriteF(stream, " Mobile or Stuck\n", NULL); | ||
| 191 | } | ||
| 192 | if (res != ResOK) return res; | ||
| 193 | |||
| 194 | res = WriteF(stream, " Map\n", NULL); | ||
| 195 | if (res != ResOK) return res; | ||
| 196 | |||
| 186 | for(i = base; i < limit; i = AddrAdd(i, row)) { | 197 | for(i = base; i < limit; i = AddrAdd(i, row)) { |
| 187 | Addr j; | 198 | Addr j; |
| 188 | char c; | 199 | char c; |
diff --git a/mps/code/seg.c b/mps/code/seg.c index 9f6b485d5c0..e8a2b376b57 100644 --- a/mps/code/seg.c +++ b/mps/code/seg.c | |||
| @@ -1569,14 +1569,20 @@ static Res gcSegDescribe(Seg seg, mps_lib_FILE *stream) | |||
| 1569 | res = super->describe(seg, stream); | 1569 | res = super->describe(seg, stream); |
| 1570 | if (res != ResOK) return res; | 1570 | if (res != ResOK) return res; |
| 1571 | 1571 | ||
| 1572 | if (gcseg->buffer != NULL) { | ||
| 1573 | res = BufferDescribe(gcseg->buffer, stream); | ||
| 1574 | if (res != ResOK) return res; | ||
| 1575 | } | ||
| 1576 | res = WriteF(stream, | 1572 | res = WriteF(stream, |
| 1577 | " summary $W\n", (WriteFW)gcseg->summary, | 1573 | " summary $W\n", (WriteFW)gcseg->summary, |
| 1578 | NULL); | 1574 | NULL); |
| 1579 | return res; | 1575 | if (res != ResOK) return res; |
| 1576 | |||
| 1577 | if (gcseg->buffer == NULL) { | ||
| 1578 | res = WriteF(stream, " buffer: NULL\n", NULL); | ||
| 1579 | } | ||
| 1580 | else { | ||
| 1581 | res = BufferDescribe(gcseg->buffer, stream); | ||
| 1582 | } | ||
| 1583 | if (res != ResOK) return res; | ||
| 1584 | |||
| 1585 | return ResOK; | ||
| 1580 | } | 1586 | } |
| 1581 | 1587 | ||
| 1582 | 1588 | ||