GNU Binutils with patches for OS216
リビジョン | 0e9073e4b86eb21485ebceb34a5242a0a74be407 (tree) |
---|---|
日時 | 2002-11-05 08:27:32 |
作者 | Elena Zannoni <ezannoni@kwik...> |
コミッター | Elena Zannoni |
2002-11-04 Elena Zannoni <ezannoni@redhat.com>
* cli/cli-interp.c (_initialize_cli_interp): Call
gdb_interpreter_new and gdb_interpreter_add.
* top.c (gdb_init): Call gdb_interpreter_lookup.
(gdb_init): Call gdb_interpreter_set.
* interps.c (gdb_interpreter_new): Renamed from
gdb_new_interpreter.
(gdb_interpreter_add): Renamed from gdb_add_interpreter.
(gdb_interpreter_set): Renamed from gdb_set_interpreter.
(gdb_interpreter_lookup): Renamed from gdb_lookup_interpreter.
(gdb_interpreter_current): Renamed from gdb_current_interpreter.
Update all callers.
* interps.h: Ditto.
2002-11-04 Elena Zannoni <ezannoni@redhat.com>
* mi-interp.c (mi_interpreter_resume): Ditto.
(mi_cmd_interpreter_exec): Use gdb_interpreter_lookup.
(_initialize_mi_interp): Use gdb_interpreter_new,
gdb_interpreter_add.
* mi-cmd-break.c (mi_cmd_break_insert): Use
gdb_interpreter_current_is_named_p.
(mi_cmd_break_watch): Ditto.
* mi-events.c (mi_interp_stack_changed_hook): Ditto.
(event_notify): Ditto.
* mi-main.c (captured_mi_execute_command): Use
gdb_interpreter_current_is_named_p.
(mi_load_progress): Ditto.
@@ -1,5 +1,20 @@ | ||
1 | 1 | 2002-11-04 Elena Zannoni <ezannoni@redhat.com> |
2 | 2 | |
3 | + * cli/cli-interp.c (_initialize_cli_interp): Call | |
4 | + gdb_interpreter_new and gdb_interpreter_add. | |
5 | + * top.c (gdb_init): Call gdb_interpreter_lookup. | |
6 | + (gdb_init): Call gdb_interpreter_set. | |
7 | + * interps.c (gdb_interpreter_new): Renamed from | |
8 | + gdb_new_interpreter. | |
9 | + (gdb_interpreter_add): Renamed from gdb_add_interpreter. | |
10 | + (gdb_interpreter_set): Renamed from gdb_set_interpreter. | |
11 | + (gdb_interpreter_lookup): Renamed from gdb_lookup_interpreter. | |
12 | + (gdb_interpreter_current): Renamed from gdb_current_interpreter. | |
13 | + Update all callers. | |
14 | + * interps.h: Ditto. | |
15 | + | |
16 | +2002-11-04 Elena Zannoni <ezannoni@redhat.com> | |
17 | + | |
3 | 18 | * interps.h (gdb_interpreter_is_quiet_p): Rename from |
4 | 19 | gdb_interpreter_is_quiet. |
5 | 20 | * cli/cli-interp.c (cli_interpreter_display_prompt_p): Call |
@@ -131,7 +131,7 @@ _initialize_cli_interp (void) | ||
131 | 131 | |
132 | 132 | /* Create a default uiout builder for the CLI. */ |
133 | 133 | cli_uiout = cli_out_new (gdb_stdout); |
134 | - cli_interp = gdb_new_interpreter (GDB_INTERPRETER_CONSOLE, NULL, cli_uiout, | |
134 | + cli_interp = gdb_interpreter_new (GDB_INTERPRETER_CONSOLE, NULL, cli_uiout, | |
135 | 135 | &procs); |
136 | - gdb_add_interpreter (cli_interp); | |
136 | + gdb_interpreter_add (cli_interp); | |
137 | 137 | } |
@@ -79,11 +79,11 @@ static struct gdb_interpreter *current_interpreter = NULL; | ||
79 | 79 | |
80 | 80 | static int interpreter_initialized = 0; |
81 | 81 | |
82 | -/* gdb_new_interpreter - This allocates space for a new interpreter, | |
82 | +/* gdb_interpreter_new - This allocates space for a new interpreter, | |
83 | 83 | fills the fields from the inputs, and returns a pointer to the |
84 | 84 | interpreter. */ |
85 | 85 | struct gdb_interpreter * |
86 | -gdb_new_interpreter (char *name, | |
86 | +gdb_interpreter_new (char *name, | |
87 | 87 | void *data, |
88 | 88 | struct ui_out *uiout, |
89 | 89 | struct gdb_interpreter_procs *procs) |
@@ -112,12 +112,12 @@ gdb_new_interpreter (char *name, | ||
112 | 112 | the new one is NOT added, and the function returns 0. Otherwise |
113 | 113 | it returns 1. */ |
114 | 114 | int |
115 | -gdb_add_interpreter (struct gdb_interpreter *interp) | |
115 | +gdb_interpreter_add (struct gdb_interpreter *interp) | |
116 | 116 | { |
117 | 117 | if (!interpreter_initialized) |
118 | 118 | initialize_interps (); |
119 | 119 | |
120 | - if (gdb_lookup_interpreter (interp->name) != NULL) | |
120 | + if (gdb_interpreter_lookup (interp->name) != NULL) | |
121 | 121 | return 0; |
122 | 122 | |
123 | 123 | interp->next = interp_list; |
@@ -133,7 +133,7 @@ gdb_add_interpreter (struct gdb_interpreter *interp) | ||
133 | 133 | old interpreter, then raise an internal error, since we are in |
134 | 134 | pretty bad shape at this point. */ |
135 | 135 | int |
136 | -gdb_set_interpreter (struct gdb_interpreter *interp) | |
136 | +gdb_interpreter_set (struct gdb_interpreter *interp) | |
137 | 137 | { |
138 | 138 | struct gdb_interpreter *old_interp = current_interpreter; |
139 | 139 | int first_time = 0; |
@@ -180,7 +180,7 @@ gdb_set_interpreter (struct gdb_interpreter *interp) | ||
180 | 180 | { |
181 | 181 | if (!interp->procs.init_proc (interp->data)) |
182 | 182 | { |
183 | - if (!gdb_set_interpreter (old_interp)) | |
183 | + if (!gdb_interpreter_set (old_interp)) | |
184 | 184 | internal_error (__FILE__, __LINE__, |
185 | 185 | "Failed to initialize new interp \"%s\" %s", |
186 | 186 | interp->name, |
@@ -204,7 +204,7 @@ gdb_set_interpreter (struct gdb_interpreter *interp) | ||
204 | 204 | if (interp->procs.resume_proc != NULL |
205 | 205 | && (!interp->procs.resume_proc (interp->data))) |
206 | 206 | { |
207 | - if (!gdb_set_interpreter (old_interp)) | |
207 | + if (!gdb_interpreter_set (old_interp)) | |
208 | 208 | internal_error (__FILE__, __LINE__, |
209 | 209 | "Failed to initialize new interp \"%s\" %s", |
210 | 210 | interp->name, "and could not restore old interp!\n"); |
@@ -229,11 +229,11 @@ gdb_set_interpreter (struct gdb_interpreter *interp) | ||
229 | 229 | return 1; |
230 | 230 | } |
231 | 231 | |
232 | -/* gdb_lookup_interpreter - Looks up the interpreter for NAME. If no | |
232 | +/* gdb_interpreter_lookup - Looks up the interpreter for NAME. If no | |
233 | 233 | such interpreter exists, return NULL, otherwise return a pointer to |
234 | 234 | the interpreter. */ |
235 | 235 | struct gdb_interpreter * |
236 | -gdb_lookup_interpreter (char *name) | |
236 | +gdb_interpreter_lookup (char *name) | |
237 | 237 | { |
238 | 238 | struct gdb_interpreter *interp; |
239 | 239 |
@@ -250,8 +250,8 @@ gdb_lookup_interpreter (char *name) | ||
250 | 250 | } |
251 | 251 | |
252 | 252 | /* Returns the current interpreter. */ |
253 | -struct gdb_interpreter * | |
254 | -gdb_current_interpreter () | |
253 | +static struct gdb_interpreter * | |
254 | +gdb_interpreter_current (void) | |
255 | 255 | { |
256 | 256 | return current_interpreter; |
257 | 257 | } |
@@ -267,9 +267,9 @@ gdb_interpreter_ui_out (struct gdb_interpreter *interp) | ||
267 | 267 | |
268 | 268 | /* Returns true if the current interp is the passed in name. */ |
269 | 269 | int |
270 | -gdb_current_interpreter_is_named (char *interp_name) | |
270 | +gdb_interpreter_current_is_named_p (char *interp_name) | |
271 | 271 | { |
272 | - struct gdb_interpreter *current_interp = gdb_current_interpreter (); | |
272 | + struct gdb_interpreter *current_interp = gdb_interpreter_current (); | |
273 | 273 | |
274 | 274 | if (current_interp) |
275 | 275 | return (strcmp (current_interp->name, interp_name) == 0); |
@@ -408,9 +408,9 @@ interpreter_exec_cmd (char *args, int from_tty) | ||
408 | 408 | if (nrules < 2) |
409 | 409 | error ("usage: interpreter-exec <interpreter> [ <command> ... ]"); |
410 | 410 | |
411 | - old_interp = gdb_current_interpreter (); | |
411 | + old_interp = gdb_interpreter_current (); | |
412 | 412 | |
413 | - interp_to_use = gdb_lookup_interpreter (prules[0]); | |
413 | + interp_to_use = gdb_interpreter_lookup (prules[0]); | |
414 | 414 | if (interp_to_use == NULL) |
415 | 415 | error ("Could not find interpreter \"%s\".", prules[0]); |
416 | 416 |
@@ -418,21 +418,21 @@ interpreter_exec_cmd (char *args, int from_tty) | ||
418 | 418 | old_quiet = gdb_interpreter_set_quiet (old_interp, 1); |
419 | 419 | use_quiet = gdb_interpreter_set_quiet (interp_to_use, 1); |
420 | 420 | |
421 | - if (!gdb_set_interpreter (interp_to_use)) | |
421 | + if (!gdb_interpreter_set (interp_to_use)) | |
422 | 422 | error ("Could not switch to interpreter \"%s\".", prules[0]); |
423 | 423 | |
424 | 424 | for (i = 1; i < nrules; i++) |
425 | 425 | { |
426 | 426 | if (!gdb_interpreter_exec (prules[i])) |
427 | 427 | { |
428 | - gdb_set_interpreter (old_interp); | |
428 | + gdb_interpreter_set (old_interp); | |
429 | 429 | gdb_interpreter_set_quiet (interp_to_use, old_quiet); |
430 | 430 | error ("error in command: \"%s\".", prules[i]); |
431 | 431 | break; |
432 | 432 | } |
433 | 433 | } |
434 | 434 | |
435 | - gdb_set_interpreter (old_interp); | |
435 | + gdb_interpreter_set (old_interp); | |
436 | 436 | gdb_interpreter_set_quiet (interp_to_use, use_quiet); |
437 | 437 | gdb_interpreter_set_quiet (old_interp, old_quiet); |
438 | 438 | } |
@@ -41,20 +41,17 @@ struct gdb_interpreter_procs | ||
41 | 41 | }; |
42 | 42 | |
43 | 43 | extern struct gdb_interpreter |
44 | - *gdb_new_interpreter (char *name, void *data, struct ui_out *uiout, | |
44 | + *gdb_interpreter_new (char *name, void *data, struct ui_out *uiout, | |
45 | 45 | struct gdb_interpreter_procs *procs); |
46 | 46 | |
47 | -extern int gdb_add_interpreter (struct gdb_interpreter *interp); | |
48 | -extern int gdb_set_interpreter (struct gdb_interpreter *interp); | |
49 | -extern struct gdb_interpreter *gdb_lookup_interpreter (char *name); | |
50 | -extern struct gdb_interpreter *gdb_current_interpreter (); | |
47 | +extern int gdb_interpreter_set (struct gdb_interpreter *interp); | |
48 | +extern struct gdb_interpreter *gdb_interpreter_lookup (char *name); | |
51 | 49 | extern struct ui_out *gdb_interpreter_ui_out (struct gdb_interpreter *interp); |
52 | -extern int gdb_current_interpreter_is_named (char *interp_name); | |
50 | +extern int gdb_interpreter_current_is_named_p (char *interp_name); | |
53 | 51 | extern int gdb_interpreter_exec (char *command_str); |
54 | 52 | extern int gdb_interpreter_display_prompt_p (void); |
55 | -extern int gdb_interpreter_set_quiet (struct gdb_interpreter *interp, | |
56 | - int quiet); | |
57 | 53 | extern int gdb_interpreter_is_quiet_p (struct gdb_interpreter *interp); |
54 | +extern int gdb_interpreter_add (struct gdb_interpreter *interp); | |
58 | 55 | extern struct gdb_interpreter_procs *gdb_interpreter_get_procs (struct |
59 | 56 | gdb_interpreter |
60 | 57 | *interp); |
@@ -1,5 +1,20 @@ | ||
1 | 1 | 2002-11-04 Elena Zannoni <ezannoni@redhat.com> |
2 | 2 | |
3 | + * mi-interp.c (mi_interpreter_resume): Ditto. | |
4 | + (mi_cmd_interpreter_exec): Use gdb_interpreter_lookup. | |
5 | + (_initialize_mi_interp): Use gdb_interpreter_new, | |
6 | + gdb_interpreter_add. | |
7 | + * mi-cmd-break.c (mi_cmd_break_insert): Use | |
8 | + gdb_interpreter_current_is_named_p. | |
9 | + (mi_cmd_break_watch): Ditto. | |
10 | + * mi-events.c (mi_interp_stack_changed_hook): Ditto. | |
11 | + (event_notify): Ditto. | |
12 | + * mi-main.c (captured_mi_execute_command): Use | |
13 | + gdb_interpreter_current_is_named_p. | |
14 | + (mi_load_progress): Ditto. | |
15 | + | |
16 | +2002-11-04 Elena Zannoni <ezannoni@redhat.com> | |
17 | + | |
3 | 18 | * mi-interp.c (_initialize_mi_interp): Use mi_interpreter_prompt_p |
4 | 19 | instead of mi_interpreter_prompt. |
5 | 20 | (mi_interpreter_prompt_p): Rename from mi_interpreter_prompt and |
@@ -141,8 +141,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc) | ||
141 | 141 | handlers, so we won't get any event notifications sent out to the |
142 | 142 | client. MI3+ does NOT send breakpoint information with the -break-insert |
143 | 143 | command for this reason. */ |
144 | - if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI2) | |
145 | - || gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1)) | |
144 | + if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
145 | + || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
146 | 146 | old_hooks = set_gdb_event_hooks (&breakpoint_hooks); |
147 | 147 | |
148 | 148 | /* Now we have what we need, let's insert the breakpoint! */ |
@@ -172,8 +172,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc) | ||
172 | 172 | "mi_cmd_break_insert: Bad switch."); |
173 | 173 | } |
174 | 174 | |
175 | - if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI2) | |
176 | - || gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1)) | |
175 | + if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
176 | + || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
177 | 177 | set_gdb_event_hooks (old_hooks); |
178 | 178 | |
179 | 179 | if (rc == GDB_RC_FAIL) |
@@ -256,8 +256,8 @@ mi_cmd_break_watch (char *command, char **argv, int argc) | ||
256 | 256 | cannot use the same printing mechanisms. So for MI3+, we simply |
257 | 257 | rewind MI's uiout so that we can prevent GDB from printing |
258 | 258 | any information about the watchpoint we just inserted. */ |
259 | - if (!gdb_current_interpreter_is_named (GDB_INTERPRETER_MI2) | |
260 | - && !gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1)) | |
259 | + if (!gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
260 | + && !gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
261 | 261 | mi_out_rewind (uiout); |
262 | 262 | |
263 | 263 | return MI_CMD_DONE; |
@@ -32,7 +32,7 @@ mi_interp_stack_changed_hook (void) | ||
32 | 32 | struct ui_out *saved_ui_out = uiout; |
33 | 33 | struct mi_out *tmp_mi_out; |
34 | 34 | |
35 | - if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1)) | |
35 | + if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
36 | 36 | uiout = gdb_interpreter_ui_out (mi1_interp); |
37 | 37 | else |
38 | 38 | uiout = gdb_interpreter_ui_out (mi_interp); |
@@ -48,8 +48,8 @@ event_notify (const char *string, ...) | ||
48 | 48 | { |
49 | 49 | va_list args; |
50 | 50 | |
51 | - if (!gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1) | |
52 | - && !gdb_current_interpreter_is_named (GDB_INTERPRETER_MI2)) | |
51 | + if (!gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1) | |
52 | + && !gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2)) | |
53 | 53 | { |
54 | 54 | va_start (args, string); |
55 | 55 | vfprintf_unfiltered (mi_event_channel, string, args); |
@@ -139,19 +139,19 @@ mi_interpreter_resume (void *data) | ||
139 | 139 | /* Route target output through the MI. */ |
140 | 140 | gdb_stdtarg = mi_stdtarg; |
141 | 141 | |
142 | - /* Replace all the hooks that we know about. There really needs to be a better way | |
143 | - of doing this... */ | |
142 | + /* Replace all the hooks that we know about. There really needs to | |
143 | + be a better way of doing this... */ | |
144 | 144 | clear_interpreter_hooks (); |
145 | 145 | set_gdb_event_hooks (&mi_event_handlers); |
146 | 146 | |
147 | 147 | show_load_progress = mi_load_progress; |
148 | 148 | |
149 | 149 | /* If we're _the_ interpreter, take control. */ |
150 | - if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI2)) | |
150 | + if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2)) | |
151 | 151 | command_loop_hook = mi2_command_loop; |
152 | - else if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1)) | |
152 | + else if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
153 | 153 | command_loop_hook = mi1_command_loop; |
154 | - else if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI)) | |
154 | + else if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI)) | |
155 | 155 | command_loop_hook = mi2_command_loop; |
156 | 156 | else |
157 | 157 | return 0; |
@@ -214,7 +214,7 @@ mi_cmd_interpreter_exec (char *command, char **argv, int argc) | ||
214 | 214 | return MI_CMD_ERROR; |
215 | 215 | } |
216 | 216 | |
217 | - interp_to_use = gdb_lookup_interpreter (argv[0]); | |
217 | + interp_to_use = gdb_interpreter_lookup (argv[0]); | |
218 | 218 | if (interp_to_use == NULL) |
219 | 219 | { |
220 | 220 | xasprintf (&mi_error_message, |
@@ -426,12 +426,12 @@ _initialize_mi_interp (void) | ||
426 | 426 | if (mi1_interp == NULL) |
427 | 427 | { |
428 | 428 | mi1_interp = |
429 | - gdb_new_interpreter (GDB_INTERPRETER_MI1, NULL, mi_out_new (1), | |
429 | + gdb_interpreter_new (GDB_INTERPRETER_MI1, NULL, mi_out_new (1), | |
430 | 430 | &procs); |
431 | 431 | if (mi1_interp == NULL) |
432 | 432 | error |
433 | 433 | ("Couldn't allocate a new interpreter for the mi1 interpreter\n"); |
434 | - if (gdb_add_interpreter (mi1_interp) != 1) | |
434 | + if (gdb_interpreter_add (mi1_interp) != 1) | |
435 | 435 | error ("Couldn't add the mi1 interpreter to gdb.\n"); |
436 | 436 | } |
437 | 437 |
@@ -439,12 +439,12 @@ _initialize_mi_interp (void) | ||
439 | 439 | if (mi2_interp == NULL) |
440 | 440 | { |
441 | 441 | mi2_interp = |
442 | - gdb_new_interpreter (GDB_INTERPRETER_MI2, NULL, mi_out_new (2), | |
442 | + gdb_interpreter_new (GDB_INTERPRETER_MI2, NULL, mi_out_new (2), | |
443 | 443 | &procs); |
444 | 444 | if (mi2_interp == NULL) |
445 | 445 | error |
446 | 446 | ("Couldn't allocate a new interpreter for the mi2 interpreter\n"); |
447 | - if (gdb_add_interpreter (mi2_interp) != 1) | |
447 | + if (gdb_interpreter_add (mi2_interp) != 1) | |
448 | 448 | error ("Couldn't add the mi2 interpreter to gdb.\n"); |
449 | 449 | } |
450 | 450 |
@@ -452,12 +452,12 @@ _initialize_mi_interp (void) | ||
452 | 452 | if (mi_interp == NULL) |
453 | 453 | { |
454 | 454 | mi_interp = |
455 | - gdb_new_interpreter (GDB_INTERPRETER_MI, NULL, mi_out_new (3), | |
455 | + gdb_interpreter_new (GDB_INTERPRETER_MI, NULL, mi_out_new (3), | |
456 | 456 | &procs); |
457 | 457 | if (mi_interp == NULL) |
458 | 458 | error |
459 | 459 | ("Couldn't allocate a new interpreter for the mi interpreter\n"); |
460 | - if (gdb_add_interpreter (mi_interp) != 1) | |
460 | + if (gdb_interpreter_add (mi_interp) != 1) | |
461 | 461 | error ("Couldn't add the mi interpreter to gdb.\n"); |
462 | 462 | } |
463 | 463 | } |
@@ -1160,9 +1160,9 @@ captured_mi_execute_command (struct ui_out *uiout, void *data) | ||
1160 | 1160 | mi_execute_cli_command ("%s", context->command); |
1161 | 1161 | |
1162 | 1162 | /* If we changed interpreters, DON'T print out anything. */ |
1163 | - if (gdb_current_interpreter_is_named (GDB_INTERPRETER_MI) | |
1164 | - || gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1) | |
1165 | - || gdb_current_interpreter_is_named (GDB_INTERPRETER_MI2)) | |
1163 | + if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI) | |
1164 | + || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
1165 | + || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
1166 | 1166 | { |
1167 | 1167 | /* print the result */ |
1168 | 1168 | /* FIXME: Check for errors here. */ |
@@ -1410,9 +1410,9 @@ mi_load_progress (const char *section_name, | ||
1410 | 1410 | static char *previous_sect_name = NULL; |
1411 | 1411 | int new_section; |
1412 | 1412 | |
1413 | - if (!gdb_current_interpreter_is_named (GDB_INTERPRETER_MI) | |
1414 | - && !gdb_current_interpreter_is_named (GDB_INTERPRETER_MI1) | |
1415 | - && !gdb_current_interpreter_is_named (GDB_INTERPRETER_MI2)) | |
1413 | + if (!gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI) | |
1414 | + && !gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
1415 | + && !gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
1416 | 1416 | return; |
1417 | 1417 | |
1418 | 1418 | update_threshold.tv_sec = 0; |
@@ -2130,11 +2130,15 @@ gdb_init (char *argv0) | ||
2130 | 2130 | /* All the interpreters should have had a look at things by now. |
2131 | 2131 | Initialize the selected interpreter. */ |
2132 | 2132 | { |
2133 | + | |
2134 | + /* There will always be an interpreter. Either the one specified | |
2135 | + by the user at start up or the console. */ | |
2136 | + | |
2133 | 2137 | struct gdb_interpreter *interp; |
2134 | 2138 | if (interpreter_p == NULL) |
2135 | 2139 | interpreter_p = xstrdup (GDB_INTERPRETER_CONSOLE); |
2136 | 2140 | |
2137 | - interp = gdb_lookup_interpreter (interpreter_p); | |
2141 | + interp = gdb_interpreter_lookup (interpreter_p); | |
2138 | 2142 | |
2139 | 2143 | if (interp == NULL) |
2140 | 2144 | { |
@@ -2142,7 +2146,7 @@ gdb_init (char *argv0) | ||
2142 | 2146 | interpreter_p); |
2143 | 2147 | exit (1); |
2144 | 2148 | } |
2145 | - if (!gdb_set_interpreter (interp)) | |
2149 | + if (!gdb_interpreter_set (interp)) | |
2146 | 2150 | { |
2147 | 2151 | fprintf_unfiltered (gdb_stderr, "Interpreter `%s' failed to initialize.\n", |
2148 | 2152 | interpreter_p); |