示例#1
0
static 
log_realloc (unsigned oldlen, unsigned newlen, unsigned bsize, char *addr)
{
	write_string ("realloc of ");
	write_int (oldlen);
	write_string ("at ");
	write_addr (addr);
	write_string ("\n");
	write_stack("x");

	write_string ("realloc-to of ");
	write_int (newlen);
	write_string ("gets ");
	write_int (bsize);
	write_string ("at ");
	write_addr (addr);
	write_string ("\n");
	write_stack("x");
}
示例#2
0
/****************************************************************************
 * write_user_stack
 ****************************************************************************/
static int write_user_stack(int fdin, int fdout, info_s *pi, char *buffer,
			    unsigned int sz)
{
	int ret = ENOENT;

	if ((pi->flags & eUserStackPresent) != 0) {
		lseek(fdin, offsetof(fullcontext_s, ustack), SEEK_SET);
		ret = write_stack((pi->flags & eInvalidUserStackPtr) != 0,
				  CONFIG_USTACK_SIZE,
				  pi->stacks.user.sp + CONFIG_USTACK_SIZE / 2,
				  pi->stacks.user.top,
				  pi->stacks.user.sp,
				  pi->stacks.user.top - pi->stacks.user.size,
				  "User sp", buffer, sz, fdin, fdout);
	}

	return ret;
}
示例#3
0
/****************************************************************************
 * write_intterupt_satck
 ****************************************************************************/
static int write_intterupt_stack(int fdin, int fdout, info_s *pi, char *buffer,
				 unsigned int sz)
{
	int ret = ENOENT;

	if ((pi->flags & eIntStackPresent) != 0) {
		lseek(fdin, offsetof(fullcontext_s, istack), SEEK_SET);
		ret = write_stack((pi->flags & eInvalidIntStackPrt) != 0,
				  CONFIG_ISTACK_SIZE,
				  pi->stacks.interrupt.sp + CONFIG_ISTACK_SIZE / 2,
				  pi->stacks.interrupt.top,
				  pi->stacks.interrupt.sp,
				  pi->stacks.interrupt.top - pi->stacks.interrupt.size,
				  "Interrupt sp", buffer, sz, fdin, fdout);
	}

	return ret;
}