1 /* GDB interface to ARM RDI library.
2 Copyright 1997 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
22 #include "gdb_string.h"
32 #include "gdb-stabs.h"
33 #include "gdbthread.h"
37 #include <sys/types.h>
42 #include "rdi-share/ardi.h"
43 #include "rdi-share/adp.h"
44 #include "rdi-share/hsys.h"
46 /* Prototypes for local functions */
48 static void arm_rdi_files_info PARAMS ((struct target_ops *ignore));
50 static int arm_rdi_xfer_memory PARAMS ((CORE_ADDR memaddr, char *myaddr,
51 int len, int should_write,
52 struct target_ops *target));
54 static void arm_rdi_prepare_to_store PARAMS ((void));
56 static void arm_rdi_fetch_registers PARAMS ((int regno));
58 static void arm_rdi_resume PARAMS ((int pid, int step,
59 enum target_signal siggnal));
61 static int arm_rdi_start_remote PARAMS ((char *dummy));
63 static void arm_rdi_open PARAMS ((char *name, int from_tty));
65 static void arm_rdi_create_inferior PARAMS ((char *exec_file, char *args,
68 static void arm_rdi_close PARAMS ((int quitting));
70 static void arm_rdi_store_registers PARAMS ((int regno));
72 static void arm_rdi_mourn PARAMS ((void));
74 static void arm_rdi_send PARAMS ((char *buf));
76 static int arm_rdi_wait PARAMS ((int pid, struct target_waitstatus *status));
78 static void arm_rdi_kill PARAMS ((void));
80 static void arm_rdi_detach PARAMS ((char *args, int from_tty));
82 static void arm_rdi_interrupt PARAMS ((int signo));
84 static void arm_rdi_interrupt_twice PARAMS ((int signo));
86 static void interrupt_query PARAMS ((void));
88 static int arm_rdi_insert_breakpoint PARAMS ((CORE_ADDR, char *));
90 static int arm_rdi_remove_breakpoint PARAMS ((CORE_ADDR, char *));
92 static char *rdi_error_message PARAMS ((int err));
94 static enum target_signal rdi_error_signal PARAMS ((int err));
96 extern struct target_ops arm_rdi_ops; /* Forward decl */
98 static struct Dbg_ConfigBlock gdb_config;
100 static struct Dbg_HostosInterface gdb_hostif;
102 static int max_load_size;
104 static int execute_status;
106 /* A little list of breakpoints that have been set. */
108 static struct local_bp_list_entry {
111 struct local_bp_list_entry *next;
115 /* Stub for catch_errors. */
118 arm_rdi_start_remote (dummy)
124 /* Helper callbacks for the "host interface" structure. RDI functions call
125 these to forward output from the target system and so forth. */
130 printf("void dummy\n");
134 myprint (arg, format, ap)
139 vfprintf (stdout, format, ap);
147 fputc (c, (FILE *) arg);
151 mywrite (arg, buffer, len)
156 return fwrite (buffer, 1, len, stdout);
165 /* These last two are tricky as we have to handle the special case of
166 being interrupted more carefully */
172 return fgetc (stdin);
176 mygets (arg, buffer, len)
181 return fgets(buffer, len, stdin);
184 /* Open a connection to a remote debugger. NAME is the filename used
185 for communication. */
188 arm_rdi_open (name, from_tty)
193 unsigned long arg1, arg2;
196 error ("To open an RDI connection, you need to specify what serial\n\
197 device is attached to the remote system (e.g. /dev/ttya).");
199 /* Make the basic low-level connection. */
201 rslt = Adp_OpenDevice (NULL, NULL, 1);
204 error ("Could not open port");
206 gdb_config.bytesex = 2 | (target_byte_order == BIG_ENDIAN ? 1 : 0);
208 gdb_config.rditype = 2;
209 gdb_config.heartbeat_on = 1;
210 gdb_config.flags = 2;
212 gdb_hostif.dbgprint = myprint;
213 gdb_hostif.dbgpause = mypause;
214 gdb_hostif.dbgarg = stdout;
215 gdb_hostif.writec = mywritec;
216 gdb_hostif.readc = myreadc;
217 gdb_hostif.write = mywrite;
218 gdb_hostif.gets = mygets;
219 gdb_hostif.hostosarg = stdout;
220 gdb_hostif.reset = voiddummy;
222 rslt = angel_RDI_open (10, &gdb_config, &gdb_hostif, NULL);
223 if (rslt == RDIError_BigEndian || rslt == RDIError_LittleEndian)
224 ; /* do nothing, this is the expected return */
227 printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
230 rslt = angel_RDI_info (RDIInfo_Target, &arg1, &arg2);
233 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
235 rslt = angel_RDI_info (RDIInfo_Points, &arg1, &arg2);
238 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
240 rslt = angel_RDI_info (RDIInfo_Step, &arg1, &arg2);
243 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
245 rslt = angel_RDI_info (RDIInfo_CoPro, &arg1, &arg2);
248 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
250 rslt = angel_RDI_info (RDIInfo_SemiHosting, &arg1, &arg2);
253 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
257 ** There's no point asking if the target's an ICEBreaker, unless
258 ** you're going to do something with the answer. All it does is provoke
259 ** an error message on non-ICE targets
260 rslt = angel_RDI_info (RDIInfo_Icebreaker, & arg1, & arg2);
263 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
268 ** There's no point asking if the target can accept a configuration download,
269 ** unless you're going to do something with the answer. All it does is
270 ** provoke an error message on non-ICE targets
271 rslt = angel_RDI_info (RDIInfo_DownLoad, & arg1, & arg2);
274 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
278 rslt = angel_RDI_info (RDIInfo_GetLoadSize, &arg1, &arg2);
281 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
283 max_load_size = arg1;
285 push_target (&arm_rdi_ops);
287 target_fetch_registers (-1);
289 rslt = angel_RDI_open (1, &gdb_config, NULL, NULL);
292 printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
296 rslt = angel_RDI_info (RDIVector_Catch, &arg1, &arg2);
299 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
302 arg1 = (unsigned long) "";
303 rslt = angel_RDI_info (RDISet_Cmdline, &arg1, &arg2);
306 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
309 /* Clear out any existing records of breakpoints. */
311 struct local_bp_list_entry *entry, *preventry = NULL;
313 for (entry = local_bp_list; entry != NULL; entry = entry->next)
320 printf_filtered ("Connected to ARM RDI target.\n");
323 /* Start an inferior process and set inferior_pid to its pid.
324 EXEC_FILE is the file to run.
325 ARGS is a string containing the arguments to the program.
326 ENV is the environment vector to pass. Errors reported with error().
327 On VxWorks and various standalone systems, we ignore exec_file. */
328 /* This is called not only when we first attach, but also when the
329 user types "run" after having attached. */
332 arm_rdi_create_inferior (exec_file, args, env)
338 unsigned long arg1, arg2;
340 CORE_ADDR entry_point;
342 if (exec_file == 0 || exec_bfd == 0)
343 error ("No exec file specified.");
345 entry_point = (CORE_ADDR) bfd_get_start_address (exec_bfd);
348 remove_breakpoints ();
349 init_wait_for_inferior ();
351 len = strlen (exec_file) + 1 + strlen (args) + 1 + /*slop*/ 10;
352 arg_buf = (char *) alloca (len);
354 strcat (arg_buf, exec_file);
355 strcat (arg_buf, " ");
356 strcat (arg_buf, args);
359 insert_breakpoints (); /* Needed to get correct instruction in cache */
365 if (strncmp(*env, "MEMSIZE=", sizeof("MEMSIZE=")-1)==0)
367 unsigned long top_of_memory;
370 /* Set up memory limit */
371 top_of_memory = strtoul(*env + sizeof("MEMSIZE=")-1,
373 printf_filtered ("Setting top-of-memory to 0x%x\n",
376 rslt=angel_RDI_info (RDIInfo_SetTopMem, &top_of_memory, &arg2);
379 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
386 arg1 = (unsigned long) arg_buf;
387 rslt = angel_RDI_info (RDISet_Cmdline, /* &arg1 */ (unsigned long *)arg_buf, &arg2);
390 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
393 proceed (entry_point, TARGET_SIGNAL_DEFAULT, 0);
396 /* This takes a program previously attached to and detaches it. After
397 this is done, GDB can be used to debug some other program. We
398 better not have left any breakpoints in the target program or it'll
399 die when it hits one. */
402 arm_rdi_detach (args, from_tty)
406 /* (anything to do?) */
409 /* Clean up connection to a remote debugger. */
412 arm_rdi_close (quitting)
417 rslt = angel_RDI_close ();
420 printf_filtered ("RDI_close: %s\n", rdi_error_message (rslt));
424 /* Tell the remote machine to resume. */
427 arm_rdi_resume (pid, step, siggnal)
429 enum target_signal siggnal;
434 if (0 /* turn on when hardware supports single-stepping */)
436 rslt = angel_RDI_step (1, &point);
439 printf_filtered ("RDI_step: %s\n", rdi_error_message (rslt));
449 pc = read_register (PC_REGNUM);
450 pc = arm_get_next_pc (pc);
451 arm_rdi_insert_breakpoint (pc, handle);
453 execute_status = rslt = angel_RDI_execute (&point);
454 if (rslt == RDIError_BreakpointReached)
458 printf_filtered ("RDI_execute: %s\n", rdi_error_message (rslt));
462 arm_rdi_remove_breakpoint (pc, handle);
467 /* Send ^C to target to halt it. Target will respond, and send us a
471 arm_rdi_interrupt (signo)
476 static void (*ofunc)();
478 /* The user typed ^C twice. */
480 arm_rdi_interrupt_twice (signo)
485 /* Ask the user what to do when an interrupt is received. */
492 /* Wait until the remote machine stops, then return, storing status in
493 STATUS just as `wait' would. Returns "pid" (though it's not clear
494 what, if anything, that means in the case of this target). */
497 arm_rdi_wait (pid, status)
499 struct target_waitstatus *status;
501 status->kind = execute_status == RDIError_NoError ?
502 TARGET_WAITKIND_EXITED : TARGET_WAITKIND_STOPPED;
504 /* convert stopped code from target into right signal */
505 status->value.sig = rdi_error_signal ( execute_status );
510 /* Read the remote registers into the block REGS. */
514 arm_rdi_fetch_registers (regno)
517 int rslt, rdi_regmask;
518 unsigned long rawreg, rawregs[32];
523 rslt = angel_RDI_CPUread (255, 0x27fff, rawregs);
526 printf_filtered ("RDI_CPUread: %s\n", rdi_error_message (rslt));
529 for (regno = 0; regno < 15; regno++)
531 store_unsigned_integer (cookedreg, 4, rawregs[regno]);
532 supply_register (regno, (char *) cookedreg);
534 store_unsigned_integer (cookedreg, 4, rawregs[15]);
535 supply_register (PS_REGNUM, (char *) cookedreg);
536 arm_rdi_fetch_registers (PC_REGNUM);
540 if (regno == PC_REGNUM)
541 rdi_regmask = RDIReg_PC;
542 else if (regno == PS_REGNUM)
543 rdi_regmask = RDIReg_CPSR;
544 else if (regno < 0 || regno > 15)
547 supply_register (regno, (char *) &rawreg);
551 rdi_regmask = 1 << regno;
553 rslt = angel_RDI_CPUread (255, rdi_regmask, &rawreg);
556 printf_filtered ("RDI_CPUread: %s\n", rdi_error_message (rslt));
558 store_unsigned_integer (cookedreg, 4, rawreg);
559 supply_register (regno, (char *) cookedreg);
564 arm_rdi_prepare_to_store ()
569 /* Store register REGNO, or all registers if REGNO == -1, from the contents
570 of REGISTERS. FIXME: ignores errors. */
573 arm_rdi_store_registers (regno)
576 int rslt, rdi_regmask;
578 /* These need to be able to take 'floating point register' contents */
579 unsigned long rawreg[3], rawerreg[3];
583 for (regno = 0; regno < NUM_REGS; regno++)
584 arm_rdi_store_registers (regno);
588 read_register_gen (regno, (char *) rawreg);
589 /* RDI manipulates data in host byte order, so convert now. */
590 store_unsigned_integer (rawerreg, 4, rawreg[0]);
592 if (regno == PC_REGNUM)
593 rdi_regmask = RDIReg_PC;
594 else if (regno == PS_REGNUM)
595 rdi_regmask = RDIReg_CPSR;
596 else if (regno < 0 || regno > 15)
599 rdi_regmask = 1 << regno;
601 rslt = angel_RDI_CPUwrite (255, rdi_regmask, rawerreg);
604 printf_filtered ("RDI_CPUwrite: %s\n", rdi_error_message (rslt));
609 /* Read or write LEN bytes from inferior memory at MEMADDR,
610 transferring to or from debugger address MYADDR. Write to inferior
611 if SHOULD_WRITE is nonzero. Returns length of data written or
612 read; 0 for error. */
616 arm_rdi_xfer_memory(memaddr, myaddr, len, should_write, target)
621 struct target_ops *target; /* ignored */
627 rslt = angel_RDI_write (myaddr, memaddr, &len);
630 printf_filtered ("RDI_write: %s\n", rdi_error_message (rslt));
635 rslt = angel_RDI_read (memaddr, myaddr, &len);
638 printf_filtered ("RDI_read: %s\n", rdi_error_message (rslt));
645 /* Display random info collected from the target. */
648 arm_rdi_files_info (ignore)
649 struct target_ops *ignore;
651 char *file = "nothing";
653 unsigned long arg1, arg2;
655 rslt = angel_RDI_info (RDIInfo_Target, &arg1, &arg2);
658 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
660 if (arg1 & (1 << 15))
661 printf_filtered ("Target supports Thumb code.\n");
662 if (arg1 & (1 << 14))
663 printf_filtered ("Target can do profiling.\n");
665 printf_filtered ("Target is real hardware.\n");
667 rslt = angel_RDI_info (RDIInfo_Step, &arg1, &arg2);
670 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
672 printf_filtered ("Target can%s single-step.\n", (arg1 & 0x4 ? "" : "not"));
674 rslt = angel_RDI_info (RDIInfo_Icebreaker, &arg1, &arg2);
677 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
680 printf_filtered ("Target includes an EmbeddedICE.\n");
688 rslt = angel_RDI_open (1, &gdb_config, NULL, NULL);
691 printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
696 arm_rdi_mourn_inferior ()
698 unpush_target (&arm_rdi_ops);
699 generic_mourn_inferior ();
702 /* While the RDI library keeps track of its own breakpoints, we need
703 to remember "handles" so that we can delete them later. Since
704 breakpoints get used for stepping, be careful not to leak memory
708 arm_rdi_insert_breakpoint (addr, contents_cache)
710 char *contents_cache;
714 struct local_bp_list_entry *entry;
715 int type = RDIPoint_EQ;
717 if (arm_pc_is_thumb (addr) || arm_pc_is_thumb_dummy (addr))
718 type |= RDIPoint_16Bit;
719 rslt = angel_RDI_setbreak (addr, type, 0, &point);
722 printf_filtered ("RDI_setbreak: %s\n", rdi_error_message (rslt));
725 (struct local_bp_list_entry *) xmalloc (sizeof (struct local_bp_list_entry));
727 entry->point = point;
728 entry->next = local_bp_list;
729 local_bp_list = entry;
734 arm_rdi_remove_breakpoint (addr, contents_cache)
736 char *contents_cache;
740 struct local_bp_list_entry *entry, *preventry;
742 for (entry = local_bp_list; entry != NULL; entry = entry->next)
744 if (entry->addr == addr)
752 rslt = angel_RDI_clearbreak (entry->point);
755 printf_filtered ("RDI_clearbreak: %s\n", rdi_error_message (rslt));
757 /* Delete the breakpoint entry locally. */
758 if (entry == local_bp_list)
760 local_bp_list = entry->next;
764 preventry->next = entry->next;
772 rdi_error_message (err)
777 case RDIError_NoError:
780 return "debuggee reset";
781 case RDIError_UndefinedInstruction:
782 return "undefined instruction";
783 case RDIError_SoftwareInterrupt:
784 return "SWI trapped";
785 case RDIError_PrefetchAbort:
786 return "prefetch abort, execution ran into unmapped memory?";
787 case RDIError_DataAbort:
788 return "data abort, no memory at specified address?";
789 case RDIError_AddressException:
790 return "address exception, access >26bit in 26bit mode";
792 return "IRQ, interrupt trapped";
794 return "FIQ, fast interrupt trapped";
796 return "a miscellaneous type of error";
797 case RDIError_BranchThrough0:
798 return "branch through location 0";
799 case RDIError_NotInitialised:
800 return "internal error, RDI_open not called first";
801 case RDIError_UnableToInitialise:
802 return "internal error, target world is broken";
803 case RDIError_WrongByteSex:
804 return "See Operator: WrongByteSex";
805 case RDIError_UnableToTerminate:
806 return "See Operator: Unable to Terminate";
807 case RDIError_BadInstruction:
808 return "bad instruction, illegal to execute this instruction";
809 case RDIError_IllegalInstruction:
810 return "illegal instruction, the effect of executing it is undefined";
811 case RDIError_BadCPUStateSetting:
812 return "internal error, tried to set SPSR of user mode";
813 case RDIError_UnknownCoPro:
814 return "unknown co-processor";
815 case RDIError_UnknownCoProState:
816 return "cannot execute co-processor request";
817 case RDIError_BadCoProState:
818 return "recognizably broken co-processor request";
819 case RDIError_BadPointType:
820 return "internal error, bad point yype";
821 case RDIError_UnimplementedType:
822 return "internal error, unimplemented type";
823 case RDIError_BadPointSize:
824 return "internal error, bad point size";
825 case RDIError_UnimplementedSize:
826 return "internal error, unimplemented size";
827 case RDIError_NoMorePoints:
828 return "last break/watch point was used";
829 case RDIError_BreakpointReached:
830 return "breakpoint reached";
831 case RDIError_WatchpointAccessed:
832 return "watchpoint accessed";
833 case RDIError_NoSuchPoint:
834 return "attempted to clear non-existent break/watch point";
835 case RDIError_ProgramFinishedInStep:
836 return "end of the program reached while stepping";
837 case RDIError_UserInterrupt:
838 return "you pressed Escape";
839 case RDIError_CantSetPoint:
840 return "no more break/watch points available";
841 case RDIError_IncompatibleRDILevels:
842 return "incompatible RDI levels";
843 case RDIError_LittleEndian:
844 return "debuggee is little endian";
845 case RDIError_BigEndian:
846 return "debuggee is big endian";
847 case RDIError_SoftInitialiseError:
848 return "recoverable error in RDI initialization";
849 case RDIError_InsufficientPrivilege:
850 return "internal error, supervisor state not accessible to monitor";
851 case RDIError_UnimplementedMessage:
852 return "internal error, unimplemented message";
853 case RDIError_UndefinedMessage:
854 return "internal error, undefined message";
856 return "undefined error message, should reset target";
860 /* Convert the ARM error messages to signals that GDB knows about. */
862 static enum target_signal
863 rdi_error_signal (err)
868 case RDIError_NoError:
871 return TARGET_SIGNAL_TERM; /* ??? */
872 case RDIError_UndefinedInstruction:
873 return TARGET_SIGNAL_ILL;
874 case RDIError_SoftwareInterrupt:
875 case RDIError_PrefetchAbort:
876 case RDIError_DataAbort:
877 return TARGET_SIGNAL_TRAP;
878 case RDIError_AddressException:
879 return TARGET_SIGNAL_SEGV;
882 return TARGET_SIGNAL_TRAP;
884 return TARGET_SIGNAL_TERM;
885 case RDIError_BranchThrough0:
886 return TARGET_SIGNAL_TRAP;
887 case RDIError_NotInitialised:
888 case RDIError_UnableToInitialise:
889 case RDIError_WrongByteSex:
890 case RDIError_UnableToTerminate:
891 return TARGET_SIGNAL_UNKNOWN;
892 case RDIError_BadInstruction:
893 case RDIError_IllegalInstruction:
894 return TARGET_SIGNAL_ILL;
895 case RDIError_BadCPUStateSetting:
896 case RDIError_UnknownCoPro:
897 case RDIError_UnknownCoProState:
898 case RDIError_BadCoProState:
899 case RDIError_BadPointType:
900 case RDIError_UnimplementedType:
901 case RDIError_BadPointSize:
902 case RDIError_UnimplementedSize:
903 case RDIError_NoMorePoints:
904 return TARGET_SIGNAL_UNKNOWN;
905 case RDIError_BreakpointReached:
906 case RDIError_WatchpointAccessed:
907 return TARGET_SIGNAL_TRAP;
908 case RDIError_NoSuchPoint:
909 case RDIError_ProgramFinishedInStep:
910 return TARGET_SIGNAL_UNKNOWN;
911 case RDIError_UserInterrupt:
912 return TARGET_SIGNAL_INT;
913 case RDIError_IncompatibleRDILevels:
914 case RDIError_LittleEndian:
915 case RDIError_BigEndian:
916 case RDIError_SoftInitialiseError:
917 case RDIError_InsufficientPrivilege:
918 case RDIError_UnimplementedMessage:
919 case RDIError_UndefinedMessage:
921 return TARGET_SIGNAL_UNKNOWN;
925 /* Define the target operations structure. */
927 struct target_ops arm_rdi_ops ;
929 static void init_rdi_ops(void)
931 arm_rdi_ops.to_shortname = "rdi";
932 arm_rdi_ops.to_longname = "ARM RDI";
933 arm_rdi_ops.to_doc = "Use a remote ARM-based computer; via the RDI library.\n\
934 Specify the serial device it is connected to (e.g. /dev/ttya)." ;
935 arm_rdi_ops.to_open = arm_rdi_open;
936 arm_rdi_ops.to_close = arm_rdi_close;
937 arm_rdi_ops.to_attach = NULL;
938 arm_rdi_ops.to_detach = arm_rdi_detach;
939 arm_rdi_ops.to_resume = arm_rdi_resume;
940 arm_rdi_ops.to_wait = arm_rdi_wait;
941 arm_rdi_ops.to_fetch_registers = arm_rdi_fetch_registers;
942 arm_rdi_ops.to_store_registers = arm_rdi_store_registers;
943 arm_rdi_ops.to_prepare_to_store = arm_rdi_prepare_to_store;
944 arm_rdi_ops.to_xfer_memory = arm_rdi_xfer_memory;
945 arm_rdi_ops.to_files_info = arm_rdi_files_info;
946 arm_rdi_ops.to_insert_breakpoint = arm_rdi_insert_breakpoint;
947 arm_rdi_ops.to_remove_breakpoint = arm_rdi_remove_breakpoint;
948 arm_rdi_ops.to_terminal_init = NULL;
949 arm_rdi_ops.to_terminal_inferior = NULL;
950 arm_rdi_ops.to_terminal_ours_for_output = NULL;
951 arm_rdi_ops.to_terminal_ours = NULL;
952 arm_rdi_ops.to_terminal_info = NULL;
953 arm_rdi_ops.to_kill = arm_rdi_kill;
954 arm_rdi_ops.to_load = generic_load;
955 arm_rdi_ops.to_lookup_symbol = NULL;
956 arm_rdi_ops.to_create_inferior = arm_rdi_create_inferior;
957 arm_rdi_ops.to_mourn_inferior = arm_rdi_mourn_inferior;
958 arm_rdi_ops.to_can_run = 0;
959 arm_rdi_ops.to_notice_signals = 0;
960 arm_rdi_ops.to_thread_alive = 0;
961 arm_rdi_ops.to_stop = 0;
962 arm_rdi_ops.to_stratum = process_stratum;
963 arm_rdi_ops.DONT_USE = NULL;
964 arm_rdi_ops.to_has_all_memory = 1;
965 arm_rdi_ops.to_has_memory = 1;
966 arm_rdi_ops.to_has_stack = 1;
967 arm_rdi_ops.to_has_registers = 1;
968 arm_rdi_ops.to_has_execution = 1;
969 arm_rdi_ops.to_sections = NULL;
970 arm_rdi_ops.to_sections_end = NULL;
971 arm_rdi_ops.to_magic = OPS_MAGIC ;
975 _initialize_remote_rdi ()
978 add_target (&arm_rdi_ops);
981 /* A little dummy to make linking with the library succeed. */