aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2016-12-22infrun.c (set_step_over_info): Add comment.Doug Evans2-1/+7
gdb/ChangeLog: * infrun.c (set_step_over_info): Add comment.
2016-12-22New syntax for mt print symbols,msymbols,psymbols.Doug Evans8-195/+422
gdb/ChangeLog: * NEWS: Document new syntax for "mt print symbols", "mt print psymbols" and "mt print msymbols" commands. * psymtab.c (DEV_TTY): Delete. (dump_psymtab_addrmap): Don't dump if psymtabs_addrmap is NULL. (maintenance_print_psymbols): Rewrite for new syntax: mt print psymbols [-objfile objfile] [-pc address] [outfile] mt print psymbols [-objfile objfile] [-source source] [outfile] (_initialize_psymtab): Update help text. * symmisc.c (maintenance_print_symbols): Rewrite for new syntax: mt print symbols [-pc address] [outfile] mt print symbols [-objfile objfile] [-source source] [outfile] (maintenance_print_msymbols): Rewrite for new syntax: mt print msymbols [-objfile objfile] [outfile] Only print symbols for the current progspace. (_initialize_symmisc): Update help text. gdb/doc/ChangeLog: * gdb.texinfo (Symbols): Update docs for symbol printing maintenance commands. gdb/testsuite/ChangeLog: * gdb.base/maint.exp: Update tests for maint print symbols, psymbols and msymbols.
2016-12-22Class-ify ui_outSimon Marchi64-2377/+2341
This patch finalizes the C++ conversion of the ui-out subsystem, by turning the ui_out and ui_out_impl structures into a single class hierarchy. ui_out functions are turned into virtual methods of that new class, so as a result there are a lot of call sites to update. In the previous version of the patchset, there were separate ui_out and ui_out_impl classes, but it wasn't really useful and added boilerplate. In this version there is simply an ui_out base class that is extended for CLI, TUI and MI. It's a bit hard to maintain a ChangeLog for such a big patch, I did my best but I'm sure there are some missing or outdated info in there... gdb/ChangeLog: * ui-out.h (ui_out_begin, ui_out_end, ui_out_table_header, ui_out_table_body, ui_out_field_int, ui_out_field_fmt_int, ui_out_field_core_addr, ui_out_field_string, ui_out_field_stream, ui_out_field_fmt, ui_out_field_skip, ui_out_spaces, ui_out_text, ui_out_message, ui_out_wrap_hint, ui_out_flush, ui_out_test_flags, ui_out_query_field, ui_out_is_mi_like_p, ui_out_redirect): Remove, replace with a method in class ui_out. (table_begin_ftype): Remove, replace with pure virtual method in class ui_out. (table_body_ftype): Likewise. (table_end_ftype): Likewise. (table_header_ftype): Likewise. (ui_out_begin_ftype): Likewise. (ui_out_end_ftype): Likewise. (field_int_ftype): Likewise. (field_skip_ftype): Likewise. (field_string_ftype): Likewise. (field_fmt_ftype): Likewise. (spaces_ftype): Likewise. (text_ftype): Likewise. (message_ftype): Likewise. (wrap_hint_ftype): Likewise. (flush_ftype): Likewise. (redirect_ftype): Likewise. (data_destroy_ftype): Likewise. (struct ui_out_impl): Remove, replace with class ui_out. (ui_out_new): Remove. (class ui_out): New class. * ui-out.c (struct ui_out): Remove, replaced with class ui_out. (current_level): Remove, replace with ui_out method. (push_level): Likewise. (pop_level): Likewise. (uo_table_begin, uo_table_body, uo_table_end, uo_table_header, uo_begin, uo_end, uo_field_int, uo_field_skip, uo_field_fmt, uo_spaces, uo_text, uo_message, uo_wrap_hint, uo_flush, uo_redirect, uo_field_string): Remove. (ui_out_table_begin): Replace with ... (ui_out::table_begin): ... this. (ui_out_table_body): Replace with ... (ui_out::table_body): ... this. (ui_out_table_end): Replace with ... (ui_out::table_end): ... this. (ui_out_table_header): Replace with ... (ui_out::table_header): ... this. (ui_out_begin): Replace with ... (ui_out::begin): ... this. (ui_out_end): Replace with ... (ui_out::end): ... this. (ui_out_field_int): Replace with ... (ui_out::field_int): ... this. (ui_out_field_fmt_int): Replace with ... (ui_out::field_fmt_int): ... this. (ui_out_field_core_addr): Replace with ... (ui_out::field_core_addr): ... this. (ui_out_field_stream): Replace with ... (ui_out::field_stream): ... this. (ui_out_field_skip): Replace with ... (ui_out::field_skip): ... this. (ui_out_field_string): Replace with ... (ui_out::field_string): ... this. (ui_out_field_fmt): Replace with ... (ui_out::field_fmt): ... this. (ui_out_spaces): Replace with ... (ui_out::spaces): ... this. (ui_out_text): Replace with ... (ui_out::text): ... this. (ui_out_message): Replace with ... (ui_out::message): ... this. (ui_out_wrap_hint): Replace with ... (ui_out::wrap_hint): ... this. (ui_out_flush): Replace with ... (ui_out::flush): ... this. (ui_out_redirect): Replace with ... (ui_out::redirect): ... this. (ui_out_test_flags): Replace with ... (ui_out::test_flags): ... this. (ui_out_is_mi_like_p): Replace with ... (ui_out::is_mi_like_p): ... this. (verify_field): Replace with ... (ui_out::verify_field): ... this. (ui_out_query_field): Replace with ... (ui_out::query_table_field): ... this. (ui_out_data): Remove. (ui_out_new): Remove, replace with ... (ui_out::ui_out): ... this constructor. (do_cleanup_table_end, make_cleanup_ui_out_tuple_begin_end, do_cleanup_end, make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end): Update fallouts of struct ui_out -> class ui_out change. * cli-out.c (cli_out_data): Remove. (cli_uiout_dtor): Remove. (cli_table_begin): Replace with ... (cli_ui_out::do_table_begin): ... this new method. (cli_table_body): Replace with ... (cli_ui_out::do_table_body): ... this new method. (cli_table_end): Replace with ... (cli_ui_out::do_table_end): ... this new method. (cli_table_header): Replace with ... (cli_ui_out::do_table_header): ... this new method. (cli_begin): Replace with ... (cli_ui_out::do_begin): ... this new method. (cli_end): Replace with ... (cli_ui_out::do_end): ... this new method. (cli_field_int): Replace with ... (cli_ui_out::do_field_int): ... this new method. (cli_field_skip): Replace with ... (cli_ui_out::do_field_skip): ... this new method. (cli_field_string): Replace with ... (cli_ui_out::do_field_string): ... this new method. (cli_field_fmt): Replace with ... (cli_ui_out::do_field_fmt): ... this new method. (cli_spaces): Replace with ... (cli_ui_out::do_spaces): ... this new method. (cli_text): Replace with ... (cli_ui_out::do_text): ... this new method. (cli_message): Replace with ... (cli_ui_out::do_message): ... this new method. (cli_wrap_hint): Replace with ... (cli_ui_out::do_wrap_hint): ... this new method. (cli_flush): Replace with ... (cli_ui_out::do_flush): ... this new method. (cli_redirect): Replace with ... (cli_ui_out::do_redirect): ... this new method. (out_field_fmt): Replace with ... (cli_ui_out::out_field_fmt): ... this new method. (field_separator): Replace with ... (cli_ui_out::field_separator): ... this new method. (cli_out_set_stream): Replace with ... (cli_ui_out::set_stream): ... this new method. (cli_ui_out_impl): Remove. (cli_out_data_ctor): Remove. (cli_ui_out_impl::cli_ui_out_impl): New constructor. (cli_ui_out_impl::~cli_ui_out_impl): New destructor. (cli_out_new): Change return type to cli_ui_out *, instantiate a cli_ui_out. * cli-out.h (cli_ui_out_data): Remove, replace with class cli_ui_out. (class cli_ui_out): New class. (cli_ui_out_impl): Remove. (cli_out_data_ctor): Remove. (cli_out_new): Change return type to cli_ui_out*. (cli_out_set_stream): Remove. * cli/cli-interp.c (struct cli_interp) <cli_uiout>: Change type to cli_ui_out*. (cli_interpreter_resume): Adapt. (cli_interpreter_exec): Adapt. * mi/mi-out.c (mi_ui_out_data, mi_out_data): Remove. (mi_ui_out_impl): Remove. (mi_table_begin): Replace with ... (mi_ui_out::do_table_begin): ... this. (mi_table_body): Replace with ... (mi_ui_out::do_table_body): ... this. (mi_table_end): Replace with ... (mi_ui_out::do_table_end): ... this. (mi_table_header): Replace with ... (mi_ui_out::do_table_header): ... this. (mi_begin): Replace with ... (mi_ui_out::do_begin): ... this. (mi_end): Replace with ... (mi_ui_out::do_end): ... this. (mi_field_int): Replace with ... (mi_ui_out::do_field_int): ... this. (mi_field_skip): Replace with ... (mi_ui_out::do_field_skip): ... this. (mi_field_string): Replace with ... (mi_ui_out::do_field_string): ... this. (mi_field_fmt): Replace with ... (mi_ui_out::do_field_fmt): ... this. (mi_spaces): Replace with ... (mi_ui_out::do_spaces): ... this. (mi_text): Replace with ... (mi_ui_out::do_text): ... this. (mi_message): Replace with ... (mi_ui_out::do_message): ... this. (mi_wrap_hint): Replace with ... (mi_ui_out::do_wrap_hint): ... this. (mi_flush): Replace with ... (mi_ui_out::do_flush): ... this. (mi_redirect): Replace with ... (mi_ui_out::do_redirect): (field_separator): Replace with ... (mi_ui_out::field_separator): (mi_open): Replace with ... (mi_ui_out::open): ... this. (mi_close): Replace with ... (mi_ui_out::close): ... this. (mi_out_rewind): Replace with ... (mi_ui_out::rewind): ... this. (mi_out_put): Replace with ... (mi_ui_out::put): ... this. (mi_version): Replace with ... (mi_ui_out::version): ... this. (mi_out_data_ctor): Replace with ... (mi_ui_out::mi_ui_out): ... this. (mi_out_data_dtor): Replace with ... (mi_ui_out::~mi_ui_out): ... this. (mi_out_new): Change return type to mi_ui_out*, instantiate an mi_ui_out object. (as_mi_ui_out): New function. (mi_version): Update fallouts of struct ui_out to class ui_out transition. (mi_out_put): Likewise. (mi_out_rewind): Likewise. * mi/mi-out.h (mi_out_new): Change return type to mi_ui_out*. * tui/tui-out.c (tui_ui_out_data, tui_out_data, tui_ui_out_impl): Remove. (tui_field_int): Replace with ... (tui_ui_out::do_field_int): ... this. (tui_field_string): Replace with ... (tui_ui_out::do_field_string): ... this. (tui_field_fmt): Replace with ... (tui_ui_out::do_field_fmt): ... this. (tui_text): Replace with ... (tui_ui_out::do_text): ... this. (tui_out_new): Change return type to tui_ui_out*, instantiate tui_ui_out object. (tui_ui_out::tui_ui_out): New. * tui/tui-out.h: New file. * tui/tui.h (tui_out_new): Move declaration to tui/tui-out.h. * tui/tui-io.c: Include tui/tui-out.h. (tui_old_uiout): Change type to cli_ui_out*. (tui_setup_io): Use dynamic_cast. * tui/tui-io.h (tui_old_uiout): Change type to cli_ui_out*. * tui/tui-interp.c (tui_resume): Adapt. * ada-lang.c (print_it_exception): Update fallouts of struct ui_out to class ui_out transition. (print_one_exception): Likewise. (print_mention_exception): Likewise. * ada-tasks.c (print_ada_task_info): Likewise. (info_task): Likewise. (task_command): Likewise. * auto-load.c (print_script): Likewise. (auto_load_info_scripts): Likewise. (info_auto_load_cmd): Likewise. * break-catch-sig.c (signal_catchpoint_print_one): Likewise. * break-catch-syscall.c (print_it_catch_syscall): Likewise. (print_one_catch_syscall): Likewise. * break-catch-throw.c (print_it_exception_catchpoint): Likewise. (print_one_exception_catchpoint): Likewise. (print_one_detail_exception_catchpoint): Likewise. (print_mention_exception_catchpoint): Likewise. * breakpoint.c (maybe_print_thread_hit_breakpoint): Likewise. (print_solib_event): Likewise. (watchpoint_check): Likewise. (wrap_indent_at_field): Likewise. (print_breakpoint_location): Likewise. (output_thread_groups): Likewise. (print_one_breakpoint_location): Likewise. (breakpoint_1): Likewise. (default_collect_info): Likewise. (watchpoints_info): Likewise. (print_it_catch_fork): Likewise. (print_one_catch_fork): Likewise. (print_it_catch_vfork): Likewise. (print_one_catch_vfork): Likewise. (print_it_catch_solib): Likewise. (print_one_catch_solib): Likewise. (print_it_catch_exec): Likewise. (print_one_catch_exec): Likewise. (mention): Likewise. (print_it_ranged_breakpoint): Likewise. (print_one_ranged_breakpoint): Likewise. (print_one_detail_ranged_breakpoint): Likewise. (print_mention_ranged_breakpoint): Likewise. (print_it_watchpoint): Likewise. (print_mention_watchpoint): Likewise. (print_it_masked_watchpoint): Likewise. (print_one_detail_masked_watchpoint): Likewise. (print_mention_masked_watchpoint): Likewise. (bkpt_print_it): Likewise. (tracepoint_print_one_detail): Likewise. (tracepoint_print_mention): Likewise. (update_static_tracepoint): Likewise. (tracepoints_info): Likewise. (save_breakpoints): Likewise. * cli/cli-cmds.c (complete_command): Likewise. * cli/cli-logging.c (set_logging_redirect): Likewise. (pop_output_files): Likewise. (handle_redirections): Likewise. * cli/cli-script.c (print_command_lines): Likewise. * cli/cli-setshow.c (do_show_command): Likewise. (cmd_show_list): Likewise. * cp-abi.c (list_cp_abis): Likewise. (show_cp_abi_cmd): Likewise. * darwin-nat-info.c (darwin_debug_regions_recurse): Likewise. * disasm.c (gdb_pretty_print_insn): Likewise. (do_mixed_source_and_assembly_deprecated): Likewise. (do_mixed_source_and_assembly): Likewise. * gdb_bfd.c (print_one_bfd): Likewise. (maintenance_info_bfds): Likewise. * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise. * guile/scm-ports.c (ioscm_with_output_to_port_worker): Likewise. * i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Likewise. * i386-tdep.c (i386_mpx_print_bounds): Likewise. * infcmd.c (run_command_1): Likewise. (print_return_value_1): Likewise. * inferior.c (print_selected_inferior): Likewise. (print_inferior): Likewise. * infrun.c (print_end_stepping_range_reason): Likewise. (print_signal_exited_reason): Likewise. (print_exited_reason): Likewise. (print_signal_received_reason): Likewise. (print_no_history_reason): Likewise. * interps.c (interp_set): Likewise. * linespec.c (decode_line_full): Likewise. * linux-thread-db.c (info_auto_load_libthread_db): Likewise. * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise. (mi_cmd_env_path): Likewise. (mi_cmd_env_dir): Likewise. (mi_cmd_inferior_tty_show): Likewise. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file): Likewise. (print_partial_file_name): Likewise. (mi_cmd_file_list_exec_source_files): Likewise. * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Likewise. (mi_cmd_info_gdb_mi_command): Likewise. * mi/mi-cmd-stack.c (mi_cmd_stack_info_depth): Likewise. (mi_cmd_stack_list_args): Likewise. (list_arg_or_local): Likewise. * mi/mi-cmd-var.c (print_varobj): Likewise. (mi_cmd_var_create): Likewise. (mi_cmd_var_delete): Likewise. (mi_cmd_var_set_format): Likewise. (mi_cmd_var_show_format): Likewise. (mi_cmd_var_info_num_children): Likewise. (mi_cmd_var_list_children): Likewise. (mi_cmd_var_info_type): Likewise. (mi_cmd_var_info_path_expression): Likewise. (mi_cmd_var_info_expression): Likewise. (mi_cmd_var_show_attributes): Likewise. (mi_cmd_var_evaluate_expression): Likewise. (mi_cmd_var_assign): Likewise. (varobj_update_one): Likewise. * mi/mi-interp.c (as_mi_interp): Likewise. (mi_on_normal_stop_1): Likewise. (mi_tsv_modified): Likewise. (mi_breakpoint_created): Likewise. (mi_breakpoint_modified): Likewise. (mi_solib_loaded): Likewise. (mi_solib_unloaded): Likewise. (mi_command_param_changed): Likewise. (mi_memory_changed): Likewise. (mi_user_selected_context_changed): Likewise. * mi/mi-main.c (print_one_inferior): Likewise. (output_cores): Likewise. (list_available_thread_groups): Likewise. (mi_cmd_data_list_register_names): Likewise. (mi_cmd_data_list_changed_registers): Likewise. (output_register): Likewise. (mi_cmd_data_evaluate_expression): Likewise. (mi_cmd_data_read_memory): Likewise. (mi_cmd_data_read_memory_bytes): Likewise. (mi_cmd_list_features): Likewise. (mi_cmd_list_target_features): Likewise. (mi_cmd_add_inferior): Likewise. (mi_execute_command): Likewise. (mi_load_progress): Likewise. (print_variable_or_computed): Likewise. (mi_cmd_trace_frame_collected): Likewise. * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Likewise. * osdata.c (info_osdata_command): Likewise. * probe.c (gen_ui_out_table_header_info): Likewise. (print_ui_out_not_applicables): Likewise. (print_ui_out_info): Likewise. (info_probes_for_ops): Likewise. (enable_probes_command): Likewise. (disable_probes_command): Likewise. * progspace.c (print_program_space): Likewise. * python/py-breakpoint.c (bppy_get_commands): Likewise. * python/py-framefilter.c (py_print_type): Likewise. (py_print_value): Likewise. (py_print_single_arg): Likewise. (enumerate_args): Likewise. (enumerate_locals): Likewise. (py_print_args): Likewise. (py_print_frame): Likewise. * record-btrace.c (btrace_ui_out_decode_error): Likewise. (btrace_call_history_insn_range): Likewise. (btrace_call_history_src_line): Likewise. (btrace_call_history): Likewise. * remote.c (show_remote_cmd): Likewise. * skip.c (skip_info): Likewise. * solib.c (info_sharedlibrary_command): Likewise. * source.c (print_source_lines_base): Likewise. * spu-tdep.c (info_spu_event_command): Likewise. (info_spu_signal_command): Likewise. (info_spu_mailbox_list): Likewise. (info_spu_dma_cmdlist): Likewise. (info_spu_dma_command): Likewise. (info_spu_proxydma_command): Likewise. * stack.c (print_stack_frame): Likewise. (print_frame_arg): Likewise. (read_frame_arg): Likewise. (print_frame_args): Likewise. (print_frame_info): Likewise. (print_frame): Likewise. * symfile.c (load_progress): Likewise. (generic_load): Likewise. (print_transfer_performance): Likewise. * thread.c (do_captured_list_thread_ids): Likewise. (print_thread_info_1): Likewise. (restore_selected_frame): Likewise. (do_captured_thread_select): Likewise. (print_selected_thread_frame): Likewise. * top.c (execute_command_to_string): Likewise. * tracepoint.c (tvariables_info_1): Likewise. (trace_status_mi): Likewise. (tfind_1): Likewise. (print_one_static_tracepoint_marker): Likewise. (info_static_tracepoint_markers_command): Likewise. * utils.c (do_ui_out_redirect_pop): Likewise. (fputs_maybe_filtered): Likewise.
2016-12-20gdb: Constify solib_findPedro Alves5-9/+22
gdb/ChangeLog: 2016-12-20 Pedro Alves <palves@redhat.com> * nto-tdep.c (nto_find_and_open_solib): Constify 'solib' parameter. * nto-tdep.h (nto_find_and_open_solib): Constify 'solib' parameter. * solib.c (solib_find_1, exec_file_find, solib_find): Constify in_pathname' parameter. * solist.h (struct target_so_ops) <find_and_open_solib>: Constify 'soname' parameter. (exec_file_find, solib_find): Constify 'in_pathname' parameter.
2016-12-20Fix longjmp across readline w/ --enable-sjlj-exceptions toolchainsPedro Alves2-5/+27
Nowadays, GDB propagates C++ exceptions across readline using setjmp/longjmp 89525768cd08 ("Propagate GDB/C++ exceptions across readline using sj/lj-based TRY/CATCH") because DWARF-based unwinding can't cross C functions compiled without -fexceptions (see details from the commit above). Unfortunately, toolchains that use SjLj-based C++ exceptions got broken with that fix, because _Unwind_SjLj_Unregister, which is put at the exit of a function, is not executed due to the longjmp added by that commit. (gdb) [New Thread 2936.0xb80] kill Thread 1 received signal SIGSEGV, Segmentation fault. 0x03ff662b in ?? () top?bt 15 #0 0x03ff662b in ?? () #1 0x00526b92 in stdin_event_handler (error=0, client_data=0x172ed8) at ../../binutils-gdb/gdb/event-top.c:555 #2 0x00525a94 in handle_file_event (ready_mask=<optimized out>, file_ptr=0x3ff5cb8) at ../../binutils-gdb/gdb/event-loop.c:733 #3 gdb_wait_for_event (block=block@entry=1) at ../../binutils-gdb/gdb/event-loop.c:884 #4 0x00525bfb in gdb_do_one_event () at ../../binutils-gdb/gdb/event-loop.c:347 #5 0x00525ce5 in start_event_loop () at ../../binutils-gdb/gdb/event-loop.c:371 #6 0x0051fada in captured_command_loop (data=0x0) at ../../binutils-gdb/gdb/main.c:324 #7 0x0051cf5d in catch_errors ( func=func@entry=0x51fab0 <captured_command_loop(void*)>, func_args=func_args@entry=0x0, errstring=errstring@entry=0x7922bf <VEC_interp_factory_p_quick_push(VEC_inte rp_factory_p*, interp_factory*, char const*, unsigned int)::__PRETTY_FUNCTION__+351> "", mask=mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:236 #8 0x00520f0c in captured_main (data=0x328feb4) at ../../binutils-gdb/gdb/main.c:1149 #9 gdb_main (args=args@entry=0x328feb4) at ../../binutils-gdb/gdb/main.c:1159 #10 0x0071e400 in main (argc=1, argv=0x171220) at ../../binutils-gdb/gdb/gdb.c:32 Fix this by making the functions involved in setjmp/longjmp as noexcept, so that the compiler knows it doesn't need to emit the _Unwind_SjLj_Register / _Unwind_SjLj_Unregister calls for C++ exceptions. Tested on x86_64 Fedora 23 with: - GCC 5.3.1 w/ DWARF-based exceptions. - GCC 7 built with --enable-sjlj-exceptions. gdb/ChangeLog: 2016-12-20 Pedro Alves <palves@redhat.com> Yao Qi <yao.qi@linaro.org> PR gdb/20977 * event-top.c (gdb_rl_callback_read_char_wrapper_noexcept): New noexcept function, factored out from ... (gdb_rl_callback_read_char_wrapper): ... this. (gdb_rl_callback_handler): Mark noexcept.
2016-12-20Set emacs default mode for the GDB directory to C++Antoine Tremblay3-1/+18
Since GDB has switched to C++ but the file names are still .c emacs does not load the proper mode when opening files in the gdb directory. This patch fixes that by enabling c++ mode. This patch also fixes indentation tweaks as discussed in this thread: https://sourceware.org/ml/gdb-patches/2016-12/msg00074.html Indent with gdb-code-style.el included and the .dir-locals.el is as such: namespace TestNameSpace { class test { public: test test() {} int m_a; }; struct teststruct { int a; } } gdb/ChangeLog: * .dir-locals.el: Set c++ mode for the directory and set indent properly. * gdb-code-style.el: Set c-set-offset 'innamespace as a safe value to be used in .dir-locals.el.
2016-12-19Clean up gdb.gdb/selftest.expYao Qi2-293/+6
I recently see the test fails like this, (gdb) PASS: gdb.gdb/selftest.exp: step over argv initialization list^M 487 std::vector<struct cmdarg> cmdarg_vec;^M (gdb) FAIL: gdb.gdb/selftest.exp: unknown source line (after step over argv initialization) step^M std::vector<cmdarg, std::allocator<cmdarg> >::vector (this=0x7fffffffdc10) at ../../binutils-gdb/gdb/main.c:487^M 487 std::vector<struct cmdarg> cmdarg_vec;^M (gdb) FAIL: gdb.gdb/selftest.exp: step into xmalloc call These fails are caused by using std::vector in commit f60ee22ea1d62f7004511ec65a3ad76890032d88. selttest.exp should match the source code of GDB. It is a maintenance pain, so this patch removes do_steps_and_nexts. gdb/testsuite: 2016-12-19 Yao Qi <yao.qi@linaro.org> * gdb.gdb/selftest.exp (do_steps_and_nexts): Remove. (test_with_self): Don't call do_steps_and_nexts, and remove code about stepping into xmalloc.
2016-12-16Darwin: Fix gdb compilation.Bernhard Heckel2-3/+6
Due to changes introduced by commit 4d01a485d29732b19743e8b138897f3509e071b0 ('struct expression *' -> gdb::unique_xmalloc_ptr<expression>) compilation is broken on Darwin. ../gdb/darwin-nat-info.c:733:8: error: assigning to 'struct expression *' from incompatible type 'expression_up' (aka 'std::__1::unique_ptr<expression, gdb::xfree_deleter<expression> >') expr = parse_expression (exp); Beside compilation, memory leak was solved as 'make_clean_up' was not called in previous version. 2016-12-16 Bernhard Heckel <bernhard.heckel@intel.com> gdb/Changelog: * darwin-nat-info.c (info_mach_region_command): Use expression_up.
2016-12-12Remove assert on exec_bfd in cris_delayed_get_disassemblerYao Qi2-4/+7
cris_delayed_get_disassembler has an assert that exec_bfd can't be NULL, but this assert can be triggered like this, (gdb) set architecture cris The target architecture is assumed to be cris (gdb) disassemble 0x0,+4 Dump of assembler code from 0x0 to 0x4: 0x00000000: ../../binutils-gdb/gdb/cris-tdep.c:3798: internal-error: int cris_delayed_get_disassembler(bfd_vma, disassemble_info*): Assertion `exec_bfd != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. however, cris_get_disassembler does have code to handle the case that bfd is NULL, /* If there's no bfd in sight, we return what is valid as input in all contexts if fed back to the assembler: disassembly *with* register prefix. Unfortunately this will be totally wrong for v32. */ if (abfd == NULL) return print_insn_cris_with_register_prefix; This patch is to remove this assert. gdb: 2016-12-12 Yao Qi <yao.qi@linaro.org> PR tdep/20955 * cris-tdep.c (cris_delayed_get_disassembler): Remove the assert.
2016-12-09gdb: Remove support for obsolete OSABIs and a.outPedro Alves44-979/+193
gdb/ChangeLog: 2016-12-09 Pedro Alves <palves@redhat.com> * Makefile.in (ALL_TARGET_OBS): Remove vax-obsd-tdep.o. * alpha-fbsd-tdep.c (_initialize_alphafbsd_tdep): Adjust. * alpha-nbsd-tdep.c: Move comment to _initialize_alphanbsd_tdep. (alphanbsd_core_osabi_sniffer): Delete. (_initialize_alphanbsd_tdep): No longer handle a.out. * alpha-obsd-tdep.c (_initialize_alphaobsd_tdep): Adjust. * amd64-fbsd-tdep.c (_initialize_amd64fbsd_tdep): Adjust. * amd64-nbsd-tdep.c (_initialize_amd64nbsd_tdep): Adjust. * amd64-obsd-tdep.c (amd64obsd_supply_regset) (amd64obsd_combined_regset) (amd64obsd_iterate_over_regset_sections, amd64obsd_core_init_abi): Delete. (_initialize_amd64obsd_tdep): Don't handle a.out. * arm-nbsd-nat.c (struct md_core, fetch_core_registers) (arm_netbsd_core_fns): Delete. (_initialize_arm_netbsd_nat): Don't register arm_netbsd_core_fns. * arm-nbsd-tdep.c (arm_netbsd_aout_init_abi) (arm_netbsd_aout_osabi_sniffer): Delete. (_initialize_arm_netbsd_tdep): Don't handle a.out. * arm-obsd-tdep.c (armobsd_core_osabi_sniffer): Delete. (_initialize_armobsd_tdep): Don't handle a.out. * arm-tdep.c (arm_gdbarch_init): Remove bfd_target_aout_flavour case. * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Remove SunOS a.out handling. * configure.tgt (vax-*-netbsd* | vax-*-knetbsd*-gnu): Remove vax-obsd-tdep.o from gdb_target_objs. (vax-*-openbsd*): Likewise. (*-*-freebsd*): Adjust default gdb_osabi. (*-*-openbsd*): Likewise. * dbxread.c (block_address_function_relative): Delete. (dbx_symfile_read): Remove reference to block_address_function_relative. (dbx_symfile_read): Don't call read_dbx_dynamic_symtab. (read_dbx_dynamic_symtab): Delete. (process_one_symbol): Remove references to block_address_function_relative. * defs.h (GDB_OSABI_FREEBSD_AOUT, GDB_OSABI_NETBSD_AOUT): Remove. (GDB_OSABI_FREEBSD_ELF): Rename to ... (GDB_OSABI_FREEBSD): ... this. (GDB_OSABI_NETBSD_ELF): Rename to ... (GDB_OSABI_NETBSD): ... this. (GDB_OSABI_OPENBSD_ELF): Rename to ... (GDB_OSABI_OPENBSD): ... this. (GDB_OSABI_HPUX_ELF, GDB_OSABI_HPUX_SOM): Remove. * fbsd-tdep.c: Adjust comment. * hppa-nbsd-tdep.c (_initialize_hppanbsd_tdep): Adjust. * hppa-obsd-tdep.c (GDB_OSABI_NETBSD_CORE): Delete. (hppaobsd_core_osabi_sniffer): Delete. (_initialize_hppabsd_tdep): Don't handle a.out. * hppa-tdep.c (hppa_stub_frame_unwind_cache): Don't handle GDB_OSABI_HPUX_SOM. (hppa_gdbarch_init): Likewise. * i386-bsd-tdep.c (i386bsd_aout_osabi_sniffer) (i386bsd_core_osabi_sniffer, _initialize_i386bsd_tdep): Delete. * i386-fbsd-tdep.c (i386fbsdaout_init_abi): Delete. Merge bits with ... (i386fbsd_init_abi): ... this. (_initialize_i386fbsd_tdep): Don't handle a.out. * i386-nbsd-tdep.c (_initialize_i386nbsd_tdep): Adjust. * i386-obsd-tdep.c (i386obsd_aout_supply_regset) (i386obsd_aout_gregset) (i386obsd_aout_iterate_over_regset_sections): Delete. (i386obsd_init_abi): Merge with i386obsd_elf_init_abi. (i386obsd_aout_init_abi): Delete. (_initialize_i386obsd_tdep): Don't handle a.out. * m68k-bsd-tdep.c (m68kobsd_sigtramp_cache_init) (m68kobsd_sigtramp): Delete. (m68kbsd_init_abi): Merge with ... (m68kbsd_elf_init_abi): ... this, and delete it. (m68kbsd_aout_init_abi): Delete. (m68kbsd_aout_osabi_sniffer, m68kbsd_core_osabi_sniffer): Delete. (_initialize_m68kbsd_tdep): Don't handle a.out. * mips-nbsd-tdep.c (_initialize_mipsnbsd_tdep): Adjust. * mips64-obsd-tdep.c (_initialize_mips64obsd_tdep): Adjust. * osabi.c (gdb_osabi_names): Remove "a.out" entries. Drop "ELF" suffixes. Remove "HP-UX" entries. (generic_elf_osabi_sniff_abi_tag_sections): Adjust. (generic_elf_osabi_sniffer): No longer handle GDB_OSABI_HPUX_ELF. Adjust. (_initialize_ppcfbsd_tdep): Adjust. * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Adjust. * ppc-obsd-tdep.c (GDB_OSABI_NETBSD_CORE) (ppcobsd_core_osabi_sniffer): Delete. (_initialize_ppcobsd_tdep): Don't handle a.out. * rs6000-tdep.c (rs6000_gdbarch_init): Adjust. * sh-nbsd-tdep.c (GDB_OSABI_NETBSD_CORE) (shnbsd_core_osabi_sniffer): Delete. (_initialize_shnbsd_tdep): Don't handle a.out. * solib.c (clear_solib): Don't handle SunOS/a.out. * sparc-nbsd-tdep.c (sparc32nbsd_init_abi): Make extern. (sparc32nbsd_aout_init_abi): Delete. (sparc32nbsd_elf_init_abi): Merged into sparc32nbsd_init_abi. (sparcnbsd_aout_osabi_sniffer): Delete. (GDB_OSABI_NETBSD_CORE, sparcnbsd_core_osabi_sniffer): Delete. (_initialize_sparcnbsd_tdep): No longer handle a.out. * sparc-obsd-tdep.c (sparc32obsd_init_abi) (_initialize_sparc32obsd_tdep): Adjust. * sparc-tdep.h (sparc32nbsd_elf_init_abi): Rename to ... (sparc32nbsd_init_abi): ... this. * sparc64-fbsd-tdep.c (_initialize_sparc64fbsd_tdep): Adjust. * sparc64-nbsd-tdep.c (_initialize_sparc64nbsd_tdep): Adjust. * sparc64-obsd-tdep.c (_initialize_sparc64obsd_tdep): Adjust. * stabsread.c: Update comment. * symmisc.c (print_objfile_statistics): Don't mention "a.out" in output. * vax-nbsd-tdep.c (_initialize_vaxnbsd_tdep): Adjust. * vax-obsd-tdep.c: Delete file.
2016-12-09Add ChangeLog entriesYao Qi2-0/+24
ChangeLog entries are missed in my two previous commits.
2016-12-09Create tdep->rx_psw_type and tdep->rx_fpsw_type lazilyYao Qi2-48/+62
I build GDB with all targets enabled, and "set architecture rx", GDB crashes, (gdb) set architecture rx Program received signal SIGSEGV, Segmentation fault. append_flags_type_flag (type=0x20cc360, bitpos=bitpos@entry=0, name=name@entry=0xd27529 "C") at ../../binutils-gdb/gdb/gdbtypes.c:4926 4926 name); (gdb) bt 10 #0 append_flags_type_flag (type=0x20cc360, bitpos=bitpos@entry=0, name=name@entry=0xd27529 "C") at ../../binutils-gdb/gdb/gdbtypes.c:4926 #1 0x00000000004ce725 in rx_gdbarch_init (info=..., arches=<optimized out>) at ../../binutils-gdb/gdb/rx-tdep.c:1051 #2 0x00000000006b05a4 in gdbarch_find_by_info (info=...) at ../../binutils-gdb/gdb/gdbarch.c:5269 #3 0x000000000060eee4 in gdbarch_update_p (info=...) at ../../binutils-gdb/gdb/arch-utils.c:557 #4 0x000000000060f8a8 in set_architecture (ignore_args=<optimized out>, from_tty=1, c=<optimized out>) at ../../binutils-gdb/gdb/arch-utils.c:531 #5 0x0000000000593d0b in do_set_command (arg=<optimized out>, arg@entry=0x20bee81 "rx ", from_tty=from_tty@entry=1, c=c@entry=0x20b1540) at ../../binutils-gdb/gdb/cli/cli-setshow.c:455 #6 0x00000000007665c3 in execute_command (p=<optimized out>, p@entry=0x20bee70 "set architecture rx ", from_tty=1) at ../../binutils-gdb/gdb/top.c:666 #7 0x00000000006935f4 in command_handler (command=0x20bee70 "set architecture rx ") at ../../binutils-gdb/gdb/event-top.c:577 #8 0x00000000006938d8 in command_line_handler (rl=<optimized out>) at ../../binutils-gdb/gdb/event-top.c:767 #9 0x0000000000692c2c in gdb_rl_callback_handler (rl=0x20be7f0 "") at ../../binutils-gdb/gdb/event-top.c:200 The cause is that we want to access some builtin types in gdbarch init, but it is not initialized yet. I fix it by creating the type when it is to be used. We've already done this in sparc, sparc64 and m68k. gdb: 2016-12-09 Yao Qi <yao.qi@linaro.org> PR tdep/20954 * rx-tdep.c (rx_psw_type): New function. (rx_fpsw_type): New function. (rx_register_type): Call rx_psw_type and rx_fpsw_type. (rx_gdbarch_init): Move code to rx_psw_type and rx_fpsw_type. gdb/testsuite: 2016-12-09 Yao Qi <yao.qi@linaro.org> * gdb.base/all-architectures.exp.in: Remove kfail for "rx".
2016-12-09Create tdep->rl78_psw_type lazilyYao Qi2-17/+25
I build GDB for all targets enabled. When I "set architecture rl78", GDB crashes, (gdb) set architecture rl78 Program received signal SIGSEGV, Segmentation fault. append_flags_type_flag (type=0x20cc0e0, bitpos=bitpos@entry=0, name=name@entry=0x11dba3f "CY") at ../../binutils-gdb/gdb/gdbtypes.c:4926 4926 name); (gdb) bt 10 #0 append_flags_type_flag (type=0x20cc0e0, bitpos=bitpos@entry=0, name=name@entry=0x11dba3f "CY") at ../../binutils-gdb/gdb/gdbtypes.c:4926 #1 0x00000000004aaca8 in rl78_gdbarch_init (info=..., arches=<optimized out>) at ../../binutils-gdb/gdb/rl78-tdep.c:1410 #2 0x00000000006b05a4 in gdbarch_find_by_info (info=...) at ../../binutils-gdb/gdb/gdbarch.c:5269 #3 0x000000000060eee4 in gdbarch_update_p (info=...) at ../../binutils-gdb/gdb/arch-utils.c:557 #4 0x000000000060f8a8 in set_architecture (ignore_args=<optimized out>, from_tty=1, c=<optimized out>) at ../../binutils-gdb/gdb/arch-utils.c:531 #5 0x0000000000593d0b in do_set_command (arg=<optimized out>, arg@entry=0x20be851 "rl78", from_tty=from_tty@entry=1, c=c@entry=0x20b1540) at ../../binutils-gdb/gdb/cli/cli-setshow.c:455 #6 0x00000000007665c3 in execute_command (p=<optimized out>, p@entry=0x20be840 "set architecture rl78", from_tty=1) at ../../binutils-gdb/gdb/top.c:666 #7 0x00000000006935f4 in command_handler (command=0x20be840 "set architecture rl78") at ../../binutils-gdb/gdb/event-top.c:577 #8 0x00000000006938d8 in command_line_handler (rl=<optimized out>) at ../../binutils-gdb/gdb/event-top.c:767 #9 0x0000000000692c2c in gdb_rl_callback_handler (rl=0x20be890 "") at ../../binutils-gdb/gdb/event-top.c:200 The cause is that we want to access some builtin types in gdbarch init, but it is not initialized yet. I fix it by creating the type when it is to be used. We've already done this in sparc, sparc64 and m68k. gdb: 2016-12-09 Yao Qi <yao.qi@linaro.org> PR tdep/20953 * rl78-tdep.c (rl78_psw_type): New function. (rl78_register_type): Call rl78_psw_type. (rl78_gdbarch_init): Move code to rl78_psw_type. gdb/testsuite: 2016-12-09 Yao Qi <yao.qi@linaro.org> * gdb.base/all-architectures.exp.in: Remove kfail for rl78.
2016-12-09Add test that exercises all bfd architecture, osabi, endian, etc. combinationsPedro Alves10-0/+497
This adds a test that exposes several problems fixed by earlier patches: #1 - Buffer overrun when host/target formats match, but sizes don't. https://sourceware.org/ml/gdb-patches/2016-03/msg00125.html #2 - Missing handling for FR-V FR300. https://sourceware.org/ml/gdb-patches/2016-03/msg00117.html #3 - BFD architectures with spaces in their names (v850). https://sourceware.org/ml/binutils/2016-03/msg00108.html #4 - The OS ABI names with spaces issue. https://sourceware.org/ml/gdb-patches/2016-03/msg00116.html #5 - Bogus HP/PA long double format. https://sourceware.org/ml/gdb-patches/2016-03/msg00122.html #6 - Cris big endian internal error. https://sourceware.org/ml/gdb-patches/2016-03/msg00126.html #7 - Several PowerPC bfd archs/machines not handled by gdb. https://sourceware.org/bugzilla/show_bug.cgi?id=19797 And hopefully helps catch others in the future. This started out as a test that simply did, gdb -ex "print 1.0L" to exercise #1 above. Then to cover both 32-bit target / 64-bit host and the converse, I thought of having the testcase print the floats twice, once with the architecture set to "i386" and then to "i386:x86-64". This way it wouldn't matter whether gdb was built as 32-bit or a 64-bit program. Then I thought that other archs might have similar host/target floatformat conversion issues as well. Instead of hardcoding some architectures in the test file, I thought we could just iterate over all bfd architectures and OS ABIs supported by the gdb build being tested. This is what then exposed all the other problems listed above... With an --enable-targets=all, this exercises over 14 thousand combinations. If left in a single test file, it all consistenly runs in under a minute on my machine (An Intel i7-4810MQ @ 2.8 MHZ running Fedora 23). Split in 8 chunks, as in this commit, it runs in around 25 seconds, with make -j8. To avoid flooding the gdb.sum file, it avoids calling "pass" on each tested combination/iteration. I'm explicitly not implementing that by passing an empty message to gdb_test / gdb_test_multiple, because I still want a FAIL to be logged in gdb.sum. So instead this puts the internal passes in the gdb.log file, only, prefixed "IPASS:", for internal pass. TBC, if some iteration fails, it'll still show up as FAIL in gdb.sum. If this is an approach that takes on, I can see us extending the common bits to support it for all testcases. gdb/testsuite/ChangeLog: 2016-12-09 Pedro Alves <palves@redhat.com> * gdb.base/all-architectures-0.exp: New file. * gdb.base/all-architectures-1.exp: New file. * gdb.base/all-architectures-2.exp: New file. * gdb.base/all-architectures-3.exp: New file. * gdb.base/all-architectures-4.exp: New file. * gdb.base/all-architectures-5.exp: New file. * gdb.base/all-architectures-6.exp: New file. * gdb.base/all-architectures-7.exp: New file. * gdb.base/all-architectures.exp.in: New file.
2016-12-09Use code cache in aarch64 prologue analyzerYao Qi2-1/+7
This patch change aarch prologue analyzer using code cache, in order to improve the performance of remote debugging. gdb.perf/skip-prologue.exp (measured by wall-time) is improved when the program is compiled without debug information. Original Patched Original Patched without dbg without dbg with dbg with dbg / 11.1635239124 9.99472999573 9.65339517593 9.66648793221 -fstack-protector-all 11.2560930252 9.338118 9.63896489143 9.59474396706 gdb: 2016-12-9 Yao Qi <yao.qi@linaro.org> * aarch64-tdep.c (instruction_reader::read): Call read_code_unsigned_integer instead of read_memory_unsigned_integer.
2016-12-09Use code cache in arm prologue analyzerYao Qi2-19/+32
This patch change arm prologue analyzer using code cache, in order to improve the performance of remote debugging. gdb.perf/skip-prologue.exp (measured by wall-time) is improved a lot, Original Patched Original Patched without dbg without dbg with dbg with dbg -marm 14.166741848 9.32852292061 11.4908499718 9.16302204132 -marm 14.6705040932 9.34849786758 18.2788009644 9.14823913574 \-fstack-protector-all -mthumb 34.4391930103 10.6062178612 13.7886838913 10.3094120026 -mthumb \-fstack-protector-all 34.9310460091 10.6413481236 25.3875930309 10.6294929981 gdb: 2016-12-09 Yao Qi <yao.qi@linaro.org> * arm-tdep.c (skip_prologue_function): Call read_code_unsigned_integer instead of read_memory_unsigned_integer. (thumb_analyze_prologue): Likewise. (arm_analyze_load_stack_chk_guard): Likewise. (arm_skip_stack_protector): Likewise. (arm_analyze_prologue):Likewise. (extend_buffer_earlier): Call target_read_code instead of target_read_memory. (arm_adjust_breakpoint_address): Likewise.
2016-12-09Compile gdb.perf/skip-prologue.c with and without debug infoYao Qi2-1/+12
gdb.perf/skip-prologue.exp is intended to measure the performance of skipping prologue with prologue analysis by setting breakpoints. However, if program is compiled with debug info, GDB is smart to skip prologue by line table from debug info, so prologue analysis is not exercised at all. This patch adds a parameter COMPILE to specify compiling with debug information, otherwise, it is compiled without debug information. gdb/testsuite: 2016-12-09 Yao Qi <yao.qi@linaro.org> * gdb.perf/skip-prologue.exp: Add parameter COMPILE.
2016-12-09Hurd: Adjust to changes to "push pruning old threads down to the target"Thomas Schwinge2-0/+5
For "info threads", we currently run into: $ gdb/gdb -q -nw -nx --batch -ex start -ex info\ threads bfd/doc/chew Temporary breakpoint 1 at 0x80486e0: file ../../../W._C._Handy/bfd/doc/chew.c, line 1535. [New Thread 10656.5] Thread 4 hit Temporary breakpoint 1, main (ac=1, av=0x102cd84) at ../../../W._C._Handy/bfd/doc/chew.c:1535 1535 { Id Target Id Frame 1 bogus thread id 1 Can't fetch registers from thread bogus thread id 1: No such thread Before commit e8032dde10b743253125d7defb5f5503b21c1d26, gdb/thread.c:update_thread_list used to call prune_threads, after that change it doesn't anymore, and we don't implement the to_update_thread_list target method where the prune_threads call got moved. For now, apply a fix, related to commit c82f56d9d760a9b4034eeaac44f2f0fa5779ff69 "Hurd: Adjust to startup-with-shell changes", which restores the previous behavior: Id Target Id Frame * 4 Thread 10688.4 main (ac=1, av=0x102cd84) at ../../../W._C._Handy/bfd/doc/chew.c:1535 5 Thread 10688.5 0x0106096c in ?? () from /lib/i386-gnu/libc.so.0.3 Not perfect, but at least better. gdb/ * gnu-nat.c (gnu_create_inferior): After startup_inferior, call prune_threads.
2016-12-09Avoid PATH_MAX usageThomas Schwinge2-10/+9
On GNU/Hurd, there is no "#define PATH_MAX", so this failed to build. gdb/ * inferior.c (print_selected_inferior): Avoid PATH_MAX usage.
2016-12-08Hurd: In the CLI, use parse_thread_id instead of global_thread_id_to_ptidSimon Marchi2-8/+10
Follow-up to commit 14f6890677849172a4b13779acd9089c9baa3a81. global_thread_id_to_ptid expects global thread numbers, which are nowadays only used in MI, never presented to the user in the CLI. Since this is a CLI command, it should accept the inferior-qualified format instead. gdb/ * gnu-nat.c (set_sig_thread_cmd): Use parse_thread_id instead of global_thread_id_to_ptid.
2016-12-08Hurd, C++: Mach/Hurd headers and MIG stubs are not yet fit for C++Thomas Schwinge4-18/+40
..., so handle these in "C" mode still: gdb/ * config/i386/i386gnu.mh (%_S.o %_U.o): Add "-x c" to "COMPILE.post". * gnu-nat.c: #include Mach/Hurd headers before all others. Wrap Mach/Hurd headers and MIG stubs' prototypes in 'extern "C"'. * i386-gnu-nat.c: Likewise.
2016-12-08Hurd, C++: kern_return_t vs. error_tThomas Schwinge3-37/+51
GNU/Hurd uses its own "typedef enum __error_t_codes error_t;" ([glibc]/sysdeps/mach/hurd/bits/errno.h), contrary to the default "typedef int error_t;" ([glibc]/stdlib/errno.h). The Mach/Hurd RPCs return kern_return_t values, for which, upon assigning them to an error_t variable, GCC in C++ mode tells us "error: invalid conversion from 'kern_return_t {aka int}' to 'error_t {aka __error_t_codes}'". Instead of casting all these RPC return values to "error_t", just use "kern_return_t" variables: gdb/ * gnu-nat.c (proc_get_exception_port, proc_set_exception_port) (INF_RESUME_MSGPORT_RPC, proc_get_state, _proc_get_exc_port) (proc_steal_exc_port, proc_restore_exc_port, make_proc) (inf_startup, inf_set_pid, inf_validate_procinfo) (inf_validate_task_sc, inf_set_traced, inf_validate_procs) (inf_signal, inf_continue, gnu_wait, S_exception_raise_request) (do_mach_notify_dead_name, S_proc_wait_reply) (S_msg_sig_post_untraced_reply, S_msg_sig_post_reply) (port_msgs_queued, gnu_read_inferior, gnu_write_inferior) (gnu_find_memory_regions, steal_exc_port, thread_takeover_sc_cmd) (flush_inferior_icache): Instead of "error_t" use "kern_return_t". * i386-gnu-nat.c (fetch_fpregs, store_fpregs, i386_gnu_dr_get) (i386_gnu_dr_set): Likewise.
2016-12-08Hurd, C++: Avoid "const char *" to "char *" castsThomas Schwinge2-11/+33
... by a bit of code refactoring: gdb/ * gnu-nat.c (set_task_pause_cmd, set_signals_cmd) (set_exceptions_cmd): Add variants taking an "int arg" instead of a "char *". Make the "char *" variants use the former. (set_noninvasive_cmd): Also use the "int arg" variants.
2016-12-08Hurd, C++: Avoid GNU C nested functionsThomas Schwinge2-9/+15
..., which C++ doesn't allow, so... gdb/ * gnu-nat.c (gnu_create_inferior): Move nested "trace_me" function... (gnu_ptrace_me): ... here.
2016-12-08Hurd, C++: Explicitly cast "void *"Thomas Schwinge2-2/+7
C++ doesn't do implicit type conversions from "void *", so we have to... gdb/ * i386-gnu-nat.c (i386_gnu_dr_set_control_one) (i386_gnu_dr_set_addr_one): Explicitly cast "void *".
2016-12-07Hurd: Adjust to "Per-inferior/Inferior-qualified thread IDs" changesThomas Schwinge2-1/+6
[...]/gdb/gnu-nat.c: In function 'set_sig_thread_cmd': [...]/gdb/gnu-nat.c:2973:7: warning: implicit declaration of function 'thread_id_to_pid' [-Wimplicit-function-declaration] ptid_t ptid = thread_id_to_pid (atoi (args)); ^ [...]/gdb/gnu-nat.c:2973:7: error: invalid initializer That's commit 5d5658a1d3c3eb2a09c03f2f0662a1c01963c869, which renamed `thread_id_to_pid` to `global_thread_id_to_ptid`. gdb/ * gnu-nat.c (set_sig_thread_cmd): Call global_thread_id_to_ptid instead of thread_id_to_pid.
2016-12-06Remove unnecessary inferior lookup in inferior_commandSimon Marchi2-3/+5
In the case where we switch to a non-running inferior, we do a "find_inferior_id (num)", although we did the same call right before. gdb/ChangeLog: * inferior.c (inferior_command): Remove duplicate find_inferior_id call.
2016-12-06Assert on lval_registerYao Qi3-1/+14
This patch adds asserts where the value's lval must be lval_register. This triggers an error in frame_register_unwind because VALUE_REGNUM is used but value's lval is not lval_register. This also reveals a design issue in frame_register_unwind, that is arguments addrp and realnump are mutually exclusive, we either use addrp (for lval_memory), or use realnump (for lval_register). This can be done in a separate patch. gdb: 2016-12-06 Yao Qi <yao.qi@linaro.org> * frame.c (frame_register_unwind): Set *realnump if *lvalp is lval_register. * value.c (deprecated_value_next_frame_id_hack): Assert value->lval is lval_register. (deprecated_value_regnum_hack): Likewise.
2016-12-02Introduce enum_flag type for ui_out flagsSimon Marchi6-12/+27
This patch changes the ui_out flags to be an enum flag. gdb/ChangeLog: * ui-out.h: Include "common/enum-flags.h". (enum ui_flags): Rename to ... (enum ui_out_flag): ... this. (ui_out_flags): Define enum flag type. (ui_out_test_flags): Change type of parameter to ui_out_flags. (ui_out_new): Likewise. * ui-out.c (ui_out_test_flags): Likewise. (ui_out_new): Likewise. * cli-out.c (cli_out_new): Update variable type. * mi/mi-out.c (mi_out_new): Likewise. * tui/tui-out.c (tui_out_new): Likewise.
2016-12-02Remove unneeded pattern matching in gdb.base/maint.expLuis Machado2-16/+10
This gets rid of more useless pattern matching cases in gdb.base/maint.exp. gdb/testsuite/ChangeLog: 2016-12-02 Luis Machado <lgustavo@codesourcery.com> * gdb.base/maint.exp: Use gdb_test instead of gdb_test_multiple when possible. Remove useless pattern-matching code.
2016-12-02Support an "unlimited" number of user-defined argumentsPedro Alves7-84/+181
New in v2: - A few adjustments / simplifications were possible now that we require C++11: . Use std::unique_ptr to make the user_args_stack std::vector own its elements: static std::vector<std::unique_ptr<user_args>> user_args_stack; . use vector::emplace_back to construct elements directly in the corresponding vectors. . use std::to_string instead of adding a gdb::to_string replacement. - Now includes a test. Docs/NEWS are unchanged from v1 and have already been approved. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I recently wrote a user-defined command that could benefit from supporting an unlimited number of arguments: http://palves.net/list-active-signal-handlers-with-gdb/ E.g., 'info signal-dispositions 1 2 3 4 5 6 7 8 9 10 11' However, we currently only support up to 10 arguments passed to user-defined commands ($arg0..$arg9). I can't find a good reason for that, other than "old code with hard coded limits". This patch removes that limit and modernizes the code along the way: - Makes the user_args struct a real C++ class that uses std::vector for storage. - Removes the "next" pointer from within user_args and uses a std::vector to maintain a stack instead. - Adds a new RAII-based scoped_user_args_level class to help push/pop user args in the stack instead of using a cleanup. gdb/ChangeLog: 2016-12-02 Pedro Alves <palves@redhat.com> * NEWS: Mention that user commands now accept an unlimited number of arguments. * cli/cli-script.c: Include <vector>. (struct string_view): New type. (MAXUSERARGS): Delete. (struct user_args): Now a C++ class. (user_args_stack): New. (struct scoped_user_args_level): New type. (execute_user_command): Use scoped_user_args_level. (arg_cleanup): Delete. (setup_user_args): Deleted, and refactored as ... (user_args::user_args): ... this new constructor. Limit of number of arguments removed. (insert_user_defined_cmd_args): Defer to user_args_stack. (user_args::insert_args): New, bits based on old insert_user_defined_cmd_args with limit of number of arguments eliminated. gdb/doc/ChangeLog: 2016-12-02 Pedro Alves <palves@redhat.com> * gdb.texinfo (User-defined Commands): Limit on number of arguments passed to user-defined commands removed; update. gdb/testsuite/ChangeLog: 2016-12-02 Pedro Alves <palves@redhat.com> * gdb.base/commands.exp (user_defined_command_manyargs_test): New procedure. (top level): Call it.
2016-12-02Test user-defined gdb commands and arguments stackPedro Alves2-0/+65
We're missing a test that makes sure that arguments to user-defined commands are handled correctly when a user-defined command calls another user-defined command / recurses. The following patch changes that code, so add such a test first so we can be confident won't be breaking this use case. gdb/testsuite/ChangeLog: 2016-12-02 Pedro Alves <palves@redhat.com> * gdb.base/commands.exp (user_defined_command_args_stack_test): New procedure. (top level): Call it.
2016-12-02Fix PR 20559 - "eval" command and $arg0...$arg9/$argc substitutionPedro Alves9-11/+102
It'd be handy to be able to iterate over command arguments in user-defined commands, in order to support optional arguments ($arg0..$argN). I thought I could make it work with "eval", but alas, it doesn't work currently. E.g., with: define test set $i = 0 while $i < $argc eval "print $arg%d", $i set $i = $i + 1 end end we get: (gdb) test 1 $1 = void (gdb) test 1 2 3 $2 = void $3 = void $4 = void (gdb) The problem is that "eval" doesn't do user-defined command arguments substitution after expanding its own argument. This patch fixes that, which makes the example above work: (gdb) test 1 $1 = 1 (gdb) test 1 2 3 $2 = 1 $3 = 2 $4 = 3 (gdb) New test included, similar the above, but also exercises expanding $argc. I think this is likely to simplify many scripts out there, so I'm adding an example to the manual and mentioning it in NEWS as well. gdb/ChangeLog: 2016-12-02 Pedro Alves <palves@redhat.com> PR cli/20559 * NEWS: Mention "eval" expands user-defined command arguments. * cli/cli-script.c (execute_control_command): Adjust to rename. (insert_args): Rename to ... (insert_user_defined_cmd_args): ... this, and make extern. * cli/cli-script.h (insert_user_defined_cmd_args): New declaration. * printcmd.c: Include "cli/cli-script.h". (eval_command): Call insert_user_defined_cmd_args. gdb/doc/ChangeLog: 2016-12-02 Pedro Alves <palves@redhat.com> PR cli/20559 * gdb.texinfo (Define): Add example of using "eval" to process a variable number of arguments. (Output) <eval>: Add anchor. gdb/testsuite/ChangeLog: 2016-12-02 Pedro Alves <palves@redhat.com> PR cli/20559 * gdb.base/commands.exp (user_defined_command_args_eval): New procedure. (top level): Call it.
2016-12-02Revert change to gdb.cp/ovldbreak.expLuis Machado2-0/+9
This reverts the timeout handling (removed by 018572b88885ae67d22612937fa1e4fd98d5f5ad) for gdb.cp/ovldbreak.exp until we decide what to do about this particular function. gdb/testsuite/ChangeLog: 2016-12-02 Luis Machado <lgustavo@codesourcery.com> * gdb.base/ovldbreak.exp (take_gdb_out_of_choice_menu): Restore timeout handling.
2016-12-02PR symtab/16264 - support DW_AT_main_subprogramTom Tromey5-12/+138
This patch adds support for DW_AT_main_subprogram. This is PR symtab/16264. DW_AT_main_subprogram is used to mark a program's entry point. GCC can emit this, and I hope to change the Rust compiler to emit it as well. GDB already supports an older, pre-DWARF 4 convention adopted by FORTRAN compilers, namely to emit DW_AT_calling_convention for the "main" function. However, I think this support in GDB had a small bug, in that it seems to rely on the DW_AT_name being read before DW_AT_calling_convention. This patch fixes this as well. Built and regtested on x86-64 Fedora 24 and the buildbot. New test case included. 2016-12-02 Tom Tromey <tom@tromey.com> PR symtab/16264: * dwarf2read.c (struct partial_die_info) <main_subprogram>: New member. (add_partial_symbol): Call set_objfile_main_name. (read_partial_die): Handle DW_AT_main_subprogram. <DW_AT_calling_convention>: don't call set_objfile_main_name, but set main_subprogram flag. 2016-12-02 Tom Tromey <tom@tromey.com> * gdb.dwarf2/main-subprogram.c: New file. * gdb.dwarf2/main-subprogram.exp: New file.
2016-12-02Rename some trace functionsSimon Marchi5-48/+86
This patch renames a few trace-related functions, so that they adhere to the de facto standard of naming command entry point functions <command>_command. I like the ease of looking up a command entry point if they all follow that rule. An enum label "tstop_command" conflicts with a new function name, so I renamed this one trace_stop_command. In v2: - Rename functions of the trace_find family, as well as trace_dump_command. gdb/ChangeLog: * tracefile-tfile.c (tfile_write_status): Adjust to renames. * tracefile.c (trace_save_command): Rename to... (tsave_command): ...this. (_initialize_tracefile): Adjust to renames. * tracepoint.c (trace_actions_command): Rename to... (actions_command): ...this. (trace_start_command): Rename to... (tstart_command): ...this, and adjust to renames.. (trace_stop_command): Rename to... (tstop_command): ...this. (trace_status_command): Rename to... (tstatus_command): ...this, and adjust to renames. (trace_find_command): Rename to... (tfind_command): ...this. (trace_find_pc_command): Rename to... (tfind_pc_command): ...this. (trace_find_tracepoint_command): Rename to... (tfind_tracepoint_command): ...this. (trace_find_line_command): Rename to... (tfind_line_command): ...this. (trace_find_range_command): Rename to... (tfind_range_command): ...this. (trace_find_outside_command): Rename to... (tfind_outside_command): ...this. (trace_dump_command): Rename to... (tdump_command): ...this. (tfind_1): Adjust to renames. (trace_find_end_command): Rename to... (tfind_end_command): ...this, and adjust to renames.. (trace_status_mi): Adjust to renames. (parse_trace_status): Adjust to renames. (_initialize_tracepoint): Adjust to renames. * tracepoint.h (enum trace_stop_reason) <tstop_command>: Rename to... <trace_stop_command>: ...this.
2016-12-02Remove mi_out_data::suppress_outputSimon Marchi2-23/+13
The suppress_output field of the mi_ui_out_data structure is never actually set to 1/true. We can therefore remove it, and remove all the if (suppress_output) checks. gdb/ChangeLog: * mi/mi-out.c (mi_ui_out_data) <suppress_output>: Remove. (mi_table_body): Remove suppress_output check. (mi_table_end): Likewise. (mi_table_header): Likewise. (mi_begin): Likewise. (mi_end): Likewise. (mi_field_int): Likewise. (mi_field_string): Likewise. (mi_field_fmt): Likewise. (mi_out_data_ctor): Likewise.
2016-12-02[AArch64] Recognize STR instruction in prologueYao Qi2-0/+82
This patch teaches GDB AArch64 backend to recognize STR instructions in prologue, like 'str x19, [sp, #-48]!' or 'str w0, [sp, #44]'. The unit test is added too. gdb: 2016-12-02 Yao Qi <yao.qi@linaro.org> Pedro Alves <palves@redhat.com> * aarch64-tdep.c (aarch64_analyze_prologue): Recognize STR instruction. (aarch64_analyze_prologue_test): More tests.
2016-12-02Add unit test to aarch64 prologue analyzerYao Qi4-9/+150
We don't have an effective way to test prologue analyzer which is highly dependent on instruction patterns in prologue generated by compiler. GDB prologue analyzer may not handle the new sequences generated by new compiler, or may still handle some sequences that generated by very old compilers which are no longer used. The former is a functionality issue, while the latter is a maintenance issue. The input and output of prologue analyzer is quite clear, so it fits for unit test. The input is series of instructions, and the output are 1) where prologue end, 2) where registers are saved. In aarch64, they are represented in 'struct aarch64_prologue_cache'. This patch refactors aarch64_analyze_prologue so it can read instructions from either real target or test harness. In unit test aarch64_analyze_prologue_test, aarch64_analyze_prologue gets instructions we prepared in the test, as the input of prologue analyzer. Then, we checked various fields in 'struct aarch64_prologue_cache'. gdb: 2016-12-02 Yao Qi <yao.qi@linaro.org> Pedro Alves <palves@redhat.com> * aarch64-tdep.c: Include "selftest.h". (abstract_instruction_reader): New class. (instruction_reader): New class. (aarch64_analyze_prologue): Add new parameter reader. Call reader.read instead of read_memory_unsigned_integer. [GDB_SELF_TEST] (instruction_reader_test): New class. (aarch64_analyze_prologue_test): New function. (_initialize_aarch64_tdep) [GDB_SELF_TEST]: Register selftests::aarch64_analyze_prologue_test. * trad-frame.c (trad_frame_cache_zalloc): (trad_frame_alloc_saved_regs): Add a new function. * trad-frame.h (trad_frame_alloc_saved_regs): Declare.
2016-12-01Don't handle timeout inside gdb_test_multipleLuis Machado4-21/+9
This fixes a few cases where the testcase is explicitly handling timeouts inside gdb_test_multiple when it is not necessary. It also converts two gdb_test_multiple calls to gdb_test_no_output calls (also removing the timeout handling). gdb/testsuite/ChangeLog: 2016-12-01 Luis Machado <lgustavo@codesourcery.com> * gdb.base/maint.exp: Remove timeout handling for gdb_test_multiple. * gdb.cp/gdb2495.exp: Likewise and convert gdb_test_multiple into gdb_test_no_output for a couple of cases. * gdb.cp/ovldbreak.exp: Remove timeout handling for gdb_test_multiple.
2016-12-01Class-ify ui_out_tableSimon Marchi2-158/+223
This patch makes a class out of the ui_out_table structure, the structure responsible for managing the generation of an UI table. To simplify the ui_out_table object, I changed it so that it can only be used for generating a single object. Instead of clearing the header list when starting a new table, we an ui_out_table when starting a table and delete it when we're done. Therefore, the checks: if (uiout->table->flag) if (!uiout->table->flag) are respectively replaced with if (uiout->table != nullptr) if (uiout->table == nullptr) Note: I removed the check at the beginning of ui_out_begin, because there is an equivalent check at the beginning of verify_field. New in v2: - use "enum class" for ui_out_table::state and update references. gdb/ChangeLog: * ui-out.c (enum ui_out_table_state): Move to class ui_out_table as ui_out_table::state. (struct ui_out_table): Change to ... (class ui_out_table): ... this. <flag>: Remove. <entry_level>: Rename to ... <m_entry_level>: ... this. <columns>: Rename to ... <m_nr_cols>: ... this. <id>: Rename to ... <m_id>: ... this. <headers>: Rename to ... <m_headers>: ... this. <headers_iterator>: Rename to ... <m_headers_iterator>: ... this. <start_body, append_header, start_row, get_next_header, query_field, current_state, entry_level>: New methods. (struct ui_out) <table>: Change type to unique_ptr to ui_out_table. (append_header_to_list, get_next_header, clear_header_list, clear_table): Remove. (ui_out_table_begin): Instantiate ui_out_table object. Update table check. (ui_out_table_body): Update table check, replace code with call to ui_out_table::start_body. (ui_out_table_end): Update table check, replace manual cleanup with assignment of uiout->table unique_ptr to nullptr. (ui_out_table_header): Update table check, replace call to append_header_to_list with call to append_header method. (ui_out_begin): Remove one table state check, update another. Replace code with call to start_row method. (verify_field): Update table checks. (ui_out_query_field): Update table check, replace code with call to query_field method. (ui_out_new): Remove table initialization code.
2016-12-01ui_out_table: Replace boolean flag with enumSimon Marchi2-16/+38
This patch is just a little cleanup, it replaces the body_flag field of ui_out_table with an enum. It expresses more explicitly the intent of the field (check that state == TABLE_STATE_HEADERS conveys more what we want to do than checking for !body_flag). New in v2: - Remove unnecessary ui_out_table_state::. gdb/ChangeLog: * ui-out.c (enum ui_out_table_state): New enum. (struct ui_out_table) <body_flag>: Remove field. <state>: New field. (ui_out_table_begin): Replace usages of body_flag with state. (ui_out_table_body): Likewise. (ui_out_table_end): Likewise. (ui_out_table_header): Likewise. (ui_out_begin): Likewise. (verify_field): Likewise. (ui_out_new): Likewise.
2016-12-01Simplify ui-out level codeSimon Marchi5-55/+60
Now that we use a vector to store the levels, we don't have to keep a separate level field in ui_out to keep track of the current level. We can efficiently derive it from the vector size. That causes a little change in the meaning of the level, as in they are now 1-based instead of 0-based (the initial level has the "id" 1 now), but it shouldn't change anything in the behavior. Additionally, push_level and pop_level don't really need to return the new level, making them return void simplifies the code a bit. Finally, the ui_out_begin/ui_out_end callbacks in the ui_out_impl interface don't need to be passed the level, it's never actually used. New in v2: - Remove or update stale comments. gdb/ChangeLog: * ui-out.h (ui_out_begin_ftype): Remove level parameter. (ui_out_end_ftype): Likewise. * ui-out.c (struct ui_out) <level>: Replace field with a method that dynamically computes the result. (current_level): Get vector's back item instead of using uiout->level. (push_level): Make return type void. (pop_level): Make return type void and update access to ui_out::level. (uo_begin): Remove level parameter. (uo_end): Likewise. (ui_out_table_begin): Update access to uiout::level. (ui_out_begin): Don't read return value from push_level, call uiout->level() instead, update call to uo_begin. (ui_out_end): Don't read return value from pop_level, update call to uo_end. (verify_field): Update access to uiout->level. (ui_out_new): Don't initialize ui_out::level, call push_level to push the initial level instead of doing it by hand. * cli-out.c (cli_begin): Remove level parameter. (cli_end): Likewise. * mi/mi-out.c (mi_begin): Likewise. (mi_end): Likewise.
2016-12-01Class-ify ui_out_levelSimon Marchi2-21/+54
This patch changes struct ui_out_level to be a real C++ class. No behavioral changes. gdb/ChangeLog: * ui-out.c (struct ui_out_level): Replace with ... (class ui_out_level): ... this. (current_level): Update. (push_level): Update. (pop_level): Update. (verify_field): Update. (ui_out_new): Update.
2016-12-01Class-ify ui_out_hdrSimon Marchi2-27/+77
This patch makes ui_out_hdr (the object that represents an ui-out table header) a proper C++ class. No behavior changes, it's all about encapsulation. gdb/ChangeLog: * ui-out.c (struct ui_out_hdr): Replace with ... (class ui_out_hdr): ... this. (append_header_to_list): Update. (get_next_header): Update. (ui_out_query_field): Update.
2016-12-01Use std::string for ui_out_hdr's text fieldsSimon Marchi6-53/+62
This patch makes ui_out_hdr use std::string for its text fields. It makes freeing automatic when the object is deleted. gdb/ChangeLog: * mi/mi-out.c (mi_table_header): Change char * args to std::string. * cli-out.c (cli_table_header): Likewise. * ui-out.h (table_header_ftype): Likewise. (ui_out_table_header): Constify colhdr argument. (ui_out_query_field): Constify col_name argument. * ui-out.c (ui_out_hdr) <col_name, colhdr>: Change type to std::string. (uo_table_header): Change char * args to std::string. (ui_out_table_header): Likewise. (get_next_header): Constify colhdr argument and adapt. (clear_header_list): Don't free col_name/colhdr fields. (append_header_to_list): Change char * args to std::string and adapt. (verify_field): Constify variable. (ui_out_query_field): Constify col_name argument and adapt. * breakpoint.c (wrap_indent_at_field): Constify variable.
2016-12-01Replace hand-made linked list of ui_out_hdr by vector and iteratorSimon Marchi2-56/+57
Instead of keeping pointers to first, last and current ui_out_hdr in ui_out_table, we can use an std::vector and an iterator. Direct random access of to vector helps make get_next_header a bit nicer by avoiding iterating on all the headers. append_header_to_list is also a bit simpler. Also, using unique_ptr inside the vector allows expressing the ownership of the ui_out_hdr objects by the ui_out_table object, and it simplifies the destruction. gdb/ChangeLog: * ui-out.c (struct ui_out_hdr) <next>: Remove. (struct ui_out_table) <header_first, header_last, header_next>: Remove. <headers, headers_iterator>: New fields. (ui_out_table_body): Update for the new data structure. (ui_out_begin): Likewise. (clear_header_list): Likewise. (append_header_to_list): Likewise. (get_next_header): Likewise. (ui_out_query_field): Likewise. (ui_out_new): Likewise.
2016-12-01Fixup testcases outputting own name as a test name and standardize failed ↵Luis Machado193-238/+434
compilation messages Changes in v3: - Adjusted some testcases where the message "failed to compile" was not unique. Changes in v2: - Addressed comments from reviewers. - Fixed spurious whitespaces. - Changed compilation failure messages that included source/binary paths to ones that are short and deterministic. --- Another bit of cleanup to the testsuite. We have a number of tests that are not honoring the rule of not outputting their own name as a test name. I fixed up all the offenders i could find with the following regular expression: "(xfail|kfail|kpass|fail|pass|unsupported|untested) ([A-Za-z0-9]+|\\\$(.)*testfile(.)*)\.exp$" gdb/testsuite/ChangeLog: 2016-12-01 Luis Machado <lgustavo@codesourcery.com> Fix test names and standardize compilation error messages throughout the following files: * gdb.ada/start.exp * gdb.arch/alpha-step.exp * gdb.arch/e500-prologue.exp * gdb.arch/ftrace-insn-reloc.exp * gdb.arch/gdb1291.exp * gdb.arch/gdb1431.exp * gdb.arch/gdb1558.exp * gdb.arch/i386-dr3-watch.exp * gdb.arch/i386-sse-stack-align.exp * gdb.arch/ia64-breakpoint-shadow.exp * gdb.arch/pa-nullify.exp * gdb.arch/powerpc-aix-prologue.exp * gdb.arch/thumb-bx-pc.exp * gdb.base/annota1.exp * gdb.base/annota3.exp * gdb.base/arrayidx.exp * gdb.base/assign.exp * gdb.base/attach.exp * gdb.base/auxv.exp * gdb.base/bang.exp * gdb.base/bfp-test.exp * gdb.base/bigcore.exp * gdb.base/bitfields2.exp * gdb.base/break-fun-addr.exp * gdb.base/break-probes.exp * gdb.base/call-rt-st.exp * gdb.base/callexit.exp * gdb.base/catch-fork-kill.exp * gdb.base/charset.exp * gdb.base/checkpoint.exp * gdb.base/comprdebug.exp * gdb.base/constvars.exp * gdb.base/coredump-filter.exp * gdb.base/cursal.exp * gdb.base/cvexpr.exp * gdb.base/detach.exp * gdb.base/display.exp * gdb.base/dmsym.exp * gdb.base/dprintf-pending.exp * gdb.base/dso2dso.exp * gdb.base/dtrace-probe.exp * gdb.base/dump.exp * gdb.base/enum_cond.exp * gdb.base/exe-lock.exp * gdb.base/exec-invalid-sysroot.exp * gdb.base/execl-update-breakpoints.exp * gdb.base/exprs.exp * gdb.base/fileio.exp * gdb.base/find.exp * gdb.base/finish.exp * gdb.base/fixsection.exp * gdb.base/foll-vfork.exp * gdb.base/frame-args.exp * gdb.base/gcore.exp * gdb.base/gdb1250.exp * gdb.base/global-var-nested-by-dso.exp * gdb.base/gnu-ifunc.exp * gdb.base/hashline1.exp * gdb.base/hashline2.exp * gdb.base/hashline3.exp * gdb.base/hbreak-in-shr-unsupported.exp * gdb.base/huge.exp * gdb.base/infcall-input.exp * gdb.base/info-fun.exp * gdb.base/info-shared.exp * gdb.base/jit-simple.exp * gdb.base/jit-so.exp * gdb.base/jit.exp * gdb.base/jump.exp * gdb.base/label.exp * gdb.base/lineinc.exp * gdb.base/logical.exp * gdb.base/longjmp.exp * gdb.base/macscp.exp * gdb.base/miscexprs.exp * gdb.base/new-ui-echo.exp * gdb.base/new-ui-pending-input.exp * gdb.base/new-ui.exp * gdb.base/nodebug.exp * gdb.base/nofield.exp * gdb.base/offsets.exp * gdb.base/overlays.exp * gdb.base/pending.exp * gdb.base/pointers.exp * gdb.base/pr11022.exp * gdb.base/printcmds.exp * gdb.base/prologue.exp * gdb.base/ptr-typedef.exp * gdb.base/realname-expand.exp * gdb.base/relativedebug.exp * gdb.base/relocate.exp * gdb.base/remote.exp * gdb.base/reread.exp * gdb.base/return2.exp * gdb.base/savedregs.exp * gdb.base/sep.exp * gdb.base/sepdebug.exp * gdb.base/sepsymtab.exp * gdb.base/set-inferior-tty.exp * gdb.base/setshow.exp * gdb.base/shlib-call.exp * gdb.base/sigaltstack.exp * gdb.base/siginfo-addr.exp * gdb.base/signals.exp * gdb.base/signull.exp * gdb.base/sigrepeat.exp * gdb.base/so-impl-ld.exp * gdb.base/solib-display.exp * gdb.base/solib-overlap.exp * gdb.base/solib-search.exp * gdb.base/solib-symbol.exp * gdb.base/structs.exp * gdb.base/structs2.exp * gdb.base/symtab-search-order.exp * gdb.base/twice.exp * gdb.base/unload.exp * gdb.base/varargs.exp * gdb.base/watchpoint-solib.exp * gdb.base/watchpoint.exp * gdb.base/whatis.exp * gdb.base/wrong_frame_bt_full.exp * gdb.btrace/dlopen.exp * gdb.cell/ea-standalone.exp * gdb.cell/ea-test.exp * gdb.cp/dispcxx.exp * gdb.cp/gdb2384.exp * gdb.cp/method2.exp * gdb.cp/nextoverthrow.exp * gdb.cp/pr10728.exp * gdb.disasm/am33.exp * gdb.disasm/h8300s.exp * gdb.disasm/mn10300.exp * gdb.disasm/sh3.exp * gdb.dwarf2/dw2-dir-file-name.exp * gdb.fortran/complex.exp * gdb.fortran/library-module.exp * gdb.guile/scm-pretty-print.exp * gdb.guile/scm-symbol.exp * gdb.guile/scm-type.exp * gdb.guile/scm-value.exp * gdb.linespec/linespec.exp * gdb.mi/gdb701.exp * gdb.mi/gdb792.exp * gdb.mi/mi-breakpoint-changed.exp * gdb.mi/mi-dprintf-pending.exp * gdb.mi/mi-dprintf.exp * gdb.mi/mi-exit-code.exp * gdb.mi/mi-pending.exp * gdb.mi/mi-solib.exp * gdb.mi/new-ui-mi-sync.exp * gdb.mi/pr11022.exp * gdb.mi/user-selected-context-sync.exp * gdb.opt/solib-intra-step.exp * gdb.python/py-events.exp * gdb.python/py-finish-breakpoint.exp * gdb.python/py-mi.exp * gdb.python/py-prettyprint.exp * gdb.python/py-shared.exp * gdb.python/py-symbol.exp * gdb.python/py-template.exp * gdb.python/py-type.exp * gdb.python/py-value.exp * gdb.reverse/solib-precsave.exp * gdb.reverse/solib-reverse.exp * gdb.server/solib-list.exp * gdb.stabs/weird.exp * gdb.threads/reconnect-signal.exp * gdb.threads/stepi-random-signal.exp * gdb.trace/actions.exp * gdb.trace/ax.exp * gdb.trace/backtrace.exp * gdb.trace/change-loc.exp * gdb.trace/deltrace.exp * gdb.trace/ftrace-lock.exp * gdb.trace/ftrace.exp * gdb.trace/infotrace.exp * gdb.trace/mi-tracepoint-changed.exp * gdb.trace/packetlen.exp * gdb.trace/passcount.exp * gdb.trace/pending.exp * gdb.trace/range-stepping.exp * gdb.trace/report.exp * gdb.trace/stap-trace.exp * gdb.trace/tfind.exp * gdb.trace/trace-break.exp * gdb.trace/trace-condition.exp * gdb.trace/trace-enable-disable.exp * gdb.trace/trace-mt.exp * gdb.trace/tracecmd.exp * gdb.trace/tspeed.exp * gdb.trace/tsv.exp * lib/perftest.exp
2016-12-01Fix test names starting with uppercase using multi-line gdb_test_multipleLuis Machado2-5/+7
This fixes offender testcases that have test names starting with uppercase when using gdb_test_multiple in a multi-line construct. gdb/testsuite/ChangeLog 2016-12-01 Luis Machado <lgustavo@codesourcery.com> * gdb.cp/gdb2495.exp: Replace gdb_test_multiple with gdb_test_no_output. Use command as test name.
2016-12-01Fix test names starting with uppercase using multi-line gdb_test_no_outputLuis Machado10-18/+32
This fixes offender testcases that have test names starting with uppercase when using gdb_test_no_output in a multi-line construct. gdb/testsuite/ChangeLog 2016-12-01 Luis Machado <lgustavo@codesourcery.com> Fix test names starting with uppercase throughout the files. * gdb.ada/assign_1.exp * gdb.ada/boolean_expr.exp * gdb.base/arrayidx.exp * gdb.base/del.exp * gdb.base/gcore-buffer-overflow.exp * gdb.base/testenv.exp * gdb.compile/compile.exp * gdb.python/py-framefilter-invalidarg.exp * gdb.python/py-framefilter.exp