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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? rtl-stub.c

?? fsmlabs的real time linux的內(nèi)核
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any * later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * General Public License for more details. * * RTLinux Debugger modifications are written by Michael Barabanov * (baraban@fsmlabs.com) and * are Copyright (C) 2000, Finite State Machine Labs Inc. * */ /**************************************************************************** *  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 $ *  Updated by:	     David Grothe <dave@gcom.com> *  ModuleState:     Experimental $ * *  NOTES:           See Below $ * *  Modified for 386 by Jim Kingdon, Cygnus Support. *  Compatibility with 2.1.xx kernel by David Grothe <dave@gcom.com> *  Integrated into 2.2.5 kernel by Tigran Aivazian <tigran@sco.com> *  Modified for RTLinux by Michael Barabanov (baraban@fsmlabs.com) * *  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 an int 3. * ************* * *    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) * * 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 <linux/kernel.h>#include <asm/vm86.h>#include <asm/system.h>#include <asm/ptrace.h>			/* for linux pt_regs struct */#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 *//************************************************************************ * * 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 *//************************************************************************//* BUFMAX defines the maximum number of characters in inbound/outbound buffers*//* at least NUMREGBYTES*2 are needed for register packets */#define BUFMAX 800static int     remote_debug = 0;/*  debug >  0 prints ill-formed commands in valid packets & checksum errors */static const char hexchars[]="0123456789abcdef";/* Number of bytes of registers.  */#define NUMREGBYTES 64/* * Note that this register image is in a different order than * the register image that Linux produces at interrupt time. * * Linux's register image is defined by struct pt_regs in ptrace.h. * Just why GDB uses a different order is a historical mystery. */enum regnames {_EAX,		/* 0 */	       _ECX,		/* 1 */	       _EDX,		/* 2 */	       _EBX,		/* 3 */	       _ESP,		/* 4 */	       _EBP,		/* 5 */	       _ESI,		/* 6 */	       _EDI,		/* 7 */	       _PC 		/* 8 also known as eip */,	       _PS		/* 9 also known as eflags */,	       _CS,		/* 10 */	       _SS,		/* 11 */	       _DS,		/* 12 */	       _ES,		/* 13 */	       _FS,		/* 14 */	       _GS};		/* 15 *//***************************  ASSEMBLY CODE MACROS *************************//* 									   *//* Put the error code here just in case the user cares.  */int gdb_i386errcode;/* Likewise, the vector number here (since GDB only gets the signal   number through the usual means, and that's not very specific).  */int gdb_i386vector = -1;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>     */void getpacket(char * buffer){  unsigned char checksum;  unsigned char xmitcsum;  int  i;  int  count;  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 ((remote_debug ) && (checksum != xmitcsum)) {        printk ("bad checksum.  My count = 0x%x, sent=0x%x. buf=%s\n",		 checksum,xmitcsum,buffer);      }      if (checksum != xmitcsum) putDebugChar('-');  /* failed checksum */      else {	 putDebugChar('+');  /* successful transfer */	 /* 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 (remote_debug)    printk("R:%s\n", buffer) ;}/* send the packet in buffer.  */void putpacket(char * buffer){  unsigned char checksum;  int  count;  char ch;  /*  $<packet info>#<checksum>. */  do {  if (remote_debug)    printk("T:%s\n", buffer) ;  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 char  remcomInBuffer[BUFMAX];static char  remcomOutBuffer[BUFMAX];static short error;void debug_error( char * format, char * parm){  if (remote_debug) printk (format,parm);}static void print_regs(struct pt_regs *regs){    printk("EAX=%08lx ", regs->eax);    printk("EBX=%08lx ", regs->ebx);    printk("ECX=%08lx ", regs->ecx);    printk("EDX=%08lx ", regs->edx);    printk("\n");    printk("ESI=%08lx ", regs->esi);    printk("EDI=%08lx ", regs->edi);    printk("EBP=%08lx ", regs->ebp);    printk("ESP=%08lx ", (long) (regs+1));    printk("\n");    printk(" DS=%08x ", regs->xds);    printk(" ES=%08x ", regs->xes);    printk(" SS=%08x ", __KERNEL_DS);    printk(" FL=%08lx ", regs->eflags);    printk("\n");    printk(" CS=%08x ", regs->xcs);    printk(" IP=%08lx ", regs->eip);#if 0    printk(" FS=%08x ", regs->fs);    printk(" GS=%08x ", regs->gs);#endif    printk("\n");} /* print_regs */static void regs_to_gdb_regs(int *gdb_regs, struct pt_regs *regs){    gdb_regs[_EAX] =  regs->eax;    gdb_regs[_EBX] =  regs->ebx;    gdb_regs[_ECX] =  regs->ecx;    gdb_regs[_EDX] =  regs->edx;    gdb_regs[_ESI] =  regs->esi;    gdb_regs[_EDI] =  regs->edi;    gdb_regs[_EBP] =  regs->ebp;    gdb_regs[ _DS] =  regs->xds;    gdb_regs[ _ES] =  regs->xes;    gdb_regs[ _PS] =  regs->eflags;    gdb_regs[ _CS] =  regs->xcs;    gdb_regs[ _PC] =  regs->eip;    gdb_regs[_ESP] =  (int) (&regs->esp) ;    gdb_regs[ _SS] =  __KERNEL_DS;    gdb_regs[ _FS] =  0xFFFF;    gdb_regs[ _GS] =  0xFFFF;} /* regs_to_gdb_regs */static void gdb_regs_to_regs(int *gdb_regs, struct pt_regs *regs){    regs->eax	=     gdb_regs[_EAX] ;    regs->ebx	=     gdb_regs[_EBX] ;    regs->ecx	=     gdb_regs[_ECX] ;    regs->edx	=     gdb_regs[_EDX] ;    regs->esi	=     gdb_regs[_ESI] ;    regs->edi	=     gdb_regs[_EDI] ;    regs->ebp	=     gdb_regs[_EBP] ;    regs->xds	=     gdb_regs[ _DS] ;    regs->xes	=     gdb_regs[ _ES] ;    regs->eflags=     gdb_regs[ _PS] ;    regs->xcs	=     gdb_regs[ _CS] ;    regs->eip	=     gdb_regs[ _PC] ;#if 0					/* can't change these */    regs->esp	=     gdb_regs[_ESP] ;    regs->xss	=     gdb_regs[ _SS] ;    regs->fs	=     gdb_regs[ _FS] ;    regs->gs	=     gdb_regs[ _GS] ;#endif} /* gdb_regs_to_regs *//* 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()])static          int garbage_loc = -1 ;intget_char (char *addr){  return *addr;}voidset_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), in case of mem fault, * return 0. */char* mem2hex( char* mem, char* buf, int   count)	       {      int i;      unsigned char ch;      int may_fault = 1;      if (may_fault)      {	  mem_err_expected = 1 ;	  mem_err = 0 ;      }      for (i=0;i<count;i++) {	  /* printk("%lx = ", mem) ; */	  ch = get_char (mem++);	  /* printk("%02x\n", ch & 0xFF) ; */	  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 % 16];      }      *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 */char* hex2mem( char* buf,	       char* mem,	       int   count){      int i;      unsigned char ch;      int may_fault = 1;      if (may_fault)      {	  mem_err_expected = 1 ;	  mem_err = 0 ;      }      for (i=0;i<count;i++) {          ch = hex(*buf++) << 4;          ch = ch + hex(*buf++);	  set_char (mem++, ch);	  if (may_fault && mem_err)	  {	    if (remote_debug)		printk("Mem fault storing to addr %lx\n", (long)(mem-1));	    return 0;	  }      }      if (may_fault)	  mem_err_expected = 0 ;      return(mem);}/**********************************************//* WHILE WE FIND NICE HEX CHARS, BUILD AN INT *//* RETURN NUMBER OF CHARS PROCESSED           *//**********************************************/int hexToInt(char **ptr, int *intValue){    int numChars = 0;    int hexValue;    *intValue = 0;    while (**ptr)    {        hexValue = hex(**ptr);        if (hexValue >=0)        {            *intValue = (*intValue <<4) | hexValue;            numChars ++;        }        else            break;        (*ptr)++;    }    return (numChars);}/* * This function does all command procesing for interfacing to gdb. * * NOTE:  The INT nn instruction leaves the state of the interrupt *        enable flag UNCHANGED.  That means that when this routine *        is entered via a breakpoint (INT 3) instruction from code *        that has interrupts enabled, then interrupts will STILL BE *        enabled when this routine is entered.  The first thing that *        we do here is disable interrupts so as to prevent recursive *        entries and bothersome serial interrupts while we are *        trying to run the serial port in polled mode. * * For kernel version 2.1.xx the cli() actually gets a spin lock so * it is always necessary to do a restore_flags before returning * so as to let go of that lock. *//* 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];

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人免费视频一区| 久久国产精品区| 欧美一区二区三区公司| 色综合久久综合网97色综合| 午夜激情久久久| 337p日本欧洲亚洲大胆精品| 国产精品美女www爽爽爽| 97精品久久久午夜一区二区三区| 午夜国产不卡在线观看视频| 国产精品婷婷午夜在线观看| 欧美一区二区视频免费观看| 色综合一区二区三区| 国产精品国产三级国产有无不卡| 久久久久99精品国产片| 久久久www成人免费无遮挡大片| 精品av综合导航| 91在线码无精品| 成人av在线资源网| 国产综合色视频| 天天色天天操综合| 亚洲成人激情av| 亚洲精品国产一区二区精华液 | 日产国产高清一区二区三区| 国产精品你懂的| 国产欧美日韩视频在线观看| 日韩精品资源二区在线| 91精品欧美一区二区三区综合在 | 色老汉av一区二区三区| 麻豆91精品91久久久的内涵| 一区二区不卡在线视频 午夜欧美不卡在| 欧美成人精品高清在线播放| 日韩一二在线观看| 亚洲日本一区二区| 欧美性生活一区| 偷拍与自拍一区| 日韩成人av影视| 日本中文字幕一区| 欧美日韩综合一区| 国产乱人伦偷精品视频免下载| 色综合久久久久久久久| 欧美日韩国产一区| 久久亚区不卡日本| 亚洲人精品午夜| 视频在线观看91| 床上的激情91.| 欧美日韩精品是欧美日韩精品| 精品三级在线看| 亚洲欧美在线观看| 亚洲美腿欧美偷拍| 国产精品综合一区二区| 国产一区二区不卡老阿姨| www.亚洲激情.com| 26uuu成人网一区二区三区| 国产日韩一级二级三级| 中文字幕不卡在线| 亚洲国产视频a| 国产一区二区日韩精品| 欧美高清视频www夜色资源网| 日本vs亚洲vs韩国一区三区| 国产日韩av一区二区| 欧美视频精品在线观看| 国产女人18毛片水真多成人如厕| 伊人婷婷欧美激情| 国产乱码精品1区2区3区| 欧美日韩免费不卡视频一区二区三区| 日本一区二区成人| 久久精品国产一区二区| 欧美亚洲国产怡红院影院| 中文字幕欧美日韩一区| 日本欧美一区二区| 91精品办公室少妇高潮对白| 国产校园另类小说区| 免费欧美高清视频| 欧美性受xxxx| 亚洲欧美另类综合偷拍| 国产99久久久国产精品潘金 | 99riav一区二区三区| 日韩欧美一级二级三级| 香蕉av福利精品导航| 99精品国产热久久91蜜凸| 久久综合精品国产一区二区三区 | 亚洲综合色网站| 日韩一区二区三区视频| 亚洲午夜在线电影| 日韩欧美在线网站| 国产欧美一区二区在线| 日韩高清一级片| av网站一区二区三区| 久久色.com| 亚洲免费高清视频在线| 99久久99久久久精品齐齐| 久久99国产精品免费| 免费欧美高清视频| 91国产免费观看| 日韩视频在线一区二区| 亚洲欧洲日韩女同| 国产美女一区二区三区| 在线一区二区三区四区| 中文字幕永久在线不卡| 国产一区二区三区四| 欧美tickling挠脚心丨vk| 青青草97国产精品免费观看无弹窗版| 欧美揉bbbbb揉bbbbb| 亚洲国产精品久久久久秋霞影院| 免费成人美女在线观看| 日韩一二三区视频| 美女一区二区三区在线观看| 日韩精品一区二区三区视频在线观看 | 欧美国产日韩在线观看| 成人激情文学综合网| 中文一区二区在线观看| 欧美性猛片aaaaaaa做受| 日本成人中文字幕在线视频| 久久综合狠狠综合久久激情 | 欧美在线你懂得| 精品免费日韩av| 日韩激情中文字幕| 日韩一区二区精品葵司在线| 激情综合五月婷婷| 一区二区三区在线观看欧美| 久久精品国产亚洲aⅴ| 亚洲三级免费电影| 国产精品电影院| 99综合电影在线视频| 国产精品福利电影一区二区三区四区| 国产精品乡下勾搭老头1| 久久精品男人的天堂| 国模无码大尺度一区二区三区| 欧美大片顶级少妇| 久久精品国产久精国产| 欧美久久久久中文字幕| 岛国精品在线观看| 亚洲成人精品一区| 最近日韩中文字幕| 日韩精品一区二区三区在线观看| 国产麻豆日韩欧美久久| 中文字幕一区二区三区四区| 日韩视频一区二区三区| 99精品在线免费| 国产激情一区二区三区四区| 国产精品一区二区无线| 欧美另类高清zo欧美| 亚洲免费在线播放| 在线欧美日韩精品| 亚洲无人区一区| 91精品国产综合久久小美女| 经典一区二区三区| 中文字幕一区二区不卡| 欧美日韩精品是欧美日韩精品| 麻豆国产精品官网| 成人欧美一区二区三区黑人麻豆| 色av成人天堂桃色av| 亚洲一区二区三区四区在线免费观看| 337p亚洲精品色噜噜狠狠| 国产最新精品免费| 亚洲少妇30p| 欧美一二三区在线观看| 国产成人av电影| 一区二区三区资源| 日韩久久久精品| 国产69精品久久99不卡| 一区二区不卡在线视频 午夜欧美不卡在 | 波多野结衣中文一区| 一区二区三区在线播放| 91精品国产色综合久久久蜜香臀| 精品sm在线观看| 久久精品人人爽人人爽| 午夜视频一区在线观看| 高清国产一区二区| 97超碰欧美中文字幕| 91精品国产综合久久福利| 99国产精品久久久久| 欧美图区在线视频| 欧美大片拔萝卜| 国产精品网站在线观看| 国产午夜亚洲精品午夜鲁丝片| 国产精品初高中害羞小美女文| 国产精品久线观看视频| 尤物在线观看一区| 蜜臀a∨国产成人精品| 精品久久人人做人人爰| 欧美日韩你懂得| 成人免费视频一区| 日本在线播放一区二区三区| 国产精品女同一区二区三区| 狠狠色综合日日| 欧美三区免费完整视频在线观看| 欧美一区二区三区在线看| 久久精品男人的天堂| 亚洲一区二区三区自拍| 日韩av网站在线观看| 成人h动漫精品| 欧美午夜片在线观看| 久久精品日韩一区二区三区| 亚洲妇熟xx妇色黄| 成人白浆超碰人人人人| 日韩免费高清av| 亚洲成人精品影院| 欧美影片第一页| 偷窥国产亚洲免费视频|