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

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

?? remote.c

?? arm的bootloader代碼,很詳細(xì)
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* * 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,

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品视频第一区| 亚洲黄一区二区三区| 91麻豆免费看片| proumb性欧美在线观看| 不卡电影一区二区三区| 国产成人免费网站| 成人av在线电影| 91欧美一区二区| 欧美日免费三级在线| 欧美裸体bbwbbwbbw| 欧美一区二区在线免费播放| 精品综合免费视频观看| 日本精品一区二区三区高清| 成人a区在线观看| 成人午夜av电影| 色欲综合视频天天天| 欧美精品第1页| 精品美女一区二区| 欧美国产综合一区二区| 亚洲日本在线看| 免费观看日韩av| 成人免费视频播放| 欧美男男青年gay1069videost| 91精品国产免费久久综合| 精品入口麻豆88视频| 狠狠色综合色综合网络| 夜夜操天天操亚洲| 亚洲成人精品影院| 国产精品一区二区在线看| 成人精品亚洲人成在线| 欧美色中文字幕| 久久综合久久久久88| 亚洲欧美日韩中文播放| 久草热8精品视频在线观看| 97国产一区二区| 日韩色视频在线观看| 最新国产精品久久精品| 日本aⅴ亚洲精品中文乱码| 99久久亚洲一区二区三区青草 | 国产精品一区2区| 99麻豆久久久国产精品免费| 欧美一区二区三区的| 中文字幕一区二| 成人高清免费观看| 91久久国产综合久久| 欧美一区二区三区播放老司机| 久久精品综合网| 亚洲第四色夜色| 91在线porny国产在线看| 精品日韩一区二区| 五月婷婷欧美视频| 在线欧美日韩精品| 国产精品久久久久久久久搜平片| 免费在线观看一区| 欧美午夜精品久久久久久孕妇| 中文字幕一区二区三| 国产成人精品亚洲午夜麻豆| 精品三级在线观看| 日本色综合中文字幕| 午夜精品影院在线观看| 波多野结衣精品在线| 337p粉嫩大胆色噜噜噜噜亚洲| 午夜激情一区二区三区| 色狠狠色狠狠综合| 成人免费在线视频| 福利一区二区在线观看| 中文乱码免费一区二区| 粉嫩av一区二区三区粉嫩 | 亚洲欧美二区三区| 麻豆精品精品国产自在97香蕉| 欧美精品三级日韩久久| 一区二区三区在线观看动漫| 91麻豆精品在线观看| 亚洲精品中文字幕在线观看| 91尤物视频在线观看| 一区二区三区在线视频免费观看 | 亚洲国产精品一区二区久久| 色综合久久久久网| 亚洲成人免费视频| av在线播放成人| 国产精品久久久久久久久动漫| 国产成人高清视频| 中文字幕一区av| 色94色欧美sute亚洲线路二| 一区二区三区日韩精品| 欧美日韩另类一区| 久久成人免费网站| 日本一二三四高清不卡| 91欧美一区二区| 午夜激情综合网| 欧美精品一区二区在线观看| 国产一区二三区| 久久精品亚洲国产奇米99| 成人免费毛片app| 一区二区三区中文在线| 欧美妇女性影城| 韩国欧美国产1区| 国产精品成人网| 91国偷自产一区二区三区观看| 亚洲国产精品久久久久婷婷884 | 日韩中文欧美在线| 精品国产乱码久久| 日本一区二区三区电影| 中文av一区二区| 在线一区二区三区做爰视频网站| 亚洲一区二区视频在线观看| 欧美一区二区在线不卡| 福利一区二区在线| 亚洲aaa精品| 中文成人av在线| 91精品国产综合久久国产大片| 国产一区中文字幕| 亚洲观看高清完整版在线观看| 精品99久久久久久| 欧美伊人久久久久久久久影院 | 欧美视频你懂的| 国产成人亚洲综合a∨猫咪 | 精品电影一区二区三区| 91亚洲男人天堂| 国产一区二区三区四区在线观看| 亚洲老妇xxxxxx| 日韩av网站在线观看| 精品久久免费看| 色婷婷激情一区二区三区| 日本少妇一区二区| 尤物视频一区二区| 国产精品色噜噜| 欧美大片国产精品| 欧美片网站yy| 欧美色精品在线视频| 波多野结衣精品在线| 国产精品18久久久久久vr| 日本不卡高清视频| 亚洲国产精品一区二区www在线 | 五月天一区二区三区| 亚洲视频一区二区在线| 国产精品美女久久久久aⅴ| 337p粉嫩大胆色噜噜噜噜亚洲 | 欧美伊人久久久久久午夜久久久久| 亚洲一区二区综合| 亚洲欧美激情小说另类| 国产日产欧美一区| 日韩欧美一区在线| 欧美日韩综合在线免费观看| 国产酒店精品激情| 国产最新精品免费| 国产一区二区影院| 国内精品不卡在线| 国产精品99久久久久久有的能看 | 欧美中文字幕一区| 欧洲亚洲国产日韩| 欧美日韩高清在线播放| 欧美吞精做爰啪啪高潮| 欧美日韩精品一区二区三区蜜桃| 欧美在线三级电影| 欧美嫩在线观看| 日韩欧美中文字幕制服| 欧美一级高清大全免费观看| 精品少妇一区二区三区 | 色哟哟一区二区三区| 91麻豆免费观看| 日本高清不卡视频| 久久97超碰国产精品超碰| 欧美在线观看一区| 91高清视频免费看| 欧美日韩和欧美的一区二区| 欧美三电影在线| 日韩一区二区中文字幕| 久久久久久久性| 亚洲日韩欧美一区二区在线| 亚洲国产成人porn| 理论片日本一区| 成人精品高清在线| 欧美性生活久久| 欧美一级精品大片| 国产精品初高中害羞小美女文| 一区二区在线观看免费视频播放| 亚洲成年人网站在线观看| 久久99国产精品成人| 91亚洲男人天堂| 日韩一区二区三区四区| 国产精品国产三级国产| 日韩一区精品视频| 另类中文字幕网| 成人av资源在线观看| 91麻豆精品国产自产在线| 日本一区二区成人| 日韩精品免费视频人成| 成人午夜av影视| 日韩欧美在线影院| 亚洲天堂av一区| 日韩中文字幕区一区有砖一区| 国产在线播放一区三区四| 99久久99久久精品免费观看| 日韩一卡二卡三卡| 亚洲图片另类小说| 天天综合天天做天天综合| 日本欧美一区二区三区乱码| 99久久久久久99| 国产日韩欧美在线一区|