亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gdb-stub.c

?? ARM 嵌入式 系統 設計與實例開發 實驗教材 二源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
static void single_step(struct gdb_regs *regs){	union mips_instruction insn;	unsigned int targ;	int is_branch, is_cond, i;	targ = regs->cp0_epc;	insn.word = *(unsigned int *)targ;	is_branch = is_cond = 0;	switch (insn.i_format.opcode) {	/*	 * jr and jalr are in r_format format.	 */	case spec_op:		switch (insn.r_format.func) {		case jalr_op:		case jr_op:			targ = *(&regs->reg0 + insn.r_format.rs);			is_branch = 1;			break;		}		break;	/*	 * This group contains:	 * bltz_op, bgez_op, bltzl_op, bgezl_op,	 * bltzal_op, bgezal_op, bltzall_op, bgezall_op.	 */	case bcond_op:		is_branch = is_cond = 1;		targ += 4 + (insn.i_format.simmediate << 2);		break;	/*	 * These are unconditional and in j_format.	 */	case jal_op:	case j_op:		is_branch = 1;		targ += 4;		targ >>= 28;		targ <<= 28;		targ |= (insn.j_format.target << 2);		break;	/*	 * These are conditional.	 */	case beq_op:	case beql_op:	case bne_op:	case bnel_op:	case blez_op:	case blezl_op:	case bgtz_op:	case bgtzl_op:	case cop0_op:	case cop1_op:	case cop2_op:	case cop1x_op:		is_branch = is_cond = 1;		targ += 4 + (insn.i_format.simmediate << 2);		break;	}					if (is_branch) {		i = 0;		if (is_cond && targ != (regs->cp0_epc + 8)) {			step_bp[i].addr = regs->cp0_epc + 8;			step_bp[i++].val = *(unsigned *)(regs->cp0_epc + 8);			*(unsigned *)(regs->cp0_epc + 8) = BP;		}		step_bp[i].addr = targ;		step_bp[i].val  = *(unsigned *)targ;		*(unsigned *)targ = BP;	} else {		step_bp[0].addr = regs->cp0_epc + 4;		step_bp[0].val  = *(unsigned *)(regs->cp0_epc + 4);		*(unsigned *)(regs->cp0_epc + 4) = BP;	}}/* *  If asynchronously interrupted by gdb, then we need to set a breakpoint *  at the interrupted instruction so that we wind up stopped with a  *  reasonable stack frame. */static struct gdb_bp_save async_bp;void set_async_breakpoint(unsigned int epc){	async_bp.addr = epc;	async_bp.val  = *(unsigned *)epc;	*(unsigned *)epc = BP;	flush_cache_all();}/* * This function does all command processing for interfacing to gdb.  It * returns 1 if you should skip the instruction at the trap address, 0 * otherwise. */void handle_exception (struct gdb_regs *regs){	int trap;			/* Trap type */	int sigval;	int addr;	int length;	char *ptr;	unsigned long *stack;#if 0		printk("in handle_exception()\n");	show_gdbregs(regs);#endif		/*	 * First check trap type. If this is CPU_UNUSABLE and CPU_ID is 1,	 * the simply switch the FPU on and return since this is no error	 * condition. kernel/traps.c does the same.	 * FIXME: This doesn't work yet, so we don't catch CPU_UNUSABLE	 * traps for now.	 */	trap = (regs->cp0_cause & 0x7c) >> 2;/*	printk("trap=%d\n",trap); */	if (trap == 11) {		if (((regs->cp0_cause >> CAUSEB_CE) & 3) == 1) {			regs->cp0_status |= ST0_CU1;			return;		}	}	/*	 * If we're in breakpoint() increment the PC	 */	if (trap == 9 && regs->cp0_epc == (unsigned long)breakinst)				regs->cp0_epc += 4;	/*	 * If we were single_stepping, restore the opcodes hoisted	 * for the breakpoint[s].	 */	if (step_bp[0].addr) {		*(unsigned *)step_bp[0].addr = step_bp[0].val;		step_bp[0].addr = 0;		    		if (step_bp[1].addr) {			*(unsigned *)step_bp[1].addr = step_bp[1].val;			step_bp[1].addr = 0;		}	}	/*	 * If we were interrupted asynchronously by gdb, then a	 * breakpoint was set at the EPC of the interrupt so	 * that we'd wind up here with an interesting stack frame.	 */	if (async_bp.addr) {		*(unsigned *)async_bp.addr = async_bp.val;		async_bp.addr = 0;	}	stack = (long *)regs->reg29;			/* stack ptr */	sigval = computeSignal(trap);	/*	 * reply to host that an exception has occurred	 */	ptr = output_buffer;	/*	 * Send trap type (converted to signal)	 */	*ptr++ = 'T';	*ptr++ = hexchars[sigval >> 4];	*ptr++ = hexchars[sigval & 0xf];	/*	 * Send Error PC	 */	*ptr++ = hexchars[REG_EPC >> 4];	*ptr++ = hexchars[REG_EPC & 0xf];	*ptr++ = ':';	ptr = mem2hex((char *)&regs->cp0_epc, ptr, 4, 0);	*ptr++ = ';';	/*	 * Send frame pointer	 */	*ptr++ = hexchars[REG_FP >> 4];	*ptr++ = hexchars[REG_FP & 0xf];	*ptr++ = ':';	ptr = mem2hex((char *)&regs->reg30, ptr, 4, 0);	*ptr++ = ';';	/*	 * Send stack pointer	 */	*ptr++ = hexchars[REG_SP >> 4];	*ptr++ = hexchars[REG_SP & 0xf];	*ptr++ = ':';	ptr = mem2hex((char *)&regs->reg29, ptr, 4, 0);	*ptr++ = ';';	*ptr++ = 0;	putpacket(output_buffer);	/* send it off... */	/*	 * Wait for input from remote GDB	 */	while (1) {		output_buffer[0] = 0;		getpacket(input_buffer);		switch (input_buffer[0])		{		case '?':			output_buffer[0] = 'S';			output_buffer[1] = hexchars[sigval >> 4];			output_buffer[2] = hexchars[sigval & 0xf];			output_buffer[3] = 0;			break;		case 'd':			/* toggle debug flag */			break;		/*		 * Return the value of the CPU registers		 */		case 'g':			ptr = output_buffer;			ptr = mem2hex((char *)&regs->reg0, ptr, 32*4, 0); /* r0...r31 */			ptr = mem2hex((char *)&regs->cp0_status, ptr, 6*4, 0); /* cp0 */			ptr = mem2hex((char *)&regs->fpr0, ptr, 32*4, 0); /* f0...31 */			ptr = mem2hex((char *)&regs->cp1_fsr, ptr, 2*4, 0); /* cp1 */			ptr = mem2hex((char *)&regs->frame_ptr, ptr, 2*4, 0); /* frp */			ptr = mem2hex((char *)&regs->cp0_index, ptr, 16*4, 0); /* cp0 */			break;	  		/*		 * set the value of the CPU registers - return OK		 * FIXME: Needs to be written		 */		case 'G':		{#if 0			unsigned long *newsp, psr;			ptr = &input_buffer[1];			hex2mem(ptr, (char *)registers, 16 * 4, 0); /* G & O regs */			/*			 * See if the stack pointer has moved. If so, then copy the			 * saved locals and ins to the new location.			 */			newsp = (unsigned long *)registers[SP];			if (sp != newsp)				sp = memcpy(newsp, sp, 16 * 4);#endif			strcpy(output_buffer,"OK");		 }		break;		/*		 * mAA..AA,LLLL  Read LLLL bytes at address AA..AA		 */		case 'm':			ptr = &input_buffer[1];			if (hexToInt(&ptr, &addr)				&& *ptr++ == ','				&& hexToInt(&ptr, &length)) {				if (mem2hex((char *)addr, output_buffer, length, 1))					break;				strcpy (output_buffer, "E03");			} else				strcpy(output_buffer,"E01");			break;		/*		 * MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK		 */		case 'M': 			ptr = &input_buffer[1];			if (hexToInt(&ptr, &addr)				&& *ptr++ == ','				&& hexToInt(&ptr, &length)				&& *ptr++ == ':') {				if (hex2mem(ptr, (char *)addr, length, 1))					strcpy(output_buffer, "OK");				else					strcpy(output_buffer, "E03");			}			else				strcpy(output_buffer, "E02");			break;		/*		 * cAA..AA    Continue at address AA..AA(optional)		 */		case 'c':    			/* try to read optional parameter, pc unchanged if no parm */			ptr = &input_buffer[1];			if (hexToInt(&ptr, &addr))				regs->cp0_epc = addr;	  			/*			 * Need to flush the instruction cache here, as we may			 * have deposited a breakpoint, and the icache probably			 * has no way of knowing that a data ref to some location			 * may have changed something that is in the instruction			 * cache.			 * NB: We flush both caches, just to be sure...			 */			flush_cache_all();			return;			/* NOTREACHED */			break;		/*		 * kill the program		 */		case 'k' :			break;		/* do nothing */		/*		 * Reset the whole machine (FIXME: system dependent)		 */		case 'r':			break;		/*		 * Step to next instruction		 */		case 's':			/*			 * There is no single step insn in the MIPS ISA, so we			 * use breakpoints and continue, instead.			 */			single_step(regs);			flush_cache_all();			return;			/* NOTREACHED */		/*		 * Set baud rate (bBB)		 * FIXME: Needs to be written		 */		case 'b':		{#if 0							int baudrate;			extern void set_timer_3();			ptr = &input_buffer[1];			if (!hexToInt(&ptr, &baudrate))			{				strcpy(output_buffer,"B01");				break;			}			/* Convert baud rate to uart clock divider */			switch (baudrate)			{				case 38400:					baudrate = 16;					break;				case 19200:					baudrate = 33;					break;				case 9600:					baudrate = 65;					break;				default:					baudrate = 0;					strcpy(output_buffer,"B02");					goto x1;			}			if (baudrate) {				putpacket("OK");	/* Ack before changing speed */				set_timer_3(baudrate); /* Set it */			}#endif		}		break;		}			/* switch */		/*		 * reply to the request		 */		putpacket(output_buffer);	} /* while */}/* * This function will generate a breakpoint exception.  It is used at the * beginning of a program to sync up with a debugger and can be used * otherwise as a quick means to stop program execution and "break" into * the debugger. */void breakpoint(void){	if (!initialized)		return;	__asm__ __volatile__("			.globl	breakinst			.set	noreorder			nopbreakinst:		break			nop			.set	reorder	");}void adel(void){	__asm__ __volatile__("			.globl	adel			la	$8,0x80000001			lw	$9,0($8)	");}#ifdef CONFIG_GDB_CONSOLEvoid gdb_puts(const char *str){	int l = strlen(str);	char outbuf[18];	outbuf[0]='O';	while(l) {		int i = (l>8)?8:l;		mem2hex((char *)str, &outbuf[1], i, 0);		outbuf[(i*2)+1]=0;		putpacket(outbuf); 		str += i;		l -= i;	}}static kdev_t gdb_console_dev(struct console *con){	return MKDEV(1, 3); /* /dev/null */}static void gdb_console_write(struct console *con, const char *s, unsigned n){	gdb_puts(s);}static struct console gdb_console = {	name:	"gdb",	write:	gdb_console_write,	device:	gdb_console_dev,	flags:	CON_PRINTBUFFER,	index:	-1};__init void register_gdb_console(void){	register_console(&gdb_console);}     #endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丁香一区二区三区| 日韩专区在线视频| 久久免费的精品国产v∧| 欧美欧美欧美欧美首页| 在线观看日韩毛片| 欧美日韩1区2区| 欧美色精品在线视频| 精品视频1区2区3区| 欧美男生操女生| 欧美一区二区三区日韩视频| 91精品国产黑色紧身裤美女| 久久99九九99精品| 日韩精品一级二级| 久久国产欧美日韩精品| 国产清纯在线一区二区www| 亚洲欧美国产三级| 国产成人av一区| 麻豆91精品91久久久的内涵| 一区二区三区在线视频观看58| 伊人一区二区三区| 亚洲1区2区3区4区| 麻豆国产精品777777在线| 国产成人一区在线| 欧美色图天堂网| 日韩欧美激情在线| 国产精品色在线| 亚洲成人资源网| 国产麻豆一精品一av一免费| 99久精品国产| 日韩欧美一区二区久久婷婷| 国产日韩欧美a| 亚洲国产一区二区三区| 久久国产三级精品| 色婷婷av一区二区三区大白胸| 欧美日韩一区二区三区高清| 久久众筹精品私拍模特| 亚洲免费在线观看| 国产一区二区免费在线| 欧美影视一区二区三区| 日韩午夜电影av| 国产精品不卡视频| 蜜桃av一区二区三区| 93久久精品日日躁夜夜躁欧美| 7777精品伊人久久久大香线蕉 | 成人一区二区视频| 在线精品观看国产| 久久久精品影视| 亚洲国产日韩在线一区模特 | 亚洲男帅同性gay1069| 日本va欧美va精品发布| 99久久精品免费精品国产| 日韩视频永久免费| 亚洲小说春色综合另类电影| 国产精品一线二线三线精华| 91麻豆精品国产无毒不卡在线观看 | 2020国产精品自拍| 五月婷婷色综合| 91在线精品一区二区| 精品国产伦一区二区三区免费| 一区二区三区av电影 | 欧美日韩三级在线| 亚洲婷婷在线视频| 粉嫩一区二区三区在线看| 精品免费一区二区三区| 日韩专区中文字幕一区二区| 欧美性生活久久| 亚洲一二三四在线观看| av在线一区二区| 亚洲欧美在线另类| www.欧美精品一二区| 国产亚洲综合在线| 粉嫩欧美一区二区三区高清影视| 日韩精品一区二区在线| 蜜臀av一区二区在线观看| 欧美一区三区二区| 日本aⅴ免费视频一区二区三区| 欧美日韩一级片在线观看| 亚洲综合色视频| 欧美人妇做爰xxxⅹ性高电影| 亚洲亚洲精品在线观看| 在线电影欧美成精品| 首页欧美精品中文字幕| 欧美一区二区三区四区高清| 另类欧美日韩国产在线| 欧美v亚洲v综合ⅴ国产v| 国产一区二区剧情av在线| 国产人伦精品一区二区| 99久久99精品久久久久久| 一区二区三区美女视频| 欧美三级电影在线观看| 青青青爽久久午夜综合久久午夜 | a美女胸又www黄视频久久| 亚洲欧美韩国综合色| 欧美精品vⅰdeose4hd| 日本怡春院一区二区| 久久久亚洲午夜电影| www.亚洲国产| 亚洲午夜电影在线观看| 欧美一区二区三区免费| 国产精品一区二区久久精品爱涩| 国产午夜久久久久| 综合在线观看色| 国产成人av资源| 国产高清视频一区| 精品对白一区国产伦| 亚洲综合成人在线视频| 亚洲日本在线a| 在线成人av影院| 国产成人亚洲综合a∨婷婷图片| 国产精品免费av| 欧美a级一区二区| 亚洲国产日韩在线一区模特| 一区二区三区高清| 亚洲国产精品麻豆| 亚洲成人av中文| 天天综合网天天综合色| 日韩avvvv在线播放| 欧美视频中文字幕| 久久av资源网| 亚洲最新视频在线观看| 久久久99精品免费观看| 欧美日韩成人激情| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 五月天激情综合| 国产精品色哟哟| 日韩欧美成人午夜| 欧美性受xxxx黑人xyx| 国产999精品久久久久久绿帽| 亚洲成人第一页| 亚洲精品视频一区二区| 久久综合九色综合97_久久久| 91久久国产最好的精华液| 国产精品自拍网站| 久久精品国产**网站演员| 亚洲一区二区精品久久av| 国产精品乱码人人做人人爱| 精品国产自在久精品国产| 欧美日韩成人综合在线一区二区| 色中色一区二区| 成+人+亚洲+综合天堂| 国产一区二区女| 麻豆高清免费国产一区| 国产麻豆视频精品| 免费在线视频一区| 天天综合网天天综合色| 亚洲.国产.中文慕字在线| 一区二区三区精密机械公司| 国产精品国产自产拍高清av王其| 2020国产精品| 国产欧美va欧美不卡在线| 久久蜜桃av一区精品变态类天堂 | 自拍偷自拍亚洲精品播放| 久久精品在线免费观看| 久久毛片高清国产| 国产欧美va欧美不卡在线| 欧美国产一区二区在线观看| 精品剧情在线观看| 精品区一区二区| 久久一区二区三区国产精品| 久久精品人人爽人人爽| 久久网这里都是精品| 欧美精品一区二区在线播放| 91国内精品野花午夜精品| 在线视频国内自拍亚洲视频| 在线免费av一区| 欧美性xxxxxxxx| 91精彩视频在线| 在线亚洲高清视频| 欧美一区二区三区播放老司机| 日韩欧美在线观看一区二区三区| 欧美天天综合网| 精品成人在线观看| 一区视频在线播放| 亚洲成人免费影院| 日韩中文字幕一区二区三区| 免费一级片91| 成熟亚洲日本毛茸茸凸凹| 日本高清无吗v一区| 制服丝袜一区二区三区| 国产视频一区不卡| 亚洲精品乱码久久久久久久久 | 亚洲综合在线观看视频| 美女一区二区三区| bt7086福利一区国产| 777亚洲妇女| 国产精品毛片久久久久久| 亚洲一区二区3| 国产一区 二区 三区一级| 色噜噜狠狠成人网p站| 欧美大片免费久久精品三p| 亚洲欧美综合另类在线卡通| 日本美女一区二区三区视频| 国产综合一区二区| 欧美综合亚洲图片综合区| 国产午夜精品久久| 丝袜美腿高跟呻吟高潮一区| 国产成人免费在线观看| 欧美日韩一区二区不卡| 久久久久久免费毛片精品| 亚洲成在线观看|