gdb/gdbserver/
[deliverable/binutils-gdb.git] / gdb / gdbserver / server.c
1 /* Main code for remote server for GDB.
2 Copyright (C) 1989, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
3 2005, 2006
4 Free Software Foundation, Inc.
5
6 This file is part of GDB.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
22
23 #include "server.h"
24
25 #include <unistd.h>
26 #include <signal.h>
27 #if HAVE_SYS_WAIT_H
28 #include <sys/wait.h>
29 #endif
30
31 unsigned long cont_thread;
32 unsigned long general_thread;
33 unsigned long step_thread;
34 unsigned long thread_from_wait;
35 unsigned long old_thread_from_wait;
36 int extended_protocol;
37 int server_waiting;
38
39 jmp_buf toplevel;
40
41 /* The PID of the originally created or attached inferior. Used to
42 send signals to the process when GDB sends us an asynchronous interrupt
43 (user hitting Control-C in the client), and to wait for the child to exit
44 when no longer debugging it. */
45
46 unsigned long signal_pid;
47
48 #ifdef SIGTTOU
49 /* A file descriptor for the controlling terminal. */
50 int terminal_fd;
51
52 /* TERMINAL_FD's original foreground group. */
53 pid_t old_foreground_pgrp;
54
55 /* Hand back terminal ownership to the original foreground group. */
56
57 static void
58 restore_old_foreground_pgrp (void)
59 {
60 tcsetpgrp (terminal_fd, old_foreground_pgrp);
61 }
62 #endif
63
64 static int
65 start_inferior (char *argv[], char *statusptr)
66 {
67 #ifdef SIGTTOU
68 signal (SIGTTOU, SIG_DFL);
69 signal (SIGTTIN, SIG_DFL);
70 #endif
71
72 signal_pid = create_inferior (argv[0], argv);
73
74 fprintf (stderr, "Process %s created; pid = %ld\n", argv[0],
75 signal_pid);
76 fflush (stderr);
77
78 #ifdef SIGTTOU
79 signal (SIGTTOU, SIG_IGN);
80 signal (SIGTTIN, SIG_IGN);
81 terminal_fd = fileno (stderr);
82 old_foreground_pgrp = tcgetpgrp (terminal_fd);
83 tcsetpgrp (terminal_fd, signal_pid);
84 atexit (restore_old_foreground_pgrp);
85 #endif
86
87 /* Wait till we are at 1st instruction in program, return signal number. */
88 return mywait (statusptr, 0);
89 }
90
91 static int
92 attach_inferior (int pid, char *statusptr, int *sigptr)
93 {
94 /* myattach should return -1 if attaching is unsupported,
95 0 if it succeeded, and call error() otherwise. */
96
97 if (myattach (pid) != 0)
98 return -1;
99
100 fprintf (stderr, "Attached; pid = %d\n", pid);
101 fflush (stderr);
102
103 /* FIXME - It may be that we should get the SIGNAL_PID from the
104 attach function, so that it can be the main thread instead of
105 whichever we were told to attach to. */
106 signal_pid = pid;
107
108 *sigptr = mywait (statusptr, 0);
109
110 /* GDB knows to ignore the first SIGSTOP after attaching to a running
111 process using the "attach" command, but this is different; it's
112 just using "target remote". Pretend it's just starting up. */
113 if (*statusptr == 'T' && *sigptr == TARGET_SIGNAL_STOP)
114 *sigptr = TARGET_SIGNAL_TRAP;
115
116 return 0;
117 }
118
119 extern int remote_debug;
120
121 /* Decode a qXfer read request. Return 0 if everything looks OK,
122 or -1 otherwise. */
123
124 static int
125 decode_xfer_read (char *buf, char **annex, CORE_ADDR *ofs, unsigned int *len)
126 {
127 /* Extract and NUL-terminate the annex. */
128 *annex = buf;
129 while (*buf && *buf != ':')
130 buf++;
131 if (*buf == '\0')
132 return -1;
133 *buf++ = 0;
134
135 /* After the read/write marker and annex, qXfer looks like a
136 traditional 'm' packet. */
137 decode_m_packet (buf, ofs, len);
138
139 return 0;
140 }
141
142 /* Write the response to a successful qXfer read. Returns the
143 length of the (binary) data stored in BUF, corresponding
144 to as much of DATA/LEN as we could fit. IS_MORE controls
145 the first character of the response. */
146 static int
147 write_qxfer_response (char *buf, unsigned char *data, int len, int is_more)
148 {
149 int out_len;
150
151 if (is_more)
152 buf[0] = 'm';
153 else
154 buf[0] = 'l';
155
156 return remote_escape_output (data, len, (unsigned char *) buf + 1, &out_len,
157 PBUFSIZ - 2) + 1;
158 }
159
160 /* Handle all of the extended 'q' packets. */
161 void
162 handle_query (char *own_buf, int *new_packet_len_p)
163 {
164 static struct inferior_list_entry *thread_ptr;
165
166 if (strcmp ("qSymbol::", own_buf) == 0)
167 {
168 if (the_target->look_up_symbols != NULL)
169 (*the_target->look_up_symbols) ();
170
171 strcpy (own_buf, "OK");
172 return;
173 }
174
175 if (strcmp ("qfThreadInfo", own_buf) == 0)
176 {
177 thread_ptr = all_threads.head;
178 sprintf (own_buf, "m%x", thread_to_gdb_id ((struct thread_info *)thread_ptr));
179 thread_ptr = thread_ptr->next;
180 return;
181 }
182
183 if (strcmp ("qsThreadInfo", own_buf) == 0)
184 {
185 if (thread_ptr != NULL)
186 {
187 sprintf (own_buf, "m%x", thread_to_gdb_id ((struct thread_info *)thread_ptr));
188 thread_ptr = thread_ptr->next;
189 return;
190 }
191 else
192 {
193 sprintf (own_buf, "l");
194 return;
195 }
196 }
197
198 if (the_target->read_offsets != NULL
199 && strcmp ("qOffsets", own_buf) == 0)
200 {
201 CORE_ADDR text, data;
202
203 if (the_target->read_offsets (&text, &data))
204 sprintf (own_buf, "Text=%lX;Data=%lX;Bss=%lX",
205 (long)text, (long)data, (long)data);
206 else
207 write_enn (own_buf);
208
209 return;
210 }
211
212 if (the_target->read_auxv != NULL
213 && strncmp ("qXfer:auxv:read:", own_buf, 16) == 0)
214 {
215 unsigned char *data;
216 int n;
217 CORE_ADDR ofs;
218 unsigned int len;
219 char *annex;
220
221 /* Reject any annex; grab the offset and length. */
222 if (decode_xfer_read (own_buf + 16, &annex, &ofs, &len) < 0
223 || annex[0] != '\0')
224 {
225 strcpy (own_buf, "E00");
226 return;
227 }
228
229 /* Read one extra byte, as an indicator of whether there is
230 more. */
231 if (len > PBUFSIZ - 2)
232 len = PBUFSIZ - 2;
233 data = malloc (len + 1);
234 n = (*the_target->read_auxv) (ofs, data, len + 1);
235 if (n > len)
236 *new_packet_len_p = write_qxfer_response (own_buf, data, len, 1);
237 else
238 *new_packet_len_p = write_qxfer_response (own_buf, data, n, 0);
239
240 free (data);
241
242 return;
243 }
244
245 /* Protocol features query. */
246 if (strncmp ("qSupported", own_buf, 10) == 0
247 && (own_buf[10] == ':' || own_buf[10] == '\0'))
248 {
249 sprintf (own_buf, "PacketSize=%x", PBUFSIZ - 1);
250
251 if (the_target->read_auxv != NULL)
252 strcat (own_buf, ";qXfer:auxv:read+");
253
254 return;
255 }
256
257 /* Otherwise we didn't know what packet it was. Say we didn't
258 understand it. */
259 own_buf[0] = 0;
260 }
261
262 /* Parse vCont packets. */
263 void
264 handle_v_cont (char *own_buf, char *status, int *signal)
265 {
266 char *p, *q;
267 int n = 0, i = 0;
268 struct thread_resume *resume_info, default_action;
269
270 /* Count the number of semicolons in the packet. There should be one
271 for every action. */
272 p = &own_buf[5];
273 while (p)
274 {
275 n++;
276 p++;
277 p = strchr (p, ';');
278 }
279 /* Allocate room for one extra action, for the default remain-stopped
280 behavior; if no default action is in the list, we'll need the extra
281 slot. */
282 resume_info = malloc ((n + 1) * sizeof (resume_info[0]));
283
284 default_action.thread = -1;
285 default_action.leave_stopped = 1;
286 default_action.step = 0;
287 default_action.sig = 0;
288
289 p = &own_buf[5];
290 i = 0;
291 while (*p)
292 {
293 p++;
294
295 resume_info[i].leave_stopped = 0;
296
297 if (p[0] == 's' || p[0] == 'S')
298 resume_info[i].step = 1;
299 else if (p[0] == 'c' || p[0] == 'C')
300 resume_info[i].step = 0;
301 else
302 goto err;
303
304 if (p[0] == 'S' || p[0] == 'C')
305 {
306 int sig;
307 sig = strtol (p + 1, &q, 16);
308 if (p == q)
309 goto err;
310 p = q;
311
312 if (!target_signal_to_host_p (sig))
313 goto err;
314 resume_info[i].sig = target_signal_to_host (sig);
315 }
316 else
317 {
318 resume_info[i].sig = 0;
319 p = p + 1;
320 }
321
322 if (p[0] == 0)
323 {
324 resume_info[i].thread = -1;
325 default_action = resume_info[i];
326
327 /* Note: we don't increment i here, we'll overwrite this entry
328 the next time through. */
329 }
330 else if (p[0] == ':')
331 {
332 unsigned int gdb_id = strtoul (p + 1, &q, 16);
333 unsigned long thread_id;
334
335 if (p == q)
336 goto err;
337 p = q;
338 if (p[0] != ';' && p[0] != 0)
339 goto err;
340
341 thread_id = gdb_id_to_thread_id (gdb_id);
342 if (thread_id)
343 resume_info[i].thread = thread_id;
344 else
345 goto err;
346
347 i++;
348 }
349 }
350
351 resume_info[i] = default_action;
352
353 /* Still used in occasional places in the backend. */
354 if (n == 1 && resume_info[0].thread != -1)
355 cont_thread = resume_info[0].thread;
356 else
357 cont_thread = -1;
358 set_desired_inferior (0);
359
360 (*the_target->resume) (resume_info);
361
362 free (resume_info);
363
364 *signal = mywait (status, 1);
365 prepare_resume_reply (own_buf, *status, *signal);
366 return;
367
368 err:
369 /* No other way to report an error... */
370 strcpy (own_buf, "");
371 free (resume_info);
372 return;
373 }
374
375 /* Handle all of the extended 'v' packets. */
376 void
377 handle_v_requests (char *own_buf, char *status, int *signal)
378 {
379 if (strncmp (own_buf, "vCont;", 6) == 0)
380 {
381 handle_v_cont (own_buf, status, signal);
382 return;
383 }
384
385 if (strncmp (own_buf, "vCont?", 6) == 0)
386 {
387 strcpy (own_buf, "vCont;c;C;s;S");
388 return;
389 }
390
391 /* Otherwise we didn't know what packet it was. Say we didn't
392 understand it. */
393 own_buf[0] = 0;
394 return;
395 }
396
397 void
398 myresume (int step, int sig)
399 {
400 struct thread_resume resume_info[2];
401 int n = 0;
402
403 if (step || sig || (cont_thread != 0 && cont_thread != -1))
404 {
405 resume_info[0].thread
406 = ((struct inferior_list_entry *) current_inferior)->id;
407 resume_info[0].step = step;
408 resume_info[0].sig = sig;
409 resume_info[0].leave_stopped = 0;
410 n++;
411 }
412 resume_info[n].thread = -1;
413 resume_info[n].step = 0;
414 resume_info[n].sig = 0;
415 resume_info[n].leave_stopped = (cont_thread != 0 && cont_thread != -1);
416
417 (*the_target->resume) (resume_info);
418 }
419
420 static int attached;
421
422 static void
423 gdbserver_version (void)
424 {
425 printf ("GNU gdbserver %s\n"
426 "Copyright (C) 2006 Free Software Foundation, Inc.\n"
427 "gdbserver is free software, covered by the GNU General Public License.\n"
428 "This gdbserver was configured as \"%s\"\n",
429 version, host_name);
430 }
431
432 static void
433 gdbserver_usage (void)
434 {
435 printf ("Usage:\tgdbserver COMM PROG [ARGS ...]\n"
436 "\tgdbserver COMM --attach PID\n"
437 "\n"
438 "COMM may either be a tty device (for serial debugging), or \n"
439 "HOST:PORT to listen for a TCP connection.\n");
440 }
441
442 int
443 main (int argc, char *argv[])
444 {
445 char ch, status, *own_buf;
446 unsigned char *mem_buf;
447 int i = 0;
448 int signal;
449 unsigned int len;
450 CORE_ADDR mem_addr;
451 int bad_attach;
452 int pid;
453 char *arg_end;
454
455 if (argc >= 2 && strcmp (argv[1], "--version") == 0)
456 {
457 gdbserver_version ();
458 exit (0);
459 }
460
461 if (argc >= 2 && strcmp (argv[1], "--help") == 0)
462 {
463 gdbserver_usage ();
464 exit (0);
465 }
466
467 if (setjmp (toplevel))
468 {
469 fprintf (stderr, "Exiting\n");
470 exit (1);
471 }
472
473 bad_attach = 0;
474 pid = 0;
475 attached = 0;
476 if (argc >= 3 && strcmp (argv[2], "--attach") == 0)
477 {
478 if (argc == 4
479 && argv[3] != '\0'
480 && (pid = strtoul (argv[3], &arg_end, 10)) != 0
481 && *arg_end == '\0')
482 {
483 ;
484 }
485 else
486 bad_attach = 1;
487 }
488
489 if (argc < 3 || bad_attach)
490 {
491 gdbserver_usage ();
492 exit (1);
493 }
494
495 initialize_low ();
496
497 own_buf = malloc (PBUFSIZ);
498 mem_buf = malloc (PBUFSIZ);
499
500 if (pid == 0)
501 {
502 /* Wait till we are at first instruction in program. */
503 signal = start_inferior (&argv[2], &status);
504
505 /* We are now stopped at the first instruction of the target process */
506 }
507 else
508 {
509 switch (attach_inferior (pid, &status, &signal))
510 {
511 case -1:
512 error ("Attaching not supported on this target");
513 break;
514 default:
515 attached = 1;
516 break;
517 }
518 }
519
520 while (1)
521 {
522 remote_open (argv[1]);
523
524 restart:
525 setjmp (toplevel);
526 while (1)
527 {
528 unsigned char sig;
529 int packet_len;
530 int new_packet_len = -1;
531
532 packet_len = getpkt (own_buf);
533 if (packet_len <= 0)
534 break;
535
536 i = 0;
537 ch = own_buf[i++];
538 switch (ch)
539 {
540 case 'q':
541 handle_query (own_buf, &new_packet_len);
542 break;
543 case 'd':
544 remote_debug = !remote_debug;
545 break;
546 #ifndef USE_WIN32API
547 /* Skip "detach" support on mingw32, since we don't have
548 waitpid. */
549 case 'D':
550 fprintf (stderr, "Detaching from inferior\n");
551 detach_inferior ();
552 write_ok (own_buf);
553 putpkt (own_buf);
554 remote_close ();
555
556 /* If we are attached, then we can exit. Otherwise, we need to
557 hang around doing nothing, until the child is gone. */
558 if (!attached)
559 {
560 int status, ret;
561
562 do {
563 ret = waitpid (signal_pid, &status, 0);
564 if (WIFEXITED (status) || WIFSIGNALED (status))
565 break;
566 } while (ret != -1 || errno != ECHILD);
567 }
568
569 exit (0);
570 #endif
571
572 case '!':
573 if (attached == 0)
574 {
575 extended_protocol = 1;
576 prepare_resume_reply (own_buf, status, signal);
577 }
578 else
579 {
580 /* We can not use the extended protocol if we are
581 attached, because we can not restart the running
582 program. So return unrecognized. */
583 own_buf[0] = '\0';
584 }
585 break;
586 case '?':
587 prepare_resume_reply (own_buf, status, signal);
588 break;
589 case 'H':
590 if (own_buf[1] == 'c' || own_buf[1] == 'g' || own_buf[1] == 's')
591 {
592 unsigned long gdb_id, thread_id;
593
594 gdb_id = strtoul (&own_buf[2], NULL, 16);
595 thread_id = gdb_id_to_thread_id (gdb_id);
596 if (thread_id == 0)
597 {
598 write_enn (own_buf);
599 break;
600 }
601
602 if (own_buf[1] == 'g')
603 {
604 general_thread = thread_id;
605 set_desired_inferior (1);
606 }
607 else if (own_buf[1] == 'c')
608 cont_thread = thread_id;
609 else if (own_buf[1] == 's')
610 step_thread = thread_id;
611
612 write_ok (own_buf);
613 }
614 else
615 {
616 /* Silently ignore it so that gdb can extend the protocol
617 without compatibility headaches. */
618 own_buf[0] = '\0';
619 }
620 break;
621 case 'g':
622 set_desired_inferior (1);
623 registers_to_string (own_buf);
624 break;
625 case 'G':
626 set_desired_inferior (1);
627 registers_from_string (&own_buf[1]);
628 write_ok (own_buf);
629 break;
630 case 'm':
631 decode_m_packet (&own_buf[1], &mem_addr, &len);
632 if (read_inferior_memory (mem_addr, mem_buf, len) == 0)
633 convert_int_to_ascii (mem_buf, own_buf, len);
634 else
635 write_enn (own_buf);
636 break;
637 case 'M':
638 decode_M_packet (&own_buf[1], &mem_addr, &len, mem_buf);
639 if (write_inferior_memory (mem_addr, mem_buf, len) == 0)
640 write_ok (own_buf);
641 else
642 write_enn (own_buf);
643 break;
644 case 'X':
645 if (decode_X_packet (&own_buf[1], packet_len - 1,
646 &mem_addr, &len, mem_buf) < 0
647 || write_inferior_memory (mem_addr, mem_buf, len) != 0)
648 write_enn (own_buf);
649 else
650 write_ok (own_buf);
651 break;
652 case 'C':
653 convert_ascii_to_int (own_buf + 1, &sig, 1);
654 if (target_signal_to_host_p (sig))
655 signal = target_signal_to_host (sig);
656 else
657 signal = 0;
658 set_desired_inferior (0);
659 myresume (0, signal);
660 signal = mywait (&status, 1);
661 prepare_resume_reply (own_buf, status, signal);
662 break;
663 case 'S':
664 convert_ascii_to_int (own_buf + 1, &sig, 1);
665 if (target_signal_to_host_p (sig))
666 signal = target_signal_to_host (sig);
667 else
668 signal = 0;
669 set_desired_inferior (0);
670 myresume (1, signal);
671 signal = mywait (&status, 1);
672 prepare_resume_reply (own_buf, status, signal);
673 break;
674 case 'c':
675 set_desired_inferior (0);
676 myresume (0, 0);
677 signal = mywait (&status, 1);
678 prepare_resume_reply (own_buf, status, signal);
679 break;
680 case 's':
681 set_desired_inferior (0);
682 myresume (1, 0);
683 signal = mywait (&status, 1);
684 prepare_resume_reply (own_buf, status, signal);
685 break;
686 case 'Z':
687 {
688 char *lenptr;
689 char *dataptr;
690 CORE_ADDR addr = strtoul (&own_buf[3], &lenptr, 16);
691 int len = strtol (lenptr + 1, &dataptr, 16);
692 char type = own_buf[1];
693
694 if (the_target->insert_watchpoint == NULL
695 || (type < '2' || type > '4'))
696 {
697 /* No watchpoint support or not a watchpoint command;
698 unrecognized either way. */
699 own_buf[0] = '\0';
700 }
701 else
702 {
703 int res;
704
705 res = (*the_target->insert_watchpoint) (type, addr, len);
706 if (res == 0)
707 write_ok (own_buf);
708 else if (res == 1)
709 /* Unsupported. */
710 own_buf[0] = '\0';
711 else
712 write_enn (own_buf);
713 }
714 break;
715 }
716 case 'z':
717 {
718 char *lenptr;
719 char *dataptr;
720 CORE_ADDR addr = strtoul (&own_buf[3], &lenptr, 16);
721 int len = strtol (lenptr + 1, &dataptr, 16);
722 char type = own_buf[1];
723
724 if (the_target->remove_watchpoint == NULL
725 || (type < '2' || type > '4'))
726 {
727 /* No watchpoint support or not a watchpoint command;
728 unrecognized either way. */
729 own_buf[0] = '\0';
730 }
731 else
732 {
733 int res;
734
735 res = (*the_target->remove_watchpoint) (type, addr, len);
736 if (res == 0)
737 write_ok (own_buf);
738 else if (res == 1)
739 /* Unsupported. */
740 own_buf[0] = '\0';
741 else
742 write_enn (own_buf);
743 }
744 break;
745 }
746 case 'k':
747 fprintf (stderr, "Killing inferior\n");
748 kill_inferior ();
749 /* When using the extended protocol, we start up a new
750 debugging session. The traditional protocol will
751 exit instead. */
752 if (extended_protocol)
753 {
754 write_ok (own_buf);
755 fprintf (stderr, "GDBserver restarting\n");
756
757 /* Wait till we are at 1st instruction in prog. */
758 signal = start_inferior (&argv[2], &status);
759 goto restart;
760 break;
761 }
762 else
763 {
764 exit (0);
765 break;
766 }
767 case 'T':
768 {
769 unsigned long gdb_id, thread_id;
770
771 gdb_id = strtoul (&own_buf[1], NULL, 16);
772 thread_id = gdb_id_to_thread_id (gdb_id);
773 if (thread_id == 0)
774 {
775 write_enn (own_buf);
776 break;
777 }
778
779 if (mythread_alive (thread_id))
780 write_ok (own_buf);
781 else
782 write_enn (own_buf);
783 }
784 break;
785 case 'R':
786 /* Restarting the inferior is only supported in the
787 extended protocol. */
788 if (extended_protocol)
789 {
790 kill_inferior ();
791 write_ok (own_buf);
792 fprintf (stderr, "GDBserver restarting\n");
793
794 /* Wait till we are at 1st instruction in prog. */
795 signal = start_inferior (&argv[2], &status);
796 goto restart;
797 break;
798 }
799 else
800 {
801 /* It is a request we don't understand. Respond with an
802 empty packet so that gdb knows that we don't support this
803 request. */
804 own_buf[0] = '\0';
805 break;
806 }
807 case 'v':
808 /* Extended (long) request. */
809 handle_v_requests (own_buf, &status, &signal);
810 break;
811 default:
812 /* It is a request we don't understand. Respond with an
813 empty packet so that gdb knows that we don't support this
814 request. */
815 own_buf[0] = '\0';
816 break;
817 }
818
819 if (new_packet_len != -1)
820 putpkt_binary (own_buf, new_packet_len);
821 else
822 putpkt (own_buf);
823
824 if (status == 'W')
825 fprintf (stderr,
826 "\nChild exited with status %d\n", signal);
827 if (status == 'X')
828 fprintf (stderr, "\nChild terminated with signal = 0x%x (%s)\n",
829 target_signal_to_host (signal),
830 target_signal_to_name (signal));
831 if (status == 'W' || status == 'X')
832 {
833 if (extended_protocol)
834 {
835 fprintf (stderr, "Killing inferior\n");
836 kill_inferior ();
837 write_ok (own_buf);
838 fprintf (stderr, "GDBserver restarting\n");
839
840 /* Wait till we are at 1st instruction in prog. */
841 signal = start_inferior (&argv[2], &status);
842 goto restart;
843 break;
844 }
845 else
846 {
847 fprintf (stderr, "GDBserver exiting\n");
848 exit (0);
849 }
850 }
851 }
852
853 /* We come here when getpkt fails.
854
855 For the extended remote protocol we exit (and this is the only
856 way we gracefully exit!).
857
858 For the traditional remote protocol close the connection,
859 and re-open it at the top of the loop. */
860 if (extended_protocol)
861 {
862 remote_close ();
863 exit (0);
864 }
865 else
866 {
867 fprintf (stderr, "Remote side has terminated connection. "
868 "GDBserver will reopen the connection.\n");
869 remote_close ();
870 }
871 }
872 }
This page took 0.086396 seconds and 4 git commands to generate.