e63798756e415b5079f11d0a28635a8d75bcc087
[deliverable/binutils-gdb.git] / gdb / remote-vx.c
1 /* Memory-access and commands for remote VxWorks processes, for GDB.
2 Copyright (C) 1990-1991 Free Software Foundation, Inc.
3 Contributed by Wind River Systems and Cygnus Support.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21 #include <stdio.h>
22 #include "defs.h"
23 #include "frame.h"
24 #include "inferior.h"
25 #include "wait.h"
26 #include "target.h"
27 #include "gdbcore.h"
28 #include "command.h"
29 #include "symtab.h"
30 #include "symfile.h" /* for struct complaint */
31
32 #include <string.h>
33 #include <errno.h>
34 #include <signal.h>
35 #include <fcntl.h>
36 #include <sys/types.h>
37 #include <sys/time.h>
38 #include <sys/socket.h>
39 #define free bogon_free /* Sun claims "int free()" not void */
40 #include <rpc/rpc.h>
41 #undef free
42 #include <sys/time.h> /* UTek's <rpc/rpc.h> doesn't #incl this */
43 #include <netdb.h>
44 #include <ptrace.h>
45 #include "xdr_ptrace.h"
46 #include "xdr_ld.h"
47 #include "xdr_rdb.h"
48 #include "dbgRpcLib.h"
49
50 /* get rid of value.h if possible */
51 #include <value.h>
52 #include <symtab.h>
53
54 extern value call_function_by_hand ();
55 extern void symbol_file_command ();
56 extern int stop_soon_quietly; /* for wait_for_inferior */
57
58 static int net_ptrace_clnt_call (); /* Forward decl */
59 static enum clnt_stat net_clnt_call (); /* Forward decl */
60 extern struct target_ops vx_ops, vx_run_ops; /* Forward declaration */
61
62 /* Saved name of target host and called function for "info files".
63 Both malloc'd. */
64
65 static char *vx_host;
66 static char *vx_running; /* Called function */
67
68 /* Nonzero means target that is being debugged remotely has a floating
69 point processor. */
70
71 static int target_has_fp;
72
73 /* Default error message when the network is forking up. */
74
75 static const char rpcerr[] = "network target debugging: rpc error";
76
77 CLIENT *pClient; /* client used in net debugging */
78 static int ptraceSock = RPC_ANYSOCK;
79
80 enum clnt_stat net_clnt_call();
81 static void parse_args ();
82
83 static struct timeval rpcTimeout = { 10, 0 };
84
85 static char *skip_white_space ();
86 static char *find_white_space ();
87
88 /* Tell the VxWorks target system to download a file.
89 The load addresses of the text, data, and bss segments are
90 stored in pTextAddr, pDataAddr, and *pBssAddr (respectively).
91 Returns 0 for success, -1 for failure. */
92
93 static int
94 net_load (filename, pTextAddr, pDataAddr, pBssAddr)
95 char *filename;
96 CORE_ADDR *pTextAddr;
97 CORE_ADDR *pDataAddr;
98 CORE_ADDR *pBssAddr;
99 {
100 enum clnt_stat status;
101 struct ldfile ldstruct;
102 struct timeval load_timeout;
103
104 bzero ((char *) &ldstruct, sizeof (ldstruct));
105
106 /* We invoke clnt_call () here directly, instead of through
107 net_clnt_call (), because we need to set a large timeout value.
108 The load on the target side can take quite a while, easily
109 more than 10 seconds. The user can kill this call by typing
110 CTRL-C if there really is a problem with the load.
111
112 Do not change the tv_sec value without checking -- select() imposes
113 a limit of 10**8 on it for no good reason that I can see... */
114
115 load_timeout.tv_sec = 99999999; /* A large number, effectively inf. */
116 load_timeout.tv_usec = 0;
117
118 status = clnt_call (pClient, VX_LOAD, xdr_wrapstring, &filename, xdr_ldfile,
119 &ldstruct, load_timeout);
120
121 if (status == RPC_SUCCESS)
122 {
123 if (*ldstruct.name == NULL) /* load failed on VxWorks side */
124 return -1;
125 *pTextAddr = ldstruct.txt_addr;
126 *pDataAddr = ldstruct.data_addr;
127 *pBssAddr = ldstruct.bss_addr;
128 return 0;
129 }
130 else
131 return -1;
132 }
133
134 /* returns 0 if successful, errno if RPC failed or VxWorks complains. */
135
136 static int
137 net_break (addr, procnum)
138 int addr;
139 u_long procnum;
140 {
141 enum clnt_stat status;
142 int break_status;
143 Rptrace ptrace_in; /* XXX This is stupid. It doesn't need to be a ptrace
144 structure. How about something smaller? */
145
146 bzero ((char *) &ptrace_in, sizeof (ptrace_in));
147 break_status = 0;
148
149 ptrace_in.addr = addr;
150 ptrace_in.pid = inferior_pid;
151
152 status = net_clnt_call (procnum, xdr_rptrace, &ptrace_in, xdr_int,
153 &break_status);
154
155 if (status != RPC_SUCCESS)
156 return errno;
157
158 if (break_status == -1)
159 return ENOMEM;
160 return break_status; /* probably (FIXME) zero */
161 }
162
163 /* returns 0 if successful, errno otherwise */
164
165 int
166 vx_insert_breakpoint (addr)
167 int addr;
168 {
169 return net_break (addr, VX_BREAK_ADD);
170 }
171
172 /* returns 0 if successful, errno otherwise */
173
174 int
175 vx_remove_breakpoint (addr)
176 int addr;
177 {
178 return net_break (addr, VX_BREAK_DELETE);
179 }
180
181 /* Start an inferior process and sets inferior_pid to its pid.
182 EXEC_FILE is the file to run.
183 ALLARGS is a string containing the arguments to the program.
184 ENV is the environment vector to pass.
185 Returns process id. Errors reported with error().
186 On VxWorks, we ignore exec_file. */
187
188 void
189 vx_create_inferior (exec_file, args, env)
190 char *exec_file;
191 char *args;
192 char **env;
193 {
194 enum clnt_stat status;
195 arg_array passArgs;
196 TASK_START taskStart;
197
198 bzero ((char *) &passArgs, sizeof (passArgs));
199 bzero ((char *) &taskStart, sizeof (taskStart));
200
201 /* parse arguments, put them in passArgs */
202
203 parse_args (args, &passArgs);
204
205 if (passArgs.arg_array_len == 0)
206 error ("You must specify a function name to run, and arguments if any");
207
208 status = net_clnt_call (PROCESS_START, xdr_arg_array, &passArgs,
209 xdr_TASK_START, &taskStart);
210
211 if ((status != RPC_SUCCESS) || (taskStart.status == -1))
212 error ("Can't create process on remote target machine");
213
214 /* Save the name of the running function */
215 vx_running = savestring (passArgs.arg_array_val[0],
216 strlen (passArgs.arg_array_val[0]));
217
218 #ifdef CREATE_INFERIOR_HOOK
219 CREATE_INFERIOR_HOOK (pid);
220 #endif
221
222 push_target (&vx_run_ops);
223 inferior_pid = taskStart.pid;
224
225 /* We will get a trace trap after one instruction.
226 Insert breakpoints and continue. */
227
228 init_wait_for_inferior ();
229
230 /* Set up the "saved terminal modes" of the inferior
231 based on what modes we are starting it with. */
232 target_terminal_init ();
233
234 /* Install inferior's terminal modes. */
235 target_terminal_inferior ();
236
237 stop_soon_quietly = 1;
238 wait_for_inferior (); /* Get the task spawn event */
239 stop_soon_quietly = 0;
240
241 /* insert_step_breakpoint (); FIXME, do we need this? */
242 proceed(-1, -1, 0);
243 }
244
245 /* Fill ARGSTRUCT in argc/argv form with the arguments from the
246 argument string ARGSTRING. */
247
248 static void
249 parse_args (arg_string, arg_struct)
250 register char *arg_string;
251 arg_array *arg_struct;
252 {
253 register int arg_count = 0; /* number of arguments */
254 register int arg_index = 0;
255 register char *p0;
256
257 bzero ((char *) arg_struct, sizeof (arg_array));
258
259 /* first count how many arguments there are */
260
261 p0 = arg_string;
262 while (*p0 != '\0')
263 {
264 if (*(p0 = skip_white_space (p0)) == '\0')
265 break;
266 p0 = find_white_space (p0);
267 arg_count++;
268 }
269
270 arg_struct->arg_array_len = arg_count;
271 arg_struct->arg_array_val = (char **) xmalloc ((arg_count + 1)
272 * sizeof (char *));
273
274 /* now copy argument strings into arg_struct. */
275
276 while (*(arg_string = skip_white_space (arg_string)))
277 {
278 p0 = find_white_space (arg_string);
279 arg_struct->arg_array_val[arg_index++] = savestring (arg_string,
280 p0 - arg_string);
281 arg_string = p0;
282 }
283
284 arg_struct->arg_array_val[arg_count] = NULL;
285 }
286
287 /* Advance a string pointer across whitespace and return a pointer
288 to the first non-white character. */
289
290 static char *
291 skip_white_space (p)
292 register char *p;
293 {
294 while (*p == ' ' || *p == '\t')
295 p++;
296 return p;
297 }
298
299 /* Search for the first unquoted whitespace character in a string.
300 Returns a pointer to the character, or to the null terminator
301 if no whitespace is found. */
302
303 static char *
304 find_white_space (p)
305 register char *p;
306 {
307 register int c;
308
309 while ((c = *p) != ' ' && c != '\t' && c)
310 {
311 if (c == '\'' || c == '"')
312 {
313 while (*++p != c && *p)
314 {
315 if (*p == '\\')
316 p++;
317 }
318 if (!*p)
319 break;
320 }
321 p++;
322 }
323 return p;
324 }
325
326 /* Poll the VxWorks target system for an event related
327 to the debugged task.
328 Returns -1 if remote wait failed, task status otherwise. */
329
330 int
331 net_wait (pEvent)
332 RDB_EVENT *pEvent;
333 {
334 int pid;
335 enum clnt_stat status;
336
337 bzero ((char *) pEvent, sizeof (RDB_EVENT));
338
339 pid = inferior_pid;
340 status = net_clnt_call (PROCESS_WAIT, xdr_int, &pid, xdr_RDB_EVENT, pEvent);
341
342 return (status == RPC_SUCCESS)? pEvent->status: -1;
343 }
344
345 /* Suspend the remote task.
346 Returns -1 if suspend fails on target system, 0 otherwise. */
347
348 int
349 net_quit ()
350 {
351 int pid;
352 int quit_status;
353 enum clnt_stat status;
354
355 quit_status = 0;
356
357 /* don't let rdbTask suspend itself by passing a pid of 0 */
358
359 if ((pid = inferior_pid) == 0)
360 return -1;
361
362 status = net_clnt_call (VX_TASK_SUSPEND, xdr_int, &pid, xdr_int,
363 &quit_status);
364
365 return (status == RPC_SUCCESS)? quit_status: -1;
366 }
367
368 /* Read a register or registers from the remote system. */
369
370 int
371 vx_read_register (regno)
372 int regno;
373 {
374 int status;
375 Rptrace ptrace_in;
376 Ptrace_return ptrace_out;
377 struct regs inferior_registers;
378 struct fp_status inferior_fp_registers;
379 extern char registers[];
380
381 bzero ((char *) &ptrace_in, sizeof (ptrace_in));
382 bzero ((char *) &ptrace_out, sizeof (ptrace_out));
383
384 /* FIXME, eventually only get the ones we need. */
385 registers_fetched ();
386
387 ptrace_in.pid = inferior_pid;
388 ptrace_out.info.more_data = (caddr_t) &inferior_registers;
389 status = net_ptrace_clnt_call (PTRACE_GETREGS, &ptrace_in, &ptrace_out);
390 if (status)
391 error (rpcerr);
392 if (ptrace_out.status == -1)
393 {
394 errno = ptrace_out.errno;
395 return -1;
396 }
397
398 #ifdef I80960
399
400 bcopy ((char *) inferior_registers.r_lreg,
401 &registers[REGISTER_BYTE (R0_REGNUM)], 16 * sizeof (int));
402 bcopy ((char *) inferior_registers.r_greg,
403 &registers[REGISTER_BYTE (G0_REGNUM)], 16 * sizeof (int));
404
405 /* Don't assume that a location in registers[] is properly aligned. */
406
407 bcopy ((char *) &inferior_registers.r_pcw,
408 &registers[REGISTER_BYTE (PCW_REGNUM)], sizeof (int));
409 bcopy ((char *) &inferior_registers.r_acw,
410 &registers[REGISTER_BYTE (ACW_REGNUM)], sizeof (int));
411 bcopy ((char *) &inferior_registers.r_lreg[2], /* r2 (RIP) -> IP */
412 &registers[REGISTER_BYTE (IP_REGNUM)], sizeof (int));
413 bcopy ((char *) &inferior_registers.r_tcw,
414 &registers[REGISTER_BYTE (TCW_REGNUM)], sizeof (int));
415
416 /* If the target has floating point registers, fetch them.
417 Otherwise, zero the floating point register values in
418 registers[] for good measure, even though we might not
419 need to. */
420
421 if (target_has_fp)
422 {
423 ptrace_in.pid = inferior_pid;
424 ptrace_out.info.more_data = (caddr_t) &inferior_fp_registers;
425 status = net_ptrace_clnt_call (PTRACE_GETFPREGS, &ptrace_in, &ptrace_out);
426 if (status)
427 error (rpcerr);
428 if (ptrace_out.status == -1)
429 {
430 errno = ptrace_out.errno;
431 return -1;
432 }
433
434 bcopy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
435 REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
436 }
437 else
438 {
439 bzero ((char *) &registers[REGISTER_BYTE (FP0_REGNUM)],
440 REGISTER_RAW_SIZE (FP0_REGNUM) * 4);
441 }
442
443 #else /* not 960, thus must be 68000: FIXME! */
444
445 bcopy (&inferior_registers, registers, 16 * 4);
446 *(int *)&registers[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
447 *(int *)&registers[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
448
449 if (target_has_fp)
450 {
451 ptrace_in.pid = inferior_pid;
452 ptrace_out.info.more_data = (caddr_t) &inferior_fp_registers;
453 status = net_ptrace_clnt_call (PTRACE_GETFPREGS, &ptrace_in, &ptrace_out);
454 if (status)
455 error (rpcerr);
456 if (ptrace_out.status == -1)
457 {
458 errno = ptrace_out.errno;
459 return -1;
460 }
461
462 bcopy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
463 sizeof inferior_fp_registers.fps_regs);
464 bcopy (&inferior_fp_registers.fps_control,
465 &registers[REGISTER_BYTE (FPC_REGNUM)],
466 sizeof inferior_fp_registers - sizeof inferior_fp_registers.fps_regs);
467 }
468 else
469 {
470 bzero (&registers[REGISTER_BYTE (FP0_REGNUM)],
471 sizeof inferior_fp_registers.fps_regs);
472 bzero (&registers[REGISTER_BYTE (FPC_REGNUM)],
473 sizeof inferior_fp_registers - sizeof inferior_fp_registers.fps_regs);
474 }
475 #endif /* various architectures */
476
477 return 0;
478 }
479
480 /* Prepare to store registers. Since we will store all of them,
481 read out their current values now. */
482
483 void
484 vx_prepare_to_store ()
485 {
486 vx_read_register (-1);
487 }
488
489
490 /* Store our register values back into the inferior.
491 If REGNO is -1, do this for all registers.
492 Otherwise, REGNO specifies which register (so we can save time). */
493 /* FIXME, look at REGNO to save time here */
494
495 vx_write_register (regno)
496 int regno;
497 {
498 struct regs inferior_registers;
499 struct fp_status inferior_fp_registers;
500 extern char registers[];
501 int status;
502 Rptrace ptrace_in;
503 Ptrace_return ptrace_out;
504
505 bzero ((char *) &ptrace_in, sizeof (ptrace_in));
506 bzero ((char *) &ptrace_out, sizeof (ptrace_out));
507
508 #ifdef I80960
509
510 bcopy (&registers[REGISTER_BYTE (R0_REGNUM)],
511 (char *) inferior_registers.r_lreg, 16 * sizeof (int));
512 bcopy (&registers[REGISTER_BYTE (G0_REGNUM)],
513 (char *) inferior_registers.r_greg, 16 * sizeof (int));
514
515 /* Don't assume that a location in registers[] is properly aligned. */
516
517 bcopy (&registers[REGISTER_BYTE (PCW_REGNUM)],
518 (char *) &inferior_registers.r_pcw, sizeof (int));
519 bcopy (&registers[REGISTER_BYTE (ACW_REGNUM)],
520 (char *) &inferior_registers.r_acw, sizeof (int));
521 bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)],
522 (char *) &inferior_registers.r_tcw, sizeof (int));
523
524 #else /* not 960 -- assume 68k -- FIXME */
525
526 bcopy (registers, &inferior_registers, 16 * 4);
527 inferior_registers.r_ps = *(int *)&registers[REGISTER_BYTE (PS_REGNUM)];
528 inferior_registers.r_pc = *(int *)&registers[REGISTER_BYTE (PC_REGNUM)];
529
530 #endif /* Different register sets */
531
532 ptrace_in.pid = inferior_pid;
533 ptrace_in.info.ttype = REGS;
534 ptrace_in.info.more_data = (caddr_t) &inferior_registers;
535
536 /* XXX change second param to be a proc number */
537 status = net_ptrace_clnt_call (PTRACE_SETREGS, &ptrace_in, &ptrace_out);
538 if (status)
539 error (rpcerr);
540 if (ptrace_out.status == -1)
541 {
542 errno = ptrace_out.errno;
543 return -1;
544 }
545
546 /* Store floating point registers if the target has them. */
547
548 if (target_has_fp)
549 {
550 #ifdef I80960
551
552 bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
553 sizeof inferior_fp_registers.fps_regs);
554
555 #else /* not 960 -- assume 68k -- FIXME */
556
557 bcopy (&registers[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
558 sizeof inferior_fp_registers.fps_regs);
559 bcopy (&registers[REGISTER_BYTE (FPC_REGNUM)],
560 &inferior_fp_registers.fps_control,
561 sizeof inferior_fp_registers - sizeof inferior_fp_registers.fps_regs);
562
563 #endif /* Different register sets */
564
565 ptrace_in.pid = inferior_pid;
566 ptrace_in.info.ttype = FPREGS;
567 ptrace_in.info.more_data = (caddr_t) &inferior_fp_registers;
568
569 status = net_ptrace_clnt_call (PTRACE_SETFPREGS, &ptrace_in, &ptrace_out);
570 if (status)
571 error (rpcerr);
572 if (ptrace_out.status == -1)
573 {
574 errno = ptrace_out.errno;
575 return -1;
576 }
577 }
578 return 0;
579 }
580
581 /* Copy LEN bytes to or from remote inferior's memory starting at MEMADDR
582 to debugger memory starting at MYADDR. WRITE is true if writing to the
583 inferior.
584 Result is the number of bytes written or read (zero if error). The
585 protocol allows us to return a negative count, indicating that we can't
586 handle the current address but can handle one N bytes further, but
587 vxworks doesn't give us that information. */
588
589 int
590 vx_xfer_memory (memaddr, myaddr, len, write, target)
591 CORE_ADDR memaddr;
592 char *myaddr;
593 int len;
594 int write;
595 struct target_ops *target; /* ignored */
596 {
597 int status;
598 Rptrace ptrace_in;
599 Ptrace_return ptrace_out;
600 C_bytes data;
601
602 bzero ((char *) &ptrace_in, sizeof (ptrace_in));
603 bzero ((char *) &ptrace_out, sizeof (ptrace_out));
604
605 ptrace_in.pid = inferior_pid; /* XXX pid unnecessary for READDATA */
606 ptrace_in.addr = (int) memaddr; /* Where from */
607 ptrace_in.data = len; /* How many bytes */
608
609 if (write)
610 {
611 ptrace_in.info.ttype = DATA;
612 ptrace_in.info.more_data = (caddr_t) &data;
613
614 data.bytes = (caddr_t) myaddr; /* Where from */
615 data.len = len; /* How many bytes (again, for XDR) */
616
617 /* XXX change second param to be a proc number */
618 status = net_ptrace_clnt_call (PTRACE_WRITEDATA, &ptrace_in, &ptrace_out);
619 }
620 else
621 {
622 ptrace_out.info.more_data = (caddr_t) &data;
623 data.bytes = myaddr; /* Where to */
624 data.len = len; /* How many (again, for XDR) */
625
626 /* XXX change second param to be a proc number */
627 status = net_ptrace_clnt_call (PTRACE_READDATA, &ptrace_in, &ptrace_out);
628 }
629
630 if (status)
631 error (rpcerr);
632 if (ptrace_out.status == -1)
633 {
634 return 0; /* No bytes moved */
635 }
636 return len; /* Moved *all* the bytes */
637 }
638
639 void
640 vx_files_info ()
641 {
642 printf ("\tAttached to host `%s'", vx_host);
643 printf (", which has %sfloating point", target_has_fp? "": "no ");
644 printf (".\n");
645 }
646
647 void
648 vx_run_files_info ()
649 {
650 printf ("\tRunning %s VxWorks process %s",
651 vx_running? "child": "attached",
652 local_hex_string(inferior_pid));
653 if (vx_running)
654 printf (", function `%s'", vx_running);
655 printf(".\n");
656 }
657
658 void
659 vx_resume (step, siggnal)
660 int step;
661 int siggnal;
662 {
663 int status;
664 Rptrace ptrace_in;
665 Ptrace_return ptrace_out;
666
667 if (siggnal != 0 && siggnal != stop_signal)
668 error ("Cannot send signals to VxWorks processes");
669
670 bzero ((char *) &ptrace_in, sizeof (ptrace_in));
671 bzero ((char *) &ptrace_out, sizeof (ptrace_out));
672
673 ptrace_in.pid = inferior_pid;
674 ptrace_in.addr = 1; /* Target side insists on this, or it panics. */
675
676 /* XXX change second param to be a proc number */
677 status = net_ptrace_clnt_call (step? PTRACE_SINGLESTEP: PTRACE_CONT,
678 &ptrace_in, &ptrace_out);
679 if (status)
680 error (rpcerr);
681 if (ptrace_out.status == -1)
682 {
683 errno = ptrace_out.errno;
684 perror_with_name ("Resuming remote process");
685 }
686 }
687
688 void
689 vx_mourn_inferior ()
690 {
691 pop_target (); /* Pop back to no-child state */
692 generic_mourn_inferior ();
693 }
694
695 \f
696 /* This function allows the addition of incrementally linked object files. */
697
698 void
699 vx_load_command (arg_string, from_tty)
700 char* arg_string;
701 int from_tty;
702 {
703 CORE_ADDR text_addr;
704 CORE_ADDR data_addr;
705 CORE_ADDR bss_addr;
706
707 if (arg_string == 0)
708 error ("The load command takes a file name");
709
710 arg_string = tilde_expand (arg_string);
711 make_cleanup (free, arg_string);
712
713 dont_repeat ();
714
715 QUIT;
716 immediate_quit++;
717 if (net_load (arg_string, &text_addr, &data_addr, &bss_addr) == -1)
718 error ("Load failed on target machine");
719 immediate_quit--;
720
721 /* FIXME, for now we ignore data_addr and bss_addr. */
722 symbol_file_add (arg_string, from_tty, text_addr, 0);
723 }
724
725 #ifdef FIXME /* Not ready for prime time */
726 /* Single step the target program at the source or machine level.
727 Takes an error exit if rpc fails.
728 Returns -1 if remote single-step operation fails, else 0. */
729
730 static int
731 net_step ()
732 {
733 enum clnt_stat status;
734 int step_status;
735 SOURCE_STEP source_step;
736
737 source_step.taskId = inferior_pid;
738
739 if (step_range_end)
740 {
741 source_step.startAddr = step_range_start;
742 source_step.endAddr = step_range_end;
743 }
744 else
745 {
746 source_step.startAddr = 0;
747 source_step.endAddr = 0;
748 }
749
750 status = net_clnt_call (VX_SOURCE_STEP, xdr_SOURCE_STEP, &source_step,
751 xdr_int, &step_status);
752
753 if (status == RPC_SUCCESS)
754 return step_status;
755 else
756 error (rpcerr);
757 }
758 #endif
759
760 /* Emulate ptrace using RPC calls to the VxWorks target system.
761 Returns nonzero (-1) if RPC status to VxWorks is bad, 0 otherwise. */
762
763 static int
764 net_ptrace_clnt_call (request, pPtraceIn, pPtraceOut)
765 enum ptracereq request;
766 Rptrace *pPtraceIn;
767 Ptrace_return *pPtraceOut;
768 {
769 enum clnt_stat status;
770
771 status = net_clnt_call (request, xdr_rptrace, pPtraceIn, xdr_ptrace_return,
772 pPtraceOut);
773
774 if (status != RPC_SUCCESS)
775 return -1;
776
777 return 0;
778 }
779
780 /* Query the target for the name of the file from which VxWorks was
781 booted. pBootFile is the address of a pointer to the buffer to
782 receive the file name; if the pointer pointed to by pBootFile is
783 NULL, memory for the buffer will be allocated by XDR.
784 Returns -1 if rpc failed, 0 otherwise. */
785
786 int
787 net_get_boot_file (pBootFile)
788 char **pBootFile;
789 {
790 enum clnt_stat status;
791
792 status = net_clnt_call (VX_BOOT_FILE_INQ, xdr_void, (char *) 0,
793 xdr_wrapstring, pBootFile);
794 return (status == RPC_SUCCESS) ? 0 : -1;
795 }
796
797 /* Fetch a list of loaded object modules from the VxWorks target.
798 Returns -1 if rpc failed, 0 otherwise
799 There's no way to check if the returned loadTable is correct.
800 VxWorks doesn't check it. */
801
802 int
803 net_get_symbols (pLoadTable)
804 ldtabl *pLoadTable; /* return pointer to ldtabl here */
805 {
806 enum clnt_stat status;
807
808 bzero ((char *) pLoadTable, sizeof (struct ldtabl));
809
810 status = net_clnt_call (VX_STATE_INQ, xdr_void, 0, xdr_ldtabl, pLoadTable);
811 return (status == RPC_SUCCESS) ? 0 : -1;
812 }
813
814 /* Look up a symbol in the VxWorks target's symbol table.
815 Returns status of symbol read on target side (0=success, -1=fail)
816 Returns -1 and complain()s if rpc fails. */
817
818 struct complaint cant_contact_target =
819 {"Lost contact with VxWorks target", 0, 0};
820
821 int
822 vx_lookup_symbol (name, pAddr)
823 char *name; /* symbol name */
824 CORE_ADDR *pAddr;
825 {
826 enum clnt_stat status;
827 SYMBOL_ADDR symbolAddr;
828
829 *pAddr = 0;
830 bzero ((char *) &symbolAddr, sizeof (symbolAddr));
831
832 status = net_clnt_call (VX_SYMBOL_INQ, xdr_wrapstring, &name,
833 xdr_SYMBOL_ADDR, &symbolAddr);
834 if (status != RPC_SUCCESS) {
835 complain (&cant_contact_target, 0);
836 return -1;
837 }
838
839 *pAddr = symbolAddr.addr;
840 return symbolAddr.status;
841 }
842
843 /* Check to see if the VxWorks target has a floating point coprocessor.
844 Returns 1 if target has floating point processor, 0 otherwise.
845 Calls error() if rpc fails. */
846
847 int
848 net_check_for_fp ()
849 {
850 enum clnt_stat status;
851 bool_t fp = 0; /* true if fp processor is present on target board */
852
853 status = net_clnt_call (VX_FP_INQUIRE, xdr_void, 0, xdr_bool, &fp);
854 if (status != RPC_SUCCESS)
855 error (rpcerr);
856
857 return (int) fp;
858 }
859
860 /* Establish an RPC connection with the VxWorks target system.
861 Calls error () if unable to establish connection. */
862
863 void
864 net_connect (host)
865 char *host;
866 {
867 struct sockaddr_in destAddr;
868 struct hostent *destHost;
869
870 /* get the internet address for the given host */
871
872 if ((destHost = (struct hostent *) gethostbyname (host)) == NULL)
873 error ("Invalid hostname. Couldn't find remote host address.");
874
875 bzero (&destAddr, sizeof (destAddr));
876
877 destAddr.sin_addr.s_addr = * (u_long *) destHost->h_addr;
878 destAddr.sin_family = AF_INET;
879 destAddr.sin_port = 0; /* set to actual port that remote
880 ptrace is listening on. */
881
882 /* Create a tcp client transport on which to issue
883 calls to the remote ptrace server. */
884
885 ptraceSock = RPC_ANYSOCK;
886 pClient = clnttcp_create (&destAddr, RDBPROG, RDBVERS, &ptraceSock, 0, 0);
887 /* FIXME, here is where we deal with different version numbers of the proto */
888
889 if (pClient == NULL)
890 {
891 clnt_pcreateerror ("\tnet_connect");
892 error ("Couldn't connect to remote target.");
893 }
894 }
895 \f
896 /* Sleep for the specified number of milliseconds
897 * (assumed to be less than 1000).
898 * If select () is interrupted, returns immediately;
899 * takes an error exit if select () fails for some other reason.
900 */
901
902 static void
903 sleep_ms (ms)
904 long ms;
905 {
906 struct timeval select_timeout;
907 int status;
908
909 select_timeout.tv_sec = 0;
910 select_timeout.tv_usec = ms * 1000;
911
912 status = select (0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, &select_timeout);
913
914 if (status < 0 && errno != EINTR)
915 perror_with_name ("select");
916 }
917
918 /* Wait for control to return from inferior to debugger.
919 If inferior gets a signal, we may decide to start it up again
920 instead of returning. That is why there is a loop in this function.
921 When this function actually returns it means the inferior
922 should be left stopped and GDB should read more commands. */
923
924 /* For network debugging with VxWorks.
925 * VxWorks knows when tasks hit breakpoints, receive signals, exit, etc,
926 * so vx_wait() receives this information directly from
927 * VxWorks instead of trying to figure out what happenned via a wait() call.
928 */
929
930 static int
931 vx_wait (status)
932 int *status;
933 {
934 register int pid;
935 WAITTYPE w;
936 RDB_EVENT rdbEvent;
937 int quit_failed;
938
939 do
940 {
941 /* If CTRL-C is hit during this loop,
942 suspend the inferior process. */
943
944 quit_failed = 0;
945 if (quit_flag)
946 {
947 quit_failed = (net_quit () == -1);
948 quit_flag = 0;
949 }
950
951 /* If a net_quit () or net_wait () call has failed,
952 allow the user to break the connection with the target.
953 We can't simply error () out of this loop, since the
954 data structures representing the state of the inferior
955 are in an inconsistent state. */
956
957 if (quit_failed || net_wait (&rdbEvent) == -1)
958 {
959 terminal_ours ();
960 if (query ("Can't %s. Disconnect from target system? ",
961 (quit_failed) ? "suspend remote task"
962 : "get status of remote task"))
963 {
964 target_mourn_inferior();
965 error ("Use the \"target\" command to reconnect.");
966 }
967 else
968 {
969 terminal_inferior ();
970 continue;
971 }
972 }
973
974 pid = rdbEvent.taskId;
975 if (pid == 0)
976 {
977 sleep_ms (200); /* FIXME Don't kill the network too badly */
978 }
979 else if (pid != inferior_pid)
980 fatal ("Bad pid for debugged task: %s\n", local_hex_string(pid));
981 } while (pid == 0);
982
983 /* FIXME, eventually do more then SIGTRAP on everything... */
984 switch (rdbEvent.eventType)
985 {
986 case EVENT_EXIT:
987 WSETEXIT (w, 0);
988 /* FIXME is it possible to distinguish between a
989 XXX normal vs abnormal exit in VxWorks? */
990 break;
991
992 case EVENT_START: /* Task was just started. */
993 WSETSTOP (w, SIGTRAP);
994 break;
995
996 case EVENT_STOP:
997 WSETSTOP (w, SIGTRAP);
998 /* XXX was it stopped by a signal? act accordingly */
999 break;
1000
1001 case EVENT_BREAK: /* Breakpoint was hit. */
1002 WSETSTOP (w, SIGTRAP);
1003 break;
1004
1005 case EVENT_SUSPEND: /* Task was suspended, probably by ^C. */
1006 WSETSTOP (w, SIGINT);
1007 break;
1008
1009 case EVENT_BUS_ERR: /* Task made evil nasty reference. */
1010 WSETSTOP (w, SIGBUS);
1011 break;
1012
1013 case EVENT_ZERO_DIV: /* Division by zero */
1014 WSETSTOP (w, SIGFPE); /* Like Unix, call it a float exception. */
1015
1016 case EVENT_SIGNAL:
1017 /* The target is not running Unix, and its
1018 faults/traces do not map nicely into Unix signals.
1019 Make sure they do not get confused with Unix signals
1020 by numbering them with values higher than the highest
1021 legal Unix signal. code in the arch-dependent PRINT_RANDOM_SIGNAL
1022 routine will interpret the value for wait_for_inferior. */
1023 WSETSTOP (w, rdbEvent.sigType + NSIG);
1024 break;
1025 } /* switch */
1026 *status = *(int *)&w; /* Grumble union wait crap Grumble */
1027 return pid;
1028 }
1029 \f
1030 static int
1031 symbol_stub (arg)
1032 char *arg;
1033 {
1034 symbol_file_command (arg, 0);
1035 return 1;
1036 }
1037
1038 static int
1039 add_symbol_stub (arg)
1040 char *arg;
1041 {
1042 struct ldfile *pLoadFile = (struct ldfile *)arg;
1043
1044 printf("\t%s: ", pLoadFile->name);
1045 symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0);
1046 printf ("ok\n");
1047 return 1;
1048 }
1049 /* Target command for VxWorks target systems.
1050
1051 Used in vxgdb. Takes the name of a remote target machine
1052 running vxWorks and connects to it to initialize remote network
1053 debugging. */
1054
1055 static void
1056 vx_open (args, from_tty)
1057 char *args;
1058 int from_tty;
1059 {
1060 extern int close ();
1061 char *bootFile;
1062 extern char *source_path;
1063 struct ldtabl loadTable;
1064 struct ldfile *pLoadFile;
1065 int i;
1066 extern CLIENT *pClient;
1067
1068 if (!args)
1069 error_no_arg ("target machine name");
1070
1071 target_preopen (from_tty);
1072
1073 unpush_target (&vx_ops);
1074 printf ("Attaching remote machine across net...\n");
1075 fflush (stdout);
1076
1077 /* Allow the user to kill the connect attempt by typing ^C.
1078 Wait until the call to target_has_fp () completes before
1079 disallowing an immediate quit, since even if net_connect ()
1080 is successful, the remote debug server might be hung. */
1081
1082 immediate_quit++;
1083
1084 net_connect (args);
1085 target_has_fp = net_check_for_fp ();
1086 printf_filtered ("Connected to %s.\n", args);
1087
1088 immediate_quit--;
1089
1090 push_target (&vx_ops);
1091
1092 /* Save a copy of the target host's name. */
1093 vx_host = savestring (args, strlen (args));
1094
1095 /* Find out the name of the file from which the target was booted
1096 and load its symbol table. */
1097
1098 printf_filtered ("Looking in Unix path for all loaded modules:\n");
1099 bootFile = NULL;
1100 if (!net_get_boot_file (&bootFile))
1101 {
1102 if (*bootFile) {
1103 printf_filtered ("\t%s: ", bootFile);
1104 if (catch_errors (symbol_stub, bootFile,
1105 "Error while reading symbols from boot file:\n"))
1106 puts_filtered ("ok\n");
1107 } else if (from_tty)
1108 printf ("VxWorks kernel symbols not loaded.\n");
1109 }
1110 else
1111 error ("Can't retrieve boot file name from target machine.");
1112
1113 clnt_freeres (pClient, xdr_wrapstring, &bootFile);
1114
1115 if (net_get_symbols (&loadTable) != 0)
1116 error ("Can't read loaded modules from target machine");
1117
1118 i = 0-1;
1119 while (++i < loadTable.tbl_size)
1120 {
1121 QUIT; /* FIXME, avoids clnt_freeres below: mem leak */
1122 pLoadFile = &loadTable.tbl_ent [i];
1123 #ifdef WRS_ORIG
1124 {
1125 register int desc;
1126 struct cleanup *old_chain;
1127 char *fullname = NULL;
1128
1129 desc = openp (source_path, 0, pLoadFile->name, O_RDONLY, 0, &fullname);
1130 if (desc < 0)
1131 perror_with_name (pLoadFile->name);
1132 old_chain = make_cleanup (close, desc);
1133 add_file_at_addr (fullname, desc, pLoadFile->txt_addr, pLoadFile->data_addr,
1134 pLoadFile->bss_addr);
1135 do_cleanups (old_chain);
1136 }
1137 #else
1138 /* Botches, FIXME:
1139 (1) Searches the PATH, not the source path.
1140 (2) data and bss are assumed to be at the usual offsets from text. */
1141 catch_errors (add_symbol_stub, (char *)pLoadFile, (char *)0);
1142 #endif
1143 }
1144 printf_filtered ("Done.\n");
1145
1146 clnt_freeres (pClient, xdr_ldtabl, &loadTable);
1147 }
1148 \f
1149 /* attach_command --
1150 takes a task started up outside of gdb and ``attaches'' to it.
1151 This stops it cold in its tracks and allows us to start tracing it. */
1152
1153 static void
1154 vx_attach (args, from_tty)
1155 char *args;
1156 int from_tty;
1157 {
1158 int pid;
1159 char *cptr = 0;
1160 Rptrace ptrace_in;
1161 Ptrace_return ptrace_out;
1162 int status;
1163
1164 dont_repeat();
1165
1166 if (!args)
1167 error_no_arg ("process-id to attach");
1168
1169 pid = strtol (args, &cptr, 0);
1170 if ((cptr == args) || (*cptr != '\0'))
1171 error ("Invalid process-id -- give a single number in decimal or 0xhex");
1172
1173 if (from_tty)
1174 printf ("Attaching pid %s.\n", local_hex_string(pid));
1175
1176 bzero ((char *)&ptrace_in, sizeof (ptrace_in));
1177 bzero ((char *)&ptrace_out, sizeof (ptrace_out));
1178 ptrace_in.pid = pid;
1179
1180 status = net_ptrace_clnt_call (PTRACE_ATTACH, &ptrace_in, &ptrace_out);
1181 if (status == -1)
1182 error (rpcerr);
1183 if (ptrace_out.status == -1)
1184 {
1185 errno = ptrace_out.errno;
1186 perror_with_name ("Attaching remote process");
1187 }
1188
1189 /* It worked... */
1190 push_target (&vx_run_ops);
1191 inferior_pid = pid;
1192 vx_running = 0;
1193
1194 mark_breakpoints_out ();
1195
1196 /* Set up the "saved terminal modes" of the inferior
1197 based on what modes we are starting it with. */
1198 target_terminal_init ();
1199
1200 /* Install inferior's terminal modes. */
1201 target_terminal_inferior ();
1202
1203 /* We will get a task spawn event immediately. */
1204 init_wait_for_inferior ();
1205 clear_proceed_status ();
1206 stop_soon_quietly = 1;
1207 wait_for_inferior ();
1208 stop_soon_quietly = 0;
1209 normal_stop ();
1210 }
1211
1212
1213 /* detach_command --
1214 takes a program previously attached to and detaches it.
1215 The program resumes execution and will no longer stop
1216 on signals, etc. We better not have left any breakpoints
1217 in the program or it'll die when it hits one. For this
1218 to work, it may be necessary for the process to have been
1219 previously attached. It *might* work if the program was
1220 started via the normal ptrace (PTRACE_TRACEME). */
1221
1222 static void
1223 vx_detach (args, from_tty)
1224 char *args;
1225 int from_tty;
1226 {
1227 Rptrace ptrace_in;
1228 Ptrace_return ptrace_out;
1229 int signal = 0;
1230 int status;
1231
1232 if (args)
1233 error ("Argument given to VxWorks \"detach\".");
1234
1235 if (from_tty)
1236 printf ("Detaching pid %s.\n", local_hex_string(inferior_pid));
1237
1238 if (args) /* FIXME, should be possible to leave suspended */
1239 signal = atoi (args);
1240
1241 bzero ((char *)&ptrace_in, sizeof (ptrace_in));
1242 bzero ((char *)&ptrace_out, sizeof (ptrace_out));
1243 ptrace_in.pid = inferior_pid;
1244
1245 status = net_ptrace_clnt_call (PTRACE_DETACH, &ptrace_in, &ptrace_out);
1246 if (status == -1)
1247 error (rpcerr);
1248 if (ptrace_out.status == -1)
1249 {
1250 errno = ptrace_out.errno;
1251 perror_with_name ("Detaching VxWorks process");
1252 }
1253
1254 inferior_pid = 0;
1255 pop_target (); /* go back to non-executing VxWorks connection */
1256 }
1257
1258 /* vx_kill -- takes a running task and wipes it out. */
1259
1260 static void
1261 vx_kill (args, from_tty)
1262 char *args;
1263 int from_tty;
1264 {
1265 Rptrace ptrace_in;
1266 Ptrace_return ptrace_out;
1267 int status;
1268
1269 if (args)
1270 error ("Argument given to VxWorks \"kill\".");
1271
1272 if (from_tty)
1273 printf ("Killing pid %s.\n", local_hex_string(inferior_pid));
1274
1275 bzero ((char *)&ptrace_in, sizeof (ptrace_in));
1276 bzero ((char *)&ptrace_out, sizeof (ptrace_out));
1277 ptrace_in.pid = inferior_pid;
1278
1279 status = net_ptrace_clnt_call (PTRACE_KILL, &ptrace_in, &ptrace_out);
1280 if (status == -1)
1281 error (rpcerr);
1282 if (ptrace_out.status == -1)
1283 {
1284 errno = ptrace_out.errno;
1285 perror_with_name ("Killing VxWorks process");
1286 }
1287
1288 /* If it gives good status, the process is *gone*, no events remain. */
1289 inferior_pid = 0;
1290 pop_target (); /* go back to non-executing VxWorks connection */
1291 }
1292
1293 /* Clean up from the VxWorks process target as it goes away. */
1294
1295 void
1296 vx_proc_close (quitting)
1297 int quitting;
1298 {
1299 inferior_pid = 0; /* No longer have a process. */
1300 if (vx_running)
1301 free (vx_running);
1302 vx_running = 0;
1303 }
1304 \f
1305 /* Cross-net conversion of floats to and from extended form.
1306 (This is needed because different target machines have different
1307 extended floating point formats.) */
1308
1309 /* Convert from an extended float to a double.
1310
1311 The extended float is stored as raw data pointed to by FROM.
1312 Return the converted value as raw data in the double pointed to by TO.
1313 */
1314
1315 static void
1316 vx_convert_to_virtual (regno, from, to)
1317 int regno;
1318 char *from;
1319 char *to;
1320 {
1321 enum clnt_stat status;
1322
1323 if (REGISTER_CONVERTIBLE (regno))
1324 {
1325 if (!target_has_fp) {
1326 *(double *)to = 0.0; /* Skip the trouble if no float anyway */
1327 return;
1328 }
1329
1330 status = net_clnt_call (VX_CONV_FROM_68881, xdr_ext_fp, from,
1331 xdr_double, to);
1332
1333 if (status == RPC_SUCCESS)
1334 return;
1335 else
1336 error (rpcerr);
1337 }
1338 else
1339 bcopy (from, to, REGISTER_VIRTUAL_SIZE (regno));
1340 }
1341
1342
1343 /* The converse: convert from a double to an extended float.
1344
1345 The double is stored as raw data pointed to by FROM.
1346 Return the converted value as raw data in the extended
1347 float pointed to by TO.
1348 */
1349
1350 static void
1351 vx_convert_from_virtual (regno, from, to)
1352 int regno;
1353 char *from;
1354 char *to;
1355 {
1356 enum clnt_stat status;
1357
1358 if (REGISTER_CONVERTIBLE (regno))
1359 {
1360 if (!target_has_fp) {
1361 bzero (to, REGISTER_RAW_SIZE (FP0_REGNUM)); /* Shrug */
1362 return;
1363 }
1364
1365 status = net_clnt_call (VX_CONV_TO_68881, xdr_double, from,
1366 xdr_ext_fp, to);
1367 if (status == RPC_SUCCESS)
1368 return;
1369 else
1370 error (rpcerr);
1371 }
1372 else
1373 bcopy (from, to, REGISTER_VIRTUAL_SIZE (regno));
1374 }
1375 \f
1376 /* Make an RPC call to the VxWorks target.
1377 Returns RPC status. */
1378
1379 static enum clnt_stat
1380 net_clnt_call (procNum, inProc, in, outProc, out)
1381 enum ptracereq procNum;
1382 xdrproc_t inProc;
1383 char *in;
1384 xdrproc_t outProc;
1385 char *out;
1386 {
1387 enum clnt_stat status;
1388
1389 status = clnt_call (pClient, procNum, inProc, in, outProc, out, rpcTimeout);
1390
1391 if (status != RPC_SUCCESS)
1392 clnt_perrno (status);
1393
1394 return status;
1395 }
1396
1397 /* Clean up before losing control. */
1398
1399 void
1400 vx_close (quitting)
1401 int quitting;
1402 {
1403 if (pClient)
1404 clnt_destroy (pClient); /* The net connection */
1405 pClient = 0;
1406
1407 if (vx_host)
1408 free (vx_host); /* The hostname */
1409 vx_host = 0;
1410 }
1411
1412 /* A vxprocess target should be started via "run" not "target". */
1413 /*ARGSUSED*/
1414 static void
1415 vx_proc_open (name, from_tty)
1416 char *name;
1417 int from_tty;
1418 {
1419 error ("Use the \"run\" command to start a VxWorks process.");
1420 }
1421
1422 /* Target ops structure for accessing memory and such over the net */
1423
1424 struct target_ops vx_ops = {
1425 "vxworks", "VxWorks target memory via RPC over TCP/IP",
1426 "Use VxWorks target memory. \n\
1427 Specify the name of the machine to connect to.",
1428 vx_open, vx_close, vx_attach, 0, /* vx_detach, */
1429 0, 0, /* resume, wait */
1430 0, 0, /* read_reg, write_reg */
1431 0, vx_convert_to_virtual, vx_convert_from_virtual, /* prep_to_store, */
1432 vx_xfer_memory, vx_files_info,
1433 0, 0, /* insert_breakpoint, remove_breakpoint */
1434 0, 0, 0, 0, 0, /* terminal stuff */
1435 0, /* vx_kill, */
1436 vx_load_command,
1437 0, /* call_function */
1438 vx_lookup_symbol,
1439 vx_create_inferior, 0, /* mourn_inferior */
1440 core_stratum, 0, /* next */
1441 1, 1, 0, 0, 0, /* all mem, mem, stack, regs, exec */
1442 0, 0, /* Section pointers */
1443 OPS_MAGIC, /* Always the last thing */
1444 };
1445
1446 /* Target ops structure for accessing VxWorks child processes over the net */
1447
1448 struct target_ops vx_run_ops = {
1449 "vxprocess", "VxWorks process",
1450 "VxWorks process, started by the \"run\" command.",
1451 vx_proc_open, vx_proc_close, 0, vx_detach, /* vx_attach */
1452 vx_resume, vx_wait,
1453 vx_read_register, vx_write_register,
1454 vx_prepare_to_store, vx_convert_to_virtual, vx_convert_from_virtual,
1455 vx_xfer_memory, vx_run_files_info,
1456 vx_insert_breakpoint, vx_remove_breakpoint,
1457 0, 0, 0, 0, 0, /* terminal stuff */
1458 vx_kill,
1459 vx_load_command,
1460 call_function_by_hand, /* FIXME, calling fns is maybe botched? */
1461 vx_lookup_symbol,
1462 0, vx_mourn_inferior,
1463 process_stratum, 0, /* next */
1464 0, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
1465 /* all_mem is off to avoid spurious msg in "i files" */
1466 0, 0, /* Section pointers */
1467 OPS_MAGIC, /* Always the last thing */
1468 };
1469 /* ==> Remember when reading at end of file, there are two "ops" structs here. */
1470 \f
1471 void
1472 _initialize_vx ()
1473 {
1474 add_target (&vx_ops);
1475 add_target (&vx_run_ops);
1476 }
This page took 0.084087 seconds and 4 git commands to generate.