本文整理汇总了C++中DumpBlock函数的典型用法代码示例。如果您正苦于以下问题:C++ DumpBlock函数的具体用法?C++ DumpBlock怎么用?C++ DumpBlock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DumpBlock函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DumpHeap
void DumpHeap(void)
{
uint32 free_list_ptr = *(uint32*)(&corehelp->heap_free_list_ptr);
uint32 alloc_list_ptr = *(uint32*)(&corehelp->heap_alloc_list_ptr);
struct block_t *free_blk = (struct block_t*)ReadDword(free_list_ptr);
struct block_t *alloc_blk = (struct block_t*)ReadDword(alloc_list_ptr);
printf("free_list = %08x -> %08x\n", free_list_ptr, (uint32)free_blk);
printf("alloc_list = %08x -> %08x\n", alloc_list_ptr, (uint32)alloc_blk);
while (1)
{
if (free_blk && (free_blk < alloc_blk))
{
DumpBlock("free ", free_blk);
free_blk = (struct block_t*)ReadDword((uint32)&free_blk->next);
}
else if (alloc_blk)
{
DumpBlock("alloc", alloc_blk);
alloc_blk = (struct block_t*)ReadDword((uint32)&alloc_blk->next);
}
else
{
break;
}
}
// DumpMemory(0xf1000000, 16384);
}
示例2: DumpCSymbolStruct
static void DumpCSymbolStruct(csymbol *cs, DumpState *D)
{
csymbol_struct *csst = csym_struct(cs);
DumpBlock(cs, sizeof(csymbol), D);
/* dump csymbol index for argument types */
DumpBlock(csst->members, csst->memb_nr*sizeof(struct_member), D);
}
示例3: DumpCSymbolFunc
static void DumpCSymbolFunc(csymbol *cs, DumpState *D)
{
csymbol_func *csf = csym_func(cs);
DumpBlock(cs, sizeof(csymbol), D);
/* dump csymbol index for argument types */
DumpBlock(csf->arg_ids, csf->arg_nr*sizeof(int), D);
}
示例4: DumpCSymbols
static void DumpCSymbols(DumpState *D)
{
int i, cs_nr;
cp_csymbol_state *cs_state;
csymbol *cs, *cs_arr;
cs_state = ctype_get_csym_state();
cs_arr = cs_state->cs_arr;
cs_nr = cs_state->cs_nr;
if (!cs_arr || cs_nr == 0) {
DumpInt(0, D);
return;
}
/* dump number of csymbols */
DumpInt(cs_nr, D);
/* dump size of csymbol, for safty check in vm */
DumpInt(sizeof(csymbol), D);
for (i = 0; i < cs_nr; i++) {
cs = &cs_arr[i];
switch (cs->type) {
case FFI_FUNC:
DumpCSymbolFunc(cs, D);
break;
case FFI_STRUCT:
DumpCSymbolStruct(cs, D);
break;
default:
DumpBlock(cs, sizeof(csymbol), D);
break;
}
}
}
示例5: uffs_DumpDevice
void uffs_DumpDevice(struct uffs_DeviceSt *dev, dump_msg_cb *dump)
{
int i;
for (i = dev->par.start; i <= dev->par.end; i++) {
DumpBlock(dev, i, dump);
}
}
示例6: DumpHeader
static void DumpHeader(DumpState *D)
{
u8 h[KTAPC_HEADERSIZE];
kp_header(h);
DumpBlock(h, KTAPC_HEADERSIZE, D);
}
示例7: DumpCode
static void DumpCode(TProtoFunc* tf, FILE* D) {
int size=CodeSize(tf);
if (NotWord(size))
fprintf(stderr,"luac: warning: "
"\"%s\":%d code too long for 16-bit machines (%d bytes)\n",
fileName(tf),tf->lineDefined,size);
DumpLong(size,D);
DumpBlock(tf->code,size,D);
}
示例8: DumpHeader
static void DumpHeader(TProtoFunc* Main, FILE* D) {
real t=TEST_NUMBER;
fputc(ID_CHUNK,D);
fputs(SIGNATURE,D);
fputc(VERSION,D);
fputc(sizeof(t),D);
fputc(ID_NUMBER,D);
DumpBlock("\x0A\xBF\x17",3,D); //Instead TEST_NUMBER, it dumps the same sequence found in GF scripts
}
示例9: DumpString
static void DumpString(TString* s, DumpState* D)
{
if (s==NULL || getstr(s)==NULL)
DumpSize(0,D);
else
{
size_t size=s->tsv.len+1; /* include trailing '\0' */
DumpSize(size,D);
DumpBlock(getstr(s),size,D);
}
}
示例10: DumpString
static void DumpString(const ktap_string *s, DumpState *D)
{
if (s == NULL) {
int size = 0;
DumpVar(size, D);
} else {
int size = s->tsv.len + 1; /* include trailing '\0' */
DumpVar(size, D);
DumpBlock(getstr(s), size * sizeof(char), D);
}
}
示例11: DumpString
static void DumpString(const TString* s, void* D)
{
if (s==NULL || s->str==NULL)
DumpSize(0,D);
else
{
size_t size=s->len+1; /* include trailing '\0' */
DumpSize(size,D);
DumpBlock(s->str,size,D);
}
}
示例12: DumpString
static void DumpString(char* s, FILE* D)
{
int n=strlen(s)+1;
if ((Word)n != n)
{
fprintf(stderr,"luac: string too long: \"%.32s...\"\n",s);
exit(1);
}
DumpWord(n,D);
DumpBlock(s,n,D);
}
示例13: DumpCode
static void DumpCode(const Proto *f, DumpState* D)
{
DumpInt(f->sizecode,D);
char buf[10];
int i;
for (i=0; i<f->sizecode; i++)
{
memcpy(buf,&f->code[i],sizeof(Instruction));
MaybeByteSwap(buf,sizeof(Instruction),D);
DumpBlock(buf,sizeof(Instruction),D);
}
}
示例14: BlockDump
/**
* Block Dump (read)
* \param iMci Controller number.
*/
static void BlockDump(uint8_t iMci)
{
sSdCard *pSd = &sdDrv[iMci];
uint32_t block;
DumpSeperator();
printf("-!- Input block:");
if (GetDecInput(5, &block))
{
return;
}
printf("\n\r-I- Dump Block %d: %d\n\r", (int)block, MMCT_ReadFun(pSd, block, 1, pBuffer));
DumpBlock(pBuffer, block);
}
示例15: DumpString
static void DumpString(const TString* s, DumpState* D)
{
if (s==NULL || getstr(s)==NULL)
{
strsize_t size=0;
DumpSize(size,D);
}
else
{
strsize_t size=( strsize_t )s->tsv.len+1; /* include trailing '\0' */
DumpSize(size,D);
DumpBlock(getstr(s),size,D);
}
}