aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-08-07remote-sim.c: Fix arg variables conflictsSimon Marchi2-4/+8
The recent change introducing gdb_argv introduced some build failures in remote-sim.c. /home/emaisin/src/binutils-gdb/gdb/remote-sim.c: In function 'void gdbsim_load(target_ops*, const char*, int)': /home/emaisin/src/binutils-gdb/gdb/remote-sim.c:573:22: error: conflicting declaration 'gdb_argv argv' gdb_argv argv (args); ^ /home/emaisin/src/binutils-gdb/gdb/remote-sim.c:565:10: note: previous declaration as 'char** argv' char **argv; ^~~~ /home/emaisin/src/binutils-gdb/gdb/remote-sim.c: In function 'void gdbsim_open(const char*, int)': /home/emaisin/src/binutils-gdb/gdb/remote-sim.c:730:25: error: declaration of 'gdb_argv args' shadows a parameter gdb_argv args (arg_buf); In gdbsim_load, the new gdb_argv object conflicts with old char **argv variable. I think the old variable should be removed. In gdbsim_open, the new gdb_argv object conflicts with the args parameter. This patch renames it to argv. Built-tested for a mips host. gdb/ChangeLog: * remote-sim.c (gdbsim_load): Remove char **argv local variable. (gdbsim_open): Rename gdb_argv args object to argv.
2017-08-07Do not choose a non-ELF format input file to hold the linker created GOT ↵Nick Clifton3-17/+37
sections. PR 21884 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj has not been set then use the bfd returned by _bfd_elf_link_setup_gnu_properties. If that is null then search through all the input bfds selecting the first normal, ELF format one. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2017-08-07Automatic date update in version.inGDB Administrator1-1/+1
2017-08-06x86: Lookup __tls_get_addr or ___tls_get_addr onceH.J. Lu3-58/+70
Instead of checking if a symbol is __tls_get_addr or ___tls_get_addr, we check if there is a reference to __tls_get_addr or ___tls_get_addr before starting relocation check. * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr to 1 bit. (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0. (elf_i386_check_tls_transition): Check tls_get_addr directly. (elf_i386_convert_load_reloc): Update tls_get_addr check. (elf_i386_link_check_relocs): New function. (bfd_elf32_bfd_link_check_relocs): New. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr to 1 bit. (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0. (elf_x86_64_check_tls_transition): Check tls_get_addr directly. (elf_x86_64_convert_load_reloc): Update tls_get_addr check. (elf_x86_64_link_check_relocs): New function. (bfd_elf64_bfd_link_check_relocs): New. (bfd_elf32_bfd_link_check_relocs): Likewise.
2017-08-06Treat common symbol as undefined for --no-define-commonH.J. Lu16-6/+82
When --no-define-common is used to build shared library, treat common symbol as undefined so that common symbols that are referenced from a shared library to be assigned addresses only in the main program. This eliminates the unused duplicate space in the shared library, and also prevents any possible confusion over resolving to the wrong duplicate when there are many dynamic modules with specialized search paths for runtime symbol resolution. --no-define-common is only allowed when building a shared library. bfd/ PR ld/21903: * elflink.c (elf_link_add_object_symbols): Treat common symbol as undefined for --no-define-common. include/ PR ld/21903: * bfdlink.h (bfd_link_info): Add inhibit_common_definition. ld/ PR ld/21903: * ld.h (command_line): Remove inhibit_common_definition. * ldgram.y: Replace command_line.inhibit_common_definition with link_info.inhibit_common_definition. * ldlang.c (lang_common): Likewise. * lexsup.c (parse_args): Likewise. * ldmain.c (main): Only allow --no-define-common with -shared. * testsuite/ld-elf/pr21903.s: New file. * testsuite/ld-elf/pr21903a.d: Likewise. * testsuite/ld-elf/pr21903b.d: Likewise. * testsuite/ld-elf/pr21903c.d: Likewise. * testsuite/ld-elf/pr21903d.d: Likewise. * testsuite/ld-elf/pr21903e.d: Likewise.
2017-08-06Automatic date update in version.inGDB Administrator1-1/+1
2017-08-05Use gdb::unique_xmalloc_ptr when calling tilde_expandTom Tromey12-203/+129
This patch changes most sites calling tilde_expand to use gdb::unique_xmalloc_ptr, rather than a cleanup. It also changes scan_expression_with_cleanup to return a unique pointer, because the patch was already touching code in that area. Regression tested on the buildbot. ChangeLog 2017-08-05 Tom Tromey <tom@tromey.com> * compile/compile-object-load.c (compile_object_load): Use gdb::unique_xmalloc_ptr. * cli/cli-dump.c (scan_filename): Rename from scan_filename_with_cleanup. Change return type. (scan_expression): Rename from scan_expression_with_cleanup. Change return type. (dump_memory_to_file, dump_value_to_file, restore_command): Use gdb::unique_xmalloc_ptr. Update. * cli/cli-cmds.c (find_and_open_script): Use gdb::unique_xmalloc_ptr. * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr. * symmisc.c (maintenance_print_symbols) (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr. * symfile.c (symfile_bfd_open, generic_load) (add_symbol_file_command, remove_symbol_file_command): Use gdb::unique_xmalloc_ptr. * source.c (openp): Use gdb::unique_xmalloc_ptr. * psymtab.c (maintenance_print_psymbols): Use gdb::unique_xmalloc_ptr. * corelow.c (core_open): Use gdb::unique_xmalloc_ptr. * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr. * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr. (reload_shared_libraries_1): Likewise.
2017-08-05Fix Rust test suite for 1.20 betaTom Tromey2-3/+8
I ran the gdb.rust tests against Rust 1.20 (beta) and saw a few failures. The failures all came because a particular item moved to a different module. Since the particular choice of module name isn't important here, I simply widened the allowable results. Tested locally against rustc 1.19, 1.20, and 1.21. testsuite/ChangeLog 2017-08-05 Tom Tromey <tom@tromey.com> * gdb.rust/simple.exp: Allow String to appear in a different namespace.
2017-08-05Remove cleanups from Rust parserTom Tromey2-162/+202
This removes the few remaining cleanups in the Rust language code. The main difficulty here was that the earlier code allocated VEC heads on an obstack. The new code instead introduces an object that allocates and maintains the storage for whatever vectors are needed during the parse. Regression tested on the buildbot. ChangeLog 2017-08-05 Tom Tromey <tom@tromey.com> * rust-exp.y (rust_op_ptr, set_field): Remove typedefs. (rust_op_vector, rust_set_vector): New typedefs. (current_parser): New global. (work_obstack): Change to pointer type. Update all users. (rust_ast, pstate): Remove globals. (struct rust_parser): New. (%union) <params, field_inits>: Change type. (start, tuple_expr, unit_expr, struct_expr_list, literal) (field_expr, expr_list, maybe_expr_list, type_list): Update. (ast_call_ish, ast_path, ast_function_type, ast_tuple_type) (convert_params_to_types, convert_params_to_expression): Change type of "params". (ast_string): Change type of "fields". (rust_parse): Make a rust_parser. Remove cleanups. (rust_lex_tests): Make and install an auto_obstack.
2017-08-05Don't fail in elf32_hppa_set_gpAlan Modra4-10/+17
The base bfd_link_hash_table works fine here, the only thing to watch out for is to only set elf_gp if the output is ELF. bfd/ * elf32-hppa.c (elf32_hppa_set_gp): Don't require an hppa_link_hash_table. ld/ * testsuite/ld-unique/pr21529.d: Don't xfail hppa.
2017-08-05Automatic date update in version.inGDB Administrator1-1/+1
2017-08-04Unbreak GDBserver build for x32Yao Qi3-3/+12
When I verify my target description changes, I build GDB and GDBserver for x32, but it failed. /../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c ../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘const target_desc* get_ipa_tdesc(int)’: ../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:184:10: error: ‘X86_TDESC_AVX512’ was not declared in this scope case X86_TDESC_AVX512: ^ ../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:185:14: error: ‘tdesc_x32_avx512_linux’ was not declared in this scope return tdesc_x32_avx512_linux; ^ ../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c: In function ‘void initialize_low_tracepoint()’: ../../../binutils-gdb/gdb/gdbserver/linux-amd64-ipa.c:282:36: error: ‘init_registers_x32_avx512_linux’ was not declared in this scope init_registers_x32_avx512_linux (); ^ ipa_x32_linux_regobj use to be there, but removed by 22049425ce40324139be82d9a6ec518c46b65815 by mistake. gdb/gdbserver: 2017-08-04 Yao Qi <yao.qi@linaro.org> * configure.srv (ipa_x32_linux_regobj): New. * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512 instead of X86_TDESC_AVX512. (initialize_low_tracepoint): Call init_registers_x32_avx_avx512_linux.
2017-08-04Add namespace std to nullptr_tYao Qi2-2/+6
This patch fixes the build failure for target i686-w64-mingw32, In file included from ../../binutils-gdb/gdb/defs.h:786:0, from ../../binutils-gdb/gdb/gdb.c:19: ../../binutils-gdb/gdb/utils.h:188:20: error: ‘nullptr_t’ has not been declared bool operator!= (nullptr_t) ^ ../../binutils-gdb/gdb/utils.h:193:20: error: ‘nullptr_t’ has not been declared bool operator== (nullptr_t) ^ gdb: 2017-08-04 Yao Qi <yao.qi@linaro.org> * utils.h (gdb_argv): Add namespace std for nullptr_t.
2017-08-04Add a testcase for "ld -d"H.J. Lu3-0/+17
"ld -d" assigns space to common symbols even if a relocatable output file is specified (with '-r'). PR ld/21904 * testsuite/ld-elf/pr21904.d: New file. * testsuite/ld-elf/pr21904.s: Likewise.
2017-08-03Add --no-relax option.James Clarke2-1/+7
gold/ * options.h (General_options): Set a non-NULL second help string argument for relax to allow --no-relax.
2017-08-04Automatic date update in version.inGDB Administrator1-1/+1
2017-08-03Add myself as a write-after-approval GDB maintainer.Ruslan Kabatsayev2-0/+5
2017-08-03Remove make_cleanup_freeargv and gdb_buildargvTom Tromey3-31/+6
After the previous patches in this series, make_cleanup_freeargv and gdb_buildargv are now unused and can be removed. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv): Remove. * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2017-08-03Use gdb_argv in PythonTom Tromey2-17/+11
This changes one spot in the Python code to use gdb_argv. This removes the last cleanup from the Python layer. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * python/py-param.c (compute_enum_values): Use gdb_argv.
2017-08-03Introduce gdb_argv, a class wrapper for buildargvTom Tromey24-249/+289
This introduces gdb_argv, a class wrapping an "argv" pointer; that is, a pointer to a NULL-terminated array of char*, where both the array and each non-NULL element in the array are xmalloc'd. This patch then changes most users of gdb_buildargv to use gdb_argv instead. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * utils.h (struct gdb_argv_deleter): New. (gdb_argv): New class. * utils.c (gdb_argv::reset): New method. * tracepoint.c (delete_trace_variable_command): Use gdb_argv. * tracefile.c (tsave_command): Use gdb_argv. * top.c (new_ui_command): Use gdb_argv. * symmisc.c (maintenance_print_symbols) (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv. * symfile.c (symbol_file_command, generic_load) (remove_symbol_file_command): Use gdb_argv. * stack.c (backtrace_command): Use gdb_argv. * source.c (add_path, show_substitute_path_command) (unset_substitute_path_command, set_substitute_path_command): Use gdb_argv. * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv. * ser-mingw.c (pipe_windows_open): Use gdb_argv. * remote.c (extended_remote_run, remote_put_command) (remote_get_command, remote_delete_command): Use gdb_argv. * remote-sim.c (gdbsim_load, gdbsim_create_inferior) (gdbsim_open): Use gdb_argv. * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv. * psymtab.c (maintenance_print_psymbols): Use gdb_argv. * procfs.c (procfs_info_proc): Use gdb_argv. * interps.c (interpreter_exec_cmd): Use gdb_argv. * infrun.c (handle_command): Use gdb_argv. * inferior.c (add_inferior_command, clone_inferior_command): Use gdb_argv. * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv. * exec.c (exec_file_command): Use gdb_argv. * cli/cli-cmds.c (alias_command): Use gdb_argv. * compile/compile.c (build_argc_argv): Use gdb_argv.
2017-08-03Remove a cleanup in PythonTom Tromey2-23/+11
This removes cleanups from gdbpy_decode_line, in favor of a use of unique_xmalloc_ptr. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2017-08-03Avoid some manual memory management in PythonTom Tromey4-42/+29
This changes a few places in the Python code to avoid manual memory management, in favor of letting std::string do the work. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * python/python.c (compute_python_string): Return std::string. (gdbpy_eval_from_control_command): Update. (do_start_initialization): Use std::string. * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not xstrprintf. * python/py-breakpoint.c (local_setattro): Use string_printf, not xstrprintf.
2017-08-03Replace do_restore_instream_cleanup with scoped_restoreTom Tromey4-23/+11
This changes the users of do_restore_instream_cleanup to use a scoped_restore instead. This patch is broken out because it warrants some additional attention: in particular it's unclear to me whether current_ui can change in the body of these functions -- but if it can, then the cleanup would have modified a different UI's instream member. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * top.h (do_restore_instream_cleanup): Remove. * top.c (do_restore_instream_cleanup): Remove. (read_command_file): Use scoped_restore. * cli/cli-script.c (execute_user_command): Use scoped_restore.
2017-08-03Use a scoped_restore for command_nest_depthTom Tromey2-6/+11
This changes a couple of places to use a scoped_restore when manipulating command_nest_depth. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * cli/cli-script.c (execute_user_command) (execute_control_command): Use scoped_restore.
2017-08-03Remove user_call_depthTom Tromey2-15/+8
This changes execute_user_command to remove user_call_depth, using the size of user_args_stack instead. This avoids a cleanup. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * cli/cli-script.c (do_restore_user_call_depth): Remove. (execute_user_command): Remove user_call_depth; use user_args_stack's size instead.
2017-08-03Remove in_user_commandTom Tromey4-11/+7
While working on the next patch in this series, I found that the global in_user_command is not used. This patch removes it. (I didn't think to check Insight until submitting this series; and it's not very convenient to do so, so if someone has it checked out and could look at it, that would be nice.) ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * top.h (in_user_command): Remove. * top.c (in_user_command): Remove. * cli/cli-script.c (do_restore_user_call_depth) (execute_user_command): Update.
2017-08-03Use containers to avoid cleanupsTom Tromey10-108/+63
This patch introduces the use of various containers -- std::vector, std::string, or gdb::byte_vector -- in several spots in gdb that were using xmalloc and a cleanup. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * valops.c (search_struct_method): Use gdb::byte_vector. * valarith.c (value_concat): Use std::vector. * target.c (memory_xfer_partial): Use gdb::byte_vector. (simple_search_memory): Likewise. * printcmd.c (find_string_backward): Use gdb::byte_vector. * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector. * gcore.c (gcore_copy_callback): Use gdb::byte_vector. * elfread.c (elf_rel_plt_read): Use std::string. * cp-valprint.c (cp_print_value): Use gdb::byte_vector. * cli/cli-dump.c (restore_section_callback): Use gdb::byte_vector.
2017-08-03Use unique_xmalloc_ptr in jit.cTom Tromey2-14/+9
This removes some cleanups from jit.c by using unique_xmalloc_ptr instead. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2017-08-03Replace tui_restore_gdbout with scoped_restoreTom Tromey2-20/+11
This patch replaces tui_restore_gdbout (a cleaup function) with a use of scoped_restore. This one is broken out into its own patch because it might slightly change the behavior of gdb: it saves and restores pagination_enabled, whereas the tui_restore_gdbout unconditionally set pagination_enabled to 1; and I think this warrants closer review. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * tui/tui-regs.c (tui_restore_gdbout): Remove. (tui_register_format): Use scoped_restore.
2017-08-03More uses of scoped_restoreTom Tromey5-115/+56
There were a few more places in gdb that could easily use scoped_restore, replacing some cleanups. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * reverse.c (exec_direction_default): Remove. (exec_reverse_once): Use scoped_restore. * remote.c (restore_remote_timeout): Remove. (remote_flash_erase, remote_flash_write, remote_flash_done) (readchar, remote_serial_write): Use scoped_restore. * cli/cli-script.c (struct source_cleanup_lines_args) (source_cleanup_lines): Remove. (script_from_file): Use scoped_restore. * cli/cli-cmds.c (source_verbose_cleanup): Remove. (source_command): Use scoped_restore.
2017-08-03Remove make_cleanup_free_soTom Tromey5-39/+26
make_cleanup_free_so is used in a single spot. This patch introduces a unique pointer wrapper for struct so_list, and changes this spot to use it. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * utils.h (make_cleanup_free_so): Remove. * utils.c (do_free_so, make_cleanup_free_so): Remove. * solist.h (struct so_deleter): New. (so_list_up): New typedef. * solib-svr4.c (svr4_read_so_list): Use so_list_up.
2017-08-03Remove make_cleanup_restore_current_languageTom Tromey6-36/+47
This patch replaces make_cleanup_restore_current_language with an RAII class that saves the current language, and restores it when the object is destroyed. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * utils.h (make_cleanup_restore_current_language): Remove. * utils.c (do_restore_current_language) (make_cleanup_restore_current_language): Remove. * parse.c (parse_exp_in_context_1) (parse_expression_with_language): Use scoped_restore_current_language. * mi/mi-main.c (mi_cmd_execute): Use scoped_restore_current_language. * language.h (scoped_restore_current_language): New class.
2017-08-03Remove an unlink cleanupTom Tromey2-19/+25
compile/compile.c had its own cleanup to unlink a file. This patch replaces this cleanup with gdb::unlinker. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * compile/compile.c (cleanup_unlink_file): Remove. (compile_to_object): Use gdb::unlinker. (eval_compile_command): Likewise.
2017-08-03Remove make_cleanup_fcloseTom Tromey3-20/+5
After the preceding patches, make_cleanup_fclose is no longer used, so remove it. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * utils.h (make_cleanup_fclose): Remove. * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
2017-08-03Change open_terminal_stream to return a gdb_file_upTom Tromey2-12/+17
This changes open_terminal_stream to return a gdb_file_up, eliminating another use of make_cleanup_fclose. Arguably perhaps new_ui should take ownership of the files using a move, but there is at least one spot where this isn't appropriate (or at least not currently done), so I elected to use a more minimal approach. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * top.c (open_terminal_stream): Return gdb_file_up. (new_ui_command): Update.
2017-08-03Use gdb_file_up in source.cTom Tromey2-29/+21
This changes some functions in source.c to use gdb_file_up. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * source.c (print_source_lines_base, forward_search_command) (reverse_search_command): Use gdb_file_up.
2017-08-03Use gdb_file_up in fbsd-nat.cTom Tromey2-4/+6
This updates fbsd-nat.c to use gdb_file_up. This removes a use of a cleanup, and helps remove make_cleanup_fclose in a later patch. I have no way to test this patch. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * fbsd-nat.c (fbsd_find_memory_regions): Update.
2017-08-03Change return type of find_and_open_scriptTom Tromey4-43/+59
This changes find_and_open_script to return a gdb::optional<open_script>, where open_script is a new type encapsulating the two return values. The new type helps avoid cleanups in the callers. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * cli/cli-cmds.c (find_and_open_script): Change return type. Remove "streamp" and "full_path" parameters. (source_script_with_search): Update. * auto-load.c (source_script_file): Update. * cli/cli-cmds.h (find_and_open_script): Change type. (open_script): New struct.
2017-08-03Introduce and use gdb_file_upTom Tromey15-153/+112
This introduces gdb_file_up, a unique pointer holding a FILE*, and then changes some code in gdb to use it. In particular gdb_fopen_cloexec now returns a gdb_file_up. This allow removing some cleanups. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * xml-support.c (xml_fetch_content_from_file): Update. * ui-file.c (stdio_file::open): Update. * tracefile-tfile.c (tfile_start): Update. * remote.c (remote_file_put, remote_file_get): Update. * nat/linux-procfs.c (linux_proc_get_int) (linux_proc_pid_get_state, linux_proc_tid_get_name): Update. * nat/linux-osdata.c (linux_common_core_of_thread): Update. (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus) (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem) (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update. * nat/linux-btrace.c (linux_determine_kernel_start): Update. * linux-nat.c (linux_proc_pending_signals): Update. * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up. (file_closer): Remove. * compile/compile.c (compile_to_object): Update. * common/filestuff.h (struct gdb_file_deleter): New. (gdb_file_up): New typedef. (gdb_fopen_cloexec): Change return type. * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up. * cli/cli-dump.c (fopen_with_cleanup): Remove. (dump_binary_file, restore_binary_file): Update. * auto-load.c (auto_load_objfile_script_1): Update.
2017-08-03Introduce and use ui_out_emit_tableTom Tromey14-196/+212
This introduces ui_out_emit_table, similar to the other existing ui_out RAII classes, and then uses it in a number of places. This replaces some cleanups. ChangeLog 2017-08-03 Tom Tromey <tom@tromey.com> * tracepoint.c (tvariables_info_1): Use ui_out_emit_table. (info_static_tracepoint_markers_command): Likewise. * solib.c (info_sharedlibrary_command): Use ui_out_emit_table. * skip.c (skip_info): Use ui_out_emit_table. * progspace.c (print_program_space): Use ui_out_emit_table. * osdata.c (info_osdata): Use ui_out_emit_table. * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use ui_out_emit_table. * linux-thread-db.c (info_auto_load_libthread_db): Use ui_out_emit_table. * inferior.c (print_inferior): Use ui_out_emit_table. * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table. * breakpoint.c (breakpoint_1): Use ui_out_emit_table. * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table. * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table. * ui-out.h (class ui_out_emit_table): New.
2017-08-03Add more targets to the list of architectures not supporting format changing ↵Nick Clifton5-19/+67
during linking. Fix seg-faults triggered when this is attempted. PR ld/21884 * testsuite/ld-elf/pr21884.d: Add AVR, HPPA, IA64, M68HC1x and SCORE to list of targets not supporting file format changes during linking. * testsuite/ld-unique/pr21529.d: Likewise. * emultempl/avrelf.em (_before_allocation): Skip for non-ELF output formats. (avr_elf_create_output_section_statements): Fail if the output format is not ELF. (avr_finish): Do not access the ELF header in non-ELF format output bfds. * emultempl/m68hc1xelf.em (_before_allocation): Skip for non-ELF output formats. (m68hc11elf_create_output_section_statements): Fail if the putput format is not ELF. (m68hc11elf_after_allocation): Skip for non-ELF output formats.
2017-08-03ELF checks for orphan placementAlan Modra2-29/+55
The loop checking for previous orphan placement should run even when the output is non-ELF. PR ld/21884 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Revert last change. Rename iself to elfinput. Expand comments. Condition ELF checks on having both input and output ELF files. Extract.. (elf_orphan_compatible): ..this new function.
2017-08-03Automatic date update in version.inGDB Administrator1-1/+1
2017-08-02MIPS: Factor out FPU type naming in `gdbarch' debugMaciej W. Rozycki2-8/+25
Replace chains of conditional expressions used in target-dependent MIPS `gdbarch' debug output to get a textual name of the FPU type with calls to a helper decoder function, improving code readability. No functional change. gdb/ * mips-tdep.c (mips_fpu_type_str): New function. (mips_dump_tdep): Call it.
2017-08-02Check ELF section header only for ELF outputH.J. Lu6-1/+40
When placing an orphan input section, check ELF section header only for ELF output. PR ld/21884 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Check ELF section header only for ELF output. * testsuite/ld-elf/pr21884.d: New test. * testsuite/ld-elf/pr21884.t: Likewise. * testsuite/ld-elf/pr21884a.s: Likewise. * testsuite/ld-elf/pr21884b.s: Likewise.
2017-08-02Revert the last change to emultempl/elf32.emH.J. Lu2-2/+4
It will be replaced by a different fix. * emultempl/elf32.em (_place_orphan): Revert the last change.
2017-08-02Add support for creating archives of slim-LTO modules using MRi script commands.Nick Clifton2-4/+15
PR 21702 * arsup.c (ar_addmod): Add plugin support for the MRI ADDMOD command.
2017-08-02Fix assertion failure for xtensa linker.Max Filippov2-1/+6
* emultempl/xtensaelf.em (xtensa_wild_group_interleave_callback): Only check for by_name sorting.
2017-08-02Fix seg-fault when trying to place non-ELF orphan sections.Nick Clifton2-0/+8
PR 21884 * emultempl/elf32.em (_place_orphan): Skip non-ELF binaries when looking for sections to merge.
2017-08-02Fix potential illegal memory access in Xtensa port.Max Filippov2-1/+7
* xtensa-isa.c (xtensa_isa_init): Don't update lookup table entries for sysregs with negative indices.