TempleOSTS_131005.ISO
This commit is contained in:
1 parent
1343005a29
commit
2d2a65d572
547 files changed
+33608
-12549
No files matched your search
+45
-45
@@ -1,5 +1,5 @@
|
||||
#help_index "Debugging/Dump"
|
||||
Bool ClassRep2(CDoc *doc,U8 *class_name,U8 *_b,I64 depth,I64 max_depth,Bool dynamic,I64 types=HTT_CLASS,I64 offset=0)
|
||||
Bool ClassRep2(CDoc *doc,U8 *_d,U8 *class_name=lastclass,I64 depth,I64 max_depth,Bool dynamic,I64 types=HTT_CLASS,I64 offset=0)
|
||||
{
|
||||
I64 i,j,*ptr;
|
||||
CMemberLst *ml;
|
||||
@@ -8,53 +8,53 @@ Bool ClassRep2(CDoc *doc,U8 *class_name,U8 *_b,I64 depth,I64 max_depth,Bool dyna
|
||||
CHashClass *tempc,*tempc2;
|
||||
if (depth>=max_depth) return TRUE;
|
||||
if (!(tempc=HashFind(class_name,Fs->hash_table,types))) {
|
||||
DocPutS(doc,"Class Not Found.\n");
|
||||
DocPrint(doc,"Class Not Found.\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (!ChkPtr(_b) || !ChkPtr(_b(U8 *)+tempc->size)) {
|
||||
DocPrintF(doc,"Bad Ptr:%016X\n",_b);
|
||||
if (!ChkPtr(_d) || !ChkPtr(_d(U8 *)+tempc->size)) {
|
||||
DocPrint(doc,"Bad Ptr:%016X\n",_d);
|
||||
return FALSE;
|
||||
}
|
||||
if (tempc->base_class && !ClassRep2(doc,tempc->base_class->str,_b,depth,max_depth,dynamic,types,offset))
|
||||
if (tempc->base_class && !ClassRep2(doc,_d,tempc->base_class->str,depth,max_depth,dynamic,types,offset))
|
||||
return FALSE;
|
||||
unlock=DocLock(doc);
|
||||
DocPrintF(doc,"Class:\"%s\"\n",class_name);
|
||||
DocPrint(doc,"Class:\"%s\"\n",class_name);
|
||||
ml=tempc->member_lst;
|
||||
while (ml) {
|
||||
tempc2=ml->member_class;
|
||||
ptr=_b(U8 *)+ml->offset;
|
||||
DocPrintF(doc,"%08X ",ptr(U8 *)+offset);
|
||||
ptr=_d(U8 *)+ml->offset;
|
||||
DocPrint(doc,"%08X ",ptr(U8 *)+offset);
|
||||
j=tempc2->ptr_cnt;
|
||||
tempc2=OptClassFwd(tempc2);
|
||||
tempc2-=tempc2->ptr_cnt;
|
||||
if (tempc2->type & HTT_INTERNAL_TYPE) {
|
||||
DocPrintF(doc,"$$FG,GREEN$$%-20ts:$$FG$$",ml->str);
|
||||
DocPrint(doc,"$$FG,GREEN$$%-20ts:$$FG$$",ml->str);
|
||||
if (j==1 && (tempc2->sub_type==IT_I8 || tempc2->sub_type==IT_U8)) {
|
||||
ptr=*ptr;
|
||||
if (ChkPtr(ptr)) {
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T-P+RD,64,\"%40ts\"$$\n");
|
||||
doc_e=DocPrint(doc,"$$DA-T-P+RD,64,\"%%40ts\"$$\n");
|
||||
doc_e->data=ptr;
|
||||
DocDataFmt(doc_e);
|
||||
} else
|
||||
DocPrintF(doc,"%40ts\n",ptr);
|
||||
DocPrint(doc,"%40ts\n",ptr);
|
||||
}
|
||||
} else if (!j) {
|
||||
j=MinI64(ml->dim.total_cnt,32);
|
||||
if (tempc2->sub_type==IT_I8 || tempc2->sub_type==IT_U8) {
|
||||
if (j==1) {
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T+RD+UD-I64+U8,32,\"%c\"$$\n");
|
||||
doc_e=DocPrint(doc,"$$DA-T+RD+UD-I64+U8,32,\"%%c\"$$\n");
|
||||
doc_e->data=ptr;
|
||||
} else
|
||||
DocPrintF(doc,"%c\n",*ptr(U8 *));
|
||||
DocPrint(doc,"%c\n",*ptr(U8 *));
|
||||
} else {
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T-P+RD,64,\"%40ts\"$$\n");
|
||||
doc_e=DocPrint(doc,"$$DA-T-P+RD,64,\"%%40ts\"$$\n");
|
||||
doc_e->data=ptr;
|
||||
DocDataFmt(doc_e);
|
||||
} else
|
||||
DocPrintF(doc,"%40ts\n",ptr);
|
||||
DocPrint(doc,"%40ts\n",ptr);
|
||||
}
|
||||
}
|
||||
for (i=0;i<j;i++) {
|
||||
@@ -65,64 +65,64 @@ Bool ClassRep2(CDoc *doc,U8 *class_name,U8 *_b,I64 depth,I64 max_depth,Bool dyna
|
||||
case IT_I8:
|
||||
case IT_U8:
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T+RD+UD-I64+U8,32,\"%02X\"$$ ");
|
||||
doc_e=DocPrint(doc,"$$DA-T+RD+UD-I64+U8,32,\"%%02X\"$$ ");
|
||||
doc_e->data=ptr(U8 *)++;
|
||||
} else
|
||||
DocPrintF(doc,"%02X ",*ptr(U8 *)++);
|
||||
DocPrint(doc,"%02X ",*ptr(U8 *)++);
|
||||
break;
|
||||
case IT_I16:
|
||||
case IT_U16:
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T+RD+UD-I64+U16,32,\"%04X\"$$ ");
|
||||
doc_e=DocPrint(doc,"$$DA-T+RD+UD-I64+U16,32,\"%%04X\"$$ ");
|
||||
doc_e->data=ptr(U16 *)++;
|
||||
} else
|
||||
DocPrintF(doc,"%04X ",*ptr(U16 *)++);
|
||||
DocPrint(doc,"%04X ",*ptr(U16 *)++);
|
||||
break;
|
||||
case IT_I32:
|
||||
case IT_U32:
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T+RD+UD-I64+U32,32,\"%08X\"$$ ");
|
||||
doc_e=DocPrint(doc,"$$DA-T+RD+UD-I64+U32,32,\"%%08X\"$$ ");
|
||||
doc_e->data=ptr(U32 *)++;
|
||||
} else
|
||||
DocPrintF(doc,"%08X ",*ptr(U32 *)++);
|
||||
DocPrint(doc,"%08X ",*ptr(U32 *)++);
|
||||
break;
|
||||
case IT_F64:
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T+RD+UD,32,\"%16g\"$$ ");
|
||||
doc_e=DocPrint(doc,"$$DA-T+RD+UD,32,\"%%16g\"$$ ");
|
||||
doc_e->data=ptr(I64 *)++;
|
||||
} else
|
||||
DocPrintF(doc,"%16g ",*ptr(I64 *)++);
|
||||
DocPrint(doc,"%16g ",*ptr(I64 *)++);
|
||||
break;
|
||||
default:
|
||||
if (dynamic) {
|
||||
doc_e=DocPutS(doc,"$$DA-T+RD+UD,32,\"%016X\"$$ ");
|
||||
doc_e=DocPrint(doc,"$$DA-T+RD+UD,32,\"%%016X\"$$ ");
|
||||
doc_e->data=ptr(I64 *)++;
|
||||
} else
|
||||
DocPrintF(doc,"%016X ",*ptr(I64 *)++);
|
||||
DocPrint(doc,"%016X ",*ptr(I64 *)++);
|
||||
}
|
||||
if (dynamic)
|
||||
DocDataFmt(doc_e);
|
||||
}
|
||||
if (j<ml->dim.total_cnt)
|
||||
DocPutS(doc,"...");
|
||||
DocPrint(doc,"...");
|
||||
} else
|
||||
DocPrintF(doc,"%016X",*ptr);
|
||||
DocPutS(doc,"\n");
|
||||
DocPrint(doc,"%016X",*ptr);
|
||||
DocPrint(doc,"\n");
|
||||
} else {
|
||||
if (depth<2) {
|
||||
if (j==1 && !ChkPtr(*ptr))
|
||||
DocPrintF(doc,"%-20ts:%016X\n",ml->str,*ptr);
|
||||
DocPrint(doc,"%-20ts:%016X\n",ml->str,*ptr);
|
||||
else {
|
||||
DocPrintF(doc,"$$TR,\"%s\"$$\n",ml->str);
|
||||
DocPutS(doc,"$$ID,2$$");
|
||||
DocPrint(doc,"$$TR,\"%s\"$$\n",ml->str);
|
||||
DocPrint(doc,"$$ID,2$$");
|
||||
if (!j)
|
||||
ClassRep2(doc,tempc2->str,ptr,depth+1,max_depth,dynamic);
|
||||
ClassRep2(doc,ptr,tempc2->str,depth+1,max_depth,dynamic);
|
||||
else if (j==1)
|
||||
ClassRep2(doc,tempc2->str,*ptr,depth+1,max_depth,dynamic);
|
||||
DocPutS(doc,"$$ID,-2$$");
|
||||
ClassRep2(doc,*ptr,tempc2->str,depth+1,max_depth,dynamic);
|
||||
DocPrint(doc,"$$ID,-2$$");
|
||||
}
|
||||
} else
|
||||
DocPrintF(doc,"%-20ts\n",ml->str);
|
||||
DocPrint(doc,"%-20ts\n",ml->str);
|
||||
}
|
||||
ml=ml->next;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ Bool ClassRep2(CDoc *doc,U8 *class_name,U8 *_b,I64 depth,I64 max_depth,Bool dyna
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
public U0 ClassRep(U8 *class_name,U8 *_b,I64 max_depth=2,Bool fun=FALSE,I64 offset=0)
|
||||
public U0 ClassRep(U8 *_d,U8 *class_name=lastclass,I64 max_depth=2,Bool fun=FALSE,I64 offset=0)
|
||||
//Displays members of a record
|
||||
//by using the compiler's info.
|
||||
{
|
||||
@@ -145,10 +145,10 @@ public U0 ClassRep(U8 *class_name,U8 *_b,I64 max_depth=2,Bool fun=FALSE,I64 offs
|
||||
doc=DocPut;
|
||||
}
|
||||
if (fun)
|
||||
ClassRep2(doc,class_name,_b,0,max_depth,FALSE,HTT_FUN,offset);
|
||||
ClassRep2(doc,_d,class_name,0,max_depth,FALSE,HTT_FUN,offset);
|
||||
else
|
||||
ClassRep2(doc,class_name,_b,0,max_depth,FALSE,HTT_CLASS,offset);
|
||||
DocPutS(doc,"\n");
|
||||
ClassRep2(doc,_d,class_name,0,max_depth,FALSE,HTT_CLASS,offset);
|
||||
DocPrint(doc,"\n");
|
||||
DocRecalc(doc);
|
||||
if (IsRaw) {
|
||||
DocDump(doc,100000);
|
||||
@@ -157,7 +157,7 @@ public U0 ClassRep(U8 *class_name,U8 *_b,I64 max_depth=2,Bool fun=FALSE,I64 offs
|
||||
Preempt(old_preempt);
|
||||
}
|
||||
|
||||
public U0 ClassRepD(U8 *class_name,U8 *_b,I64 max_depth=2,Bool fun=FALSE,I64 offset=0)
|
||||
public U0 ClassRepD(U8 *_d,U8 *class_name=lastclass,I64 max_depth=2,Bool fun=FALSE,I64 offset=0)
|
||||
//Dynamic classrep (uses hex_ed widgit for live changes)
|
||||
{
|
||||
CDoc *doc;
|
||||
@@ -170,10 +170,10 @@ public U0 ClassRepD(U8 *class_name,U8 *_b,I64 max_depth=2,Bool fun=FALSE,I64 off
|
||||
doc=DocPut;
|
||||
}
|
||||
if (fun)
|
||||
ClassRep2(doc,class_name,_b,0,max_depth,TRUE,HTT_FUN,offset);
|
||||
ClassRep2(doc,_d,class_name,0,max_depth,TRUE,HTT_FUN,offset);
|
||||
else
|
||||
ClassRep2(doc,class_name,_b,0,max_depth,TRUE,HTT_CLASS,offset);
|
||||
DocPutS(doc,"\n");
|
||||
ClassRep2(doc,_d,class_name,0,max_depth,TRUE,HTT_CLASS,offset);
|
||||
DocPrint(doc,"\n");
|
||||
DocRecalc(doc);
|
||||
if (IsRaw) {
|
||||
DocDump(doc,100000);
|
||||
@@ -215,10 +215,10 @@ public U0 FunRep(U8 *st,U8 *rbp=NULL,I64 max_depth=2,CTask *task=NULL)
|
||||
img=MAlloc(size);
|
||||
MemCpy(img,rbp+tempf->size,size);
|
||||
UpdateRegVarImg(tempf,img-tempf->size,task);
|
||||
ClassRep(st,img-tempf->size,max_depth,TRUE,rbp-img+tempf->size);
|
||||
ClassRep(img-tempf->size,st,max_depth,TRUE,rbp-img+tempf->size);
|
||||
Free(img);
|
||||
} else
|
||||
ClassRep(st,rbp,max_depth,TRUE);
|
||||
ClassRep(rbp,st,max_depth,TRUE);
|
||||
} else {
|
||||
tempm=tempf->member_lst;
|
||||
while (tempm) {
|
||||
|
||||
Reference in new issue
Block a user