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

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

?? rtl-stub.c

?? fsmlabs的real time linux的內核
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: rtl-stub.c,v 1.1.1.1 2003/03/01 11:48:24 hofrat Exp $ * ppc-stub.c:  KGDB support for the Linux kernel. * * RTLinux Debugger modifications are written by Michael Barabanov * (baraban@fsmlabs.com) and are * Copyright (C) 2000, Finite State Machine Labs Inc. * * adapted from arch/sparc/kernel/sparc-stub.c for the PowerPC * some stuff borrowed from Paul Mackerras' xmon * Copyright (C) 1998 Michael AK Tesch (tesch@cs.wisc.edu) * * Modifications to run under Linux * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * * This file originally came from the gdb sources, and the * copyright notices have been retained below. *//****************************************************************************		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 SPARC by Stu Grossman, Cygnus Support. * *  This code has been extensively tested on the Fujitsu SPARClite demo board. * *  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 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 *    qOffsets      Get section offsets.  Reply is Text=xxx;Data=yyy;Bss=zzz * *    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) * *    bBB..BB	    Set baud rate to BB..BB		   OK or BNN, then sets *							   baud rate * * 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/kernel.h>#include <linux/string.h>#include <linux/mm.h>#include <linux/smp.h>#include <linux/smp_lock.h>#include <asm/system.h>#include <asm/signal.h>#include <asm/pgtable.h>#include <asm/ptrace.h>#include <linux/signal.h>/* RTLinux support */#define __NO_VERSION__#include <linux/module.h>#include <rtl_sync.h>#include <rtl_sched.h>#define strtoul simple_strtoul#include <psc.h>#define rtl_running_linux() (pthread_self() == &LOCAL_SCHED->rtl_linux_task)int rtl_debug_initialized = 0;/* end of RTLinux support */static void (*debugger_fault_handler)(struct pt_regs *regs) = 0;static void kgdb_fault_handler(struct pt_regs *regs);static int handle_exception (struct pt_regs *regs);extern int putDebugChar(int);   /* write a single character      */extern int getDebugChar(void);   /* read and return a single char */#define BPCODE 0x7d821008#define STR_BPCODE "7d821008"/* * BUFMAX defines the maximum number of characters in inbound/outbound buffers * at least NUMREGBYTES*2 are needed for register packets */#define BUFMAX 2048static char remcomInBuffer[BUFMAX];static char remcomOutBuffer[BUFMAX];static int kgdb_active = 0;static u_int fault_jmp_buf[100];static int kdebug;static const char hexchars[]="0123456789abcdef";/* Place where we save old trap entries for restoration - sparc*//* struct tt_entry kgdb_savettable[256]; *//* typedef void (*trapfunc_t)(void); */#if 0/* Install an exception handler for kgdb */static void exceptionHandler(int tnum, unsigned int *tfunc){	/* We are dorking with a live trap table, all irqs off */}#endifintkgdb_setjmp(long *buf){	asm ("mflr 0; stw 0,0(%0);"	     "stw 1,4(%0); stw 2,8(%0);"	     "mfcr 0; stw 0,12(%0);"	     "stmw 13,16(%0)"	     : : "r" (buf));	/* XXX should save fp regs as well */	return 0;}voidkgdb_longjmp(long *buf, int val){	if (val == 0)		val = 1;	asm ("lmw 13,16(%0);"	     "lwz 0,12(%0); mtcrf 0x38,0;"	     "lwz 0,0(%0); lwz 1,4(%0); lwz 2,8(%0);"	     "mtlr 0; mr 3,%1"	     : : "r" (buf), "r" (val));}/* Convert ch from a hex digit to an int */static inthex(unsigned 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;}/* Convert the memory pointed to by mem into hex, placing result in buf. * Return a pointer to the last char put in buf (null), in case of mem fault, * return 0. */static unsigned char *mem2hex(char *mem, char *buf, int count){	unsigned char ch;	if (kgdb_setjmp((long*)fault_jmp_buf) == 0) {		debugger_fault_handler = kgdb_fault_handler;		while (count-- > 0) {			ch = *mem++;			*buf++ = hexchars[ch >> 4];			*buf++ = hexchars[ch & 0xf];		}	} else {		/* error condition */	}	debugger_fault_handler = 0;	*buf = 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){	int i;	unsigned char ch;	if (kgdb_setjmp((long*)fault_jmp_buf) == 0) {		debugger_fault_handler = kgdb_fault_handler;		for (i=0; i<count; i++) {			ch = hex(*buf++) << 4;			ch |= hex(*buf++);			*mem++ = ch;		}		flush_icache_range((int)mem, (int)mem+count);	} else {		/* error condition */	}	debugger_fault_handler = 0;	return mem;}/* * While we find nice hex chars, build an int. * Return number of chars processed. */static inthexToInt(char **ptr, int *intValue){	int numChars = 0;	int hexValue;	*intValue = 0;	if (kgdb_setjmp((long*)fault_jmp_buf) == 0) {		debugger_fault_handler = kgdb_fault_handler;		while (**ptr) {			hexValue = hex(**ptr);			if (hexValue < 0)				break;			*intValue = (*intValue << 4) | hexValue;			numChars ++;			(*ptr)++;		}	} else {	     /* error condition */	}	debugger_fault_handler = 0;	return (numChars);}/* scan for the sequence $<data>#<checksum>     */static voidgetpacket(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;		}		if (count >= BUFMAX)			continue;		buffer[count] = 0;		if (ch == '#') {			xmitcsum = hex(getDebugChar() & 0x7f) << 4;			xmitcsum |= hex(getDebugChar() & 0x7f);			if (checksum != xmitcsum)				putDebugChar('-');	/* failed checksum */			else {				putDebugChar('+'); /* successful transfer */				/* if a sequence char is present, reply the 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);}/* send the packet in buffer.  */static void putpacket(unsigned char *buffer){	unsigned char checksum;	int count;	unsigned char ch, recv;	/*  $<packet info>#<checksum>. */	do {		putDebugChar('$');		checksum = 0;		count = 0;		while ((ch = buffer[count])) {			putDebugChar(ch);			checksum += ch;			count += 1;		}		putDebugChar('#');		putDebugChar(hexchars[checksum >> 4]);		putDebugChar(hexchars[checksum & 0xf]);		recv = getDebugChar();	} while ((recv & 0x7f) != '+');}static void kgdb_flush_cache_all(void){	flush_instruction_cache();}static inline int get_msr(void){	int msr;	asm volatile("mfmsr %0" : "=r" (msr):);	return msr;}static inline void set_msr(int msr){	asm volatile("mtmsr %0" : : "r" (msr));}/* Set up exception handlers for tracing and breakpoints * [could be called kgdb_init()] */#include "rtl_ex.c"int rtl_debug_exception(int vector, struct pt_regs *regs, int error_code){	return handle_exception(regs);}int set_debug_traps(void){#if 0	unsigned char c;	save_and_cli(flags);	/* In case GDB is started before us, ack any packets (presumably	 * "$?#xx") sitting there.	 *	 * I've found this code causes more problems than it solves,	 * so that's why it's commented out.  GDB seems to work fine	 * now starting either before or after the kernel   -bwb	 */	while((c = getDebugChar()) != '$');	while((c = getDebugChar()) != '#');	c = getDebugChar(); /* eat first csum byte */	c = getDebugChar(); /* eat second csum byte */	putDebugChar('+'); /* ack it */#endif	rtl_request_traps(&rtl_debug_exception);	rtl_debug_initialized = 1;	return 0;}void unset_debug_traps(void){	rtl_request_traps(0);	rtl_debug_initialized = 0;}/* more RTLinux support */#define CONFIG_RTL_DEBUGGER_THREADS#define CONFIG_RTL_DEBUGGER_Z_PROTOCOL#define CONFIG_RTL_DEBUG_BP_HACKstatic spinlock_t bp_lock = SPIN_LOCK_UNLOCKED;#define RTL_MAX_BP 1024static struct bp_cache_entry {	char *mem;	unsigned long 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;	unsigned int old;	char buf[10];	if (!mem2hex(mem, buf, 4)) {		return EINVAL; /* memory error */	}	if (!hex2mem(STR_BPCODE, mem, 4)) {		return EINVAL;	}	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];	debugpr("inserted %x, old contents = %x\n", mem, old);	return 0;}int search_bp (char *mem){	struct bp_cache_entry *e = cache_start;	struct bp_cache_entry *f = 0;	spin_lock (&bp_lock);	if (!e) {		spin_unlock (&bp_lock);		return EINVAL;	}	if (e->mem == mem) {		f = e;	} else {		for (; e->next; e = e->next) {			if (e->next->mem == mem) {				f = e->next;				break;			}		}	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合图片区| 精品欧美乱码久久久久久1区2区 | 国产一区欧美一区| 香蕉久久夜色精品国产使用方法 | 日韩av不卡一区二区| 亚洲国产综合色| 亚洲成人精品一区二区| 石原莉奈在线亚洲三区| 日日骚欧美日韩| 日韩和欧美一区二区| 蜜桃视频一区二区三区在线观看| 五月天中文字幕一区二区| 亚洲国产一区视频| 日本不卡视频一二三区| 青青草97国产精品免费观看无弹窗版 | 麻豆久久一区二区| 精品一区二区三区免费毛片爱| 久久精品噜噜噜成人88aⅴ| 免费观看成人av| 国产资源精品在线观看| 成人高清在线视频| 色综合网站在线| 欧美精品久久久久久久久老牛影院| 制服丝袜av成人在线看| 欧美精品一区二区三| 中文字幕成人av| 亚洲va中文字幕| 国产电影一区在线| 欧美又粗又大又爽| 日韩午夜av电影| 中文字幕在线视频一区| 亚洲图片一区二区| 国产精品一区二区你懂的| 97精品久久久午夜一区二区三区 | 精品国产sm最大网站免费看| 国产三级精品三级| 亚洲成av人影院在线观看网| 国产一区在线看| 91成人在线观看喷潮| 日韩一区二区麻豆国产| 国产精品久久久久久久久免费樱桃 | 另类小说图片综合网| a亚洲天堂av| 日韩精品一区二区在线观看| 国产精品国产三级国产a| 日日欢夜夜爽一区| 成人不卡免费av| 日韩精品资源二区在线| 一区二区在线观看视频| 狠狠色综合色综合网络| 欧美性高清videossexo| 国产亚洲1区2区3区| 亚洲图片欧美色图| 91在线观看地址| 久久综合丝袜日本网| 亚洲成人7777| 在线精品视频小说1| 欧美国产国产综合| 国产乱码精品一区二区三| 欧美吞精做爰啪啪高潮| 一区精品在线播放| 国产伦精品一区二区三区免费迷 | 欧美日韩一区二区三区免费看| 久久久精品tv| 久久精品国产一区二区三区免费看| 一本到三区不卡视频| 国产精品少妇自拍| 国产福利视频一区二区三区| 91精品国产91热久久久做人人| 亚洲美女精品一区| 91美女视频网站| 中文字幕一区在线| va亚洲va日韩不卡在线观看| 亚洲国产高清在线| 国产69精品久久99不卡| 2021中文字幕一区亚洲| 国产毛片精品视频| 国产亚洲va综合人人澡精品| 国产精品香蕉一区二区三区| 久久先锋资源网| 国内精品写真在线观看| 久久一留热品黄| 国产伦精品一区二区三区免费迷| 精品对白一区国产伦| 国产在线国偷精品产拍免费yy| 日韩你懂的电影在线观看| 免费成人在线观看| 精品欧美一区二区久久| 国产白丝网站精品污在线入口| 国产日韩亚洲欧美综合| 丰满放荡岳乱妇91ww| 最新国产成人在线观看| 在线亚洲一区二区| 丝袜国产日韩另类美女| 欧美日本一区二区三区| 日av在线不卡| 久久久久久夜精品精品免费| 风间由美中文字幕在线看视频国产欧美| 国产精品美女一区二区| 日本高清无吗v一区| 三级久久三级久久| 日韩一级高清毛片| 成a人片亚洲日本久久| 亚洲男人的天堂网| 欧美精品123区| 九一久久久久久| 国产精品美女久久久久aⅴ国产馆| av电影在线不卡| 午夜精品一区二区三区三上悠亚| 日韩一区二区三区观看| 成人在线视频一区二区| 夜色激情一区二区| 欧美岛国在线观看| 色婷婷精品久久二区二区蜜臂av| 日韩精品1区2区3区| 欧美国产亚洲另类动漫| 欧美午夜影院一区| 国产精品自拍三区| 夜夜揉揉日日人人青青一国产精品| 欧美成人女星排行榜| 成人精品在线视频观看| 亚洲动漫第一页| 国产清纯白嫩初高生在线观看91 | 欧美性猛片xxxx免费看久爱| 国内精品伊人久久久久av影院 | 国产精品热久久久久夜色精品三区| 在线一区二区观看| 国产精品996| 日韩—二三区免费观看av| 国产精品的网站| 日韩视频不卡中文| 欧洲精品一区二区| av亚洲产国偷v产偷v自拍| 欧美aaa在线| 亚洲成国产人片在线观看| 亚洲欧洲三级电影| 久久先锋影音av| 精品国产污污免费网站入口 | 欧美一区二区三区播放老司机| 99久久综合精品| 韩日av一区二区| 同产精品九九九| 亚洲裸体在线观看| 国产精品成人在线观看| 久久久亚洲午夜电影| 欧美一级久久久久久久大片| 欧美性猛交xxxx黑人交| 91免费看`日韩一区二区| 国产成人高清视频| 国产真实乱子伦精品视频| 爽好久久久欧美精品| 亚洲国产精品综合小说图片区| 中文字幕亚洲在| 国产精品日日摸夜夜摸av| 欧美国产乱子伦| 国产精品福利影院| 欧美国产综合一区二区| 中文天堂在线一区| 欧美国产日韩a欧美在线观看| 国产欧美一区二区精品秋霞影院| 久久午夜色播影院免费高清| 久久人人爽爽爽人久久久| 久久影音资源网| 国产日韩精品一区| 国产精品毛片a∨一区二区三区| 中文字幕精品—区二区四季| 亚洲国产高清aⅴ视频| 国产精品麻豆视频| 亚洲视频一区在线观看| 亚洲精品高清在线| 亚洲综合一区二区精品导航| 亚洲制服欧美中文字幕中文字幕| 亚洲线精品一区二区三区| 天堂va蜜桃一区二区三区漫画版| 蜜桃视频在线一区| 成人性生交大片免费| 91麻豆免费视频| 欧美日韩一区小说| 日韩精品一区二区三区在线观看 | 欧美一卡二卡三卡四卡| 亚洲精品一区二区三区四区高清| 精品久久免费看| 国产精品福利一区二区| 亚洲一区在线观看免费| 美国十次综合导航| 99国产精品国产精品久久| 日本精品一区二区三区高清| 欧美久久久久免费| 精品国产欧美一区二区| 中文字幕欧美一| 久久精品国产77777蜜臀| www.欧美亚洲| 日韩欧美的一区| 中文字幕一区二| 黄色成人免费在线| 欧美专区日韩专区| 国产日产欧美精品一区二区三区| 亚洲乱码精品一二三四区日韩在线| 麻豆久久久久久久| 欧美伊人久久久久久久久影院|