OLD | NEW |
1 /* Generate targ-vals.h and targ-map.c. */ | 1 /* Generate targ-vals.h and targ-map.c. */ |
2 | 2 |
3 #include <stdio.h> | 3 #include <stdio.h> |
4 #include <stdlib.h> | 4 #include <stdlib.h> |
5 | 5 |
6 struct tdefs { | 6 struct tdefs { |
7 char *symbol; | 7 char *symbol; |
8 int value; | 8 int value; |
9 }; | 9 }; |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } | 59 } |
60 | 60 |
61 static void | 61 static void |
62 gen_targ_map_c () | 62 gen_targ_map_c () |
63 { | 63 { |
64 struct tdefs *t; | 64 struct tdefs *t; |
65 | 65 |
66 printf ("/* Target value mapping utilities needed by the simulator and gdb. *
/\n"); | 66 printf ("/* Target value mapping utilities needed by the simulator and gdb. *
/\n"); |
67 printf ("/* This file is machine generated by gentmap.c. */\n\n"); | 67 printf ("/* This file is machine generated by gentmap.c. */\n\n"); |
68 | 68 |
| 69 printf ("#include \"config.h\"\n"); |
69 printf ("#include <errno.h>\n"); | 70 printf ("#include <errno.h>\n"); |
70 printf ("#include <fcntl.h>\n"); | 71 printf ("#include <fcntl.h>\n"); |
71 printf ("#include \"ansidecl.h\"\n"); | 72 printf ("#include \"ansidecl.h\"\n"); |
72 printf ("#include \"gdb/callback.h\"\n"); | 73 printf ("#include \"gdb/callback.h\"\n"); |
73 printf ("#include \"targ-vals.h\"\n"); | 74 printf ("#include \"targ-vals.h\"\n"); |
74 printf ("\n"); | 75 printf ("\n"); |
75 | 76 |
76 printf ("/* syscall mapping table */\n"); | 77 printf ("/* syscall mapping table */\n"); |
77 printf ("CB_TARGET_DEFS_MAP cb_init_syscall_map[] = {\n"); | 78 printf ("CB_TARGET_DEFS_MAP cb_init_syscall_map[] = {\n"); |
78 for (t = &sys_tdefs[0]; t->symbol; ++t) | 79 for (t = &sys_tdefs[0]; t->symbol; ++t) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 118 |
118 if (strcmp (argv[1], "-h") == 0) | 119 if (strcmp (argv[1], "-h") == 0) |
119 gen_targ_vals_h (); | 120 gen_targ_vals_h (); |
120 else if (strcmp (argv[1], "-c") == 0) | 121 else if (strcmp (argv[1], "-c") == 0) |
121 gen_targ_map_c (); | 122 gen_targ_map_c (); |
122 else | 123 else |
123 abort (); | 124 abort (); |
124 | 125 |
125 exit (0); | 126 exit (0); |
126 } | 127 } |
OLD | NEW |