1 /* GDB interface to ARM RDI library.
2 Copyright 1997, 1998 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. */
21 #include "gdb_string.h"
31 #include "gdb-stabs.h"
32 #include "gdbthread.h"
36 #include <sys/types.h>
41 #include "rdi-share/ardi.h"
42 #include "rdi-share/adp.h"
43 #include "rdi-share/hsys.h"
45 extern int isascii PARAMS ((int));
47 /* Prototypes for local functions */
49 static void arm_rdi_files_info PARAMS ((struct target_ops *ignore));
51 static int arm_rdi_xfer_memory PARAMS ((CORE_ADDR memaddr, char *myaddr,
52 int len, int should_write,
53 struct target_ops *target));
55 static void arm_rdi_prepare_to_store PARAMS ((void));
57 static void arm_rdi_fetch_registers PARAMS ((int regno));
59 static void arm_rdi_resume PARAMS ((int pid, int step,
60 enum target_signal siggnal));
62 static int arm_rdi_start_remote PARAMS ((char *dummy));
64 static void arm_rdi_open PARAMS ((char *name, int from_tty));
66 static void arm_rdi_create_inferior PARAMS ((char *exec_file, char *args,
69 static void arm_rdi_close PARAMS ((int quitting));
71 static void arm_rdi_store_registers PARAMS ((int regno));
73 static void arm_rdi_mourn PARAMS ((void));
75 static void arm_rdi_send PARAMS ((char *buf));
77 static int arm_rdi_wait PARAMS ((int pid, struct target_waitstatus *status));
79 static void arm_rdi_kill PARAMS ((void));
81 static void arm_rdi_detach PARAMS ((char *args, int from_tty));
83 static void arm_rdi_interrupt PARAMS ((int signo));
85 static void arm_rdi_interrupt_twice PARAMS ((int signo));
87 static void interrupt_query PARAMS ((void));
89 static int arm_rdi_insert_breakpoint PARAMS ((CORE_ADDR, char *));
91 static int arm_rdi_remove_breakpoint PARAMS ((CORE_ADDR, char *));
93 static char *rdi_error_message PARAMS ((int err));
95 static enum target_signal rdi_error_signal PARAMS ((int err));
97 /* Global variables. */
99 struct target_ops arm_rdi_ops;
101 static struct Dbg_ConfigBlock gdb_config;
103 static struct Dbg_HostosInterface gdb_hostif;
105 static int max_load_size;
107 static int execute_status;
109 /* A little list of breakpoints that have been set. */
111 static struct local_bp_list_entry {
114 struct local_bp_list_entry *next;
118 /* Stub for catch_errors. */
121 arm_rdi_start_remote (dummy)
127 /* Helper callbacks for the "host interface" structure. RDI functions call
128 these to forward output from the target system and so forth. */
133 fprintf_unfiltered (gdb_stdout, "void dummy\n");
137 myprint (arg, format, ap)
142 vfprintf_unfiltered (gdb_stdout, format, ap);
151 fputc_unfiltered (c, gdb_stdout);
155 mywrite (arg, buffer, len)
164 for (i = 0; i < len; i++)
166 if (isascii ((int) *e))
168 fputc_unfiltered ((int) *e, gdb_stdout);
182 /* These last two are tricky as we have to handle the special case of
183 being interrupted more carefully */
189 return fgetc (stdin);
193 mygets (arg, buffer, len)
198 return fgets(buffer, len, stdin);
201 /* Prevent multiple calls to angel_RDI_close(). */
202 static int closed_already = 1;
204 /* Open a connection to a remote debugger. NAME is the filename used
205 for communication. */
208 arm_rdi_open (name, from_tty)
213 unsigned long arg1, arg2;
216 error ("To open an RDI connection, you need to specify what serial\n\
217 device is attached to the remote system (e.g. /dev/ttya).");
219 /* Make the basic low-level connection. */
221 rslt = Adp_OpenDevice (name, NULL, 1);
224 error ("Could not open device \"%s\"", name);
226 gdb_config.bytesex = 2 | (TARGET_BYTE_ORDER == BIG_ENDIAN ? 1 : 0);
228 gdb_config.rditype = 2;
229 gdb_config.heartbeat_on = 1;
230 gdb_config.flags = 2;
232 gdb_hostif.dbgprint = myprint;
233 gdb_hostif.dbgpause = mypause;
234 gdb_hostif.dbgarg = NULL;
235 gdb_hostif.writec = mywritec;
236 gdb_hostif.readc = myreadc;
237 gdb_hostif.write = mywrite;
238 gdb_hostif.gets = mygets;
239 gdb_hostif.hostosarg = NULL;
240 gdb_hostif.reset = voiddummy;
242 rslt = angel_RDI_open (10, &gdb_config, &gdb_hostif, NULL);
243 if (rslt == RDIError_BigEndian || rslt == RDIError_LittleEndian)
244 ; /* do nothing, this is the expected return */
247 printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
250 rslt = angel_RDI_info (RDIInfo_Target, &arg1, &arg2);
253 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
255 rslt = angel_RDI_info (RDIInfo_Points, &arg1, &arg2);
258 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
260 rslt = angel_RDI_info (RDIInfo_Step, &arg1, &arg2);
263 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
265 rslt = angel_RDI_info (RDIInfo_CoPro, &arg1, &arg2);
268 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
270 rslt = angel_RDI_info (RDIInfo_SemiHosting, &arg1, &arg2);
273 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
276 rslt = angel_RDI_info (RDIInfo_GetLoadSize, &arg1, &arg2);
279 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
281 max_load_size = arg1;
283 push_target (&arm_rdi_ops);
285 target_fetch_registers (-1);
287 rslt = angel_RDI_open (1, &gdb_config, NULL, NULL);
290 printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
294 rslt = angel_RDI_info (RDIVector_Catch, &arg1, &arg2);
297 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
300 arg1 = (unsigned long) "";
301 rslt = angel_RDI_info (RDISet_Cmdline, &arg1, &arg2);
304 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
307 /* Clear out any existing records of breakpoints. */
309 struct local_bp_list_entry *entry, *preventry = NULL;
311 for (entry = local_bp_list; entry != NULL; entry = entry->next)
318 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 executable 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)
409 /* Clean up connection to a remote debugger. */
412 arm_rdi_close (quitting)
417 if (! closed_already)
419 rslt = angel_RDI_close ();
422 printf_filtered ("RDI_close: %s\n", rdi_error_message (rslt));
429 /* Tell the remote machine to resume. */
432 arm_rdi_resume (pid, step, siggnal)
434 enum target_signal siggnal;
439 if (0 /* turn on when hardware supports single-stepping */)
441 rslt = angel_RDI_step (1, &point);
444 printf_filtered ("RDI_step: %s\n", rdi_error_message (rslt));
454 pc = read_register (PC_REGNUM);
455 pc = arm_get_next_pc (pc);
456 arm_rdi_insert_breakpoint (pc, handle);
458 execute_status = rslt = angel_RDI_execute (&point);
459 if (rslt == RDIError_BreakpointReached)
463 printf_filtered ("RDI_execute: %s\n", rdi_error_message (rslt));
467 arm_rdi_remove_breakpoint (pc, handle);
472 /* Send ^C to target to halt it. Target will respond, and send us a
476 arm_rdi_interrupt (signo)
481 static void (*ofunc)();
483 /* The user typed ^C twice. */
485 arm_rdi_interrupt_twice (signo)
490 /* Ask the user what to do when an interrupt is received. */
497 /* Wait until the remote machine stops, then return, storing status in
498 STATUS just as `wait' would. Returns "pid" (though it's not clear
499 what, if anything, that means in the case of this target). */
502 arm_rdi_wait (pid, status)
504 struct target_waitstatus *status;
506 status->kind = (execute_status == RDIError_NoError ?
507 TARGET_WAITKIND_EXITED : TARGET_WAITKIND_STOPPED);
509 /* convert stopped code from target into right signal */
510 status->value.sig = rdi_error_signal (execute_status);
515 /* Read the remote registers into the block REGS. */
519 arm_rdi_fetch_registers (regno)
522 int rslt, rdi_regmask;
523 unsigned long rawreg, rawregs[32];
528 rslt = angel_RDI_CPUread (255, 0x27fff, rawregs);
531 printf_filtered ("RDI_CPUread: %s\n", rdi_error_message (rslt));
534 for (regno = 0; regno < 15; regno++)
536 store_unsigned_integer (cookedreg, 4, rawregs[regno]);
537 supply_register (regno, (char *) cookedreg);
539 store_unsigned_integer (cookedreg, 4, rawregs[15]);
540 supply_register (PS_REGNUM, (char *) cookedreg);
541 arm_rdi_fetch_registers (PC_REGNUM);
545 if (regno == PC_REGNUM)
546 rdi_regmask = RDIReg_PC;
547 else if (regno == PS_REGNUM)
548 rdi_regmask = RDIReg_CPSR;
549 else if (regno < 0 || regno > 15)
552 supply_register (regno, (char *) &rawreg);
556 rdi_regmask = 1 << regno;
558 rslt = angel_RDI_CPUread (255, rdi_regmask, &rawreg);
561 printf_filtered ("RDI_CPUread: %s\n", rdi_error_message (rslt));
563 store_unsigned_integer (cookedreg, 4, rawreg);
564 supply_register (regno, (char *) cookedreg);
569 arm_rdi_prepare_to_store ()
574 /* Store register REGNO, or all registers if REGNO == -1, from the contents
575 of REGISTERS. FIXME: ignores errors. */
578 arm_rdi_store_registers (regno)
581 int rslt, rdi_regmask;
583 /* These need to be able to take 'floating point register' contents */
584 unsigned long rawreg[3], rawerreg[3];
588 for (regno = 0; regno < NUM_REGS; regno++)
589 arm_rdi_store_registers (regno);
593 read_register_gen (regno, (char *) rawreg);
594 /* RDI manipulates data in host byte order, so convert now. */
595 store_unsigned_integer (rawerreg, 4, rawreg[0]);
597 if (regno == PC_REGNUM)
598 rdi_regmask = RDIReg_PC;
599 else if (regno == PS_REGNUM)
600 rdi_regmask = RDIReg_CPSR;
601 else if (regno < 0 || regno > 15)
604 rdi_regmask = 1 << regno;
606 rslt = angel_RDI_CPUwrite (255, rdi_regmask, rawerreg);
609 printf_filtered ("RDI_CPUwrite: %s\n", rdi_error_message (rslt));
614 /* Read or write LEN bytes from inferior memory at MEMADDR,
615 transferring to or from debugger address MYADDR. Write to inferior
616 if SHOULD_WRITE is nonzero. Returns length of data written or
617 read; 0 for error. */
621 arm_rdi_xfer_memory(memaddr, myaddr, len, should_write, target)
626 struct target_ops *target; /* ignored */
632 rslt = angel_RDI_write (myaddr, memaddr, &len);
635 printf_filtered ("RDI_write: %s\n", rdi_error_message (rslt));
640 rslt = angel_RDI_read (memaddr, myaddr, &len);
643 printf_filtered ("RDI_read: %s\n", rdi_error_message (rslt));
650 /* Display random info collected from the target. */
653 arm_rdi_files_info (ignore)
654 struct target_ops *ignore;
656 char *file = "nothing";
658 unsigned long arg1, arg2;
660 rslt = angel_RDI_info (RDIInfo_Target, &arg1, &arg2);
663 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
665 if (arg1 & (1 << 15))
666 printf_filtered ("Target supports Thumb code.\n");
667 if (arg1 & (1 << 14))
668 printf_filtered ("Target can do profiling.\n");
670 printf_filtered ("Target is real hardware.\n");
672 rslt = angel_RDI_info (RDIInfo_Step, &arg1, &arg2);
675 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
677 printf_filtered ("Target can%s single-step.\n", (arg1 & 0x4 ? "" : "not"));
679 rslt = angel_RDI_info (RDIInfo_Icebreaker, &arg1, &arg2);
682 printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
685 printf_filtered ("Target includes an EmbeddedICE.\n");
693 rslt = angel_RDI_open (1, &gdb_config, NULL, NULL);
696 printf_filtered ("RDI_open: %s\n", rdi_error_message (rslt));
701 arm_rdi_mourn_inferior ()
703 unpush_target (&arm_rdi_ops);
704 generic_mourn_inferior ();
707 /* While the RDI library keeps track of its own breakpoints, we need
708 to remember "handles" so that we can delete them later. Since
709 breakpoints get used for stepping, be careful not to leak memory
713 arm_rdi_insert_breakpoint (addr, contents_cache)
715 char *contents_cache;
719 struct local_bp_list_entry *entry;
720 int type = RDIPoint_EQ;
722 if (arm_pc_is_thumb (addr) || arm_pc_is_thumb_dummy (addr))
723 type |= RDIPoint_16Bit;
724 rslt = angel_RDI_setbreak (addr, type, 0, &point);
727 printf_filtered ("RDI_setbreak: %s\n", rdi_error_message (rslt));
730 (struct local_bp_list_entry *) xmalloc (sizeof (struct local_bp_list_entry));
732 entry->point = point;
733 entry->next = local_bp_list;
734 local_bp_list = entry;
739 arm_rdi_remove_breakpoint (addr, contents_cache)
741 char *contents_cache;
745 struct local_bp_list_entry *entry, *preventry;
747 for (entry = local_bp_list; entry != NULL; entry = entry->next)
749 if (entry->addr == addr)
757 rslt = angel_RDI_clearbreak (entry->point);
760 printf_filtered ("RDI_clearbreak: %s\n", rdi_error_message (rslt));
762 /* Delete the breakpoint entry locally. */
763 if (entry == local_bp_list)
765 local_bp_list = entry->next;
769 preventry->next = entry->next;
777 rdi_error_message (err)
782 case RDIError_NoError:
785 return "debuggee reset";
786 case RDIError_UndefinedInstruction:
787 return "undefined instruction";
788 case RDIError_SoftwareInterrupt:
789 return "SWI trapped";
790 case RDIError_PrefetchAbort:
791 return "prefetch abort, execution ran into unmapped memory?";
792 case RDIError_DataAbort:
793 return "data abort, no memory at specified address?";
794 case RDIError_AddressException:
795 return "address exception, access >26bit in 26bit mode";
797 return "IRQ, interrupt trapped";
799 return "FIQ, fast interrupt trapped";
801 return "a miscellaneous type of error";
802 case RDIError_BranchThrough0:
803 return "branch through location 0";
804 case RDIError_NotInitialised:
805 return "internal error, RDI_open not called first";
806 case RDIError_UnableToInitialise:
807 return "internal error, target world is broken";
808 case RDIError_WrongByteSex:
809 return "See Operator: WrongByteSex";
810 case RDIError_UnableToTerminate:
811 return "See Operator: Unable to Terminate";
812 case RDIError_BadInstruction:
813 return "bad instruction, illegal to execute this instruction";
814 case RDIError_IllegalInstruction:
815 return "illegal instruction, the effect of executing it is undefined";
816 case RDIError_BadCPUStateSetting:
817 return "internal error, tried to set SPSR of user mode";
818 case RDIError_UnknownCoPro:
819 return "unknown co-processor";
820 case RDIError_UnknownCoProState:
821 return "cannot execute co-processor request";
822 case RDIError_BadCoProState:
823 return "recognizably broken co-processor request";
824 case RDIError_BadPointType:
825 return "internal error, bad point yype";
826 case RDIError_UnimplementedType:
827 return "internal error, unimplemented type";
828 case RDIError_BadPointSize:
829 return "internal error, bad point size";
830 case RDIError_UnimplementedSize:
831 return "internal error, unimplemented size";
832 case RDIError_NoMorePoints:
833 return "last break/watch point was used";
834 case RDIError_BreakpointReached:
835 return "breakpoint reached";
836 case RDIError_WatchpointAccessed:
837 return "watchpoint accessed";
838 case RDIError_NoSuchPoint:
839 return "attempted to clear non-existent break/watch point";
840 case RDIError_ProgramFinishedInStep:
841 return "end of the program reached while stepping";
842 case RDIError_UserInterrupt:
843 return "you pressed Escape";
844 case RDIError_CantSetPoint:
845 return "no more break/watch points available";
846 case RDIError_IncompatibleRDILevels:
847 return "incompatible RDI levels";
848 case RDIError_LittleEndian:
849 return "debuggee is little endian";
850 case RDIError_BigEndian:
851 return "debuggee is big endian";
852 case RDIError_SoftInitialiseError:
853 return "recoverable error in RDI initialization";
854 case RDIError_InsufficientPrivilege:
855 return "internal error, supervisor state not accessible to monitor";
856 case RDIError_UnimplementedMessage:
857 return "internal error, unimplemented message";
858 case RDIError_UndefinedMessage:
859 return "internal error, undefined message";
861 return "undefined error message, should reset target";
865 /* Convert the ARM error messages to signals that GDB knows about. */
867 static enum target_signal
868 rdi_error_signal (err)
873 case RDIError_NoError:
876 return TARGET_SIGNAL_TERM; /* ??? */
877 case RDIError_UndefinedInstruction:
878 return TARGET_SIGNAL_ILL;
879 case RDIError_SoftwareInterrupt:
880 case RDIError_PrefetchAbort:
881 case RDIError_DataAbort:
882 return TARGET_SIGNAL_TRAP;
883 case RDIError_AddressException:
884 return TARGET_SIGNAL_SEGV;
887 return TARGET_SIGNAL_TRAP;
889 return TARGET_SIGNAL_TERM;
890 case RDIError_BranchThrough0:
891 return TARGET_SIGNAL_TRAP;
892 case RDIError_NotInitialised:
893 case RDIError_UnableToInitialise:
894 case RDIError_WrongByteSex:
895 case RDIError_UnableToTerminate:
896 return TARGET_SIGNAL_UNKNOWN;
897 case RDIError_BadInstruction:
898 case RDIError_IllegalInstruction:
899 return TARGET_SIGNAL_ILL;
900 case RDIError_BadCPUStateSetting:
901 case RDIError_UnknownCoPro:
902 case RDIError_UnknownCoProState:
903 case RDIError_BadCoProState:
904 case RDIError_BadPointType:
905 case RDIError_UnimplementedType:
906 case RDIError_BadPointSize:
907 case RDIError_UnimplementedSize:
908 case RDIError_NoMorePoints:
909 return TARGET_SIGNAL_UNKNOWN;
910 case RDIError_BreakpointReached:
911 case RDIError_WatchpointAccessed:
912 return TARGET_SIGNAL_TRAP;
913 case RDIError_NoSuchPoint:
914 case RDIError_ProgramFinishedInStep:
915 return TARGET_SIGNAL_UNKNOWN;
916 case RDIError_UserInterrupt:
917 return TARGET_SIGNAL_INT;
918 case RDIError_IncompatibleRDILevels:
919 case RDIError_LittleEndian:
920 case RDIError_BigEndian:
921 case RDIError_SoftInitialiseError:
922 case RDIError_InsufficientPrivilege:
923 case RDIError_UnimplementedMessage:
924 case RDIError_UndefinedMessage:
926 return TARGET_SIGNAL_UNKNOWN;
930 /* Define the target operations structure. */
935 arm_rdi_ops.to_shortname = "rdi";
936 arm_rdi_ops.to_longname = "ARM RDI";
937 arm_rdi_ops.to_doc = "Use a remote ARM-based computer; via the RDI library.\n\
938 Specify the serial device it is connected to (e.g. /dev/ttya)." ;
939 arm_rdi_ops.to_open = arm_rdi_open;
940 arm_rdi_ops.to_close = arm_rdi_close;
941 arm_rdi_ops.to_detach = arm_rdi_detach;
942 arm_rdi_ops.to_resume = arm_rdi_resume;
943 arm_rdi_ops.to_wait = arm_rdi_wait;
944 arm_rdi_ops.to_fetch_registers = arm_rdi_fetch_registers;
945 arm_rdi_ops.to_store_registers = arm_rdi_store_registers;
946 arm_rdi_ops.to_prepare_to_store = arm_rdi_prepare_to_store;
947 arm_rdi_ops.to_xfer_memory = arm_rdi_xfer_memory;
948 arm_rdi_ops.to_files_info = arm_rdi_files_info;
949 arm_rdi_ops.to_insert_breakpoint = arm_rdi_insert_breakpoint;
950 arm_rdi_ops.to_remove_breakpoint = arm_rdi_remove_breakpoint;
951 arm_rdi_ops.to_kill = arm_rdi_kill;
952 arm_rdi_ops.to_load = generic_load;
953 arm_rdi_ops.to_create_inferior = arm_rdi_create_inferior;
954 arm_rdi_ops.to_mourn_inferior = arm_rdi_mourn_inferior;
955 arm_rdi_ops.to_stratum = process_stratum;
956 arm_rdi_ops.to_has_all_memory = 1;
957 arm_rdi_ops.to_has_memory = 1;
958 arm_rdi_ops.to_has_stack = 1;
959 arm_rdi_ops.to_has_registers = 1;
960 arm_rdi_ops.to_has_execution = 1;
961 arm_rdi_ops.to_magic = OPS_MAGIC;
965 _initialize_remote_rdi ()
968 add_target (&arm_rdi_ops);
971 /* A little dummy to make linking with the library succeed. */
973 int Fail() { return 0; }