LynxOS: Resume the same thread when receiving a thread create/exit event.
[deliverable/binutils-gdb.git] / gdb / gdbserver / lynx-low.c
CommitLineData
28e7fd62 1/* Copyright (C) 2009-2013 Free Software Foundation, Inc.
8ed54b31
JB
2
3 This file is part of GDB.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18#include "server.h"
19#include "target.h"
20#include "lynx-low.h"
21
22#include <limits.h>
1adfc54d 23#include <sys/ptrace.h>
8ed54b31
JB
24#include <sys/piddef.h> /* Provides PIDGET, TIDGET, BUILDPID, etc. */
25#include <unistd.h>
26#include <sys/ioctl.h>
27#include <sys/types.h>
8bdce1ff 28#include "gdb_wait.h"
8ed54b31
JB
29#include <signal.h>
30
31int using_threads = 1;
32
33/* Print a debug trace on standard output if debug_threads is set. */
34
35static void
36lynx_debug (char *string, ...)
37{
38 va_list args;
39
40 if (!debug_threads)
41 return;
42
43 va_start (args, string);
44 fprintf (stderr, "DEBUG(lynx): ");
45 vfprintf (stderr, string, args);
46 fprintf (stderr, "\n");
47 va_end (args);
48}
49
50/* Build a ptid_t given a PID and a LynxOS TID. */
51
52static ptid_t
53lynx_ptid_build (int pid, long tid)
54{
55 /* brobecker/2010-06-21: It looks like the LWP field in ptids
56 should be distinct for each thread (see write_ptid where it
57 writes the thread ID from the LWP). So instead of storing
58 the LynxOS tid in the tid field of the ptid, we store it in
59 the lwp field. */
60 return ptid_build (pid, tid, 0);
61}
62
63/* Return the process ID of the given PTID.
64
65 This function has little reason to exist, it's just a wrapper around
66 ptid_get_pid. But since we have a getter function for the lynxos
67 ptid, it feels cleaner to have a getter for the pid as well. */
68
69static int
70lynx_ptid_get_pid (ptid_t ptid)
71{
72 return ptid_get_pid (ptid);
73}
74
75/* Return the LynxOS tid of the given PTID. */
76
77static long
78lynx_ptid_get_tid (ptid_t ptid)
79{
80 /* See lynx_ptid_build: The LynxOS tid is stored inside the lwp field
81 of the ptid. */
82 return ptid_get_lwp (ptid);
83}
84
85/* For a given PTID, return the associated PID as known by the LynxOS
86 ptrace layer. */
87
88static int
89lynx_ptrace_pid_from_ptid (ptid_t ptid)
90{
91 return BUILDPID (lynx_ptid_get_pid (ptid), lynx_ptid_get_tid (ptid));
92}
93
94/* Return a string image of the ptrace REQUEST number. */
95
96static char *
97ptrace_request_to_str (int request)
98{
99 switch (request)
100 {
101 case PTRACE_TRACEME:
102 return "PTRACE_TRACEME";
103 break;
104 case PTRACE_PEEKTEXT:
105 return "PTRACE_PEEKTEXT";
106 break;
107 case PTRACE_PEEKDATA:
108 return "PTRACE_PEEKDATA";
109 break;
110 case PTRACE_PEEKUSER:
111 return "PTRACE_PEEKUSER";
112 break;
113 case PTRACE_POKETEXT:
114 return "PTRACE_POKETEXT";
115 break;
116 case PTRACE_POKEDATA:
117 return "PTRACE_POKEDATA";
118 break;
119 case PTRACE_POKEUSER:
120 return "PTRACE_POKEUSER";
121 break;
122 case PTRACE_CONT:
123 return "PTRACE_CONT";
124 break;
125 case PTRACE_KILL:
126 return "PTRACE_KILL";
127 break;
128 case PTRACE_SINGLESTEP:
129 return "PTRACE_SINGLESTEP";
130 break;
131 case PTRACE_ATTACH:
132 return "PTRACE_ATTACH";
133 break;
134 case PTRACE_DETACH:
135 return "PTRACE_DETACH";
136 break;
137 case PTRACE_GETREGS:
138 return "PTRACE_GETREGS";
139 break;
140 case PTRACE_SETREGS:
141 return "PTRACE_SETREGS";
142 break;
143 case PTRACE_GETFPREGS:
144 return "PTRACE_GETFPREGS";
145 break;
146 case PTRACE_SETFPREGS:
147 return "PTRACE_SETFPREGS";
148 break;
149 case PTRACE_READDATA:
150 return "PTRACE_READDATA";
151 break;
152 case PTRACE_WRITEDATA:
153 return "PTRACE_WRITEDATA";
154 break;
155 case PTRACE_READTEXT:
156 return "PTRACE_READTEXT";
157 break;
158 case PTRACE_WRITETEXT:
159 return "PTRACE_WRITETEXT";
160 break;
161 case PTRACE_GETFPAREGS:
162 return "PTRACE_GETFPAREGS";
163 break;
164 case PTRACE_SETFPAREGS:
165 return "PTRACE_SETFPAREGS";
166 break;
167 case PTRACE_GETWINDOW:
168 return "PTRACE_GETWINDOW";
169 break;
170 case PTRACE_SETWINDOW:
171 return "PTRACE_SETWINDOW";
172 break;
173 case PTRACE_SYSCALL:
174 return "PTRACE_SYSCALL";
175 break;
176 case PTRACE_DUMPCORE:
177 return "PTRACE_DUMPCORE";
178 break;
179 case PTRACE_SETWRBKPT:
180 return "PTRACE_SETWRBKPT";
181 break;
182 case PTRACE_SETACBKPT:
183 return "PTRACE_SETACBKPT";
184 break;
185 case PTRACE_CLRBKPT:
186 return "PTRACE_CLRBKPT";
187 break;
188 case PTRACE_GET_UCODE:
189 return "PTRACE_GET_UCODE";
190 break;
191#ifdef PT_READ_GPR
192 case PT_READ_GPR:
193 return "PT_READ_GPR";
194 break;
195#endif
196#ifdef PT_WRITE_GPR
197 case PT_WRITE_GPR:
198 return "PT_WRITE_GPR";
199 break;
200#endif
201#ifdef PT_READ_FPR
202 case PT_READ_FPR:
203 return "PT_READ_FPR";
204 break;
205#endif
206#ifdef PT_WRITE_FPR
207 case PT_WRITE_FPR:
208 return "PT_WRITE_FPR";
209 break;
210#endif
8ed54b31
JB
211#ifdef PT_READ_VPR
212 case PT_READ_VPR:
213 return "PT_READ_VPR";
214 break;
215#endif
216#ifdef PT_WRITE_VPR
217 case PT_WRITE_VPR:
218 return "PT_WRITE_VPR";
219 break;
220#endif
221#ifdef PTRACE_PEEKUSP
222 case PTRACE_PEEKUSP:
223 return "PTRACE_PEEKUSP";
224 break;
225#endif
226#ifdef PTRACE_POKEUSP
227 case PTRACE_POKEUSP:
228 return "PTRACE_POKEUSP";
229 break;
230#endif
231 case PTRACE_PEEKTHREAD:
232 return "PTRACE_PEEKTHREAD";
233 break;
234 case PTRACE_THREADUSER:
235 return "PTRACE_THREADUSER";
236 break;
237 case PTRACE_FPREAD:
238 return "PTRACE_FPREAD";
239 break;
240 case PTRACE_FPWRITE:
241 return "PTRACE_FPWRITE";
242 break;
243 case PTRACE_SETSIG:
244 return "PTRACE_SETSIG";
245 break;
246 case PTRACE_CONT_ONE:
247 return "PTRACE_CONT_ONE";
248 break;
249 case PTRACE_KILL_ONE:
250 return "PTRACE_KILL_ONE";
251 break;
252 case PTRACE_SINGLESTEP_ONE:
253 return "PTRACE_SINGLESTEP_ONE";
254 break;
255 case PTRACE_GETLOADINFO:
256 return "PTRACE_GETLOADINFO";
257 break;
037335a7
JB
258 case PTRACE_GETTRACESIG:
259 return "PTRACE_GETTRACESIG";
260 break;
78cbc024 261#ifdef PTRACE_GETTHREADLIST
8ed54b31
JB
262 case PTRACE_GETTHREADLIST:
263 return "PTRACE_GETTHREADLIST";
264 break;
78cbc024 265#endif
8ed54b31
JB
266 }
267 return "<unknown-request>";
268}
269
270/* A wrapper around ptrace that allows us to print debug traces of
271 ptrace calls if debug traces are activated. */
272
273static int
274lynx_ptrace (int request, ptid_t ptid, int addr, int data, int addr2)
275{
276 int result;
277 const int pid = lynx_ptrace_pid_from_ptid (ptid);
278 int saved_errno;
279
280 if (debug_threads)
281 fprintf (stderr, "PTRACE (%s, pid=%d(pid=%d, tid=%d), addr=0x%x, "
282 "data=0x%x, addr2=0x%x)",
283 ptrace_request_to_str (request), pid, PIDGET (pid), TIDGET (pid),
284 addr, data, addr2);
285 result = ptrace (request, pid, addr, data, addr2);
286 saved_errno = errno;
287 if (debug_threads)
288 fprintf (stderr, " -> %d (=0x%x)\n", result, result);
289
290 errno = saved_errno;
291 return result;
292}
293
294/* Implement the create_inferior method of the target_ops vector. */
295
296static int
297lynx_create_inferior (char *program, char **allargs)
298{
8ed54b31
JB
299 int pid;
300
301 lynx_debug ("lynx_create_inferior ()");
302
303 pid = fork ();
304 if (pid < 0)
305 perror_with_name ("fork");
306
307 if (pid == 0)
308 {
309 int pgrp;
310
311 /* Switch child to its own process group so that signals won't
312 directly affect gdbserver. */
313 pgrp = getpid();
314 setpgid (0, pgrp);
315 ioctl (0, TIOCSPGRP, &pgrp);
316 lynx_ptrace (PTRACE_TRACEME, null_ptid, 0, 0, 0);
317 execv (program, allargs);
318 fprintf (stderr, "Cannot exec %s: %s.\n", program, strerror (errno));
319 fflush (stderr);
320 _exit (0177);
321 }
322
ab8f6ca9 323 add_process (pid, 0);
8ed54b31
JB
324 /* Do not add the process thread just yet, as we do not know its tid.
325 We will add it later, during the wait for the STOP event corresponding
326 to the lynx_ptrace (PTRACE_TRACEME) call above. */
327 return pid;
328}
329
330/* Implement the attach target_ops method. */
331
332static int
333lynx_attach (unsigned long pid)
334{
8ed54b31
JB
335 ptid_t ptid = lynx_ptid_build (pid, 0);
336
337 if (lynx_ptrace (PTRACE_ATTACH, ptid, 0, 0, 0) != 0)
338 error ("Cannot attach to process %lu: %s (%d)\n", pid,
339 strerror (errno), errno);
340
52d4cbd8 341 add_process (pid, 1);
8ed54b31
JB
342 add_thread (ptid, NULL);
343
344 return 0;
345}
346
347/* Implement the resume target_ops method. */
348
349static void
350lynx_resume (struct thread_resume *resume_info, size_t n)
351{
8ed54b31 352 /* FIXME: Assume for now that n == 1. */
3f6e77ef 353 ptid_t ptid = resume_info[0].thread;
8ed54b31
JB
354 const int request = (resume_info[0].kind == resume_step
355 ? PTRACE_SINGLESTEP : PTRACE_CONT);
356 const int signal = resume_info[0].sig;
8ed54b31 357
3f6e77ef
JB
358 if (ptid_equal (ptid, minus_one_ptid))
359 ptid = thread_to_gdb_id (current_inferior);
360
8ed54b31 361 regcache_invalidate ();
3f6e77ef 362 lynx_ptrace (request, ptid, 1, signal, 0);
8ed54b31
JB
363}
364
365/* Resume the execution of the given PTID. */
366
367static void
368lynx_continue (ptid_t ptid)
369{
370 struct thread_resume resume_info;
371
372 resume_info.thread = ptid;
373 resume_info.kind = resume_continue;
374 resume_info.sig = 0;
375
376 lynx_resume (&resume_info, 1);
377}
378
379/* Remove all inferiors and associated threads. */
380
381static void
382lynx_clear_inferiors (void)
383{
384 /* We do not use private data, so nothing much to do except calling
385 clear_inferiors. */
386 clear_inferiors ();
387}
388
389/* A wrapper around waitpid that handles the various idiosyncrasies
390 of LynxOS' waitpid. */
391
392static int
393lynx_waitpid (int pid, int *stat_loc)
394{
395 int ret = 0;
396
397 while (1)
398 {
399 ret = waitpid (pid, stat_loc, WNOHANG);
400 if (ret < 0)
401 {
402 /* An ECHILD error is not indicative of a real problem.
403 It happens for instance while waiting for the inferior
404 to stop after attaching to it. */
405 if (errno != ECHILD)
406 perror_with_name ("waitpid (WNOHANG)");
407 }
408 if (ret > 0)
409 break;
410 /* No event with WNOHANG. See if there is one with WUNTRACED. */
411 ret = waitpid (pid, stat_loc, WNOHANG | WUNTRACED);
412 if (ret < 0)
413 {
414 /* An ECHILD error is not indicative of a real problem.
415 It happens for instance while waiting for the inferior
416 to stop after attaching to it. */
417 if (errno != ECHILD)
418 perror_with_name ("waitpid (WNOHANG|WUNTRACED)");
419 }
420 if (ret > 0)
421 break;
422 usleep (1000);
423 }
424 return ret;
425}
426
427/* Implement the wait target_ops method. */
428
429static ptid_t
430lynx_wait_1 (ptid_t ptid, struct target_waitstatus *status, int options)
431{
432 int pid;
433 int ret;
434 int wstat;
435 ptid_t new_ptid;
436
437 if (ptid_equal (ptid, minus_one_ptid))
438 pid = lynx_ptid_get_pid (thread_to_gdb_id (current_inferior));
439 else
440 pid = BUILDPID (lynx_ptid_get_pid (ptid), lynx_ptid_get_tid (ptid));
441
442retry:
443
444 ret = lynx_waitpid (pid, &wstat);
445 new_ptid = lynx_ptid_build (ret, ((union wait *) &wstat)->w_tid);
446
447 /* If this is a new thread, then add it now. The reason why we do
448 this here instead of when handling new-thread events is because
449 we need to add the thread associated to the "main" thread - even
450 for non-threaded applications where the new-thread events are not
451 generated. */
452 if (!find_thread_ptid (new_ptid))
8b93d60f
JB
453 {
454 lynx_debug ("New thread: (pid = %d, tid = %d)",
455 lynx_ptid_get_pid (new_ptid), lynx_ptid_get_tid (new_ptid));
456 add_thread (new_ptid, NULL);
457 }
8ed54b31
JB
458
459 if (WIFSTOPPED (wstat))
460 {
461 status->kind = TARGET_WAITKIND_STOPPED;
2ea28649 462 status->value.integer = gdb_signal_from_host (WSTOPSIG (wstat));
8ed54b31
JB
463 lynx_debug ("process stopped with signal: %d",
464 status->value.integer);
465 }
466 else if (WIFEXITED (wstat))
467 {
468 status->kind = TARGET_WAITKIND_EXITED;
469 status->value.integer = WEXITSTATUS (wstat);
470 lynx_debug ("process exited with code: %d", status->value.integer);
471 }
472 else if (WIFSIGNALED (wstat))
473 {
474 status->kind = TARGET_WAITKIND_SIGNALLED;
2ea28649 475 status->value.integer = gdb_signal_from_host (WTERMSIG (wstat));
8ed54b31
JB
476 lynx_debug ("process terminated with code: %d",
477 status->value.integer);
478 }
479 else
480 {
481 /* Not sure what happened if we get here, or whether we can
482 in fact get here. But if we do, handle the event the best
483 we can. */
484 status->kind = TARGET_WAITKIND_STOPPED;
2ea28649 485 status->value.integer = gdb_signal_from_host (0);
8ed54b31
JB
486 lynx_debug ("unknown event ????");
487 }
488
489 /* SIGTRAP events are generated for situations other than single-step/
490 breakpoint events (Eg. new-thread events). Handle those other types
491 of events, and resume the execution if necessary. */
492 if (status->kind == TARGET_WAITKIND_STOPPED
a493e3e2 493 && status->value.integer == GDB_SIGNAL_TRAP)
8ed54b31
JB
494 {
495 const int realsig = lynx_ptrace (PTRACE_GETTRACESIG, new_ptid, 0, 0, 0);
496
497 lynx_debug ("(realsig = %d)", realsig);
498 switch (realsig)
499 {
500 case SIGNEWTHREAD:
501 /* We just added the new thread above. No need to do anything
502 further. Just resume the execution again. */
3f6e77ef 503 lynx_continue (new_ptid);
8ed54b31
JB
504 goto retry;
505
506 case SIGTHREADEXIT:
507 remove_thread (find_thread_ptid (new_ptid));
3f6e77ef 508 lynx_continue (new_ptid);
8ed54b31
JB
509 goto retry;
510 }
511 }
512
513 return new_ptid;
514}
515
516/* A wrapper around lynx_wait_1 that also prints debug traces when
517 such debug traces have been activated. */
518
519static ptid_t
520lynx_wait (ptid_t ptid, struct target_waitstatus *status, int options)
521{
522 ptid_t new_ptid;
523
524 lynx_debug ("lynx_wait (pid = %d, tid = %ld)",
525 lynx_ptid_get_pid (ptid), lynx_ptid_get_tid (ptid));
526 new_ptid = lynx_wait_1 (ptid, status, options);
527 lynx_debug (" -> (pid=%d, tid=%ld, status->kind = %d)",
528 lynx_ptid_get_pid (new_ptid), lynx_ptid_get_tid (new_ptid),
529 status->kind);
530 return new_ptid;
531}
532
533/* Implement the kill target_ops method. */
534
535static int
536lynx_kill (int pid)
537{
538 ptid_t ptid = lynx_ptid_build (pid, 0);
539 struct target_waitstatus status;
540 struct process_info *process;
541
542 process = find_process_pid (pid);
543 if (process == NULL)
544 return -1;
545
546 lynx_ptrace (PTRACE_KILL, ptid, 0, 0, 0);
547 lynx_wait (ptid, &status, 0);
548 the_target->mourn (process);
549 return 0;
550}
551
552/* Implement the detach target_ops method. */
553
554static int
555lynx_detach (int pid)
556{
557 ptid_t ptid = lynx_ptid_build (pid, 0);
558 struct process_info *process;
559
560 process = find_process_pid (pid);
561 if (process == NULL)
562 return -1;
563
564 lynx_ptrace (PTRACE_DETACH, ptid, 0, 0, 0);
565 the_target->mourn (process);
566 return 0;
567}
568
569/* Implement the mourn target_ops method. */
570
571static void
572lynx_mourn (struct process_info *proc)
573{
574 lynx_clear_inferiors ();
575}
576
577/* Implement the join target_ops method. */
578
579static void
580lynx_join (int pid)
581{
582 /* The PTRACE_DETACH is sufficient to detach from the process.
583 So no need to do anything extra. */
584}
585
586/* Implement the thread_alive target_ops method. */
587
588static int
589lynx_thread_alive (ptid_t ptid)
590{
591 /* The list of threads is updated at the end of each wait, so it
592 should be up to date. No need to re-fetch it. */
593 return (find_thread_ptid (ptid) != NULL);
594}
595
596/* Implement the fetch_registers target_ops method. */
597
598static void
599lynx_fetch_registers (struct regcache *regcache, int regno)
600{
601 struct lynx_regset_info *regset = lynx_target_regsets;
602 ptid_t inferior_ptid = thread_to_gdb_id (current_inferior);
603
604 lynx_debug ("lynx_fetch_registers (regno = %d)", regno);
605
606 while (regset->size >= 0)
607 {
608 char *buf;
609 int res;
610
611 buf = xmalloc (regset->size);
612 res = lynx_ptrace (regset->get_request, inferior_ptid, (int) buf, 0, 0);
613 if (res < 0)
614 perror ("ptrace");
615 regset->store_function (regcache, buf);
616 free (buf);
617 regset++;
618 }
619}
620
621/* Implement the store_registers target_ops method. */
622
623static void
624lynx_store_registers (struct regcache *regcache, int regno)
625{
626 struct lynx_regset_info *regset = lynx_target_regsets;
627 ptid_t inferior_ptid = thread_to_gdb_id (current_inferior);
628
629 lynx_debug ("lynx_store_registers (regno = %d)", regno);
630
631 while (regset->size >= 0)
632 {
633 char *buf;
634 int res;
635
636 buf = xmalloc (regset->size);
637 res = lynx_ptrace (regset->get_request, inferior_ptid, (int) buf, 0, 0);
638 if (res == 0)
639 {
640 /* Then overlay our cached registers on that. */
641 regset->fill_function (regcache, buf);
642 /* Only now do we write the register set. */
643 res = lynx_ptrace (regset->set_request, inferior_ptid, (int) buf,
644 0, 0);
645 }
646 if (res < 0)
647 perror ("ptrace");
648 free (buf);
649 regset++;
650 }
651}
652
653/* Implement the read_memory target_ops method. */
654
655static int
656lynx_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
657{
658 /* On LynxOS, memory reads needs to be performed in chunks the size
659 of int types, and they should also be aligned accordingly. */
660 int buf;
661 const int xfer_size = sizeof (buf);
662 CORE_ADDR addr = memaddr & -(CORE_ADDR) xfer_size;
663 ptid_t inferior_ptid = thread_to_gdb_id (current_inferior);
664
665 while (addr < memaddr + len)
666 {
667 int skip = 0;
668 int truncate = 0;
669
670 errno = 0;
671 if (addr < memaddr)
672 skip = memaddr - addr;
673 if (addr + xfer_size > memaddr + len)
674 truncate = addr + xfer_size - memaddr - len;
675 buf = lynx_ptrace (PTRACE_PEEKTEXT, inferior_ptid, addr, 0, 0);
676 if (errno)
677 return errno;
678 memcpy (myaddr + (addr - memaddr) + skip, (gdb_byte *) &buf + skip,
679 xfer_size - skip - truncate);
680 addr += xfer_size;
681 }
682
683 return 0;
684}
685
686/* Implement the write_memory target_ops method. */
687
688static int
689lynx_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
690{
691 /* On LynxOS, memory writes needs to be performed in chunks the size
692 of int types, and they should also be aligned accordingly. */
693 int buf;
694 const int xfer_size = sizeof (buf);
695 CORE_ADDR addr = memaddr & -(CORE_ADDR) xfer_size;
696 ptid_t inferior_ptid = thread_to_gdb_id (current_inferior);
697
698 while (addr < memaddr + len)
699 {
700 int skip = 0;
701 int truncate = 0;
702
703 if (addr < memaddr)
704 skip = memaddr - addr;
705 if (addr + xfer_size > memaddr + len)
706 truncate = addr + xfer_size - memaddr - len;
707 if (skip > 0 || truncate > 0)
708 /* We need to read the memory at this address in order to preserve
709 the data that we are not overwriting. */
710 lynx_read_memory (addr, (unsigned char *) &buf, xfer_size);
711 if (errno)
712 return errno;
713 memcpy ((gdb_byte *) &buf + skip, myaddr + (addr - memaddr) + skip,
714 xfer_size - skip - truncate);
715 errno = 0;
716 lynx_ptrace (PTRACE_POKETEXT, inferior_ptid, addr, buf, 0);
717 if (errno)
718 return errno;
719 addr += xfer_size;
720 }
721
722 return 0;
723}
724
725/* Implement the kill_request target_ops method. */
726
727static void
728lynx_request_interrupt (void)
729{
730 ptid_t inferior_ptid = thread_to_gdb_id (current_inferior);
731
732 kill (lynx_ptid_get_pid (inferior_ptid), SIGINT);
733}
734
735/* The LynxOS target_ops vector. */
736
737static struct target_ops lynx_target_ops = {
738 lynx_create_inferior,
739 lynx_attach,
740 lynx_kill,
741 lynx_detach,
742 lynx_mourn,
743 lynx_join,
744 lynx_thread_alive,
745 lynx_resume,
746 lynx_wait,
747 lynx_fetch_registers,
748 lynx_store_registers,
749 NULL, /* prepare_to_access_memory */
750 NULL, /* done_accessing_memory */
751 lynx_read_memory,
752 lynx_write_memory,
753 NULL, /* look_up_symbols */
754 lynx_request_interrupt,
755 NULL, /* read_auxv */
756 NULL, /* insert_point */
757 NULL, /* remove_point */
758 NULL, /* stopped_by_watchpoint */
759 NULL, /* stopped_data_address */
760 NULL, /* read_offsets */
761 NULL, /* get_tls_address */
762 NULL, /* qxfer_spu */
763 NULL, /* hostio_last_error */
764 NULL, /* qxfer_osdata */
765 NULL, /* qxfer_siginfo */
766 NULL, /* supports_non_stop */
767 NULL, /* async */
768 NULL, /* start_non_stop */
769 NULL, /* supports_multi_process */
770 NULL, /* handle_monitor_command */
771};
772
773void
774initialize_low (void)
775{
776 set_target_ops (&lynx_target_ops);
777 the_low_target.arch_setup ();
778}
779
This page took 0.241711 seconds and 4 git commands to generate.