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

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

?? remote.c

?? :本文首先描述了開放源碼的嵌入式硬件仿真環(huán)境SkyEye的總體架構(gòu)
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * taken from gdb/remote.c * * I am only interested in the write to memory stuff - everything else * has been ripped out * * all the copyright notices etc have been left in *//* enough so that it will compile */#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>/*nicked from gcc..*/#ifndef alloca#ifdef __GNUC__#define alloca __builtin_alloca#else /* not GNU C.  */#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)#include <alloca.h>#else /* not sparc */#if defined (MSDOS) && !defined (__TURBOC__)#include <malloc.h>#else /* not MSDOS, or __TURBOC__ */#if defined(_AIX)#include <malloc.h> #pragma alloca#else /* not MSDOS, __TURBOC__, or _AIX */#ifdef __hpux#endif /* __hpux */#endif /* not _AIX */#endif /* not MSDOS, or __TURBOC__ */#endif /* not sparc.  */#endif /* not GNU C.  */#ifdef __cplusplusextern "C" {#endif    void* alloca(size_t);#ifdef __cplusplus}#endif#endif /* alloca not defined.  */#include "serial.h"#include "error.h"#include "remote.h"#define REGISTER_BYTES 0#define fprintf_unfiltered fprintf#define fprintf_filtered fprintf#define fputs_unfiltered fputs#define fputs_filtered fputs#define fputc_unfiltered fputc#define fputc_filtered fputc#define printf_unfiltered printf#define printf_filtered printf#define puts_unfiltered puts#define puts_filtered puts#define putchar_unfiltered putchar#define putchar_filtered putchar#define fputstr_unfiltered(a,b,c) fputs((a), (c))#define gdb_stdlog stderr#define SERIAL_READCHAR(fd,timo)	serialreadchar((fd), (timo))#define SERIAL_WRITE(fd, addr, len)	serialwrite((fd), (addr), (len))#define error Error#define perror_with_name Perror#define gdb_flush fflush#define max(a,b) (((a)>(b))?(a):(b))#define min(a,b) (((a)<(b))?(a):(b))#define target_mourn_inferior() {}#define ULONGEST unsigned long#define CORE_ADDR unsigned longstatic int putpkt (char *);static int putpkt_binary(char *, int);static void getpkt (char *, int);static int remote_debug = 0, remote_register_buf_size = 0, watchdog = 0;int remote_desc = -1, remote_timeout = 10;static voidfputstrn_unfiltered(char *s, int n, int x, FILE *fp){    while (n-- > 0)	fputc(*s++, fp);}voidremote_reset(void){    SERIAL_WRITE(remote_desc, "+", 1);}voidremote_continue(void){    putpkt("c");}/* Remote target communications for serial-line targets in custom GDB protocol   Copyright 1988, 91, 92, 93, 94, 95, 96, 97, 98, 1999   Free Software Foundation, Inc.   This file is part of GDB.   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 of the License, 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.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place - Suite 330,   Boston, MA 02111-1307, USA.  *//* *INDENT-OFF* *//* Remote communication protocol.   A debug packet whose contents are <data>   is encapsulated for transmission in the form:	$ <data> # CSUM1 CSUM2	<data> must be ASCII alphanumeric and cannot include characters	'$' or '#'.  If <data> starts with two characters followed by	':', then the existing stubs interpret this as a sequence number.	CSUM1 and CSUM2 are ascii hex representation of an 8-bit	checksum of <data>, the most significant nibble is sent first.	the hex digits 0-9,a-f are used.   Receiver responds with:	+	- if CSUM is correct and ready for next packet	-	- if CSUM is incorrect   <data> is as follows:   Most values are encoded in ascii hex digits.  Signal numbers are according   to the numbering in target.h.	Request		Packet	set thread	Hct...		Set thread for subsequent operations.					c = 'c' for thread used in step and					continue; t... can be -1 for all					threads.					c = 'g' for thread used in other					operations.  If zero, pick a thread,					any thread.	reply		OK		for success			ENN		for an error.	read registers  g	reply		XX....X		Each byte of register data					is described by two hex digits.					Registers are in the internal order					for GDB, and the bytes in a register					are in the same order the machine uses.			or ENN		for an error.	write regs	GXX..XX		Each byte of register data					is described by two hex digits.	reply		OK		for success			ENN		for an error        write reg	Pn...=r...	Write register n... with value r...,					which contains two hex digits for each					byte in the register (target byte					order).	reply		OK		for success			ENN		for an error	(not supported by all stubs).	read mem	mAA..AA,LLLL	AA..AA is address, LLLL is length.	reply		XX..XX		XX..XX is mem contents					Can be fewer bytes than requested					if able to read only part of the data.			or ENN		NN is errno	write mem	MAA..AA,LLLL:XX..XX					AA..AA is address,					LLLL is number of bytes,					XX..XX is data	reply		OK		for success			ENN		for an error (this includes the case					where only part of the data was					written).        write mem       XAA..AA,LLLL:XX..XX         (binary)                       AA..AA is address,                                        LLLL is number of bytes,                                        XX..XX is binary data        reply           OK              for success                        ENN             for an error	continue	cAA..AA		AA..AA is address to resume					If AA..AA is omitted,					resume at same address.	step		sAA..AA		AA..AA is address to resume					If AA..AA is omitted,					resume at same address.	continue with	Csig;AA..AA	Continue with signal sig (hex signal	signal				number).  If ;AA..AA is omitted,					resume at same address.	step with	Ssig;AA..AA	Like 'C' but step not continue.	signal	last signal     ?               Reply the current reason for stopping.                                        This is the same reply as is generated					for step or cont : SAA where AA is the					signal number.	detach          D               Reply OK.	There is no immediate reply to step or cont.	The reply comes when the machine stops.	It is		SAA		AA is the signal number.	or...		TAAn...:r...;n...:r...;n...:r...;					AA = signal number					n... = register number (hex)					  r... = register contents					n... = `thread'					  r... = thread process ID.  This is						 a hex integer.					n... = other string not starting					    with valid hex digit.					  gdb should ignore this n,r pair					  and go on to the next.  This way					  we can extend the protocol.	or...		WAA		The process exited, and AA is					the exit status.  This is only					applicable for certains sorts of					targets.	or...		XAA		The process terminated with signal					AA.	or (obsolete)	NAA;tttttttt;dddddddd;bbbbbbbb					AA = signal number					tttttttt = address of symbol "_start"					dddddddd = base of data section					bbbbbbbb = base of bss  section.					Note: only used by Cisco Systems					targets.  The difference between this					reply and the "qOffsets" query is that					the 'N' packet may arrive spontaneously					whereas the 'qOffsets' is a query					initiated by the host debugger.        or...           OXX..XX	XX..XX  is hex encoding of ASCII data. This					can happen at any time while the					program is running and the debugger					should continue to wait for					'W', 'T', etc.	thread alive	TXX		Find out if the thread XX is alive.	reply		OK		thread is still alive			ENN		thread is dead	remote restart	RXX		Restart the remote server	extended ops 	!		Use the extended remote protocol.					Sticky -- only needs to be set once.	kill request	k	toggle debug	d		toggle debug flag (see 386 & 68k stubs)	reset		r		reset -- see sparc stub.	reserved	<other>		On other requests, the stub should					ignore the request and send an empty					response ($#<checksum>).  This way					we can extend the protocol and GDB					can tell whether the stub it is					talking to uses the old or the new.	search		tAA:PP,MM	Search backwards starting at address					AA for a match with pattern PP and					mask MM.  PP and MM are 4 bytes.					Not supported by all stubs.	general query	qXXXX		Request info about XXXX.	general set	QXXXX=yyyy	Set value of XXXX to yyyy.	query sect offs	qOffsets	Get section offsets.  Reply is					Text=xxx;Data=yyy;Bss=zzz	Responses can be run-length encoded to save space.  A '*' means that	the next character is an ASCII encoding giving a repeat count which	stands for that many repititions of the character preceding the '*'.	The encoding is n+29, yielding a printable character where n >=3	(which is where rle starts to win).  Don't use an n > 126.	So	"0* " means the same as "0000".  *//* *INDENT-ON* *//* This variable (available to the user via "set remotebinarydownload")   dictates whether downloads are sent in binary (via the 'X' packet).   We assume that the stub can, and attempt to do it. This will be cleared if   the stub does not understand it. This switch is still needed, though   in cases when the packet is supported in the stub, but the connection   does not allow it (i.e., 7-bit serial connection only). */static int remote_binary_download = 1;/* Have we already checked whether binary downloads work? */static int remote_binary_checked;/* Maximum number of bytes to read/write at once.  The value here   is chosen to fill up a packet (the headers account for the 32).  */#define MAXBUFBYTES(N) (((N)-32)/2)/* Having this larger than 400 causes us to be incompatible with m68k-stub.c   and i386-stub.c.  Normally, no one would notice because it only matters   for writing large chunks of memory (e.g. in downloads).  Also, this needs   to be more than 400 if required to hold the registers (see below, where   we round it up based on REGISTER_BYTES).  *//* Round up PBUFSIZ to hold all the registers, at least.  */#define	PBUFSIZ ((REGISTER_BYTES > MAXBUFBYTES (400)) \		 ? (REGISTER_BYTES * 2 + 32) \		 : 400)/* This variable sets the number of bytes to be written to the target   in a single packet.  Normally PBUFSIZ is satisfactory, but some   targets need smaller values (perhaps because the receiving end   is slow).  */static int remote_write_size = 0x7fffffff;/* This variable sets the number of bits in an address that are to be   sent in a memory ("M" or "m") packet.  Normally, after stripping   leading zeros, the entire address would be sent. This variable   restricts the address to REMOTE_ADDRESS_SIZE bits.  HISTORY: The   initial implementation of remote.c restricted the address sent in   memory packets to ``host::sizeof long'' bytes - (typically 32   bits).  Consequently, for 64 bit targets, the upper 32 bits of an   address was never sent.  Since fixing this bug may cause a break in   some remote targets this variable is principly provided to   facilitate backward compatibility. */static int remote_address_size;/* Convert hex digit A to a number.  */static intfromhex (int a){  if (a >= '0' && a <= '9')    return a - '0';  else if (a >= 'a' && a <= 'f')    return a - 'a' + 10;  else if (a >= 'A' && a <= 'F')    return a - 'A' + 10;  else {    error ("Reply contains invalid hex digit %d", a);    return -1;  }}/* Convert number NIB to a hex digit.  */static inttohex (int nib){  if (nib < 10)    return '0' + nib;  else    return 'a' + nib - 10;}/* Return the number of hex digits in num.  */static inthexnumlen (ULONGEST num){  int i;  for (i = 0; num != 0; i++)    num >>= 4;  return max (i, 1);}/* Set BUF to the hex digits representing NUM.  */static inthexnumstr (char *buf, ULONGEST num){  int i;  int len = hexnumlen (num);  buf[len] = '\0';  for (i = len - 1; i >= 0; i--)    {      buf[i] = "0123456789abcdef"[(num & 0xf)];      num >>= 4;    }  return len;}/* Mask all but the least significant REMOTE_ADDRESS_SIZE bits. */static CORE_ADDRremote_address_masked (CORE_ADDR addr){  if (remote_address_size > 0      && remote_address_size < (sizeof (ULONGEST) * 8))    {      /* Only create a mask when that mask can safely be constructed         in a ULONGEST variable. */      ULONGEST mask = 1;      mask = (mask << remote_address_size) - 1;      addr &= mask;    }  return addr;}/* Determine whether the remote target supports binary downloading.   This is accomplished by sending a no-op memory write of zero length   to the target at the specified address. It does not suffice to send   the whole packet, since many stubs strip the eighth bit and subsequently   compute a wrong checksum, which causes real havoc with remote_write_bytes.   NOTE: This can still lose if the serial line is not eight-bit clean. In   cases like this, the user should clear "remotebinarydownload". */static voidcheck_binary_download (CORE_ADDR addr){  if (remote_binary_download && !remote_binary_checked)    {      char *buf = alloca (PBUFSIZ);      char *p;      remote_binary_checked = 1;      p = buf;      *p++ = 'X';      p += hexnumstr (p, (ULONGEST) addr);      *p++ = ',';      p += hexnumstr (p, (ULONGEST) 0);      *p++ = ':';      *p = '\0';      putpkt_binary (buf, (int) (p - buf));      getpkt (buf, 0);      if (buf[0] == '\0')	remote_binary_download = 0;    }  if (remote_debug)    {      if (remote_binary_download)	fprintf_unfiltered (gdb_stdlog,			    "binary downloading suppported by target\n");      else	fprintf_unfiltered (gdb_stdlog,

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久这里只有精品视频网| 久久精品国产精品青草| 亚洲aaa精品| 捆绑紧缚一区二区三区视频| 国产一区二区按摩在线观看| 99精品热视频| 欧美精品123区| 久久婷婷成人综合色| 亚洲欧洲精品天堂一级 | 日本免费新一区视频| 精品一区二区三区的国产在线播放| 国产精品中文字幕欧美| 色8久久人人97超碰香蕉987| 欧美一卡在线观看| 国产精品久久毛片av大全日韩| 亚洲一区二区av电影| 久久爱www久久做| 99这里都是精品| 这里只有精品99re| 国产精品乱码一区二三区小蝌蚪| 亚洲国产日日夜夜| 国产精品一区二区久久精品爱涩 | 亚洲色图制服丝袜| 日本不卡的三区四区五区| 国产伦理精品不卡| 在线视频欧美精品| 精品国产麻豆免费人成网站| 亚洲日本乱码在线观看| 奇米影视在线99精品| 成人丝袜视频网| 5566中文字幕一区二区电影 | 一本色道久久加勒比精品 | 久久精品国产在热久久| 99久久久久久| 精品日产卡一卡二卡麻豆| 自拍偷在线精品自拍偷无码专区| 免费欧美在线视频| 在线亚洲+欧美+日本专区| 久久综合久久久久88| 亚洲成av人**亚洲成av**| 国产成人av电影在线播放| 欧美日韩一区二区在线观看| 国产三级久久久| 日产国产欧美视频一区精品| 91网站最新地址| 久久久久88色偷偷免费| 日韩高清在线观看| 在线亚洲一区二区| 国产精品妹子av| 韩国欧美国产1区| 欧美一级二级三级蜜桃| 一区二区三区四区中文字幕| 国产91富婆露脸刺激对白| 日韩女优电影在线观看| 亚洲大片免费看| 日本韩国欧美三级| 国产精品久久久久国产精品日日 | 精品国产亚洲在线| 日韩国产欧美在线观看| 色妹子一区二区| 亚洲欧洲av一区二区三区久久| 国内久久精品视频| 日韩小视频在线观看专区| 亚洲国产精品久久艾草纯爱| 91美女片黄在线观看| 国产精品网站在线观看| 国产麻豆一精品一av一免费| 日韩视频一区二区三区在线播放 | 色一区在线观看| 亚洲欧洲日产国码二区| 成人av影视在线观看| 欧美激情一区二区三区不卡| 国产制服丝袜一区| 26uuu色噜噜精品一区| 九九视频精品免费| 日韩免费高清av| 日本午夜一本久久久综合| 欧美三级电影网站| 亚洲综合丝袜美腿| 91福利在线观看| 亚洲黄色录像片| 欧美亚一区二区| 亚洲一区二区四区蜜桃| 欧美色视频在线| 三级不卡在线观看| 欧美一级日韩不卡播放免费| 青青草一区二区三区| 日韩精品在线一区二区| 国产在线国偷精品免费看| 久久人人97超碰com| 国产成人超碰人人澡人人澡| 中文字幕乱码日本亚洲一区二区 | 欧美电影精品一区二区| 国产在线视频一区二区| 久久久精品中文字幕麻豆发布| 国产成人在线视频免费播放| 中文字幕av资源一区| 91在线云播放| 亚洲午夜一区二区| 日韩一区二区影院| 国产一区二区不卡老阿姨| 国产女同性恋一区二区| av在线播放不卡| 一区二区三区欧美日韩| 欧美日韩三级一区二区| 久久99久久精品欧美| 亚洲国产高清在线观看视频| 日本高清不卡视频| 蜜桃av噜噜一区| 欧美国产综合一区二区| 在线看不卡av| 午夜久久福利影院| 欧美一级高清片| 麻豆国产欧美日韩综合精品二区 | 中文字幕欧美激情| 在线视频一区二区三| 日产欧产美韩系列久久99| 国产亚洲自拍一区| 94色蜜桃网一区二区三区| 天堂一区二区在线免费观看| 欧美精品一区视频| 91香蕉国产在线观看软件| 日本不卡视频在线观看| 欧美国产综合一区二区| 欧美日韩在线播| 国产乱对白刺激视频不卡| 国产成人午夜片在线观看高清观看| 国产欧美一区二区精品性色| 欧美在线你懂得| 国产美女娇喘av呻吟久久| 亚洲一区免费在线观看| 久久人人爽爽爽人久久久| 欧洲视频一区二区| 国产成人精品免费| 日韩av中文字幕一区二区三区| 麻豆精品视频在线观看免费| 中文字幕在线不卡一区二区三区| 欧美日韩大陆一区二区| 丁香激情综合国产| 日韩高清在线一区| 日韩伦理av电影| wwwwxxxxx欧美| 欧美图区在线视频| 成人中文字幕合集| 蜜臀av一区二区三区| ...中文天堂在线一区| 欧美成人国产一区二区| 色悠久久久久综合欧美99| 国产精品自产自拍| 偷窥国产亚洲免费视频| 亚洲欧洲日产国产综合网| 2020国产精品| 91精品国产色综合久久不卡蜜臀| 91在线观看地址| 国产传媒一区在线| 免费看日韩a级影片| 亚洲高清在线精品| 亚洲色图在线看| 国产欧美日本一区二区三区| 日韩一二三区不卡| 欧美日韩国产精品成人| av在线不卡电影| 国产成人夜色高潮福利影视| 日韩国产精品久久久| 亚洲午夜视频在线观看| 综合av第一页| 国产精品久久久久久久久搜平片 | 久久久精品天堂| 日韩欧美一区在线| 欧美人妇做爰xxxⅹ性高电影| 97久久精品人人做人人爽50路| 国产成人在线影院 | 日韩欧美一区二区不卡| 欧美视频第二页| 色av成人天堂桃色av| 成人aa视频在线观看| 国产99久久久久久免费看农村| 美女网站在线免费欧美精品| 日精品一区二区| 三级亚洲高清视频| 视频在线观看国产精品| 午夜精品福利在线| 午夜av电影一区| 图片区日韩欧美亚洲| 亚洲成av人综合在线观看| 亚洲一区欧美一区| 亚洲电影在线播放| 亚洲第一在线综合网站| 亚洲图片有声小说| 亚洲成av人片| 日本视频一区二区三区| 人人狠狠综合久久亚洲| 日本午夜精品视频在线观看| 日本aⅴ精品一区二区三区 | 777精品伊人久久久久大香线蕉| 欧美午夜电影在线播放| 欧美综合久久久| 欧美精品三级在线观看| 8v天堂国产在线一区二区| 日韩久久久精品|