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

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

?? remote.c

?? arm的bootloader代碼,很詳細(xì)
?? 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一区二区三区免费野_久草精品视频
国产成人午夜电影网| 日韩精品1区2区3区| 欧美精品一区男女天堂| 欧美日韩精品一区二区在线播放| 在线观看免费成人| 欧美主播一区二区三区美女| 欧美日韩一区成人| 欧美久久一二三四区| 日韩一区二区三区四区| 日韩一区二区三免费高清| 日韩一区二区免费在线观看| 精品处破学生在线二十三| 久久久99精品久久| 中文字幕在线不卡一区| 亚洲激情综合网| 亚洲一区二区三区影院| 蜜臀91精品一区二区三区| 国内成人自拍视频| fc2成人免费人成在线观看播放 | 夜色激情一区二区| 污片在线观看一区二区| 久久99精品视频| 99久久免费视频.com| 欧美日韩国产一区| 久久精品夜夜夜夜久久| 亚洲精品免费看| 蜜桃av一区二区| 国产成人在线视频网站| 日本久久一区二区三区| 日韩一二在线观看| 亚洲色图视频网站| 蜜臀久久99精品久久久久宅男| 国产精品一卡二| 欧美色窝79yyyycom| 久久精品日产第一区二区三区高清版| 综合激情成人伊人| 美国欧美日韩国产在线播放| 国产成人在线电影| 在线观看国产91| 日韩一区二区在线观看视频| 亚洲视频综合在线| 国产一区在线看| 欧美亚洲综合一区| 国产精品久久久久久妇女6080| 亚洲一区日韩精品中文字幕| 国产高清久久久久| 欧美一级欧美三级在线观看| 亚洲日本在线看| 国产在线国偷精品产拍免费yy| 91国内精品野花午夜精品| 日韩欧美激情一区| 亚洲成年人网站在线观看| av电影在线观看完整版一区二区| 欧美一区二区网站| 亚洲一二三级电影| 91丨porny丨首页| 国产精品欧美精品| 国产成人精品三级| 亚洲精品在线三区| 久久精品久久综合| 欧美人体做爰大胆视频| 亚洲精品成人在线| 欧美专区亚洲专区| 亚洲在线视频网站| 在线一区二区视频| 亚洲欧美成人一区二区三区| 国产激情一区二区三区桃花岛亚洲| 日韩亚洲国产中文字幕欧美| 亚洲成av人片观看| 欧美亚一区二区| 亚洲国产一区二区三区青草影视| 一本色道亚洲精品aⅴ| 国产欧美日韩不卡免费| 成人性生交大片免费看视频在线 | 国产日本欧美一区二区| 国内外成人在线| 久久久蜜桃精品| 成人亚洲一区二区一| 国产精品久久久久久亚洲毛片 | 亚洲精品成人a在线观看| 色婷婷久久久亚洲一区二区三区| 亚洲欧美日韩综合aⅴ视频| 99国产精品久| 亚洲综合色婷婷| 欧美精品久久久久久久多人混战 | 日本vs亚洲vs韩国一区三区二区| 欧美三级在线看| 麻豆免费精品视频| 精品国产3级a| 日本视频免费一区| 国产女同性恋一区二区| 国产伦精品一区二区三区在线观看| 69堂成人精品免费视频| 久久机这里只有精品| 久久综合九色综合97_久久久| 国产一区二区三区免费观看| 国产欧美日韩综合| 色琪琪一区二区三区亚洲区| 丝袜美腿亚洲综合| 久久网站最新地址| 91视频在线看| 欧美日韩精品专区| 国内成人自拍视频| 亚洲美女少妇撒尿| 欧美大片在线观看| av在线不卡网| 偷拍与自拍一区| 久久久一区二区| 色偷偷成人一区二区三区91 | 国产99精品在线观看| 亚洲日本成人在线观看| 777午夜精品视频在线播放| 国产成人在线网站| 午夜电影网亚洲视频| 国产欧美日韩中文久久| 欧美久久一区二区| 91亚洲男人天堂| 精品一二三四区| 亚洲女人的天堂| 337p粉嫩大胆色噜噜噜噜亚洲 | 欧美成人高清电影在线| av不卡一区二区三区| 久久99国产精品久久99| 一区二区激情视频| 欧美国产97人人爽人人喊| 制服丝袜国产精品| 色94色欧美sute亚洲线路二| 国产精品亚洲а∨天堂免在线| 亚洲一区二区三区四区中文字幕| 欧美激情一区在线观看| 精品国产91九色蝌蚪| 欧美一区二区三区在线视频| 在线免费观看一区| 成人的网站免费观看| 国产一二精品视频| 久久成人免费日本黄色| 天天操天天色综合| 亚洲国产一区二区三区青草影视| 国产日韩精品一区二区三区| 欧美mv日韩mv亚洲| 日韩一区二区三区三四区视频在线观看| 国产999精品久久久久久| 九九国产精品视频| 免费成人在线播放| 青青草成人在线观看| 天堂久久久久va久久久久| 亚洲成人你懂的| 午夜视频在线观看一区| 天天综合网 天天综合色| 亚洲一区自拍偷拍| 亚洲国产一区视频| 亚洲地区一二三色| 午夜av电影一区| 日本最新不卡在线| 毛片av一区二区| 麻豆精品在线观看| 久久99精品久久久久婷婷| 青青草国产精品亚洲专区无| 九色综合国产一区二区三区| 国产一区二区三区四区在线观看| 国内欧美视频一区二区| 国产精品888| eeuss鲁片一区二区三区在线观看| 不卡av免费在线观看| 色88888久久久久久影院按摩| 在线观看亚洲精品| 日韩一级片网址| 久久久一区二区| 亚洲三级在线观看| 日韩主播视频在线| 国产一区二区三区蝌蚪| 国产白丝网站精品污在线入口| 国产suv精品一区二区三区| 色综合久久综合中文综合网| 欧美日韩在线三区| 久久久影视传媒| 亚洲欧美另类久久久精品| 日本视频免费一区| 成人国产精品免费观看| 欧美日本精品一区二区三区| 日韩午夜激情电影| 国产精品久久久久久福利一牛影视 | 日韩理论片中文av| 亚洲午夜久久久久| 精品一区二区三区免费毛片爱| 成人高清伦理免费影院在线观看| 欧美日韩一区在线观看| 久久久久久久久久久久久久久99| 国产精品美女视频| 午夜精品久久久| 国产成人在线免费| 欧美精品在线视频| 国产精品久久久久婷婷二区次| 一二三四区精品视频| 国产精品影视在线| 欧美久久久久久久久久| 国产精品传媒在线| 国产在线精品一区二区三区不卡| 91九色02白丝porn| 欧美高清在线一区二区|