当前位置: 首页>>代码示例>>C++>>正文


C++ DumpBlock函数代码示例

本文整理汇总了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);

}
开发者ID:dennisjenkins75,项目名称:dwj-os,代码行数:33,代码来源:heap.c

示例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);
}
开发者ID:atmark-techno,项目名称:linux-3.14-at,代码行数:8,代码来源:dump.c

示例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);
}
开发者ID:atmark-techno,项目名称:linux-3.14-at,代码行数:8,代码来源:dump.c

示例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;
		}
	}
}
开发者ID:atmark-techno,项目名称:linux-3.14-at,代码行数:34,代码来源:dump.c

示例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);
	}	
}
开发者ID:Paolo-Maffei,项目名称:rt-thread-stm32f4discovery,代码行数:7,代码来源:uffs_utils.c

示例6: DumpHeader

static void DumpHeader(DumpState *D)
{
	u8 h[KTAPC_HEADERSIZE];

	kp_header(h);
	DumpBlock(h, KTAPC_HEADERSIZE, D);
}
开发者ID:atmark-techno,项目名称:linux-3.14-at,代码行数:7,代码来源:dump.c

示例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);
}
开发者ID:klusark,项目名称:residual-tools,代码行数:9,代码来源:dump.c

示例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
}
开发者ID:klusark,项目名称:residual-tools,代码行数:9,代码来源:dump.c

示例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);
 }
}
开发者ID:Falcon-peregrinus,项目名称:angband-russian,代码行数:11,代码来源:ldump.c

示例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);
	}
}
开发者ID:atmark-techno,项目名称:linux-3.14-at,代码行数:11,代码来源:dump.c

示例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);
	}
}
开发者ID:jcubic,项目名称:ToME,代码行数:11,代码来源:luac.c

示例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);
}
开发者ID:Akagi201,项目名称:learning-lua,代码行数:11,代码来源:dump.c

示例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);
 }
}
开发者ID:BackupTheBerlios,项目名称:xlua-svn,代码行数:12,代码来源:ldump.c

示例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);
}
开发者ID:BlueSkyGjj,项目名称:SAMV71_softpack,代码行数:17,代码来源:main.c

示例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);
 }
}
开发者ID:01org,项目名称:incubator-mynewt-core,代码行数:14,代码来源:ldump.c


注:本文中的DumpBlock函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。