+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
+ features/i386/*.c.
+ (amd64_linux_read_description): Call
+ amd64_create_target_description.
+ * arch/amd64.c: New file.
+ * arch/amd64.h: New file.
+ * configure.tgt (x86_64-*-linux*): Append amd64.o.
+ * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
+ x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
+ (amd64_linux_read_description): Create target descriptions.
+ (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
+ functions. Add unit tests.
+ * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
+ x32-core.xml.
+ * features/i386/64bit-avx.c: Generated.
+ * features/i386/64bit-avx512.c: Generated.
+ * features/i386/64bit-core.c: Generated.
+ * features/i386/64bit-linux.c: Generated.
+ * features/i386/64bit-mpx.c: Generated.
+ * features/i386/64bit-pkeys.c: Generated.
+ * features/i386/64bit-segments.c: Generated.
+ * features/i386/64bit-sse.c: Generated.
+ * features/i386/x32-core.c: Generated.
+ * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
+ c files for amd64-linux and x32-linux.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * amd64-linux-tdep.c (amd64_linux_read_description): New
+ function.
+ (amd64_linux_core_read_description): Call
+ amd64_linux_read_description.
+ (amd64_linux_init_abi): Likewise.
+ (amd64_x32_linux_init_abi): Likewise.
+ * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
+ * x86-linux-nat.c (x86_linux_read_description): Call
+ amd64_linux_read_description.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
+ comments.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
+ * features/i386/i386-avx-avx512-linux.c: Remove.
+ * features/i386/i386-avx-linux.c: Remove.
+ * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
+ * features/i386/i386-avx-mpx-linux.c: Remove.
+ * features/i386/i386-linux.c: Remove.
+ * features/i386/i386-mmx-linux.c: Remove.
+ * features/i386/i386-mpx-linux.c: Remove.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * Makefile.in (ALL_TARGET_OBS): Add i386.o.
+ (SFILES): Add arch/i386.c.
+ (HFILES_NO_SRCDIR): Add arch/i386.h.
+ * arch/i386.c: New file.
+ * arch/i386.h: New file.
+ * arch/tdesc.h (allocate_target_description): Declare.
+ (set_tdesc_architecture): Declare.
+ (set_tdesc_osabi): Declare.
+ * configure.tgt (i[34567]86-*-linux*): Add i386.o.
+ * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
+ include arch/i386.h.
+ (i386_linux_read_description): Remove code and call
+ i386_create_target_description.
+ (set_tdesc_architecture): New function.
+ (set_tdesc_osabi): New function.
+ * target-descriptions.h (allocate_target_description): Remove.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
+ * target-descriptions.c (tdesc_create_feature): Likewise, and
+ adjust code.
+ * features/i386/32bit-avx.c: Re-generated.
+ * features/i386/32bit-avx512.c: Re-generated.
+ * features/i386/32bit-core.c: Re-generated.
+ * features/i386/32bit-linux.c: Re-generated.
+ * features/i386/32bit-mpx.c: Re-generated.
+ * features/i386/32bit-pkeys.c: Re-generated.
+ * features/i386/32bit-sse.c: Re-generated.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * regformats/regdef.h (struct reg): Override operator == and !=.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * arch/tdesc.h: New file.
+ * regformats/regdat.sh: Generate code using tdesc_create_reg.
+ * target-descriptions.c: Update comments.
+ * target-descriptions.h: Include "arch/tdesc.h". Remove the
+ declarations.
+ * features/i386/32bit-avx.c: Re-generated.
+ * features/i386/32bit-avx512.c: Re-generated.
+ * features/i386/32bit-core.c: Re-generated.
+ * features/i386/32bit-linux.c: Re-generated.
+ * features/i386/32bit-mpx.c: Re-generated.
+ * features/i386/32bit-pkeys.c: Re-generated.
+ * features/i386/32bit-sse.c: Re-generated.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * regformats/regdat.sh: Update generated code.
+
+2017-09-05 Yao Qi <yao.qi@linaro.org>
+
+ * regformats/regdat.sh: Adjust code order.
+
+2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
+
+ * expprint.c (dump_subexp_body_standard): Use constant format
+ string in fprintf_filtered call.
+
+2017-09-04 John Baldwin <jhb@FreeBSD.org>
+
+ * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
+ NetBSD/i386.
+ * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
+
+2017-09-04 John Baldwin <jhb@FreeBSD.org>
+
+ * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
+
+2017-09-04 John Baldwin <jhb@FreeBSD.org>
+
+ * bsd-kvm.o: Define _KMEMUSER.
+ * configure.ac: Define _KMEMUSER when checking for "struct lwp".
+ * configure: Regenerate.
+
+2017-09-04 John Baldwin <jhb@FreeBSD.org>
+
+ * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
+ * i386-fbsd-nat.c: Likewise.
+
+2017-09-04 John Baldwin <jhb@FreeBSD.org>
+
+ * unittests/array-view-selftests.c: Add include of <array>.
+
+2017-09-04 John Baldwin <jhb@FreeBSD.org>
+
+ * spu-tdep.c (flush_ea_cache): Add missing argument to
+ call_function_by_hand.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * NEWS (Safer support for debugging with no debug info): New.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * c-exp.y (function_method, function_method_void): Add current
+ instance flags to TYPE_INSTANCE.
+ * dwarf2read.c (check_modifier): New.
+ (compute_delayed_physnames): Assert that only C++ adds delayed
+ physnames. Mark fn_fields as const/volatile depending on
+ physname.
+ * eval.c (make_params): New type_instance_flags parameter. Use
+ it as the new type's instance flags.
+ (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
+ flags element and pass it to make_params.
+ * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
+ instance flags element.
+ (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
+ * gdbtypes.h: Include "enum-flags.h".
+ (type_instance_flags): New enum-flags type.
+ (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
+ (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
+ * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
+ (follow_type_instance_flags): New function.
+ (operator_check_standard) <TYPE_INSTANCE>: Adjust.
+ * parser-defs.h (follow_type_instance_flags): Declare.
+ * valops.c (value_struct_elt_for_reference): const/volatile must
+ match too.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * cp-namespace.c (cp_search_static_and_baseclasses): Handle
+ function/method scopes; lookup the nested name as a function local
+ static variable.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ (%type <voidval>): Add function_method.
+ * c-exp.y (exp): New production for calls with no arguments.
+ (function_method, function_method_void_or_typelist): New
+ productions.
+ (exp): New production for "method()::static_var".
+ * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
+ * expprint.c (print_subexp_standard, dump_subexp_body_standard):
+ Handle OP_FUNC_STATIC_VAR.
+ * parse.c (operator_length_standard):
+ Handle OP_FUNC_STATIC_VAR.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
+ handling.
+ * expprint.c (print_subexp_standard, dump_subexp_body_standard):
+ Ditto.
+ * parse.c (operator_length_standard, operator_check_standard):
+ Ditto.
+ * std-operator.def (UNOP_MEMVAL_TLS): Delete.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * ax-gdb.c: Include "typeprint.h".
+ (gen_expr_for_cast): New function.
+ (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
+ <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
+ type is unknown.
+ * dwarf2read.c (new_symbol_full): Fallback to int instead of
+ nodebug_data_symbol.
+ * eval.c: Include "typeprint.h".
+ (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
+ Error out if symbol has unknown type.
+ <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
+ evaluate_subexp_for_cast.
+ (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
+ OP_VAR_MSYM_VALUE.
+ (evaluate_subexp_for_cast): New function.
+ * gdbtypes.c (init_nodebug_var_type): New function.
+ (objfile_type): Use it to initialize types of variables with no
+ debug info.
+ * typeprint.c (error_unknown_type): New.
+ * typeprint.h (error_unknown_type): New declaration.
+ * compile/compile-c-types.c (convert_type_basic): Handle
+ TYPE_CODE_ERROR; warn and fallback to int for variables with
+ unknown type.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * eval.c (evaluate_var_value): New function, factored out from ...
+ (evaluate_subexp_standard): ... here.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
+ Remove useless assignments to 'op'.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * eval.c (eval_skip_value): New function.
+ (evaluate_subexp_standard): Use it.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
+ function name from symbol/minsym and pass it to
+ error_call_unknown_return_type.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
+ * ax-gdb.c (gen_msym_var_ref): New function.
+ (gen_expr): Handle OP_VAR_MSYM_VALUE.
+ * eval.c (evaluate_var_msym_value): New function.
+ * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
+ <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
+ to call_function_by_hand.
+ * expprint.c (print_subexp_standard, dump_subexp_body_standard):
+ Handle OP_VAR_MSYM_VALUE.
+ (union exp_element) <msymbol>: New field.
+ * minsyms.h (struct type): Forward declare.
+ (find_minsym_type_and_address): Declare.
+ * parse.c (write_exp_elt_msym): New function.
+ (write_exp_msymbol): Delete, refactored as ...
+ (find_minsym_type_and_address): ... this new function.
+ (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
+ (operator_length_standard, operator_check_standard): Handle
+ OP_VAR_MSYM_VALUE.
+ * std-operator.def (OP_VAR_MSYM_VALUE): New.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
+ TYPE_GNU_IFUNC specially here. Throw error if return type is
+ unknown.
+ * ada-typeprint.c (print_func_type): Handle functions with unknown
+ return type.
+ * c-typeprint.c (c_type_print_base): Handle functions and methods
+ with unknown return type.
+ * compile/compile-c-symbols.c (convert_symbol_bmsym)
+ <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
+ * compile/compile-c-types.c: Include "objfiles.h".
+ (convert_func): For functions with unknown return type, warn and
+ default to int.
+ * compile/compile-object-run.c (compile_object_run): Adjust call
+ to call_function_by_hand_dummy.
+ * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
+ call_function_by_hand.
+ * eval.c (evaluate_subexp_standard): Adjust calls to
+ call_function_by_hand. Handle functions and methods with unknown
+ return type. Pass expect_type to call_function_by_hand.
+ * f-typeprint.c (f_type_print_base): Handle functions with unknown
+ return type.
+ * gcore.c (call_target_sbrk): Adjust call to
+ call_function_by_hand.
+ * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
+ return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
+ an integer address type instead of nodebug.
+ * guile/scm-value.c (gdbscm_value_call): Adjust call to
+ call_function_by_hand.
+ * infcall.c (error_call_unknown_return_type): New function.
+ (call_function_by_hand): New "default_return_type" parameter.
+ Pass it down.
+ (call_function_by_hand_dummy): New "default_return_type"
+ parameter. Use it instead of defaulting to int. If there's no
+ default and the return type is unknown, throw an error. If
+ there's a default return type, and the called function has no
+ debug info, then assume the function is prototyped.
+ * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
+ New "default_return_type" parameter.
+ (error_call_unknown_return_type): New declaration.
+ * linux-fork.c (call_lseek): Cast return type of lseek.
+ (inferior_call_waitpid, checkpoint_command): Adjust calls to
+ call_function_by_hand.
+ * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
+ calls to call_function_by_hand.
+ * m2-typeprint.c (m2_procedure): Handle functions with unknown
+ return type.
+ * objc-lang.c (lookup_objc_class, lookup_child_selector)
+ (value_nsstring, print_object_command): Adjust calls to
+ call_function_by_hand.
+ * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
+ functions with unknown return type.
+ (pascal_type_print_func_varspec_suffix): New function.
+ (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
+ TYPE_CODE_METHOD>: Use it.
+ * python/py-value.c (valpy_call): Adjust call to
+ call_function_by_hand.
+ * rust-lang.c (rust_evaluate_funcall): Adjust call to
+ call_function_by_hand.
+ * valarith.c (value_x_binop, value_x_unop): Adjust calls to
+ call_function_by_hand.
+ * valops.c (value_allocate_space_in_inferior): Adjust call to
+ call_function_by_hand.
+ * typeprint.c (type_print_unknown_return_type): New function.
+ * typeprint.h (type_print_unknown_return_type): New declaration.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * gdbtypes.c (lookup_function_type_with_arguments): Mark function
+ types with more than one parameter as prototyped.
+
+2017-09-04 Pedro Alves <palves@redhat.com>
+
+ * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
+ (disassemble_command): Use gdb_disassembly_flags instead of bare
+ int.
+ * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
+ (dump_insns, do_mixed_source_and_assembly_deprecated)
+ (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
+ Use gdb_disassembly_flags instead of bare int.
+ * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
+ (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
+ (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
+ (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
+ (enum gdb_disassembly_flag): ... values of this new enumeration.
+ (gdb_disassembly_flags): Define.
+ (gdb_disassembly)
+ (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
+ * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
+ gdb_disassembly_flags instead of bare int.
+ * record-btrace.c (btrace_insn_history)
+ (record_btrace_insn_history, record_btrace_insn_history_range)
+ (record_btrace_insn_history_from): Use gdb_disassembly_flags
+ instead of bare int.
+ * record.c (get_insn_history_modifiers, cmd_record_insn_history):
+ Use gdb_disassembly_flags instead of bare int.
+ * target-debug.h (target_debug_print_gdb_disassembly_flags):
+ Define.
+ * target-delegates.c: Regenerate.
+ * target.c (target_insn_history, target_insn_history_from)
+ (target_insn_history_range): Use gdb_disassembly_flags instead of
+ bare int.
+ * target.h: Include "disasm.h".
+ (struct target_ops) <to_insn_history, to_insn_history_from,
+ to_insn_history_range>: Use gdb_disassembly_flags instead of bare
+ int.
+ (target_insn_history, target_insn_history_from)
+ (target_insn_history_range): Use gdb_disassembly_flags instead of
+ bare int.
+
2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
* cli/cli-script.c (build_command_line): For if/while commands,