src/sys/riscv/riscv/db_interface.c
/*
 * Read bytes from kernel address space for debugger.
 */
Read bytes from kernel address space for debugger.
Read bytes from kernel address space for debugger .
int
db_read_bytes(vm_offset_t addr, size_t size, char *data)
{
	jmp_buf jb;
	void *prev_jb;
	const char *src;
	int ret;
	prev_jb = kdb_jmpbuf(jb);
	ret = setjmp(jb);
	if (ret == 0) {
		src = (const char *)addr;
		while (size-- > 0)
			*data++ = *src++;
	}
	(void)kdb_jmpbuf(prev_jb);
	return (ret);
}
int db_read_bytes ( vm_offset_t addr , size_t size , char * data ) { jmp_buf jb ; void * prev_jb ; const char * src ; int ret ; prev_jb = kdb_jmpbuf ( jb ) ; ret = setjmp ( jb ) ; if ( ret == 0 ) { src = ( const char * ) addr ; while ( size -- > 0 ) * data ++ = * src ++ ; } ( void ) kdb_jmpbuf ( prev_jb ) ; return ( ret ) ; }
Read bytes from kernel address space for debugger.
Read bytes from kernel address space for debugger .