GNU Binutils with patches for OS216
Revisión | 02c08270fa34d257c3930afe16e4cddf7421c2a9 (tree) |
---|---|
Tiempo | 2003-02-04 10:26:55 |
Autor | Andrew Cagney <cagney@redh...> |
Commiter | Andrew Cagney |
Kill off anything not directly related to the CLI command.
@@ -144,11 +144,15 @@ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ | ||
144 | 144 | # CLI sub directory definitons |
145 | 145 | # |
146 | 146 | SUBDIR_CLI_OBS = \ |
147 | - cli-dump.o cli-decode.o \ | |
148 | - cli-interp.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o | |
147 | + cli-dump.o \ | |
148 | + cli-decode.o cli-script.o cli-cmds.o \ | |
149 | + cli-interp.o \ | |
150 | + cli-setshow.o cli-utils.o | |
149 | 151 | SUBDIR_CLI_SRCS = \ |
150 | - cli/cli-dump.c cli/cli-decode.c \ | |
151 | - cli/cli-interp.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \ | |
152 | + cli/cli-dump.c \ | |
153 | + cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c \ | |
154 | + cli/cli-interp.c \ | |
155 | + cli/cli-setshow.c \ | |
152 | 156 | cli/cli-utils.c |
153 | 157 | SUBDIR_CLI_DEPS = |
154 | 158 | SUBDIR_CLI_INITS = \ |
@@ -167,7 +171,6 @@ SUBDIR_MI_OBS = \ | ||
167 | 171 | mi-out.o mi-console.o \ |
168 | 172 | mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \ |
169 | 173 | mi-cmd-disas.o \ |
170 | - mi-events.o \ | |
171 | 174 | mi-interp.o \ |
172 | 175 | mi-main.o mi-parse.o mi-getopt.o |
173 | 176 | SUBDIR_MI_SRCS = \ |
@@ -175,7 +178,6 @@ SUBDIR_MI_SRCS = \ | ||
175 | 178 | mi/mi-cmds.c mi/mi-cmd-env.c \ |
176 | 179 | mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \ |
177 | 180 | mi/mi-cmd-disas.c \ |
178 | - mi/mi-events.c \ | |
179 | 181 | mi/mi-interp.c \ |
180 | 182 | mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c |
181 | 183 | SUBDIR_MI_DEPS = |
@@ -520,7 +522,8 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ | ||
520 | 522 | frame-unwind.c \ |
521 | 523 | gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \ |
522 | 524 | hpacc-abi.c \ |
523 | - inf-loop.c infcmd.c inflow.c infrun.c interps.c \ | |
525 | + inf-loop.c infcmd.c inflow.c infrun.c \ | |
526 | + interps.c \ | |
524 | 527 | jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \ |
525 | 528 | kod.c kod-cisco.c \ |
526 | 529 | language.c linespec.c \ |
@@ -742,6 +745,7 @@ cli_utils_h = $(srcdir)/cli/cli-utils.h | ||
742 | 745 | # gdb/mi/ headers |
743 | 746 | # |
744 | 747 | |
748 | +mi_h = $(srcdir)/mi/mi.h | |
745 | 749 | mi_cmds_h = $(srcdir)/mi/mi-cmds.h |
746 | 750 | mi_console_h = $(srcdir)/mi/mi-console.h |
747 | 751 | mi_getopt_h = $(srcdir)/mi/mi-getopt.h |
@@ -821,6 +825,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \ | ||
821 | 825 | source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \ |
822 | 826 | symtab.o symfile.o symmisc.o linespec.o infcmd.o infrun.o \ |
823 | 827 | expprint.o environ.o stack.o thread.o \ |
828 | + interps.o \ | |
824 | 829 | macrotab.o macrocmd.o macroexp.o macroscope.o \ |
825 | 830 | event-loop.o event-top.o inf-loop.o completer.o \ |
826 | 831 | gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o $(DEPFILES) \ |
@@ -833,7 +838,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \ | ||
833 | 838 | dbxread.o coffread.o elfread.o \ |
834 | 839 | dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \ |
835 | 840 | c-lang.o f-lang.o \ |
836 | - ui-out.o cli-out.o interps.o \ | |
841 | + ui-out.o cli-out.o \ | |
837 | 842 | varobj.o wrapper.o \ |
838 | 843 | jv-lang.o jv-valprint.o jv-typeprint.o \ |
839 | 844 | m2-lang.o p-lang.o p-typeprint.o p-valprint.o \ |
@@ -1639,10 +1644,9 @@ eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ | ||
1639 | 1644 | $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \ |
1640 | 1645 | $(f_lang_h) $(cp_abi_h) |
1641 | 1646 | event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ |
1642 | - $(gdb_string_h) $(interps_h) | |
1647 | + $(gdb_string_h) | |
1643 | 1648 | event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ |
1644 | - $(terminal_h) $(event_loop_h) $(event_top_h) $(gdbcmd_h) \ | |
1645 | - $(readline_h) $(interps_h) | |
1649 | + $(terminal_h) $(event_loop_h) $(event_top_h) $(gdbcmd_h) $(readline_h) | |
1646 | 1650 | exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ |
1647 | 1651 | $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ |
1648 | 1652 | $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h) \ |
@@ -1703,8 +1707,6 @@ go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \ | ||
1703 | 1707 | $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \ |
1704 | 1708 | $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \ |
1705 | 1709 | $(gdb_string_h) |
1706 | -interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ | |
1707 | - $(event_top_h) $(interps_h) $(gdb_h) $(wrapper_h) $(gdb_events_h) | |
1708 | 1710 | h8300-tdep.o: h8300-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(dis_asm_h) \ |
1709 | 1711 | $(gdbcmd_h) $(gdbtypes_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \ |
1710 | 1712 | $(regcache_h) |
@@ -1801,6 +1803,9 @@ inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ | ||
1801 | 1803 | $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) |
1802 | 1804 | infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ |
1803 | 1805 | $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbcore_h) |
1806 | +interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ | |
1807 | + $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \ | |
1808 | + $(gdb_events_h) | |
1804 | 1809 | irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \ |
1805 | 1810 | $(gregset_h) |
1806 | 1811 | irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ |
@@ -1876,7 +1881,7 @@ macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \ | ||
1876 | 1881 | $(bcache_h) $(complaints_h) |
1877 | 1882 | main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \ |
1878 | 1883 | $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \ |
1879 | - $(event_loop_h) $(ui_out_h) $(main_h) $(interps_h) | |
1884 | + $(event_loop_h) $(ui_out_h) $(main_h) | |
1880 | 1885 | maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \ |
1881 | 1886 | $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \ |
1882 | 1887 | $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h) |
@@ -2319,8 +2324,8 @@ cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ | ||
2319 | 2324 | $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \ |
2320 | 2325 | $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h) |
2321 | 2326 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c |
2322 | -cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(value_h) \ | |
2323 | - $(wrapper_h) $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) | |
2327 | +cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ | |
2328 | + $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) | |
2324 | 2329 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c |
2325 | 2330 | cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \ |
2326 | 2331 | $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \ |
@@ -2482,7 +2487,7 @@ gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \ | ||
2482 | 2487 | |
2483 | 2488 | mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \ |
2484 | 2489 | $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \ |
2485 | - $(mi_getopt_h) $(gdb_events_h) $(gdb_h) $(interps_h) | |
2490 | + $(mi_getopt_h) $(gdb_events_h) $(gdb_h) | |
2486 | 2491 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c |
2487 | 2492 | mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \ |
2488 | 2493 | $(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h) $(disasm_h) |
@@ -2503,21 +2508,18 @@ mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \ | ||
2503 | 2508 | mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \ |
2504 | 2509 | $(gdb_string_h) |
2505 | 2510 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c |
2506 | -mi-events.o: $(srcdir)/mi/mi-events.c $(defs_h) $(ui_out_h) $(interps_h) \ | |
2507 | - $(gdb_h) $(breakpoint_h) $(mi_h) | |
2508 | - $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-events.c | |
2509 | 2511 | mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \ |
2510 | 2512 | $(gdb_string_h) |
2511 | 2513 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c |
2512 | -mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(interps_h) \ | |
2513 | - $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) \ | |
2514 | - $(top_h) $(mi_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) | |
2514 | +mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \ | |
2515 | + $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \ | |
2516 | + $(mi_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) | |
2515 | 2517 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c |
2516 | 2518 | mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ |
2517 | 2519 | $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ |
2518 | 2520 | $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) \ |
2519 | 2521 | $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ |
2520 | - $(gdb_h) $(frame_h) $(interps_h) | |
2522 | + $(gdb_h) $(frame_h) | |
2521 | 2523 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c |
2522 | 2524 | mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) |
2523 | 2525 | $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c |
@@ -3899,7 +3899,6 @@ create_internal_breakpoint (CORE_ADDR address, enum bptype type) | ||
3899 | 3899 | b = set_raw_breakpoint (sal, type); |
3900 | 3900 | b->number = internal_breakpoint_number--; |
3901 | 3901 | b->disposition = disp_donttouch; |
3902 | - breakpoint_create_event (b->number); | |
3903 | 3902 | |
3904 | 3903 | return b; |
3905 | 3904 | } |
@@ -4183,7 +4182,6 @@ solib_load_unload_1 (char *hookname, int tempflag, char *dll_pathname, | ||
4183 | 4182 | } |
4184 | 4183 | |
4185 | 4184 | mention (b); |
4186 | - breakpoint_create_event (b->number); | |
4187 | 4185 | do_cleanups (old_chain); |
4188 | 4186 | } |
4189 | 4187 |
@@ -4229,7 +4227,6 @@ create_fork_vfork_event_catchpoint (int tempflag, char *cond_string, | ||
4229 | 4227 | b->forked_inferior_pid = 0; |
4230 | 4228 | |
4231 | 4229 | mention (b); |
4232 | - breakpoint_create_event (b->number); | |
4233 | 4230 | } |
4234 | 4231 | |
4235 | 4232 | void |
@@ -4268,7 +4265,6 @@ create_exec_event_catchpoint (int tempflag, char *cond_string) | ||
4268 | 4265 | b->disposition = tempflag ? disp_del : disp_donttouch; |
4269 | 4266 | |
4270 | 4267 | mention (b); |
4271 | - breakpoint_create_event (b->number); | |
4272 | 4268 | } |
4273 | 4269 | |
4274 | 4270 | static int |
@@ -4392,7 +4388,6 @@ set_momentary_breakpoint (struct symtab_and_line sal, struct frame_id frame_id, | ||
4392 | 4388 | if (in_thread_list (inferior_ptid)) |
4393 | 4389 | b->thread = pid_to_thread_id (inferior_ptid); |
4394 | 4390 | |
4395 | - breakpoint_create_event (b->number); | |
4396 | 4391 | return b; |
4397 | 4392 | } |
4398 | 4393 |
@@ -4409,6 +4404,15 @@ mention (struct breakpoint *b) | ||
4409 | 4404 | stb = ui_out_stream_new (uiout); |
4410 | 4405 | old_chain = make_cleanup_ui_out_stream_delete (stb); |
4411 | 4406 | |
4407 | + /* FIXME: This is misplaced; mention() is called by things (like hitting a | |
4408 | + watchpoint) other than breakpoint creation. It should be possible to | |
4409 | + clean this up and at the same time replace the random calls to | |
4410 | + breakpoint_changed with this hook, as has already been done for | |
4411 | + delete_breakpoint_hook and so on. */ | |
4412 | + if (create_breakpoint_hook) | |
4413 | + create_breakpoint_hook (b); | |
4414 | + breakpoint_create_event (b->number); | |
4415 | + | |
4412 | 4416 | switch (b->type) |
4413 | 4417 | { |
4414 | 4418 | case bp_none: |
@@ -4579,7 +4583,6 @@ create_breakpoints (struct symtabs_and_lines sals, char **addr_string, | ||
4579 | 4583 | b->enable_state = bp_enabled; |
4580 | 4584 | b->disposition = disposition; |
4581 | 4585 | mention (b); |
4582 | - breakpoint_create_event (b->number); | |
4583 | 4586 | } |
4584 | 4587 | } |
4585 | 4588 | } |
@@ -5434,12 +5437,9 @@ watch_command_1 (char *arg, int accessflag, int from_tty) | ||
5434 | 5437 | /* The scope breakpoint is related to the watchpoint. We |
5435 | 5438 | will need to act on them together. */ |
5436 | 5439 | b->related_breakpoint = scope_breakpoint; |
5437 | - | |
5438 | - breakpoint_create_event (scope_breakpoint->number); | |
5439 | 5440 | } |
5440 | 5441 | } |
5441 | 5442 | value_free_to_mark (mark); |
5442 | - breakpoint_create_event (b->number); | |
5443 | 5443 | mention (b); |
5444 | 5444 | } |
5445 | 5445 |
@@ -6183,7 +6183,6 @@ create_exception_catchpoint (int tempflag, char *cond_string, | ||
6183 | 6183 | b->enable_state = bp_enabled; |
6184 | 6184 | b->disposition = tempflag ? disp_del : disp_donttouch; |
6185 | 6185 | mention (b); |
6186 | - breakpoint_create_event (b->number); | |
6187 | 6186 | } |
6188 | 6187 | |
6189 | 6188 | /* Deal with "catch catch" and "catch throw" commands */ |
@@ -6349,7 +6348,6 @@ handle_gnu_4_16_catch_command (char *arg, int tempflag, int from_tty) | ||
6349 | 6348 | b->disposition = tempflag ? disp_del : disp_donttouch; |
6350 | 6349 | |
6351 | 6350 | mention (b); |
6352 | - breakpoint_create_event (b->number); | |
6353 | 6351 | } |
6354 | 6352 | |
6355 | 6353 | if (sals.nelts > 1) |
@@ -6492,7 +6490,6 @@ set_breakpoint_sal (struct symtab_and_line sal) | ||
6492 | 6490 | b->number = breakpoint_count; |
6493 | 6491 | b->cond = 0; |
6494 | 6492 | b->thread = -1; |
6495 | - breakpoint_create_event (b->number); | |
6496 | 6493 | return b; |
6497 | 6494 | } |
6498 | 6495 |
@@ -23,6 +23,8 @@ | ||
23 | 23 | #define CLI_OUT_H |
24 | 24 | |
25 | 25 | extern struct ui_out *cli_out_new (struct ui_file *stream); |
26 | + | |
26 | 27 | extern struct ui_file *cli_out_set_stream (struct ui_out *uiout, |
27 | 28 | struct ui_file *stream); |
29 | + | |
28 | 30 | #endif |
@@ -1195,6 +1195,7 @@ extern void (*error_begin_hook) (void); | ||
1195 | 1195 | |
1196 | 1196 | extern int (*ui_load_progress_hook) (const char *section, unsigned long num); |
1197 | 1197 | |
1198 | + | |
1198 | 1199 | /* Inhibit window interface if non-zero. */ |
1199 | 1200 | |
1200 | 1201 | extern int use_windows; |
@@ -86,6 +86,7 @@ f:void:selected_thread_changed:int thread_num:thread_num | ||
86 | 86 | #*:void:warning_hook:const char *string, va_list args:string, args |
87 | 87 | #*:void:target_output_hook:char *b:b |
88 | 88 | #*:void:interactive_hook:void |
89 | +#*:void:registers_changed_hook:void | |
89 | 90 | #*:void:readline_begin_hook:char *format, ...:format |
90 | 91 | #*:char *:readline_hook:char *prompt:prompt |
91 | 92 | #*:void:readline_end_hook:void |
@@ -100,6 +101,7 @@ f:void:selected_thread_changed:int thread_num:thread_num | ||
100 | 101 | #*:int:gdb_load_progress_hook:char *section, unsigned long num:section, num |
101 | 102 | #*:void:pre_add_symbol_hook:char *name:name |
102 | 103 | #*:void:post_add_symbol_hook:void |
104 | +#*:void:selected_frame_level_changed_hook:int level:level | |
103 | 105 | #*:int:gdb_loop_hook:int signo:signo |
104 | 106 | ##*:void:solib_create_inferior_hook:void |
105 | 107 | ##*:void:xcoff_relocate_symtab_hook:unsigned int |
@@ -28,7 +28,6 @@ | ||
28 | 28 | #include "mi-getopt.h" |
29 | 29 | #include "gdb-events.h" |
30 | 30 | #include "gdb.h" |
31 | -#include "interps.h" | |
32 | 31 | |
33 | 32 | enum |
34 | 33 | { |
@@ -40,8 +39,7 @@ enum | ||
40 | 39 | static void |
41 | 40 | breakpoint_notify (int b) |
42 | 41 | { |
43 | - if (b > 0) | |
44 | - gdb_breakpoint_query (uiout, b); | |
42 | + gdb_breakpoint_query (uiout, b); | |
45 | 43 | } |
46 | 44 | |
47 | 45 |
@@ -79,7 +77,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc) | ||
79 | 77 | int ignore_count = 0; |
80 | 78 | char *condition = NULL; |
81 | 79 | enum gdb_rc rc; |
82 | - struct gdb_events *old_hooks = NULL; | |
80 | + struct gdb_events *old_hooks; | |
83 | 81 | enum opt |
84 | 82 | { |
85 | 83 | HARDWARE_OPT, TEMP_OPT /*, REGEXP_OPT */ , CONDITION_OPT, |
@@ -135,17 +133,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc) | ||
135 | 133 | error ("mi_cmd_break_insert: Garbage following <location>"); |
136 | 134 | address = argv[optind]; |
137 | 135 | |
138 | - /* Save the current event handlers so that we can insert our own. This | |
139 | - allows us to capture the breakpoint information as the breakpoint | |
140 | - is created. Unfortunately, it also overrides any existing event | |
141 | - handlers, so we won't get any event notifications sent out to the | |
142 | - client. MI3+ does NOT send breakpoint information with the -break-insert | |
143 | - command for this reason. */ | |
144 | - if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
145 | - || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
146 | - old_hooks = set_gdb_event_hooks (&breakpoint_hooks); | |
147 | - | |
148 | 136 | /* Now we have what we need, let's insert the breakpoint! */ |
137 | + old_hooks = set_gdb_event_hooks (&breakpoint_hooks); | |
149 | 138 | switch (type) |
150 | 139 | { |
151 | 140 | case REG_BP: |
@@ -171,10 +160,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc) | ||
171 | 160 | internal_error (__FILE__, __LINE__, |
172 | 161 | "mi_cmd_break_insert: Bad switch."); |
173 | 162 | } |
174 | - | |
175 | - if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
176 | - || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
177 | - set_gdb_event_hooks (old_hooks); | |
163 | + set_gdb_event_hooks (old_hooks); | |
178 | 164 | |
179 | 165 | if (rc == GDB_RC_FAIL) |
180 | 166 | return MI_CMD_CAUGHT_ERROR; |
@@ -250,15 +236,5 @@ mi_cmd_break_watch (char *command, char **argv, int argc) | ||
250 | 236 | default: |
251 | 237 | error ("mi_cmd_break_watch: Unknown watchpoint type."); |
252 | 238 | } |
253 | - | |
254 | - /* Ugh. This is a hack. mention and print_one_breakpoint in | |
255 | - breakpoint.c are so overloaded, that watchpoints and breakpoints | |
256 | - cannot use the same printing mechanisms. So for MI3+, we simply | |
257 | - rewind MI's uiout so that we can prevent GDB from printing | |
258 | - any information about the watchpoint we just inserted. */ | |
259 | - if (!gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2) | |
260 | - && !gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1)) | |
261 | - mi_out_rewind (uiout); | |
262 | - | |
263 | 239 | return MI_CMD_DONE; |
264 | 240 | } |
@@ -27,7 +27,7 @@ | ||
27 | 27 | enum mi_cmd_result |
28 | 28 | { |
29 | 29 | /* Report the command as ``done''. Display both the ``NNN^done'' |
30 | - message and the completion prompt. */ | |
30 | + message and the completion prompt. */ | |
31 | 31 | MI_CMD_DONE = 0, |
32 | 32 | /* The command is still running in the forground. Main loop should |
33 | 33 | display the completion prompt. */ |
@@ -130,4 +130,5 @@ extern struct ui_file *raw_stdout; | ||
130 | 130 | extern char *mi_error_message; |
131 | 131 | extern void mi_error_last_message (void); |
132 | 132 | extern void mi_execute_command (char *cmd, int from_tty); |
133 | + | |
133 | 134 | #endif |
@@ -129,7 +129,6 @@ mi_interpreter_resume (void *data) | ||
129 | 129 | /* Replace all the hooks that we know about. There really needs to |
130 | 130 | be a better way of doing this... */ |
131 | 131 | clear_interpreter_hooks (); |
132 | - set_gdb_event_hooks (&mi_event_handlers); | |
133 | 132 | |
134 | 133 | show_load_progress = mi_load_progress; |
135 | 134 |
@@ -24,7 +24,6 @@ | ||
24 | 24 | |
25 | 25 | extern struct gdb_interpreter *mi_interp; |
26 | 26 | extern struct gdb_interpreter *mi1_interp; |
27 | -extern struct gdb_events mi_event_handlers; | |
28 | 27 | extern struct ui_file *mi_event_channel; |
29 | 28 | |
30 | 29 | extern void mi_setup_architecture_data (void); |
@@ -1,3 +1,8 @@ | ||
1 | +2003-02-03 Andrew Cagney <ac131313@redhat.com> | |
2 | + | |
3 | + * mi-cli.exp: Remove patterns checking for events. Better handle | |
4 | + continuations. | |
5 | + | |
1 | 6 | 2002-08-21 Keith Seitz <keiths@redhat.com> |
2 | 7 | |
3 | 8 | * mi-cli.exp: Use "target_changed" instead of "register-update". |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 1999, 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -62,20 +62,20 @@ proc test_tbreak_creation_and_listing {} { | ||
62 | 62 | # -break-list |
63 | 63 | |
64 | 64 | mi_gdb_test "222-break-insert -t main" \ |
65 | - "=breakpoint-create,number=\"1\"\r\n222\\^done" \ | |
65 | + "222\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ | |
66 | 66 | "break-insert -t operation" |
67 | 67 | |
68 | 68 | mi_gdb_test "333-break-insert -t basics.c:callee2" \ |
69 | - "=breakpoint-create,number=\"2\"\r\n333\\^done" \ | |
69 | + "333\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \ | |
70 | 70 | "insert temp breakpoint at basics.c:callee2" |
71 | 71 | |
72 | 72 | mi_gdb_test "444-break-insert -t basics.c:15" \ |
73 | - "=breakpoint-create,number=\"3\"\r\n444\\^done" \ | |
73 | + "444\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \ | |
74 | 74 | "insert temp breakpoint at basics.c:15 (callee3)" |
75 | 75 | |
76 | 76 | # Getting the quoting right is tricky. That is "\"<file>\":6" |
77 | 77 | mi_gdb_test "555-break-insert -t \"\\\"${srcfile}\\\":6\"" \ |
78 | - "=breakpoint-create,number=\"4\"\r\n555\\^done" \ | |
78 | + "555\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"del\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \ | |
79 | 79 | "insert temp breakpoint at \"<fullfilename>\":6 (callee4)" |
80 | 80 | |
81 | 81 | mi_gdb_test "666-break-list" \ |
@@ -57,8 +57,12 @@ mi_gdb_test "-interpreter-exec console bogus" \ | ||
57 | 57 | "&\\\"$msg\\\\n\\\".*\\^error,msg=\\\"$msg\\\".*" \ |
58 | 58 | "-interpreter-exec console bogus" |
59 | 59 | |
60 | +# NOTE: cagney/2003-02-03: Not yet. | |
61 | +# mi_gdb_test "-interpreter-exec console \"file $binfile\"" \ | |
62 | +# {(=.*)+\^done} \ | |
63 | +# "-interpreter-exec console \"file \$binfile\"" | |
60 | 64 | mi_gdb_test "-interpreter-exec console \"file $binfile\"" \ |
61 | - {(=.*)+\^done} \ | |
65 | + {\^done} \ | |
62 | 66 | "-interpreter-exec console \"file \$binfile\"" |
63 | 67 | |
64 | 68 | mi_run_to_main |
@@ -71,8 +75,12 @@ mi_gdb_test "-interpreter-exec console \"show args\"" \ | ||
71 | 75 | {\~"Argument list to give program being debugged when it is started is \\\"foobar\\\"\.\\n".*\^done} \ |
72 | 76 | "-interpreter-exec console \"show args\"" |
73 | 77 | |
78 | +# NOTE: cagney/2003-02-03: Not yet. | |
79 | +# mi_gdb_test "-interpreter-exec console \"break callee4\"" \ | |
80 | +# {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \ | |
81 | +# "-interpreter-exec console \"break callee4\"" | |
74 | 82 | mi_gdb_test "-interpreter-exec console \"break callee4\"" \ |
75 | - {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \ | |
83 | + {(&.*)*.*~"Breakpoint 2 at.*\\n".*\^done} \ | |
76 | 84 | "-interpreter-exec console \"break callee4\"" |
77 | 85 | |
78 | 86 | mi_gdb_test "-interpreter-exec console \"info break\"" \ |
@@ -87,41 +95,94 @@ mi_gdb_test "-interpreter-exec console \"list\"" \ | ||
87 | 95 | {.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done} \ |
88 | 96 | "-interpreter-exec console \"list\"" |
89 | 97 | |
90 | -mi_gdb_test "-exec-continue" \ | |
91 | - {.*\*stopped,reason="breakpoint-hit",.*func="callee4".*file=".*basics.c",line="8"\}} \ | |
92 | - "-interpreter-exec console \"continue to callee4\"" | |
98 | +# # NOTE: cagney/2003-02-03: Not yet. | |
99 | +# mi_gdb_test "-exec-continue" \ | |
100 | +# {.*\*stopped,reason="breakpoint-hit",.*func="callee4".*file=".*basics.c",line="8"\}} \ | |
101 | +# "-interpreter-exec console \"continue to callee4\"" | |
102 | +send_gdb "999-exec-continue\n" | |
103 | +gdb_expect { | |
104 | + -re "999\\^running\[\r\n\]+$mi_gdb_prompt.*999\\*stopped,reason=.breakpoint-hit.*$mi_gdb_prompt$" { | |
105 | + pass "continue to callee4" | |
106 | + } | |
107 | + timeout { | |
108 | + fail "continue to callee4 (timeout)" | |
109 | + } | |
110 | +} | |
93 | 111 | |
94 | -mi_gdb_test "-interpreter-exec console \"delete 2\"" \ | |
95 | - {.*=breakpoint-delete,number=\"2\".*\^done} \ | |
112 | +# NOTE: cagney/2003-02-03: Not yet. | |
113 | +# mi_gdb_test "100-interpreter-exec console \"delete 2\"" \ | |
114 | +# {.*=breakpoint-delete,number=\"2\".*\^done} \ | |
115 | +# "-interpreter-exec console \"delete 2\"" | |
116 | +mi_gdb_test "100-interpreter-exec console \"delete 2\"" \ | |
117 | + {100\^done} \ | |
96 | 118 | "-interpreter-exec console \"delete 2\"" |
97 | 119 | |
98 | -mi_gdb_test "-interpreter-exec console \"up\"" \ | |
99 | - {.*=selected-frame-level-changed,level="1".*\^done} \ | |
120 | +# NOTE: cagney/2003-02-03: Not yet. | |
121 | +# mi_gdb_test "200-interpreter-exec console \"up\"" \ | |
122 | +# {.*=selected-frame-level-changed,level="1".*\^done} \ | |
123 | +# "-interpreter-exec console \"up\"" | |
124 | +mi_gdb_test "200-interpreter-exec console \"up\"" \ | |
125 | + {200\^done} \ | |
100 | 126 | "-interpreter-exec console \"up\"" |
101 | 127 | |
102 | -mi_gdb_test "-interpreter-exec console \"down\"" \ | |
103 | - {.*=selected-frame-level-changed,level="0".*\^done} \ | |
128 | +# NOTE: cagney/2003-02-03: Not yet. | |
129 | +# mi_gdb_test "300-interpreter-exec console \"down\"" \ | |
130 | +# {.*=selected-frame-level-changed,level="0".*\^done} \ | |
131 | +# "-interpreter-exec console \"down\"" | |
132 | +mi_gdb_test "300-interpreter-exec console \"down\"" \ | |
133 | + {300\^done} \ | |
104 | 134 | "-interpreter-exec console \"down\"" |
105 | 135 | |
106 | -mi_gdb_test "-interpreter-exec console \"frame 2\"" \ | |
107 | - {.*=selected-frame-level-changed,level="2".*\^done} \ | |
136 | +# NOTE: cagney/2003-02-03: Not yet. | |
137 | +# mi_gdb_test "-interpreter-exec console \"frame 2\"" \ | |
138 | +# {.*=selected-frame-level-changed,level="2".*\^done} \ | |
139 | +# "-interpreter-exec console \"frame 2\"" | |
140 | +mi_gdb_test "400-interpreter-exec console \"frame 2\"" \ | |
141 | + {400\^done} \ | |
108 | 142 | "-interpreter-exec console \"frame 2\"" |
109 | 143 | |
110 | -mi_gdb_test "-stack-select-frame 0" \ | |
111 | - {.*=selected-frame-level-changed,level="0".*\^done} \ | |
144 | +# NOTE: cagney/2003-02-03: Not yet. | |
145 | +# mi_gdb_test "-stack-select-frame 0" \ | |
146 | +# {.*=selected-frame-level-changed,level="0".*\^done} \ | |
147 | +# "-stack-select-frame 0" | |
148 | +mi_gdb_test "500-stack-select-frame 0" \ | |
149 | + {500\^done} \ | |
112 | 150 | "-stack-select-frame 0" |
113 | 151 | |
114 | -mi_gdb_test "-break-insert -t basics.c:35" \ | |
115 | - {.*=breakpoint-create,number="3".*\^done} \ | |
116 | - "-break-insert -t basics.c:35" | |
117 | - | |
118 | -mi_gdb_test "-exec-continue" \ | |
119 | - {.*\*stopped.*,file=".*basics.c",line="35"\}} \ | |
120 | - "-exec-continue to line 35" | |
152 | +# NOTE: cagney/2003-02-03: Not yet. | |
153 | +# mi_gdb_test "-break-insert -t basics.c:35" \ | |
154 | +# {.*=breakpoint-create,number="3".*\^done} \ | |
155 | +# "-break-insert -t basics.c:35" | |
156 | +mi_gdb_test "600-break-insert -t basics.c:35" \ | |
157 | + {600\^done,bkpt=.number="3",type="breakpoint".*\}} \ | |
158 | + "-break-insert -t basics.c:35" | |
159 | + | |
160 | +# mi_gdb_test "-exec-continue" \ | |
161 | +# {.*\*stopped.*,file=".*basics.c",line="35"\}} \ | |
162 | +# "-exec-continue to line 35" | |
163 | +send_gdb "700-exec-continue\n" | |
164 | +gdb_expect { | |
165 | + -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.35.*$mi_gdb_prompt$" { | |
166 | + pass "-exec-continue to line 35" | |
167 | + } | |
168 | + timeout { | |
169 | + fail "-exec-continue to line 35" | |
170 | + } | |
171 | +} | |
121 | 172 | |
122 | -mi_gdb_test "-exec-next" \ | |
123 | - {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \ | |
124 | - "-exec-next to line 37" | |
173 | +# NOTE: cagney/2003-02-03: Not yet. | |
174 | +# mi_gdb_test "-exec-next" \ | |
175 | +# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \ | |
176 | +# "-exec-next to line 37" | |
177 | +send_gdb "800-exec-next\n" | |
178 | +gdb_expect { | |
179 | + -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.37.*$mi_gdb_prompt$" { | |
180 | + pass "-exec-next to line 37" | |
181 | + } | |
182 | + timeout { | |
183 | + fail "-exec-next to line 37" | |
184 | + } | |
185 | +} | |
125 | 186 | |
126 | 187 | mi_gdb_test "-interpreter-exec console \"list\"" \ |
127 | 188 | {\~"37[ \t(\\t)]*return 0;\\n".*\^done} \ |
@@ -131,8 +192,12 @@ mi_gdb_test "-interpreter-exec console \"help set args\"" \ | ||
131 | 192 | {\~"Set argument list to give program being debugged when it is started\.\\nFollow this command with any number of args, to be passed to the program\.".*\^done} \ |
132 | 193 | "-interpreter-exec console \"help set args\"" |
133 | 194 | |
134 | -mi_gdb_test "-interpreter-exec console \"set \$pc=0x0\"" \ | |
135 | - {.*=target-changed.*\^done} \ | |
195 | +# NOTE: cagney/2003-02-03: Not yet. | |
196 | +# mi_gdb_test "-interpreter-exec console \"set \$pc=0x0\"" \ | |
197 | +# {.*=target-changed.*\^done} \ | |
198 | +# "-interpreter-exec console \"set \$pc=0x0\"" | |
199 | +mi_gdb_test "888-interpreter-exec console \"set \$pc=0x0\"" \ | |
200 | + {888\^done} \ | |
136 | 201 | "-interpreter-exec console \"set \$pc=0x0\"" |
137 | 202 | |
138 | 203 | #mi_gdb_test "-interpreter-exec console \"\"" \ |
@@ -17,11 +17,11 @@ | ||
17 | 17 | # Please email any bugs, comments, and/or additions to this file to: |
18 | 18 | # bug-gdb@prep.ai.mit.edu |
19 | 19 | |
20 | -# This file tests that GDB's console can be accessed via the MI. | |
21 | -# Specifically, we are testing the "interpreter-exec" command and that | |
22 | -# the commands that are executed via this command are properly executed. | |
23 | -# Console commands executed via MI should use MI output wrappers, MI event | |
24 | -# handlers, etc. | |
20 | +# This file tests MI thread commands. | |
21 | +# Specifically, we are testing the MI command set and the console (in MI) | |
22 | +# command set ("interpreter-exec") and that the commands that are executed | |
23 | +# via these command pathways are properly executed. Console commands | |
24 | +# executed via MI should use MI output wrappers, MI event handlers, etc. | |
25 | 25 | |
26 | 26 | # This only works with native configurations |
27 | 27 | if {![isnative]} { |
@@ -36,6 +36,10 @@ if {[mi_gdb_start]} { | ||
36 | 36 | continue |
37 | 37 | } |
38 | 38 | |
39 | +# The procs below dealing with parsing cli/mi output for the threadlist | |
40 | +# is duplicated in gdb669.exp. Any changes here will probably need to | |
41 | +# be made there as well. | |
42 | + | |
39 | 43 | proc get_mi_thread_list {name} { |
40 | 44 | global expect_out |
41 | 45 |
@@ -45,11 +49,16 @@ proc get_mi_thread_list {name} { | ||
45 | 49 | # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N" |
46 | 50 | # (gdb) |
47 | 51 | mi_gdb_test "-thread-list-ids" \ |
48 | - {\^done,thread-ids=\{(thread-id="[0-9]+"(,)*)+\},number-of-threads="[0-9]+"} \ | |
52 | + {\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},number-of-threads="[0-9]+"} \ | |
49 | 53 | "-thread_list_ids ($name)" |
50 | 54 | |
55 | + set output {} | |
56 | + if {[info exists expect_out(buffer)]} { | |
57 | + set output $expect_out(buffer) | |
58 | + } | |
59 | + | |
51 | 60 | set thread_list {} |
52 | - if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $expect_out(buffer) threads]} { | |
61 | + if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} { | |
53 | 62 | fail "finding threads in MI output ($name)" |
54 | 63 | } else { |
55 | 64 | pass "finding threads in MI output ($name)" |
@@ -74,9 +83,12 @@ proc check_mi_and_console_threads {name} { | ||
74 | 83 | global expect_out |
75 | 84 | |
76 | 85 | mi_gdb_test "-thread-list-ids" \ |
77 | - {\^done,thread-ids=\{(thread-id="[0-9]+"(,)*)+\},number-of-threads="[0-9]+"} \ | |
86 | + {\^done,thread-ids={(thread-id="[0-9]+"(,)*)+},number-of-threads="[0-9]+"} \ | |
78 | 87 | "-thread-list-ids ($name)" |
79 | - set mi_output $expect_out(buffer) | |
88 | + set mi_output {} | |
89 | + if {[info exists expect_out(buffer)]} { | |
90 | + set mi_output $expect_out(buffer) | |
91 | + } | |
80 | 92 | |
81 | 93 | # GDB will return a list of thread ids and some more info: |
82 | 94 | # |
@@ -86,10 +98,14 @@ proc check_mi_and_console_threads {name} { | ||
86 | 98 | # ~" 3 Thread 1026 (LWP 7733) () at __libc_nanosleep:-1" |
87 | 99 | # ~" 2 Thread 2049 (LWP 7732) 0x401411f8 in __poll (fds=0x804bb24, nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:63" |
88 | 100 | # ~"* 1 Thread 1024 (LWP 7731) main (argc=1, argv=0xbfffdd94) at ../../../src/gdb/testsuite/gdb.mi/pthreads.c:160" |
89 | - mi_gdb_test {-interpreter-exec console "info threads"} \ | |
101 | + # FIXME: kseitz/2002-09-05: Don't use the hack-cli method. | |
102 | + mi_gdb_test "info threads" \ | |
90 | 103 | {.*(~".*"[\r\n]*)+.*} \ |
91 | 104 | "info threads ($name)" |
92 | - set console_output $expect_out(buffer) | |
105 | + set console_output {} | |
106 | + if {[info exists $expect_out(buffer)]} { | |
107 | + set console_output $expect_out(buffer) | |
108 | + } | |
93 | 109 | |
94 | 110 | # Make a list of all known threads to console (gdb's thread IDs) |
95 | 111 | set console_thread_list {} |
@@ -159,19 +175,6 @@ proc check_mi_and_console_threads {name} { | ||
159 | 175 | } |
160 | 176 | } |
161 | 177 | |
162 | -# This procedure checks for the bug gdb/669, where the console | |
163 | -# command "info threads" and the MI command "-thread-list-ids" | |
164 | -# return different threads in the system. | |
165 | -proc check_for_gdb669_bug {} { | |
166 | - mi_run_to_main | |
167 | - check_mi_and_console_threads "at main" | |
168 | - | |
169 | - for {set i 0} {$i < 4} {incr i} { | |
170 | - mi_next "next, try $i" | |
171 | - check_mi_and_console_threads "try $i" | |
172 | - } | |
173 | -} | |
174 | - | |
175 | 178 | # This procedure tests the various thread commands in MI. |
176 | 179 | proc check_mi_thread_command_set {} { |
177 | 180 |
@@ -192,24 +195,11 @@ proc check_mi_thread_command_set {} { | ||
192 | 195 | # many of the threads are blocked in libc calls, |
193 | 196 | # and many people have libc's with no symbols. |
194 | 197 | mi_gdb_test "-thread-select $thread" \ |
195 | - "=context-changed,thread=\"$thread\"\r\n\\^done,new-thread-id=\"$thread\",frame={.*},line=\"(-)?\[0-9\]+\",file=\".*\"" \ | |
198 | + "\\^done,new-thread-id=\"$thread\",frame={.*}(,line=\"(-)?\[0-9\]+\",file=\".*\")?" \ | |
196 | 199 | "check_mi_thread_command_set: -thread-select $thread" |
197 | 200 | } |
198 | 201 | } |
199 | 202 | |
200 | -# This procedure checks that the console and MI don't get out | |
201 | -# of sync with each other. | |
202 | -proc check_console_thread_commands {} { | |
203 | - | |
204 | - # Assumed that we're at done_making_threads | |
205 | - set thread_list [get_mi_thread_list "in check_console_thread_commands"] | |
206 | - foreach thread $thread_list { | |
207 | - mi_gdb_test "-interpreter-exec console \"thread $thread\"" \ | |
208 | - "(\\~\".*\"\r\n)*=context-changed,thread=\"$thread\"\r\n\\^done" \ | |
209 | - "-interpreter-exec console \"thread $thread\"" | |
210 | - } | |
211 | -} | |
212 | - | |
213 | 203 | # |
214 | 204 | # Start here |
215 | 205 | # |
@@ -226,8 +216,6 @@ mi_gdb_reinitialize_dir $srcdir/$subdir | ||
226 | 216 | mi_gdb_load $binfile |
227 | 217 | |
228 | 218 | check_mi_thread_command_set |
229 | -check_console_thread_commands | |
230 | -check_for_gdb669_bug | |
231 | 219 | |
232 | 220 | mi_gdb_exit |
233 | 221 |
@@ -46,6 +46,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir | ||
46 | 46 | mi_gdb_reinitialize_dir $srcdir/$subdir |
47 | 47 | mi_gdb_load ${binfile} |
48 | 48 | |
49 | + | |
49 | 50 | proc test_return_simple {} { |
50 | 51 | global mi_gdb_prompt |
51 | 52 | global hex |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 1999, 2000, 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999, 2000 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -62,19 +62,19 @@ proc test_breakpoints_creation_and_listing {} { | ||
62 | 62 | # -break-info |
63 | 63 | |
64 | 64 | mi_gdb_test "200-break-insert main" \ |
65 | - "=breakpoint-create,number=\"1\"\r\n200\\^done" \ | |
65 | + "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"main\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ | |
66 | 66 | "break-insert operation" |
67 | 67 | |
68 | 68 | mi_gdb_test "201-break-insert basics.c:callee2" \ |
69 | - "=breakpoint-create,number=\"2\"\r\n201\\^done" \ | |
69 | + "201\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee2\",file=\".*basics.c\",line=\"22\",times=\"0\"\}" \ | |
70 | 70 | "insert breakpoint at basics.c:callee2" |
71 | 71 | |
72 | 72 | mi_gdb_test "202-break-insert basics.c:15" \ |
73 | - "=breakpoint-create,number=\"3\"\r\n202\\^done" \ | |
73 | + "202\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee3\",file=\".*basics.c\",line=\"15\",times=\"0\"\}" \ | |
74 | 74 | "insert breakpoint at basics.c:15 (callee3)" |
75 | 75 | |
76 | 76 | mi_gdb_test "203-break-insert \"\\\"${srcfile}\\\":6\"" \ |
77 | - "=breakpoint-create,number=\"4\"\r\n203\\^done" \ | |
77 | + "203\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"6\",times=\"0\"\}" \ | |
78 | 78 | "insert breakpoint at \"<fullfilename>\":6 (callee4)" |
79 | 79 | |
80 | 80 | mi_gdb_test "204-break-list" \ |
@@ -82,7 +82,7 @@ proc test_breakpoints_creation_and_listing {} { | ||
82 | 82 | "list of breakpoints" |
83 | 83 | |
84 | 84 | mi_gdb_test "205-break-disable 2 3 4" \ |
85 | - "=breakpoint-modify,number=\"2\"\r\n=breakpoint-modify,number=\"3\"\r\n=breakpoint-modify,number=\"4\"\r\n205\\^done.*" \ | |
85 | + "205\\^done.*" \ | |
86 | 86 | "disabling of breakpoints" |
87 | 87 | |
88 | 88 | mi_gdb_test "206-break-info 2" \ |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 1999, 2000, 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999, 2000 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -46,13 +46,12 @@ mi_gdb_reinitialize_dir $srcdir/$subdir | ||
46 | 46 | mi_gdb_reinitialize_dir $srcdir/$subdir |
47 | 47 | mi_gdb_load ${binfile} |
48 | 48 | |
49 | -set timeout 5 | |
50 | 49 | proc test_running_to_foo {} { |
51 | 50 | global mi_gdb_prompt |
52 | 51 | global hex |
53 | 52 | |
54 | 53 | mi_gdb_test "200-break-insert 10" \ |
55 | - "=breakpoint-create,number=\"1\"\r\n200\\^done" \ | |
54 | + "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*until.c\",line=\"10\",times=\"0\"\}" \ | |
56 | 55 | "break-insert operation" |
57 | 56 | |
58 | 57 | mi_run_cmd |
@@ -69,7 +68,7 @@ proc test_running_to_foo {} { | ||
69 | 68 | } |
70 | 69 | } |
71 | 70 | |
72 | - mi_gdb_test "100-break-delete 1" "=breakpoint-delete,number=\"1\"\r\n100\\^done" "break-delete 1" | |
71 | + mi_gdb_test "100-break-delete 1" "100\\^done" "break-delete 1" | |
73 | 72 | |
74 | 73 | } |
75 | 74 |
@@ -89,7 +88,7 @@ proc test_until {} { | ||
89 | 88 | |
90 | 89 | send_gdb "222-exec-until 15\n" |
91 | 90 | gdb_expect { |
92 | - -re "222\\^running\r\n${mi_gdb_prompt}(=breakpoint-.*\r\n)*222\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"15\"\}\r\n$mi_gdb_prompt$" { | |
91 | + -re "222\\^running\r\n${mi_gdb_prompt}222\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"15\"\}\r\n$mi_gdb_prompt$" { | |
93 | 92 | pass "until line number" |
94 | 93 | } |
95 | 94 | timeout { |
@@ -99,7 +98,7 @@ proc test_until {} { | ||
99 | 98 | |
100 | 99 | send_gdb "333-exec-until until.c:17\n" |
101 | 100 | gdb_expect { |
102 | - -re "333\\^running\r\n${mi_gdb_prompt}(=breakpoint-.*\r\n)*333\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"17\"\}\r\n$mi_gdb_prompt$" { | |
101 | + -re "333\\^running\r\n${mi_gdb_prompt}333\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"foo\",args=\\\[\\\],file=\".*until.c\",line=\"17\"\}\r\n$mi_gdb_prompt$" { | |
103 | 102 | pass "until line number:file" |
104 | 103 | } |
105 | 104 | timeout { |
@@ -111,7 +110,7 @@ proc test_until {} { | ||
111 | 110 | |
112 | 111 | send_gdb "444-exec-until until.c:25\n" |
113 | 112 | gdb_expect { |
114 | - -re "444\\^running\r\n${mi_gdb_prompt}(=breakpoint-.*\r\n)*444\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*until.c\",line=\"24\"\}\r\n$mi_gdb_prompt$" { | |
113 | + -re "444\\^running\r\n${mi_gdb_prompt}444\\*stopped,reason=\"location-reached\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"main\",args=\\\[\\\],file=\".*until.c\",line=\"24\"\}\r\n$mi_gdb_prompt$" { | |
115 | 114 | pass "until after current function" |
116 | 115 | } |
117 | 116 | timeout { |
@@ -385,7 +385,7 @@ mi_gdb_test "-var-assign lsimple.integer 333" \ | ||
385 | 385 | ##### |
386 | 386 | |
387 | 387 | mi_gdb_test "-break-insert subroutine1" \ |
388 | - "=breakpoint-create,number=\"2\"\r\n\\^done" \ | |
388 | + "\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine1\",file=\".*var-cmd.c\",line=\"146\",times=\"0\"\}" \ | |
389 | 389 | "break-insert subroutine1" |
390 | 390 | mi_continue_to "2" "subroutine1" \ |
391 | 391 | "\{name=\"i\",value=\"4321\"\},\{name=\"l\",value=\"$hex\"\}" \ |
@@ -530,7 +530,7 @@ mi_gdb_test "-var-delete l" \ | ||
530 | 530 | # Test whether we can follow the name of a variable through multiple |
531 | 531 | # stack frames. |
532 | 532 | mi_gdb_test "-break-insert do_special_tests" \ |
533 | - "=breakpoint-create,number=\"\[0-9\]+\"\r\n\\^done" \ | |
533 | + {\^done,bkpt=.*} \ | |
534 | 534 | "set breakpoint at do_special_tests" |
535 | 535 | |
536 | 536 | mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests} |
@@ -540,7 +540,7 @@ mi_gdb_test "-var-create selected_a @ a" \ | ||
540 | 540 | "create selected_a" |
541 | 541 | |
542 | 542 | mi_gdb_test "-break-insert incr_a" \ |
543 | - "=breakpoint-create,number=\"\[0-9\]+\"\r\n\\^done" \ | |
543 | + {\^done,bkpt=.*} \ | |
544 | 544 | "set breakpoint at incr_a" |
545 | 545 | |
546 | 546 | mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a} |
@@ -43,7 +43,7 @@ mi_gdb_reinitialize_dir $srcdir/$subdir | ||
43 | 43 | mi_gdb_load ${binfile} |
44 | 44 | |
45 | 45 | mi_gdb_test "200-break-insert 260" \ |
46 | - "=breakpoint-create,number=\"1\"\r\n200\\^done" \ | |
46 | + "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"260\",times=\"0\"\}" \ | |
47 | 47 | "break-insert operation" |
48 | 48 | |
49 | 49 | mi_run_cmd |
@@ -325,12 +325,12 @@ mi_gdb_test "-var-delete weird" \ | ||
325 | 325 | |
326 | 326 | # Stop in "do_special_tests" |
327 | 327 | mi_gdb_test "200-break-insert do_special_tests" \ |
328 | - "=breakpoint-create,number=\"2\"\r\n200\\^done" \ | |
328 | + "200\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_special_tests\",file=\".*var-cmd.c\",line=\"282\",times=\"0\"\}" \ | |
329 | 329 | "break-insert operation" |
330 | 330 | |
331 | 331 | send_gdb "-exec-continue\n" |
332 | 332 | gdb_expect { |
333 | - -re "\\^running\r\n${mi_gdb_prompt}(=breakpoint-.*\r\n)*\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" { | |
333 | + -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"2\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_special_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"282\"\}\r\n$mi_gdb_prompt$" { | |
334 | 334 | pass "continue to do_special_tests" |
335 | 335 | } |
336 | 336 | timeout { |
@@ -584,14 +584,14 @@ gdb_expect { | ||
584 | 584 | } |
585 | 585 | |
586 | 586 | mi_gdb_test "200-break-insert incr_a" \ |
587 | - "=breakpoint-create,number=\"3\"\r\n200\\^done" \ | |
587 | + "200\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"incr_a\",file=\".*var-cmd.c\",line=\"85\",times=\"0\"\}" \ | |
588 | 588 | "break-insert operation" |
589 | 589 | send_gdb "-exec-continue\n" |
590 | 590 | gdb_expect { |
591 | - -re "\\^running\r\n${mi_gdb_prompt}(=breakpoint-.*\r\n)*\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" { | |
591 | + -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" { | |
592 | 592 | pass "continue to incr_a" |
593 | 593 | } |
594 | - -re "\\^running\r\n${mi_gdb_prompt}(=breakpoint-.*\r\n)*\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" { | |
594 | + -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" { | |
595 | 595 | fail "continue to incr_a (compiler debug info incorrect)" |
596 | 596 | } |
597 | 597 | -re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" { |
@@ -58,7 +58,7 @@ proc test_watchpoint_creation_and_listing {} { | ||
58 | 58 | # -break-list |
59 | 59 | |
60 | 60 | mi_gdb_test "111-break-watch C" \ |
61 | - "=breakpoint-create,number=\"2\"\r\n111\\^done" \ | |
61 | + "111\\^done,wpt=\{number=\"2\",exp=\"C\"\}" \ | |
62 | 62 | "break-watch operation" |
63 | 63 | |
64 | 64 | mi_gdb_test "222-break-list" \ |
@@ -79,7 +79,7 @@ proc test_awatch_creation_and_listing {} { | ||
79 | 79 | # -break-list |
80 | 80 | |
81 | 81 | mi_gdb_test "333-break-watch -a A" \ |
82 | - "=breakpoint-create,number=\"1\"\r\n333\\^done" \ | |
82 | + "333\\^done,bkpt=\{number=\"1\",addr=\"$hex\",file=\".*basics.c\",line=\"32\"\}" \ | |
83 | 83 | "break-watch -a operation" |
84 | 84 | |
85 | 85 | mi_gdb_test "444-break-list" \ |
@@ -87,7 +87,7 @@ proc test_awatch_creation_and_listing {} { | ||
87 | 87 | "list of watchpoints awatch" |
88 | 88 | |
89 | 89 | mi_gdb_test "777-break-delete 3" \ |
90 | - "=breakpoint-delete,number=\"3\"\r\n777\\^done" \ | |
90 | + "777\\^done" \ | |
91 | 91 | "delete access watchpoint" |
92 | 92 | } |
93 | 93 |
@@ -103,7 +103,7 @@ proc test_rwatch_creation_and_listing {} { | ||
103 | 103 | # -break-list |
104 | 104 | |
105 | 105 | mi_gdb_test "200-break-watch -r C" \ |
106 | - "=breakpoint-create,number=\"5"\r\n200\\^done" \ | |
106 | + "200\\^done,bkpt=\{number=\"5\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"32\",times=\"0\"\}" \ | |
107 | 107 | "break-insert -r operation" |
108 | 108 | |
109 | 109 | mi_gdb_test "300-break-list" \ |
@@ -111,7 +111,7 @@ proc test_rwatch_creation_and_listing {} { | ||
111 | 111 | "list of breakpoints" |
112 | 112 | |
113 | 113 | mi_gdb_test "177-break-delete 4" \ |
114 | - "=breakpoint-delete,number=\"4\"\r\n177\\^done" \ | |
114 | + "177\\^done" \ | |
115 | 115 | "delete read watchpoint" |
116 | 116 | } |
117 | 117 |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999, 2000 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -53,7 +53,7 @@ proc test_return_simple {} { | ||
53 | 53 | |
54 | 54 | send_gdb "111-exec-return\n" |
55 | 55 | gdb_expect { |
56 | - -re "111\\^done,frame=\{level=\"0 \",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"} | |
56 | + -re "111\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee3\",args=\\\[.*\\\],file=\".*basics.c\",line=\"18\"\}\r\n$mi_gdb_prompt$" {pass "return from callee4 now"} | |
57 | 57 | -re ".*\r\n$mi_gdb_prompt$" { fail "return from callee4 now" } |
58 | 58 | timeout { fail "return from callee4 now (timeout)" |
59 | 59 | } |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999, 2000 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -57,13 +57,13 @@ proc test_stack_frame_listing {} { | ||
57 | 57 | # -stack-list-frames 1 3 |
58 | 58 | |
59 | 59 | mi_gdb_test "231-stack-list-frames" \ |
60 | - "231\\^done,stack=\\\[frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\\\]" \ | |
60 | + "231\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4\",addr=\"$hex\",func=\"main\",.*\}\\\]" \ | |
61 | 61 | "stack frame listing" |
62 | 62 | mi_gdb_test "232-stack-list-frames 1 1" \ |
63 | - "232\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ | |
63 | + "232\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \ | |
64 | 64 | "stack frame listing 1 1" |
65 | 65 | mi_gdb_test "233-stack-list-frames 1 3" \ |
66 | - "233\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \ | |
66 | + "233\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \ | |
67 | 67 | "stack frame listing 1 3" |
68 | 68 | |
69 | 69 | mi_gdb_test "234-stack-list-frames 1" \ |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
1 | +# Copyright 1999, 2000 Free Software Foundation, Inc. | |
2 | 2 | |
3 | 3 | # This program is free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -1,5 +1,5 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
2 | -# | |
1 | +# Copyright (C) 1999, 2000, 2002 Free Software Foundation | |
2 | + | |
3 | 3 | # This Program Is Free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
5 | 5 | # the Free Software Foundation; either version 2 of the License, or |
@@ -42,19 +42,7 @@ mi_delete_breakpoints | ||
42 | 42 | mi_gdb_reinitialize_dir $srcdir/$subdir |
43 | 43 | mi_gdb_load ${binfile} |
44 | 44 | |
45 | -mi_gdb_test "200-break-insert do_children_tests" \ | |
46 | - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_children_tests\",file=\".*var-cmd.c\",line=\"190\",times=\"0\"\}" \ | |
47 | - "break-insert operation" | |
48 | - | |
49 | -mi_run_cmd | |
50 | -# The running part has been checked already by mi_run_cmd | |
51 | -gdb_expect { | |
52 | - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"190\"\}\r\n$mi_gdb_prompt$" { | |
53 | - pass "run to do_children_tests" | |
54 | - } | |
55 | - -re ".*$mi_gdb_prompt$" {fail "run to do_children_tests (2)"} | |
56 | - timeout {fail "run to do_children_tests (timeout 2)"} | |
57 | -} | |
45 | +mi_runto do_children_tests | |
58 | 46 | |
59 | 47 | ##### ##### |
60 | 48 | # # |
@@ -567,16 +555,8 @@ mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr.*int_ptr_ptr | ||
567 | 555 | |
568 | 556 | |
569 | 557 | # Step to "struct_declarations.integer = 123;" |
570 | -send_gdb "-exec-step\n" | |
571 | -gdb_expect { | |
572 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"192\"\}\r\n$mi_gdb_prompt$" { | |
573 | - pass "step at do_children_tests" | |
574 | - } | |
575 | - timeout { | |
576 | - fail "step at do_children_tests (timeout)" | |
577 | - } | |
578 | -} | |
579 | - | |
558 | +set line 192 | |
559 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step to line $line" | |
580 | 560 | |
581 | 561 | # Test: c_variable-4.81 |
582 | 562 | # Desc: create local variable "weird" |
@@ -774,15 +754,8 @@ mi_gdb_test "-var-update *" \ | ||
774 | 754 | "update all vars. None changed" |
775 | 755 | |
776 | 756 | # Step over "struct_declarations.integer = 123;" |
777 | -send_gdb "-exec-step\n" | |
778 | -gdb_expect { | |
779 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"193\"\}\r\n$mi_gdb_prompt$" { | |
780 | - pass "step at do_children_tests" | |
781 | - } | |
782 | - timeout { | |
783 | - fail "step at do_children_tests (timeout)" | |
784 | - } | |
785 | -} | |
757 | +set line 193 | |
758 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
786 | 759 | |
787 | 760 | # Test: c_variable-5.2 |
788 | 761 | # Desc: check that integer changed |
@@ -794,16 +767,8 @@ mi_gdb_test "-var-update *" \ | ||
794 | 767 | # weird->char_ptr = "hello"; |
795 | 768 | # bar = 2121; |
796 | 769 | # foo = &bar; |
797 | - | |
798 | -send_gdb "-exec-step 3\n" | |
799 | -gdb_expect { | |
800 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"196\"\}\r\n$mi_gdb_prompt$" { | |
801 | - pass "step at do_children_tests" | |
802 | - } | |
803 | - timeout { | |
804 | - fail "step at do_children_tests (timeout)" | |
805 | - } | |
806 | -} | |
770 | +set line 196 | |
771 | +mi_execute_to "exec-step 3" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line" | |
807 | 772 | |
808 | 773 | # Test: c_variable-5.3 |
809 | 774 | # Desc: check that char_ptr changed |
@@ -812,15 +777,8 @@ mi_gdb_test "-var-update *" \ | ||
812 | 777 | "update all vars struct_declarations.char_ptr" |
813 | 778 | |
814 | 779 | # Step over "struct_declarations.int_ptr_ptr = &foo;" |
815 | -send_gdb "-exec-step\n" | |
816 | -gdb_expect { | |
817 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"197\"\}\r\n$mi_gdb_prompt$" { | |
818 | - pass "step at do_children_tests" | |
819 | - } | |
820 | - timeout { | |
821 | - fail "step at do_children_tests (timeout)" | |
822 | - } | |
823 | -} | |
780 | +set line 197 | |
781 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
824 | 782 | |
825 | 783 | # Test: c_variable-5.4 |
826 | 784 | # Desc: check that int_ptr_ptr and children changed |
@@ -829,15 +787,8 @@ mi_gdb_test "-var-update *" \ | ||
829 | 787 | "update all vars int_ptr_ptr and children changed" |
830 | 788 | |
831 | 789 | # Step over "weird->long_array[0] = 1234;" |
832 | -send_gdb "-exec-step\n" | |
833 | -gdb_expect { | |
834 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"198\"\}\r\n$mi_gdb_prompt$" { | |
835 | - pass "step at do_children_tests" | |
836 | - } | |
837 | - timeout { | |
838 | - fail "step at do_children_tests (timeout)" | |
839 | - } | |
840 | -} | |
790 | +set line 198 | |
791 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
841 | 792 | |
842 | 793 | # Test: c_variable-5.5 |
843 | 794 | # Desc: check that long_array[0] changed |
@@ -846,15 +797,8 @@ mi_gdb_test "-var-update *" \ | ||
846 | 797 | "update all vars struct_declarations.long_array.0 changed" |
847 | 798 | |
848 | 799 | # Step over "struct_declarations.long_array[1] = 2345;" |
849 | -send_gdb "-exec-step\n" | |
850 | -gdb_expect { | |
851 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"199\"\}\r\n$mi_gdb_prompt$" { | |
852 | - pass "step at do_children_tests" | |
853 | - } | |
854 | - timeout { | |
855 | - fail "step at do_children_tests (timeout)" | |
856 | - } | |
857 | -} | |
800 | +set line 199 | |
801 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
858 | 802 | |
859 | 803 | # Test: c_variable-5.6 |
860 | 804 | # Desc: check that long_array[1] changed |
@@ -863,15 +807,8 @@ mi_gdb_test "-var-update *" \ | ||
863 | 807 | "update all vars struct_declarations.long_array.1 changed" |
864 | 808 | |
865 | 809 | # Step over "weird->long_array[2] = 3456;" |
866 | -send_gdb "-exec-step\n" | |
867 | -gdb_expect { | |
868 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"200\"\}\r\n$mi_gdb_prompt$" { | |
869 | - pass "step at do_children_tests" | |
870 | - } | |
871 | - timeout { | |
872 | - fail "step at do_children_tests (timeout)" | |
873 | - } | |
874 | -} | |
810 | +set line 200 | |
811 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
875 | 812 | |
876 | 813 | # Test: c_variable-5.7 |
877 | 814 | # Desc: check that long_array[2] changed |
@@ -887,15 +824,8 @@ mi_gdb_test "-var-update *" \ | ||
887 | 824 | # struct_declarations.long_array[7] = 8901; |
888 | 825 | # weird->long_array[8] = 9012; |
889 | 826 | # struct_declarations.long_array[9] = 1234; |
890 | -send_gdb "-exec-step 7\n" | |
891 | -gdb_expect { | |
892 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"208\"\}\r\n$mi_gdb_prompt$" { | |
893 | - pass "step at do_children_tests" | |
894 | - } | |
895 | - timeout { | |
896 | - fail "step at do_children_tests (timeout)" | |
897 | - } | |
898 | -} | |
827 | +set line 208 | |
828 | +mi_execute_to "exec-step 7" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line" | |
899 | 829 | |
900 | 830 | # Test: c_variable-5.8 |
901 | 831 | # Desc: check that long_array[3-9] changed |
@@ -905,15 +835,8 @@ mi_gdb_test "-var-update *" \ | ||
905 | 835 | |
906 | 836 | |
907 | 837 | # Step over "weird->func_ptr = nothing;" |
908 | -send_gdb "-exec-step\n" | |
909 | -gdb_expect { | |
910 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"211\"\}\r\n$mi_gdb_prompt$" { | |
911 | - pass "step at do_children_tests" | |
912 | - } | |
913 | - timeout { | |
914 | - fail "step at do_children_tests (timeout)" | |
915 | - } | |
916 | -} | |
838 | +set line 211 | |
839 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
917 | 840 | |
918 | 841 | # Test: c_variable-5.9 |
919 | 842 | # Desc: check that func_ptr changed |
@@ -933,15 +856,8 @@ mi_gdb_test "-var-delete weird->int_ptr_ptr" \ | ||
933 | 856 | # Step over all lines: |
934 | 857 | # ... |
935 | 858 | # psnp = &snp0; |
936 | -send_gdb "-exec-step 43\n" | |
937 | -gdb_expect { | |
938 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"254\"\}\r\n$mi_gdb_prompt$" { | |
939 | - pass "step at do_children_tests" | |
940 | - } | |
941 | - timeout { | |
942 | - fail "step at do_children_tests (timeout)" | |
943 | - } | |
944 | -} | |
859 | +set line 254 | |
860 | +mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} {.*var-cmd.c} $line {} "step $line" | |
945 | 861 | |
946 | 862 | # Test: c_variable-5.10 |
947 | 863 | # Desc: create psnp->char_ptr |
@@ -1211,15 +1127,8 @@ mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \ | ||
1211 | 1127 | "get children of psnp->ptrs.0.next.next.ptrs" |
1212 | 1128 | |
1213 | 1129 | # Step over "snp0.char_ptr = &b3;" |
1214 | -send_gdb "-exec-step\n" | |
1215 | -gdb_expect { | |
1216 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"255\"\}\r\n$mi_gdb_prompt$" { | |
1217 | - pass "step at do_children_tests" | |
1218 | - } | |
1219 | - timeout { | |
1220 | - fail "step at do_children_tests (timeout)" | |
1221 | - } | |
1222 | -} | |
1130 | +set line 255 | |
1131 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
1223 | 1132 | |
1224 | 1133 | # Test: c_variable-5.47 |
1225 | 1134 | # Desc: check that psnp->char_ptr (and [0].char_ptr) changed |
@@ -1228,16 +1137,8 @@ mi_gdb_test "-var-update *" \ | ||
1228 | 1137 | "update all vars psnp->char_ptr (and 0.char_ptr) changed" |
1229 | 1138 | |
1230 | 1139 | # Step over "snp1.char_ptr = &c3;" |
1231 | -send_gdb "-exec-step\n" | |
1232 | -gdb_expect { | |
1233 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"256\"\}\r\n$mi_gdb_prompt$" { | |
1234 | - pass "step at do_children_tests" | |
1235 | - } | |
1236 | - timeout { | |
1237 | - fail "step at do_children_tests (timeout)" | |
1238 | - } | |
1239 | -} | |
1240 | - | |
1140 | +set line 256 | |
1141 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
1241 | 1142 | |
1242 | 1143 | # Test: c_variable-5.48 |
1243 | 1144 | # Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed |
@@ -1247,16 +1148,8 @@ mi_gdb_test "-var-update *" \ | ||
1247 | 1148 | |
1248 | 1149 | |
1249 | 1150 | # Step over "snp2.char_ptr = &a3;" |
1250 | -send_gdb "-exec-step\n" | |
1251 | -gdb_expect { | |
1252 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"257\"\}\r\n$mi_gdb_prompt$" { | |
1253 | - pass "step at do_children_tests" | |
1254 | - } | |
1255 | - timeout { | |
1256 | - fail "step at do_children_tests (timeout)" | |
1257 | - } | |
1258 | -} | |
1259 | - | |
1151 | +set line 257 | |
1152 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
1260 | 1153 | |
1261 | 1154 | # Test: c_variable-5.49 |
1262 | 1155 | # Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed |
@@ -1266,15 +1159,8 @@ mi_gdb_test "-var-update *" \ | ||
1266 | 1159 | |
1267 | 1160 | |
1268 | 1161 | # Step over "snp0.long_ptr = &y3;" |
1269 | -send_gdb "-exec-step\n" | |
1270 | -gdb_expect { | |
1271 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"258\"\}\r\n$mi_gdb_prompt$" { | |
1272 | - pass "step at do_children_tests" | |
1273 | - } | |
1274 | - timeout { | |
1275 | - fail "step at do_children_tests (timeout)" | |
1276 | - } | |
1277 | -} | |
1162 | +set line 258 | |
1163 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
1278 | 1164 | |
1279 | 1165 | # Test: c_variable-5.50 |
1280 | 1166 | # Desc: check that psnp->long_ptr (and [0].long_ptr) changed |
@@ -1284,16 +1170,8 @@ mi_gdb_test "-var-update *" \ | ||
1284 | 1170 | |
1285 | 1171 | |
1286 | 1172 | # Step over "snp1.long_ptr = &x3;" |
1287 | -send_gdb "-exec-step\n" | |
1288 | -gdb_expect { | |
1289 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"259\"\}\r\n$mi_gdb_prompt$" { | |
1290 | - pass "step at do_children_tests" | |
1291 | - } | |
1292 | - timeout { | |
1293 | - fail "step at do_children_tests (timeout)" | |
1294 | - } | |
1295 | -} | |
1296 | - | |
1173 | +set line 259 | |
1174 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
1297 | 1175 | |
1298 | 1176 | # Test: c_variable-5.51 |
1299 | 1177 | # Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed |
@@ -1309,16 +1187,8 @@ clear_xfail *-*-* | ||
1309 | 1187 | # |
1310 | 1188 | |
1311 | 1189 | # Step over "snp2.long_ptr = &z3;" |
1312 | -send_gdb "-exec-step\n" | |
1313 | -gdb_expect { | |
1314 | - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_children_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"260\"\}\r\n$mi_gdb_prompt$" { | |
1315 | - pass "step at do_children_tests" | |
1316 | - } | |
1317 | - timeout { | |
1318 | - fail "step at do_children_tests (timeout)" | |
1319 | - } | |
1320 | -} | |
1321 | - | |
1190 | +set line 260 | |
1191 | +mi_step_to do_children_tests {} {.*var-cmd.c} $line "step $line" | |
1322 | 1192 | |
1323 | 1193 | # Test: c_variable-5.52 |
1324 | 1194 | # Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed |
@@ -276,6 +276,18 @@ mi_gdb_test "-var-assign linteger 3333" \ | ||
276 | 276 | "\\^done,value=\"3333\"" \ |
277 | 277 | "assign to linteger" |
278 | 278 | |
279 | +mi_gdb_test "-var-update *" \ | |
280 | + "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \ | |
281 | + "update all vars: linteger changed after assign" | |
282 | + | |
283 | +mi_gdb_test "-var-assign linteger 3333" \ | |
284 | + "\\^done,value=\"3333\"" \ | |
285 | + "assign to linteger again, same value" | |
286 | + | |
287 | +mi_gdb_test "-var-update *" \ | |
288 | + "\\^done,changelist=\{\}" \ | |
289 | + "update all vars: linteger not changed after same assign" | |
290 | + | |
279 | 291 | mi_gdb_test "-var-evaluate-expression linteger" \ |
280 | 292 | "\\^done,value=\"3333\"" \ |
281 | 293 | "eval linteger" |
@@ -284,6 +296,14 @@ mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \ | ||
284 | 296 | "\\^done,value=\"$hex\"" \ |
285 | 297 | "assign to lpinteger" |
286 | 298 | |
299 | +mi_gdb_test "-var-update *" \ | |
300 | + "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \ | |
301 | + "update all vars: lpinteger changed after assign" | |
302 | + | |
303 | +mi_gdb_test "-var-update *" \ | |
304 | + "\\^done,changelist=\{\}" \ | |
305 | + "update all vars: no changes for second update" | |
306 | + | |
287 | 307 | mi_gdb_test "-var-evaluate-expression lpinteger" \ |
288 | 308 | "\\^done,value=\"$hex\"" \ |
289 | 309 | "eval lpinteger" |
@@ -507,5 +527,34 @@ mi_gdb_test "-var-delete l" \ | ||
507 | 527 | "\\^done,ndeleted=\"1\"" \ |
508 | 528 | "delete var l" |
509 | 529 | |
530 | +# Test whether we can follow the name of a variable through multiple | |
531 | +# stack frames. | |
532 | +mi_gdb_test "-break-insert do_special_tests" \ | |
533 | + {\^done,bkpt=.*} \ | |
534 | + "set breakpoint at do_special_tests" | |
535 | + | |
536 | +mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests} | |
537 | + | |
538 | +mi_gdb_test "-var-create selected_a @ a" \ | |
539 | + {\^done,name="selected_a",numchild="0",type="int"} \ | |
540 | + "create selected_a" | |
541 | + | |
542 | +mi_gdb_test "-break-insert incr_a" \ | |
543 | + {\^done,bkpt=.*} \ | |
544 | + "set breakpoint at incr_a" | |
545 | + | |
546 | +mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a} | |
547 | + | |
548 | +mi_gdb_test "-var-update selected_a" \ | |
549 | + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \ | |
550 | + "update selected_a in incr_a" | |
551 | + | |
552 | +mi_next "step a line in incr_a" | |
553 | +mi_next "return from incr_a to do_special_tests" | |
554 | + | |
555 | +mi_gdb_test "-var-update selected_a" \ | |
556 | + {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \ | |
557 | + "update selected_a in do_special_tests" | |
558 | + | |
510 | 559 | mi_gdb_exit |
511 | 560 | return 0 |
@@ -1,4 +1,4 @@ | ||
1 | -# Copyright 2002 Free Software Foundation, Inc. | |
1 | +# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. | |
2 | 2 | # |
3 | 3 | # This Program Is Free software; you can redistribute it and/or modify |
4 | 4 | # it under the terms of the GNU General Public License as published by |
@@ -209,7 +209,7 @@ proc mi_delete_breakpoints {} { | ||
209 | 209 | send_gdb "y\n"; |
210 | 210 | exp_continue |
211 | 211 | } |
212 | - -re ".*102-break-delete\r\n(=.*)*102\\\^done\r\n$mi_gdb_prompt$" { | |
212 | + -re ".*102-break-delete\r\n102\\\^done\r\n$mi_gdb_prompt$" { | |
213 | 213 | # This happens if there were no breakpoints |
214 | 214 | } |
215 | 215 | timeout { perror "Delete all breakpoints in mi_delete_breakpoints (timeout)" ; return } |
@@ -711,7 +711,7 @@ proc mi_runto {func} { | ||
711 | 711 | |
712 | 712 | set test "mi runto $func" |
713 | 713 | mi_gdb_test "200-break-insert $func" \ |
714 | - "\(=breakpoint-create,number=\"\[0-9\]+\")\r\n200\\^done" \ | |
714 | + "200\\^done,bkpt=\{number=\"\[0-9\]+\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"$func\",file=\".*\",line=\"\[0-9\]*\",times=\"0\"\}" \ | |
715 | 715 | "breakpoint at $func" |
716 | 716 | |
717 | 717 | if {![regexp {number="[0-9]+"} $expect_out(buffer) str] |
@@ -694,12 +694,10 @@ do_captured_thread_select (struct ui_out *uiout, | ||
694 | 694 | void *tidstr) |
695 | 695 | { |
696 | 696 | int num; |
697 | - ptid_t old_ptid; | |
698 | 697 | struct thread_info *tp; |
699 | 698 | |
700 | 699 | num = value_as_long (parse_and_eval (tidstr)); |
701 | 700 | |
702 | - old_ptid = inferior_ptid; | |
703 | 701 | tp = find_thread_id (num); |
704 | 702 | |
705 | 703 | if (!tp) |
@@ -722,10 +720,6 @@ do_captured_thread_select (struct ui_out *uiout, | ||
722 | 720 | |
723 | 721 | print_stack_frame (deprecated_selected_frame, |
724 | 722 | frame_relative_level (deprecated_selected_frame), 1); |
725 | - | |
726 | - if (!ptid_equal (old_ptid, inferior_ptid)) | |
727 | - selected_thread_changed_event (pid_to_thread_id (inferior_ptid)); | |
728 | - | |
729 | 723 | return GDB_RC_OK; |
730 | 724 | } |
731 | 725 |
@@ -727,8 +727,6 @@ value_assign (struct value *toval, struct value *fromval) | ||
727 | 727 | error ("Attempt to assign to an unmodifiable value."); |
728 | 728 | } |
729 | 729 | |
730 | - if (regno > VALUE_FRAME_REGNUM (toval) + reg_offset) | |
731 | - regno = -1; | |
732 | 730 | if (register_changed_hook) |
733 | 731 | register_changed_hook (-1); |
734 | 732 | target_changed_event (); |
@@ -1 +1 @@ | ||
1 | -2003-02-03-cvs | |
1 | +2003-02-04-cvs |
@@ -20,7 +20,7 @@ | ||
20 | 20 | #include "value.h" |
21 | 21 | #include "wrapper.h" |
22 | 22 | |
23 | -/* use this struct to pass arguments to wrapper routines. We assume | |
23 | +/* Use this struct to pass arguments to wrapper routines. We assume | |
24 | 24 | (arbitrarily) that no gdb function takes more than ten arguments. */ |
25 | 25 | struct gdb_wrapper_arguments |
26 | 26 | { |
@@ -330,3 +330,4 @@ do_captured_value_struct_elt (struct ui_out *uiout, void *data) | ||
330 | 330 | cargs->static_memfuncp, cargs->err); |
331 | 331 | return GDB_RC_OK; |
332 | 332 | } |
333 | + |
@@ -21,10 +21,8 @@ | ||
21 | 21 | #include "gdb.h" |
22 | 22 | |
23 | 23 | struct value; |
24 | -struct block; | |
25 | 24 | struct expression; |
26 | -struct ui_out; | |
27 | -struct type; | |
25 | +struct block; | |
28 | 26 | |
29 | 27 | /* Use this struct to pass arguments to wrapper routines. */ |
30 | 28 | struct gdb_wrapper_arguments; |
@@ -49,4 +47,5 @@ extern enum gdb_rc gdb_value_struct_elt (struct ui_out *uiout, struct value **re | ||
49 | 47 | extern int gdb_value_ind (struct value *val, struct value ** rval); |
50 | 48 | |
51 | 49 | extern int gdb_parse_and_eval_type (char *, int, struct type **); |
50 | + | |
52 | 51 | #endif /* WRAPPER_H */ |