1 /* Remote target communications for serial-line targets in custom GDB protocol
2 Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* Remote communication protocol.
22 A debug packet whose contents are <data>
23 is encapsulated for transmission in the form:
25 $ <data> # CSUM1 CSUM2
27 <data> must be ASCII alphanumeric and cannot include characters
30 CSUM1 and CSUM2 are ascii hex representation of an 8-bit
31 checksum of <data>, the most significant nibble is sent first.
32 the hex digits 0-9,a-f are used.
34 Receiver responds with:
36 + - if CSUM is correct and ready for next packet
37 - - if CSUM is incorrect
40 All values are encoded in ascii hex digits.
45 reply XX....X Each byte of register data
46 is described by two hex digits.
47 Registers are in the internal order
48 for GDB, and the bytes in a register
49 are in the same order the machine uses.
52 write regs GXX..XX Each byte of register data
53 is described by two hex digits.
57 read mem mAA..AA,LLLL AA..AA is address, LLLL is length.
58 reply XX..XX XX..XX is mem contents
59 Can be fewer bytes than requested
60 if able to read only part of the data.
63 write mem MAA..AA,LLLL:XX..XX
65 LLLL is number of bytes,
68 ENN for an error (this includes the case
69 where only part of the data was
72 cont cAA..AA AA..AA is address to resume
74 resume at same address.
76 step sAA..AA AA..AA is address to resume
78 resume at same address.
80 last signal ? Reply the current reason for stopping.
81 This is the same reply as is generated
82 for step or cont : SAA where AA is the
85 There is no immediate reply to step or cont.
86 The reply comes when the machine stops.
87 It is SAA AA is the "signal number"
89 or... TAAn...:r...;n:r...;n...:r...;
91 n... = register number
92 r... = register contents
93 or... WAA The process extited, and AA is
94 the exit status. This is only
95 applicable for certains sorts of
97 or... NAATT;DD;BB Relocate the object file.
102 This is used by the NLM stub,
103 which is why it only has three
104 addresses rather than one per
105 section: the NLM stub always
106 sees only three sections, even
107 though gdb may see more.
111 toggle debug d toggle debug flag (see 386 & 68k stubs)
112 reset r reset -- see sparc stub.
113 reserved <other> On other requests, the stub should
114 ignore the request and send an empty
115 response ($#<checksum>). This way
116 we can extend the protocol and GDB
117 can tell whether the stub it is
118 talking to uses the old or the new.
125 #include "inferior.h"
130 #include "terminal.h"
132 #include "objfiles.h"
133 #include "gdb-stabs.h"
137 #if !defined(DONT_USE_REMOTE)
139 #include <sys/types.h>
145 /* Prototypes for local functions */
148 remote_write_bytes
PARAMS ((CORE_ADDR memaddr
, unsigned char *myaddr
, int len
));
151 remote_read_bytes
PARAMS ((CORE_ADDR memaddr
, unsigned char *myaddr
, int len
));
154 remote_files_info
PARAMS ((struct target_ops
*ignore
));
157 remote_xfer_memory
PARAMS ((CORE_ADDR memaddr
, char *myaddr
, int len
,
158 int should_write
, struct target_ops
*target
));
161 remote_prepare_to_store
PARAMS ((void));
164 remote_fetch_registers
PARAMS ((int regno
));
167 remote_resume
PARAMS ((int pid
, int step
, int siggnal
));
170 remote_start_remote
PARAMS ((char *dummy
));
173 remote_open
PARAMS ((char *name
, int from_tty
));
176 remote_close
PARAMS ((int quitting
));
179 remote_store_registers
PARAMS ((int regno
));
182 getpkt
PARAMS ((char *buf
, int forever
));
185 putpkt
PARAMS ((char *buf
));
188 remote_send
PARAMS ((char *buf
));
191 readchar
PARAMS ((void));
194 remote_wait
PARAMS ((WAITTYPE
*status
));
197 tohex
PARAMS ((int nib
));
200 fromhex
PARAMS ((int a
));
203 remote_detach
PARAMS ((char *args
, int from_tty
));
206 remote_interrupt
PARAMS ((int signo
));
209 remote_interrupt_twice
PARAMS ((int signo
));
211 extern struct target_ops remote_ops
; /* Forward decl */
213 /* This was 5 seconds, which is a long time to sit and wait.
214 Unless this is going though some terminal server or multiplexer or
215 other form of hairy serial connection, I would think 2 seconds would
217 static int timeout
= 2;
223 /* Descriptor for I/O to remote machine. Initialize it to NULL so that
224 remote_open knows that we don't have a file open when the program
226 serial_t remote_desc
= NULL
;
230 /* Maximum number of bytes to read/write at once. The value here
231 is chosen to fill up a packet (the headers account for the 32). */
232 #define MAXBUFBYTES ((PBUFSIZ-32)/2)
234 /* Round up PBUFSIZ to hold all the registers, at least. */
235 #if REGISTER_BYTES > MAXBUFBYTES
237 #define PBUFSIZ (REGISTER_BYTES * 2 + 32)
240 /* Clean up connection to a remote debugger. */
244 remote_close (quitting
)
248 SERIAL_CLOSE (remote_desc
);
252 /* Stub for catch_errors. */
255 remote_start_remote (dummy
)
258 immediate_quit
= 1; /* Allow user to interrupt it */
260 /* Ack any packet which the remote side has already sent. */
261 /* I'm not sure this \r is needed; we don't use it any other time we
263 SERIAL_WRITE (remote_desc
, "+\r", 2);
264 putpkt ("?"); /* initiate a query from remote machine */
267 start_remote (); /* Initialize gdb process mechanisms */
271 /* Open a connection to a remote debugger.
272 NAME is the filename used for communication. */
274 static DCACHE
*remote_dcache
;
277 remote_open (name
, from_tty
)
283 "To open a remote debug connection, you need to specify what serial\n\
284 device is attached to the remote system (e.g. /dev/ttya).");
286 target_preopen (from_tty
);
288 unpush_target (&remote_ops
);
290 remote_dcache
= dcache_init (remote_read_bytes
, remote_write_bytes
);
292 remote_desc
= SERIAL_OPEN (name
);
294 perror_with_name (name
);
300 if (sscanf (baud_rate
, "%d", &rate
) == 1)
301 if (SERIAL_SETBAUDRATE (remote_desc
, rate
))
303 SERIAL_CLOSE (remote_desc
);
304 perror_with_name (name
);
308 SERIAL_RAW (remote_desc
);
312 puts_filtered ("Remote debugging using ");
313 puts_filtered (name
);
314 puts_filtered ("\n");
316 push_target (&remote_ops
); /* Switch to using remote target now */
318 /* Start the remote connection; if error (0), discard this target.
319 In particular, if the user quits, be sure to discard it
320 (we'd be in an inconsistent state otherwise). */
321 if (!catch_errors (remote_start_remote
, (char *)0,
322 "Couldn't establish connection to remote target\n", RETURN_MASK_ALL
))
327 takes a program previously attached to and detaches it.
328 We better not have left any breakpoints
329 in the program or it'll die when it hits one.
330 Close the open connection to the remote debugger.
331 Use this when you want to detach and do something else
335 remote_detach (args
, from_tty
)
340 error ("Argument given to \"detach\" when remotely debugging.");
344 puts_filtered ("Ending remote debugging.\n");
347 /* Convert hex digit A to a number. */
353 if (a
>= '0' && a
<= '9')
355 else if (a
>= 'a' && a
<= 'f')
358 error ("Reply contains invalid hex digit");
362 /* Convert number NIB to a hex digit. */
374 /* Tell the remote machine to resume. */
377 remote_resume (pid
, step
, siggnal
)
378 int pid
, step
, siggnal
;
385 target_terminal_ours_for_output ();
386 printf_filtered ("Can't send signals to a remote system. ");
387 name
= strsigno (siggnal
);
389 printf_filtered (name
);
391 printf_filtered ("Signal %d", siggnal
);
392 printf_filtered (" not sent.\n");
393 target_terminal_inferior ();
396 dcache_flush (remote_dcache
);
398 strcpy (buf
, step
? "s": "c");
403 /* Send ^C to target to halt it. Target will respond, and send us a
407 remote_interrupt (signo
)
410 /* If this doesn't work, try more severe steps. */
411 signal (signo
, remote_interrupt_twice
);
414 printf ("remote_interrupt called\n");
416 SERIAL_WRITE (remote_desc
, "\003", 1); /* Send a ^C */
419 static void (*ofunc
)();
421 /* The user typed ^C twice. */
423 remote_interrupt_twice (signo
)
426 signal (signo
, ofunc
);
428 target_terminal_ours ();
429 if (query ("Interrupted while waiting for the program.\n\
430 Give up (and stop debugging it)? "))
432 target_mourn_inferior ();
433 return_to_top_level (RETURN_QUIT
);
437 signal (signo
, remote_interrupt
);
438 target_terminal_inferior ();
442 /* Wait until the remote machine stops, then return,
443 storing status in STATUS just as `wait' would.
444 Returns "pid" (though it's not clear what, if anything, that
445 means in the case of this target). */
451 unsigned char buf
[PBUFSIZ
];
453 WSETEXIT ((*status
), 0);
459 ofunc
= (void (*)()) signal (SIGINT
, remote_interrupt
);
460 getpkt ((char *) buf
, 1);
461 signal (SIGINT
, ofunc
);
464 warning ("Remote failure reply: %s", buf
);
465 else if (buf
[0] == 'T')
469 char regs
[MAX_REGISTER_RAW_SIZE
];
471 /* Expedited reply, containing Signal, {regno, reg} repeat */
472 /* format is: 'Tssn...:r...;n...:r...;n...:r...;#cc', where
474 n... = register number
475 r... = register contents
478 p
= &buf
[3]; /* after Txx */
484 regno
= strtol (p
, &p1
, 16); /* Read the register number */
487 warning ("Remote sent badly formed register number: %s\nPacket: '%s'\n",
493 warning ("Malformed packet (missing colon): %s\nPacket: '%s'\n",
496 if (regno
>= NUM_REGS
)
497 warning ("Remote sent bad register number %d: %s\nPacket: '%s'\n",
500 for (i
= 0; i
< REGISTER_RAW_SIZE (regno
); i
++)
502 if (p
[0] == 0 || p
[1] == 0)
503 warning ("Remote reply is too short: %s", buf
);
504 regs
[i
] = fromhex (p
[0]) * 16 + fromhex (p
[1]);
509 warning ("Remote register badly formatted: %s", buf
);
511 supply_register (regno
, regs
);
515 else if (buf
[0] == 'N')
518 bfd_vma text_addr
, data_addr
, bss_addr
;
520 /* Relocate object file. Format is NAATT;DD;BB where AA is
521 the signal number, TT is the new text address, DD is the
522 new data address, and BB is the new bss address. This is
523 used by the NLM stub; gdb may see more sections. */
525 text_addr
= strtol (p
, &p1
, 16);
526 if (p1
== p
|| *p1
!= ';')
527 warning ("Malformed relocation packet: Packet '%s'", buf
);
529 data_addr
= strtol (p
, &p1
, 16);
530 if (p1
== p
|| *p1
!= ';')
531 warning ("Malformed relocation packet: Packet '%s'", buf
);
533 bss_addr
= strtol (p
, &p1
, 16);
535 warning ("Malformed relocation packet: Packet '%s'", buf
);
537 if (symfile_objfile
!= NULL
)
539 struct section_offsets
*offs
;
541 /* FIXME: Why don't the various symfile_offsets routines
542 in the sym_fns vectors set this? */
543 if (symfile_objfile
->num_sections
== 0)
544 symfile_objfile
->num_sections
= SECT_OFF_MAX
;
546 offs
= ((struct section_offsets
*)
547 alloca (sizeof (struct section_offsets
)
548 + (symfile_objfile
->num_sections
549 * sizeof (offs
->offsets
))));
550 memcpy (offs
, symfile_objfile
->section_offsets
,
551 (sizeof (struct section_offsets
)
552 + (symfile_objfile
->num_sections
553 * sizeof (offs
->offsets
))));
554 ANOFFSET (offs
, SECT_OFF_TEXT
) = text_addr
;
555 ANOFFSET (offs
, SECT_OFF_DATA
) = data_addr
;
556 ANOFFSET (offs
, SECT_OFF_BSS
) = bss_addr
;
558 objfile_relocate (symfile_objfile
, offs
);
562 else if (buf
[0] == 'W')
564 /* The remote process exited. */
565 WSETEXIT (*status
, (fromhex (buf
[1]) << 4) + fromhex (buf
[2]));
568 else if (buf
[0] == 'S')
571 warning ("Invalid remote reply: %s", buf
);
574 WSETSTOP ((*status
), (((fromhex (buf
[1])) << 4) + (fromhex (buf
[2]))));
579 /* Read the remote registers into the block REGS. */
580 /* Currently we just read all the registers, so we don't use regno. */
583 remote_fetch_registers (regno
)
589 char regs
[REGISTER_BYTES
];
594 /* Reply describes registers byte by byte, each byte encoded as two
595 hex characters. Suck them all up, then supply them to the
596 register cacheing/storage mechanism. */
599 for (i
= 0; i
< REGISTER_BYTES
; i
++)
601 if (p
[0] == 0 || p
[1] == 0)
602 error ("Remote reply is too short: %s", buf
);
603 regs
[i
] = fromhex (p
[0]) * 16 + fromhex (p
[1]);
606 for (i
= 0; i
< NUM_REGS
; i
++)
607 supply_register (i
, ®s
[REGISTER_BYTE(i
)]);
610 /* Prepare to store registers. Since we send them all, we have to
611 read out the ones we don't want to change first. */
614 remote_prepare_to_store ()
616 /* Make sure the entire registers array is valid. */
617 read_register_bytes (0, (char *)NULL
, REGISTER_BYTES
);
620 /* Store the remote registers from the contents of the block REGISTERS.
621 FIXME, eventually just store one register if that's all that is needed. */
625 remote_store_registers (regno
)
634 /* Command describes registers byte by byte,
635 each byte encoded as two hex characters. */
638 for (i
= 0; i
< REGISTER_BYTES
; i
++)
640 *p
++ = tohex ((registers
[i
] >> 4) & 0xf);
641 *p
++ = tohex (registers
[i
] & 0xf);
650 /* Use of the data cache is disabled because it loses for looking at
651 and changing hardware I/O ports and the like. Accepting `volatile'
652 would perhaps be one way to fix it, but a better way which would
653 win for more cases would be to use the executable file for the text
654 segment, like the `icache' code below but done cleanly (in some
655 target-independent place, perhaps in target_xfer_memory, perhaps
656 based on assigning each target a speed or perhaps by some simpler
659 /* Read a word from remote address ADDR and return it.
660 This goes through the data cache. */
663 remote_fetch_word (addr
)
669 extern CORE_ADDR text_start
, text_end
;
671 if (addr
>= text_start
&& addr
< text_end
)
674 xfer_core_file (addr
, &buffer
, sizeof (int));
679 return dcache_fetch (remote_dcache
, addr
);
682 /* Write a word WORD into remote address ADDR.
683 This goes through the data cache. */
686 remote_store_word (addr
, word
)
690 dcache_poke (remote_dcache
, addr
, word
);
694 /* Write memory data directly to the remote machine.
695 This does not inform the data cache; the data cache uses this.
696 MEMADDR is the address in the remote memory space.
697 MYADDR is the address of the buffer in our space.
698 LEN is the number of bytes.
700 Returns number of bytes transferred, or 0 for error. */
703 remote_write_bytes (memaddr
, myaddr
, len
)
705 unsigned char *myaddr
;
712 if (len
> PBUFSIZ
/ 2 - 20)
715 sprintf (buf
, "M%x,%x:", memaddr
, len
);
717 /* We send target system values byte by byte, in increasing byte addresses,
718 each byte encoded as two hex characters. */
720 p
= buf
+ strlen (buf
);
721 for (i
= 0; i
< len
; i
++)
723 *p
++ = tohex ((myaddr
[i
] >> 4) & 0xf);
724 *p
++ = tohex (myaddr
[i
] & 0xf);
733 /* There is no correspondance between what the remote protocol uses
734 for errors and errno codes. We would like a cleaner way of
735 representing errors (big enough to include errno codes, bfd_error
736 codes, and others). But for now just return EIO. */
743 /* Read memory data directly from the remote machine.
744 This does not use the data cache; the data cache uses this.
745 MEMADDR is the address in the remote memory space.
746 MYADDR is the address of the buffer in our space.
747 LEN is the number of bytes.
749 Returns number of bytes transferred, or 0 for error. */
752 remote_read_bytes (memaddr
, myaddr
, len
)
754 unsigned char *myaddr
;
761 if (len
> PBUFSIZ
/ 2 - 1)
764 sprintf (buf
, "m%x,%x", memaddr
, len
);
770 /* There is no correspondance between what the remote protocol uses
771 for errors and errno codes. We would like a cleaner way of
772 representing errors (big enough to include errno codes, bfd_error
773 codes, and others). But for now just return EIO. */
778 /* Reply describes memory byte by byte,
779 each byte encoded as two hex characters. */
782 for (i
= 0; i
< len
; i
++)
784 if (p
[0] == 0 || p
[1] == 0)
785 /* Reply is short. This means that we were able to read only part
786 of what we wanted to. */
788 myaddr
[i
] = fromhex (p
[0]) * 16 + fromhex (p
[1]);
794 /* Read or write LEN bytes from inferior memory at MEMADDR, transferring
795 to or from debugger address MYADDR. Write to inferior if SHOULD_WRITE is
796 nonzero. Returns length of data written or read; 0 for error. */
800 remote_xfer_memory(memaddr
, myaddr
, len
, should_write
, target
)
805 struct target_ops
*target
; /* ignored */
809 int total_xferred
= 0;
813 if (len
> MAXBUFBYTES
)
814 xfersize
= MAXBUFBYTES
;
819 bytes_xferred
= remote_write_bytes (memaddr
, myaddr
, xfersize
);
821 bytes_xferred
= remote_read_bytes (memaddr
, myaddr
, xfersize
);
823 /* If we get an error, we are done xferring. */
824 if (bytes_xferred
== 0)
827 memaddr
+= bytes_xferred
;
828 myaddr
+= bytes_xferred
;
829 len
-= bytes_xferred
;
830 total_xferred
+= bytes_xferred
;
832 return total_xferred
;
836 remote_files_info (ignore
)
837 struct target_ops
*ignore
;
839 puts_filtered ("Debugging a target over a serial line.\n");
842 /* Stuff for dealing with the packets which are part of this protocol.
843 See comment at top of file for details. */
845 /* Read a single character from the remote end, masking it down to 7 bits. */
852 ch
= SERIAL_READCHAR (remote_desc
, timeout
);
860 /* Send the command in BUF to the remote machine,
861 and read the reply into BUF.
862 Report an error if we get an error reply. */
873 error ("Remote failure reply: %s", buf
);
876 /* Send a packet to the remote machine, with error checking.
877 The data of the packet is in BUF. */
884 unsigned char csum
= 0;
886 int cnt
= strlen (buf
);
890 /* Copy the packet into buffer BUF2, encapsulating it
891 and giving it a checksum. */
893 if (cnt
> sizeof(buf2
) - 5) /* Prosanity check */
899 for (i
= 0; i
< cnt
; i
++)
905 *p
++ = tohex ((csum
>> 4) & 0xf);
906 *p
++ = tohex (csum
& 0xf);
908 /* Send it over and over until we get a positive ack. */
915 printf ("Sending packet: %s...", buf2
); fflush(stdout
);
917 if (SERIAL_WRITE (remote_desc
, buf2
, p
- buf2
))
918 perror_with_name ("putpkt: write failed");
920 /* read until either a timeout occurs (-2) or '+' is read */
932 break; /* Retransmit buffer */
934 perror_with_name ("putpkt: couldn't read ACK");
936 error ("putpkt: EOF while trying to read ACK");
939 printf ("%02X %c ", ch
&0xFF, ch
);
942 break; /* Here to retransmit */
947 /* Read a packet from the remote machine, with error checking,
948 and store it in BUF. BUF is expected to be of size PBUFSIZ.
949 If FOREVER, wait forever rather than timing out; this is used
950 while the target is executing user code. */
953 getpkt (buf
, forever
)
960 unsigned char c1
, c2
;
962 #define MAX_RETRIES 10
966 /* This can loop forever if the remote side sends us characters
967 continuously, but if it pauses, we'll get a zero from readchar
968 because of timeout. Then we'll count that as a retry. */
971 if (c
> 0 && c
!= '$')
974 if (c
== SERIAL_TIMEOUT
)
978 if (++retries
>= MAX_RETRIES
)
979 if (remote_debug
) puts_filtered ("Timed out.\n");
984 error ("Remote connection closed");
985 if (c
== SERIAL_ERROR
)
986 perror_with_name ("Remote communication error");
988 /* Force csum to be zero here because of possible error retry. */
995 if (c
== SERIAL_TIMEOUT
)
998 puts_filtered ("Timeout in mid-packet, retrying\n");
999 goto whole
; /* Start a new packet, count retries */
1004 puts_filtered ("Saw new packet start in middle of old one\n");
1005 goto whole
; /* Start a new packet, count retries */
1009 if (bp
>= buf
+PBUFSIZ
-1)
1012 puts_filtered ("Remote packet too long: ");
1013 puts_filtered (buf
);
1014 puts_filtered ("\n");
1022 c1
= fromhex (readchar ());
1023 c2
= fromhex (readchar ());
1024 if ((csum
& 0xff) == (c1
<< 4) + c2
)
1026 printf_filtered ("Bad checksum, sentsum=0x%x, csum=0x%x, buf=",
1027 (c1
<< 4) + c2
, csum
& 0xff);
1028 puts_filtered (buf
);
1029 puts_filtered ("\n");
1031 /* Try the whole thing again. */
1033 if (++retries
< MAX_RETRIES
)
1035 SERIAL_WRITE (remote_desc
, "-", 1);
1039 printf ("Ignoring packet error, continuing...\n");
1046 SERIAL_WRITE (remote_desc
, "+", 1);
1049 fprintf (stderr
,"Packet received: %s\n", buf
);
1056 /* Don't wait for it to die. I'm not really sure it matters whether
1057 we do or not. For the existing stubs, kill is a noop. */
1058 target_mourn_inferior ();
1064 unpush_target (&remote_ops
);
1065 generic_mourn_inferior ();
1068 #ifdef REMOTE_BREAKPOINT
1070 /* On some machines, e.g. 68k, we may use a different breakpoint instruction
1071 than other targets. */
1072 static unsigned char break_insn
[] = REMOTE_BREAKPOINT
;
1074 /* Check that it fits in BREAKPOINT_MAX bytes. */
1075 static unsigned char check_break_insn_size
[BREAKPOINT_MAX
] = REMOTE_BREAKPOINT
;
1077 #else /* No REMOTE_BREAKPOINT. */
1079 /* Same old breakpoint instruction. This code does nothing different
1080 than mem-break.c. */
1081 static unsigned char break_insn
[] = BREAKPOINT
;
1083 #endif /* No REMOTE_BREAKPOINT. */
1085 /* Insert a breakpoint on targets that don't have any better breakpoint
1086 support. We read the contents of the target location and stash it,
1087 then overwrite it with a breakpoint instruction. ADDR is the target
1088 location in the target machine. CONTENTS_CACHE is a pointer to
1089 memory allocated for saving the target contents. It is guaranteed
1090 by the caller to be long enough to save sizeof BREAKPOINT bytes (this
1091 is accomplished via BREAKPOINT_MAX). */
1094 remote_insert_breakpoint (addr
, contents_cache
)
1096 char *contents_cache
;
1100 val
= target_read_memory (addr
, contents_cache
, sizeof break_insn
);
1103 val
= target_write_memory (addr
, (char *)break_insn
, sizeof break_insn
);
1109 remote_remove_breakpoint (addr
, contents_cache
)
1111 char *contents_cache
;
1113 return target_write_memory (addr
, contents_cache
, sizeof break_insn
);
1116 /* Define the target subroutine names */
1118 struct target_ops remote_ops
= {
1119 "remote", /* to_shortname */
1120 "Remote serial target in gdb-specific protocol", /* to_longname */
1121 "Use a remote computer via a serial line, using a gdb-specific protocol.\n\
1122 Specify the serial device it is connected to (e.g. /dev/ttya).", /* to_doc */
1123 remote_open
, /* to_open */
1124 remote_close
, /* to_close */
1125 NULL
, /* to_attach */
1126 remote_detach
, /* to_detach */
1127 remote_resume
, /* to_resume */
1128 remote_wait
, /* to_wait */
1129 remote_fetch_registers
, /* to_fetch_registers */
1130 remote_store_registers
, /* to_store_registers */
1131 remote_prepare_to_store
, /* to_prepare_to_store */
1132 remote_xfer_memory
, /* to_xfer_memory */
1133 remote_files_info
, /* to_files_info */
1135 remote_insert_breakpoint
, /* to_insert_breakpoint */
1136 remote_remove_breakpoint
, /* to_remove_breakpoint */
1138 NULL
, /* to_terminal_init */
1139 NULL
, /* to_terminal_inferior */
1140 NULL
, /* to_terminal_ours_for_output */
1141 NULL
, /* to_terminal_ours */
1142 NULL
, /* to_terminal_info */
1143 remote_kill
, /* to_kill */
1144 generic_load
, /* to_load */
1145 NULL
, /* to_lookup_symbol */
1146 NULL
, /* to_create_inferior */
1147 remote_mourn
, /* to_mourn_inferior */
1149 0, /* to_notice_signals */
1150 process_stratum
, /* to_stratum */
1152 1, /* to_has_all_memory */
1153 1, /* to_has_memory */
1154 1, /* to_has_stack */
1155 1, /* to_has_registers */
1156 1, /* to_has_execution */
1157 NULL
, /* sections */
1158 NULL
, /* sections_end */
1159 OPS_MAGIC
/* to_magic */
1163 _initialize_remote ()
1165 add_target (&remote_ops
);
This page took 0.054996 seconds and 4 git commands to generate.