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

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

?? rtl-stub.c

?? fsmlabs的real time linux的內核
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* rtl-stub.c for Alpha, originally taken from alpha-gdbstub.c and modified to * work with RTLinux debugger.  See comments below. * * RTLinux Debugger modifications are written by Nathan Paul Simons and are * (C) Finite State Machine Labs Inc. 2000 business@fsmlabs.com * * Released under the terms of GPL 2. * Open RTLinux makes use of a patented process described in * US Patent 5,995,745. Use of this process is governed * by the Open RTLinux Patent License which can be obtained from * www.fsmlabs.com/PATENT or by sending email to * licensequestions@fsmlabs.com *//****************************************************************************		THIS SOFTWARE IS NOT COPYRIGHTED   HP offers the following for use in the public domain.  HP makes no   warranty with regard to the software or its performance and the   user accepts the software "AS IS" with all faults.   HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD   TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.****************************************************************************//**************************************************************************** *  Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $ * *  Module name: remcom.c $ *  Revision: 1.34 $ *  Date: 91/03/09 12:29:49 $ *  Contributor:     Lake Stevens Instrument Division$ * *  Description:     low level support for gdb debugger. $ * *  Considerations:  only works on target hardware $ * *  Written by:      Glenn Engel $ *  ModuleState:     Experimental $ * *  NOTES:           See Below $ * *  Modified for FreeBSD by Stu Grossman. * *  To enable debugger support, two things need to happen.  One, a *  call to set_debug_traps() is necessary in order to allow any breakpoints *  or error conditions to be properly intercepted and reported to gdb. *  Two, a breakpoint needs to be generated to begin communication.  This *  is most easily accomplished by a call to breakpoint().  Breakpoint() *  simulates a breakpoint by executing a trap #1. * *  The external function exceptionHandler() is *  used to attach a specific handler to a specific 386 vector number. *  It should use the same privilege level it runs at.  It should *  install it as an interrupt gate so that interrupts are masked *  while the handler runs. *  Also, need to assign exceptionHook and oldExceptionHook. * *  Because gdb will sometimes write to the stack area to execute function *  calls, this program cannot rely on using the supervisor stack so it *  uses its own stack area reserved in the int array remcomStack. * ************* * *    The following gdb commands are supported: * * command          function                               Return value * *    g             return the value of the CPU registers  hex data or ENN *    G             set the value of the CPU registers     OK or ENN * *    mAA..AA,LLLL  Read LLLL bytes at address AA..AA      hex data or ENN *    MAA..AA,LLLL: Write LLLL bytes at address AA.AA      OK or ENN * *    c             Resume at current address              SNN   ( signal NN) *    cAA..AA       Continue at address AA..AA             SNN * *    s             Step one instruction                   SNN *    sAA..AA       Step one instruction from AA..AA       SNN * *    k             kill * *    ?             What was the last sigval ?             SNN   (signal NN) * *    D             detach                                 OK * * All commands and responses are sent with a packet which includes a * checksum.  A packet consists of * * $<packet info>#<checksum>. * * where * <packet info> :: <characters representing the command or response> * <checksum>    :: < two hex digits computed as modulo 256 sum of <packetinfo>> * * When a packet is received, it is first acknowledged with either '+' or '-'. * '+' indicates a successful transfer.  '-' indicates a failed transfer. * * Example: * * Host:                  Reply: * $m0,10#2a               +$00010203040506070809101112131415#42 * ****************************************************************************/#include <linux/string.h>#include <asm/system.h>#include <asm/ptrace.h>		/* for linux pt_regs struct */#include <asm/reg.h>		/* for EF_* reg num defines */#include <asm/gentrap.h>	/* for GEN_* trap num defines */#include <linux/smp.h>#include <linux/smp_lock.h>#include <linux/kernel.h>#include <linux/mm.h>#include <linux/signal.h>/* RTLinux support */#define __NO_VERSION__#include <linux/module.h>#include <rtl_sync.h>#include <rtl_sched.h>#include <psc.h>#include "rtl_ex.c"#define strtoul simple_strtoul#define rtl_running_linux() (pthread_self() == &LOCAL_SCHED->rtl_linux_task)int rtl_debug_initialized = 0;/* end of RTLinux support *//* Indicate to caller of mem2hex or hex2mem that there has been an   error.  */static volatile int real_mem_err[NR_CPUS];static volatile int real_mem_err_expected[NR_CPUS];#define mem_err (real_mem_err[rtl_getcpuid()])#define mem_err_expected (real_mem_err_expected[rtl_getcpuid()])/* external low-level support routines */typedef void (*Function) (void);	/* pointer to a function */extern int putDebugChar(int);	/* write a single character      */extern int getDebugChar(void);	/* read and return a single char */extern int rtl_request_traps(int (*rtl_exception_intercept)			      (int vector, struct pt_regs * regs));/* ripped from arch/alpha/kernel/process.c  * XXX we should probably just export show_regs and use the pre-exisiting  * one to cut down on code size -Nathan */void show_regs(struct pt_regs *regs){	printk("\nps: %04lx pc: [<%016lx>]\n", regs->ps, regs->pc);	printk("rp: [<%016lx>] sp: %p\n", regs->r26, regs + 1);	printk(" r0: %016lx  r1: %016lx  r2: %016lx  r3: %016lx\n",	       regs->r0, regs->r1, regs->r2, regs->r3);	printk(" r4: %016lx  r5: %016lx  r6: %016lx  r7: %016lx\n",	       regs->r4, regs->r5, regs->r6, regs->r7);	printk(" r8: %016lx r16: %016lx r17: %016lx r18: %016lx\n",	       regs->r8, regs->r16, regs->r17, regs->r18);	printk("r19: %016lx r20: %016lx r21: %016lx r22: %016lx\n",	       regs->r19, regs->r20, regs->r21, regs->r22);	printk("r23: %016lx r24: %016lx r25: %016lx r26: %016lx\n",	       regs->r23, regs->r24, regs->r25, regs->r26);	printk("r27: %016lx r28: %016lx r29: %016lx hae: %016lx\n",	       regs->r27, regs->r28, regs->gp, regs->hae);}/* BUFMAX defines the maximum number of characters in inbound/outbound buffers * at least NUMREGBYTES*2 are needed for register packets */#define BUFMAX 1500int remote_debug = 0;static const char hexchars[] = "0123456789abcdef";static int hex(char ch){	if ((ch >= 'a') && (ch <= 'f'))		return (ch - 'a' + 10);	if ((ch >= '0') && (ch <= '9'))		return (ch - '0');	if ((ch >= 'A') && (ch <= 'F'))		return (ch - 'A' + 10);	return (-1);}/* scan for the sequence $<data>#<checksum>     */static void getpacket(char *buffer){	unsigned char checksum;	unsigned char xmitcsum;	int i;	int count;	unsigned char ch;	do {		/* wait around for the start character, ignore all other 		 * characters */		while ((ch = (getDebugChar() & 0x7f)) != '$');		checksum = 0;		xmitcsum = -1;		count = 0;		/* now, read until a # or end of buffer is found */		while (count < BUFMAX) {			ch = getDebugChar() & 0x7f;			if (ch == '#')				break;			checksum = checksum + ch;			buffer[count] = ch;			count = count + 1;		}		buffer[count] = 0;		if (ch == '#') {			xmitcsum = hex(getDebugChar() & 0x7f) << 4;			xmitcsum += hex(getDebugChar() & 0x7f);			if (checksum != xmitcsum)				putDebugChar('-');	/* failed checksum */			else {				putDebugChar('+');	/* successful xfer */				/* if a sequence char is present, reply the 				 * sequence ID */				if (buffer[2] == ':') {					putDebugChar(buffer[0]);					putDebugChar(buffer[1]);					/* remove sequence chars from buffer */					count = strlen(buffer);					for (i = 3; i <= count; i++)						buffer[i - 3] = buffer[i];				}			}		}	} while (checksum != xmitcsum);	if (strlen(buffer) >= BUFMAX)		panic("kgdb: buffer overflow");}				/* static void getpacket(char *buffer) *//* send the packet in buffer.  */static void putpacket(char *buffer){	unsigned char checksum;	int count;	unsigned char ch;	if (strlen(buffer) >= BUFMAX)		panic("kgdb: buffer overflow");	/*  $<packet info>#<checksum>. */	do {		putDebugChar('$');		checksum = 0;		count = 0;		while ((ch = buffer[count])) {			if (!putDebugChar(ch))				return;			checksum += ch;			count += 1;		}		putDebugChar('#');		putDebugChar(hexchars[checksum >> 4]);		putDebugChar(hexchars[checksum % 16]);	} while ((getDebugChar() & 0x7f) != '+');}				/* static void putpacket(char *buffer) */int get_char(char *addr){	return *addr;}void set_char(char *addr, int val){	*addr = val;}/* convert the memory pointed to by mem into hex, placing result in buf *//* return a pointer to the last char put in buf (null) */static char *mem2hex(char *mem, char *buf, int count){	unsigned char ch;	int may_fault = 1;	if (mem == 0) {		strcpy(buf, "E03");		return buf;	}	if (may_fault) {		mem_err_expected = 1;		mem_err = 0;	}	while (count-- > 0) {		ch = *mem++;		if (may_fault && mem_err) {			if (remote_debug)				printk				    ("Mem fault fetching from addr %lx\n",				     (long) (mem - 1));			*buf = 0;	/* truncate buffer */			return 0;		}		*buf++ = hexchars[ch >> 4];		*buf++ = hexchars[ch & 0xf];	}	*buf = 0;	if (may_fault)		mem_err_expected = 0;	return buf;}/* convert the hex array pointed to by buf into binary to be placed in mem *//* return a pointer to the character AFTER the last byte written */static char *hex2mem(char *buf, char *mem, int count){	unsigned char ch;	while (count-- > 0) {		ch = hex(*buf++) << 4;		ch = ch + hex(*buf++);		set_char(mem++, ch);	}	return mem;}/* * While we find nice hex chars, build an int. * Return number of chars processed. */static long hexToInt(char **ptr, long *intValue){	long numChars = 0;	long hexValue;	*intValue = 0;	while (**ptr) {		hexValue = hex(**ptr);		if (hexValue >= 0) {			*intValue = (*intValue << 4) | hexValue;			numChars++;		} else			break;		(*ptr)++;	}	return (numChars);}/* more RTLinux support */static spinlock_t bp_lock = SPIN_LOCK_UNLOCKED;#define RTL_MAX_BP 1024static struct bp_cache_entry {	char *mem;	unsigned char val;	struct bp_cache_entry *next;} bp_cache[RTL_MAX_BP];static struct bp_cache_entry *cache_start = 0;int insert_bp(char *mem){	int i;	struct bp_cache_entry *e;	int old;	char buf[3];	if (!mem2hex(mem, buf, 1)) {		return EINVAL;	/* memory error */	}	old = strtoul(buf, 0, 16);	for (e = cache_start; e; e = e->next) {		if (e->mem == mem) {			return EINVAL;	/* already there */		}	}	for (i = 0; i < RTL_MAX_BP; i++) {		if (bp_cache[i].mem == 0) {			break;		}	}	if (i == RTL_MAX_BP) {		return EINVAL;	/* no space */	}	bp_cache[i].val = old;	bp_cache[i].mem = mem;	bp_cache[i].next = cache_start;	cache_start = &bp_cache[i];	set_char(mem, 0xcc);	return 0;}#define CONFIG_RTL_DEBUGGER_THREADS#define CONFIG_RTL_DEBUGGER_Z_PROTOCOLstatic int send_exception_info = 0;static char remcomInBuffer[BUFMAX];static char remcomOutBuffer[BUFMAX];static short error;void debug_error(char *format, char *parm){	if (remote_debug)		printk(format, parm);}/* Alpha registers are 64 bit wide, so 8 bytes to a register, times 66 * registers we need to keep track of */#define NUMREGS	66#define BYTESPERREG	8#define NUMREGBYTES	(BYTESPERREG * NUMREGS)int remove_bp(char *mem){	struct bp_cache_entry *e = cache_start;	struct bp_cache_entry *f = 0;	if (!e) {		return EINVAL;	}	if (e->mem == mem) {		cache_start = e->next;		f = e;	} else {		for (; e->next; e = e->next) {			if (e->next->mem == mem) {				f = e->next;				e->next = f->next;				break;			}		}	}	if (!f) {		return EINVAL;	}	mem_err_expected = 1;	set_char(f->mem, f->val);	if (mem_err) {		return EINVAL;	}	mem_err_expected = 0;	return 0;}				/* int remove_bp(char *mem) *//* for some reason, the mappings in reg.h are not *completely* correct.  That * is, they don't match up with the mappings in GDB.  For instance, EF_PC is * supposed to be the 64th integer in the gdb_regs array, not the 28th.  i * don't know how gdb possibly works with normal core files, but to get things * to work here, we are going to *ignore* asm-alpha/regs.h and go with what * gdb says. -Nathan */static void regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs){	gdb_regs[EF_V0] = regs->r0;	/* return value */	gdb_regs[EF_T0] = regs->r1;	/* temporary registers 1-8 */	gdb_regs[EF_T1] = regs->r2;	gdb_regs[EF_T2] = regs->r3;	gdb_regs[EF_T3] = regs->r4;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲妇女屁股眼交7| 久久久久九九视频| 亚洲人成在线观看一区二区| 成人网男人的天堂| 亚洲女厕所小便bbb| 在线亚洲精品福利网址导航| 亚洲午夜久久久久| 日韩三级伦理片妻子的秘密按摩| 午夜视频久久久久久| 制服丝袜一区二区三区| 韩国一区二区三区| 综合中文字幕亚洲| 欧美日韩一级二级| 国产一区二区三区视频在线播放| 日本一区二区三区高清不卡| voyeur盗摄精品| 亚洲成人av资源| 日韩精品一区二区三区四区| 成人少妇影院yyyy| 亚洲午夜日本在线观看| 日韩欧美久久一区| gogogo免费视频观看亚洲一| 亚洲一区视频在线| 精品88久久久久88久久久| 成人av电影在线网| 亚洲一区二区在线免费看| 日韩美女在线视频| 日韩一区二区三区视频在线| 国产高清在线观看免费不卡| 亚洲精品日韩综合观看成人91| 欧美顶级少妇做爰| 国产成a人亚洲| 亚洲国产日韩a在线播放性色| 精品精品欲导航| 一本久道久久综合中文字幕| 一区二区三区国产| 久久综合色8888| 欧美日韩一区二区电影| 成人禁用看黄a在线| 天天免费综合色| ...av二区三区久久精品| 91精品国产综合久久精品| 成人黄色电影在线 | 欧美激情在线看| 欧美日韩一级片在线观看| 丁香婷婷深情五月亚洲| 日韩av网站在线观看| 亚洲美女偷拍久久| 国产日产欧美一区| 91精品麻豆日日躁夜夜躁| 97久久超碰国产精品电影| 国产综合色在线| 亚洲国产另类av| 中文字幕亚洲欧美在线不卡| 日韩精品影音先锋| 91麻豆精品国产91| 91免费国产视频网站| 国产一区二区日韩精品| 全国精品久久少妇| 亚洲不卡在线观看| 一区二区三区在线免费观看| 国产欧美日韩在线视频| 欧美精品一区二区三| 91精品国产色综合久久ai换脸 | 91丨porny丨在线| 国产精品自在欧美一区| 久久国产福利国产秒拍| 日韩电影一区二区三区| 亚洲国产精品久久久男人的天堂| 亚洲欧洲av在线| 国产农村妇女毛片精品久久麻豆 | 日本久久一区二区三区| 99视频精品全部免费在线| 国产成人欧美日韩在线电影| 精品一区二区国语对白| 美女精品自拍一二三四| 在线观看免费一区| 99久久精品免费看| 99久久er热在这里只有精品66| 成人av在线影院| 99久久99久久精品免费观看| av在线综合网| 91在线一区二区三区| 91丝袜美女网| 在线一区二区观看| 欧美午夜寂寞影院| 欧美区视频在线观看| 911精品产国品一二三产区| 91精品国产全国免费观看 | 日韩欧美黄色影院| 日韩欧美成人午夜| 久久伊人蜜桃av一区二区| 国产午夜亚洲精品羞羞网站| 国产日韩精品一区二区三区在线| 日本一区二区三区在线不卡| 中文字幕综合网| 亚洲国产一区二区a毛片| 全国精品久久少妇| 国产精品一区二区视频| av在线不卡免费看| 欧美理论在线播放| 精品久久久久久亚洲综合网| 国产婷婷精品av在线| 一色桃子久久精品亚洲| 一区二区三区 在线观看视频| 亚洲地区一二三色| 国产一区二区导航在线播放| 97aⅴ精品视频一二三区| 欧美人动与zoxxxx乱| 久久一区二区三区国产精品| 亚洲人吸女人奶水| 麻豆国产精品视频| jlzzjlzz亚洲日本少妇| 欧美日韩mp4| 亚洲国产精品v| 午夜视黄欧洲亚洲| 成人性生交大片免费看视频在线 | 久久伊人中文字幕| 亚洲青青青在线视频| 奇米精品一区二区三区四区| 成人av综合在线| 欧美精品自拍偷拍| 国产女人aaa级久久久级| 亚洲mv大片欧洲mv大片精品| 国产成人精品免费| 欧美精品精品一区| 国产精品灌醉下药二区| 日韩电影一区二区三区四区| 成人国产精品免费观看视频| 欧美一区二区三区影视| 亚洲图片欧美激情| 麻豆精品一区二区三区| 色婷婷精品久久二区二区蜜臂av | 成人午夜激情在线| 欧美一区二区视频在线观看2020 | 91精品国产高清一区二区三区| 国产欧美视频在线观看| 亚洲成人av免费| 色综合咪咪久久| 欧美国产综合一区二区| 美国十次综合导航| 欧美三级日韩三级国产三级| 国产精品久久网站| 黄色精品一二区| 在线不卡中文字幕| 亚洲精品ww久久久久久p站| 高清久久久久久| 2023国产精品自拍| 美女网站色91| 91麻豆精品国产自产在线 | 成人免费一区二区三区视频 | 蜜臀久久久99精品久久久久久| 91同城在线观看| 国产精品久久久久久久久动漫| 国产又黄又大久久| 欧美不卡一区二区三区| 日韩高清在线不卡| 欧美日韩一级二级三级| 一级中文字幕一区二区| 色综合天天综合狠狠| 最新热久久免费视频| 成人黄色一级视频| 国产精品久久久久影院老司| 国产精品99久| 国产调教视频一区| 福利91精品一区二区三区| 久久久久久久久久久久电影 | 综合在线观看色| gogogo免费视频观看亚洲一| 国产精品久久久久婷婷二区次| 国产一区二区三区香蕉| 久久精品在线观看| 国产高清在线精品| 国产精品色哟哟| 大胆亚洲人体视频| 亚洲欧洲国产日本综合| 色婷婷精品久久二区二区蜜臀av | 中文字幕成人网| 91色综合久久久久婷婷| 一区二区在线观看不卡| 在线免费观看日本欧美| 亚洲综合久久av| 欧美日韩亚洲丝袜制服| 男人的天堂亚洲一区| 久久免费精品国产久精品久久久久| 韩国精品一区二区| 国产欧美一区二区精品久导航 | 欧美一级在线观看| 捆绑紧缚一区二区三区视频| 2020国产精品| 99久久国产综合色|国产精品| 一区二区三区国产精品| 欧美人狂配大交3d怪物一区| 麻豆成人91精品二区三区| 久久久.com| 91国产成人在线| 麻豆视频观看网址久久| 国产精品天天看| 欧美日韩一区久久| 国产综合一区二区|