Lazily and dynamically create amd64-linux target descriptions
[external/binutils.git] / gdb / ChangeLog
1 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2
3         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5         (amd64_linux_read_description): Create target descriptions.
6         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7         functions.  Add unit tests.
8         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
9         x32-core.xml.
10         * features/i386/64bit-avx.c: Generated.
11         * features/i386/64bit-avx512.c: Generated.
12         * features/i386/64bit-core.c: Generated.
13         * features/i386/64bit-linux.c: Generated.
14         * features/i386/64bit-mpx.c: Generated.
15         * features/i386/64bit-pkeys.c: Generated.
16         * features/i386/64bit-segments.c: Generated.
17         * features/i386/64bit-sse.c: Generated.
18         * features/i386/x32-core.c: Generated.
19         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
20         c files for amd64-linux and x32-linux.
21
22 2017-09-05  Yao Qi  <yao.qi@linaro.org>
23
24         * amd64-linux-tdep.c (amd64_linux_read_description): New
25         function.
26         (amd64_linux_core_read_description): Call
27         amd64_linux_read_description.
28         (amd64_linux_init_abi): Likewise.
29         (amd64_x32_linux_init_abi): Likewise.
30         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
31         * x86-linux-nat.c (x86_linux_read_description): Call
32         amd64_linux_read_description.
33
34 2017-09-05  Yao Qi  <yao.qi@linaro.org>
35
36         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
37         comments.
38
39 2017-09-05  Yao Qi  <yao.qi@linaro.org>
40
41         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
42         * features/i386/i386-avx-avx512-linux.c: Remove.
43         * features/i386/i386-avx-linux.c: Remove.
44         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
45         * features/i386/i386-avx-mpx-linux.c: Remove.
46         * features/i386/i386-linux.c: Remove.
47         * features/i386/i386-mmx-linux.c: Remove.
48         * features/i386/i386-mpx-linux.c: Remove.
49
50 2017-09-05  Yao Qi  <yao.qi@linaro.org>
51
52         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
53         (SFILES): Add arch/i386.c.
54         (HFILES_NO_SRCDIR): Add arch/i386.h.
55         * arch/i386.c: New file.
56         * arch/i386.h: New file.
57         * arch/tdesc.h (allocate_target_description): Declare.
58         (set_tdesc_architecture): Declare.
59         (set_tdesc_osabi): Declare.
60         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
61         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
62         include arch/i386.h.
63         (i386_linux_read_description): Remove code and call
64         i386_create_target_description.
65         (set_tdesc_architecture): New function.
66         (set_tdesc_osabi): New function.
67         * target-descriptions.h (allocate_target_description): Remove.
68
69 2017-09-05  Yao Qi  <yao.qi@linaro.org>
70
71         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
72         * target-descriptions.c (tdesc_create_feature): Likewise, and
73         adjust code.
74         * features/i386/32bit-avx.c: Re-generated.
75         * features/i386/32bit-avx512.c: Re-generated.
76         * features/i386/32bit-core.c: Re-generated.
77         * features/i386/32bit-linux.c: Re-generated.
78         * features/i386/32bit-mpx.c: Re-generated.
79         * features/i386/32bit-pkeys.c: Re-generated.
80         * features/i386/32bit-sse.c: Re-generated.
81
82 2017-09-05  Yao Qi  <yao.qi@linaro.org>
83
84         * regformats/regdef.h (struct reg): Override operator == and !=.
85
86 2017-09-05  Yao Qi  <yao.qi@linaro.org>
87
88         * arch/tdesc.h: New file.
89         * regformats/regdat.sh: Generate code using tdesc_create_reg.
90         * target-descriptions.c: Update comments.
91         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
92         declarations.
93         * features/i386/32bit-avx.c: Re-generated.
94         * features/i386/32bit-avx512.c: Re-generated.
95         * features/i386/32bit-core.c: Re-generated.
96         * features/i386/32bit-linux.c: Re-generated.
97         * features/i386/32bit-mpx.c: Re-generated.
98         * features/i386/32bit-pkeys.c: Re-generated.
99         * features/i386/32bit-sse.c: Re-generated.
100
101 2017-09-05  Yao Qi  <yao.qi@linaro.org>
102
103         * regformats/regdat.sh: Update generated code.
104
105 2017-09-05  Yao Qi  <yao.qi@linaro.org>
106
107         * regformats/regdat.sh: Adjust code order.
108
109 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
110
111         * expprint.c (dump_subexp_body_standard): Use constant format
112         string in fprintf_filtered call.
113
114 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
115
116         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
117         NetBSD/i386.
118         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
119
120 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
121
122         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
123
124 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
125
126         * bsd-kvm.o: Define _KMEMUSER.
127         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
128         * configure: Regenerate.
129
130 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
131
132         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
133         * i386-fbsd-nat.c: Likewise.
134
135 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
136
137         * unittests/array-view-selftests.c: Add include of <array>.
138
139 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
140
141         * spu-tdep.c (flush_ea_cache): Add missing argument to
142         call_function_by_hand.
143
144 2017-09-04  Pedro Alves  <palves@redhat.com>
145
146         * NEWS (Safer support for debugging with no debug info): New.
147
148 2017-09-04  Pedro Alves  <palves@redhat.com>
149
150         * c-exp.y (function_method, function_method_void): Add current
151         instance flags to TYPE_INSTANCE.
152         * dwarf2read.c (check_modifier): New.
153         (compute_delayed_physnames): Assert that only C++ adds delayed
154         physnames.  Mark fn_fields as const/volatile depending on
155         physname.
156         * eval.c (make_params): New type_instance_flags parameter.  Use
157         it as the new type's instance flags.
158         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
159         flags element and pass it to make_params.
160         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
161         instance flags element.
162         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
163         * gdbtypes.h: Include "enum-flags.h".
164         (type_instance_flags): New enum-flags type.
165         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
166         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
167         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
168         (follow_type_instance_flags): New function.
169         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
170         * parser-defs.h (follow_type_instance_flags): Declare.
171         * valops.c (value_struct_elt_for_reference): const/volatile must
172         match too.
173
174 2017-09-04  Pedro Alves  <palves@redhat.com>
175
176         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
177         function/method scopes; lookup the nested name as a function local
178         static variable.
179
180 2017-09-04  Pedro Alves  <palves@redhat.com>
181
182         (%type <voidval>): Add function_method.
183         * c-exp.y (exp): New production for calls with no arguments.
184         (function_method, function_method_void_or_typelist): New
185         productions.
186         (exp): New production for "method()::static_var".
187         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
188         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
189         Handle OP_FUNC_STATIC_VAR.
190         * parse.c (operator_length_standard):
191         Handle OP_FUNC_STATIC_VAR.
192
193 2017-09-04  Pedro Alves  <palves@redhat.com>
194
195         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
196         handling.
197         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
198         Ditto.
199         * parse.c (operator_length_standard, operator_check_standard):
200         Ditto.
201         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
202
203 2017-09-04  Pedro Alves  <palves@redhat.com>
204
205         * ax-gdb.c: Include "typeprint.h".
206         (gen_expr_for_cast): New function.
207         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
208         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
209         type is unknown.
210         * dwarf2read.c (new_symbol_full): Fallback to int instead of
211         nodebug_data_symbol.
212         * eval.c: Include "typeprint.h".
213         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
214         Error out if symbol has unknown type.
215         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
216         evaluate_subexp_for_cast.
217         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
218         OP_VAR_MSYM_VALUE.
219         (evaluate_subexp_for_cast): New function.
220         * gdbtypes.c (init_nodebug_var_type): New function.
221         (objfile_type): Use it to initialize types of variables with no
222         debug info.
223         * typeprint.c (error_unknown_type): New.
224         * typeprint.h (error_unknown_type): New declaration.
225         * compile/compile-c-types.c (convert_type_basic): Handle
226         TYPE_CODE_ERROR; warn and fallback to int for variables with
227         unknown type.
228
229 2017-09-04  Pedro Alves  <palves@redhat.com>
230
231         * eval.c (evaluate_var_value): New function, factored out from ...
232         (evaluate_subexp_standard): ... here.
233
234 2017-09-04  Pedro Alves  <palves@redhat.com>
235
236         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
237         Remove useless assignments to 'op'.
238
239 2017-09-04  Pedro Alves  <palves@redhat.com>
240
241         * eval.c (eval_skip_value): New function.
242         (evaluate_subexp_standard): Use it.
243
244 2017-09-04  Pedro Alves  <palves@redhat.com>
245
246         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
247         function name from symbol/minsym and pass it to
248         error_call_unknown_return_type.
249
250 2017-09-04  Pedro Alves  <palves@redhat.com>
251
252         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
253         * ax-gdb.c (gen_msym_var_ref): New function.
254         (gen_expr): Handle OP_VAR_MSYM_VALUE.
255         * eval.c (evaluate_var_msym_value): New function.
256         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
257         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
258         to call_function_by_hand.
259         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
260         Handle OP_VAR_MSYM_VALUE.
261         (union exp_element) <msymbol>: New field.
262         * minsyms.h (struct type): Forward declare.
263         (find_minsym_type_and_address): Declare.
264         * parse.c (write_exp_elt_msym): New function.
265         (write_exp_msymbol): Delete, refactored as ...
266         (find_minsym_type_and_address): ... this new function.
267         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
268         (operator_length_standard, operator_check_standard): Handle
269         OP_VAR_MSYM_VALUE.
270         * std-operator.def (OP_VAR_MSYM_VALUE): New.
271
272 2017-09-04  Pedro Alves  <palves@redhat.com>
273
274         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
275         TYPE_GNU_IFUNC specially here.  Throw error if return type is
276         unknown.
277         * ada-typeprint.c (print_func_type): Handle functions with unknown
278         return type.
279         * c-typeprint.c (c_type_print_base): Handle functions and methods
280         with unknown return type.
281         * compile/compile-c-symbols.c (convert_symbol_bmsym)
282         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
283         * compile/compile-c-types.c: Include "objfiles.h".
284         (convert_func): For functions with unknown return type, warn and
285         default to int.
286         * compile/compile-object-run.c (compile_object_run): Adjust call
287         to call_function_by_hand_dummy.
288         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
289         call_function_by_hand.
290         * eval.c (evaluate_subexp_standard): Adjust calls to
291         call_function_by_hand.  Handle functions and methods with unknown
292         return type.  Pass expect_type to call_function_by_hand.
293         * f-typeprint.c (f_type_print_base): Handle functions with unknown
294         return type.
295         * gcore.c (call_target_sbrk): Adjust call to
296         call_function_by_hand.
297         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
298         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
299         an integer address type instead of nodebug.
300         * guile/scm-value.c (gdbscm_value_call): Adjust call to
301         call_function_by_hand.
302         * infcall.c (error_call_unknown_return_type): New function.
303         (call_function_by_hand): New "default_return_type" parameter.
304         Pass it down.
305         (call_function_by_hand_dummy): New "default_return_type"
306         parameter.  Use it instead of defaulting to int.  If there's no
307         default and the return type is unknown, throw an error.  If
308         there's a default return type, and the called function has no
309         debug info, then assume the function is prototyped.
310         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
311         New "default_return_type" parameter.
312         (error_call_unknown_return_type): New declaration.
313         * linux-fork.c (call_lseek): Cast return type of lseek.
314         (inferior_call_waitpid, checkpoint_command): Adjust calls to
315         call_function_by_hand.
316         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
317         calls to call_function_by_hand.
318         * m2-typeprint.c (m2_procedure): Handle functions with unknown
319         return type.
320         * objc-lang.c (lookup_objc_class, lookup_child_selector)
321         (value_nsstring, print_object_command): Adjust calls to
322         call_function_by_hand.
323         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
324         functions with unknown return type.
325         (pascal_type_print_func_varspec_suffix): New function.
326         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
327         TYPE_CODE_METHOD>: Use it.
328         * python/py-value.c (valpy_call): Adjust call to
329         call_function_by_hand.
330         * rust-lang.c (rust_evaluate_funcall): Adjust call to
331         call_function_by_hand.
332         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
333         call_function_by_hand.
334         * valops.c (value_allocate_space_in_inferior): Adjust call to
335         call_function_by_hand.
336         * typeprint.c (type_print_unknown_return_type): New function.
337         * typeprint.h (type_print_unknown_return_type): New declaration.
338
339 2017-09-04  Pedro Alves  <palves@redhat.com>
340
341         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
342         types with more than one parameter as prototyped.
343
344 2017-09-04  Pedro Alves  <palves@redhat.com>
345
346         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
347         (disassemble_command): Use gdb_disassembly_flags instead of bare
348         int.
349         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
350         (dump_insns, do_mixed_source_and_assembly_deprecated)
351         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
352         Use gdb_disassembly_flags instead of bare int.
353         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
354         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
355         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
356         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
357         (enum gdb_disassembly_flag): ... values of this new enumeration.
358         (gdb_disassembly_flags): Define.
359         (gdb_disassembly)
360         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
361         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
362         gdb_disassembly_flags instead of bare int.
363         * record-btrace.c (btrace_insn_history)
364         (record_btrace_insn_history, record_btrace_insn_history_range)
365         (record_btrace_insn_history_from): Use gdb_disassembly_flags
366         instead of bare int.
367         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
368         Use gdb_disassembly_flags instead of bare int.
369         * target-debug.h (target_debug_print_gdb_disassembly_flags):
370         Define.
371         * target-delegates.c: Regenerate.
372         * target.c (target_insn_history, target_insn_history_from)
373         (target_insn_history_range): Use gdb_disassembly_flags instead of
374         bare int.
375         * target.h: Include "disasm.h".
376         (struct target_ops) <to_insn_history, to_insn_history_from,
377         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
378         int.
379         (target_insn_history, target_insn_history_from)
380         (target_insn_history_range): Use gdb_disassembly_flags instead of
381         bare int.
382
383 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
384
385         * cli/cli-script.c (build_command_line): For if/while commands,
386         check whether args is empty.
387
388 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
389
390         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
391         (enum command_control_type): Likewise.
392         (struct command_line): Likewise.
393         (free_command_lines): Likewise.
394         (struct command_lines_deleter): Likewise.
395         (command_line_up): Likewise.
396         (read_command_lines): Likewise.
397         (read_command_lines_1): Likewise.
398         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
399         (enum command_control_type): Likewise.
400         (struct command_line): Likewise.
401         (free_command_lines): Likewise.
402         (struct command_lines_deleter): Likewise.
403         (command_line_up): Likewise.
404         (read_command_lines): Likewise.
405         (read_command_lines_1): Likewise.
406         * breakpoint.h: Include cli/cli-script.h.
407         * extension-priv.h: Likewise.
408         * gdbcmd.h: Likewise.
409
410 2017-09-04  Pedro Alves  <palves@redhat.com>
411
412         * ada-lang.c (is_known_support_routine): Move sal declaration to
413         where it is initialized.
414         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
415         (parse_breakpoint_sals, decode_static_tracepoint_spec)
416         (clear_command, update_static_tracepoint): Remove init_sal
417         references.  Move declarations closer to initializations.
418         * cli/cli-cmds.c (list_command): Move sal declarations closer to
419         initializations.
420         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
421         references.  Move sal declarations closer to initializations.
422         * frame.c (find_frame_sal): Return a symtab_and_line via function
423         return instead of output parameter.  Remove init_sal references.
424         * frame.h (find_frame_sal): Return a symtab_and_line via function
425         return instead of output parameter.
426         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
427         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
428         instead of memset.
429         (gdbscm_find_pc_line): Remove init_sal reference.
430         * infcall.c (call_function_by_hand_dummy): Remove init_sal
431         references.  Move declarations closer to initializations.
432         * infcmd.c (set_step_frame): Update.  Move declarations closer to
433         initializations.
434         (finish_backward): Remove init_sal references.  Move declarations
435         closer to initializations.
436         * infrun.c (process_event_stop_test, handle_step_into_function)
437         (insert_hp_step_resume_breakpoint_at_frame)
438         (insert_step_resume_breakpoint_at_caller): Likewise.
439         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
440         (symbol_to_sal): Likewise.
441         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
442         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
443         to its initialization.
444         * reverse.c (save_bookmark_command): Use new/delete.  Remove
445         init_sal references.  Move declarations closer to initializations.
446         * source.c (get_current_source_symtab_and_line): Remove brace
447         initialization.
448         (set_current_source_symtab_and_line): Now takes the sal by const
449         reference.  Remove brace initialization.
450         (line_info): Remove init_sal reference.
451         * source.h (set_current_source_symtab_and_line): Now takes a
452         symtab_and_line via const reference.
453         * stack.c (set_current_sal_from_frame): Adjust.
454         (print_frame_info): Adjust.
455         (get_last_displayed_sal): Return the sal via function return
456         instead of via output parameter.  Simplify.
457         (frame_info): Adjust.
458         * stack.h (get_last_displayed_sal): Return the sal via function
459         return instead of via output parameter.
460         * symtab.c (init_sal): Delete.
461         (find_pc_sect_line): Remove init_sal references.  Move
462         declarations closer to initializations.
463         (find_function_start_sal): Remove init_sal references.  Move
464         declarations closer to initializations.
465         * symtab.h (struct symtab_and_line): In-class initialize all
466         fields.
467         * tracepoint.c (set_traceframe_context)
468         (print_one_static_tracepoint_marker): Remove init_sal references.
469         Move declarations closer to initializations.
470         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
471         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
472         declarations closer to initializations.
473         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
474         init_sal references.  Adjust.
475
476 2017-09-04  Pedro Alves  <palves@redhat.com>
477
478         * ax-gdb.c (agent_command_1): Use range-for.
479         * break-catch-throw.c (re_set_exception_catchpoint): Update.
480         * breakpoint.c: Include "common/array-view.h".
481         (init_breakpoint_sal, create_breakpoint_sal): Change sals
482         parameter from struct symtabs_and_lines to
483         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
484         (breakpoint_sals_to_pc): Change sals parameter from struct
485         symtabs_and_lines to std::vector reference.
486         (check_fast_tracepoint_sals): Change sals parameter from struct
487         symtabs_and_lines to std::array_view.  Use range-for.
488         (decode_static_tracepoint_spec): Return a std::vector instead of
489         symtabs_and_lines.  Update.
490         (create_breakpoint): Update.
491         (break_range_command, until_break_command, clear_command): Update.
492         (base_breakpoint_decode_location, bkpt_decode_location)
493         (bkpt_probe_create_sals_from_location)
494         (bkpt_probe_decode_location, tracepoint_decode_location)
495         (tracepoint_probe_decode_location)
496         (strace_marker_create_sals_from_location): Return a std::vector
497         instead of symtabs_and_lines.
498         (strace_marker_create_breakpoints_sal): Update.
499         (strace_marker_decode_location): Return a std::vector instead of
500         symtabs_and_lines.  Update.
501         (update_breakpoint_locations): Change struct symtabs_and_lines
502         parameters to gdb::array_view.  Adjust.
503         (location_to_sals): Return a std::vector instead of
504         symtabs_and_lines.  Update.
505         (breakpoint_re_set_default): Use std::vector instead of struct
506         symtabs_and_lines.
507         (decode_location_default): Return a std::vector instead of
508         symtabs_and_lines.  Update.
509         * breakpoint.h: Include "common/array-view.h".
510         (struct breakpoint_ops) <decode_location>: Now returns a
511         std::vector instead of returning a symtabs_and_lines via output
512         parameter.
513         (update_breakpoint_locations): Change sals parameters to use
514         gdb::array_view.
515         * cli/cli-cmds.c (edit_command, list_command): Update to use
516         std::vector and gdb::array_view.
517         (ambiguous_line_spec): Adjust to use gdb::array_view and
518         range-for.
519         (compare_symtabs): Rename to ...
520         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
521         const reference and adjust.
522         (filter_sals): Rewrite using std::vector and standard algorithms.
523         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
524         (jump_command): Update to use std::vector.
525         * linespec.c (struct linespec_state) <canonical_names>: Update
526         comment.
527         (add_sal_to_sals_basic): Delete.
528         (add_sal_to_sals, filter_results, convert_results_to_lsals)
529         (decode_line_2, create_sals_line_offset)
530         (convert_address_location_to_sals, convert_linespec_to_sals)
531         (convert_explicit_location_to_sals, parse_linespec)
532         (event_location_to_sals, decode_line_full, decode_line_1)
533         (decode_line_with_current_source)
534         (decode_line_with_last_displayed, decode_objc)
535         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
536         (linespec_result::~linespec_result): Adjust to use std::vector
537         instead of symtabs_and_lines.
538         * linespec.h (linespec_sals::sals): Now a std::vector.
539         (struct linespec_result): Use std::vector, bool, and in-class
540         initialization.
541         (decode_line_1, decode_line_with_current_source)
542         (decode_line_with_last_displayed): Return std::vector.
543         * macrocmd.c (info_macros_command): Use std::vector.
544         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
545         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
546         std::vector.
547         * probe.h (parse_probes): Return a std::vector.
548         * python/python.c (gdbpy_decode_line): Use std::vector and
549         gdb::array_view.
550         * source.c (select_source_symtab, line_info): Use std::vector.
551         * stack.c (func_command): Use std::vector.
552         * symtab.h (struct symtabs_and_lines): Delete.
553         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
554
555 2017-09-04  Pedro Alves  <palves@redhat.com>
556
557         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
558         unittests/array-view-selftests.c.
559         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
560         * common/array-view.h: New file.
561         * unittests/array-view-selftests.c: New file.
562
563 2017-09-04  Pedro Alves  <palves@redhat.com>
564
565         * cli/cli-cmds.c (edit_command): Pass message to
566         ambiguous_line_spec.
567         (list_command): Pass message to ambiguous_line_spec.  Say
568         "first"/"last" instead of "start" and "end" to be consistent with
569         the manual.
570         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
571         them to print formatted message.
572
573 2017-09-04  Pedro Alves  <palves@redhat.com>
574
575         * btrace.c (ftrace_add_pt): Pass btrace_insn to
576         ftrace_update_insns by reference instead of pointer.
577
578 2017-09-04  Yao Qi  <yao.qi@linaro.org>
579
580         * i386-go32-tdep.c: Include x86-xstate.h.
581         (i386_go32_init_abi): Call i386_target_description.
582         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
583         if xcr0 is X86_XSTATE_X87_MASK.
584         * i386-tdep.h (tdesc_i386): Remove the declaration.
585         (tdesc_i386_mmx): Likewise.
586
587 2017-09-04  Yao Qi  <yao.qi@linaro.org>
588
589         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
590         X86_XSTATE_SSE_MASK instead of 0.
591
592 2017-09-04  Yao Qi  <yao.qi@linaro.org>
593
594         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
595         i386_target_description.
596         * i386-fbsd-nat.c (i386fbsd_read_description): Call
597         i386_target_description.
598         * i386-tdep.c (i386_gdbarch_init): Likewise.
599
600 2017-09-04  Yao Qi  <yao.qi@linaro.org>
601
602         * amd64-darwin-tdep.c: Include "x86-xstate.h".
603         (x86_darwin_init_abi_64): Call amd64_target_description.
604         * amd64-dicos-tdep.c: Likewise.
605         * amd64-fbsd-nat.c: Likewise.
606         * amd64-fbsd-tdep.c: Likewise.
607         * amd64-nbsd-tdep.c: Likewise.
608         * amd64-obsd-tdep.c: Likewise.
609         * amd64-sol2-tdep.c: Likewise.
610         * amd64-windows-tdep.c: Likewise.
611         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
612
613 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
614
615         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
616         (btrace_function) <insn>: Change type to use std::vector.
617         * btrace.c (ftrace_debug, ftrace_call_num_insn,
618         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
619         ftrace_update_insns, ftrace_compute_global_level_offset,
620         btrace_stitch_bts, btrace_clear, btrace_insn_get,
621         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
622         change to std::vector.
623         (ftrace_update_insns): Adjust to change to std::vector, change
624         type of INSN parameter.
625         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
626         * record-btrace.c (btrace_call_history_insn_range,
627         btrace_compute_src_line_range,
628         record_btrace_frame_prev_register): Adjust to change to
629         std::vector.
630         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
631         to change to std::vector.
632
633 2017-09-03  Tom Tromey  <tom@tromey.com>
634
635         * corefile.c (reopen_exec_file): Use std::string.
636
637 2017-09-03  Tom Tromey  <tom@tromey.com>
638
639         * compile/compile.c (compile_register_name_mangled): Return
640         std::string.
641         * compile/compile-loc2c.c (pushf_register_address): Update.
642         (pushf_register): Update.
643         * compile/compile-c-types.c (convert_array): Update.
644         * compile/compile-c-symbols.c (generate_vla_size): Update.
645         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
646         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
647         (convert_one_symbol): Update.
648         (generate_c_for_for_one_variable): Update.
649         * compile/compile-c-support.c (c_get_range_decl_name): Return a
650         std::string.
651         (generate_register_struct): Update.
652         * compile/compile-internal.h (c_get_range_decl_name): Return a
653         std::string.
654         (compile_register_name_mangled): Return std::string.
655
656 2017-09-03  Tom Tromey  <tom@tromey.com>
657
658         * utils.c (perror_string): Return a std::string.
659         (throw_perror_with_name, perror_warning_with_name): Update.
660
661 2017-09-03  Tom Tromey  <tom@tromey.com>
662
663         * demangle.c (demangle_command): Use std::string,
664         unique_xmalloc_ptr.
665
666 2017-09-03  Tom Tromey  <tom@tromey.com>
667
668         * cli/cli-setshow.c (do_set_command): Use std::string.
669
670 2017-09-03  Tom Tromey  <tom@tromey.com>
671
672         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
673
674 2017-09-03  Tom Tromey  <tom@tromey.com>
675
676         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
677
678 2017-09-03  Tom Tromey  <tom@tromey.com>
679
680         * mi/mi-cmd-env.c (env_execute_cli_command): Use
681         gdb::unique_xmalloc_ptr.
682
683 2017-09-03  Tom Tromey  <tom@tromey.com>
684
685         * thread.c (print_thread_info_1): Use string_printf.
686         (thread_apply_command, thread_apply_all_command): Use
687         std::string.
688
689 2017-09-03  Tom Tromey  <tom@tromey.com>
690
691         * valprint.c (val_print_string): Update.
692         * gdbcore.h (memory_error_message): Return std::string.
693         * corefile.c (memory_error_message): Return std::string.
694         (memory_error): Update.
695         * breakpoint.c (insert_bp_location): Update.
696
697 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
698
699         * target/waitstatus.h (target_waitstatus_to_string): Change
700         return type to std::string.
701         * target/waitstatus.c (target_waitstatus_to_string): Return
702         std::string.
703         * target.h (target_waitstatus_to_string): Remove declaration.
704         * infrun.c (resume, clear_proceed_status_thread,
705         print_target_wait_results, do_target_wait, save_waitstatus,
706         stop_all_threads): Adjust.
707         * record-btrace.c (record_btrace_wait): Adjust.
708         * target-debug.h
709         (target_debug_print_struct_target_waitstatus_p): Adjust.
710
711 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
712
713         PR gdb/22046
714         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
715         detection.
716
717 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
718
719         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
720         for setting/unsetting environment variables on the remote target.
721         (New remote packets): Add entries for QEnvironmentHexEncoded,
722         QEnvironmentUnset and QEnvironmentReset.
723         * common/environ.c (gdb_environ::operator=): Extend method to
724         handle m_user_set_env_list and m_user_unset_env_list.
725         (gdb_environ::clear): Likewise.
726         (match_var_in_string): Change type of first parameter from 'char
727         *' to 'const char *'.
728         (gdb_environ::set): Extend method to handle
729         m_user_set_env_list and m_user_unset_env_list.
730         (gdb_environ::unset): Likewise.
731         (gdb_environ::clear_user_set_env): New method.
732         (gdb_environ::user_set_envp): Likewise.
733         (gdb_environ::user_unset_envp): Likewise.
734         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
735         m_user_unset_env_list on move constructor/assignment.
736         (unset): Add new default parameter 'update_unset_list = true'.
737         (clear_user_set_env): New method.
738         (user_set_envp): Likewise.
739         (user_unset_envp): Likewise.
740         (m_user_set_env_list): New std::set.
741         (m_user_unset_env_list): Likewise.
742         * common/rsp-low.c (hex2str): New function.
743         (bin2hex): New overload for bin2hex function.
744         * common/rsp-low.c (hex2str): New prototype.
745         (str2hex): New overload prototype.
746         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
747         QEnvironmentUnset and QEnvironmentReset.
748         (remote_protocol_features): Add QEnvironmentHexEncoded,
749         QEnvironmentUnset and QEnvironmentReset packets.
750         (send_environment_packet): New function.
751         (extended_remote_environment_support): Likewise.
752         (extended_remote_create_inferior): Call
753         extended_remote_environment_support.
754         (_initialize_remote): Add QEnvironmentHexEncoded,
755         QEnvironmentUnset and QEnvironmentReset packet configs.
756         * unittests/environ-selftests.c (gdb_selftest_env_var):
757         New variable.
758         (test_vector_initialization): New function.
759         (test_init_from_host_environ): Likewise.
760         (test_reinit_from_host_environ): Likewise.
761         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
762         Likewise.
763         (test_unset_set_empty_vector): Likewise.
764         (test_vector_clear): Likewise.
765         (test_std_move): Likewise.
766         (test_move_constructor):
767         (test_self_move): Likewise.
768         (test_set_unset_reset): Likewise.
769         (run_tests): Rewrite in terms of the functions above.
770
771 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
772
773         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
774         (adi_available): Use a temp variable of type CORE_ADDR as argument
775         3 when calling target_auxv_search.
776         (adi_normalize_address): Use masks and xor operators to calculate
777         normalized address.
778         (adi_read_versions, adi_write_versions, adi_print_versions)
779         (do_examine, do_assign): Use paddress.
780
781 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
782
783         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
784         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
785         out of loop and add supply of FIR.
786         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
787         add collect of FIR.
788
789 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
790
791         PR gdb/21827
792         * cli/cli-script.c (define_command): Don't convert command name
793         to lower case.
794
795 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
796
797         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
798         Update all callers accordingly. Remove all code blocks handling
799         the case where DISPP is not NULL.
800
801 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
802
803         PR symtab/22003
804         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
805         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
806         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
807
808 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
809
810         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
811         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
812         (read_comp_units_from_section): New parameter abbrev_section, use
813         read_and_check_comp_unit_head, allocate signatured_type if needed.
814         (create_all_comp_units): Update read_comp_units_from_section caller.
815
816 2017-08-23  Pedro Alves  <palves@redhat.com>
817
818         PR remote/21852
819         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
820         to null_ptid and switch to thread without reading the registers
821         after adding the inferior.
822
823 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
824
825         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
826         compile-gcc.
827         * compile/compile.c (compile_gcc, show_compile_gcc): New.
828         (compile_to_object): Implement compile_gcc.
829         (_initialize_compile): Install "set compile-gcc".  Initialize
830         compile_gcc.
831
832 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
833
834         * compile/compile.c (compile_to_object): Conditionally call
835         set_verbose.  Conditionally call compile or compile_v0.
836
837 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
838
839         * sparc64-tdep.h: (adi_normalize_address): New export.
840         * sparc-nat.h: (open_adi_tag_fd): New export.
841         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
842         * sparc64-linux-tdep.c:
843         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
844         (sparc64_linux_handle_segmentation_fault): New function.
845         (sparc64_linux_init_abi): Register
846         sparc64_linux_handle_segmentation_fault
847         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
848         (sparc64_addr_bits_remove): New function.
849         (sparc64_init_abi): Register sparc64_addr_bits_remove.
850         (MAX_PROC_NAME_SIZE): New macro.
851         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
852         (sparc64adilist): New variable.
853         (adi_proc_list): New variable.
854         (find_adi_info): New function.
855         (add_adi_info): New function.
856         (get_adi_info_proc): New function.
857         (get_adi_info): New function.
858         (info_adi_command): New function.
859         (read_maps_entry): New function.
860         (adi_available): New function.
861         (adi_normalize_address): New function.
862         (adi_align_address): New function.
863         (adi_convert_byte_count): New function.
864         (adi_tag_fd): New function.
865         (adi_is_addr_mapped): New function.
866         (adi_read_versions): New function.
867         (adi_write_versions): New function.
868         (adi_print_versions): New function.
869         (do_examine): New function.
870         (do_assign): New function.
871         (adi_examine_command): New function.
872         (adi_assign_command): New function.
873         (_initialize_sparc64_adi_tdep): New function.
874
875 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
876
877         * breakpoint.c (breakpoints_info): Rename to ...
878         (info_breakpoints_command): ... this.
879         (watchpoints_info): Rename to ...
880         (info_watchpoints_command): ... this.
881         (tracepoints_info): Rename to ...
882         (info_tracepoints_command): ... this.
883         (_initialize_breakpoint): Adjust.
884         * dcache.c (dcache_info): Rename to ...
885         (info_display_command): ... this.
886         (_initialize_dcache): Adjust.
887         * frame.h (args_info): Rename to ...
888         (info_args_command): ... this.
889         (locals_info): Rename to ...
890         (info_locals_command): ... this.
891         * infcmd.c (nofp_registers_info): Rename to ...
892         (info_registers_command): ... this.
893         (float_info): Rename to ...
894         (info_float_command): ... this.
895         (program_info): Rename to ...
896         (info_program_command): ... this.
897         (all_registers_info): Rename to ...
898         (info_all_registers_command): ... this.
899         (vector_info): Rename to ...
900         (info_vector_command): ... this.
901         (float_info): Rename to ...
902         (info_float_command): ... this.
903         (_initialize_infcmd): Adjust.
904         * inferior.h (term_info): Rename to ...
905         (info_terminal_command): ... this.
906         * inflow.c (term_info): Rename to ...
907         (info_terminal_command): ... this.
908         (_initialize_inflow): Adjust.
909         * infrun.c (signals_info): Rename to ...
910         (info_signals_command): ... this.
911         (_initialize_infrun): Adjust.
912         * objc-lang.c (classes_info): Rename to ...
913         (info_classes_command): ... this.
914         (selectors_info): Rename to ...
915         (info_selectors_command): ... this.
916         (_initialize_objc_language): Adjust.
917         * printcmd.c (sym_info): Rename to ...
918         (info_symbol_command): ... this.
919         (address_info): Rename to ...
920         (info_address_command): ... this.
921         (display_info): Rename to ...
922         (info_display_command): ... this.
923         (_initialize_printcmd): Adjust.
924         * reverse.c (bookmarks_info): Rename to ...
925         (info_breakpoints_command): ... this.
926         (_initialize_reverse): Adjust.
927         * ser-go32.c (dos_info): Rename to ...
928         (info_serial_command): ... this.
929         (_initialize_ser_dos): Adjust.
930         * skip.c (skip_info): Rename to ...
931         (info_skip_command): ... this.
932         (_initialize_step_skip): Adjust.
933         * source.c (line_info): Rename to ...
934         (info_line_command): ... this.
935         (source_info): Rename to ...
936         (info_source_command)
937         * stack.c (frame_info): Rename to ...
938         (info_frame_command): ... this.
939         (locals_info): Rename to ...
940         (info_locals_command): ... this.
941         (args_info): Rename to ...
942         (info_args_command): ... this.
943         (_initialize_stack): Adjust.
944         * symtab.c (sources_info): Rename to ...
945         (info_sources_command): ... this.
946         (variables_info): Rename to ...
947         (info_variables_command): ... this.
948         (functions_info): Rename to ...
949         (info_functions_command): ... this.
950         (types_info): Rename to ...
951         (info_types_command): ... this.
952         (_initialize_symtab): Adjust.
953         * target.c (target_info): Rename to ...
954         (info_target_command): ... this.
955         (initialize_targets): Adjust.
956         * tracepoint.c (tvariables_info): Rename to ...
957         (info_tvariables_command): ... this.
958         (scope_info): Rename to ...
959         (info_scope_command): ... this.
960         (trace_dump_actions): Adjust.
961         (_initialize_tracepoint): Adjust.
962
963 2017-08-22  Tom Tromey  <tom@tromey.com>
964
965         * breakpoint.h (install_breakpoint): Update.
966         * breakpoint.c (add_solib_catchpoint): Update.
967         (install_breakpoint): Change argument to a std::unique_ptr.
968         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
969         (create_breakpoint_sal, create_breakpoint): Update.
970         (watch_command_1, catch_exec_command_1)
971         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
972         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
973         Return the breakpoint.
974         (set_raw_breakpoint_without_location, set_raw_breakpoint)
975         (new_single_step_breakpoint): Update.
976         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
977         std::unique_ptr.
978         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
979         std::unique_ptr.
980         * break-catch-sig.c (create_signal_catchpoint): Use
981         std::unique_ptr.
982         * ada-lang.c (create_ada_exception_catchpoint): Use
983         std::unique_ptr.
984
985 2017-08-22  Tom Tromey  <tom@tromey.com>
986
987         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
988
989 2017-08-22  Tom Tromey  <tom@tromey.com>
990
991         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
992         (lookup_partial_symbol): Update.
993
994 2017-08-22  Tom Tromey  <tom@tromey.com>
995
996         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
997         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
998         (find_and_open_source, symtab_to_fullname): Update.
999         * psymtab.c (psymtab_to_fullname): Update.
1000
1001 2017-08-22  Tom Tromey  <tom@tromey.com>
1002
1003         * exec.c (exec_file_attach): Update.
1004         * linux-thread-db.c (try_thread_db_load): Update.
1005         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
1006         * utils.c (gdb_realpath): Change return type.
1007         (gdb_realpath_keepfile): Update.
1008         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
1009         (_initialize_utils): Register the new self test.
1010         * source.c (openp): Update.
1011         (find_and_open_source): Update.
1012         * nto-tdep.c (nto_find_and_open_solib): Update.
1013         * main.c (set_gdb_data_directory): Update.
1014         (captured_main_1): Update.
1015         * dwarf2read.c (dwarf2_get_dwz_file): Update
1016         (dw2_map_symbol_filenames): Update.
1017         * auto-load.c (auto_load_safe_path_vec_update): Update.
1018         (filename_is_in_auto_load_safe_path_vec): Change type of
1019         "filename_realp".
1020         (auto_load_objfile_script): Update.
1021         (file_is_auto_load_safe): Update.  Use std::string.
1022         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
1023
1024 2017-08-22  Tom Tromey  <tom@tromey.com>
1025
1026         * utils.c (gdb_realpath_keepfile): Return a
1027         gdb::unique_xmalloc_ptr.
1028         * exec.c (exec_file_attach): Update.
1029         * utils.h (gdb_realpath_keepfile): Return a
1030         gdb::unique_xmalloc_ptr.
1031
1032 2017-08-22  Tom Tromey  <tom@tromey.com>
1033
1034         * compile/compile.c (compile_file_command): Use
1035         gdb::unique_xmalloc_ptr, std::string.
1036         * utils.c (gdb_abspath): Change return type.
1037         * source.c (openp): Update.
1038         * objfiles.c (allocate_objfile): Update.
1039         * main.c (set_gdb_data_directory): Update.
1040         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
1041
1042 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
1043
1044         * cli-cmds.c (list_commands): List actual code around more than
1045         one location.
1046
1047 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
1048
1049         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
1050
1051 2017-08-21  Pedro Alves  <palves@redhat.com>
1052
1053         PR gdb/19487
1054         * c-exp.y (variable production): Handle function aliases.
1055         * minsyms.c (msymbol_is_text): New function.
1056         * minsyms.h (msymbol_is_text): Declare.
1057         * symtab.c (find_function_alias_target): New function.
1058         * symtab.h (find_function_alias_target): Declare.
1059
1060 2017-08-21  Pedro Alves  <palves@redhat.com>
1061
1062         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
1063         typedefs.
1064         * typeprint.c (whatis_exp): If handling "whatis", and expression
1065         is OP_TYPE, strip one typedef level.  Otherwise don't strip
1066         typedefs here.
1067         * valops.c (value_cast): Save "to" type before resolving
1068         stubs/typedefs.  Use that type as resulting value's type.
1069
1070 2017-08-18  Tom Tromey  <tom@tromey.com>
1071             Pedro Alves  <palves@redhat.com>
1072
1073         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
1074         * sol-thread.c (sol_thread_resume, sol_thread_wait)
1075         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
1076         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
1077         * proc-service.c (ps_xfer_memory): Use scoped_restore.
1078         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
1079         (linux_get_siginfo_data): Add "thread" argument.  Use
1080         scoped_restore.
1081         * linux-nat.c (linux_child_follow_fork)
1082         (check_stopped_by_watchpoint): Use scoped_restore.
1083         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
1084         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
1085         (restore_inferior_ptid, save_inferior_ptid): Remove.
1086         * btrace.c (btrace_fetch): Use scoped_restore.
1087         * bsd-uthread.c (bsd_uthread_fetch_registers)
1088         (bsd_uthread_store_registers): Use scoped_restore.
1089         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
1090         scoped_restore.
1091         * aix-thread.c (aix_thread_resume, aix_thread_wait)
1092         (aix_thread_xfer_partial): Use scoped_restore.
1093         * inferior.h (save_inferior_ptid): Remove.
1094
1095 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1096
1097         PR tdep/21818
1098         * arm-tdep.c (gdb_print_insn_arm): Mark
1099         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
1100
1101 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1102
1103         * NEWS: Mention GDBserver's new option "--selftest".
1104         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
1105         * selftest.c: Move it to common/selftest.c.
1106         * selftest.h: Move it to common/selftest.h.
1107         * selftest-arch.c (reset): New function.
1108         (tests_with_arch): Call reset.
1109
1110 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1111
1112         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
1113         instead of exception_fprintf and printf_filtered.
1114
1115 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1116
1117         * selftest.c (register_self_test): Rename it to
1118         selftests::register_test.
1119         (run_self_tests): selftest::run_tests.
1120         * selftest.h: Update declarations.
1121         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
1122         selftests::register_test_foreach_arch.
1123         * selftest-arch.h: Update declaration.
1124         * aarch64-tdep.c: Update.
1125         * arm-tdep.c: Likewise.
1126         * disasm-selftests.c: Likewise.
1127         * dwarf2loc.c: Likewise.
1128         * dwarf2-frame.c: Likewise.
1129         * findvar.c: Likewise.
1130         * gdbarch-selftests.c: Likewise.
1131         * maint.c (maintenance_selftest): Likewise.
1132         * regcache.c: Likewise.
1133         * rust-exp.y: Likewise.
1134         * selftest-arch.c: Likewise.
1135         * unittests/environ-selftests.c: Likewise.
1136         * unittests/function-view-selftests.c: Likewise.
1137         * unittests/offset-type-selftests.c: Likewise.
1138         * unittests/optional-selftests.c: Likewise.
1139         * unittests/scoped_restore-selftests.c: Likewise.
1140         * utils-selftests.c: Likewise.
1141
1142 2017-08-17  Pedro Alves  <palves@redhat.com>
1143
1144         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
1145         local.
1146
1147 2017-08-17  Pedro Alves  <palves@redhat.com>
1148
1149         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
1150         field.
1151         (reset_die_in_process): Delete, replaced by ...
1152         (process_die_scope): ... this new class.  Make it responsible for
1153         freeing cu->line_header too.
1154         (process_die): Use process_die_scope.
1155         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
1156         cu->line_header_die_owner.  Don't release the line header if it's
1157         owned by the CU.
1158         (setup_type_unit_groups): Make the CU/DIE own the line header.
1159         Don't release the line header here.
1160
1161 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
1162
1163         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
1164
1165 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1166
1167         * NEWS: Mention new shortcuts for nexti and stepi in TUI
1168         Single-Key mode
1169
1170 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1171
1172         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
1173         mode command list.
1174
1175 2017-08-15  Stafford Horne  <shorne@gmail.com>
1176
1177         * MAINTAINERS (Write After Approval): Add Stafford Horne.
1178
1179 2017-08-15  Stafford Horne  <shorne@gmail.com>
1180
1181         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
1182
1183 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1184
1185         PR gdb/21954
1186         * infcmd.c (unset_environment_command): Use the 'clear' method on
1187         the environment instead of resetting it.
1188
1189 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
1190
1191         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
1192         platforms.
1193
1194 2017-08-14  Tom Tromey  <tom@tromey.com>
1195
1196         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
1197         (print_binary_chars): Likewise.
1198         (BITS_IN_BYTES): Remove.
1199
1200 2017-08-14  Tom Tromey  <tom@tromey.com>
1201
1202         PR gdb/21675
1203         * valprint.c (LOW_ZERO): Change value to 034.
1204         (print_octal_chars): Add static_asserts for octal constants.
1205         * printcmd.c (print_scalar_formatted): Add 'd' case.
1206
1207 2017-08-11  Tom Tromey  <tom@tromey.com>
1208
1209         * symfile.c (add_symbol_file_command): Use std::vector.
1210
1211 2017-08-14  Tom Tromey  <tom@tromey.com>
1212
1213         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
1214         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1215         std::move.
1216         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
1217
1218 2017-08-11  Pedro Alves  <palves@redhat.com>
1219
1220         * infrun.c (process_event_stop_test): Adjust
1221         function_name_is_marked_for_skip call.
1222         * skip.c: Include <list>.
1223         (skiplist_entry): Make it a class with private fields, and
1224         getters/setters.
1225         (skiplist_entry_chain): Delete.
1226         (skiplist_entries): New.
1227         (skiplist_entry_count): Delete.
1228         (highest_skiplist_entry_num): New.
1229         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
1230         (add_skiplist_entry): Delete.
1231         (skiplist_entry::skiplist_entry): New.
1232         (skiplist_entry::add_entry): New.
1233         (skip_file_command, skip_function): Adjust.
1234         (compile_skip_regexp): Delete.
1235         (skip_command): Don't compile regexp here.  Adjust to use
1236         skiplist_entry::add_entry.
1237         (skip_info): Adjust to use range-for and getters.
1238         (skip_enable_command, skip_disable_command): Adjust to use
1239         range-for and setters.
1240         (skip_delete_command): Adjust to use std::list.
1241         (add_skiplist_entry): Delete.
1242         (skip_file_p): Delete, refactored as ...
1243         (skiplist_entry::do_skip_file_p): ... this new method.
1244         (skip_gfile_p): Delete, refactored as ...
1245         (skiplist_entry::do_gskip_file_p): ... this new method.
1246         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
1247         (skiplist_entry::skip_function_p): ... this new method.
1248         (function_name_is_marked_for_skip): Now returns bool, and takes
1249         the function sal by const reference.  Adjust to use range-for and
1250         skiplist_entry methods.
1251         (_initialize_step_skip): Remove references to
1252         skiplist_entry_chain, skiplist_entry_count.
1253         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
1254         takes the function sal by const reference.
1255
1256 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1257
1258         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
1259         (dwarf2_frame_cache): Remove reset_cache_cleanup.
1260         (dwarf2_frame_cache):
1261         * frame-unwind.c (frame_unwind_try_unwinder): Catch
1262         RETURN_MASK_ALL and set *this_case to NULL.
1263         * frame-unwind.h: Update comments.
1264
1265 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1266
1267         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
1268         (dwarf2_frame_state_copy_regs): Remove.
1269         (dwarf2_frame_state_free_regs): Remove.
1270         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
1271         (dwarf2_restore_rule): Call method .alloc_regs instead of
1272         dwarf2_frame_state_alloc_regs.
1273         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
1274         constructor.  Call std::move.
1275         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
1276         (dwarf2_frame_cache): Likewise.
1277
1278         [GDB_SELF_TEST]: Include selftest.h and
1279         selftest-arch.h.
1280         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
1281         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
1282         execute_cfa_program_test.
1283
1284         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
1285         copy ctor, assignment operator, move assignment.
1286         <alloc_regs>: New method.
1287         <swap>: New method.
1288         (struct dwarf2_frame_state): Delete dtor.
1289         (dwarf2_frame_state_alloc_regs): Remove declaration.
1290         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
1291         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
1292
1293 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1294
1295         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
1296         (dwarf2_frame_state::dwarf2_frame_state): New.
1297         (dwarf2_frame_state::~dwarf2_frame_state): New.
1298         (dwarf2_fetch_cfa_info): Update.
1299         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
1300         rather than a pointer.  Update code.
1301         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
1302         dtor.
1303         <data_align, code_align, retaddr_column>: Change them to const.
1304         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
1305         to bool.
1306
1307 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1308
1309         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
1310         <loc.exp>: New field.
1311         * dwarf2-frame.c (execute_cfa_program): Update.
1312         (dwarf2_frame_prev_register): Update.
1313
1314 2017-08-10  Pedro Alves  <palves@redhat.com>
1315
1316         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
1317
1318 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
1319
1320         * fbsd-nat.c (struct fbsd_fork_info): Remove.
1321         (fbsd_pending_children): Use std::list.
1322         (fbsd_remember_child): Likewise.
1323         (fbsd_is_child_pending): Likewise.
1324         (fbsd_pending_vfork_done): Use std::forward_list.
1325         (fbsd_add_vfork_done): Likewise.
1326         (fbsd_is_vfork_done_pending): Likewise.
1327         (fbsd_next_vfork_done): Likewise.
1328
1329 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
1330
1331         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
1332         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
1333         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
1334         for `mapfilename'.
1335         (fbsd_xfer_partial): Use gdb::byte_vector.
1336         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
1337
1338 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
1339
1340         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
1341         "filestuff.h".
1342         (fbsd_find_memory_regions): Fix `mapfile' initialization.
1343
1344 2017-08-09  Tom Tromey  <tom@tromey.com>
1345
1346         * skip.c (skiplist_entry): New constructor.
1347         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
1348         (skiplist_entry::file_is_glob): Now bool.
1349         (skiplist_entry::file, skiplist_entry::function): Now
1350         std::string.
1351         (make_skip_entry): Return a unique_ptr.  Use new.
1352         (free_skiplist_entry, free_skiplist_entry_cleanup)
1353         (make_free_skiplist_entry_cleanup): Remove.
1354         (skip_command, skip_disable_command, add_skiplist_entry)
1355         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
1356         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
1357         (function_name_is_marked_for_skip): Update.
1358         (skip_delete_command): Update.  Use delete.
1359
1360 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
1361
1362         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
1363         (aarch64_linux_core_read_description): New function.
1364         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
1365
1366 2017-08-09  Pedro Alves  <palves@redhat.com>
1367
1368         * cp-name-parser.y (cp_comp_to_string): Return a
1369         gdb::unique_xmalloc_ptr<char>.
1370         * cp-support.c (replace_typedefs_qualified_name)
1371         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
1372         (cp_canonicalize_string_full): Use op= instead of explicit
1373         convertion.
1374         (cp_class_name_from_physname, method_name_from_physname)
1375         (cp_func_name, cp_remove_params): Adjust to use
1376         gdb::unique_xmalloc_ptr<char>.
1377         * cp-support.h (cp_comp_to_string): Return a
1378         gdb::unique_xmalloc_ptr<char>.
1379         * python/py-type.c (typy_lookup_type): Adjust to use
1380         gdb::unique_xmalloc_ptr<char>.
1381
1382 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
1383
1384         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
1385
1386 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
1387             Yao Qi  <yao.qi@linaro.org>
1388
1389         * cp-support.c (cp_canonicalize_string_full): Use
1390         gdb::unique_xmalloc_ptr<char>.
1391         (cp_canonicalize_string): Likewise.
1392
1393 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1394
1395         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
1396         * regformats/i386/amd64-avx-avx512.dat: Remove.
1397         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
1398         * regformats/i386/amd64-avx-mpx.dat:Remove.
1399         * regformats/i386/amd64-avx.dat: Remove.
1400         * regformats/i386/amd64-mpx.dat: Remove.
1401         * regformats/i386/i386-avx-avx512.dat: Remove.
1402         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
1403         * regformats/i386/i386-avx-mpx.dat: Remove.
1404         * regformats/i386/i386-mmx.dat: Remove.
1405         * regformats/i386/i386-mpx.dat: Remove.
1406
1407 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1408
1409         * amd64-tdep.h (tdesc_x32): Remove the declaration.
1410         * amd64-tdep.c: Don't include features/i386/x32*.c.
1411         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
1412         functions.
1413         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
1414         and i386/x32-avx-avx512.
1415         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
1416         and i386/x32.xml.
1417         * features/i386/x32-avx-avx512.c: Removed.
1418         * features/i386/x32-avx-avx512.xml: Removed.
1419         * features/i386/x32-avx.c: Removed.
1420         * features/i386/x32-avx.xml: Removed.
1421         * features/i386/x32.c: Removed.
1422         * features/i386/x32.xml: Removed.
1423         * regformats/i386/x32-avx-avx512.dat: Removed.
1424         * regformats/i386/x32-avx.dat: Removed.
1425         * regformats/i386/x32.dat: Removed.
1426
1427 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
1428
1429         PR breakpoints/21886
1430         * mem-break.c (default_memory_insert_breakpoint): Use
1431         `->placed_address' rather than `->reqstd_address' for the
1432         breakpoint location.
1433
1434 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
1435
1436         * arch-utils.c (default_print_insn): Remove arch/mach/endian
1437         assertions.
1438
1439 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
1440
1441         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
1442         a union of `tdep_info', `tdesc_data' and `id'.
1443         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
1444         rather than `info.tdep_info'.
1445         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
1446         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1447         * i386-tdep.c (i386_gdbarch_init): Likewise.
1448         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
1449         * mips-tdep.c (mips_gdbarch_init): Likewise.
1450         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1451         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1452         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
1453         `info.tdep_info'.
1454         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
1455         `info.tdep_info'.
1456         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1457         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
1458         `info.tdep_info'.
1459         * spu-tdep.c (spu_gdbarch_init): Likewise.
1460         * gdbarch.h: Regenerate.
1461
1462 2017-08-07  Leszek Swirski  <leszeks@google.com>
1463
1464         PR symtab/20899
1465         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
1466
1467 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1468
1469         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
1470         (gdbsim_open): Rename gdb_argv args object to argv.
1471
1472 2017-08-05  Tom Tromey  <tom@tromey.com>
1473
1474         * compile/compile-object-load.c (compile_object_load): Use
1475         gdb::unique_xmalloc_ptr.
1476         * cli/cli-dump.c (scan_filename): Rename from
1477         scan_filename_with_cleanup.  Change return type.
1478         (scan_expression): Rename from scan_expression_with_cleanup.
1479         Change return type.
1480         (dump_memory_to_file, dump_value_to_file, restore_command):
1481         Use gdb::unique_xmalloc_ptr.  Update.
1482         * cli/cli-cmds.c (find_and_open_script): Use
1483         gdb::unique_xmalloc_ptr.
1484         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
1485         * symmisc.c (maintenance_print_symbols)
1486         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
1487         * symfile.c (symfile_bfd_open, generic_load)
1488         (add_symbol_file_command, remove_symbol_file_command): Use
1489         gdb::unique_xmalloc_ptr.
1490         * source.c (openp): Use gdb::unique_xmalloc_ptr.
1491         * psymtab.c (maintenance_print_psymbols): Use
1492         gdb::unique_xmalloc_ptr.
1493         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
1494         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
1495         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
1496         (reload_shared_libraries_1): Likewise.
1497
1498 2017-08-05  Tom Tromey  <tom@tromey.com>
1499
1500         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
1501         (rust_op_vector, rust_set_vector): New typedefs.
1502         (current_parser): New global.
1503         (work_obstack): Change to pointer type.  Update all users.
1504         (rust_ast, pstate): Remove globals.
1505         (struct rust_parser): New.
1506         (%union) <params, field_inits>: Change type.
1507         (start, tuple_expr, unit_expr, struct_expr_list, literal)
1508         (field_expr, expr_list, maybe_expr_list, type_list): Update.
1509         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
1510         (convert_params_to_types, convert_params_to_expression): Change
1511         type of "params".
1512         (ast_string): Change type of "fields".
1513         (rust_parse): Make a rust_parser.  Remove cleanups.
1514         (rust_lex_tests): Make and install an auto_obstack.
1515
1516 2017-08-04  Yao Qi  <yao.qi@linaro.org>
1517
1518         * configure.srv (ipa_x32_linux_regobj): New.
1519         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
1520         instead of X86_TDESC_AVX512.
1521         (initialize_low_tracepoint): Call
1522         init_registers_x32_avx_avx512_linux.
1523
1524 2017-08-04  Yao Qi  <yao.qi@linaro.org>
1525
1526         * utils.h (gdb_argv): Add namespace std for nullptr_t.
1527
1528 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1529
1530         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
1531
1532 2017-08-03  Tom Tromey  <tom@tromey.com>
1533
1534         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
1535         Remove.
1536         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
1537
1538 2017-08-03  Tom Tromey  <tom@tromey.com>
1539
1540         * python/py-param.c (compute_enum_values): Use gdb_argv.
1541
1542 2017-08-03  Tom Tromey  <tom@tromey.com>
1543
1544         * utils.h (struct gdb_argv_deleter): New.
1545         (gdb_argv): New class.
1546         * utils.c (gdb_argv::reset): New method.
1547         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
1548         * tracefile.c (tsave_command): Use gdb_argv.
1549         * top.c (new_ui_command): Use gdb_argv.
1550         * symmisc.c (maintenance_print_symbols)
1551         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
1552         * symfile.c (symbol_file_command, generic_load)
1553         (remove_symbol_file_command): Use gdb_argv.
1554         * stack.c (backtrace_command): Use gdb_argv.
1555         * source.c (add_path, show_substitute_path_command)
1556         (unset_substitute_path_command, set_substitute_path_command):
1557         Use gdb_argv.
1558         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
1559         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
1560         * remote.c (extended_remote_run, remote_put_command)
1561         (remote_get_command, remote_delete_command): Use gdb_argv.
1562         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
1563         (gdbsim_open): Use gdb_argv.
1564         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
1565         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
1566         * procfs.c (procfs_info_proc): Use gdb_argv.
1567         * interps.c (interpreter_exec_cmd): Use gdb_argv.
1568         * infrun.c (handle_command): Use gdb_argv.
1569         * inferior.c (add_inferior_command, clone_inferior_command):
1570         Use gdb_argv.
1571         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
1572         * exec.c (exec_file_command): Use gdb_argv.
1573         * cli/cli-cmds.c (alias_command): Use gdb_argv.
1574         * compile/compile.c (build_argc_argv): Use gdb_argv.
1575
1576 2017-08-03  Tom Tromey  <tom@tromey.com>
1577
1578         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
1579
1580 2017-08-03  Tom Tromey  <tom@tromey.com>
1581
1582         * python/python.c (compute_python_string): Return std::string.
1583         (gdbpy_eval_from_control_command): Update.
1584         (do_start_initialization): Use std::string.
1585         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
1586         xstrprintf.
1587         * python/py-breakpoint.c (local_setattro): Use string_printf, not
1588         xstrprintf.
1589
1590 2017-08-03  Tom Tromey  <tom@tromey.com>
1591
1592         * top.h (do_restore_instream_cleanup): Remove.
1593         * top.c (do_restore_instream_cleanup): Remove.
1594         (read_command_file): Use scoped_restore.
1595         * cli/cli-script.c (execute_user_command): Use scoped_restore.
1596
1597 2017-08-03  Tom Tromey  <tom@tromey.com>
1598
1599         * cli/cli-script.c (execute_user_command)
1600         (execute_control_command): Use scoped_restore.
1601
1602 2017-08-03  Tom Tromey  <tom@tromey.com>
1603
1604         * cli/cli-script.c (do_restore_user_call_depth): Remove.
1605         (execute_user_command): Remove user_call_depth; use
1606         user_args_stack's size instead.
1607
1608 2017-08-03  Tom Tromey  <tom@tromey.com>
1609
1610         * top.h (in_user_command): Remove.
1611         * top.c (in_user_command): Remove.
1612         * cli/cli-script.c (do_restore_user_call_depth)
1613         (execute_user_command): Update.
1614
1615 2017-08-03  Tom Tromey  <tom@tromey.com>
1616
1617         * valops.c (search_struct_method): Use gdb::byte_vector.
1618         * valarith.c (value_concat): Use std::vector.
1619         * target.c (memory_xfer_partial): Use gdb::byte_vector.
1620         (simple_search_memory): Likewise.
1621         * printcmd.c (find_string_backward): Use gdb::byte_vector.
1622         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1623         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1624         * elfread.c (elf_rel_plt_read): Use std::string.
1625         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1626         * cli/cli-dump.c (restore_section_callback): Use
1627         gdb::byte_vector.
1628
1629 2017-08-03  Tom Tromey  <tom@tromey.com>
1630
1631         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1632
1633 2017-08-03  Tom Tromey  <tom@tromey.com>
1634
1635         * tui/tui-regs.c (tui_restore_gdbout): Remove.
1636         (tui_register_format): Use scoped_restore.
1637
1638 2017-08-03  Tom Tromey  <tom@tromey.com>
1639
1640         * reverse.c (exec_direction_default): Remove.
1641         (exec_reverse_once): Use scoped_restore.
1642         * remote.c (restore_remote_timeout): Remove.
1643         (remote_flash_erase, remote_flash_write, remote_flash_done)
1644         (readchar, remote_serial_write): Use scoped_restore.
1645         * cli/cli-script.c (struct source_cleanup_lines_args)
1646         (source_cleanup_lines): Remove.
1647         (script_from_file): Use scoped_restore.
1648         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1649         (source_command): Use scoped_restore.
1650
1651 2017-08-03  Tom Tromey  <tom@tromey.com>
1652
1653         * utils.h (make_cleanup_free_so): Remove.
1654         * utils.c (do_free_so, make_cleanup_free_so): Remove.
1655         * solist.h (struct so_deleter): New.
1656         (so_list_up): New typedef.
1657         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1658
1659 2017-08-03  Tom Tromey  <tom@tromey.com>
1660
1661         * utils.h (make_cleanup_restore_current_language): Remove.
1662         * utils.c (do_restore_current_language)
1663         (make_cleanup_restore_current_language): Remove.
1664         * parse.c (parse_exp_in_context_1)
1665         (parse_expression_with_language): Use
1666         scoped_restore_current_language.
1667         * mi/mi-main.c (mi_cmd_execute): Use
1668         scoped_restore_current_language.
1669         * language.h (scoped_restore_current_language): New class.
1670
1671 2017-08-03  Tom Tromey  <tom@tromey.com>
1672
1673         * compile/compile.c (cleanup_unlink_file): Remove.
1674         (compile_to_object): Use gdb::unlinker.
1675         (eval_compile_command): Likewise.
1676
1677 2017-08-03  Tom Tromey  <tom@tromey.com>
1678
1679         * utils.h (make_cleanup_fclose): Remove.
1680         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1681
1682 2017-08-03  Tom Tromey  <tom@tromey.com>
1683
1684         * top.c (open_terminal_stream): Return gdb_file_up.
1685         (new_ui_command): Update.
1686
1687 2017-08-03  Tom Tromey  <tom@tromey.com>
1688
1689         * source.c (print_source_lines_base, forward_search_command)
1690         (reverse_search_command): Use gdb_file_up.
1691
1692 2017-08-03  Tom Tromey  <tom@tromey.com>
1693
1694         * fbsd-nat.c (fbsd_find_memory_regions): Update.
1695
1696 2017-08-03  Tom Tromey  <tom@tromey.com>
1697
1698         * cli/cli-cmds.c (find_and_open_script): Change return type.
1699         Remove "streamp" and "full_path" parameters.
1700         (source_script_with_search): Update.
1701         * auto-load.c (source_script_file): Update.
1702         * cli/cli-cmds.h (find_and_open_script): Change type.
1703         (open_script): New struct.
1704
1705 2017-08-03  Tom Tromey  <tom@tromey.com>
1706
1707         * xml-support.c (xml_fetch_content_from_file): Update.
1708         * ui-file.c (stdio_file::open): Update.
1709         * tracefile-tfile.c (tfile_start): Update.
1710         * remote.c (remote_file_put, remote_file_get): Update.
1711         * nat/linux-procfs.c (linux_proc_get_int)
1712         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1713         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1714         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1715         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1716         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1717         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1718         * linux-nat.c (linux_proc_pending_signals): Update.
1719         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1720         (file_closer): Remove.
1721         * compile/compile.c (compile_to_object): Update.
1722         * common/filestuff.h (struct gdb_file_deleter): New.
1723         (gdb_file_up): New typedef.
1724         (gdb_fopen_cloexec): Change return type.
1725         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1726         * cli/cli-dump.c (fopen_with_cleanup): Remove.
1727         (dump_binary_file, restore_binary_file): Update.
1728         * auto-load.c (auto_load_objfile_script_1): Update.
1729
1730 2017-08-03  Tom Tromey  <tom@tromey.com>
1731
1732         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1733         (info_static_tracepoint_markers_command): Likewise.
1734         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1735         * skip.c (skip_info): Use ui_out_emit_table.
1736         * progspace.c (print_program_space): Use ui_out_emit_table.
1737         * osdata.c (info_osdata): Use ui_out_emit_table.
1738         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1739         ui_out_emit_table.
1740         * linux-thread-db.c (info_auto_load_libthread_db): Use
1741         ui_out_emit_table.
1742         * inferior.c (print_inferior): Use ui_out_emit_table.
1743         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1744         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1745         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1746         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1747         * ui-out.h (class ui_out_emit_table): New.
1748
1749 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
1750
1751         * mips-tdep.c (mips_fpu_type_str): New function.
1752         (mips_dump_tdep): Call it.
1753
1754 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
1755
1756         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1757         `->mips_fpu_type'.
1758
1759 2017-07-31  Xavier Roirand  <roirand@adacore.com>
1760
1761         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1762
1763 2017-07-27  Xavier Roirand  <roirand@adacore.com>
1764
1765         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1766
1767 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1768
1769         * cli/cli-cmds.c (maintenancechecklist): New variable.
1770         * gdbcmd.h (maintenancechecklist): Declare it.
1771         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1772         Call i386_linux_read_description with different masks.
1773         * maint.c (maintenance_check_command): New function.
1774         (_initialize_maint_cmds): Call add_prefix_cmd.
1775         * target-descriptions.c (tdesc_reg): override operator != and ==.
1776         (tdesc_type): Likewise.
1777         (tdesc_feature): Likewise.
1778         (target_desc): Likewise.
1779         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1780         (maintenance_check_xml_descriptions): New function.
1781         (_initialize_target_descriptions) Add command "xml-descriptions".
1782         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1783
1784 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1785
1786         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1787         Include features/i386/32bit-*.c.
1788         (i386_linux_read_description): Generate target description if it
1789         doesn't exist.
1790         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1791         functions.
1792         * features/i386/32bit-linux.c: Re-generated.
1793         * features/i386/32bit-sse.c: Likewise.
1794         * target-descriptions.c (print_c_feature::visit): Print code to
1795         set register number if needed.
1796         (print_c_feature) <m_next_regnum>: New field.
1797
1798 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1799
1800         * features/Makefile (CFILES): Rename with TDESC_CFILES.
1801         (FEATURE_XMLFILES): New.
1802         (FEATURE_CFILES): New.
1803         New rules.
1804         (clean-cfiles): Remove generated c files.
1805         * features/i386/32bit-avx.c: Generated.
1806         * features/i386/32bit-avx512.c: Generated.
1807         * features/i386/32bit-core.c: Generated.
1808         * features/i386/32bit-linux.c: Generated.
1809         * features/i386/32bit-mpx.c: Generated.
1810         * features/i386/32bit-pkeys.c: Generated.
1811         * features/i386/32bit-sse.c: Generated.
1812         * target-descriptions.c: Include algorithm.
1813         (tdesc_element_visitor): Add method visit_end.
1814         (print_c_tdesc): Implement visit_end.
1815         (print_c_tdesc:: m_filename_after_features): Move it to
1816         protected.
1817         (print_c_feature): New class.
1818         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1819         name starts with "i386/32bit-".
1820
1821 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1822
1823         * target-descriptions.c (tdesc_element_visitor): New class.
1824         (tdesc_element): New class.
1825         (tdesc_reg): Inherit from tdesc_element.
1826         (tdesc_reg::accept): New function.
1827         (tdesc_type): Inherit from tdesc_element.
1828         (tdesc_type::accept): New function.
1829         (tdesc_feature): Inherit from tdesc_element.
1830         (tdesc_feature::accept): New function.
1831         (target_desc): Inherit from tdesc_element.
1832         (target_desc::target_desc): New.
1833         (target_desc::~target_desc): New.
1834         (target_desc::accept): New.
1835         (allocate_target_description): Use new.
1836         (free_target_description): Use delete.
1837         (print_c_tdesc): New class.
1838         (maint_print_c_tdesc_cmd): Adjust.
1839
1840         * features/aarch64.c: Re-generated.
1841         * features/arc-arcompact.c: Re-generated.
1842         * features/arc-v2.c: Re-generated.
1843         * features/arm/arm-with-iwmmxt.c: Re-generated.
1844         * features/arm/arm-with-m.c: Re-generated.
1845         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1846         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1847         * features/arm/arm-with-neon.c: Re-generated.
1848         * features/arm/arm-with-vfpv2.c: Re-generated.
1849         * features/arm/arm-with-vfpv3.c: Re-generated.
1850         * features/i386/amd64-avx-avx512.c: Re-generated.
1851         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1852         * features/i386/amd64-avx.c: Re-generated.
1853         * features/i386/amd64-avx-linux.c: Re-generated.
1854         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1855         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1856         * features/i386/amd64-avx-mpx.c: Re-generated.
1857         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1858         * features/i386/amd64.c: Re-generated.
1859         * features/i386/amd64-linux.c: Re-generated.
1860         * features/i386/amd64-mpx.c: Re-generated.
1861         * features/i386/amd64-mpx-linux.c: Re-generated.
1862         * features/i386/i386-avx-avx512.c: Re-generated.
1863         * features/i386/i386-avx-avx512-linux.c: Re-generated.
1864         * features/i386/i386-avx.c: Re-generated.
1865         * features/i386/i386-avx-linux.c: Re-generated.
1866         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1867         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1868         * features/i386/i386-avx-mpx.c: Re-generated.
1869         * features/i386/i386-avx-mpx-linux.c: Re-generated.
1870         * features/i386/i386.c: Re-generated.
1871         * features/i386/i386-linux.c: Re-generated.
1872         * features/i386/i386-mmx.c: Re-generated.
1873         * features/i386/i386-mmx-linux.c: Re-generated.
1874         * features/i386/i386-mpx.c: Re-generated.
1875         * features/i386/i386-mpx-linux.c: Re-generated.
1876         * features/i386/x32-avx-avx512.c: Re-generated.
1877         * features/i386/x32-avx-avx512-linux.c: Re-generated.
1878         * features/i386/x32-avx.c: Re-generated.
1879         * features/i386/x32-avx-linux.c: Re-generated.
1880         * features/i386/x32.c: Re-generated.
1881         * features/i386/x32-linux.c: Re-generated.
1882         * features/microblaze.c: Re-generated.
1883         * features/microblaze-with-stack-protect.c: Re-generated.
1884         * features/mips64-dsp-linux.c: Re-generated.
1885         * features/mips64-linux.c: Re-generated.
1886         * features/mips-dsp-linux.c: Re-generated.
1887         * features/mips-linux.c: Re-generated.
1888         * features/nds32.c: Re-generated.
1889         * features/nios2.c: Re-generated.
1890         * features/nios2-linux.c: Re-generated.
1891         * features/rs6000/powerpc-32.c: Re-generated.
1892         * features/rs6000/powerpc-32l.c: Re-generated.
1893         * features/rs6000/powerpc-403.c: Re-generated.
1894         * features/rs6000/powerpc-403gc.c : Re-generated.
1895         * features/rs6000/powerpc-405.c: Re-generated.
1896         * features/rs6000/powerpc-505.c: Re-generated.
1897         * features/rs6000/powerpc-601.c: Re-generated.
1898         * features/rs6000/powerpc-602.c: Re-generated.
1899         * features/rs6000/powerpc-603.c: Re-generated.
1900         * features/rs6000/powerpc-604.c: Re-generated.
1901         * features/rs6000/powerpc-64.c: Re-generated.
1902         * features/rs6000/powerpc-64l.c: Re-generated.
1903         * features/rs6000/powerpc-7400.c: Re-generated.
1904         * features/rs6000/powerpc-750.c: Re-generated.
1905         * features/rs6000/powerpc-860.c: Re-generated.
1906         * features/rs6000/powerpc-altivec32.c: Re-generated.
1907         * features/rs6000/powerpc-altivec32l.c: Re-generated.
1908         * features/rs6000/powerpc-altivec64.c: Re-generated.
1909         * features/rs6000/powerpc-altivec64l.c: Re-generated.
1910         * features/rs6000/powerpc-cell32l.c: Re-generated.
1911         * features/rs6000/powerpc-cell64l.c: Re-generated.
1912         * features/rs6000/powerpc-e500.c: Re-generated.
1913         * features/rs6000/powerpc-e500l.c: Re-generated.
1914         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
1915         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
1916         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
1917         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
1918         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
1919         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
1920         * features/rs6000/powerpc-vsx32.c: Re-generated.
1921         * features/rs6000/powerpc-vsx32l.c: Re-generated.
1922         * features/rs6000/powerpc-vsx64.c: Re-generated.
1923         * features/rs6000/powerpc-vsx64l.c: Re-generated.
1924         * features/rs6000/rs6000.c: Re-generated.
1925         * features/s390-linux32.c: Re-generated.
1926         * features/s390-linux32v1.c: Re-generated.
1927         * features/s390-linux32v2.c: Re-generated.
1928         * features/s390-linux64.c: Re-generated.
1929         * features/s390-linux64v1.c: Re-generated.
1930         * features/s390-linux64v2.c: Re-generated.
1931         * features/s390-te-linux64.c: Re-generated.
1932         * features/s390-tevx-linux64.c: Re-generated.
1933         * features/s390-vx-linux64.c: Re-generated.
1934         * features/s390x-linux64.c: Re-generated.
1935         * features/s390x-linux64v1.c: Re-generated.
1936         * features/s390x-linux64v2.c: Re-generated.
1937         * features/s390x-te-linux64.c: Re-generated.
1938         * features/s390x-tevx-linux64.c: Re-generated.
1939         * features/s390x-vx-linux64.c: Re-generated.
1940         * features/sparc/sparc32-solaris.c: Re-generated.
1941         * features/sparc/sparc64-solaris.c: Re-generated.
1942         * features/tic6x-c62x.c: Re-generated.
1943         * features/tic6x-c62x-linux.c: Re-generated.
1944         * features/tic6x-c64x.c: Re-generated.
1945         * features/tic6x-c64x-linux.c: Re-generated.
1946         * features/tic6x-c64xp.c: Re-generated.
1947         * features/tic6x-c64xp-linux.c: Re-generated.
1948
1949 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1950
1951         * i386-linux-tdep.c (i386_linux_read_description): New function.
1952         (i386_linux_core_read_description): Call
1953         i386_linux_read_description.
1954         * i386-linux-tdep.h (i386_linux_read_description): Declare.
1955         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
1956         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
1957         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
1958         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
1959         * x86-linux-nat.c (x86_linux_read_description): Call
1960         i386_linux_read_description.
1961
1962 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1963
1964         * NEWS: Mention it.
1965         * features/Makefile (%.c: %.xml): Pass the xml file name to
1966         command "maint print c-tdesc".
1967         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
1968         name from 'arg'.
1969
1970 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1971
1972         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
1973         in-class initialization.
1974         (tdesc_create_feature): Call new instead of XCNEW.
1975         (free_target_description): Ue delete.
1976
1977 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
1978
1979         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
1980
1981 2017-07-25  Yao Qi  <yao.qi@linaro.org>
1982
1983         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
1984         constant.
1985         (amd64_x32_init_abi): Likewise.
1986         * amd64-tdep.h (amd64_init_abi): Update declaration.
1987         (amd64_x32_init_abi): Likewise.
1988
1989 2017-07-25  Yao Qi  <yao.qi@linaro.org>
1990
1991         PR tdep/21717
1992         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
1993         condition for FPSCR.
1994         (arm_linux_store_inferior_registers): Likewise.
1995
1996 2017-07-22  Tom Tromey  <tom@tromey.com>
1997
1998         * break-catch-syscall.c (struct catch_syscall_inferior_data)
1999         <syscalls_counts>: Now a std::vector.
2000         (get_catch_syscall_inferior_data): Use "new".
2001         (catch_syscall_inferior_data_cleanup): Use "delete".
2002         (insert_catch_syscall, remove_catch_syscall)
2003         (clear_syscall_counts): Update.
2004
2005 2017-07-22  Tom Tromey  <tom@tromey.com>
2006
2007         * break-catch-syscall.c (syscall_catchpoint)
2008         <syscalls_to_be_caught>: Now a std::vector<int>
2009         (~syscall_catchpoint): Remove.
2010         (insert_catch_syscall, remove_catch_syscall)
2011         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
2012         (print_mention_catch_syscall, print_recreate_catch_syscall):
2013         Update.
2014         (create_syscall_event_catchpoint): Change type of "filter"
2015         parameter.
2016         (catch_syscall_split_args): Return a std::vector.
2017         (catch_syscall_command_1, catching_syscall_number_1): Update.
2018
2019 2017-07-22  Tom Tromey  <tom@tromey.com>
2020
2021         * break-catch-throw.c (struct exception_catchpoint)
2022         <exception_rx>: Now a std::string.
2023         (~exception_catchpoint): Remove.
2024         (print_one_detail_exception_catchpoint): Update.
2025         (handle_gnu_v3_exceptions): Change type of except_rx.
2026         (extract_exception_regexp): Return a std::string.
2027         (catch_exception_command_1): Update.
2028
2029 2017-07-22  Tom Tromey  <tom@tromey.com>
2030
2031         * break-catch-sig.c (gdb_signal_type): Remove typedef.
2032         (struct signal_catchpoint) <signals_to_be_caught>: Now a
2033         std::vector.
2034         <catch_all>: Now a bool.
2035         (~signal_catchpoint): Remove.
2036         (signal_catchpoint_insert_location)
2037         (signal_catchpoint_remove_location)
2038         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
2039         (signal_catchpoint_print_mention)
2040         (signal_catchpoint_print_recreate)
2041         (signal_catchpoint_explains_signal): Update.
2042         (create_signal_catchpoint): Change type of "filter" and
2043         "catch_all".
2044         (catch_signal_split_args): Return a std::vector.  Change type of
2045         "catch_all".
2046         (catch_signal_command): Update.
2047
2048 2017-07-20  Pedro Alves  <palves@redhat.com>
2049
2050         * ada-lang.c (ada_language_defn): Make extern.
2051         (_initialize_ada_language): Remove add_language call.
2052         * c-lang.c (c_language_defn, cplus_language_defn)
2053         (asm_language_defn, minimal_language_defn): Make extern.
2054         (_initialize_c_language): Delete.
2055         * completer.c (compare_cstrings): Delete, moved to utils.h.
2056         * d-lang.c (d_language_defn): Make extern.
2057         (_initialize_d_language): Remove add_language calls.
2058         * defs.h (enum language): Add comment.
2059         * f-lang.c (f_language_defn): Make extern.
2060         (_initialize_f_language): Remove add_language call.
2061         * go-lang.c (go_language_defn): Make extern.
2062         (_initialize_go_language): Remove add_language call.
2063         * language.c: Include <algorithm>.
2064         (languages): Redefine as const array.
2065         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
2066         (set_language_command): Handle "local".  Use for-range loop.
2067         (set_language): Remove loop.
2068         (language_enum): Rewrite.
2069         (language_def, language_str): Remove loops.
2070         (add_language): Delete.
2071         (add_set_language_command): New, based on add_languages.
2072         (skip_language_trampoline): Adjust.
2073         (local_language_defn): Delete.
2074         (language_gdbarch_post_init): Adjust.
2075         (_initialize_language): Remove add_language calls.  Call
2076         add_set_language_command.
2077         * language.h (add_language): Delete.
2078         (auto_language_defn)
2079         (unknown_language_defn, minimal_language_defn, ada_language_defn)
2080         (asm_language_defn, c_language_defn, cplus_language_defn)
2081         (d_language_defn, f_language_defn, go_language_defn)
2082         (m2_language_defn, objc_language_defn, opencl_language_defn)
2083         (pascal_language_defn, rust_language_defn): Declare.
2084         * m2-lang.c (m2_language_defn): Make extern.
2085         (_initialize_m2_language): Remove add_language call.
2086         * objc-lang.c (objc_language_defn): Make extern.
2087         (_initialize_objc_language): Remove add_language call.
2088         * opencl-lang.c (opencl_language_defn): Make extern.
2089         (_initialize_opencl_language): Remove add_language call.
2090         * p-lang.c (pascal_language_defn): Make extern.
2091         (_initialize_pascal_language): Delete.
2092         * rust-lang.c (rust_language_defn): Make extern.
2093         (_initialize_rust_language): Delete.
2094         * utils.h (compare_cstrings): New static inline function.
2095
2096 2017-07-20  Pedro Alves  <palves@redhat.com>
2097
2098         * ada-lang.c (ada_to_fixed_type_1): Adjust.
2099         (get_var_value): Constify parameters.
2100         (get_int_var_value): Change prototype.
2101         (to_fixed_range_type): Adjust.
2102         * ada-lang.h (get_int_var_value): Change prototype.
2103
2104 2017-07-20  Pedro Alves  <palves@redhat.com>
2105
2106         * dwarf2read.c (dw2_lookup_symbol): Use
2107         SYMBOL_MATCHES_SEARCH_NAME.
2108         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
2109
2110 2017-07-20  Pedro Alves  <palves@redhat.com>
2111
2112         * block.c (block_iter_name_step, block_iter_name_first)
2113         (block_iter_name_next): Delete.
2114         (block_lookup_symbol_primary): Adjust to use
2115         dict_iter_match_first/dict_iter_match_next.
2116         * block.h (block_iter_name_first, block_iter_name_next): Delete
2117         declarations.
2118         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
2119         dict_iter_match_first/dict_iter_match_next.
2120
2121 2017-07-20  Pedro Alves  <palves@redhat.com>
2122
2123         * cp-support.c (cp_find_first_component_aux): Add missing case for
2124         end of string.
2125
2126 2017-07-18  David Blaikie  <dblaikie@gmail.com>
2127
2128         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
2129         of dwo_cu's dwo_file.
2130
2131 2017-07-18  Yao Qi  <yao.qi@linaro.org>
2132
2133         * remote.c (store_registers_using_G): Remove one line comment.
2134
2135 2017-07-18  Yao Qi  <yao.qi@linaro.org>
2136
2137         * regcache.c (regcache_cpy): Simplify it.
2138         (regcache::cpy_no_passthrough): Remove it.
2139         * regcache.h (cpy_no_passthrough): Remove it.
2140         (regcache_dup, regcache_cpy): Update comments.
2141
2142 2017-07-18  Pedro Alves  <palves@redhat.com>
2143
2144         * remote-sim.c (sim_command_completer): Adjust to work with a
2145         completion_tracker instead of a VEC.
2146
2147 2017-07-17  Pedro Alves  <palves@redhat.com>
2148
2149         * completer.c (complete_source_filenames): New function.
2150         (complete_address_and_linespec_locations): New function.
2151         (location_completer): Use complete_address_and_linespec_locations.
2152         (completion_tracker::build_completion_result): Honor the tracker's
2153         request to suppress append.
2154         * completer.h (completion_tracker::suppress_append_ws)
2155         (completion_tracker::set_suppress_append_ws): New methods.
2156         (completion_tracker::m_suppress_append_ws): New field.
2157         (complete_source_filenames): New declaration.
2158         * linespec.c (linespec_complete_what): New.
2159         (struct ls_parser) <complete_what, completion_word,
2160         completion_quote_char, completion_quote_end, completion_tracker>:
2161         New fields.
2162         (string_find_incomplete_keyword_at_end): New.
2163         (linespec_lexer_lex_string): Record quote char.  If in completion
2164         mode, don't throw.
2165         (linespec_lexer_consume_token): Advance the completion word point.
2166         (linespec_lexer_peek_token): Save/restore completion info.
2167         (save_stream_and_consume_token): New.
2168         (set_completion_after_number): New.
2169         (linespec_parse_basic): Set what to complete next depending on
2170         token.  Handle function and label completions specially.
2171         (parse_linespec): Disable objc shortcut in completion mode.  Set
2172         what to complete next depending on token type.  Skip keyword if in
2173         completion mode.
2174         (complete_linespec_component, linespec_complete): New.
2175         * linespec.h (linespec_complete): Declare.
2176
2177 2017-07-17  Pedro Alves  <palves@redhat.com>
2178
2179         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
2180         Handle 'operator<' / 'operator<<'.
2181
2182 2017-07-17  Pedro Alves  <palves@redhat.com>
2183
2184         * completer.c (collect_explicit_location_matches): Handle
2185         MATCH_LABEL.
2186         (convert_explicit_location_to_linespec): New, factored out from
2187         ...
2188         (convert_explicit_location_to_sals): ... this.
2189         (complete_label): New.
2190         (linespec_complete_label, find_label_symbols_in_block): New.
2191         (find_label_symbols): Add completion_mode parameter and adjust to
2192         call find_label_symbols_in_block.
2193         * linespec.h (linespec_complete_label): Declare.
2194
2195 2017-07-17  Pedro Alves  <palves@redhat.com>
2196
2197         * ada-lang.c (ada_collect_symbol_completion_matches): Add
2198         complete_symbol_mode parameter.
2199         * cli/cli-cmds.c (complete_command): Get the completion result out
2200         of the handle_brkchars tracker if used a custom word point.
2201         * completer.c: Include "linespec.h".
2202         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
2203         (advance_to_expression_complete_word_point): New.
2204         (completion_tracker::completes_to_completion_word): New.
2205         (complete_files_symbols): Pass down
2206         complete_symbol_mode::EXPRESSION.
2207         (explicit_options, probe_options): New.
2208         (collect_explicit_location_matches): Complete on the
2209         explictit_loc->foo instead of word.  Use
2210         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
2211         keyword and options completions.
2212         (backup_text_ptr): Delete.
2213         (skip_keyword): New.
2214         (complete_explicit_location): Remove 'word' parameter.  Add
2215         language, quoted_arg_start and quoted_arg_end parameters.
2216         Rewrite, parsing left to right.
2217         (location_completer): Rewrite.
2218         (location_completer_handle_brkchars): New function.
2219         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
2220         (enum complete_line_internal_reason): Adjust comments.
2221         (completion_tracker::discard_completions): New.
2222         (completer_handle_brkchars_func_for_completer): Handle
2223         location_completer.
2224         (gdb_custom_word_point_brkchars)
2225         (gdb_org_rl_basic_quote_characters): New.
2226         (gdb_completion_word_break_characters_throw)
2227         (completion_find_completion_word): Handle trackers that use a
2228         custom word point.
2229         (completion_tracker::advance_custom_word_point_by): New.
2230         (completion_tracker::build_completion_result): Don't rely on
2231         readline appending the quote char.
2232         (gdb_rl_attempted_completion_function_throw): Handle trackers that
2233         use a custom word point.
2234         (gdb_rl_attempted_completion_function): Restore
2235         rl_basic_quote_characters.
2236         * completer.h (class completion_tracker): Extend intro comment.
2237         (completion_tracker::set_quote_char)
2238         (completion_tracker::quote_char)
2239         (completion_tracker::set_use_custom_word_point)
2240         (completion_tracker::use_custom_word_point)
2241         (completion_tracker::custom_word_point)
2242         (completion_tracker::set_custom_word_point)
2243         (completion_tracker::advance_custom_word_point_by)
2244         (completion_tracker::completes_to_completion_word)
2245         (completion_tracker::discard_completions): New methods.
2246         (completion_tracker::m_quote_char)
2247         (completion_tracker::m_use_custom_word_point)
2248         (completion_tracker::m_custom_word_point): New fields.
2249         (advance_to_expression_complete_word_point): Declare.
2250         * f-lang.c (f_collect_symbol_completion_matches): Add
2251         complete_symbol_mode parameter.
2252         * language.h (struct language_defn)
2253         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
2254         parameter.
2255         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
2256         (linespec_complete_function): New function.
2257         (linespec_lexer_lex_keyword): Adjust.
2258         * linespec.h (linespec_keywords, linespec_complete_function): New
2259         declarations.
2260         * location.c (find_end_quote): New function.
2261         (explicit_location_lex_one): Add explicit_completion_info
2262         parameter.  Save quoting info.  Don't throw if being called for
2263         completion.  Don't handle Ada operators here.
2264         (is_cp_operator, skip_op_false_positives, first_of)
2265         (explicit_location_lex_one_function): New function.
2266         (string_to_explicit_location): Replace 'dont_throw' parameter with
2267         an explicit_completion_info pointer parameter.  Handle it.  Don't
2268         use explicit_location_lex_one to lex function names.  Use
2269         explicit_location_lex_one_function instead.
2270         * location.h (struct explicit_completion_info): New.
2271         (string_to_explicit_location): Replace 'dont_throw' parameter with
2272         an explicit_completion_info pointer parameter.
2273         * symtab.c (default_collect_symbol_completion_matches_break_on):
2274         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
2275         (default_collect_symbol_completion_matches)
2276         (collect_symbol_completion_matches): Add complete_symbol_mode
2277         parameter.
2278         (collect_symbol_completion_matches_type): Pass down
2279         complete_symbol_mode::EXPRESSION.
2280         (collect_file_symbol_completion_matches): Add complete_symbol_mode
2281         parameter.  Handle LINESPEC mode.
2282         * symtab.h (complete_symbol_mode): New.
2283         (default_collect_symbol_completion_matches_break_on)
2284         (default_collect_symbol_completion_matches)
2285         (collect_symbol_completion_matches)
2286         (collect_file_symbol_completion_matches): Add complete_symbol_mode
2287         parameter.
2288
2289 2017-07-17  Pedro Alves  <palves@redhat.com>
2290
2291         * utils.c (enum class strncmp_iw_mode): New.
2292         (strcmp_iw): Rename to ...
2293         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
2294         parameters.  Handle them.
2295         (strncmp_iw): New.
2296         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
2297         * utils.h (strncmp_iw): Declare.
2298         (strcmp_iw): Move describing comments here.
2299
2300 2017-07-17  Pedro Alves  <palves@redhat.com>
2301
2302         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
2303         CP_OPERATOR_STR.
2304         * c-typeprint.c (is_type_conversion_operator): Use
2305         CP_OPERATOR_STR.
2306         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
2307         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
2308         CP_OPERATOR_LEN.
2309         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
2310         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
2311         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
2312         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
2313         CP_OPERATOR_STR.
2314         * location.c: Include "cp-support.h".
2315         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
2316         CP_OPERATOR_STR.
2317         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
2318         CP_OPERATOR_LEN.
2319
2320 2017-07-17  Pedro Alves  <palves@redhat.com>
2321
2322         * cli/cli-cmds.c (complete_command): Use a completion tracker
2323         along with completion_find_completion_word for handle_brkchars
2324         phase.
2325         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
2326         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
2327         (struct gdb_rl_completion_word_info): New.
2328         (gdb_rl_find_completion_word): New.
2329         (completion_find_completion_word): New.
2330         * completer.h (completion_find_completion_word): Declare.
2331
2332 2017-07-17  Pedro Alves  <palves@redhat.com>
2333
2334         * ada-lang.c (symbol_completion_match): Adjust comments.
2335         (symbol_completion_add): Replace vector parameter with
2336         completion_tracker parameter.  Use it.
2337         (ada_make_symbol_completion_list): Rename to...
2338         (ada_collect_symbol_completion_matches): ... this.  Add
2339         completion_tracker parameter and use it.
2340         (ada_language_defn): Adjust.
2341         * break-catch-syscall.c (catch_syscall_completer): Adjust
2342         prototype and work with completion_tracker instead of VEC.
2343         * breakpoint.c (condition_completer): Adjust prototype and work
2344         with completion_tracker instead of VEC.
2345         * c-lang.c (c_language_defn, cplus_language_defn)
2346         (asm_language_defn, minimal_language_defn): Adjust to renames.
2347         * cli/cli-cmds.c (complete_command): Rework using
2348         completion_tracker.  Catch exceptions when completing.
2349         * cli/cli-decode.c (integer_unlimited_completer)
2350         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
2351         with completion_tracker instead of VEC.
2352         * command.h (struct completion_tracker): Forward declare.
2353         (completer_ftype, completer_handle_brkchars_ftype): Change
2354         types.
2355         (complete_on_cmdlist, complete_on_enum): Adjust.
2356         * completer.c: Include <algorithm>.
2357         (struct gdb_completer_state): New.
2358         (current_completion): New global.
2359         (readline_line_completion_function): Delete.
2360         (noop_completer, filename_completer)
2361         (filename_completer_handle_brkchars, complete_files_symbols)
2362         (linespec_location_completer): Adjust to work with a
2363         completion_tracker instead of a VEC.
2364         (string_or_empty): New.
2365         (collect_explicit_location_matches): Adjust to work with a
2366         completion_tracker instead of a VEC.
2367         (explicit_location_completer): Rename to ...
2368         (complete_explicit_location): ... this and adjust to work with a
2369         completion_tracker instead of a VEC.
2370         (location_completer): Adjust to work with a completion_tracker
2371         instead of a VEC.
2372         (add_struct_fields): Adjust to work with a completion_list instead
2373         of VEC.
2374         (expression_completer): Rename to ...
2375         (complete_expression): ... this and adjust to work with a
2376         completion_tracker instead of a VEC.  Use complete_files_symbols.
2377         (expression_completer): Reimplement on top of complete_expression.
2378         (symbol_completer): Adjust to work with a completion_tracker
2379         instead of a VEC.
2380         (enum complete_line_internal_reason): Add describing comments.
2381         (complete_line_internal_normal_command): Adjust to work with a
2382         completion_tracker instead of a VEC.
2383         (complete_line_internal): Rename to ...
2384         (complete_line_internal_1): ... this and adjust to work with a
2385         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
2386         handle_brkchars phase.
2387         (new_completion_tracker): Delete.
2388         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
2389         complete_line_internal_1.
2390         (free_completion_tracker): Delete.
2391         (INITIAL_COMPLETION_HTAB_SIZE): New.
2392         (completion_tracker::completion_tracker)
2393         (completion_tracker::~completion_tracker): New.
2394         (maybe_add_completion): Delete.
2395         (completion_tracker::maybe_add_completion)
2396         (completion_tracker::add_completion)
2397         (completion_tracker::add_completions): New.
2398         (throw_max_completions_reached_error): Delete.
2399         (complete_line): Adjust to work with a completion_tracker instead
2400         of a VEC.  Don't create a completion_tracker_t or check for max
2401         completions here.
2402         (command_completer, command_completer_handle_brkchars)
2403         (signal_completer, reg_or_group_completer_1)
2404         (reg_or_group_completer, default_completer_handle_brkchars):
2405         Adjust to work with a completion_tracker.
2406         (gdb_completion_word_break_characters_throw): New.
2407         (gdb_completion_word_break_characters): Reimplement.
2408         (line_completion_function): Delete.
2409         (completion_tracker::recompute_lowest_common_denominator)
2410         (expand_preserving_ws)
2411         (completion_tracker::build_completion_result)
2412         (completion_result::completion_result)
2413         (completion_result::completion_result)
2414         (completion_result::~completion_result)
2415         (completion_result::completion_result)
2416         (completion_result::release_match_list, compare_cstrings)
2417         (completion_result::sort_match_list)
2418         (completion_result::reset_match_list)
2419         (gdb_rl_attempted_completion_function_throw)
2420         (gdb_rl_attempted_completion_function): New.
2421         * completer.h (completion_list, struct completion_result)
2422         (class completion_tracker): New.
2423         (complete_line): Add completion_tracker parameter.
2424         (readline_line_completion_function): Delete.
2425         (gdb_rl_attempted_completion_function): New.
2426         (noop_completer, filename_completer, expression_completer)
2427         (location_completer, symbol_completer, command_completer)
2428         (signal_completer, reg_or_group_completer): Update prototypes.
2429         (completion_tracker_t, new_completion_tracker)
2430         (make_cleanup_free_completion_tracker): Delete.
2431         (enum maybe_add_completion_enum): Delete.
2432         (maybe_add_completion): Delete.
2433         (throw_max_completions_reached_error): Delete.
2434         * corefile.c (complete_set_gnutarget): Adjust to work with a
2435         completion_tracker instead of a VEC.
2436         * cp-abi.c (cp_abi_completer): Adjust to work with a
2437         completion_tracker instead of a VEC.
2438         * d-lang.c (d_language_defn): Adjust.
2439         * disasm.c (disassembler_options_completer): Adjust to work with a
2440         completion_tracker instead of a VEC.
2441         * f-lang.c (f_make_symbol_completion_list): Rename to ...
2442         (f_collect_symbol_completion_matches): ... this.  Adjust to work
2443         with a completion_tracker instead of a VEC.
2444         (f_language_defn): Adjust.
2445         * go-lang.c (go_language_defn): Adjust.
2446         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
2447         Adjust to work with a completion_tracker instead of a VEC.
2448         * infrun.c (handle_completer): Likewise.
2449         * interps.c (interpreter_completer): Likewise.
2450         * interps.h (interpreter_completer): Likewise.
2451         * language.c (unknown_language_defn, auto_language_defn)
2452         (local_language_defn): Adjust.
2453         * language.h (language_defn::la_make_symbol_completion_list):
2454         Rename to ...
2455         (language_defn::la_collect_symbol_completion_matches): ... this
2456         and adjust to work with a completion_tracker instead of a VEC.
2457         * m2-lang.c (m2_language_defn): Adjust.
2458         * objc-lang.c (objc_language_defn): Adjust.
2459         * opencl-lang.c (opencl_language_defn): Adjust.
2460         * p-lang.c (pascal_language_defn): Adjust.
2461         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
2462         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
2463         with a completion_tracker.
2464         * rust-lang.c (rust_language_defn): Adjust.
2465         * symtab.c (free_completion_list, do_free_completion_list)
2466         (return_val, completion_tracker): Delete.
2467         (completion_list_add_name, completion_list_add_symbol)
2468         (completion_list_add_msymbol, completion_list_objc_symbol)
2469         (completion_list_add_fields, add_symtab_completions): Add
2470         completion_tracker parameter and use it.
2471         (default_make_symbol_completion_list_break_on_1): Rename to...
2472         (default_collect_symbol_completion_matches_break_on): ... this.
2473         Add completion_tracker parameter and use it instead of allocating
2474         a completion tracker here.
2475         (default_make_symbol_completion_list_break_on): Delete old
2476         implementation.
2477         (default_make_symbol_completion_list): Delete.
2478         (default_collect_symbol_completion_matches): New.
2479         (make_symbol_completion_list): Delete.
2480         (collect_symbol_completion_matches): New.
2481         (make_symbol_completion_type): Rename to ...
2482         (collect_symbol_completion_matches_type): ... this.  Add
2483         completion_tracker parameter and use it instead of VEC.
2484         (make_file_symbol_completion_list_1): Rename to...
2485         (collect_file_symbol_completion_matches): ... this.  Add
2486         completion_tracker parameter and use it instead of VEC.
2487         (make_file_symbol_completion_list): Delete.
2488         (add_filename_to_list): Use completion_list instead of a VEC.
2489         (add_partial_filename_data::list): Now a completion_list.
2490         (make_source_files_completion_list): Work with a completion_list
2491         instead of a VEC.
2492         * symtab.h: Include "completer.h".
2493         (default_make_symbol_completion_list_break_on)
2494         (default_make_symbol_completion_list, make_symbol_completion_list)
2495         (make_symbol_completion_type, make_file_symbol_completion_list)
2496         (make_source_files_completion_list): Delete.
2497         (default_collect_symbol_completion_matches_break_on)
2498         (default_collect_symbol_completion_matches)
2499         (collect_symbol_completion_matches)
2500         (collect_symbol_completion_matches_type)
2501         (collect_file_symbol_completion_matches)
2502         (make_source_files_completion_list): New.
2503         * top.c (init_main): Don't install a rl_completion_entry_function
2504         hook.  Install a rl_attempted_completion_function hook instead.
2505         * tui/tui-layout.c (layout_completer): Adjust to work with a
2506         completion_tracker.
2507         * tui/tui-regs.c (tui_reggroup_completer):
2508         * tui/tui-win.c (window_name_completer, focus_completer)
2509         (winheight_completer): Adjust to work with a completion_tracker.
2510         * value.c: Include "completer.h".
2511         (complete_internalvar): Adjust to work with a completion_tracker.
2512         * value.h (complete_internalvar): Likewise.
2513
2514 2017-07-17  Pedro Alves  <palves@redhat.com>
2515
2516         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
2517         renames.
2518         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
2519         comments to completer_ftype's declaration.
2520         <completer_handle_brkchars>: Change type to
2521         completer_handle_brkchars_ftype.
2522         * command.h (completer_ftype): Add describing comment and give
2523         names to parameters.
2524         (completer_ftype_void): Rename to ...
2525         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
2526         (set_cmd_completer_handle_brkchars): Adjust.
2527         * completer.c (filename_completer_handle_brkchars): New function.
2528         (complete_line_internal_normal_command): New function, factored
2529         out from ...
2530         (complete_line_internal): ... here.
2531         (command_completer_handle_brkchars)
2532         (default_completer_handle_brkchars)
2533         (completer_handle_brkchars_func_for_completer): New functions.
2534         * completer.h (set_gdb_completion_word_break_characters): Delete
2535         declaration.
2536         (completer_handle_brkchars_func_for_completer): New declaration.
2537         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
2538         completer_handle_brkchars_func_for_completer.
2539
2540 2017-07-17  Pedro Alves  <palves@redhat.com>
2541
2542         * completer.c (symbol_completer): New function, based on
2543         make_symbol_completion_list_fn.
2544         * completer.h (symbol_completer): New declaration.
2545         * guile/scm-cmd.c (cmdscm_completers): Adjust.
2546         * python/py-cmd.c (completers): Adjust.
2547         * symtab.c (make_symbol_completion_list_fn): Delete.
2548         * symtab.h (make_symbol_completion_list_fn): Delete.
2549         * cli/cli-decode.c (add_cmd): Adjust.
2550
2551 2017-07-17  Pedro Alves  <palves@redhat.com>
2552
2553         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
2554         * dwarf2read.c: Include "filename-seen-cache.h".
2555         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
2556         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
2557         * filename-seen-cache.c: New file.
2558         * filename-seen-cache.h: New file.
2559         * symtab.c: Include "filename-seen-cache.h".
2560         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
2561         (create_filename_seen_cache, clear_filename_seen_cache)
2562         (delete_filename_seen_cache, filename_seen): Delete, parts moved
2563         to filename-seen-cache.h/filename-seen-cache.c.
2564         (output_source_filename, sources_info)
2565         (maybe_add_partial_symtab_filename)
2566         (make_source_files_completion_list): Adjust to use
2567         filename_seen_cache.
2568
2569 2017-07-17  Pedro Alves  <palves@redhat.com>
2570
2571         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
2572         fields.
2573         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
2574         dwarf2_debug_sections*)): New.
2575         (dwarf2_per_objfile::dwarf2_per_objfile(const
2576         dwarf2_per_objfile&)): Declare as deleted.
2577         (dwarf2_per_objfile::operator=): Declare as deleted.
2578         (dwarf2_per_objfile::dwarf2_per_objfile)
2579         (dwarf2_per_objfile::~dwarf2_per_objfile)
2580         (dwarf2_per_objfile::free_cached_comp_units): New.
2581         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
2582         ctor.  Call dwarf2_per_objfile's ctor manually.
2583         (dwarf2_locate_sections): Deleted/refactored as ...
2584         (dwarf2_per_objfile::locate_sections): ... this new method.
2585         (free_cached_comp_units): Defer to
2586         dwarf2_per_objfile::free_cached_comp_units.
2587         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
2588
2589 2017-07-14  Tom Tromey  <tom@tromey.com>
2590
2591         PR rust/21764:
2592         * rust-exp.y (convert_ast_to_expression): Add "want_type"
2593         parameter.
2594         <UNOP_SIZEOF>: Split into separate case.
2595         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
2596
2597 2017-07-14  Tom Tromey  <tom@tromey.com>
2598
2599         PR rust/21763:
2600         * symtab.c (symbol_matches_domain): Add language_rust to special
2601         case.
2602         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2603         treat LOC_TYPEDEF symbols as variables.
2604
2605 2017-07-14  Pedro Alves  <palves@redhat.com>
2606
2607         * symtab.c (make_file_symbol_completion_list_1): Iterate over
2608         symtabs matching all symtabs with SRCFILE as file name instead of
2609         only considering the first hit, with lookup_symtab.
2610
2611 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2612
2613         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2614         operator_name parameters.
2615         (gen_expr): Update function call.
2616
2617 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2618
2619         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2620         parameter.
2621         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2622         Likewise.
2623         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2624         parameter, use agent_expr::gdbarch instead, update function
2625         calls.
2626         (locexpr_tracepoint_var_ref): Likewise.
2627         (loclist_tracepoint_var_ref): Likewise.
2628         * ax-gdb.c (gen_trace_static_fields): Likewise.
2629         (gen_traced_pop): Likewise.
2630         (gen_frame_args_address): Likewise.
2631         (gen_frame_locals_address): Likewise.
2632         (gen_var_ref): Likewise.
2633         (gen_struct_ref_recursive): Likewise.
2634         (gen_static_field): Likewise.
2635         (gen_maybe_namespace_elt): Likewise.
2636         (gen_expr): Likewise.
2637         (gen_trace_for_var): Likewise.
2638         (gen_trace_for_expr): Likewise.
2639         (gen_trace_for_return_address): Likewise.
2640
2641 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2642
2643         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2644         parameter.
2645         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2646
2647 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2648
2649         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2650         from ax, update calls.
2651         (gen_usual_arithmetic): Likewise.
2652         (gen_integral_promotions): Likewise.
2653         (gen_bitfield_ref): Likewise.
2654         (gen_primitive_field): Likewise.
2655         (gen_struct_ref_recursive): Likewise.
2656         (gen_struct_ref): Likewise.
2657         (gen_maybe_namespace_elt): Likewise.
2658         (gen_struct_elt_for_reference): Likewise.
2659         (gen_namespace_elt): Likewise.
2660         (gen_aggregate_elt_ref): Likewise.
2661         (gen_expr): Get gdbarch from ax, update calls.
2662         (gen_expr_binop_rest): Likewise.
2663
2664 2017-07-13  Pedro Alves  <palves@redhat.com>
2665
2666         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2667         as default tdesc.
2668         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2669         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2670         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2671         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
2672         tdep.
2673         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2674         Get final tdesc from the tdep.
2675         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2676         default tdesc.
2677         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2678         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2679         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2680         Use it as default tdesc.
2681         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2682         down to amd_init_abi.  No longer handle fallback tdesc here.
2683         * amd64-tdep.h (tdesc_x32): Declare.
2684         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2685         parameter.
2686         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2687         as default tdesc.
2688
2689 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2690
2691         * s390-linux-tdep.c (s390_process_record): Add support for
2692         instructions new in arch12.
2693
2694 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
2695
2696         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2697         PT_GETFSBASE and PT_GETGSBASE.
2698         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2699         PT_SETGSBASE.
2700
2701 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
2702
2703         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2704         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2705         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2706         those rules.
2707         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2708         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2709         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2710         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2711         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2712         * features/i386/amd64.xml: Add 64bit-segments.xml.
2713         * features/i386/amd64-avx-avx512.c: Regenerated.
2714         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2715         * features/i386/amd64-avx-mpx.c: Regenerated.
2716         * features/i386/amd64-avx.c: Regenerated.
2717         * features/i386/amd64-mpx.c: Regenerated.
2718         * features/i386/amd64.c: Regenerated.
2719         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2720         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2721         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2722         * regformats/i386/amd64-avx.dat: Regenerated.
2723         * regformats/i386/amd64-mpx.dat: Regenerated.
2724         * regformats/i386/amd64.dat: Regenerated.
2725
2726 2017-07-10  Yao Qi  <yao.qi@linaro.org>
2727
2728         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2729         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2730
2731 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2732
2733         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2734         unsetenv.
2735         * gnulib/aclocal.m4: Regenerate.
2736         * gnulib/config.in: Regenerate.
2737         * gnulib/configure: Regenerate.
2738         * gnulib/import/Makefile.am: Regenerate.
2739         * gnulib/import/Makefile.in: Regenerate.
2740         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2741         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2742         * gnulib/import/m4/environ.m4: New file.
2743         * gnulib/import/m4/setenv.m4: New file.
2744         * gnulib/import/setenv.c: New file.
2745         * gnulib/import/unsetenv.c: New file.
2746
2747 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
2748
2749         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2750         address when op is DW_OP_addr.
2751
2752 2017-07-09  Tom Tromey  <tom@tromey.com>
2753
2754         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2755         check and apply to outer type.
2756
2757 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2758
2759         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2760         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2761         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2762         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2763
2764 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2765
2766         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2767
2768 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2769
2770         * corelow.c (get_core_siginfo): Remove.
2771         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2772         instead of get_core_siginfo.
2773         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2774         * gdbarch.h: Re-generate.
2775         * gdbarch.c: Re-generate.
2776         * linux-tdep.c (linux_core_xfer_siginfo): New.
2777         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2778
2779 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2780
2781         * corelow.c (thread_section_name): Move to ...
2782         * gdbcore.h (thread_section_name): ... here.
2783
2784 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2785
2786         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2787         (struct siginfo32): New.
2788         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2789         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2790         via ptrace(PT_LWPINFO).
2791
2792 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2793
2794         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2795         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2796         (fbsd_get_siginfo_type): New.
2797         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2798         (_initialize_fbsd_tdep): New.
2799
2800 2017-07-06  David Blaikie  <dblaikie@gmail.com>
2801
2802         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2803         a singular dwo_unit*) to support multiple CUs in the same way that
2804         multiple TUs are supported.
2805         (create_cus_hash_table): Replace create_dwo_cu with a function for
2806         parsing multiple CUs from a DWO file.
2807         (open_and_init_dwo_file): Use create_cus_hash_table rather than
2808         create_dwo_cu.
2809         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2810         htab_find, rather than comparing the signature to a singleton CU in
2811         the dwo_file.
2812
2813 2017-07-06  Pedro Alves  <palves@redhat.com>
2814
2815         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2816
2817 2017-07-04  Pedro Alves  <palves@redhat.com>
2818
2819         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2820         * gdbtypes.h (TYPE_STATIC): Delete.
2821         (struct fn_field) <is_public, is_abstract, is_static, is_final,
2822         is_synchronized, is_native>: Delete.
2823         <dummy>: Bump.
2824         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2825         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2826         (TYPE_FN_FIELD_ABSTRACT): Delete.
2827
2828 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
2829
2830         * buffer.h (buffer_finish): Fix spelling mistakes.
2831
2832 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
2833
2834         * .dir-locals.el: Automatically switch to C-style comments in
2835         versions of Emacs that support the feature.
2836
2837 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
2838             Pedro Alves  <palves@redhat.com>
2839
2840         PR cli/21688
2841         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2842         (process_next_line): New variable 'inline_cmd'.
2843         Adjust 'if' clauses for "python", "compile" and "guile" to use
2844         'command_name_equals' and check for '!inline_cmd'.
2845
2846 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
2847
2848         PR cli/21688
2849         * cli/cli-script.c (command_name_equals_not_inline): New function.
2850         (process_next_line): Adjust 'if' clauses for "python", "compile"
2851         and "guile" to use command_name_equals_not_inline.
2852
2853 2017-06-29  Pedro Alves  <palves@redhat.com>
2854
2855         * completer.c (expression_completer): Call
2856         linespec_location_completer instead of location_completer.
2857
2858 2017-06-29  Pedro Alves  <palves@redhat.com>
2859
2860         * completer.c (expression_completer): Remove code that recomputes
2861         'text' from 'word'.
2862
2863 2017-06-29  Yao Qi  <yao.qi@linaro.org>
2864
2865         * regformats/regdat.sh: Generate code with
2866         "ifndef IN_PROCESS_AGENT".
2867
2868 2017-06-28  Pedro Alves  <palves@redhat.com>
2869
2870         * command.h: Include "common/scoped_restore.h".
2871
2872 2017-06-28  Yao Qi  <yao.qi@linaro.org>
2873
2874         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2875         instead of obstack_grow.
2876
2877 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
2878
2879         PR gdb/21337
2880         * symfile.c (reread_symbols): Call objfiles_changed just before
2881         read_symbols.
2882
2883 2017-06-27  Pedro Alves  <palves@redhat.com>
2884
2885         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2886         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2887         (completion_list_add_symbol, completion_list_add_msymbol):
2888         ... these new functions.
2889         (add_symtab_completions)
2890         (default_make_symbol_completion_list_break_on_1): Adjust.
2891
2892 2017-06-27  Pedro Alves  <palves@redhat.com>
2893
2894         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2895         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
2896         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2897         dtor.
2898         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
2899         'storage_obstack' field an auto_obstack.  In-class initialize all
2900         non-bitfield fields.  Make minsyms_read bool.
2901         * symfile.c (read_symbols): Adjust.
2902
2903 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
2904
2905         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
2906         (gdbsim_store_register): Likewise.
2907
2908 2017-06-27  Pedro Alves  <palves@redhat.com>
2909
2910         * c-exp.y (name_obstack): Now an auto_obstack.
2911         (yylex): Use auto_obstack::clear.
2912         (c_parse): Use auto_obstack::clear instead of reinitializing and
2913         freeing the obstack.
2914         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
2915         * d-exp.y (name_obstack): Now an auto_obstack.
2916         (yylex): Use auto_obstack::clear.
2917         (d_parse): Use auto_obstack::clear instead of reinitializing and
2918         freeing the obstack.
2919         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
2920         auto_obstack.
2921         * dwarf2read.c (create_addrmap_from_index)
2922         (dwarf2_build_psymtabs_hard)
2923         (update_enumeration_type_from_children): Likewise.
2924         * gdb_obstack.h (auto_obstack): New type.
2925         * go-exp.y (name_obstack): Now an auto_obstack.
2926         (build_packaged_name): Use auto_obstack::clear.
2927         (go_parse): Use auto_obstack::clear instead of reinitializing and
2928         freeing the obstack.
2929         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
2930         auto_obstack.
2931         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
2932         * rust-exp.y (work_obstack): Now an auto_obstack.
2933         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
2934         reinitializing and freeing the obstack.
2935         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
2936         (host_char_to_target): Use auto_obstack.
2937         * utils.h (make_cleanup_obstack_free): Delete declaration.
2938         * valprint.c (generic_emit_char, generic_printstr): Use
2939         auto_obstack.
2940
2941 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2942
2943         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
2944         thread.
2945         (darwin_init_thread_list): Don't update dummy thread.
2946         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
2947
2948 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2949
2950         * record-full.c (netorder16): Remove.
2951
2952 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2953
2954         * common/diagnostics.h: Define macros for GCC.
2955         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
2956         * common/vec.h: Include diagnostics.h.
2957         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
2958         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
2959         warning.
2960
2961 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2962
2963         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
2964         New macro.
2965         * ada-lex.l: Ignore deprecated register warnings.
2966
2967 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2968
2969         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
2970         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
2971
2972 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2973
2974         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
2975         its own line.
2976
2977 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2978
2979         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
2980
2981 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
2982
2983         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
2984         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
2985         (xtensa_register_read_masked): Likewise.
2986
2987 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2988
2989         * common/environ.c (gdb_environ::unset): Update comment.
2990
2991 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2992
2993         * python/py-unwind.c (pyuw_sniffer): Allocate space for
2994         registers.
2995
2996 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2997
2998         * record-full.c (record_full_exec_insn): Use byte_vector.
2999
3000 2017-06-22  Yao Qi  <yao.qi@linaro.org>
3001
3002         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
3003         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3004
3005 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
3006
3007         * remote.c (cached_reg): Move from here...
3008         * regcache.h (cached_reg): ...to here.
3009         * python/py-unwind.c (struct reg_info): Remove.
3010         (cached_frame_info): Use cached_reg_t.
3011         (pyuw_prev_register): Likewise.
3012         (pyuw_sniffer): Use cached_reg_t and allocate registers.
3013         (pyuw_dealloc_cache): Free all registers.
3014
3015 2017-06-22  Pedro Alves  <palves@redhat.com>
3016             Simon Marchi  <simon.marchi@ericsson.com>
3017
3018         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
3019         warning.
3020         * common/diagnostics.h: New file.
3021
3022 2017-06-22  Pedro Alves  <palves@redhat.com>
3023
3024         * common/agent.h: Add include guards.
3025
3026 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
3027
3028         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
3029         talk about addressable units instead of bytes.
3030
3031 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3032
3033         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
3034         of '::const_iterator'.
3035
3036 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3037
3038         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3039         'unittests/environ-selftests.c'.
3040         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
3041         * charset.c (find_charset_names): Declare object 'iconv_env'.
3042         Update code to use 'iconv_env' object.  Remove call to
3043         'free_environ'.
3044         * common/environ.c: Include <utility>.
3045         (make_environ): Delete function.
3046         (free_environ): Delete function.
3047         (gdb_environ::clear): New function.
3048         (gdb_environ::operator=): New function.
3049         (gdb_environ::get): Likewise.
3050         (environ_vector): Delete function.
3051         (set_in_environ): Delete function.
3052         (gdb_environ::set): New function.
3053         (unset_in_environ): Delete function.
3054         (gdb_environ::unset): New function.
3055         (gdb_environ::envp): Likewise.
3056         * common/environ.h: Include <vector>.
3057         (struct gdb_environ): Delete; transform into...
3058         (class gdb_environ): ... this class.
3059         (free_environ): Delete prototype.
3060         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
3061         environ_vector): Likewise.
3062         * infcmd.c (run_command_1): Update code to call
3063         'envp' from 'gdb_environ' class.
3064         (environment_info): Update code to call methods from 'gdb_environ'
3065         class.
3066         (unset_environment_command): Likewise.
3067         (path_info): Likewise.
3068         (path_command): Likewise.
3069         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
3070         (inferior::inferior): Initialize 'environment' using the host's
3071         information.
3072         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
3073         Include "environ.h".
3074         (class inferior) <environment>: Change type from 'struct
3075         gdb_environ' to 'gdb_environ'.
3076         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
3077         methods from 'gdb_environ' class.
3078         * solib.c (solib_find_1): Likewise
3079         * unittests/environ-selftests.c: New file.
3080
3081 2017-06-20  Yao Qi  <yao.qi@linaro.org>
3082
3083         * features/i386/i386-linux.xml: Exchange the order of including
3084         32bit-linux.xml and 32bit-sse.xml.
3085         * features/i386/i386-linux.c: Regenerated.
3086
3087 2017-06-20  Yao Qi  <yao.qi@linaro.org>
3088
3089         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
3090         Delete copy ctor and assignment operator.
3091         (tdesc_type): Likewise.
3092         (tdesc_feature): Likewise.
3093         (tdesc_free_reg): Remove.
3094         (tdesc_create_reg): Use new.
3095         (tdesc_free_type): Remove.
3096         (tdesc_create_vector): Use new.
3097         (tdesc_create_union): Likewise.
3098         (tdesc_create_flags): Likewise.
3099         (tdesc_create_enum): Likewise.
3100         (tdesc_free_feature): Delete.
3101         (free_target_description): Use delete.
3102
3103 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
3104
3105         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
3106         registers.
3107
3108 2017-06-19  Pedro Alves  <palves@redhat.com>
3109
3110         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
3111         after gdb::unlinker.
3112
3113 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
3114
3115         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
3116         gdb_environ to access an environment variable.
3117
3118 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
3119
3120         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
3121         gdb_byte*.
3122
3123 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3124
3125         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
3126
3127 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3128
3129         * configure: Re-generate.
3130         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
3131
3132 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3133
3134         * configure: Re-generate.
3135         * warning.m4: Pass -Werror to compiler when checking for
3136         supported warning flags.
3137
3138 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3139
3140         * Makefile.in (COMPILE.pre): Add "-x c++".
3141
3142 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
3143             Pedro Alves  <palves@redhat.com>
3144             Yao Qi  <yao.qi@linaro.org>
3145
3146         * defs.h (RequireLongest): New.
3147         (extract_integer): Declare function template.
3148         (extract_signed_integer): Remove the declaration, but define it
3149         static inline.
3150         (extract_unsigned_integer): Likewise.
3151         (store_integer): Declare function template.
3152         (store_signed_integer): Remove the declaration, but define it
3153         static inline.
3154         (store_unsigned_integer): Likewise.
3155         * findvar.c (extract_integer): New function template.
3156         (extract_signed_integer): Remove.
3157         (extract_unsigned_integer): Remove.
3158         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
3159         instantiations.
3160         (store_integer): New function template.
3161         (store_signed_integer): Remove.
3162         (store_unsigned_integer): Remove.
3163         (store_integer): Explicit instantiations.
3164         * regcache.c (regcache_raw_read_signed): Update.
3165         (regcache::raw_read): New function.
3166         (regcache::raw_read_signed): Remove.
3167         (regcache::raw_read_unsigned): Remove.
3168         (regcache_raw_read_unsigned): Update.
3169         (regcache_raw_write_unsigned): Update.
3170         (regcache::raw_write_signed): Remove.
3171         (regcache::raw_write): New function.
3172         (regcache_cooked_read_signed): Update.
3173         (regcache::raw_write_unsigned): Remove.
3174         (regcache::cooked_read_signed): Remove.
3175         (regcache_cooked_read_unsigned): Update.
3176         (regcache::cooked_read_unsigned): Remove.
3177         (regcache_cooked_write_signed): Update.
3178         (regcache_cooked_write_unsigned): Update.
3179         * regcache.h (regcache) <raw_read_signed>: Remove.
3180         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
3181         <raw_read, raw_write>: New.
3182         <cooked_read_signed, cooked_write_signed>: Remove.
3183         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
3184         <cooked_read, cooked_write>: New.
3185         * sh64-tdep.c (sh64_pseudo_register_read): Update.
3186         (sh64_pseudo_register_write): Update.
3187
3188 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
3189
3190         * arc-tdep.c (arc_disassembler_options): New variable.
3191         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
3192         of default_print_insn.
3193         (arc_delayed_print_insn): Set info->section when needed,
3194         use default_print_insn to retrieve a disassembler.
3195
3196 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
3197
3198         PR gdb/21574
3199         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
3200         to mention $SHELL and startup-with-shell.
3201
3202 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
3203
3204         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
3205
3206 2017-06-14  Yao Qi  <yao.qi@linaro.org>
3207
3208         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
3209         default_print_insn instead of print_insn_aarch64.
3210         * arm-tdep.c (gdb_print_insn_arm): Call
3211         default_print_insn instead of print_insn_big_arm
3212         and print_insn_little_arm.
3213         * i386-tdep.c (i386_print_insn): Call default_print_insn
3214         instead of print_insn_i386.
3215         * ia64-tdep.c (ia64_print_insn): Call
3216         default_print_insn instead of print_insn_ia64.
3217         * mips-tdep.c (gdb_print_insn_mips): Call
3218         default_print_insn instead of print_insn_big_mips
3219         and print_insn_little_mips.
3220         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
3221         instead of print_insn_spu.
3222
3223 2017-06-14  Pedro Alves  <palves@redhat.com>
3224
3225         * ada-lang.c: Include "common/byte-vector.h".
3226         (ada_value_primitive_packed_val): Use gdb::byte_vector.
3227         * charset.c (wchar_iterator::iterate): Resize the vector instead
3228         of reserving it.
3229         * common/byte-vector.h: Include "common/def-vector.h".
3230         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
3231         * cli/cli-dump.c: Include "common/byte-vector.h".
3232         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
3233         * common/byte-vector.h: New file.
3234         * common/def-vector.h: New file.
3235         * common/default-init-alloc.h: New file.
3236         * dwarf2loc.c: Include "common/byte-vector.h".
3237         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
3238         instead of reserving it.
3239         * dwarf2read.c: Include "common/byte-vector.h".
3240         (data_buf::m_vec): Now a gdb::byte_vector.
3241         * gdb_regex.c: Include "common/def-vector.h".
3242         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
3243         * mi/mi-main.c: Include "common/byte-vector.h".
3244         (mi_cmd_data_read_memory): Use gdb::byte_vector.
3245         * printcmd.c: Include "common/byte-vector.h".
3246         (print_scalar_formatted): Use gdb::byte_vector.
3247         * valprint.c: Include "common/byte-vector.h".
3248         (maybe_negate_by_bytes, print_decimal_chars): Use
3249         gdb::byte_vector.
3250
3251 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3252
3253         * darwin-nat.c: Include "nat/fork-inferior.h".
3254
3255 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3256
3257         * configure.nat: Factor out Darwin bits that are not
3258         architecture-specific.  Add fork-inferior.o.
3259
3260 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3261
3262         * configure.nat: Factor out AIX bits that are not
3263         architecture-specific.  Add fork-inferior.o.
3264
3265 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3266
3267         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
3268         (read_pieced_value, write_pieced_value): ...here.  Reduce to
3269         wrappers that just call rw_pieced_value.
3270
3271 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3272
3273         * dwarf2loc.c (write_pieced_value): When writing the data for a
3274         memory piece, use write_memory_with_notification instead of
3275         write_memory.
3276
3277 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3278
3279         * valops.c (read_value_memory): Change embedded_offset to
3280         represent a bit offset instead of a byte offset.
3281         * value.h (read_value_memory): Adjust comment.
3282
3283 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3284
3285         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
3286         dest_offset_bits and source_offset_bits.
3287         (write_pieced_value): Likewise.
3288
3289 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3290
3291         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
3292         given by DW_OP_bit_piece.
3293         (write_pieced_value): Likewise.
3294
3295 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3296
3297         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
3298         some other preparations to the places where sufficient information
3299         is available.
3300         (write_pieced_value): Likewise.
3301
3302 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3303
3304         * dwarf2loc.c (bits_to_bytes): New function.
3305         (read_pieced_value): Fix offset calculations for register pieces
3306         on big-endian targets.
3307         (write_pieced_value): Likewise.
3308
3309 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3310
3311         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
3312         (write_pieced_value): Likewise.
3313
3314 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3315
3316         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
3317         transfer the source value's least significant bits, instead of its
3318         lowest-addressed ones.  Rename type_len to max_offset.
3319         (read_pieced_value): Mirror above changes to write_pieced_value as
3320         applicable.
3321
3322 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3323
3324         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
3325         truncate full bytes from dest_offset_bits before using it as an
3326         offset into the buffer.
3327
3328 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3329
3330         * dwarf2loc.c (write_pieced_value): Include transfer size in
3331         byte-wise check.
3332
3333 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3334
3335         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
3336         calculation of this_size.
3337
3338 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3339
3340         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
3341         when targeting a bit-field.
3342         (write_pieced_value): Likewise.
3343
3344 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3345
3346         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
3347         (allocate_piece_closure): Drop addr_size parameter.
3348         (dwarf2_evaluate_loc_desc_full): Adjust call to
3349         allocate_piece_closure.
3350
3351 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3352
3353         PR gdb/21226
3354         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
3355         the LSB end, independent of endianness.
3356
3357 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3358
3359         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
3360         size capping.
3361
3362 2017-06-13  Yao Qi  <yao.qi@linaro.org>
3363
3364         * mips-linux-nat.c: Move include features/mips*-linux.c to
3365         mips-linux-tdep.c.
3366         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
3367         to mips-linux-tdep.c.
3368         * mips-linux-tdep.c: Include features/mips*-linux.c
3369         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
3370         functions.
3371         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
3372         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
3373         (tdesc_mips64_dsp_linux): Declare.
3374
3375 2017-06-12  Tom Tromey  <tom@tromey.com>
3376
3377         * valprint.h (val_print_type_code_int): Remove.
3378         * valprint.c (generic_val_print_int): Always call
3379         val_print_scalar_formatted.
3380         (val_print_type_code_int): Remove.
3381         * printcmd.c (print_scalar_formatted): Handle options->format==0.
3382         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
3383         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
3384         * ada-valprint.c (ada_val_print_num): Use
3385         val_print_scalar_formatted.
3386
3387 2017-06-12  Tom Tromey  <tom@tromey.com>
3388
3389         * printcmd.c (print_scalar_formatted): Unify the two switches.
3390         Don't convert scalars to LONGEST.
3391
3392 2017-06-12  Tom Tromey  <tom@tromey.com>
3393
3394         PR exp/16225:
3395         * valprint.h (print_decimal_chars): Update.
3396         * valprint.c (maybe_negate_by_bytes): New function.
3397         (print_decimal_chars): Add "is_signed" argument.
3398         * printcmd.c (print_scalar_formatted): Update.
3399
3400 2017-06-12  Tom Tromey  <tom@tromey.com>
3401
3402         PR exp/16225:
3403         * valprint.h (print_binary_chars, print_hex_chars): Update.
3404         * valprint.c (val_print_type_code_int): Update.
3405         (print_binary_chars): Add "zero_pad" argument.
3406         (emit_octal_digit): New function.
3407         (print_octal_chars): Don't zero-pad.
3408         (print_decimal_chars): Likewise.
3409         (print_hex_chars): Add "zero_pad" argument.
3410         * sh64-tdep.c (sh64_do_fp_register): Update.
3411         * regcache.c (regcache::dump): Update.
3412         * printcmd.c (print_scalar_formatted): Update.
3413         * infcmd.c (default_print_one_register_info): Update.
3414
3415 2017-06-12  Pedro Alves  <palves@redhat.com>
3416             Alan Hayward  <alan.hayward@arm.com>
3417
3418         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
3419         (mips_eabi_push_dummy_call): Rename local 'regsize' to
3420         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
3421         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
3422         Assert that abi_regsize bytes fit in 'ref_valbuf'.
3423
3424 2017-06-12  Pedro Alves  <palves@redhat.com>
3425
3426         * dwarf2read.c (mapped_symtab::data): Now a vector of
3427         symtab_index_entry instead of vector of
3428         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
3429         whether an element's name is NULL instead of checking whether the
3430         element itself is NULL.
3431         (find_slot): Change return type.  Adjust.
3432         (hash_expand, , add_index_entry, uniquify_cu_indices)
3433         (write_hash_table): Adjust.
3434
3435 2017-06-12  Pedro Alves  <palves@redhat.com>
3436
3437         * dwarf2read.c (recursively_count_psymbols): New function.
3438         (write_psymtabs_to_index): Call it to compute number of psyms and
3439         pass estimate size of psyms_seen to unordered_set's ctor.
3440
3441 2017-06-12  Pedro Alves  <palves@redhat.com>
3442
3443         * dwarf2read.c (write_hash_table): Check if key already exists
3444         before emplacing.
3445
3446 2017-06-12  Pedro Alves  <palves@redhat.com>
3447
3448         * dwarf2read.c (data_buf::append_space): Rename to...
3449         (data_buf::grow): ... this, and make private.  Adjust all callers.
3450         (data_buf::append_uint): New method.
3451         (add_address_entry, write_one_signatured_type)
3452         (write_psymtabs_to_index): Use it.
3453
3454 2017-06-12  Pedro Alves  <palves@redhat.com>
3455
3456         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
3457         (file_write (FILE *, const std::vector<Elem>&)): Delete.
3458         (data_buf::file_write): Call ::fwrite directly.
3459
3460 2017-06-12  Pedro Alves  <palves@redhat.com>
3461
3462         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
3463         std::vector::erase.
3464
3465 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
3466
3467         Code cleanup: C++ify .gdb_index producer.
3468         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
3469         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
3470         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
3471         (create_strtab, add_string): Remove.
3472         (file_write, data_buf): New.
3473         (struct symtab_index_entry): Use std::vector for cu_indices.
3474         (struct mapped_symtab): Use std::vector for data.
3475         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
3476         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
3477         Remove.
3478         (find_slot): Change return type.  Update it to the new data structures.
3479         (hash_expand, add_index_entry): Update it to the new data structures.
3480         (offset_type_compare): Remove.
3481         (uniquify_cu_indices): Update it to the new data structures.
3482         (c_str_view, c_str_view_hasher, vector_hasher): New.
3483         (add_indices_to_cpool): Remove.
3484         (write_hash_table): Update it to the new data structures.
3485         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
3486         (eq_psymtab_cu_index): Remove.
3487         (psym_index_map): New typedef.
3488         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
3489         reference and std::unordered_map for cu_index_htab.
3490         (add_address_entry, add_address_entry_worker, write_address_map)
3491         (write_psymbols): Update it to the new data structures.
3492         (write_obstack): Remove.
3493         (struct signatured_type_index_data): Change types_list to a data_buf
3494         reference and psyms_seen to a std::unordered_set reference.
3495         (write_one_signatured_type, recursively_write_psymbols)
3496         (write_psymtabs_to_index): Update it to the new data structures.
3497
3498 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3499
3500         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
3501         separate-debug-file commands.
3502         * symfile.h (separate_debug_file_debug): New global.
3503         * symfile.c (separate_debug_file_debug): New global.
3504         (separate_debug_file_exists, find_separate_debug_file): Add
3505         debug output.
3506         (_initialize_symfile): Add "set debug separate-debug-file"
3507         command.
3508         * build-id.c (build_id_to_debug_bfd,
3509         find_separate_debug_file_by_buildid): Add debug output.
3510
3511 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3512
3513         * gdbarch.sh (displaced_step_free_closure): Remove.
3514         * gdbarch.h, gdbarch.c: Re-generate.
3515         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
3516         displaced_step_free_closure.
3517         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
3518         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
3519         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3520         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3521         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3522         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3523         * arch-utils.h (simple_displaced_step_free_closure): Remove.
3524         * arch-utils.c (simple_displaced_step_free_closure): Remove.
3525         * infrun.c (displaced_step_clear): Call xfree instead of
3526         gdbarch_displaced_step_free_closure.
3527
3528 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
3529
3530         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
3531         NULL".
3532
3533 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
3534
3535         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
3536         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
3537         (mn10300_push_dummy_call): Likewise.
3538
3539 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
3540
3541         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
3542
3543 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
3544
3545         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
3546
3547 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3548
3549         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
3550         able to start inferiors using a shell.
3551         (New remote packets): Announce new packet "QStartupWithShell".
3552         * remote.c: Add PACKET_QStartupWithShell.
3553         (extended_remote_create_inferior): Handle new
3554         PACKET_QStartupWithShell.
3555         (remote_protocol_features) <QStartupWithShell>: New entry for
3556         PACKET_QStartupWithShell.
3557         (_initialize_remote): Call "add_packet_config_cmd" for
3558         QStartupShell.
3559
3560 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3561             Pedro Alves  <palves@redhat.com>
3562
3563         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
3564         and "nat/fork-inferior.h".
3565         * common/common-inferior.h: New file, with contents from
3566         "gdb/inferior.h".
3567         * commom/common-utils.c: Include "common-utils.h".
3568         (stringify_argv): New function.
3569         * common/common-utils.h (stringify_argv): New prototype.
3570         * configure.nat: Add "fork-inferior.o" as a dependency for
3571         "*linux*", "fbsd*" and "nbsd*" hosts.
3572         * corefile.c (get_exec_file): Update comment.
3573         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
3574         instead of "startup_inferior".
3575         (darwin_create_inferior): Call "add_thread_silent" after
3576         "fork_inferior".
3577         * fork-child.c: Cleanup unnecessary includes.
3578         (SHELL_FILE): Move to "common/common-fork-child.c".
3579         (environ): Likewise.
3580         (exec_wrapper): Initialize.
3581         (get_exec_wrapper): New function.
3582         (breakup_args): Move to "common/common-fork-child.c"; rename to
3583         "breakup_args_for_exec".
3584         (escape_bang_in_quoted_argument): Move to
3585         "common/common-fork-child.c".
3586         (saved_ui): New variable.
3587         (prefork_hook): New function.
3588         (postfork_hook): Likewise.
3589         (postfork_child_hook): Likewise.
3590         (gdb_startup_inferior): Likewise.
3591         (fork_inferior): Move to "common/common-fork-child.c".  Update
3592         function to support gdbserver.
3593         (startup_inferior): Likewise.
3594         * gdbcore.h (get_exec_file): Remove declaration.
3595         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3596         instead of "startup_inferior".  Call "add_thread_silent" after
3597         "fork_inferior".
3598         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3599         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3600         instead of "startup_inferior".  Call "add_thread_silent" after
3601         "fork_inferior".
3602         * inferior.h: Include "common-inferior.h".
3603         (trace_start_error): Move to "common/common-utils.h".
3604         (trace_start_error_with_name): Likewise.
3605         (fork_inferior): Move prototype to "nat/fork-inferior.h".
3606         (startup_inferior): Likewise.
3607         (gdb_startup_inferior): New prototype.
3608         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3609         * nat/fork-inferior.h: New file.
3610         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3611         instead of "startup_inferior".  Call "add_thread_silent" after
3612         "fork_inferior".
3613         * target.h (target_terminal_init): Move prototype to
3614         "target/target.h".
3615         (target_terminal_inferior): Likewise.
3616         (target_terminal_ours): Likewise.
3617         * target/target.h (target_terminal_init): New prototype, moved
3618         from "target.h".
3619         (target_terminal_inferior): Likewise.
3620         (target_terminal_ours): Likewise.
3621         * utils.c (gdb_flush_out_err): New function.
3622
3623 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3624
3625         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3626         * common/common-gdbthread.h: New file, with parts from
3627         "gdb/gdbthread.h".
3628         * gdbthread.h: Include "common-gdbthread.h".
3629         (switch_to_thread): Moved to "common/common-gdbthread.h".
3630
3631 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3632
3633         * Makefile.in (SFILES): Add "common/job-control.c".
3634         (HFILES_NO_SRCDIR): Add "common/job-control.h".
3635         (COMMON_OBS): Add "job-control.o".
3636         * common/job-control.c: New file, with contents from
3637         "gdb/inflow.c".
3638         * common/job-control.h: New file, with contents from "terminal.h".
3639         * fork-child.c: Include "job-control.h".
3640         * inflow.c: Include "job-control.h".
3641         (gdb_setpgid): Move to "common/common-inflow.c".
3642         (_initialize_inflow): Move setting of "job_control" to
3643         "handle_job_control".
3644         * terminal.h (job_control): Moved to "common/common-terminal.h".
3645         (gdb_setpgid): Likewise.
3646         * top.c: Include "job_control.h".
3647         * utils.c: Likewise.
3648         (job_control): Moved to "job-control.c".
3649
3650 2017-06-07  Pedro Alves  <palves@redhat.com>
3651
3652         * Makefile.in (SFILES): Add gdb_regex.c.
3653         (COMMON_OBS): Add gdb_regex.o.
3654         * ada-lang.c (ada_add_standard_exceptions)
3655         (ada_add_exceptions_from_frame, name_matches_regex)
3656         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3657         parameter type to compiled_regex.  Adjust.
3658         (ada_exceptions_list): Use compiled_regex.
3659         * break-catch-throw.c (exception_catchpoint::pattern): Now a
3660         std::unique_ptr<compiled_regex>.
3661         (exception_catchpoint::~exception_catchpoint): Remove regfree
3662         call.
3663         (check_status_exception_catchpoint): Adjust to use compiled_regex.
3664         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3665         * breakpoint.c (solib_catchpoint::compiled): Now a
3666         std::unique_ptr<compiled_regex>.
3667         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3668         (check_status_catch_solib): Adjust to use compiled_regex.
3669         (add_solib_catchpoint): Adjust to use compiled_regex.
3670         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3671         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3672         compiled_regex reference.  Adjust to use it.
3673         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3674         declaration.  Include "gdb_regex.h".
3675         (apropos_cmd): Change regex parameter to compiled_regex reference.
3676         * gdb_regex.c: New file.
3677         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3678         declarations.
3679         (class compiled_regex): New.
3680         * linux-tdep.c: Include "common/gdb_optional.h".
3681         (struct mapping_regexes): New, factored out from
3682         mapping_is_anonymous_p, and adjusted to use compiled_regex.
3683         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3684         gdb::optional and remove cleanups.  Adjust to compiled_regex.
3685         * probe.c: Include "common/gdb_optional.h".
3686         (collect_probes): Use compiled_regex and gdb::optional and remove
3687         cleanups.
3688         * skip.c: Include "common/gdb_optional.h".
3689         (skiplist_entry::compiled_function_regexp): Now a
3690         gdb::optional<compiled_regex>.
3691         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3692         (free_skiplist_entry): Remove regfree call.
3693         (compile_skip_regexp, skip_rfunction_p): Adjust to use
3694         compiled_regex and gdb::optional.
3695         * symtab.c: Include "common/gdb_optional.h".
3696         (search_symbols): Use compiled_regex and gdb::optional.
3697         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3698         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
3699         to gdb_regex.c.
3700
3701 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3702
3703         * regcache.c (regcache::save): Avoid buffer use.
3704         (regcache::dump): Likewise.
3705
3706 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3707
3708         * sh-tdep.c (sh_pseudo_register_read): Remove
3709         MAX_REGISTER_SIZE.
3710         (sh_pseudo_register_write): Likewise.
3711         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3712         (sh64_pseudo_register_write): Likewise
3713
3714 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3715
3716         * aarch64-tdep.c (aarch64_store_return_value): Use
3717         V_REGISTER_SIZE.
3718         (aarch64_pseudo_read_value): Likewise.
3719         (aarch64_pseudo_write): Likewise.
3720
3721 2017-06-06  Yao Qi  <yao.qi@linaro.org>
3722
3723         * regformats/regdef.h (set_register_cache): Remove the
3724         declaration.
3725
3726 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
3727
3728         * frame.c (frame_unwind_register_signed): Use
3729         frame_unwind_register_value.
3730
3731 2017-06-06  Pedro Alves  <palves@redhat.com>
3732
3733         PR breakpoints/21553
3734         * breakpoint.c (create_breakpoints_sal_default)
3735         (init_breakpoint_sal, create_breakpoint_sal): Use
3736         gdb::unique_xmalloc_ptr for string parameters.
3737         (create_breakpoint): Constify 'extra_string' and 'cond_string'
3738         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
3739         (base_breakpoint_create_breakpoints_sal)
3740         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3741         (strace_marker_create_breakpoints_sal)
3742         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3743         string parameters.
3744         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3745         gdb::unique_xmalloc_ptr for string parameters.
3746         (create_breakpoint): Constify 'extra_string' and 'cond_string'
3747         parameters.
3748
3749 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
3750
3751         * alpha-tdep.c (alpha_register_to_value): Use
3752         get_frame_register_value.
3753         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3754
3755 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
3756
3757         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3758         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3759         (ia64_value_to_register): Likewise.
3760         (ia64_extract_return_value): Likewise.
3761         (ia64_store_return_value): Likewise.
3762         (ia64_push_dummy_call): Likewise.
3763
3764 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
3765
3766         GDB 8.0 released.
3767
3768 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
3769
3770         * x86-linux-nat.c (struct arch_lwp_info): Remove.
3771
3772 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
3773
3774         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3775         parameter.
3776         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3777
3778 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3779
3780         * event-loop.c (poll_timers): Unallocate timer using delete
3781         instead of xfree.
3782
3783 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3784
3785         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3786         (struct breakpoint) <~breakpoint>: New.
3787         (struct watchpoint): Inherit from breakpoint.
3788         <~watchpoint>: New.
3789         <base>: Remove.
3790         (struct tracepoint): Inherit from breakpoint.
3791         <base>: Remove.
3792         * breakpoint.c (longjmp_breakpoint_ops): Remove.
3793         (struct longjmp_breakpoint): Inherit from breakpoint.
3794         <~longjmp_breakpoint>: New.
3795         <base>: Remove.
3796         (new_breakpoint_from_type): Remove casts.
3797         (watchpoint_in_thread_scope): Remove reference to base field.
3798         (watchpoint_del_at_next_stop): Likewise.
3799         (update_watchpoint): Likewise.
3800         (watchpoint_check): Likewise.
3801         (bpstat_check_watchpoint): Likewise.
3802         (set_longjmp_breakpoint): Likewise.
3803         (struct fork_catchpoint): Inherit from breakpoint.
3804         <base>: Remove.
3805         (struct solib_catchpoint): Inherit from breakpoint.
3806         <~solib_catchpoint>: New.
3807         <base>: Remove.
3808         (dtor_catch_solib): Change to ...
3809         (solib_catchpoint::~solib_catchpoint): ... this.
3810         (breakpoint_hit_catch_solib): Remove reference to base field.
3811         (add_solib_catchpoint): Likewise.
3812         (create_fork_vfork_event_catchpoint): Likewise.
3813         (struct exec_catchpoint): Inherit from breakpoint.
3814         <~exec_catchpoint>: New.
3815         <base>: Remove.
3816         (dtor_catch_exec): Change to ...
3817         (exec_catchpoint::~exec_catchpoint): ... this.
3818         (dtor_watchpoint): Change to ...
3819         (watchpoint::~watchpoint): ... this.
3820         (watch_command_1): Remove reference to base field.
3821         (catch_exec_command_1): Likewise.
3822         (base_breakpoint_dtor): Change to ...
3823         (breakpoint::~breakpoint): ... this.
3824         (base_breakpoint_ops): Remove dtor field value.
3825         (longjmp_bkpt_dtor): Change to ...
3826         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3827         (strace_marker_create_breakpoints_sal): Remove reference to base
3828         field.
3829         (delete_breakpoint): Don't manually call breakpoint destructor.
3830         (create_tracepoint_from_upload): Remove reference to base field.
3831         (trace_pass_set_count): Likewise.
3832         (initialize_breakpoint_ops): Don't initialize
3833         momentary_breakpoint_ops, don't set dtors.
3834         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3835         <~ada_catchpoint>: New.
3836         <base>: Remove.
3837         (create_excep_cond_exprs): Remove reference to base field.
3838         (dtor_exception): Change to ...
3839         (ada_catchpoint::~ada_catchpoint): ... this.
3840         (dtor_catch_exception): Remove.
3841         (dtor_catch_exception_unhandled): Remove.
3842         (dtor_catch_assert): Remove.
3843         (create_ada_exception_catchpoint): Remove reference to base
3844         field.
3845         (initialize_ada_catchpoint_ops): Don't set dtors.
3846         * break-catch-sig.c (struct signal_catchpoint): Inherit from
3847         breakpoint.
3848         <~signal_catchpoint>: New.
3849         <base>: Remove.
3850         (signal_catchpoint_dtor): Change to ...
3851         (signal_catchpoint::~signal_catchpoint): ... this.
3852         (create_signal_catchpoint): Remove reference to base field.
3853         (initialize_signal_catchpoint_ops): Don't set dtor.
3854         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3855         from breakpoint.
3856         <~syscall_catchpoint>: New.
3857         <base>: Remove.
3858         (dtor_catch_syscall): Change to ...
3859         (syscall_catchpoint::~syscall_catchpoint): ... this.
3860         (create_syscall_event_catchpoint): Remove reference to base
3861         field.
3862         (initialize_syscall_catchpoint_ops): Don't set dtor.
3863         * break-catch-throw.c (struct exception_catchpoint): Inherit
3864         from breakpoint.
3865         <~exception_catchpoint>: New.
3866         <base>: Remove.
3867         (dtor_exception_catchpoint): Change to ...
3868         (exception_catchpoint::~exception_catchpoint): ... this.
3869         (handle_gnu_v3_exceptions): Remove reference to base field.
3870         (initialize_throw_catchpoint_ops): Don't set dtor.
3871         * ctf.c (ctf_get_traceframe_address): Remove reference to base
3872         field.
3873         * remote.c (remote_get_tracepoint_status): Likewise.
3874         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3875         * tracefile.c (tracefile_fetch_registers): Likewise.
3876         * tracepoint.c (actions_command): Likewise.
3877         (validate_actionline): Likewise.
3878         (tfind_1): Likewise.
3879         (get_traceframe_location): Likewise.
3880         (find_matching_tracepoint_location): Likewise.
3881         (parse_tracepoint_status): Likewise.
3882         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3883
3884 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3885
3886         * breakpoint.c (struct longjmp_breakpoint): New struct.
3887         (is_tracepoint_type): Change return type to bool.
3888         (is_longjmp_type): New function.
3889         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3890         (set_raw_breakpoint_without_location): Use
3891         new_breakpoint_from_type.
3892         (set_raw_breakpoint): Likewise.
3893
3894 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3895
3896         * breakpoint.c (new_breakpoint_from_type): New function.
3897         (create_breakpoint_sal): Use new_breakpoint_from_type and
3898         unique_ptr.
3899         (create_breakpoint): Likewise.
3900
3901 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
3902
3903         * memattr.c (mem_info_command): Rename to ...
3904         (info_mem_command): ... this.
3905         (mem_enable_command): Rename to ...
3906         (enable_mem_command): ... this.
3907         (mem_disable_command): Rename to ...
3908         (disable_mem_command): ... this.
3909         (mem_delete_command): Rename to ...
3910         (delete_mem_command): ... this.
3911         (_initialize_mem): Adjust function names.
3912
3913 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
3914
3915         * btrace.c (handle_pt_insn_events): New.
3916         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
3917         STATUS.  Split into this and ...
3918         (handle_pt_insn_event_flags): ... this.
3919
3920 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
3921
3922         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
3923         and struct pt_insn.resynced.
3924         * configure: Regenerated.
3925         * config.in: Regenerated.
3926
3927 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3928
3929         * btrace.c (ftrace_find_call_by_number): New function.
3930         (ftrace_new_function): Store objects, not pointers.
3931         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
3932         ftrace_new_gap, ftrace_update_function,
3933         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
3934         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
3935         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
3936         btrace_ends_with_single_insn, btrace_call_get): Account for
3937         btrace_thread_info::functions now storing objects.
3938         * btrace.h (struct btrace_thread_info): Add constructor.
3939         (struct btrace_thread_info) <functions>: Make std::vector.
3940         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
3941         Initialize with default values.
3942         * record-btrace.c (record_btrace_frame_sniffer): Account for
3943         btrace_thread_info::functions now storing objects.
3944
3945 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3946
3947         * btrace.c: Remove typedef bfun_s.
3948         (ftrace_new_gap): Directly add gaps to the list of gaps.
3949         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
3950         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
3951         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
3952         instead of gdb VEC.
3953
3954 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3955
3956         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
3957         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
3958         with btrace_thread_info::next_segment and
3959         btrace_thread_info::prev_segment.
3960         * btrace.h: Remove struct btrace_func_link.
3961         (struct btrace_function): Replace pair of function segment pointers
3962         with pair of indices.
3963         * python/py-record-btrace.c (btpy_call_prev_sibling,
3964         btpy_call_next_sibling): Replace references to
3965         btrace_thread_info::segment with btrace_thread_info::next_segment and
3966         btrace_thread_info::prev_segment.
3967         * record-btrace.c (record_btrace_frame_this_id): Use
3968         btrace_find_call_by_number.
3969
3970 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3971
3972         * btrace.c (ftrace_new_function, ftrace_fixup_level,
3973         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
3974         btrace_insn_next, btrace_insn_prev): Remove references to
3975         btrace_thread_info::flow.
3976         * btrace.h (struct btrace_function): Remove FLOW.
3977
3978 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3979
3980         * btrace.c (ftrace_find_call_by_number): New function.
3981         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
3982         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
3983         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
3984         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
3985         index.
3986         * btrace.h (struct btrace_function): Turn UP into an index.
3987         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
3988         as an index.
3989         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
3990         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
3991         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
3992
3993 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3994
3995         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3996         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3997         ftrace_update_function, ftrace_compute_global_level_offset,
3998         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
3999         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
4000         btrace_insn_end, btrace_is_empty): Remove references to
4001         btrace_thread_info::begin and btrace_thread_info::end.
4002         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
4003         (struct btrace_thread_info) <functions>: Adjust comment.
4004         * record-btrace.c (record_btrace_start_replaying): Remove reference to
4005         btrace_thread_info::begin.
4006
4007 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4008
4009         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4010         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4011         ftrace_update_function): Remove arguments that implicitly were always
4012         BTINFO->END.
4013         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
4014         Don't pass BTINFO->END.
4015
4016 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4017
4018         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
4019         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
4020         btrace_find_insn_by_number): Replace function segment pointer with
4021         index.
4022         (btrace_insn_cmp): Simplify.
4023         * btrace.h: (struct btrace_insn_iterator) Rename index to
4024         insn_index.  Replace function segment pointer with index into function
4025         segment vector.
4026         * record-btrace.c (record_btrace_call_history): Replace function
4027         segment pointer use with index.
4028         (record_btrace_frame_sniffer): Retrieve function call segment through
4029         vector.
4030         (record_btrace_set_replay): Remove defunc't safety check.
4031
4032 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4033
4034         * btrace.c (btrace_ends_with_single_insn): New function.
4035         (btrace_call_get, btrace_call_number, btrace_call_begin,
4036         btrace_call_end, btrace_call_next, btrace_call_prev,
4037         btrace_find_call_by_number): Use index into call segment vector
4038         instead of pointer.
4039         (btrace_call_cmp): Simplify.
4040         * btrace.h (struct btrace_call_iterator): Replace function call segment
4041         pointer with index into vector.
4042         * record-btrace.c (record_btrace_call_history): Use index instead of
4043         pointer.
4044
4045 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4046
4047         * btrace.c (btrace_insn_begin, btrace_insn_end,
4048         btrace_find_insn_by_number): Add btinfo to iterator.
4049         * btrace.h (struct btrace_insn_iterator): Add btinfo.
4050
4051 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4052
4053         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
4054         and save pointers directly.
4055         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
4056         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
4057         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
4058         changed signature of functions.
4059         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
4060         (btrace_fetch): Remove code that adds btrace_function pointers to
4061         vector of btrace_functions.
4062         (btrace_clear): Simplify freeing vector of btrace_functions.
4063
4064 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4065
4066         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
4067         Replace VEC_* with std::vector functions.
4068         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
4069         (struct btrace_thread_info)<functions>: Change type to std::vector.
4070
4071 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4072
4073         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
4074         "Removed targets and native configurations" up.  Merge duplicate
4075         "New commands" sub-sections.  Add "New options" sub-sections.
4076
4077 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
4078
4079         * defs.h (copy_integer_to_size): New declaration.
4080         * findvar.c (copy_integer_to_size): New function.
4081         (do_cint_test): New selftest function.
4082         (copy_integer_to_size_test): Likewise.
4083         (_initialize_findvar): Likewise.
4084         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
4085         (mips_fbsd_collect_reg): Use raw_collect_integer.
4086         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
4087         (mips64_fill_gregset): Use raw_collect_integer
4088         (mips64_fill_fpregset): Use raw_supply_integer.
4089         * regcache.c (regcache::raw_supply_integer): New function.
4090         (regcache::raw_collect_integer): Likewise.
4091         * regcache.h: (regcache::raw_supply_integer): New declaration.
4092         (regcache::raw_collect_integer): Likewise.
4093
4094 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4095
4096         * Makefile.in (SFILES): Add gdbarch-selftests.c.
4097         (COMMON_OBS): Add gdbarch-selftests.o.
4098         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
4099         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
4100         * gdbarch-selftests.c: New file.
4101         * regcache.h (regcache) <~regcache>: Mark it virtual if
4102         GDB_SELF_TEST.
4103         <raw_write>: Likewise.
4104
4105 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4106
4107         * regcache.c (current_regcache): Change it to
4108         regcache::current_regcache.
4109         (regcache_observer_target_changed): Update.
4110         (regcache_thread_ptid_changed): Make it a regcache static
4111         method.
4112         (regcache_thread_ptid_changed): Update.
4113         (class regcache_access): New.
4114         (current_regcache_test): Update.
4115         (_initialize_regcache): Update.
4116         * regcache.h: Include forward_list.
4117         (regcache): Declare regcache_thread_ptid_changed and declare
4118         registers_changed_ptid as friend.
4119
4120 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4121
4122         * i387-tdep.c (i387_register_to_value): Use register_size
4123         instead of TYPE_LENGTH.
4124         * m68k-tdep.c (m68k_register_to_value): Likewise.
4125
4126 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4127
4128         * i387-tdep.c (i387_convert_register_p): Return false if type
4129         code isn't TYPE_CODE_FLT.
4130
4131 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4132
4133         * alpha-tdep.c (alpha_convert_register_p): Return true if type
4134         length is 4.
4135         (alpha_register_to_value): Remove type length check.
4136         (alpha_value_to_register): Likewise.
4137
4138 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4139
4140         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
4141         TYPE_CODE_FLT.
4142
4143 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4144
4145         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
4146         TYPE_CODE_FLT or not.
4147
4148 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4149
4150         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
4151         * avr-tdep.c (avr_gdbarch_init): Likewise.
4152         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4153         * cris-tdep.c (cris_gdbarch_init): Likewise.
4154         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4155         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4156         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4157         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
4158         * mep-tdep.c (mep_gdbarch_init): Likewise.
4159         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4160         * mips-tdep.c (mips_gdbarch_init): Likewise.
4161         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4162         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4163         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4164         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4165         * v850-tdep.c (v850_gdbarch_init): Likewise.
4166
4167 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4168
4169         * selftest-arch.c (tests_with_arch): Call registers_changed
4170         and reinit_frame_cache.
4171         * selftest.c (run_self_tests): Likewise.
4172
4173 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4174
4175         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
4176         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
4177
4178 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4179
4180         * rl78-tdep.c (rl78_gdbarch_init): Don't call
4181         set_gdbarch_print_insn.
4182
4183 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4184
4185         * h8300-tdep.c (h8300_gdbarch_init): Don't call
4186         set_gdbarch_print_insn.
4187
4188 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4189
4190         * alpha-tdep.c (alpha_gdbarch_init): Don't call
4191         set_gdbarch_print_insn.
4192         * arc-tdep.c (arc_gdbarch_init): Likewise.
4193         * arch-utils.c: include dis-asm.h.
4194         (default_print_insn): New function.
4195         * arch-utils.h (default_print_insn): Declare.
4196         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
4197         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4198         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
4199         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
4200         * frv-tdep.c (frv_gdbarch_init): Likewise.
4201         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4202         * gdbarch.sh (print_insn): Use default_print_insn.
4203         * gdbarch.c: Regenerated.
4204         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
4205         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
4206         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4207         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
4208         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4209         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
4210         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
4211         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
4212         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
4213         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4214         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4215         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4216         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4217         * mt-tdep.c (mt_gdbarch_init): Likewise.
4218         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4219         * nios2-tdep.c (nios2_print_insn): Remove.
4220         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
4221         * rx-tdep.c (rx_gdbarch_init): Likewise.
4222         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4223         * score-tdep.c (score_print_insn): Remove.
4224         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
4225         * sh-tdep.c (sh_gdbarch_init): Likewise.
4226         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4227         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4228         * tic6x-tdep.c (tic6x_print_insn): Remove.
4229         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
4230         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
4231         * v850-tdep.c (v850_gdbarch_init): Likewise.
4232         * vax-tdep.c (vax_gdbarch_init): Likewise.
4233         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4234         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
4235
4236 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
4237
4238         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
4239         (MIPS_FP0_REGNUM): Remove.
4240         (MIPS_FSR_REGNUM): Remove.
4241         (mips_fbsd_supply_fpregs): Use mips_regnum.
4242         (mips_fbsd_supply_gregs): Likewise.
4243         (mips_fbsd_collect_fpregs): Likewise.
4244         (mips_fbsd_collect_gregs): Likewise.
4245
4246 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
4247
4248         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
4249         (getpfpregs_supplies): New function.
4250         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
4251         getfpregs_supplies.
4252         (mips_fbsd_store_inferior_registers): Likewise.
4253
4254 2017-05-22  Pedro Alves <palves@redhat.com>
4255
4256         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
4257         maintainer.
4258
4259 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
4260
4261         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
4262         (store_register): Likewise.
4263         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
4264         (get_decimal_float_return_value): Likewise.
4265         (do_ppc_sysv_return_value): Likewise.
4266         (ppc64_sysv_abi_push_integer): Likewise.
4267         (ppc64_sysv_abi_push_freg): Likewise.
4268         (ppc64_sysv_abi_return_value_base): Likewise.
4269         (ppc64_sysv_abi_return_value): Likewise.
4270         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
4271         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
4272         * rs6000-nat.c: Likewise.
4273         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
4274         (rs6000_value_to_register): Likewise.
4275         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
4276
4277 2017-05-21  Tom Tromey  <tom@tromey.com>
4278
4279         PR rust/21466:
4280         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
4281         arrays as "[T]", not "[T; ]".
4282
4283 2017-05-19  Tom Tromey  <tom@tromey.com>
4284
4285         PR rust/21484:
4286         * rust-lang.c (exp_descriptor_rust): New function.
4287         (rust_language_defn): Use it.
4288         * p-lang.c (pascal_language_defn): Update.
4289         * opencl-lang.c (opencl_language_defn): Update.
4290         * objc-lang.c (objc_language_defn): Update.
4291         * m2-lang.c (m2_language_defn): Update.
4292         * language.h (struct language_defn)
4293         <la_watch_location_expression>: New member.
4294         * language.c (unknown_language_defn, auto_language_defn)
4295         (local_language_defn): Update.
4296         * go-lang.c (go_language_defn): Update.
4297         * f-lang.c (f_language_defn): Update.
4298         * d-lang.c (d_language_defn): Update.
4299         * c-lang.h (c_watch_location_expression): Declare.
4300         * c-lang.c (c_watch_location_expression): New function.
4301         (c_language_defn, cplus_language_defn, asm_language_defn)
4302         (minimal_language_defn): Use it.
4303         * breakpoint.c (watch_command_1): Call
4304         la_watch_location_expression.
4305         * ada-lang.c (ada_language_defn): Update.
4306
4307 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4308
4309         PR tui/21482
4310         * gdb_curses.h (NOMACROS): Define.
4311         (NCURSES_NOMACROS): Define.
4312
4313 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4314
4315         PR tui/21482
4316         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
4317         arg to char *.
4318         * tui/tui-wingeneral.c (box_win): Likewise.
4319         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
4320         (tui_show_source_line): Likewise.
4321         (tui_show_exec_info_content): Likewise.
4322
4323 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4324
4325         * sparc-tdep.c (sparc_structure_return_p)
4326         (sparc_arg_on_registers_p): New functions.
4327         (sparc32_store_arguments): Use them.
4328         * sparc64-tdep.c (sparc64_16_byte_align_p)
4329         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
4330         Handle TYPE_CODE_ARRAY.
4331
4332 2017-05-17  Yao Qi  <yao.qi@linaro.org>
4333
4334         * cli/cli-decode.c (add_alias_cmd): New function.
4335         * command.h (add_alias_cmd): Declare.
4336         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
4337         instead call add_alias_cmd.
4338
4339 2017-05-17  Pedro Alves  <palves@redhat.com>
4340
4341         * Makefile.in (nat_extra_makefile_frag): Rename to ...
4342         (nat_makefile_frag): ... this.  All references updated.
4343         * configure.ac: Likewise.
4344         * configure.nat: Likewise.  Enhance comments.
4345         * configure: Regenerate.
4346
4347 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4348
4349         * procfs.c (procfs_create_inferior): Change prototype to match
4350         definition.
4351
4352 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
4353
4354         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
4355         C++ compiler warning.
4356
4357 2017-05-12  Tom Tromey  <tom@tromey.com>
4358
4359         PR rust/21483:
4360         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
4361         recurse, just call value_struct_elt directly.
4362
4363 2017-05-12  Tom Tromey  <tom@tromey.com>
4364
4365         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
4366         OP_RUST_ARRAY>: Fix.
4367
4368 2017-05-12  Tom Tromey  <tom@tromey.com>
4369
4370         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
4371
4372 2017-05-09  Yao Qi  <yao.qi@linaro.org>
4373
4374         * regcache.c: Include <forward_list>.
4375         (struct regcache_list): Remove.
4376         (current_regcache): Update.
4377         (get_thread_arch_aspace_regcache): Update for std::forward_list.
4378         (regcache_thread_ptid_changed): Likewise.
4379         (registers_changed_ptid): Likewise.
4380         (current_regcache_size): Likewise.
4381
4382 2017-05-09  Yao Qi  <yao.qi@linaro.org>
4383
4384         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
4385         (current_regcache_size): New function.
4386         (current_regcache_test): New function.
4387         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
4388
4389 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4390
4391         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
4392         (print_gp_register_row): Use get_frame_register_value.
4393
4394 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4395
4396         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
4397         (mips_supply_fpregset): Likewise.
4398         (mips64_supply_gregset): Likewise.
4399
4400 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4401
4402         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
4403         regcache->raw_supply_zeroed.
4404
4405 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4406
4407         * configure.nat: Rearrange 'case' statements to match
4408         host before cpu.
4409
4410 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4411
4412         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
4413         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
4414         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
4415         "@nat_extra_makefile_frag@".
4416         (Makefile): Remove dependency on "@frags@".
4417         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
4418         (data-directory/Makefile): Likewise.
4419         * config/aarch64/linux.mh: Deleted; moved contents to
4420         "gdb/configure.nat".
4421         * config/alpha/alpha-linux.mh: Likewise.
4422         * config/alpha/nbsd.mh: Likewise.
4423         * config/arm/linux.mh: Likewise.
4424         * config/arm/nbsdelf.mh: Likewise.
4425         * config/i386/cygwin.mh: Likewise.
4426         * config/i386/cygwin64.mh: Likewise.
4427         * config/i386/darwin.mh: Likewise.
4428         * config/i386/fbsd.mh: Likewise.
4429         * config/i386/fbsd64.mh: Likewise.
4430         * config/i386/go32.mh: Likewise.
4431         * config/i386/i386gnu.mh: Likewise.
4432         * config/i386/i386sol2.mh: Likewise.
4433         * config/i386/linux.mh: Likewise.
4434         * config/i386/linux64.mh: Likewise.
4435         * config/i386/mingw.mh: Likewise.
4436         * config/i386/mingw64.mh: Likewise.
4437         * config/i386/nbsd64.mh: Likewise.
4438         * config/i386/nbsdelf.mh: Likewise.
4439         * config/i386/nto.mh: Likewise.
4440         * config/i386/obsd.mh: Likewise.
4441         * config/i386/obsd64.mh: Likewise.
4442         * config/i386/sol2-64.mh: Likewise.
4443         * config/ia64/linux.mh: Likewise.
4444         * config/m32r/linux.mh: Likewise.
4445         * config/m68k/linux.mh: Likewise.
4446         * config/m68k/nbsdelf.mh: Likewise.
4447         * config/m68k/obsd.mh: Likewise.
4448         * config/m88k/obsd.mh: Likewise.
4449         * config/mips/fbsd.mh: Likewise.
4450         * config/mips/linux.mh: Likewise.
4451         * config/mips/nbsd.mh: Likewise.
4452         * config/mips/obsd64.mh: Likewise.
4453         * config/pa/linux.mh: Likewise.
4454         * config/pa/nbsd.mh: Likewise.
4455         * config/pa/obsd.mh: Likewise.
4456         * config/powerpc/aix.mh: Likewise.
4457         * config/powerpc/fbsd.mh: Likewise.
4458         * config/powerpc/linux.mh: Likewise.
4459         * config/powerpc/nbsd.mh: Likewise.
4460         * config/powerpc/obsd.mh: Likewise.
4461         * config/powerpc/ppc64-linux.mh: Likewise.
4462         * config/powerpc/spu-linux.mh: Likewise.
4463         * config/s390/linux.mh: Likewise.
4464         * config/sh/nbsd.mh: Likewise.
4465         * config/sparc/fbsd.mh: Likewise.
4466         * config/sparc/linux.mh: Likewise.
4467         * config/sparc/linux64.mh: Likewise.
4468         * config/sparc/nbsd64.mh: Likewise.
4469         * config/sparc/nbsdelf.mh: Likewise.
4470         * config/sparc/obsd64.mh: Likewise.
4471         * config/sparc/sol2.mh: Likewise.
4472         * config/tilegx/linux.mh: Likewise.
4473         * config/vax/nbsdelf.mh: Likewise.
4474         * config/vax/obsd.mh: Likewise.
4475         * config/xtensa/linux.mh: Likewise.
4476         * config/i386/i386gnu.mn: New file, with excerpts from
4477         "config/i386/i386gnu.mh".
4478         * configure: Regenerate.
4479         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
4480         *.mh files under "gdb/config".
4481         * configure.nat: New file, with contents from the
4482         "gdb/config/*/*.mh" files.
4483
4484 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
4485
4486         * btrace.c (btrace_clear): Free insn vector.
4487
4488 2017-05-05  Pedro Alves  <palves@redhat.com>
4489
4490         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
4491         * configure: Regenerate.
4492
4493 2017-05-04  Pedro Alves  <palves@redhat.com>
4494
4495         * Makefile.in (SFILES): Add progspace-and-thread.c.
4496         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
4497         (COMMON_OBS): Add progspace-and-thread.o.
4498         * breakpoint.c: Include "progspace-and-thread.h".
4499         (update_inserted_breakpoint_locations)
4500         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
4501         Use scoped_restore_current_pspace_and_thread.
4502         (create_std_terminate_master_breakpoint): Use
4503         scoped_restore_current_program_space.
4504         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
4505         (print_breakpoint_location): Use
4506         scoped_restore_current_program_space.
4507         (bp_loc_is_permanent): Use
4508         scoped_restore_current_pspace_and_thread.
4509         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
4510         (download_tracepoint_locations): Use
4511         scoped_restore_current_pspace_and_thread.
4512         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
4513         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
4514         (enum step_over_calls_kind): Moved from inferior.h.
4515         (class scoped_restore_current_thread): New class.
4516         * gdbthread.h (make_cleanup_restore_current_thread): Delete
4517         declaration.
4518         (scoped_restore_current_thread): New class.
4519         * infcmd.c: Include "common/gdb_optional.h".
4520         (continue_1, proceed_after_attach): Use
4521         scoped_restore_current_thread.
4522         (notice_new_inferior): Use scoped_restore_current_thread.
4523         * inferior.c: Include "progspace-and-thread.h".
4524         (restore_inferior, save_current_inferior): Delete.
4525         (add_inferior_command, clone_inferior_command): Use
4526         scoped_restore_current_pspace_and_thread.
4527         * inferior.h (scoped_restore_current_inferior): New class.
4528         * infrun.c: Include "progspace-and-thread.h" and
4529         "common/gdb_optional.h".
4530         (follow_fork_inferior): Use
4531         scoped_restore_current_pspace_and_thread.
4532         (scoped_restore_exited_inferior): New class.
4533         (handle_vfork_child_exec_or_exit): Use
4534         scoped_restore_exited_inferior,
4535         scoped_restore_current_pspace_and_thread,
4536         scoped_restore_current_thread and scoped_restore.
4537         (fetch_inferior_event): Use scoped_restore_current_thread.
4538         * linespec.c (decode_line_full, decode_line_1): Use
4539         scoped_restore_current_program_space.
4540         * mi/mi-main.c: Include "progspace-and-thread.h".
4541         (exec_continue): Use scoped_restore_current_thread.
4542         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
4543         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
4544         * proc-service.c (ps_pglobal_lookup): Use
4545         scoped_restore_current_program_space.
4546         * progspace-and-thread.c: New file.
4547         * progspace-and-thread.h: New file.
4548         * progspace.c (release_program_space, clone_program_space): Use
4549         scoped_restore_current_program_space.
4550         (restore_program_space, save_current_program_space)
4551         (save_current_space_and_thread): Delete.
4552         (switch_to_program_space_and_thread): Moved to
4553         progspace-and-thread.c.
4554         * progspace.h (save_current_program_space)
4555         (save_current_space_and_thread): Delete declarations.
4556         (scoped_restore_current_program_space): New class.
4557         * remote.c (remote_btrace_maybe_reopen): Use
4558         scoped_restore_current_thread.
4559         * symtab.c: Include "progspace-and-thread.h".
4560         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
4561         * thread.c (print_thread_info_1): Use
4562         scoped_restore_current_thread.
4563         (struct current_thread_cleanup): Delete.
4564         (do_restore_current_thread_cleanup)
4565         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
4566         (scoped_restore_current_thread::~scoped_restore_current_thread):
4567         ... this new dtor.
4568         (make_cleanup_restore_current_thread): Rename/convert to ...
4569         (scoped_restore_current_thread::scoped_restore_current_thread):
4570         ... this new ctor.
4571         (thread_apply_all_command): Use scoped_restore_current_thread.
4572         (thread_apply_command): Use scoped_restore_current_thread.
4573         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
4574         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
4575
4576 2017-05-04  Pedro Alves  <palves@redhat.com>
4577
4578         * thread.c (make_cleanup_restore_current_thread): Move
4579         find_thread_ptid call before the is_stopped call.  Assert that the
4580         thread is found.  Replace is_stopped call by checking the thread's
4581         state directly.  Remove unnecessary NULL-thread check.
4582
4583 2017-05-04  Pedro Alves  <palves@redhat.com>
4584
4585         * corelow.c (thread_section_name): New class.
4586         (get_core_register_section, get_core_siginfo): Use it.
4587
4588 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4589
4590         * corelow.c (sniff_core_bfd): Remove extra semicolon.
4591         (get_core_register_section): Remove xfree of NULL pointer.
4592
4593 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
4594
4595         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4596         * regcache.c (regcache::raw_supply_zeroed): New function.
4597         * regcache.h (regcache::raw_supply_zeroed): New declaration.
4598
4599 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4600
4601         * gdbarch.sh: Remove commented out definition of
4602         TARGET_CHAR_BIT.
4603         * gdbarch.h: Re-generate.
4604
4605 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4606
4607         * configure: Regenerate.
4608
4609 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
4610
4611         * solib-target.c (solib_target_relocate_section_addresses):
4612         Remove num_section_bases, num_bases, segment_bases variables.
4613
4614 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4615
4616         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4617
4618 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4619
4620         * solib-target.c: Include <vector>
4621         (struct lm_info_target) <~lm_info_target>: Remove.
4622         <segment_bases, section_bases>: Change type to
4623         std::vector<CORE_ADDR>.
4624         (library_list_start_segment, library_list_start_section,
4625         library_list_end_library,
4626         solib_target_relocate_section_addresses): Adjust.
4627
4628 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4629
4630         * gdbarch.sh (software_single_step): Change return type to
4631         std::vector<CORE_ADDR>.
4632         * gdbarch.c, gdbarch.h: Re-generate.
4633         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4634         Adjust.
4635         (arm_deal_with_atomic_sequence_raw): Adjust.
4636         (thumb_get_next_pcs_raw): Adjust.
4637         (arm_get_next_pcs_raw): Adjust.
4638         (arm_get_next_pcs): Adjust.
4639         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4640         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4641         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4642         (alpha_software_single_step): Adjust.
4643         * alpha-tdep.h (alpha_software_single_step): Adjust.
4644         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4645         * arm-tdep.c (arm_software_single_step): Adjust.
4646         (arm_breakpoint_kind_from_current_state): Adjust.
4647         * arm-tdep.h (arm_software_single_step): Adjust.
4648         * breakpoint.c (insert_single_step_breakpoint): Adjust.
4649         * cris-tdep.c (cris_software_single_step): Adjust.
4650         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4651         (micromips_deal_with_atomic_sequence): Adjust.
4652         (deal_with_atomic_sequence): Adjust.
4653         (mips_software_single_step): Adjust.
4654         * mips-tdep.h (mips_software_single_step): Adjust.
4655         * moxie-tdep.c (moxie_software_single_step): Adjust.
4656         * nios2-tdep.c (nios2_software_single_step): Adjust.
4657         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4658         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4659         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4660         * s390-linux-tdep.c (s390_software_single_step): Adjust.
4661         * sparc-tdep.c (sparc_software_single_step): Adjust.
4662         * spu-tdep.c (spu_software_single_step): Adjust.
4663         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4664
4665 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4666
4667         * gdbarch.sh: Use semi-colon as field separator instead of colon.
4668         * gdbarch.h: Re-generate.
4669
4670 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4671
4672         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4673         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4674         * python/py-instruction.c, python/py-instruction.h: New file.
4675         * python/py-record.c: Add py-instruction.h include.
4676         (gdbpy_initialize_record): Make gdb.Instruction a super class of
4677         gdb.RecordInstruction.
4678         * python/python-internal.h: Add gdbpy_initialize_instruction
4679         declaration.
4680         * python/python.c (do_start_initialization): Add
4681         gdbpy_initialize_instruction.
4682
4683 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4684
4685         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4686         Remove.
4687         (btrace_func_from_recpy_func): New function.
4688         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4689         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4690         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4691         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4692         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4693         Also, use new helper functions.
4694         (btpy_list_item): Use new helper functions.
4695         (recpy_bt_function_call_history): Use new type name.
4696         (btpy_call_getset): Remove.
4697         (gdbpy_initialize_btrace): Remove code to initialize
4698         gdb.BtraceFunctionCall.
4699         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4700         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4701         recpy_bt_func_prev, recpy_bt_func_next): New export.
4702         * python/py-record.c (recpy_func_type): New static object.
4703         (recpy_func_new, recpy_func_level, recpy_func_symbol,
4704         recpy_func_instructions, recpy_func_up, recpy_func_prev,
4705         recpy_func_next): New function.
4706         (recpy_element_hash, recpy_element_richcompare): Updated comment.
4707         (recpy_func_getset): New static object.
4708         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4709         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4710
4711 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4712
4713         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4714         (btpy_object, btpy_insn_type, btpy_new): Remove.
4715         (btpy_list_object): Use gdb.RecordInstruction type instead of
4716         gdb.BtraceInstruction type.
4717         (btrace_insn_from_recpy_insn): New function.
4718         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4719         btpy_new.
4720         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4721         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4722         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4723         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4724         instead of btpy_object.
4725         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4726         btpy_insn_data, btpy_insn_decode): Rename to ...
4727         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4728         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4729         recpy_bt_insn_decode): This.  Also, use new helper functions.
4730         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4731         recpy_insn_type.
4732         (btpy_insn_getset): Remove.
4733         (gdbpy_initialize_btrace): Remove code to initialize
4734         gdb.BtraceInstruction.  Use recpy_element_object.
4735         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4736         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4737         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4738         * python/py-record.c (recpy_insn_type): New static object.
4739         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4740         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4741         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4742         New function.
4743         (recpy_insn_getset): New static object.
4744         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4745         * python/py-record.h (recpy_element_object): New typedef.
4746         (recpy_insn_type, recpy_insn_new): New export.
4747
4748 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4749
4750         * py-record-btrace.c (btpy_insn_new): Removed.
4751         (btpy_insn_or_gap_new): New function.
4752         (btpy_insn_error): Removed.
4753         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4754         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4755         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4756         btpy_insn_or_gap_new instead of btpy_insn_new.
4757         (btpy_insn_getset): Remove btpy_insn_error.
4758         * py-record.c (recpy_gap_type): New static object.
4759         (recpy_gap_object): New typedef.
4760         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4761         recpy_gap_reason_string): New function.
4762         (recpy_gap_getset): New static object.
4763         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4764         * py-record.h (recpy_gap_new): New export.
4765
4766 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4767
4768         * python/py-record.c (recpy_ptid): Remove.
4769         (recpy_record_getset): Remove recpy_ptid.
4770
4771 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4772
4773         * btrace.c (btrace_fetch): Set inferior_ptid.
4774         * python/py-record-btrace.c: Add "py-record.h" include.
4775         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4776         recpy_bt_end, recpy_bt_instruction_history,
4777         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4778         in gdb.Record object instead of current ptid.
4779         * python/py-record.c: Include new "py-record.h" file.
4780         (recpy_record_object): Moved to py-record.h.
4781         * python/py-record.h: New file.
4782
4783 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4784
4785         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4786         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4787         indentation.
4788
4789 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
4790
4791         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4792         the past maintainers section.
4793
4794 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4795
4796         * infcmd.c (get_return_value): Use regcache ctor, and remove
4797         cleanup.
4798
4799 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4800             Pedro Alves  <palves@redhat.com>
4801
4802         * regcache.c (regcache::regcache): New tag dispatch ctor.
4803         (do_cooked_read): Moved above.
4804         (regcache_dup): Use the tag dispatch ctor..
4805         * regcache.h (regcache): Declare ctor, delete copy ctor and
4806         assignment operator, remove friend regcache_dup.
4807
4808 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4809
4810         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4811         call method save instead of regcache_cpy.
4812         * regcache.h (struct regcache): Make regcache_dup a friend.
4813
4814 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4815
4816         * regcache.c (struct regcache): Move to regcache.h
4817         (regcache::arch): New method.
4818         (regcache_get_ptid): Update.
4819         (get_regcache_arch): Call arch method.
4820         (get_regcache_aspace): Call method aspace.
4821         (register_buffer): Change it to method.
4822         (regcache_save): Change it to regcache::save.
4823         (regcache_restore): Likewise.
4824         (regcache_cpy_no_passthrough): Remove the declaration.
4825         (regcache_cpy): Call methods restore and cpy_no_passthrough.
4826         (regcache_cpy_no_passthrough): Change it to method
4827         cpy_no_passthrough.
4828         (regcache_register_status): Change it to method
4829         get_register_status.
4830         (regcache_invalidate): Change it to method invalidate.
4831         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4832         (regcache_raw_update): Change it to method raw_update.
4833         (regcache_raw_read): Likewise.
4834         (regcache_raw_read_signed): Likewise.
4835         (regcache_raw_read_unsigned): Likewise.
4836         (regcache_raw_write_signed): Likewise.
4837         (regcache_raw_write_unsigned): Likewise.
4838         (regcache_cooked_read): Likewise.
4839         (regcache_cooked_read_value): Likewise.
4840         (regcache_cooked_read_signed): Likewise.
4841         (regcache_cooked_read_unsigned): Likewise.
4842         (regcache_cooked_write_signed): Likewise.
4843         (regcache_cooked_write_unsigned): Likewise.
4844         (regcache_raw_set_cached_value): Likewise.
4845         (regcache_raw_write): Likewise.
4846         (regcache_cooked_write): Likewise.
4847         (regcache_xfer_part): Likewise.
4848         (regcache_raw_read_part): Likewise.
4849         (regcache_raw_write_part): Likewise.
4850         (regcache_cooked_read_part): Likewise.
4851         (regcache_cooked_write_part): Likewise.
4852         (regcache_raw_supply): Likewise.
4853         (regcache_raw_collect): Likewise.
4854         (regcache_transfer_regset): Likewise.
4855         (regcache_supply_regset): Likewise.
4856         (regcache_collect_regset): Likewise.
4857         (regcache_debug_print_register): Likewise.
4858         (enum regcache_dump_what): Move it to regcache.h.
4859         (regcache_dump): Change it to method dump.
4860         * regcache.h (enum regcache_dump_what): New.
4861         (class regcache): New.
4862         * target.c (target_fetch_registers): Call method
4863         debug_print_register.
4864         (target_store_registers): Likewise.
4865
4866 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4867
4868         * windows-nat.c (struct lm_info_windows): Initialize field.
4869         (windows_make_so): Allocate lm_info_windows with new.
4870         (windows_free_so): Free lm_info_windows with delete.
4871
4872 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4873
4874         * solib-darwin.c (struct lm_info_darwin): Initialize field.
4875         (darwin_current_sos): Allocate lm_info_darwin with new, remove
4876         cleanup.
4877         (darwin_free_so): Free lm_info_darwin with delete.
4878
4879 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4880
4881         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4882         <l_addr_p>: Change type to bool.
4883         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4884         (svr4_free_so): Free lm_info_svr4 with delete.
4885         (svr4_copy_library_list): Replace memcpy with call to copy
4886         constructor.
4887         (library_list_start_library, svr4_default_sos): Allocate
4888         lm_info_svr4 with new.
4889
4890 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4891
4892         * solib-target.c (struct lm_info_target): Add destructor,
4893         initialize fields.
4894         <name>: Change type to std::string.
4895         (library_list_start_library): Allocate lm_info_target with new.
4896         (solib_target_free_library_list): Free lm_info_target with
4897         delete.
4898         (solib_target_current_sos): Adapt to std::string.
4899         (solib_target_free_so): Free lm_info_target with delete.
4900
4901 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4902
4903         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4904         fields.
4905         (frv_current_sos): Allocate lm_info_frv with new.
4906         (frv_relocate_main_executable): Free lm_info_frv with delete,
4907         allocate with new.
4908         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
4909
4910 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4911
4912         * solib-frv.c (struct lm_info_frv): Fix indentation.
4913
4914 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4915
4916         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
4917         map field.
4918         (dsbt_current_sos): Allocate lm_info_dsbt with new.
4919         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
4920         and allocate with new.
4921         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
4922
4923 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4924
4925         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
4926         <filename, member_name>: Change type to std::string.
4927         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
4928         (library_list_start_library): Allocate lm_info_aix with new.
4929         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
4930         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
4931         with copy constructor.
4932
4933 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4934
4935         * solist.h (struct lm_info): Remove.
4936         (struct lm_info_base): New class.
4937         (struct so_list) <lm_info>: Change type to lm_info_base *.
4938         * nto-tdep.c (struct lm_info): Remove.
4939         (lm_addr): Adjust.
4940         * solib-aix.c (struct lm_info): Rename to ...
4941         (struct lm_info_aix): ... this.  Extend lm_info_base.
4942         (lm_info_p): Rename to ...
4943         (lm_info_aix_p): ... this, and adjust.
4944         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
4945         solib_aix_parse_libraries, library_list_start_library,
4946         solib_aix_free_library_list, solib_aix_parse_libraries,
4947         solib_aix_get_library_list,
4948         solib_aix_relocate_section_addresses, solib_aix_free_so,
4949         solib_aix_get_section_offsets,
4950         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
4951         Adjust.
4952         (struct solib_aix_inferior_data) <library_list>: Adjust.
4953         * solib-darwin.c (struct lm_info): Rename to ...
4954         (struct lm_info_darwin): ... this.  Extend lm_info_base.
4955         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
4956         * solib-dsbt.c (struct lm_info): Rename to ...
4957         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
4958         (struct dsbt_info) <main_executable_lm_info): Adjust.
4959         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
4960         dsbt_relocate_section_addresses): Adjust.
4961         * solib-frv.c (struct lm_info): Rename to ...
4962         (struct lm_info_frv): ... this.  Extend lm_info_base.
4963         (main_executable_lm_info): Adjust.
4964         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
4965         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
4966         find_canonical_descriptor_in_load_object,
4967         frv_fdpic_find_canonical_descriptor): Adjust.
4968         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
4969         to lm_info_svr4.
4970         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
4971         svr4_clear_so, svr4_copy_library_list,
4972         library_list_start_library, svr4_default_sos, svr4_read_so_list,
4973         svr4_current_sos, svr4_fetch_objfile_link_map,
4974         solist_update_incremental): Adjust.
4975         * solib-svr4.h (struct lm_info_svr4): Move here from
4976         solib-svr4.c.
4977         * solib-target.c (struct lm_info): Rename to ...
4978         (struct lm_info_target): ... this.  Extend lm_info_base.
4979         (lm_info_p): Rename to ...
4980         (lm_info_target_p): ... this.
4981         (solib_target_parse_libraries, library_list_start_segment,
4982         library_list_start_section, library_list_start_library,
4983         library_list_end_library, solib_target_free_library_list,
4984         solib_target_current_sos, solib_target_free_so,
4985         solib_target_relocate_section_addresses): Adjust.
4986         * windows-nat.c (struct lm_info): Rename to ...
4987         (struct lm_info_windows): ... this.  Extend lm_info_base.
4988         (windows_make_so, handle_load_dll, handle_unload_dll,
4989         windows_xfer_shared_libraries): Adjust.
4990
4991 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4992
4993         * solib-darwin.c (struct darwin_so_list): Remove.
4994         (darwin_current_sos): Allocate an so_list object instead of a
4995         darwin_so_list, separately allocate an lm_info object.
4996         (darwin_free_so): Free lm_info.
4997
4998 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
4999
5000         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
5001         with fprintf_filtered.
5002
5003 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5004
5005         * regcache.c (regcache::regcache): New function.
5006         (regcache::~regcache): New function.
5007         (regcache_xmalloc_1): Remove.
5008         (regcache_xmalloc): Call new regcache.
5009         (regcache_xfree): Call delete regcache.
5010         (get_thread_arch_aspace_regcache): Call new regcache.
5011
5012 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5013
5014         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
5015         lwp instead of ptid_get_lwp.
5016
5017 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5018
5019         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
5020         lwp_info instead of getting from inferior_ptid.
5021
5022 2017-04-27  Keith Seitz  <keiths@redhat.com>
5023
5024         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
5025         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
5026         (CV_CONVERSION_BADNESS): Define.
5027         (rank_one_type): Remove overly restrictive rvalue reference
5028         rank checks.
5029         Add cv-qualifier checks and subranks for type equality.
5030         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
5031         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
5032         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
5033
5034 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
5035
5036         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
5037         count when creating the object.
5038
5039 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
5040             Ulrich Weigand  <uweigand@de.ibm.com>
5041
5042         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
5043         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
5044         is used in AIX.
5045         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
5046         (process_xcoff_symbol): Likewise.
5047         (scan_xcoff_symtab): Likewise.
5048
5049 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5050
5051         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
5052         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
5053         (ia64_access_reg): Use get_frame_register_unsigned.
5054         (ia64_access_rse_reg): Likewise.
5055         (ia64_libunwind_frame_prev_register): Likewise.
5056
5057 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
5058
5059         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
5060         * gdbarch.c: Regenerated.
5061         * gdbarch.h: Regenerated.
5062         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
5063         visibility external.
5064         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
5065         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
5066         (enum cfa_how_kind): Move to ...
5067         (struct dwarf2_frame_state_reg_info): Likewise.
5068         (struct dwarf2_frame_state): Likewise.
5069         * dwarf2-frame.h: ... here.
5070         (dwarf2_frame_state_alloc_regs): New declaration.
5071         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
5072         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
5073
5074 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5075
5076         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
5077         regcache_raw_read_unsigned.
5078         (xtensa_pseudo_register_write): Likewise.
5079
5080 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5081
5082         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
5083         (nds32_pseudo_register_write): Likewise.
5084
5085 2017-04-25  Yao Qi  <yao.qi@linaro.org>
5086
5087         * regcache.c (struct regcache) <readonly_p>: Change its type
5088         to bool.
5089         (regcache_xmalloc_1): Update parameter type and callers update.
5090
5091 2017-04-25  Yao Qi  <yao.qi@linaro.org>
5092
5093         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
5094         set_gdbarch_wchar_bit.
5095         * arm-tdep.c (arm_gdbarch_init): Likewise.
5096
5097 2017-04-25  Pedro Alves  <palves@redhat.com>
5098
5099         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
5100         (BothAreRelocatable, memcopy, memmove): Don't define.
5101         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
5102         macros.
5103
5104 2017-04-25  Pedro Alves  <palves@redhat.com>
5105
5106         * common/common-defs.h: Include "common/poison.h".
5107         * common/function-view.h: (Not, Or, Requires): Move to traits.h
5108         and adjust.
5109         * common/poison.h: New file.
5110         * common/traits.h: Include <type_traits>.
5111         (Not, Or, Requires): New, moved from common/function-view.h.
5112
5113 2017-04-25  Pedro Alves  <palves@redhat.com>
5114
5115         * breakpoint.h (struct breakpoint): In-class initialize all
5116         fields.  Make boolean fields "bool".
5117         * breakpoint.c (init_raw_breakpoint_without_location): Remove
5118         memset call and initializations no longer necessary.
5119
5120 2017-04-25  Pedro Alves  <palves@redhat.com>
5121
5122         * btrace.c (pt_btrace_insn_flags): Change parameter type to
5123         reference.
5124         (pt_btrace_insn): New function.
5125         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
5126
5127 2017-04-25  Pedro Alves  <palves@redhat.com>
5128
5129         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
5130         "base" field and inherit from "bp_location" instead.  Add
5131         non-default ctor.
5132         (allocate_location_exception): Use new non-default ctor.
5133         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
5134         (init_bp_location): Convert to ...
5135         (bp_location::bp_location): ... this new ctor, and remove memset
5136         call.
5137         (base_breakpoint_allocate_location): Use the new non-default ctor.
5138         * breakpoint.h (bp_location): Now a class.  Declare default and
5139         non-default ctors.  In-class initialize all members.
5140         (init_bp_location): Remove declaration.
5141
5142 2017-04-25  Pedro Alves  <palves@redhat.com>
5143
5144         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
5145         assignment operator.
5146
5147 2017-04-24  Yao Qi  <yao.qi@linaro.org>
5148
5149         * doublest.c (convert_doublest_to_floatformat): Call
5150         floatformat_totalsize_bytes.
5151
5152 2017-04-22  Tom Tromey  <tom@tromey.com>
5153
5154         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5155         ui_out_emit_list.
5156         * stack.c (print_frame): Use ui_out_emit_list.
5157         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5158         ui_out_emit_list.
5159         * mi/mi-main.c (print_one_inferior)
5160         (mi_cmd_data_list_register_names)
5161         (mi_cmd_data_list_register_values, mi_cmd_list_features)
5162         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
5163         ui_out_emit_list.
5164         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
5165         (mi_output_solib_attribs): Use ui_out_emit_list,
5166         ui_out_emit_tuple.
5167         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
5168         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
5169         (mi_cmd_stack_list_args, list_args_or_locals): Use
5170         ui_out_emit_list.
5171         * disasm.c (do_assembly_only): Use ui_out_emit_list.
5172         * breakpoint.c (print_solib_event, output_thread_groups): Use
5173         ui_out_emit_list.
5174
5175 2017-04-22  Tom Tromey  <tom@tromey.com>
5176
5177         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
5178         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
5179         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
5180
5181 2017-04-22  Tom Tromey  <tom@tromey.com>
5182
5183         * tracepoint.c (tvariables_info_1)
5184         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
5185
5186 2017-04-22  Tom Tromey  <tom@tromey.com>
5187
5188         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
5189         annotate_arg_emitter.
5190         * breakpoint.c (print_mention_watchpoint)
5191         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
5192         * annotate.h (struct annotate_arg_emitter): New.
5193
5194 2017-04-22  Tom Tromey  <tom@tromey.com>
5195
5196         * record-btrace.c (record_btrace_insn_history)
5197         (record_btrace_insn_history_range, record_btrace_call_history)
5198         (record_btrace_call_history_range): Use ui_out_emit_tuple.
5199         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
5200         ui_out_emit_tuple.
5201         * stack.c (print_frame_info): Use ui_out_emit_tuple.
5202         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
5203         * skip.c (skip_info): Use ui_out_emit_tuple.
5204         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
5205         * progspace.c (print_program_space): Use ui_out_emit_tuple.
5206         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
5207         * osdata.c (info_osdata): Use ui_out_emit_tuple.
5208         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5209         ui_out_emit_tuple.
5210         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
5211         (output_register, mi_cmd_data_read_memory)
5212         (mi_cmd_data_read_memory_bytes, mi_load_progress)
5213         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
5214         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
5215         Use ui_out_emit_tuple.
5216         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
5217         ui_out_emit_tuple.
5218         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5219         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
5220         * linux-thread-db.c (info_auto_load_libthread_db): Use
5221         ui_out_emit_tuple.
5222         * inferior.c (print_inferior): Use ui_out_emit_tuple.
5223         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
5224         * disasm.c (do_mixed_source_and_assembly_deprecated)
5225         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
5226         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
5227         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
5228         * breakpoint.c (print_one_breakpoint_location)
5229         (print_one_breakpoint): Use ui_out_emit_tuple.
5230         * auto-load.c (print_script, info_auto_load_cmd): Use
5231         ui_out_emit_tuple.
5232         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
5233
5234 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
5235
5236         * thread.c (print_thread_info_1): Remove dead code.
5237
5238 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5239
5240         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
5241         GDB_SELF_TEST.
5242         * arm-tdep.c (selftests::arm_record_test): Likewise.
5243
5244 2017-04-21  Yao Qi  <yao.qi@linaro.org>
5245
5246         * regcache.c (regcache_restore): Remove argument 2.  Replace
5247         argument 3 with regcache.  Get register status from
5248         src->register_status and get register contents from
5249         register_buffer (src, regnum).
5250         (regcache_cpy): Update.
5251
5252 2017-04-19  Pedro Alves  <palves@redhat.com>
5253
5254         * gdbthread.h (thread): Add missing closing parenthesis in
5255         comment.
5256
5257 2017-04-19  Pedro Alves  <palves@redhat.com>
5258
5259         * common/refcounted-object.h: New file.
5260         * gdbthread.h: Include "common/refcounted-object.h".
5261         (thread_info): Inherit from refcounted_object and add comments.
5262         (thread_info::incref, thread_info::decref)
5263         (thread_info::m_refcount): Delete.
5264         (thread_info::deletable): Use the refcounted_object::refcount()
5265         method.
5266         * inferior.c (current_inferior_): Add comment.
5267         (set_current_inferior): Increment/decrement refcounts.
5268         (prune_inferiors, remove_inferior_command): Skip inferiors marked
5269         not-deletable instead of comparing with the current inferior.
5270         (initialize_inferiors): Increment the initial inferior's refcount.
5271         * inferior.h (struct inferior): Forward declare.
5272         Include "common/refcounted-object.h".
5273         (current_inferior, set_current_inferior): Move declaration to
5274         before struct inferior's definition, and fix comment.
5275         (inferior): Inherit from refcounted_object.  Add comments.
5276         * thread.c (switch_to_thread_no_regs): Reference the thread's
5277         inferior pointer directly instead of doing a ptid lookup.
5278         (switch_to_no_thread): New function.
5279         (switch_to_thread(thread_info *)): New function, factored out
5280         from ...
5281         (switch_to_thread(ptid_t)): ... this.
5282         (restore_current_thread): Delete.
5283         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
5284         fields, and add 'inf' field.
5285         (do_restore_current_thread_cleanup): Check whether old->inf is
5286         alive instead of looking up an inferior by ptid.  Use
5287         switch_to_thread and switch_to_no_thread.
5288         (restore_current_thread_cleanup_dtor): Use old->inf directly
5289         instead of lookup up an inferior by id.  Decref the inferior.
5290         Don't restore 'removable'.
5291         (make_cleanup_restore_current_thread): Same the inferior pointer
5292         in old, instead of the inferior number.  Incref the inferior.
5293         Don't save/clear 'removable'.
5294
5295 2017-04-19  Pedro Alves  <palves@redhat.com>
5296
5297         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5298         unittests/scoped_restore-selftests.c.
5299         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
5300         * common/scoped_restore.h (scoped_restore_base): Make "class".
5301         (scoped_restore_base::release): New public method.
5302         (scoped_restore_base::scoped_restore_base): New protected ctor.
5303         (scoped_restore_base::m_saved_var): New protected field.
5304         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
5305         scoped_restore_base base class instead of m_saved_var directly.
5306         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
5307         (scoped_restore_tmpl::scoped_restore_tmpl(const
5308         scoped_restore_tmpl<T>&)): Likewise.
5309         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
5310         method.
5311         (scoped_restore_tmpl::saved_var): New method.
5312         (scoped_restore_tmpl::m_saved_var): Delete.
5313         * inferior.h (inferior::detaching): Now a bool.
5314         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
5315         cleanup.
5316         * unittests/scoped_restore-selftests.c: New file.
5317
5318 2017-04-19  Pedro Alves  <palves@redhat.com>
5319
5320         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
5321         Re-sort in alphabetic order.
5322
5323 2017-04-18  Pedro Alves  <palves@redhat.com>
5324
5325         * xml-support.c (obstack_xml_printf): Delete.
5326         * xml-support.h (obstack_xml_printf): Delete.
5327
5328 2017-04-18  Pedro Alves  <palves@redhat.com>
5329
5330         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
5331         vdebug, verror, body_text, start_element, end_element, name,
5332         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
5333         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
5334         is_xinclude>: Make private and add m_ prefix.
5335         (gdb_xml_parser::body_text): New method, based on ...
5336         (gdb_xml_body_text): ... this.  Adjust.
5337         (gdb_xml_parser::vdebug): New method, based on ...
5338         (gdb_xml_debug): ... this.  Adjust.
5339         (gdb_xml_parser::verror): New method, based on ...
5340         (gdb_xml_error): ... this.  Adjust.
5341         (gdb_xml_parser::start_element): New method, based on ...
5342         (gdb_xml_start_element): ... this.  Adjust.
5343         (gdb_xml_start_element_wrapper): Defer to
5344         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
5345         (gdb_xml_parser::end_element): New method, based on ...
5346         (gdb_xml_end_element_wrapper): ... this.  Adjust.
5347         (gdb_xml_parser::~gdb_xml_parser): Adjust.
5348         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
5349         (gdb_xml_parser::use_dtd): New method, based on ...
5350         (gdb_xml_use_dtd): ... this.  Adjust.
5351         (gdb_xml_parser::parse): New method, based on ...
5352         (gdb_xml_parse): ... this.  Adjust.
5353         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
5354         (xinclude_start_include): Adjust to call the parser's name method.
5355         (xml_xinclude_default, xml_xinclude_start_doctype)
5356         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
5357         method.
5358         (xml_process_xincludes): Adjust to call parser methods.
5359         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
5360         declarations.
5361
5362 2017-04-18  Pedro Alves  <palves@redhat.com>
5363
5364         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
5365         gdb::optional<std::string>.
5366         * xml-support.c: Include <string>.
5367         (scope_level::scope_level(scope_level &&))
5368         (scope_level::~scope_level): Delete.
5369         (scope_level::body): Now a std::string.
5370         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
5371         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
5372         parameter.
5373         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
5374         (xinclude_parsing_data::output): Now a std::string reference.
5375         (xinclude_start_include): Adjust.
5376         (xml_xinclude_default): Adjust.
5377         (xml_process_xincludes): Add 'output' parameter, and return bool.
5378         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
5379         and return bool.
5380         * xml-tdesc.c: Include <unordered_map> and <string>.
5381         (tdesc_xml_cache): Delete.
5382         (tdesc_xml_cache_s): Delete.
5383         (xml_cache): Now an std::unordered_map.
5384         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
5385         (target_fetch_description_xml): Change return type to
5386         gdb::optional<std::string>, and adjust.
5387         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
5388         (target_fetch_description_xml): Change return type to
5389         gdb::optional<std::string>.
5390
5391 2017-04-18  Pedro Alves  <palves@redhat.com>
5392
5393         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5394         unittests/optional-selftests.c.
5395         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
5396         * unittests/optional-selftests.c: New file.
5397         * unittests/optional/assignment/1.cc: New file.
5398         * unittests/optional/assignment/2.cc: New file.
5399         * unittests/optional/assignment/3.cc: New file.
5400         * unittests/optional/assignment/4.cc: New file.
5401         * unittests/optional/assignment/5.cc: New file.
5402         * unittests/optional/assignment/6.cc: New file.
5403         * unittests/optional/assignment/7.cc: New file.
5404         * unittests/optional/cons/copy.cc: New file.
5405         * unittests/optional/cons/default.cc: New file.
5406         * unittests/optional/cons/move.cc: New file.
5407         * unittests/optional/cons/value.cc: New file.
5408         * unittests/optional/in_place.cc: New file.
5409         * unittests/optional/observers/1.cc: New file.
5410         * unittests/optional/observers/2.cc: New file.
5411
5412 2017-04-18  Pedro Alves  <palves@redhat.com>
5413
5414         * common/gdb_optional.h: Include common/traits.h.
5415         (in_place_t): New type.
5416         (in_place): New constexpr variable.
5417         (optional::optional): Remove member initialization of
5418         m_instantiated.
5419         (optional::optional(in_place_t...)): New constructor.
5420         (optional::~optional): Use reset.
5421         (optional::optional(const optional&)): New.
5422         (optional::optional(const optional&&)): New.
5423         (optional::optional(T &)): New.
5424         (optional::optional(T &&)): New.
5425         (operator::operator=(const optional &)): New.
5426         (operator::operator=(optional &&)): New.
5427         (operator::operator= (const T &))
5428         (operator::operator= (T &&))
5429         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
5430         (operator::reset): New.
5431         (operator::m_instantiated):: Add in-class initializer.
5432         * common/traits.h: Include <type_traits>.
5433         (struct And): New types.
5434
5435 2017-04-18  Pedro Alves  <palves@redhat.com>
5436
5437         * xml-support.c: Include <vector>.
5438         (scope_level::scope_level(const gdb_xml_element *))
5439         (scope_level::scope_level(scope_level&&)): New.
5440         (scope_level::~scope_level): New.
5441         (scope_level_s): Delete.
5442         (gdb_xml_parser::scopes): Now a std::vector.
5443         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
5444         Use std::vector.
5445         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
5446         scope cleanup code.
5447         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
5448         of the scopes member.  Use std::vector::emplace_back.
5449
5450 2017-04-18  Pedro Alves  <palves@redhat.com>
5451
5452         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
5453         a bool.
5454         (gdb_xml_end_element): Change type of first parameter.
5455         (gdb_xml_cleanup): Rename to ...
5456         (gdb_xml_parser::~gdb_xml_parser): ... this.
5457         (gdb_xml_create_parser_and_cleanup): Delete with ...
5458         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
5459         to this new ctor.
5460         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
5461         using gdb_xml_create_parser_and_cleanup.
5462         (xinclude_parsing_data): Add ctor/dtor.
5463         (xml_xinclude_cleanup): Delete.
5464         (xml_process_xincludes): Create a local xinclude_parsing_data
5465         instead of heap-allocating one.  Create a local gdb_xml_parser
5466         instead of heap-allocating one with
5467         gdb_xml_create_parser_and_cleanup.
5468
5469 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
5470
5471         PR threads/20743
5472         * fbsd-nat.c (resume_one_thread_cb): Remove.
5473         (resume_all_threads_cb): Remove.
5474         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
5475         iterate_over_threads.
5476
5477 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
5478
5479         * NEWS: Create a new section for the next release branch.
5480         Rename the section of the current branch, now that it has
5481         been cut.
5482
5483 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
5484
5485         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
5486         * version.in: Bump version to 8.0.50.DATE-git.
5487
5488 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
5489
5490         PR gdb/21385
5491         * windows-nat.c (windows_create_inferior): Declare 'allargs'
5492         independently of the host, and fix build breakage on Cygwin.
5493
5494 2017-04-13  Pedro Alves  <palves@redhat.com>
5495
5496         * inferior.c (free_inferior): Convert to ...
5497         (inferior::~inferior): ... this dtor.
5498         (inferior::inferior): New ctor, factored out from ...
5499         (add_inferior_silent): ... here.  Allocate the inferior with a new
5500         expression.
5501         (delete_inferior): Call delete instead of free_inferior.
5502         * inferior.h (gdb_environ, continuation): Forward declare.
5503         (inferior): Now a class.  Add in-class initialization to all
5504         members.  Make boolean fields bool, except 'detaching'.
5505         (inferior::inferior): New explicit ctor.
5506         (inferior::~inferior): New.
5507
5508 2017-04-13  Pedro Alves  <palves@redhat.com>
5509
5510         * inferior.c (init_inferior_list): Delete.
5511         * inferior.h (init_inferior_list): Delete.
5512
5513 2017-04-13  Pedro Alves  <palves@redhat.com>
5514
5515         PR threads/13217
5516         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
5517         (top level): Call it twice, with different thread sets.
5518
5519 2017-04-13  Pedro Alves  <palves@redhat.com>
5520
5521         * thread.c: Include <algorithm>.
5522         (thread_array_cleanup): Delete.
5523         (scoped_inc_dec_ref): New class.
5524         (live_threads_count): New function.
5525         (set_thread_refcount): Delete.
5526         (tp_array_compar_ascending): Now a bool.
5527         (tp_array_compar): Convert to a std::sort comparison function.
5528         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
5529         and live_threads_count.
5530
5531 2017-04-13  Pedro Alves  <palves@redhat.com>
5532
5533         * infrun.c (follow_fork_inferior): Also switch the current
5534         inferior.
5535
5536 2017-04-13  Pedro Alves  <palves@redhat.com>
5537
5538         * breakpoint.c (watch_command_1): Save watchpoint-frame info
5539         before calling create_internal_breakpoint.
5540
5541 2017-04-13  Pedro Alves  <palves@redhat.com>
5542
5543         * fork-child.c (execv_argv): New class.
5544         (breakup_args): Refactored as ...
5545         (execv_argv::init_for_no_shell): .. this method of execv_argv.
5546         Copy arguments to storage and replace separators with NULL
5547         terminators in place.
5548         (escape_bang_in_quoted_argument): Adjust to return bool.
5549         (execv_argv::execv_argv): New ctor.
5550         (execv_argv::init_for_shell): New method, factored out from
5551         fork_inferior.  Don't strdup strings into the vector.
5552         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
5553         Remove free_vector_argv call.
5554
5555 2017-04-13  Yao Qi  <yao.qi@linaro.org>
5556
5557         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
5558         tdep->rx_psw_type.
5559
5560 2017-04-13  Yao Qi  <yao.qi@linaro.org>
5561
5562         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
5563         * rx-tdep.c (rx_gdbarch_init): Likewise.
5564
5565 2017-04-13  Pedro Alves  <palves@redhat.com>
5566
5567         * breakpoint.h (struct breakpoint): Reindent.
5568
5569 2017-04-13  Pedro Alves  <palves@redhat.com>
5570
5571         * breakpoint.c (bp_location): Rename to ...
5572         (bp_locations): ... this.  All references updated.
5573         (bp_location_count): Rename to ...
5574         (bp_locations_count): ... this.  All references updated.
5575         (bp_location_placed_address_before_address_max): Rename to ...
5576         (bp_locations_placed_address_before_address_max): ... this.  All
5577         references updated.
5578         (bp_location_shadow_len_after_address_max): Rename to ...
5579         (bp_locations_shadow_len_after_address_max): ... this.  All
5580         references updated.
5581         (bp_location_compare_addrs): Rename to ...
5582         (bp_locations_compare_addrs): ... this.  All references updated.
5583         (bp_location_compare):Rename to ...
5584         (bp_locations_compare): ... this.  All references updated.
5585         (bp_location_target_extensions_update): Rename to ...
5586         (bp_locations_target_extensions_update): ... this.  All references
5587         updated.
5588
5589 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5590
5591         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5592         * common/common.m4: Check headers 'termios.h', 'termio.h' and
5593         'sgtty.h'.
5594         * common/gdb_termios.h: New file, with parts of "terminal.h".
5595         * inflow.c: Include "gdb_termios.h".
5596         * ser-unix.c: Include "gdb_termios.h".
5597         * terminal.h: Move terminal-related defines to
5598         "common/gdb_termios.h".
5599
5600 2017-04-12  Tom Tromey  <tom@tromey.com>
5601
5602         * probe.c (parse_probes): Update.
5603         * location.h (delete_event_location): Don't declare.
5604         (event_location_deleter::operator()): Update.
5605         * location.c (event_location_deleter::operator()): Rename from
5606         delete_event_location.
5607         * linespec.h (linespec_result) <location>: Change type to
5608         event_location_up.
5609         * linespec.c (canonicalize_linespec, event_location_to_sals)
5610         (decode_objc): Update.
5611         (linespec_result): Don't call delete_event_location.
5612         * breakpoint.c (create_breakpoints_sal)
5613         (bkpt_probe_create_sals_from_location)
5614         (strace_marker_create_sals_from_location): Update.
5615
5616 2017-04-12  Tom Tromey  <tom@tromey.com>
5617
5618         * linespec.h (struct linespec_result): Add constructor and
5619         destructor.
5620         (init_linespec_result, destroy_linespec_result)
5621         (make_cleanup_destroy_linespec_result): Don't declare.
5622         * linespec.c (init_linespec_result): Remove.
5623         (linespec_result::~linespec_result): Rename from
5624         destroy_linespec_result.  Update.
5625         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5626         Remove.
5627         * breakpoint.c (create_breakpoint, break_range_command)
5628         (decode_location_default): Update.
5629         * ax-gdb.c (agent_command_1): Update.
5630
5631 2017-04-12  Tom Tromey  <tom@tromey.com>
5632
5633         * remote.c (remote_download_tracepoint): Update.
5634         * python/py-breakpoint.c (bppy_get_location): Update.
5635         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5636         (gdbscm_breakpoint_location): Update.
5637         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5638         * breakpoint.h (struct breakpoint) <location, location_range_end>:
5639         Change type to event_location_up.
5640         * breakpoint.c (create_overlay_event_breakpoint)
5641         (create_longjmp_master_breakpoint)
5642         (create_std_terminate_master_breakpoint)
5643         (create_exception_master_breakpoint)
5644         (breakpoint_event_location_empty_p, print_breakpoint_location)
5645         (print_one_breakpoint_location, create_thread_event_breakpoint)
5646         (init_breakpoint_sal, create_breakpoint)
5647         (print_recreate_ranged_breakpoint, break_range_command)
5648         (init_ada_exception_breakpoint, say_where): Update.
5649         (base_breakpoint_dtor): Don't call delete_event_location.
5650         (bkpt_print_recreate, tracepoint_print_recreate)
5651         (dprintf_print_recreate, update_static_tracepoint)
5652         (breakpoint_re_set_default): Update.
5653
5654 2017-04-12  Tom Tromey  <tom@tromey.com>
5655
5656         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5657         type of "to_do".  Update.
5658         (compute_stack_depth): Use std::vector.
5659
5660 2017-04-12  Tom Tromey  <tom@tromey.com>
5661
5662         * printcmd.c (find_instruction_backward): Use std::vector.
5663
5664 2017-04-12  Tom Tromey  <tom@tromey.com>
5665
5666         * symfile.c (objfilep): Remove typedef.
5667         (reread_symbols): Use a std::vector.
5668
5669 2017-04-12  Tom Tromey  <tom@tromey.com>
5670
5671         * mi/mi-main.c (exec_direction_forward): Remove.
5672         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5673         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5674         scoped_restore.
5675         * guile/guile.c (guile_repl_command, guile_command)
5676         (gdbscm_execute_gdb_command): Use scoped_restore.
5677         * go-exp.y (go_parse): Use scoped_restore.
5678         * d-exp.y (d_parse): Use scoped_restore.
5679         * cli/cli-decode.c (cmd_func): Use scoped_restore.
5680         * c-exp.y (c_parse): Use scoped_restore.
5681
5682 2017-04-12  Tom Tromey  <tom@tromey.com>
5683
5684         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5685         (mi_parse): Update return type.
5686         (mi_parse_free): Remove.
5687         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5688         (mi_parse::~mi_parse): Rename from mi_parse_free.
5689         (mi_parse_cleanup): Remove.
5690         (mi_parse): Return a unique_ptr.  Use new.
5691         * mi/mi-main.c (mi_execute_command): Update.
5692
5693 2017-04-12  Tom Tromey  <tom@tromey.com>
5694
5695         * location.c (explicit_location_lex_one): Return a
5696         unique_xmalloc_ptr.
5697         (string_to_explicit_location): Update.  Remove cleanups.
5698
5699 2017-04-12  Tom Tromey  <tom@tromey.com>
5700
5701         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5702         (compare_value_and_voffset): Change type.  Update.
5703         (compute_vtable_size): Change type of "offset_vec".
5704         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
5705         (gnuv3_get_typeid): Remove extraneous declaration.
5706
5707 2017-04-12  Tom Tromey  <tom@tromey.com>
5708
5709         * charset.h (wchar_iterator): Fix comment.
5710
5711 2017-04-12  Tom Tromey  <tom@tromey.com>
5712
5713         * charset.c (iconv_wrapper): New class.
5714         (cleanup_iconv): Remove.
5715         (convert_between_encodings): Use it.
5716
5717 2017-04-12  Tom Tromey  <tom@tromey.com>
5718
5719         * symfile.h (increment_reading_symtab): Update type.
5720         * symfile.c (decrement_reading_symtab): Remove.
5721         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5722         * psymtab.c (psymtab_to_symtab): Update.
5723         * dwarf2read.c (dw2_instantiate_symtab): Update.
5724
5725 2017-04-12  Tom Tromey  <tom@tromey.com>
5726
5727         * jit.c (struct jit_reader): Declare separately.  Add constructor
5728         and destructor.  Change type of "handle".
5729         (loaded_jit_reader): Define separately.
5730         (jit_reader_load): Update.  New "new".
5731         (jit_reader_unload_command): Use "delete".
5732         * gdb-dlfcn.h (struct dlclose_deleter): New.
5733         (gdb_dlhandle_up): New typedef.
5734         (gdb_dlopen, gdb_dlsym): Update types.
5735         (gdb_dlclose): Remove.
5736         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5737         (gdb_dlsym): Change type of "handle".
5738         (make_cleanup_dlclose): Remove.
5739         (dlclose_deleter::operator()): Rename from gdb_dlclose.
5740         * compile/compile-c-support.c (load_libcc): Update.
5741
5742 2017-04-12  Tom Tromey  <tom@tromey.com>
5743
5744         * symtab.h (find_pcs_for_symtab_line): Change return type.
5745         * symtab.c (find_pcs_for_symtab_line): Change return type.
5746         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5747         type of "vec".  Update.
5748         (ltpy_get_pcs_for_line): Update.
5749         * linespec.c (decode_digits_ordinary): Update.
5750
5751 2017-04-12  Tom Tromey  <tom@tromey.com>
5752
5753         * tracepoint.c (actions_command): Update.
5754         * python/python.c (python_command, python_interactive_command):
5755         Update.
5756         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5757         * guile/guile.c (guile_command): Update.
5758         * defs.h (read_command_lines, read_command_lines_1): Return
5759         command_line_up.
5760         (command_lines_deleter): New struct.
5761         (command_line_up): New typedef.
5762         * compile/compile.c (compile_code_command)
5763         (compile_print_command): Update.
5764         * cli/cli-script.h (get_command_line, copy_command_lines): Return
5765         command_line_up.
5766         (make_cleanup_free_command_lines): Remove.
5767         * cli/cli-script.c (get_command_line, read_command_lines_1)
5768         (copy_command_lines): Return command_line_up.
5769         (while_command, if_command, read_command_lines, define_command)
5770         (document_command): Update.
5771         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5772         Remove.
5773         * breakpoint.h (breakpoint_set_commands): Change type of
5774         "commands".
5775         * breakpoint.c (breakpoint_set_commands): Change type of
5776         "commands".  Update.
5777         (do_map_commands_command, update_dprintf_command_list)
5778         (create_tracepoint_from_upload): Update.
5779
5780 2017-04-12  Tom Tromey  <tom@tromey.com>
5781
5782         * tracepoint.c (scope_info): Update.
5783         * spu-tdep.c (spu_catch_start): Update.
5784         * python/python.c (gdbpy_decode_line): Update.
5785         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5786         * python/py-breakpoint.c (bppy_init): Update.
5787         * probe.c (parse_probes): Update.
5788         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5789         * location.h (event_location_deleter): New struct.
5790         (event_location_up): New typedef.
5791         (new_linespec_location, new_address_location, new_probe_location)
5792         (new_explicit_location, copy_event_location)
5793         (string_to_event_location, string_to_event_location_basic)
5794         (string_to_explicit_location): Update return type.
5795         (make_cleanup_delete_event_location): Remove.
5796         * location.c (new_linespec_location, new_address_location)
5797         (new_probe_location, new_explicit_location, copy_event_location):
5798         Return event_location_up.
5799         (delete_event_location_cleanup)
5800         (make_cleanup_delete_event_location): Remove.
5801         (string_to_explicit_location, string_to_event_location_basic)
5802         (string_to_event_location): Return event_location_up.
5803         * linespec.c (canonicalize_linespec, event_location_to_sals)
5804         (decode_line_with_current_source)
5805         (decode_line_with_last_displayed, decode_objc): Update.
5806         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5807         * completer.c (location_completer): Update.
5808         * cli/cli-cmds.c (edit_command, list_command): Update.
5809         * breakpoint.c (create_overlay_event_breakpoint)
5810         (create_longjmp_master_breakpoint)
5811         (create_std_terminate_master_breakpoint)
5812         (create_exception_master_breakpoint)
5813         (create_thread_event_breakpoint): Update.
5814         (init_breakpoint_sal): Update.  Remove some dead code.
5815         (create_breakpoint_sal): Change type of "location".  Update.
5816         (create_breakpoints_sal, create_breakpoint, break_command_1)
5817         (dprintf_command, break_range_command, until_break_command)
5818         (init_ada_exception_breakpoint)
5819         (strace_marker_create_sals_from_location)
5820         (update_static_tracepoint, trace_command, ftrace_command)
5821         (strace_command, create_tracepoint_from_upload): Update.
5822         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5823         * ax-gdb.c (agent_command_1): Update.
5824
5825 2017-04-12  Pedro Alves  <palves@redhat.com>
5826
5827         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5828         * configure.tgt: Handle i[34567]86-*-go32* and
5829         i[34567]86-*-msdosdjgpp*.
5830         * i386-tdep.c (i386_svr4_reg_to_regnum):
5831         Make extern.
5832         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5833         i386-go32-tdep.c.
5834         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5835         * i386-go32-tdep.c: New file.
5836         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5837         declarations.
5838
5839 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
5840
5841         * aix-thread.c (pd_status2str): Change return type to const char *.
5842
5843 2017-04-12  Pedro Alves  <palves@redhat.com>
5844
5845         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5846         calls to set_gdbarch_gnu_triplet_regexp.
5847
5848 2017-04-12  Pedro Alves  <palves@redhat.com>
5849
5850         PR gdb/21323
5851         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5852         New enum value.
5853         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5854         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5855         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5856         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5857         * gdbarch.h, gdbarch.c: Regenerate.
5858         * aarch64-tdep.c (aarch64_gdbarch_init): Override
5859         gdbarch_wchar_bit and gdbarch_wchar_signed.
5860         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5861         * arm-tdep.c (arm_gdbarch_init): Likewise.
5862         * avr-tdep.c (avr_gdbarch_init): Likewise.
5863         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5864         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5865         * i386-tdep.c (i386_go32_init_abi): Likewise.
5866         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5867         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5868         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5869         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5870         * sh-tdep.c (sh_gdbarch_init): Likewise.
5871         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5872         * sparc64-tdep.c (sparc64_init_abi): Likewise.
5873         * windows-tdep.c (windows_init_abi): Likewise.
5874         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5875
5876 2017-04-12  Pedro Alves  <palves@redhat.com>
5877
5878         PR c++/21323
5879         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5880         cplus_primitive_type_char32_t>: New enum values.
5881         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5882         and cplus_primitive_type_char32_t.
5883         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5884         32, use the archtecture's built-in type for char16_t and char32_t,
5885         respectively.  Otherwise, fallback to init_integer_type as before,
5886         but make the type unsigned, and issue a complaint.
5887         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5888
5889 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
5890
5891         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
5892         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5893
5894 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5895
5896         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5897         'const char *'.
5898
5899 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5900
5901         * common/common-utils.c (free_vector_argv): New function.
5902         * common/common-utils.h: Include <vector>.
5903         (free_vector_argv): New prototype.
5904         * darwin-nat.c (darwin_create_inferior): Rewrite function
5905         prototype in order to constify "exec_file" and accept a
5906         "std::string" for "allargs".
5907         * fork-child.c: Include <vector>.
5908         (breakup_args): Rewrite function, using C++.
5909         (fork_inferior): Rewrite function header, constify "exec_file_arg"
5910         and accept "std::string" for "allargs".  Update the code to
5911         calculate "argv" based on "allargs".  Update calls to "exec_fun"
5912         and "execvp".
5913         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
5914         order to constify "exec_file" and accept a "std::string" for
5915         "allargs".
5916         * go32-nat.c (go32_create_inferior): Likewise.
5917         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
5918         * infcmd.c (run_command_1): Constify "exec_file".  Use
5919         "std::string" for inferior arguments.
5920         * inferior.h (fork_inferior): Update prototype.
5921         * linux-nat.c (linux_nat_create_inferior): Rewrite function
5922         prototype in order to constify "exec_file" and accept a
5923         "std::string" for "allargs".
5924         * nto-procfs.c (procfs_create_inferior): Likewise.
5925         * procfs.c (procfs_create_inferior): Likewise.
5926         * remote-sim.c (gdbsim_create_inferior): Likewise.
5927         * remote.c (extended_remote_run): Update code to accept
5928         "std::string" as argument.
5929         (extended_remote_create_inferior): Rewrite function prototype in
5930         order to constify "exec_file" and accept a "std::string" for
5931         "allargs".
5932         * rs6000-nat.c (super_create_inferior): Likewise.
5933         (rs6000_create_inferior): Likewise.
5934         * target.h (struct target_ops) <to_create_inferior>: Likewise.
5935         * windows-nat.c (windows_create_inferior): Likewise.
5936
5937 2017-04-11  Pedro Alves  <palves@redhat.com>
5938
5939         * thread.c: Fix whitespace throughout.
5940
5941 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5942
5943         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
5944
5945 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
5946
5947         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
5948
5949 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
5950
5951         PR gdb/21364
5952         * osdata.c (info_osdata): Check if 'type' is an empty string
5953         instead of NULL.
5954
5955 2017-04-10  Pedro Alves  <palves@redhat.com>
5956
5957         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
5958         (ptid_to_global_thread_id, in_thread_list)
5959         (do_captured_list_thread_ids, set_resumed, set_running)
5960         (set_executing, set_stop_requested, finish_thread_state)
5961         (validate_registers_access, can_access_registers_ptid)
5962         (print_thread_info_1, switch_to_thread)
5963         (do_restore_current_thread_cleanup)
5964         (make_cleanup_restore_current_thread, thread_command)
5965         (thread_name_command): Use operator== instead of ptid_equal.
5966
5967 2017-04-10  Pedro Alves  <palves@redhat.com>
5968
5969         * thread.c (struct current_thread_cleanup) <next>: Delete field.
5970         (current_thread_cleanup_chain): Delete.
5971         (restore_current_thread_cleanup_dtor)
5972         (make_cleanup_restore_current_thread): Remove references to
5973         current_thread_cleanup_chain.
5974
5975 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
5976
5977         * msp430-tdep.c (msp430_pseudo_register_read): Never return
5978         REG_UNKNOWN.
5979
5980 2017-04-10  Yao Qi  <yao.qi@linaro.org>
5981
5982         PR gdb/19942
5983         * gdbthread.h (thread_info::deletable): New method.
5984         (thread_info::incref): New method.
5985         (thread_info::decref): New method.
5986         (thread_info::refcount): Move it to private.
5987         * infrun.c (save_stop_context): Call inc_refcount.
5988         (release_stop_context_cleanup): Likewise.
5989         * thread.c (set_thread_exited): New function.
5990         (init_thread_list): Delete "tp" only it is deletable, otherwise
5991         call set_thread_exited.
5992         (delete_thread_1): Call set_thread_exited.
5993         (current_thread_cleanup) <inferior_pid>: Remove.
5994         <thread>: New field.
5995         (restore_current_thread_ptid_changed): Removed.
5996         (do_restore_current_thread_cleanup): Adjust.
5997         (restore_current_thread_cleanup_dtor): Don't call
5998         find_thread_ptid.
5999         (set_thread_refcount): Use dec_refcount.
6000         (make_cleanup_restore_current_thread): Adjust.
6001         (thread_apply_all_command): Call inc_refcount.
6002         (_initialize_thread): Don't call
6003         observer_attach_thread_ptid_changed.
6004
6005 2017-04-10  Yao Qi  <yao.qi@linaro.org>
6006
6007         * thread.c (delete_thread_1): Hoist code on marking thread as
6008         exited.
6009
6010 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6011
6012         * windows-nat.c (windows_detach): Initialize ptid with
6013         minus_one_ptid.
6014
6015 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
6016
6017         * unittests/ptid-selftests.c: Fix erroneous assert messages.
6018
6019 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
6020
6021         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
6022         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
6023         (bfin_pseudo_register_write): Likewise
6024
6025 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
6026
6027         * common/ptid.h (struct ptid): Change to...
6028         (class ptid_t): ... this.
6029         <ptid_t>: New constructors.
6030         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
6031         matches>: New methods.
6032         <make_null, make_minus_one>: New static methods.
6033         <pid>: Rename to...
6034         <m_pid>: ...this.
6035         <lwp>: Rename to...
6036         <m_lwp>: ...this.
6037         <tid>: Rename to...
6038         <m_tid>: ...this.
6039         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
6040         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
6041         as references, move comment to class ptid_t.
6042         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
6043         ptid_t static methods.
6044         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
6045         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
6046         Take ptid arguments as references, implement using ptid_t methods.
6047         * unittests/ptid-selftests.c: New file.
6048         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6049         unittests/ptid-selftests.c.
6050         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
6051
6052 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6053
6054         * python/python.c (python_run_simple_file): Cast mode literal to
6055         non-const char pointer as expected by PyFile_FromString.
6056
6057 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
6058
6059         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
6060         minus_one_ptid and null_ptid.
6061
6062 2017-04-05  Pedro Alves  <palves@redhat.com>
6063
6064         * warning.m4 (build_warnings): Remove -Wno-write-strings.
6065         * configure: Regenerate.
6066
6067 2017-04-05  Pedro Alves  <palves@redhat.com>
6068
6069         * ada-exp.y (yyerror): Constify.
6070         * ada-lang.c (bound_name, get_selections)
6071         (ada_variant_discrim_type)
6072         (ada_variant_discrim_name, ada_value_struct_elt)
6073         (ada_lookup_struct_elt_type, is_unchecked_variant)
6074         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
6075         (catch_ada_exception_command_split)
6076         (catch_ada_assert_command_split, catch_assert_command)
6077         (ada_op_name): Constify.
6078         * ada-lang.h (ada_yyerror, get_selections)
6079         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
6080         * arc-tdep.c (arc_print_frame_cache): Constify.
6081         * arm-tdep.c (arm_skip_stub): Constify.
6082         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
6083         (gen_aggregate_elt_ref): Constify.
6084         * bcache.c (print_bcache_statistics): Constify.
6085         * bcache.h (print_bcache_statistics): Constify.
6086         * break-catch-throw.c (catch_exception_command_1):
6087         * breakpoint.c (struct ep_type_description::description):
6088         Constify.
6089         (add_solib_catchpoint): Constify.
6090         (catch_fork_command_1): Add cast.
6091         (add_catch_command): Constify.
6092         * breakpoint.h (add_catch_command, add_solib_catchpoint):
6093         Constify.
6094         * bsd-uthread.c (bsd_uthread_state): Constify.
6095         * buildsym.c (patch_subfile_names): Constify.
6096         * buildsym.h (next_symbol_text_func, patch_subfile_names):
6097         Constify.
6098         * c-exp.y (yyerror): Constify.
6099         (token::oper): Constify.
6100         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
6101         * c-varobj.c (cplus_describe_child): Constify.
6102         * charset.c (find_charset_names): Add cast.
6103         (find_charset_names): Constify array and add const_cast.
6104         * cli/cli-cmds.c (complete_command, cd_command): Constify.
6105         (edit_command): Constify.
6106         * cli/cli-decode.c (lookup_cmd): Constify.
6107         * cli/cli-dump.c (dump_memory_command, dump_value_command):
6108         Constify.
6109         (struct dump_context): Constify.
6110         (add_dump_command, restore_command): Constify.
6111         * cli/cli-script.c (get_command_line): Constify.
6112         * cli/cli-script.h (get_command_line): Constify.
6113         * cli/cli-utils.c (check_for_argument): Constify.
6114         * cli/cli-utils.h (check_for_argument): Constify.
6115         * coff-pe-read.c (struct read_pe_section_data): Constify.
6116         * command.h (lookup_cmd): Constify.
6117         * common/print-utils.c (decimal2str): Constify.
6118         * completer.c (gdb_print_filename): Constify.
6119         * corefile.c (set_gnutarget): Constify.
6120         * cp-name-parser.y (yyerror): Constify.
6121         * cp-valprint.c (cp_print_class_member): Constify.
6122         * cris-tdep.c (cris_register_name, crisv32_register_name):
6123         Constify.
6124         * d-exp.y (yyerror): Constify.
6125         (struct token::oper): Constify.
6126         * d-lang.h (d_yyerror): Constify.
6127         * dbxread.c (struct header_file_location::name): Constify.
6128         (add_old_header_file, add_new_header_file, last_function_name)
6129         (dbx_next_symbol_text, add_bincl_to_list)
6130         (find_corresponding_bincl_psymtab, set_namestring)
6131         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
6132         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
6133         * defs.h (command_line_input, print_address_symbolic)
6134         (deprecated_readline_begin_hook): Constify.
6135         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
6136         Constify.
6137         * event-top.c (handle_line_of_input): Constify and add cast.
6138         * exceptions.c (catch_errors): Constify.
6139         * exceptions.h (catch_errors): Constify.
6140         * expprint.c (print_subexp_standard, op_string, op_name)
6141         (op_name_standard, dump_raw_expression, dump_raw_expression):
6142         * expression.h (op_name, op_string, dump_raw_expression):
6143         Constify.
6144         * f-exp.y (yyerror): Constify.
6145         (struct token::oper): Constify.
6146         (struct f77_boolean_val::name): Constify.
6147         * f-lang.c (f_word_break_characters): Constify.
6148         * f-lang.h (f_yyerror): Constify.
6149         * fork-child.c (fork_inferior): Add cast.
6150         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
6151         (new_variant): Constify.
6152         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
6153         * gdbarch.c: Regenerate.
6154         * gdbcore.h (set_gnutarget): Constify.
6155         * go-exp.y (yyerror): Constify.
6156         (token::oper): Constify.
6157         * go-lang.h (go_yyerror): Constify.
6158         * go32-nat.c (go32_sysinfo): Constify.
6159         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
6160         * guile/scm-cmd.c (cmdscm_function): Constify.
6161         * guile/scm-param.c (pascm_param_value): Constify.
6162         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
6163         (h8300sx_register_name): Constify.
6164         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
6165         Constify.
6166         * ia64-tdep.c (ia64_register_names): Constify.
6167         * infcmd.c (construct_inferior_arguments): Constify.
6168         (path_command, attach_post_wait): Constify.
6169         * language.c (show_range_command, show_case_command)
6170         (unk_lang_error): Constify.
6171         * language.h (language_defn::la_error)
6172         (language_defn::la_name_of_this): Constify.
6173         * linespec.c (decode_line_2): Constify.
6174         * linux-thread-db.c (thread_db_err_str): Constify.
6175         * lm32-tdep.c (lm32_register_name): Constify.
6176         * m2-exp.y (yyerror): Constify.
6177         * m2-lang.h (m2_yyerror): Constify.
6178         * m32r-tdep.c (m32r_register_names): Constify and make static.
6179         * m68hc11-tdep.c (m68hc11_register_names): Constify.
6180         * m88k-tdep.c (m88k_register_name): Constify.
6181         * macroexp.c (appendmem): Constify.
6182         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
6183         (upgrade_type, parse_external, parse_partial_symbols)
6184         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
6185         (new_symbol): Constify.
6186         * memattr.c (mem_info_command): Constify.
6187         * mep-tdep.c (register_name_from_keyword): Constify.
6188         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
6189         Constify.
6190         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
6191         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
6192         * mi/mi-main.c (captured_mi_execute_command): Constify and add
6193         cast.
6194         (mi_execute_async_cli_command): Constify.
6195         * mips-tdep.c (mips_register_name): Constify.
6196         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
6197         (am33_register_name, am33_2_register_name)
6198         * moxie-tdep.c (moxie_register_names): Constify.
6199         * nat/linux-osdata.c (osdata_type): Constify fields.
6200         * nto-tdep.c (nto_parse_redirection): Constify.
6201         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
6202         (lookup_child_selector): Constify.
6203         (objc_methcall::name): Constify.
6204         * objc-lang.h (lookup_objc_class, lookup_child_selector)
6205         (lookup_struct_typedef): Constify.
6206         * objfiles.c (pc_in_section): Constify.
6207         * objfiles.h (pc_in_section): Constify.
6208         * p-exp.y (struct token::oper): Constify.
6209         (yyerror): Constify.
6210         * p-lang.h (pascal_yyerror): Constify.
6211         * parser-defs.h (op_name_standard): Constify.
6212         (op_print::string): Constify.
6213         (exp_descriptor::op_name): Constify.
6214         * printcmd.c (print_address_symbolic): Constify.
6215         * psymtab.c (print_partial_symbols): Constify.
6216         * python/py-breakpoint.c (stop_func): Constify.
6217         (bppy_get_expression): Constify.
6218         * python/py-cmd.c (cmdpy_completer::name): Constify.
6219         (cmdpy_function): Constify.
6220         * python/py-event.c (evpy_add_attribute)
6221         (gdbpy_initialize_event_generic): Constify.
6222         * python/py-event.h (evpy_add_attribute)
6223         (gdbpy_initialize_event_generic): Constify.
6224         * python/py-evts.c (add_new_registry): Constify.
6225         * python/py-finishbreakpoint.c (outofscope_func): Constify.
6226         * python/py-framefilter.c (get_py_iter_from_func): Constify.
6227         * python/py-inferior.c (get_buffer): Add cast.
6228         * python/py-param.c (parm_constant::name): Constify.
6229         * python/py-unwind.c (fprint_frame_id): Constify.
6230         * python/python.c (gdbpy_parameter_value): Constify.
6231         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
6232         * remote.c (memory_packet_config::name): Constify.
6233         (show_packet_config_cmd, remote_write_bytes)
6234         (remote_buffer_add_string):
6235         * reverse.c (exec_reverse_once): Constify.
6236         * rs6000-tdep.c (variant::name, variant::description): Constify.
6237         * rust-exp.y (rustyyerror): Constify.
6238         * rust-lang.c (rust_op_name): Constify.
6239         * rust-lang.h (rustyyerror): Constify.
6240         * serial.h (serial_ops::name): Constify.
6241         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
6242         (sh_sh3e_register_name, sh_sh2e_register_name)
6243         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
6244         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
6245         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
6246         (sh_sh4al_dsp_register_name): Constify.
6247         * sh64-tdep.c (sh64_register_name): Constify.
6248         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
6249         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
6250         * stabsread.c (patch_block_stabs, read_type_number)
6251         (ref_map::stabs, ref_add, process_reference)
6252         (symbol_reference_defined, define_symbol, define_symbol)
6253         (error_type, read_type, read_member_functions, read_cpp_abbrev)
6254         (read_one_struct_field, read_struct_fields, read_baseclasses)
6255         (read_tilde_fields, read_struct_type, read_array_type)
6256         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
6257         (read_huge_number, read_range_type, read_args, common_block_start)
6258         (find_name_end): Constify.
6259         * stabsread.h (common_block_start, define_symbol)
6260         (process_one_symbol, symbol_reference_defined, ref_add):
6261         * symfile.c (get_section_index, add_symbol_file_command):
6262         * symfile.h (get_section_index): Constify.
6263         * target-descriptions.c (tdesc_type::name): Constify.
6264         (tdesc_free_type): Add cast.
6265         * target.c (find_default_run_target):
6266         (add_deprecated_target_alias, find_default_run_target)
6267         (target_announce_detach): Constify.
6268         (do_option): Constify.
6269         * target.h (add_deprecated_target_alias): Constify.
6270         * thread.c (print_thread_info_1): Constify.
6271         * top.c (deprecated_readline_begin_hook, command_line_input):
6272         Constify.
6273         (init_main): Add casts.
6274         * top.h (handle_line_of_input): Constify.
6275         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
6276         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
6277         (tfind_command): Rename to ...
6278         (tfind_command_1): ... this and constify.
6279         (tfind_command): New function.
6280         (tfind_end_command, tfind_start_command): Adjust.
6281         (encode_source_string): Constify.
6282         * tracepoint.h (encode_source_string): Constify.
6283         * tui/tui-data.c (tui_partial_win_by_name): Constify.
6284         * tui/tui-data.h (tui_partial_win_by_name): Constify.
6285         * tui/tui-source.c (tui_set_source_content_nil): Constify.
6286         * tui/tui-source.h (tui_set_source_content_nil): Constify.
6287         * tui/tui-win.c (parse_scrolling_args): Constify.
6288         * tui/tui-windata.c (tui_erase_data_content): Constify.
6289         * tui/tui-windata.h (tui_erase_data_content): Constify.
6290         * tui/tui-winsource.c (tui_erase_source_content): Constify.
6291         * tui/tui.c (tui_enable): Add cast.
6292         * utils.c (defaulted_query): Constify.
6293         (init_page_info): Add cast.
6294         (puts_debug, subset_compare): Constify.
6295         * utils.h (subset_compare): Constify.
6296         * varobj.c (varobj_format_string): Constify.
6297         * varobj.h (varobj_format_string): Constify.
6298         * vax-tdep.c (vax_register_name): Constify.
6299         * windows-nat.c (windows_detach): Constify.
6300         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
6301         * xml-support.c (gdb_xml_end_element): Constify.
6302         * xml-tdesc.c (tdesc_start_reg): Constify.
6303         * xstormy16-tdep.c (xstormy16_register_name): Constify.
6304         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
6305         * xtensa-tdep.h (xtensa_register_t::name): Constify.
6306
6307 2017-04-05  Pedro Alves  <palves@redhat.com>
6308
6309         * proc-api.c (struct trans): Constify.
6310         (procfs_note): Constify.
6311         * proc-events.c (struct trans, syscall_table):
6312         * proc-flags.c (struct trans): Constify.
6313         * proc-utils.h (procfs_note): Constify.
6314         * proc-why.c (struct trans): Constify.
6315         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
6316         (procfs_detach): Constify.
6317         * sol-thread.c (struct string_map): Constify.
6318         (td_err_string, td_state_string): Constify.
6319
6320 2017-04-05  Pedro Alves  <palves@redhat.com>
6321
6322         * proc-api.c (procfs_filename): Don't initialize
6323         procfs_filename.
6324         (prepare_to_trace): Assume procfs_filename is non-NULL.
6325         (_initialize_proc_api): Give procfs_filename a default value here.
6326
6327 2017-04-05  Pedro Alves  <palves@redhat.com>
6328
6329         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
6330         'cond_string' parameter.
6331         (extract_exception_regexp): Constify 'string' parameter.
6332         (catch_exception_command_1): Constify.
6333         * breakpoint.c (init_catchpoint)
6334         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
6335         parameter.
6336         (ep_parse_optional_if_clause, catch_fork_command_1)
6337         (catch_exec_command_1): Constify.
6338         * breakpoint.h (init_catchpoint): Constify 'cond_string'
6339         parameter.
6340         (ep_parse_optional_if_clause): Constify.
6341         * cli/cli-utils.c (remove_trailing_whitespace)
6342         (check_for_argument): Constify.
6343         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
6344         non-const overload.
6345         (check_for_argument): Likewise.
6346
6347 2017-04-05  Pedro Alves  <palves@redhat.com>
6348
6349         * event-top.c (command_line_handler): Add cast to execute_command
6350         call.
6351         * record-btrace.c (cmd_record_btrace_bts_start)
6352         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
6353         (cmd_record_btrace_start): Add cast to execute_command call.
6354         * record-full.c (record_full_goto_insn):
6355         * record.c (record_start, record_stop): Add cast to
6356         execute_command_to_string calls.
6357         (cmd_record_start): Add cast to execute_command calls.
6358
6359 2017-04-05  Pedro Alves  <palves@redhat.com>
6360
6361         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
6362         static inline function.
6363         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
6364         array and use gdb_PyArg_ParseTupleAndKeywords.
6365         * python/py-cmd.c (cmdpy_init): Likewise.
6366         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
6367         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
6368         (infpy_search_memory): Likewise.
6369         * python/py-objfile.c (objfpy_add_separate_debug_file)
6370         (gdbpy_lookup_objfile): Likewise.
6371         * python/py-symbol.c (gdbpy_lookup_symbol)
6372         (gdbpy_lookup_global_symbol): Likewise.
6373         * python/py-type.c (gdbpy_lookup_type): Likewise.
6374         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
6375         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
6376         Likewise.
6377
6378 2017-04-05  Pedro Alves  <palves@redhat.com>
6379
6380         * python/python-internal.h (gdb_PyGetSetDef): New type.
6381         * python/py-block.c (block_object_getset)
6382         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
6383         * python/py-event.c (event_object_getset)
6384         (finish_breakpoint_object_getset): Likewise.
6385         * python/py-inferior.c (inferior_object_getset): Likewise.
6386         * python/py-infthread.c (thread_object_getset): Likewise.
6387         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
6388         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
6389         * python/py-objfile.c (objfile_getset): Likewise.
6390         * python/py-progspace.c (pspace_getset): Likewise.
6391         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
6392         Likewise.
6393         * python/py-record.c (recpy_record_getset): Likewise.
6394         * python/py-symbol.c (symbol_object_getset): Likewise.
6395         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
6396         Likewise.
6397         * python/py-type.c (type_object_getset, field_object_getset):
6398         Likewise.
6399         * python/py-value.c (value_object_getset): Likewise.
6400
6401 2017-04-05  Pedro Alves  <palves@redhat.com>
6402
6403         * python/python-internal.h (gdb_PyObject_CallMethod)
6404         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
6405         New functions.
6406         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
6407         (PySys_GetObject, PySys_SetPath): New macros.
6408
6409 2017-04-05  Pedro Alves  <palves@redhat.com>
6410
6411         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
6412         info_osdata_command.
6413         * osdata.c (info_osdata_command): Rename to ...
6414         (info_osdata): ... this.  Constify 'type' parameter, and remove
6415         the 'from_tty' parameter.  Accept NULL TYPE.
6416         (info_osdata_command): New function.
6417         * osdata.h (info_osdata_command): Remove declaration.
6418         (info_osdata): New declaration.
6419
6420 2017-04-05  Pedro Alves  <palves@redhat.com>
6421
6422         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
6423         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
6424         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
6425         parameter.
6426         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
6427         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
6428         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
6429         parameter.
6430         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
6431         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
6432         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
6433         (mi_cmd_file_list_exec_source_files)
6434         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
6435         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6436         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
6437         parameter.
6438         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
6439         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
6440         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
6441         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
6442         (mi_cmd_stack_info_frame): Constify 'command' parameter.
6443         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
6444         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
6445         'command' parameter.
6446         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
6447         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
6448         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
6449         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
6450         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
6451         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
6452         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
6453         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
6454         (mi_cmd_var_set_update_range): Constify 'command' parameter.
6455         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
6456         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
6457         parameter.
6458         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
6459         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
6460         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
6461         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
6462         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
6463         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
6464         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
6465         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
6466         (mi_cmd_data_list_changed_registers)
6467         (mi_cmd_data_write_register_values)
6468         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
6469         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
6470         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
6471         (mi_cmd_list_features, mi_cmd_list_target_features)
6472         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
6473         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
6474         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
6475         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
6476         (mi_cmd_trace_frame_collected): Constify 'command'
6477         parameter.
6478         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
6479         'command' parameter.
6480
6481 2017-04-05  Pedro Alves  <palves@redhat.com>
6482
6483         * ada-lang.c (ada_completer_word_break_characters): Now a const
6484         array.
6485         (ada_get_gdb_completer_word_break_characters): Constify.
6486         * completer.c (gdb_completer_command_word_break_characters)
6487         (gdb_completer_file_name_break_characters)
6488         (gdb_completer_quote_characters): Now const arrays.
6489         (get_gdb_completer_quote_characters): Constify.
6490         (set_rl_completer_word_break_characters): New function.
6491         (set_gdb_completion_word_break_characters)
6492         (complete_line_internal): Use it.
6493         * completer.h (get_gdb_completer_quote_characters): Constify.
6494         (set_rl_completer_word_break_characters): Declare.
6495         * f-lang.c (f_word_break_characters): Constify.
6496         * language.c (default_word_break_characters): Constify.
6497         * language.h (language_defn::la_word_break_characters): Constify.
6498         (default_word_break_characters): Constify.
6499         * top.c (init_main): Use set_rl_completer_word_break_characters.
6500
6501 2017-04-05  Pedro Alves  <palves@redhat.com>
6502
6503         * aix-thread.c (aix_thread_pid_to_str)
6504         (aix_thread_extra_thread_info): Constify.
6505         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
6506         * bsd-uthread.c (bsd_uthread_extra_thread_info)
6507         (bsd_uthread_pid_to_str): Constify.
6508         * corelow.c (core_pid_to_str): Constify.
6509         * darwin-nat.c (darwin_pid_to_str): Constify.
6510         * fbsd-nat.c (fbsd_pid_to_str): Constify.
6511         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
6512         Constify.
6513         * gnu-nat.c (gnu_pid_to_str): Constify.
6514         * go32-nat.c (go32_pid_to_str): Constify.
6515         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
6516         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
6517         * inferior.c (inferior_pid_to_str): Constify.
6518         * linux-nat.c (linux_nat_pid_to_str): Constify.
6519         * linux-tdep.c (linux_core_pid_to_str): Constify.
6520         * linux-thread-db.c (thread_db_pid_to_str)
6521         (thread_db_extra_thread_info): Constify.
6522         * nto-tdep.c (nto_extra_thread_info): Constify.
6523         * nto-tdep.h (nto_extra_thread_info): Constify.
6524         * obsd-nat.c (obsd_pid_to_str): Constify.
6525         * procfs.c (procfs_pid_to_str): Constify.
6526         * ravenscar-thread.c (ravenscar_extra_thread_info)
6527         (ravenscar_pid_to_str): Constify.
6528         * remote-sim.c (gdbsim_pid_to_str): Constify.
6529         * remote.c (remote_threads_extra_info, remote_pid_to_str):
6530         Constify.
6531         * sol-thread.c (solaris_pid_to_str): Constify.
6532         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
6533         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
6534         * target.c (default_pid_to_str, target_pid_to_str)
6535         (normal_pid_to_str, default_pid_to_str): Constify.
6536         * target.h (target_ops::to_pid_to_str)
6537         (target_ops::to_extra_thread_info): Constify.
6538         (target_pid_to_str, normal_pid_to_str): Constify.
6539         * windows-nat.c (windows_pid_to_str): Constify.
6540         * gdbarch.sh (core_pid_to_str): Constify.
6541         * target-delegates.c: Regenerate.
6542         * gdbarch.h, gdbarch.c: Regenerate.
6543
6544 2017-04-05  Pedro Alves  <palves@redhat.com>
6545
6546         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
6547         the memory of the temporary warning_pre_print override.
6548         * utils.c (warning_pre_print): Constify.
6549         * utils.h (warning_pre_print): Constify.
6550
6551 2017-04-05  Pedro Alves  <palves@redhat.com>
6552
6553         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
6554         (shell_command): New function.
6555         (make_command): Use std::string.
6556         (init_cli_cmds): Register shell_command instead of shell_escape.
6557
6558 2017-04-05  Pedro Alves  <palves@redhat.com>
6559
6560         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
6561         * tracepoint.c (default_collect): Don't initialize.
6562
6563 2017-04-05  Pedro Alves  <palves@redhat.com>
6564
6565         * macroexp.c (macro_buffer::shared): Now a bool.
6566         (init_buffer): Update.
6567         (init_shared_buffer): Constify 'addr' parameter.
6568         (substitute_args, expand, macro_expand, macro_expand_next): Remove
6569         casts.
6570
6571 2017-04-05  Pedro Alves  <palves@redhat.com>
6572
6573         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
6574         * disasm.c (set_disassembler_options): Constify local.
6575         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
6576
6577 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
6578
6579         PR gdb/21352
6580         * tracefile.c (tsave_command): Fix argument parsing for '-r'
6581         option.
6582
6583 2017-04-05  Yao Qi  <yao.qi@linaro.org>
6584
6585         * frame.c (frame_unwind_register_unsigned): Call
6586         frame_unwind_register_value.
6587
6588 2017-04-05  Yao Qi  <yao.qi@linaro.org>
6589
6590         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6591         Use gdb_test_multiple, and don't match anchor.
6592
6593 2017-04-05  Pedro Alves  <palves@redhat.com>
6594
6595         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6596         (Write After Approval): Remove Simon Marchi.
6597
6598 2017-04-05  Pedro Alves  <palves@redhat.com>
6599
6600         * common/gdb_optional.h (optional::optional): Make constexpr and
6601         initialize m_dummy.
6602
6603 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6604
6605         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6606         (amd64fbsd_jmp_buf_reg_offset): Remove.
6607         (amd64fbsd_supply_uthread): Remove function.
6608         (amd64fbsd_collect_uthread): Remove function.
6609         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6610         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6611         (x86_64-*-freebsd*): Remove bsd-uthread.o.
6612         (fbsd-nat.c): Update comment.
6613         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6614         (i386fbsd_jmp_buf_reg_offset): Remove.
6615         (i386fbsd_supply_uthread): Remove function.
6616         (i386fbsd_collect_uthread): Remove function.
6617         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6618
6619 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6620
6621         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6622         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6623         * NEWS: Mention that support for FreeBSD/alpha was removed.
6624         * alpha-fbsd-tdep.c: Delete file.
6625         * config/alpha/fbsd.mh: Delete file.
6626         * configure.host: Delete alpha*-*-freebsd* and
6627         alpha*-*-kfreebsd*-gnu.
6628         * configure.tgt: Delete alpha*-*-freebsd* and
6629         alpha*-*-kfreebsd*-gnu.
6630
6631 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6632
6633         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6634         amd64bsd_store_inferior_registers): Use ptid from regcache.
6635
6636 2017-04-04  Pedro Alves  <palves@redhat.com>
6637
6638         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
6639         data fields, make them private and add "m_" prefixes.
6640         (lnp_state_machine::lnp_state_machine): New ctor.
6641         (record_line, check_line_address, handle_set_discriminator)
6642         (handle_set_address, handle_advance_pc, handle_special_opcode)
6643         (handle_advance_line, handle_set_file, handle_negate_stmt)
6644         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6645         (end_sequence, advance_line): New methods.
6646         (m_gdbarch, m_record_lines_p): New fields.
6647         (lnp_reader_state): Delete.
6648         (dwarf_record_line): Rename to ...
6649         (lnp_state_machine::record_line): ... adjust.
6650         (init_lnp_state_machine): Delete.
6651         (lnp_state_machine::lnp_state_machine): New.
6652         (check_line_address): Rename to ...
6653         (lnp_state_machine::check_line_address): This.
6654         (dwarf_decode_lines_1): Remove reference to "reader_state".
6655         Adjust lnp_state_machine having a non-default ctor.  Use bool.
6656         State machine internal state manipulation moved to
6657         lnp_state_machine methods.
6658
6659 2017-04-04  Pedro Alves  <palves@redhat.com>
6660
6661         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6662         unittests/offset-type-selftests.c.
6663         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6664         * common/offset-type.h: New file.
6665         * common/preprocessor.h: New file.
6666         * common/traits.h: New file.
6667         * common/valid-expr.h: New file.
6668         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
6669         sect_offset and cu_offset strong typedefs throughout.
6670         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6671         typedefs throughout.
6672         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
6673         sect_offset and cu_offset strong typedefs throughout.
6674         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6675         typedefs throughout.
6676         * gdbtypes.h: Include "common/offset-type.h".
6677         (cu_offset): Now an offset type (strong typedef) instead of a
6678         struct.
6679         (sect_offset): Likewise.
6680         (union call_site_parameter_u): Rename "param_offset" field to
6681         "param_cu_off".
6682         * unittests/offset-type-selftests.c: New file.
6683
6684 2017-04-04  Pedro Alves  <palves@redhat.com>
6685
6686         * common/underlying.h: New file.
6687         * dwarf2read.c: Include "common/gdb_optional.h" and
6688         "common/underlying.h".
6689         (dir_index, file_name_index): New types.
6690         (file_entry): Use them.
6691         (file_entry::include): Use to_underlying.
6692         (line_header::add_file_name): Use dir_index.
6693         (read_formatted_entries): Use gdb::optional.  Read form before
6694         writting to file_entry.
6695         (dwarf_decode_line_header): Use dir_index.
6696         (lnp_state_machine::current_file): Use to_underlying.
6697         (lnp_state_machine::file): Change type to file_name_index.
6698         (dwarf_record_line): Use to_underlying.
6699         (init_lnp_state_machine): Use file_name_index.
6700         (dwarf_decode_lines_1): Use dir_index and file_name_index.
6701
6702 2017-04-04  Pedro Alves  <palves@redhat.com>
6703
6704         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6705         operator bool, has_value and get methods.
6706
6707 2017-04-04  Pedro Alves  <palves@redhat.com>
6708
6709         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6710         fields.
6711         (line_header): Initialize all data fields.  Change type of
6712         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6713         Change type of include_dirs to std::vector<const char *>.  Remove
6714         num_include_dirs, include_dirs_size.  Change type of file_names to
6715         std::vector<file_entry>.  Remove num_file_names, file_names_size.
6716         (line_header::line_header): New.
6717         (line_header::add_include_dir, line_header::add_file_name): New
6718         methods.
6719         (line_header::include_dir_at): Remove NULL check.
6720         (line_header::file_name_at): Add const overload.
6721         (line_header_up): New unique_ptr typedef.
6722         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
6723         std::vector.  Remove free_line_header call.
6724         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
6725         free_line_header call.
6726         (free_cu_line_header): Delete.
6727         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6728         (setup_type_unit_groups): Use line_header_up instead of cleanups.
6729         Adjust to use std::vector.
6730         (free_line_header): Delete.
6731         (free_line_header_voidp): Use delete.
6732         (add_include_dir): Replace with ...
6733         (line_header::add_include_dir): ... this method.  Use std::vector.
6734         (add_file_name): Replace with ...
6735         (line_header::add_file_name): ... this method.  Use std::vector.
6736         (add_include_dir_stub): Delete.
6737         (read_formatted_entries): Remove memset.
6738         (dwarf_decode_line_header): Return a line_header_up instead of a
6739         raw pointer.  Remove cleanup handling.  Pass lambdas to
6740         read_formatted_entries.  Adjust to use line_header methods.
6741         (dwarf_decode_lines_1): Adjust to use line_header methods.
6742         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6743         use std::vector.
6744
6745 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
6746
6747         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6748         instead of struct ptid.
6749
6750 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
6751
6752         * frame.c (get_frame_register_bytes): Unwind using value.
6753         (put_frame_register_bytes): Likewise.
6754
6755 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
6756
6757         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6758         aggregate-like.
6759
6760 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
6761
6762         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6763
6764 2017-03-29  Yao Qi  <yao.qi@linaro.org>
6765
6766         * gdbthread.h (struct thread_info): Declare constructor and
6767         destructor.  Add some in-class member initializers.
6768         * thread.c (free_thread): Remove.
6769         (init_thread_list): Call delete instead of free_thread.
6770         (new_thread): Call thread_info constructor.
6771         (thread_info::thread_info): New function.
6772         (thread_info::~thread_info): New function.
6773         (delete_thread_1): Call delete instead of free_thread.
6774         (make_cleanup_restore_current_thread): Move tp and frame to
6775         inner block.
6776
6777 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6778
6779         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6780         (arc_skip_prologue): Likewise.
6781         (arc_make_frame_cache): Likewise.
6782         (arc_pv_get_operand): New function.
6783         (arc_is_in_prologue): Likewise.
6784         (arc_analyze_prologue): Likewise.
6785         (arc_print_frame_cache): Likewise.
6786         (MAX_PROLOGUE_LENGTH): New constant.
6787
6788 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6789
6790         * configure.tgt: Add arc-insn.o.
6791         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6792         (dump_arc_instruction_command): New function.
6793         (arc_fprintf_disasm): Likewise.
6794         (arc_disassemble_info): Likewise.
6795         (arc_insn_get_operand_value): Likewise.
6796         (arc_insn_get_operand_value_signed): Likewise.
6797         (arc_insn_get_memory_base_reg): Likewise.
6798         (arc_insn_get_memory_offset): Likewise.
6799         (arc_insn_get_branch_target): Likewise.
6800         (arc_insn_dump): Likewise.
6801         (arc_insn_get_linear_next_pc): Likewise.
6802         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6803         (arc_disassemble_info): Likewise.
6804         (arc_insn_get_branch_target): Likewise.
6805         (arc_insn_get_linear_next_pc): Likewise.
6806         * NEWS: Mention new "maint print arc arc-instruction".
6807
6808 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6809
6810         * arc-tdep (maintenance_print_arc_list): New variable.
6811         (maintenance_print_arc_command): New function.
6812
6813 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6814
6815         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6816         Add "limm" and "reserved".
6817         (arc_cannot_fetch_register, arc_cannot_store_register): Add
6818         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6819         * arc-tdep.h (arc_regnum): Likewise.
6820
6821 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6822
6823         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6824         for THREADPTR register.
6825         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6826         register.
6827         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6828         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6829         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6830
6831 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6832
6833         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6834         registers above gdbarch_num_regs (gdbarch) as privileged in
6835         call0 ABI.
6836
6837 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6838
6839         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6840         for a single specified register or for all registers in
6841         a0_base..a0_base + C0_NREGS range.
6842         (supply_gregset_reg): Call regcache_raw_supply for a single
6843         specified register or for all registers in a0_base..a0_base +
6844         C0_NREGS range.
6845
6846 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6847
6848         * arch/xtensa.h (C0_NREGS): Add definition.
6849         * xtensa-tdep.c (C0_NREGS): Remove definition.
6850
6851 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6852
6853         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6854         Drop xtensa_default_isa initialization.
6855         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6856
6857 2017-03-27  Pedro Alves  <palves@redhat.com>
6858
6859         * dwarf2read.c (file_entry) <dir_index>: Add comment.
6860         (file_entry::include_dir): New method.
6861         (line_header::include_dir_at, line_header::file_name_at): New
6862         methods.
6863         (setup_type_unit_groups, setup_type_unit_groups)
6864         (psymtab_include_file_name): Simplify using the new methods.
6865         (lnp_state_machine) <the_line_header>: New field.
6866         <file>: Add comment.
6867         (lnp_state_machine::current_file): New method.
6868         (dwarf_record_line): Simplify using the new methods.
6869         (init_lnp_state_machine): Initialize the "the_line_header" field.
6870         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6871         Simplify using the new methods.
6872
6873 2017-03-27  Pedro Alves  <palves@redhat.com>
6874
6875         * cp-name-parser.y (make_empty): Delete.
6876         (demangler_special, nested_name, ptr_operator, array_indicator)
6877         (direct_declarator, declarator_1): Use fill_comp instead of
6878         make_empty.
6879
6880 2017-03-27  Pedro Alves  <palves@redhat.com>
6881
6882         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6883         to ATTRIBUTE_PRINTF.
6884         * solib-target.c (library_list_start_list): Print "string" not
6885         "version".
6886         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6887         gdb_xml_error call.
6888
6889 2017-03-27  Pedro Alves  <palves@redhat.com>
6890
6891         * dwarf2read.c (struct file_and_directory): New.
6892         (dwarf2_get_dwz_file): Adjust to use std::string.
6893         (dw2_get_file_names_reader): Adjust to use file_and_directory.
6894         (find_file_and_directory): Adjust to return a file_and_directory
6895         object.
6896         (read_file_scope): Adjust to use file_and_directory.  Remove
6897         make_cleanup/do_cleanups calls.
6898         (open_and_init_dwp_file): Adjust to use std::string.  Remove
6899         make_cleanup/do_cleanups calls.
6900         * python/python.c (do_start_initialization): Adjust to ldirname
6901         returning a std::string.
6902         * utils.c (ldirname): Now returns a std::string.
6903         * utils.h (ldirname): Change return type to std::string.
6904         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6905         returning a std::string.
6906         * xml-tdesc.c (file_read_description_xml): Likewise.
6907
6908 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
6909
6910         * regcache.c (regcache_debug_print_register): New function.
6911         * regcache.h (regcache_debug_print_register): New declaration.
6912         * target.c (debug_print_register): Remove.
6913         (target_fetch_registers): Call regcache_debug_print_register.
6914         (target_store_registers): Likewise.
6915
6916 2017-03-24  Pádraig Brady  <pbrady@fb.com>
6917
6918         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
6919         reference beyond the 'lh->include_dirs' array before accessing to
6920         it.
6921         (psymtab_include_file_name): Likewise.
6922         (dwarf_decode_lines_1): Likewise.
6923         (dwarf_decode_lines): Likewise.
6924         (file_file_name): Likewise.
6925
6926 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
6927
6928         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
6929         inferior_ptid.
6930         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6931         ps_lsetfpregs): Likewise.
6932         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
6933         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6934         ps_lsetfpregs): Likewise.
6935         * target.c (target_fetch_registers, target_store_registers):
6936         Remove asserts.
6937
6938 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
6939
6940         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
6941
6942 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6943
6944         * aarch64-tdep.c (aarch64_process_record_test): Declare.
6945         (_initialize_aarch64_tdep): Register it.
6946         (aarch64_record_load_store): Handle PRFM instruction.
6947         (aarch64_process_record_test): New function.
6948
6949 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6950
6951         * aarch64-tdep.c (aarch64_record_load_store): Fix code
6952         indentation.
6953
6954 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6955
6956         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
6957
6958 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6959
6960         python/python.c (do_start_initialization): Fix memory leak.
6961
6962 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
6963
6964         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
6965         using get_ptrace_pid.
6966         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
6967         inferior_ptid.
6968         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
6969         inferior_ptid instead of pid.
6970
6971 2017-03-22  Yao Qi  <yao.qi@linaro.org>
6972
6973         * aarch64-tdep.c: Wrap locally used classes in anonymous
6974         namespace.
6975         * arm-tdep.c: Likewise.
6976         * linespec.c: Likewise.
6977         * ui-out.c: Likewise.
6978
6979 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
6980
6981         PR gdb/19637
6982         * python/lib/gdb/printer/bound_registers.py: Import sys.
6983
6984 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
6985
6986         * windows-nat.c (do_windows_fetch_inferior_registers): Add
6987         windows_thread_info parameter and use it instead of
6988         current_thread.
6989         (windows_fetch_inferior_registers): Don't set current_thread,
6990         pass the thread to do_windows_fetch_inferior_registers.  Use
6991         ptid from regcache instead of inferior_ptid.
6992         (do_windows_store_inferior_registers): Add windows_thread_info
6993         parameter and use it instead of current_thread.
6994         (windows_store_inferior_registers): Don't set current_thread,
6995         pass the thread to do_windows_store_inferior_registers.  Use
6996         ptid from regcache instead of inferior_ptid.
6997
6998 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
6999
7000         * ser-mingw.c (ser_windows_raw): Remove reference to
7001         struct serial::current_timeout.
7002
7003 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
7004
7005         PR tdep/20928
7006         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
7007         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
7008         (sparc64_fsr_type): Fix %fsr decoding.
7009
7010 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
7011
7012         * python/py-record-btrace.c (btpy_insn_data): Change return type
7013         for Python 2.
7014
7015 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
7016
7017         * spu-linux-nat.c (spu_fetch_inferior_registers,
7018         spu_store_inferior_registers): Use ptid from regcache, set and
7019         restore inferior_ptid.
7020         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
7021         Likewise.
7022
7023 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
7024
7025         * i386-linux-nat.c (fetch_register, store_register,
7026         i386_linux_fetch_inferior_registers,
7027         i386_linux_store_inferior_registers): Use ptid from regcache.
7028         * ia64-linux-nat.c (ia64_linux_fetch_register,
7029         ia64_linux_store_register): Likewise.
7030         * inf-ptrace.c (inf_ptrace_fetch_register,
7031         inf_ptrace_store_register): Likewise.
7032         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
7033         m32r_linux_store_inferior_registers): Likewise.
7034         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
7035         m68kbsd_store_inferior_registers): Likewise.
7036         * m68k-linux-nat.c (fetch_register, store_register,
7037         m68k_linux_fetch_inferior_registers,
7038         m68k_linux_store_inferior_registers): Likewise.
7039         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
7040         m88kbsd_store_inferior_registers): Likewise.
7041         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
7042         mips_fbsd_store_inferior_registers): Likewise.
7043         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
7044         mips64_linux_regsets_store_registers): Likewise.
7045         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
7046         mipsnbsd_store_inferior_registers): Likewise.
7047         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
7048         mips64obsd_store_inferior_registers): Likewise.
7049         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
7050         Likewise.
7051         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
7052         ppcfbsd_store_inferior_registers): Likewise.
7053         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
7054         ppc_linux_store_inferior_registers): Likewise.
7055         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
7056         ppcnbsd_store_inferior_registers): Likewise.
7057         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
7058         ppcobsd_store_registers): Likewise.
7059         * procfs.c (procfs_fetch_registers, procfs_store_registers):
7060         Likewise.
7061         * ravenscar-thread.c (ravenscar_fetch_registers,
7062         ravenscar_store_registers, ravenscar_prepare_to_store):
7063         Likewise.
7064         * record-btrace.c (record_btrace_fetch_registers,
7065         record_btrace_store_registers, record_btrace_prepare_to_store):
7066         Likewise.
7067         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
7068         Lookup inferior using ptid from regcache, instead of
7069         current_inferior.
7070         * remote.c (remote_fetch_registers, remote_store_registers): Use
7071         ptid from regcache.
7072         * rs6000-nat.c (fetch_register, store_register): Likewise.
7073         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
7074         s390_linux_store_inferior_registers): Likewise.
7075         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
7076         shnbsd_store_inferior_registers): Likewise.
7077         * sol-thread.c (sol_thread_fetch_registers,
7078         sol_thread_store_registers): Likewise.
7079         * sparc-nat.c (sparc_fetch_inferior_registers,
7080         sparc_store_inferior_registers): Likewise.
7081         * tilegx-linux-nat.c (fetch_inferior_registers,
7082         store_inferior_registers): Likewise.
7083         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
7084         vaxbsd_store_inferior_registers): Likewise.
7085         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
7086         store_xtregs): Likewise.
7087
7088 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7089
7090         PR gdb/14441
7091         * NEWS: Mention support for rvalue references in GDB and python.
7092         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
7093         supports both lvalue and rvalue references.
7094
7095 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7096
7097         PR gdb/14441
7098         * gdbtypes.c (rank_one_type): Implement overloading
7099         resolution rules regarding rvalue references.
7100
7101 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7102
7103         PR gdb/14441
7104         * aarch64-tdep.c (aarch64_type_align)
7105         (aarch64_extract_return_value, aarch64_store_return_value): Change
7106         lvalue reference type checks to general reference type checks.
7107         * amd64-tdep.c (amd64_classify): Likewise.
7108         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
7109         Likewise.
7110         * arm-tdep.c (arm_type_align, arm_extract_return_value)
7111         (arm_store_return_value): Likewise.
7112         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
7113         * c-typeprint.c (c_print_type): Likewise.
7114         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
7115         (cplus_number_of_children, cplus_describe_child): Likewise.
7116         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
7117         * completer.c (expression_completer): Likewise.
7118         * cp-support.c (make_symbol_overload_list_adl_namespace):
7119         Likewise.
7120         * darwin-nat-info.c (info_mach_region_command): Likewise.
7121         * dwarf2loc.c (entry_data_value_coerce_ref)
7122         (value_of_dwarf_reg_entry): Likewise.
7123         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
7124         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
7125         Likewise.
7126         * findvar.c (extract_typed_address, store_typed_address):
7127         Likewise.
7128         * gdbtypes.c (rank_one_type): Likewise.
7129         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
7130         * infcall.c (value_arg_coerce): Likewise.
7131         * language.c (pointer_type): Likewise.
7132         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
7133         Likewise.
7134         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
7135         * mn10300-tdep.c (mn10300_type_align): Likewise.
7136         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
7137         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
7138         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
7139         Likewise.
7140         * printcmd.c (print_formatted, x_command): Likewise.
7141         * python/py-type.c (typy_get_composite, typy_template_argument):
7142         Likewise.
7143         * python/py-value.c (valpy_referenced_value)
7144         (valpy_get_dynamic_type, value_has_field): Likewise.
7145         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
7146         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
7147         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
7148         * spu-tdep.c (spu_scalar_value_p): Likewise.
7149         * symtab.c (lookup_symbol_aux): Likewise.
7150         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
7151         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
7152         Likewise.
7153         * valops.c (value_cast_pointers, value_cast)
7154         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
7155         (value_struct_elt, value_struct_elt_bitpos)
7156         (value_find_oload_method_list, find_overload_match)
7157         (value_rtti_indirect_type): Likewise.
7158         * valprint.c (val_print_scalar_type_p, generic_val_print):
7159         Likewise.
7160         * value.c (value_actual_type, value_as_address, unpack_long)
7161         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
7162         (coerce_ref): Likewise.
7163         * varobj.c (varobj_get_value_type): Likewise.
7164
7165 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7166
7167         PR gdb/14441
7168         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
7169         table of constants.
7170         * python/lib/gdb/command/explore.py: Support exploring values
7171         of rvalue reference types.
7172         * python/lib/gdb/types.py: Implement get_basic_type() for
7173         rvalue reference types.
7174         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
7175         constant.
7176         * python/py-value.c (valpy_getitem): Add an rvalue reference
7177         check.
7178         (valpy_reference_value): Add new parameter "refcode".
7179         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
7180         New wrappers for valpy_reference_value().
7181         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7182         (gdbpy_invoke_xmethod): Likewise.
7183
7184 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7185
7186         PR gdb/14441
7187         * dwarf2read.c (process_die, read_type_die_1): Handle the
7188         DW_TAG_rvalue_reference_type DIE.
7189         (read_tag_reference_type): Add new parameter "refcode".
7190
7191 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7192
7193         PR gdb/14441
7194         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
7195         (c_type_print_modifier, c_type_print_varspec_suffix)
7196         (c_type_print_base): Support printing rvalue reference types.
7197         * c-valprint.c (c_val_print, c_value_print): Support printing
7198         rvalue reference values.
7199
7200 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7201
7202         PR gdb/14441
7203         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
7204         typename.
7205         * cp-support.c (replace_typedefs): Handle
7206         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
7207         * python/py-type.c (typy_lookup_type): Likewise.
7208
7209 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7210
7211         PR gdb/14441
7212         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
7213         * parse.c (insert_type): Change assert statement.
7214         (follow_types): Handle rvalue reference types.
7215         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
7216         constant.
7217
7218 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7219
7220         PR gdb/14441
7221         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
7222         value_ref() interface.
7223         * c-valprint.c (c_value_print): Likewise.
7224         * infcall.c (value_arg_coerce): Likewise.
7225         * python/py-value.c (valpy_reference_value): Likewise.
7226         * valops.c (value_cast, value_reinterpret_cast)
7227         (value_dynamic_cast, typecmp): Likewise.
7228         (value_ref): Parameterize by kind of return value reference type.
7229         * value.h (value_ref): Add new parameter "refcode".
7230
7231 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7232
7233         PR gdb/14441
7234         * dwarf2read.c (read_tag_reference_type): Use
7235         lookup_lvalue_reference_type() instead of lookup_reference_type().
7236         * eval.c (evaluate_subexp_standard): Likewise.
7237         * f-exp.y: Likewise.
7238         * gdbtypes.c (make_reference_type, lookup_reference_type):
7239         Generalize with rvalue reference types.
7240         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
7241         convenience wrappers for lookup_reference_type().
7242         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
7243         reference kind parameter.
7244         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
7245         wrappers for lookup_reference_type().
7246         * guile/scm-type.c (gdbscm_type_reference): Use
7247         lookup_lvalue_reference_type() instead of lookup_reference_type().
7248         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
7249         * parse.c (follow_types): Likewise.
7250         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
7251         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
7252         Likewise.
7253         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7254         (gdbpy_invoke_xmethod): Likewise.
7255         * stabsread.c: Provide extra argument to make_reference_type()
7256         call.
7257         * valops.c (value_ref, value_rtti_indirect_type): Use
7258         lookup_lvalue_reference_type() instead of lookup_reference_type().
7259
7260 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7261
7262         PR gdb/14441
7263         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
7264         (TYPE_IS_REFERENCE): New macro.
7265         (struct type): Add rvalue_reference_type field.
7266         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
7267
7268 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
7269
7270         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
7271         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
7272         New function definition.
7273         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
7274         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
7275         New function declaration.
7276         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
7277         * mi/mi-interp.h: New file.
7278         * solib.c (info_sharedlibrary_command): Replace for loop with
7279         ALL_SO_LIBS macro
7280         * solib.h (update_solib_list): New function declaration.
7281         (so_list_head): Move macro.
7282         * solist.h (ALL_SO_LIBS): New macro.
7283
7284 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
7285
7286         * infcmd.c (post_create_inferior): Remove unused argument in
7287         call to solib_add.
7288         * remote.c (remote_start_remote): Likewise.
7289         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
7290         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
7291         (enable_break): Likewise.
7292         * solib.c (update_solib_list): Remove unused target argument
7293         and its documentation.
7294         (solib_add): Remove unused target argument.  Remove unused
7295         argument in call to update_solib_list.
7296         (info_sharedlibrary_command): Remove unused argument in call
7297         to update_solib_list.
7298         (sharedlibrary_command): Remove unused argument in call to
7299         solib_add.
7300         (handle_solib_event): Likewise.
7301         (reload_shared_libraries): Likewise.
7302         * solib.h (solib_add): Remove unused target argument.
7303
7304 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7305
7306         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
7307         (s390_displaced_step_fixup): Cover relative branches with the
7308         default fixup handling.  This fixes lack of support for some
7309         relative branch instructions.
7310
7311 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7312
7313         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
7314         ptid from regcache.
7315
7316 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7317
7318         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
7319         i386_darwin_store_inferior_registers): Use ptid from regcache.
7320
7321 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7322
7323         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
7324         i386bsd_store_inferior_registers): Use ptid from regcache.
7325
7326 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7327
7328         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
7329         hppaobsd_store_registers): Use ptid from regcache.
7330
7331 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7332
7333         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
7334         hppanbsd_store_registers): Use ptid from regcache.
7335
7336 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7337
7338         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
7339         from regcache.  Use get_ptrace_pid.
7340
7341 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7342
7343         * corelow.c (get_core_register_section): Use ptid from regcache,
7344         update doc.
7345
7346 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7347
7348         * bsd-uthread.c (bsd_uthread_fetch_registers,
7349         bsd_uthread_store_registers): Use ptid from regcache, set and
7350         restore inferior_ptid.
7351
7352 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7353
7354         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
7355         fetch_fp_regs, store_register, store_regs, store_fp_register,
7356         store_fp_regs): Use ptid from regcache.
7357
7358 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7359
7360         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
7361         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
7362         store_vfp_regs): Use ptid from regcache.
7363
7364 2017-03-17  Pedro Alves  <palves@redhat.com>
7365
7366         PR remote/21188
7367         * ser-base.c (ser_base_wait_for): Add comment.
7368         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
7369         version.
7370         * ser-unix.c (hardwire_raw): Remove reference to
7371         scb->current_timeout.
7372         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
7373         (hardwire_ops): Install ser_base_readchar instead of
7374         hardwire_readchar.
7375         * serial.h (struct serial) <current_timeout, timeout_remaining>:
7376         Remove fields.
7377
7378 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
7379
7380         PR gdb/19637
7381         * python/lib/gdb/printer/bound_registers.py: Add support for
7382         Python 3.
7383
7384 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7385
7386         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
7387         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
7388         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
7389         byte_offset to subobj_byte_offset.  Fix the handling of
7390         DWARF_VALUE_STACK on big-endian targets when coming via an
7391         implicit pointer.
7392         (dwarf2_evaluate_loc_desc): Adjust call to
7393         dwarf2_evaluate_loc_desc_full.
7394         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
7395         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
7396
7397 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7398
7399         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
7400         and REVSH instructions.
7401
7402 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7403
7404         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
7405         (arm_record_test): Declare.
7406         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
7407         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
7408         align with the manual.
7409         (thumb_record_misc): Adjust the code order to align with the
7410         manual.
7411         (thumb2_record_decode_insn_handler): Fix instruction matching.
7412         (instruction_reader_thumb): New class.
7413         (arm_record_test): New function.
7414
7415 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7416
7417         * arm-tdep.c (abstract_memory_reader): New class.
7418         (instruction_reader): New class.
7419         (extract_arm_insn): Add argument 'reader'.  Callers updated.
7420         (decode_insn): Likewise.
7421
7422 2017-03-16  Doug Evans  <dje@google.com>
7423
7424         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
7425         member.  Change type of TYPE member to SCM.  All uses updated.
7426         (lsscm_make_lazy_string_smob): Add assert.
7427         (lsscm_make_lazy_string): Flag bad length values.
7428         (lsscm_elt_type): New function.
7429         (gdbscm_lazy_string_to_value): Rewrite to use
7430         lsscm_safe_lazy_string_to_value.
7431         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
7432         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
7433         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
7434         in incoming type.
7435         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7436         * guile/scm-type.c (tyscm_scm_to_type): New function.
7437
7438 2017-03-15  Doug Evans  <dje@google.com>
7439
7440         PR python/17728, python/18439, python/18779
7441         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
7442         member.  Change type of TYPE member to PyObject *.  All uses updated.
7443         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
7444         (gdbpy_create_lazy_string_object): Flag bad length values.
7445         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
7446         Handle typedefs in incoming type.
7447         (stpy_lazy_string_elt_type): New function.
7448         (gdbpy_extract_lazy_string): Call it.
7449         * python/py-value.c (valpy_lazy_string): Flag bad length values.
7450         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
7451         typedefs in incoming type.
7452
7453 2017-03-16  Doug Evans  <dje@google.com>
7454
7455         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7456         * guile/scm-type.c (tyscm_scm_to_type): New function.
7457
7458 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
7459
7460         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
7461         "ULONGEST" for "skip".
7462
7463 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7464
7465         PR gdb/21220
7466         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
7467         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
7468         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
7469         over ptrace peek/poke until end of buffer or error.
7470
7471 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
7472
7473         * parse.c (length_of_subexp): Make static.
7474         * parser-defs.h (length_of_subexp): Remove.
7475
7476 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7477
7478         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
7479         as well.
7480
7481 2017-03-14  Pedro Alves  <palves@redhat.com>
7482
7483         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
7484         (main): Use std::unique_ptr.  Remove calls to
7485         cp_demangled_name_parse_free.
7486
7487 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7488
7489         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
7490         alphabsd_store_inferior_registers): Use regcache->ptid instead
7491         of inferior_ptid.
7492
7493 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7494
7495         * aix-thread.c (aix_thread_fetch_registers,
7496         aix_thread_store_registers): Use regcache->ptid instead of
7497         inferior_ptid.
7498
7499 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7500
7501         * aarch64-linux-nat.c (fetch_gregs_from_thread,
7502         store_gregs_to_thread, fetch_fpregs_from_thread,
7503         store_fpregs_to_thread): Use regcache->ptid instead of
7504         inferior_ptid.
7505
7506 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7507
7508         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
7509         amd64_linux_fetch_inferior_registers): Use regcache->ptid
7510         instead of inferior_ptid.
7511
7512 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7513
7514         * target.c (target_fetch_registers, target_store_registers): Add
7515         assert.
7516
7517 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7518
7519         * regcache.h (regcache_get_ptid): New function.
7520         * regcache.c (regcache_get_ptid): New function.
7521
7522 2017-03-13  Mark Wielaard  <mark@klomp.org>
7523
7524         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
7525
7526 2017-03-10  Keith Seitz  <keiths@redhat.com>
7527
7528         PR c++/8218
7529         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
7530
7531 2017-03-08  Pedro Alves  <palves@redhat.com>
7532
7533         PR gdb/18360
7534         * infrun.c (start_step_over, do_target_resume, resume)
7535         (restart_threads): Assert we're not resuming a thread that is
7536         meant to be stopped.
7537         (infrun_thread_stop_requested_callback): Delete.
7538         (infrun_thread_stop_requested): If the thread is internally
7539         stopped, queue a pending stop event and clear the thread's
7540         inline-frame state.
7541         (handle_stop_requested): New function.
7542         (handle_syscall_event, handle_inferior_event_1): Use
7543         handle_stop_requested.
7544         (handle_stop_requested): New function.
7545         (handle_signal_stop): Set the thread's stop_signal here instead of
7546         at caller.
7547         (finish_step_over): Clear step over info unconditionally.
7548         (handle_signal_stop): If the user had interrupted the event
7549         thread, consider the stop a random signal.
7550         (handle_signal_stop) <signal arrived while stepping over
7551         breakpoint>: Don't restart threads here.
7552         (stop_waiting): Don't clear step-over info here.
7553
7554 2017-03-08  Pedro Alves  <palves@redhat.com>
7555
7556         PR 21206
7557         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
7558         goes to argument 2, not 1.
7559
7560 2017-03-08  Pedro Alves  <palves@redhat.com>
7561
7562         PR cli/21218
7563         * top.c (gdb_readline_wrapper): Avoid passing NULL to
7564         display_gdb_prompt.
7565         (command_line_input): Add comment.
7566
7567 2017-03-08  Pedro Alves  <palves@redhat.com>
7568
7569         PR tui/21216
7570         * tui/tui-file.c (tui_file::write): New.
7571         * tui/tui-file.h (tui_file): Override "write".
7572         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
7573         factored out from ...
7574         (tui_puts): ... here.
7575         (tui_putc): Use them.
7576         (tui_write): New function.
7577         * tui/tui-io.h (tui_write): Declare.
7578
7579 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7580
7581         * Makefile.in (SFILES): Replace "environ.c" with
7582         "common/environ.c".
7583         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
7584         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
7585         to...
7586         * common/environ.c: ... here.
7587         * environ.h: Moved to...
7588         * common/environ.h: ... here.
7589
7590 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
7591
7592         * gdbarch.sh (pstring_ptr): New static function.
7593         (gdbarch_disassembler_options): Use it.
7594         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7595         not valid_disassembler_option->name.
7596         * gdbarch.c: Regenerate.
7597
7598 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
7599
7600         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7601
7602 2017-03-07  Pedro Alves  <palves@redhat.com>
7603
7604         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7605
7606 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7607
7608         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7609         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7610         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
7611         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
7612
7613 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
7614
7615         * xtensa-linux-nat.c (fetch_gregs): Remove const.
7616
7617 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
7618
7619         * remote.c (remote_add_target_side_commands): Use range-based
7620         for loop.
7621
7622 2017-03-03  Yao Qi  <yao.qi@linaro.org>
7623
7624         PR gdb/21165
7625         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7626         value is lazy.
7627         * valprint.c (common_val_print): Likewise.
7628
7629 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
7630
7631         * NEWS: Mention new set/show disassembler-options commands.
7632         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7633         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7634         (prospective_options): New static variable.
7635         (gdb_disassembler::gdb_disassembler): Initialize
7636         m_di.disassembler_options.
7637         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7638         (get_disassembler_options): New function.
7639         (set_disassembler_options): Likewise.
7640         (set_disassembler_options_sfunc): Likewise.
7641         (show_disassembler_options_sfunc): Likewise.
7642         (disassembler_options_completer): Likewise.
7643         (_initialize_disasm): Likewise.
7644         * disasm.h (get_disassembler_options): New prototype.
7645         (set_disassembler_options): Likewise.
7646         * gdbarch.sh (gdbarch_disassembler_options): New variable.
7647         (gdbarch_verify_disassembler_options): Likewise.
7648         * gdbarch.c: Regenerate.
7649         * gdbarch.h: Likewise.
7650         * arm-tdep.c (num_disassembly_options): Delete.
7651         (set_disassembly_style): Likewise.
7652         (arm_disassembler_options): New static variable.
7653         (set_disassembly_style_sfunc): Convert short style name into long
7654         option name.  Call set_disassembler_options.
7655         (show_disassembly_style_sfunc): New function.
7656         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7657         set_gdbarch_verify_disassembler_options.
7658         (_initialize_arm_tdep): Delete regnames variable and update callers.
7659         (arm_disassembler_options): Initialize.
7660         (disasm_options): New variable.
7661         (num_disassembly_options): Rename from this...
7662         (num_disassembly_styles): ...to this.  Compute by scanning through
7663         disasm_options.
7664         (valid_disassembly_styles): Initialize using disasm_options.
7665         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7666         set_arm_regname_option.
7667         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7668         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7669         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7670         set_gdbarch_verify_disassembler_options.
7671         * s390-tdep.c (s390_disassembler_options): New static variable.
7672         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7673         set_gdbarch_verify_disassembler_options.
7674
7675 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
7676
7677         * remote.c (remote_add_target_side_condition): Remove "struct"
7678         keyword from range-based for loop.
7679
7680 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
7681
7682         * remote.c (remote_add_target_side_condition): Use range-based
7683         for loop.  Update comment.
7684
7685 2017-02-27  Yao Qi  <yao.qi@linaro.org>
7686
7687         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7688
7689 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
7690
7691         * regcache.c (regcache_raw_update): New function.
7692         (regcache_raw_read): Move code to regcache_raw_update.
7693         * regcache.h (regcache_raw_update): New declaration.
7694         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7695
7696 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
7697
7698         * dwarf2read.c (create_debug_type_hash_table): Initialize
7699         header.signature and header.type_offset_in_tu.
7700
7701 2017-02-24  Pedro Alves  <palves@redhat.com>
7702
7703         * symtab.c (make_file_symbol_completion_list_1): Use
7704         add_symtab_completions.
7705
7706 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
7707
7708         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7709
7710 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
7711
7712         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7713         I386_MAX_REGISTER_SIZE.
7714         (i386_pseudo_register_write): Likewise.
7715         (i386_process_record): Likewise.
7716         * i387-tdep.c (i387_supply_xsave): Likewise.
7717         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7718         (store_register): Likewise.
7719
7720 2017-02-23  Pedro Alves  <palves@redhat.com>
7721
7722         * ada-lang.c: Include "common/function-view.h".
7723         (ada_iterate_over_symbols): Adjust to use function_view as
7724         callback type.
7725         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7726         (ada_make_symbol_completion_list): Use a lambda.
7727         (ada_exc_search_name_matches): Delete.
7728         (name_matches_regex): New.
7729         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7730         * compile/compile-c-support.c: Include "common/function-view.h".
7731         (print_one_macro): Change prototype to accept a ui_file pointer.
7732         (write_macro_definitions): Use a lambda.
7733         * dwarf2read.c: Include "common/function-view.h".
7734         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7735         (dw2_expand_symtabs_matching): Adjust to use function_view as
7736         callback type.
7737         * language.h: Include "common/function-view.h".
7738         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7739         function_view as callback type.
7740         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7741         * linespec.c: Include "common/function-view.h".
7742         (collect_info::add_symbol): New method.
7743         (struct symbol_and_data_callback, iterate_inline_only, struct
7744         symbol_matcher_data, iterate_name_matcher): Delete.
7745         (iterate_over_all_matching_symtabs): Adjust to use function_view
7746         as callback type and lambdas.
7747         (iterate_over_file_blocks): Adjust to use function_view as
7748         callback type.
7749         (decode_compound_collector): Now a class with private fields.
7750         (decode_compound_collector::release_symbols): New method.
7751         (collect_one_symbol): Rename to...
7752         (decode_compound_collector::operator()): ... this and adjust.
7753         (lookup_prefix_sym): decode_compound_collector construction bits
7754         move to decode_compound_collector ctor.  Pass the
7755         decode_compound_collector object directly as callback.  Remove
7756         cleanups and use decode_compound_collector::release_symbols
7757         instead.
7758         (symtab_collector): Now a class with private fields.
7759         (symtab_collector::release_symtabs): New method.
7760         (add_symtabs_to_list): Rename to...
7761         (symtab_collector::operator()): ... this and adjust.
7762         (collect_symtabs_from_filename): symtab_collector construction
7763         bits move to symtab_collector ctor.  Pass the symtab_collector
7764         object directly as callback.  Remove cleanups and use
7765         symtab_collector::release_symtabs instead.
7766         (collect_symbols): Delete.
7767         (add_matching_symbols_to_info): Use lambdas.
7768         * macrocmd.c (print_macro_callback): Delete.
7769         (info_macro_command): Use a lambda.
7770         (info_macros_command): Pass print_macro_definition as callable
7771         directly.
7772         (print_one_macro): Remove 'ignore' parameter.
7773         (macro_list_command): Adjust.
7774         * macrotab.c (macro_for_each_data::fn): Now a function_view.
7775         (macro_for_each_data::user_data): Delete field.
7776         (foreach_macro): Adjust to call the function_view.
7777         (macro_for_each): Adjust to use function_view as callback type.
7778         (foreach_macro_in_scope): Adjust to call the function_view.
7779         (macro_for_each_in_scope): Adjust to use function_view as callback
7780         type.
7781         * macrotab.h: Include "common/function-view.h".
7782         (macro_callback_fn): Declare a prototype instead of a pointer.
7783         Remove "user_data" parameter.
7784         (macro_for_each, macro_for_each_in_scope): Adjust to use
7785         function_view as callback type.
7786         * psymtab.c (partial_map_expand_apply)
7787         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7788         Adjust to use function_view as callback type and to return bool.
7789         (psym_expand_symtabs_matching): Adjust to use function_view as
7790         callback types.
7791         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7792         to use function_view as callback type and to return bool.
7793         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7794         callback types.
7795         * symfile.c (expand_symtabs_matching): Adjust to use function_view
7796         as callback types.
7797         * symfile.h: Include "common/function-view.h".
7798         (expand_symtabs_file_matcher_ftype)
7799         (expand_symtabs_symbol_matcher_ftype)
7800         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7801         return bool.
7802         (quick_symbol_functions::map_symtabs_matching_filename)
7803         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7804         function_view as callback type and return bool.
7805         (expand_symtabs_matching): Adjust to use function_view as callback
7806         type.
7807         (maintenance_expand_name_matcher)
7808         (maintenance_expand_file_matcher): Delete.
7809         (maintenance_expand_symtabs): Use lambdas.
7810         * symtab.c (iterate_over_some_symtabs): Adjust to use
7811         function_view as callback types and return bool.
7812         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
7813         of a cleanup.
7814         (lookup_symtab_callback): Delete.
7815         (lookup_symtab): Use a lambda.
7816         (iterate_over_symbols): Adjust to use function_view as callback
7817         type.
7818         (struct search_symbols_data, search_symbols_file_matches)
7819         (search_symbols_name_matches): Delete.
7820         (search_symbols): Use a pair of lambdas.
7821         (struct add_name_data, add_macro_name, symbol_completion_matcher)
7822         (symtab_expansion_callback): Delete.
7823         (default_make_symbol_completion_list_break_on_1): Use lambdas.
7824         * symtab.h: Include "common/function-view.h".
7825         (iterate_over_some_symtabs): Adjust to use function_view as
7826         callback type and return bool.
7827         (iterate_over_symtabs): Adjust to use function_view as callback
7828         type.
7829         (symbol_found_callback_ftype): Remove 'data' parameter and return
7830         bool.
7831         (iterate_over_symbols): Adjust to use function_view as callback
7832         type.
7833
7834 2017-02-23  Pedro Alves  <palves@redhat.com>
7835
7836         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7837         (%.o) <unittests/%.c>: New pattern.
7838         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7839         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7840         * common/function-view.h: New file.
7841         * unittests/function-view-selftests.c: New file.
7842         * configure: Regenerate.
7843
7844 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
7845
7846         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7847         inferior_ptid.
7848         * go32-nat.c (go32_thread_alive): Likewise.
7849
7850 2017-02-23  Yao Qi  <yao.qi@linaro.org>
7851
7852         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7853         delete.
7854
7855 2017-02-23  Yao Qi  <yao.qi@linaro.org>
7856
7857         * varobj.c (varobj_clear_saved_item): Use delete instead of
7858         xfree.
7859         (update_dynamic_varobj_children): Likewise.
7860
7861 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7862
7863         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7864
7865 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
7866
7867         * common/enum-flags.h (enum_flags::enum_flags): Initialize
7868         m_enum_value to 0 in default constructor.
7869
7870 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
7871
7872         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7873         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7874         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7875         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7876         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7877         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7878         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7879         IS_STORE_CONDITIONAL_INSN.
7880
7881 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7882
7883         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7884
7885 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7886
7887         * NEWS (Changes since GDB 7.12): Add DWARF-5.
7888
7889 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7890
7891         * dwarf2read.c (skip_one_die, read_attribute_value)
7892         (dwarf2_const_value_attr, dump_die_shallow)
7893         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7894         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7895
7896 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7897
7898         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7899         (dwarf_parse_macro_header): Accept DWARF version 5.
7900         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7901
7902 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7903
7904         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
7905         DW_AT_GNU_*.
7906         * common/common-exceptions.h (enum errors): Likewise.
7907         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
7908         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
7909         (dwarf_expr_context::execute_stack_op): Likewise.
7910         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
7911         Likewise.
7912         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
7913         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7914         (show_entry_values_debug, call_site_to_target_addr)
7915         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
7916         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
7917         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
7918         (value_of_dwarf_block_entry, indirect_pieced_value)
7919         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
7920         (disassemble_dwarf_expression): Likewise.
7921         * dwarf2read.c (process_die, inherit_abstract_dies)
7922         (read_call_site_scope): Likewise.
7923         * gdbtypes.h (struct func_type, struct call_site_parameter)
7924         (struct call_site): Likewise.
7925         * stack.c (read_frame_arg): Likewise.
7926         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
7927
7928 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7929
7930         * defs.h (read_unsigned_leb128): New declaration.
7931         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
7932         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
7933         (dwarf2_find_location_expression): Call also
7934         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
7935         * dwarf2loc.h (dwarf2_version): New declaration.
7936         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
7937         rnglists.
7938         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
7939         .debug_rnglists.
7940         (struct dwop_section_names): Add loclists_dwo.
7941         (dwop_section_names): Add .debug_loclists.dwo.
7942         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
7943         (struct dwarf2_per_cu_data): Add dwarf_version.
7944         (struct dwo_sections): Add loclists.
7945         (struct attr_abbrev): Add implicit_const.
7946         (read_indirect_line_string): New declaration.
7947         (read_unsigned_leb128): Delete declaration.
7948         (rcuh_kind): New definition.
7949         (read_and_check_comp_unit_head): Change parameter
7950         is_debug_types_section to section_kind.
7951         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
7952         (read_comp_unit_head): Change parameter abfd to section, add parameter
7953         section_kind.  Handle DWARF-5.
7954         (error_check_comp_unit_head): Accept also DWARF version 5.
7955         (read_and_check_comp_unit_head): Change parameter
7956         is_debug_types_section to section_kind.
7957         (read_and_check_type_unit_head): Delete function.
7958         (read_abbrev_offset): Handle DWARF-5.
7959         (create_debug_type_hash_table): Add parameter section_kind.  Process
7960         only DW_UT_type.  Use signature and type_offset_in_tu from struct
7961         comp_unit_head.
7962         (create_debug_types_hash_table): Update create_debug_type_hash_table
7963         caller.
7964         (create_all_type_units): Call create_debug_type_hash_table.
7965         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
7966         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
7967         caller.
7968         (skip_one_die): Handle DW_FORM_implicit_const.
7969         (dwarf2_rnglists_process): New function.
7970         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
7971         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
7972         (read_attribute_value): Handle DW_FORM_implicit_const,
7973         DW_FORM_line_strp.
7974         (read_attribute): Handle DW_FORM_implicit_const.
7975         (read_indirect_string_at_offset_from): New function from
7976         read_indirect_string_at_offset.
7977         (read_indirect_string_at_offset): Call
7978         read_indirect_string_at_offset_from.
7979         (read_indirect_line_string_at_offset): New function.
7980         (read_indirect_string): New function comment.
7981         (read_indirect_line_string): New function.
7982         (read_unsigned_leb128): Make it global.
7983         (dwarf2_string_attr): Handle DWARF-5.
7984         (add_include_dir_stub, read_formatted_entries): New functions.
7985         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
7986         Handle DWARF-5.
7987         (per_cu_header_read_in): Update read_comp_unit_head caller.
7988         (dwarf2_version): New function.
7989         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
7990         rnglists.
7991         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
7992         fields.
7993
7994 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7995
7996         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
7997
7998 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7999
8000         * dwarf2read.c (dwarf2_ranges_process): New function from
8001         dwarf2_ranges_read.
8002         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
8003         dwarf2_ranges_process.
8004
8005 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8006
8007         * dwarf2read.c (create_debug_type_hash_table): New function from
8008         create_debug_types_hash_table.
8009         (create_debug_types_hash_table): Call create_debug_type_hash_table.
8010         (create_all_type_units, open_and_init_dwo_file): Update
8011         create_debug_types_hash_table callers.
8012
8013 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8014
8015         PR gdb/16188
8016         * fork-child.c (trace_start_error): Fix thinko.  va_end should
8017         refer to 'ap', not 'args'.
8018
8019 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8020             Pedro Alves  <palves@redhat.com>
8021
8022         PR gdb/16188
8023         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
8024         calls succeeded.
8025         * fork-child.c (trace_start_error): New function.
8026         (trace_start_error_with_name): Likewise.
8027         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
8028         * inf-ptrace.c (inf_ptrace_me): Likewise.
8029         * inferior.h (trace_start_error): New prototype.
8030         (trace_start_error_with_name): Likewise.
8031
8032 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
8033
8034         PR gdb/21164
8035         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
8036         NULL before using it.
8037         * symmisc.c (maintenance_print_symbols): Likewise.
8038         (maintenance_print_msymbols): Likewise.
8039
8040 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8041
8042         * NEWS: Add record Python bindings entry.
8043
8044 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8045
8046         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
8047         py-record-full.o.
8048         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
8049         * python/py-record-btrace.c, python/py-record-btrace.h,
8050         python/py-record-full.c, python/py-record-full.h: New file.
8051         * python/py-record.c: Add include for py-record-btrace.h and
8052         py-record-full.h.
8053         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
8054         recpy_instruction_history, recpy_function_call_history, recpy_begin,
8055         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
8056         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
8057         New definition.
8058         (gdbpy_initialize_btrace): New export.
8059         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
8060
8061 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8062
8063         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
8064         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
8065         * python/py-record.c: New file.
8066         * python/python-internal.h (gdbpy_start_recording,
8067         gdbpy_current_recording, gdpy_stop_recording,
8068         gdbpy_initialize_record): New export.
8069         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
8070         (python_GdbMethods): Add gdbpy_start_recording,
8071         gdbpy_current_recording and gdbpy_stop_recording.
8072
8073 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8074
8075         * record-btrace.c (record_btrace_record_method): New function.
8076         (init_record_btrace_ops): Initialize to_record_method.
8077         * record-full.c (record_full_record_method): New function.
8078         (init_record_full_ops, init_record_full_core_ops): Add
8079         record_full_record_method.
8080         * record.h (enum record_method): New enum.
8081         * target-debug.h (target_debug_print_enum_record_method: New define.
8082         * target-delegates.c: Regenerate.
8083         * target.c (target_record_method): New function.
8084         * target.h: Include record.h.
8085         (struct target_ops) <to_record_method>: New field.
8086         (target_record_method): New export.
8087
8088 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8089
8090         * record.h (record_start, record_stop): New export.
8091         * record.c (record_start, record_stop): New function.
8092
8093 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8094
8095         * btrace.c (btrace_fetch): Copy function call segments pointer
8096         into a vector.
8097         (btrace_clear): Clear the vector.
8098         (btrace_find_insn_by_number): Use binary search to find the correct
8099         function call segment.
8100         * btrace.h (brace_fun_p): New typedef.
8101         (struct btrace_thread_info) <functions>: New field.
8102
8103 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8104
8105         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
8106         * btrace.c (btrace_decode_error): ... here.  New function.
8107         * btrace.h (btrace_decode_error): New export.
8108
8109 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8110
8111         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
8112         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
8113         btrace_find_insn_by_number): Remove special case for gaps.
8114         * btrace.h (btrace_insn_get_error): New export.
8115         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
8116         * record-btrace.c (btrace_insn_history): Print number for gaps.
8117         (record_btrace_info, record_btrace_goto): Handle gaps.
8118
8119 2017-02-14  Tom Tromey  <tom@tromey.com>
8120
8121         PR python/13598:
8122         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
8123         event.
8124         * python/py-evts.c (gdbpy_initialize_py_events): Add
8125         before_prompt registry.
8126         * python/py-events.h (events_object) <before_prompt>: New field.
8127
8128 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
8129
8130         * btrace.c (ftrace_new_switch): Preserve up link and flags.
8131
8132 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
8133
8134         * symfile (_initialize_symfile): Add usage text to the load command's
8135         help text.
8136
8137 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
8138
8139         * utils.c (defaulted_query): Don't query on secondary UIs.
8140
8141 2017-02-10  Tom Tromey  <tom@tromey.com>
8142
8143         * rust-lang.c (rust_get_disr_info): Remove unused variable.
8144
8145 2017-02-10  Tom Tromey  <tom@tromey.com>
8146
8147         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
8148         "cleanup" local.
8149         * python/py-type.c (typy_legacy_template_argument): Remove
8150         unnecessary "cleanup" local.
8151
8152 2017-02-10  Tom Tromey  <tom@tromey.com>
8153
8154         * python/python.c (do_start_initialization): New function, from
8155         _initialize_python.
8156         (_initialize_python): Call do_start_initialization.
8157         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
8158         goto.
8159
8160 2017-02-10  Tom Tromey  <tom@tromey.com>
8161
8162         * python/py-prettyprint.c (pretty_print_one_value): Use
8163         gdbpy_ref.
8164
8165 2017-02-10  Tom Tromey  <tom@tromey.com>
8166
8167         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
8168         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
8169         gdbpy_ref.
8170         * python/py-type.c (field_new): Use gdbpy_ref.
8171         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
8172         gdbpy_ref.
8173         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
8174         (py_free_pspace): Likewise.
8175         (pspace_to_pspace_object): Likewise.
8176         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
8177         (py_free_objfile): Likewise.
8178         (objfile_to_objfile_object): Likewise.
8179         * python/py-inferior.c (delete_thread_object): Use
8180         gdbpy_ref.
8181         (infpy_read_memory): Likewise.
8182         (py_free_inferior): Likewise.
8183         * python/py-evtregistry.c (create_eventregistry_object): Use
8184         gdbpy_ref.
8185         * python/py-event.c (create_event_object): Use gdbpy_ref.
8186
8187 2017-02-10  Tom Tromey  <tom@tromey.com>
8188
8189         * python/py-ref.h (gdbpy_ref_policy): Now a template.
8190         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
8191         used.
8192         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
8193         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
8194         python/py-exitedevent.c, python/py-finishbreakpoint.c,
8195         python/py-framefilter.c, python/py-function.c,
8196         python/py-inferior.c, python/py-infevents.c,
8197         python/py-linetable.c, python/py-newobjfileevent.c,
8198         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
8199         python/py-signalevent.c, python/py-stopevent.c,
8200         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
8201         python/py-unwind.c, python/py-utils.c, python/py-value.c,
8202         python/py-varobj.c, python/py-xmethods.c, python/python.c,
8203         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
8204
8205 2017-02-10  Tom Tromey  <tom@tromey.com>
8206
8207         * ui-out.h (ui_out_emit_type): New class.
8208         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
8209         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
8210         and ui_out_emit_tuple.
8211         (enumerate_locals): Likewise.
8212         (py_mi_print_variables, py_print_locals, py_print_args): Use
8213         ui_out_emit_list.
8214         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
8215         ui_out_emit_list.
8216         * common/gdb_optional.h: New file.
8217
8218 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
8219
8220         * MAINTAINERS (Write After Approval): Update my e-mail address.
8221
8222 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
8223
8224         PR gdb/21122
8225         * breakpoint.c (_initialize_breakpoint): Update the help description
8226         of the 'commands' command to indicate that it takes a list argument.
8227
8228 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
8229
8230         * interps.c (current_interp_set_logging): Remove "return".
8231
8232 2017-02-09  Gary Benson  <gbenson@redhat.com>
8233
8234         * symtab.c (add_symtab_completions): Prevent NULL pointer
8235         dereference.
8236
8237 2017-02-08  Pedro Alves  <palves@redhat.com>
8238
8239         * interps.c (interp::interp): Remove reference to quiet_p.
8240         (interp_set): Make static.  Remove dead "Switching to" output
8241         code.
8242         (interp_quiet_p, interp_set_quiet): Delete.
8243         (interpreter_exec_cmd): Don't set the interpreter quiet.
8244         * interps.h (interp_quiet_p): Make static.
8245         (class interp) <quiet_p>: Remove field
8246
8247 2017-02-08  Jerome Guitton  <guitton@adacore.com>
8248
8249         * cli/cli-decode.c (find_command_name_length): Make it extern.
8250         * cli/cli-decode.h (find_command_name_length): Declare.
8251         * cli/cli-script.c (command_name_equals, line_first_arg):
8252         New functions.
8253         (process_next_line): Use cli-decode to parse command names.
8254         (build_command_line): Make args a constant pointer.
8255
8256 2017-02-08  Jerome Guitton  <guitton@adacore.com>
8257
8258         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
8259         Remove case-insensitive search.
8260
8261 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
8262
8263         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
8264         at the end of the line.  Avoids an ARI warning.
8265
8266 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
8267
8268         * NEWS: Mention support for record/replay of Intel 64 rdrand and
8269         rdseed instructions.
8270         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
8271
8272 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
8273
8274         PR tdep/20936
8275         Provide and use sparc32 and sparc64 target description XML files.
8276         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
8277         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
8278         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
8279         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
8280         * features/sparc/sparc32-solaris.xml: New file.
8281         * features/sparc/sparc64-solaris.xml: New file.
8282         * features/sparc/sparc32-solaris.c: Generated.
8283         * features/sparc/sparc64-solaris.c: Generated.
8284         * sparc-tdep.h: Account for differences in target descriptions.
8285         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
8286         (sparc32_register_type): Use target provided registers.
8287         (validate_tdesc_registers): New function.
8288         (sparc32_gdbarch_init): Use tdesc_has_registers.
8289         Set pseudoregister functions.
8290         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
8291         (sparc64_register_type): Use target provided registers.
8292         (sparc64_init_abi): Set pseudoregister functions.
8293
8294 2017-02-03  Tom Tromey  <tom@tromey.com>
8295
8296         PR rust/21097:
8297         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
8298         with a single member.
8299
8300 2017-02-03  Pedro Alves  <palves@redhat.com>
8301
8302         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
8303         (cli_interp_base::~cli_interp_base): New.
8304         (cli_interp): New struct.
8305         (as_cli_interp): Cast the interp itself to cli_interp.
8306         (cli_interpreter_pre_command_loop): Rename to ...
8307         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
8308         parameter.
8309         (cli_interpreter_init): Rename to ...
8310         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
8311         boolean.  Make extern.
8312         (cli_interpreter_resume): Rename to ...
8313         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
8314         extern.
8315         (cli_interpreter_suspend): Rename to ...
8316         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
8317         extern.
8318         (cli_interpreter_exec): Rename to ...
8319         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
8320         extern.
8321         (cli_interpreter_supports_command_editing): Rename to ...
8322         (cli_interp_base::supports_command_editing): ... this.  Remove
8323         'interp' parameter.  Make extern.
8324         (cli_ui_out): Rename to ...
8325         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
8326         Make extern.
8327         (cli_set_logging): Rename to ...
8328         (cli_interp_base::set_logging): ... this.  Remove 'interp'
8329         parameter.  Make extern.
8330         (cli_interp_procs): Delete.
8331         (cli_interp_factory): Adjust to use "new".
8332         * cli/cli-interp.h: Include "interps.h".
8333         (struct cli_interp_base): New struct.
8334         * interps.c (struct interp): Delete.  Fields moved to interps.h.
8335         (interp_new): Delete.
8336         (interp::interp, interp::~interp): New.
8337         (interp_set): Use bool, and return void.  Assume the interpreter
8338         has suspend, init and resume methods, and that the all return
8339         void.
8340         (set_top_level_interpreter): interp_set returns void.
8341         (interp_ui_out): Adapt.
8342         (current_interp_set_logging): Adapt.
8343         (interp_data): Delete.
8344         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
8345         (interp_exec): Adapt.
8346         (top_level_interpreter_data): Delete.
8347         * interps.h (interp_init_ftype, interp_resume_ftype)
8348         (interp_suspend_ftype, interp_exec_ftype)
8349         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
8350         (class interp): New.
8351         (interp_new): Delete.
8352         (interp_set): Now returns void.  Use bool.
8353         (interp_data, top_level_interpreter_data): Delete.
8354         * mi/mi-common.h: Include interps.h.
8355         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
8356         init, resume, suspect, exec, interp_ui_out, set_logging and
8357         pre_command_loop methods.
8358         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
8359         (mi_interpreter_init): Rename to ...
8360         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
8361         bool, return void and make extern.  Adjust.
8362         (mi_interpreter_resume): ... Rename to ...
8363         (mi_interp::resume): ... this.  Remove the 'data' parameter,
8364         return void and make extern.  Adjust.
8365         (mi_interpreter_suspend): ... Rename to ...
8366         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
8367         return void and make extern.  Adjust.
8368         (mi_interpreter_exec): ... Rename to ...
8369         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
8370         extern.  Adjust.
8371         (mi_interpreter_pre_command_loop): ... Rename to ...
8372         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
8373         parameter and make extern.
8374         (mi_on_normal_stop_1): Adjust.
8375         (mi_ui_out): Rename to ...
8376         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
8377         parameter and make extern.  Adjust.
8378         (mi_set_logging): Rename to ...
8379         (mi_interp::set_logging): ... this.  Remove the 'interp'
8380         parameter and make extern.  Adjust.
8381         (mi_interp_procs): Delete.
8382         (mi_interp_factory): Adjust to use 'new'.
8383         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
8384         (mi_print_exception, mi_execute_command, mi_load_progress):
8385         Adjust.
8386         * tui/tui-interp.c (tui_interp): New class.
8387         (as_tui_interp): Return a tui_interp pointer.
8388         (tui_on_normal_stop, tui_on_signal_received)
8389         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
8390         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
8391         to use interp::interp_ui_out.
8392         (tui_init): Rename to ...
8393         (tui_interp::init): ... this.  Remove the 'self' parameter, use
8394         bool, return void and make extern.  Adjust.
8395         (tui_resume): Rename to ...
8396         (tui_interp::resume): ... this.  Remove the 'data' parameter,
8397         return void and make extern.  Adjust.
8398         (tui_suspend): Rename to ...
8399         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
8400         return void and make extern.  Adjust.
8401         (tui_ui_out): Rename to ...
8402         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
8403         parameter, and make extern.  Adjust.
8404         (tui_exec): Rename to ...
8405         (tui_interp::exec): ... this.  Remove the 'data' parameter and
8406         make extern.
8407         (tui_interp_procs): Delete.
8408         (tui_interp_factory): Use "new".
8409
8410 2017-02-02  Tom Tromey  <tom@tromey.com>
8411
8412         * rust-exp.y (ends_raw_string, space_then_number)
8413         (rust_identifier_start_p): Return bool.
8414         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
8415         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
8416         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
8417         (rust_chartype_p): Return bool.
8418         (val_print_struct, rust_print_struct_def, rust_print_type):
8419         Update.
8420         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
8421         Return bool.
8422
8423 2017-02-02  Tom Tromey  <tom@tromey.com>
8424
8425         * rust-lang.c: Reindent.
8426
8427 2017-02-02  Tom Tromey  <tom@tromey.com>
8428
8429         * rust-lang.h (rust_crate_for_block): Update.
8430         * rust-lang.c (rust_crate_for_block): Return std::string.
8431         (rust_get_disr_info): Use std:;string, not
8432         gdb::unique_xmalloc_ptr.
8433         * rust-exp.y (crate_name): Update.
8434
8435 2017-02-02  Pedro Alves  <palves@redhat.com>
8436
8437         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
8438         field out of gdb_disassembler_test and make it static.
8439
8440 2017-02-02  Pedro Alves  <palves@redhat.com>
8441
8442         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
8443         mi1_interp and mi_interp fields.
8444
8445 2017-02-02  Pedro Alves  <palves@redhat.com>
8446
8447         * cli/cli-interp.c (struct saved_output_files, saved_output):
8448         Moved from cli/cli-logging.c.
8449         (cli_set_logging): New function.
8450         (cli_interp_procs): Install cli_set_logging.
8451         * cli/cli-interp.h (make_logging_output, cli_set_logging):
8452         Declare.
8453         * cli/cli-logging.c (struct saved_output_files, saved_output):
8454         Moved to cli/cli-interp.c.
8455         (pop_output_files): Don't save outputs here.
8456         (make_logging_output): New function.
8457         (handle_redirections): Don't build tee nor save previous outputs
8458         here.
8459         * interps.c (current_interp_set_logging): Change prototype.
8460         Assume there's always a set_logging_proc method installed.
8461         * interps.h (interp_set_logging_ftype): Change prototype.
8462         (current_interp_set_logging): Change prototype and adjust comment.
8463         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
8464         use make_logging_output.
8465         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
8466 2017-02-02  Pedro Alves  <palves@redhat.com>
8467
8468         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
8469         from ...
8470         (set_logging_overwrite): ... here.
8471         (logging_no_redirect_file): Delete.
8472         (set_logging_redirect): Don't handle redirection on the fly.
8473         Instead warn that "logging off" / "logging on" is necessary.
8474         (pop_output_files): Delete references to logging_no_redirect_file.
8475         (show_logging_command): Always speak in terms of what will happen
8476         once logging is reenabled.
8477
8478 2017-02-02  Pedro Alves  <palves@redhat.com>
8479
8480         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
8481
8482 2017-02-02  Pedro Alves  <palves@redhat.com>
8483
8484         * disasm.c (gdb_pretty_print_insn): Rename to ...
8485         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
8486         Remove gdbarch parameter.  Adapt to clear the object's buffers
8487         instead of allocating new buffers, and to print using the object's
8488         gdb_disassembler instead of calling gdb_print_insn.
8489         (dump_insns): Use gdb_pretty_print_disassembler.
8490         * disasm.h (gdb_pretty_print_insn): Delete declaration.
8491         (gdb_pretty_print_disassembler): New class.
8492         * record-btrace.c (btrace_insn_history): Use
8493         gdb_pretty_print_disassembler.
8494
8495 2017-02-02  Pedro Alves  <palves@redhat.com>
8496
8497         * ada-lang.c (type_as_string): Use string_file.
8498         * ada-valprint.c (ada_print_floating): Use string_file.
8499         * ada-varobj.c (ada_varobj_scalar_image)
8500         (ada_varobj_get_value_image): Use string_file.
8501         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
8502         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
8503         * breakpoint.c (update_inserted_breakpoint_locations)
8504         (insert_breakpoint_locations, reattach_breakpoints)
8505         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
8506         (print_it_watchpoint): Use string_file.
8507         (save_breakpoints): Use stdio_file.
8508         * c-exp.y (oper): Use string_file.
8509         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
8510         tee_file.
8511         (pop_output_files): Use delete.
8512         (handle_redirections): Use stdio_file and tee_file.
8513         * cli/cli-setshow.c (do_show_command): Use string_file.
8514         * compile/compile-c-support.c (c_compute_program): Use
8515         string_file.
8516         * compile/compile-c-symbols.c (generate_vla_size): Take a
8517         'string_file &' instead of a 'ui_file *'.
8518         (generate_c_for_for_one_variable): Take a 'string_file &' instead
8519         of a 'ui_file *'.  Use string_file.
8520         (generate_c_for_variable_locations): Take a 'string_file &'
8521         instead of a 'ui_file *'.
8522         * compile/compile-internal.h (generate_c_for_for_one_variable):
8523         Take a 'string_file &' instead of a 'ui_file *'.
8524         * compile/compile-loc2c.c (push, pushf, unary, binary)
8525         (print_label, pushf_register_address, pushf_register)
8526         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
8527         'ui_file *'.  Adjust.
8528         * compile/compile.c (compile_to_object): Use string_file.
8529         * compile/compile.h (compile_dwarf_expr_to_c)
8530         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
8531         'ui_file *'.
8532         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
8533         (replace_typedefs_qualified_name): Use string_file and
8534         obstack_copy0.
8535         * disasm.c (gdb_pretty_print_insn): Use string_file.
8536         (gdb_disassembly): Adjust reference the null_stream global.
8537         (do_ui_file_delete): Delete.
8538         (gdb_insn_length): Use null_stream.
8539         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
8540         * dwarf2loc.c (dwarf2_compile_property_to_c)
8541         (locexpr_generate_c_location, loclist_generate_c_location): Take a
8542         'string_file &' instead of a 'ui_file *'.
8543         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
8544         * dwarf2read.c (do_ui_file_peek_last): Delete.
8545         (dwarf2_compute_name): Use string_file.
8546         * event-top.c (gdb_setup_readline): Use stdio_file.
8547         * gdbarch.sh (verify_gdbarch): Use string_file.
8548         * gdbtypes.c (safe_parse_type): Use null_stream.
8549         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
8550         string_file.
8551         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
8552         'string_file *' instead of a 'ui_file *'.
8553         (gdbscm_arch_disassemble): Use string_file.
8554         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
8555         * guile/scm-ports.c (class ioscm_file_port): Now a class that
8556         inherits from ui_file.
8557         (ioscm_file_port_delete, ioscm_file_port_rewind)
8558         (ioscm_file_port_put): Delete.
8559         (ioscm_file_port_write): Rename to ...
8560         (ioscm_file_port::write): ... this.  Remove file_port_magic
8561         checks.
8562         (ioscm_file_port_new): Delete.
8563         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
8564         ui_file_up.
8565         * guile/scm-type.c (tyscm_type_name): Use string_file.
8566         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
8567         Use string_file.
8568         * infcmd.c (print_return_value_1): Use string_file.
8569         * infrun.c (print_target_wait_results): Use string_file.
8570         * language.c (add_language): Use string_file.
8571         * location.c (explicit_to_string_internal): Use string_file.
8572         * main.c (captured_main_1): Use null_file.
8573         * maint.c (maintenance_print_architecture): Use stdio_file.
8574         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
8575         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
8576         event_channel>: Change type to mi_console_file pointer.
8577         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
8578         (mi_console_file_delete): Delete.
8579         (struct mi_console_file): Delete.
8580         (mi_console_file_magic): Delete.
8581         (mi_console_file_new): Delete.
8582         (mi_console_file::mi_console_file): New.
8583         (mi_console_file_delete): Delete.
8584         (mi_console_file_fputs): Delete.
8585         (mi_console_file::write): New.
8586         (mi_console_raw_packet): Delete.
8587         (mi_console_file::flush): New.
8588         (mi_console_file_flush): Delete.
8589         (mi_console_set_raw): Rename to ...
8590         (mi_console_file::set_raw): ... this.
8591         * mi/mi-console.h (class mi_console_file): New class.
8592         (mi_console_file_new, mi_console_set_raw): Delete.
8593         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8594         (mi_set_logging): Use delete and tee_file.  Adjust.
8595         * mi/mi-main.c (output_register): Use string_file.
8596         (mi_cmd_data_evaluate_expression): Use string_file.
8597         (mi_cmd_data_read_memory): Use string_file.
8598         (mi_cmd_execute, print_variable_or_computed): Use string_file.
8599         * mi/mi-out.c (mi_ui_out::main_stream): New.
8600         (mi_ui_out::rewind): Use main_stream and
8601         string_file.
8602         (mi_ui_out::put): Use main_stream and string_file.
8603         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8604         Allocate a 'string_file' instead.
8605         (mi_out_new): Don't allocate a mem_fileopen stream here.
8606         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8607         (mi_ui_out::main_stream): Declare method.
8608         * printcmd.c (eval_command): Use string_file.
8609         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8610         * python/py-arch.c (archpy_disassemble): Use string_file.
8611         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8612         * python/py-frame.c (frapy_str): Use string_file.
8613         * python/py-framefilter.c (py_print_type, py_print_single_arg):
8614         Use string_file.
8615         * python/py-type.c (typy_str): Use string_file.
8616         * python/py-unwind.c (unwind_infopy_str): Use string_file.
8617         * python/py-value.c (valpy_str): Use string_file.
8618         * record-btrace.c (btrace_insn_history): Use string_file.
8619         * regcache.c (regcache_print): Use stdio_file.
8620         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8621         * remote.c (escape_buffer): Use string_file.
8622         * rust-lang.c (rust_get_disr_info): Use string_file.
8623         * serial.c (serial_open_ops_1): Use stdio_file.
8624         (do_serial_close): Use delete.
8625         * stack.c (print_frame_arg): Use string_file.
8626         (print_frame_args): Remove local mem_fileopen stream, not used.
8627         (print_frame): Use string_file.
8628         * symmisc.c (maintenance_print_symbols): Use stdio_file.
8629         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8630         Take a 'string_file *' instead of a 'ui_file *'.
8631         * top.c (new_ui): Use stdio_file and stderr_file.
8632         (free_ui): Use delete.
8633         (execute_command_to_string): Use string_file.
8634         (quit_confirm): Use string_file.
8635         * tracepoint.c (collection_list::append_exp): Use string_file.
8636         * tui/tui-disasm.c (tui_disassemble): Use string_file.
8637         * tui/tui-file.c: Don't include "ui-file.h".
8638         (enum streamtype, struct tui_stream): Delete.
8639         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8640         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8641         (tui_file::tui_file): New method.
8642         (tui_file_fputs): Delete.
8643         (tui_file_get_strbuf): Delete.
8644         (tui_file::puts): New method.
8645         (tui_file_adjust_strbuf): Delete.
8646         (tui_file_flush): Delete.
8647         (tui_file::flush): New method.
8648         * tui/tui-file.h: Tweak intro comment.
8649         Include ui-file.h.
8650         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8651         (tui_file_adjust_strbuf): Delete declarations.
8652         (class tui_file): New class.
8653         * tui/tui-io.c (tui_initialize_io): Use tui_file.
8654         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8655         (tui_register_format): Use string_stream.
8656         * tui/tui-stack.c (tui_make_status_line): Use string_file.
8657         (tui_get_function_from_frame): Use string_file.
8658         * typeprint.c (type_to_string): Use string_file.
8659         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8660         (null_stream): New global.
8661         (ui_file_delete): Delete.
8662         (ui_file::ui_file): New.
8663         (null_file_isatty): Delete.
8664         (ui_file::~ui_file): New.
8665         (null_file_rewind): Delete.
8666         (ui_file::printf): New.
8667         (null_file_put): Delete.
8668         (null_file_flush): Delete.
8669         (ui_file::putstr): New.
8670         (null_file_write): Delete.
8671         (ui_file::putstrn): New.
8672         (null_file_read): Delete.
8673         (ui_file::putc): New.
8674         (null_file_fputs): Delete.
8675         (null_file_write_async_safe): Delete.
8676         (ui_file::vprintf): New.
8677         (null_file_delete): Delete.
8678         (null_file::write): New.
8679         (null_file_fseek): Delete.
8680         (null_file::puts): New.
8681         (ui_file_data): Delete.
8682         (null_file::write_async_safe): New.
8683         (gdb_flush, ui_file_isatty): Adjust.
8684         (ui_file_put, ui_file_rewind): Delete.
8685         (ui_file_write): Adjust.
8686         (ui_file_write_for_put): Delete.
8687         (ui_file_write_async_safe, ui_file_read): Adjust.
8688         (ui_file_fseek): Delete.
8689         (fputs_unfiltered): Adjust.
8690         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8691         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8692         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8693         (set_ui_file_data): Delete.
8694         (string_file::~string_file, string_file::write)
8695         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8696         (do_ui_file_as_string, ui_file_as_string): Delete.
8697         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8698         (struct mem_file): Delete.
8699         (mem_file_new): Delete.
8700         (stdio_file::stdio_file): New.
8701         (mem_file_delete): Delete.
8702         (stdio_file::stdio_file): New.
8703         (mem_fileopen): Delete.
8704         (stdio_file::~stdio_file): New.
8705         (mem_file_rewind): Delete.
8706         (stdio_file::set_stream): New.
8707         (mem_file_put): Delete.
8708         (stdio_file::open): New.
8709         (mem_file_write): Delete.
8710         (stdio_file_magic, struct stdio_file): Delete.
8711         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8712         (stdio_file::flush): New.
8713         (stdio_file_read): Rename to ...
8714         (stdio_file::read): ... this.  Adjust.
8715         (stdio_file_write): Rename to ...
8716         (stdio_file::write): ... this.  Adjust.
8717         (stdio_file_write_async_safe): Rename to ...
8718         (stdio_file::write_async_safe) ... this.  Adjust.
8719         (stdio_file_fputs): Rename to ...
8720         (stdio_file::puts) ... this.  Adjust.
8721         (stdio_file_isatty): Delete.
8722         (stdio_file_fseek): Delete.
8723         (stdio_file::isatty): New.
8724         (stderr_file_write): Rename to ...
8725         (stderr_file::write) ... this.  Adjust.
8726         (stderr_file_fputs): Rename to ...
8727         (stderr_file::puts) ... this.  Adjust.
8728         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8729         (stderr_file::stderr_file): New.
8730         (tee_file_magic): Delete.
8731         (struct tee_file): Delete.
8732         (tee_file::tee_file): New.
8733         (tee_file_new): Delete.
8734         (tee_file::~tee_file): New.
8735         (tee_file_delete): Delete.
8736         (tee_file_flush): Rename to ...
8737         (tee_file::flush): ... this.  Adjust.
8738         (tee_file_write): Rename to ...
8739         (tee_file::write): ... this.  Adjust.
8740         (tee_file::write_async_safe): New.
8741         (tee_file_fputs): Rename to ...
8742         (tee_file::puts): ... this.  Adjust.
8743         (tee_file_isatty): Rename to ...
8744         (tee_file::isatty): ... this.  Adjust.
8745         * ui-file.h (struct obstack, struct ui_file): Don't
8746         forward-declare.
8747         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8748         (ui_file_write_ftype)
8749         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8750         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8751         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8752         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8753         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8754         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8755         (set_ui_file_fseek): Delete.
8756         (ui_file_data, ui_file_delete, ui_file_rewind)
8757         (struct ui_file): New.
8758         (ui_file_up): New.
8759         (class null_file): New.
8760         (null_stream): Declare.
8761         (ui_file_write_for_put, ui_file_put): Delete.
8762         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8763         Delete.
8764         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8765         (gdb_fopen, tee_file_new): Delete.
8766         (struct string_file): New.
8767         (struct stdio_file): New.
8768         (stdio_file_up): New.
8769         (struct stderr_file): New.
8770         (class tee_file): New.
8771         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8772         of a 'ui_file *'.  Adjust.
8773         * ui-out.h (class ui_out) <field_stream>: Likewise.
8774         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8775         (null_stream): Delete.
8776         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8777         Adjust.
8778         * utils.h (struct ui_file): Delete forward declaration..
8779         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8780         (error_stream): Take a 'string_file &' instead of a
8781         'ui_file *'.
8782         * varobj.c (varobj_value_get_print_value): Use string_file.
8783         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8784         * gdbarch.c: Regenerate.
8785
8786 2017-02-02  Pedro Alves  <palves@redhat.com>
8787
8788         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8789         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
8790         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
8791         Adjust to call gdb_print_insn instead of
8792         gdb_disassembler::print_insn.
8793         (dump_insns, do_mixed_source_and_assembly_deprecated)
8794         (do_mixed_source_and_assembly, do_assembly_only): Add back a
8795         'gdbarch' parameter.  Remove gdb_disassembler parameter.
8796         (gdb_disassembly): Don't allocate a gdb_disassembler here.
8797         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8798         declaration.
8799         (gdb_pretty_print_insn): Re-add declaration.
8800         * record-btrace.c (btrace_insn_history): Don't allocate a
8801         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
8802
8803 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
8804
8805         * disasm.h (gdb_disassembly): Remove file_string parameter.
8806         * disasm.c (gdb_disassembly): Likewise.
8807         * cli/cli-cmds.c (print_disassembly): Adapt.
8808         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8809         * stack.c (do_gdb_disassembly): Likewise.
8810
8811 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8812
8813         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8814         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8815         targets.  And if the implicit value is longer than needed, extract
8816         the first bytes instead of the "least significant" ones.
8817
8818 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
8819
8820         * btrace.c (btrace_enable): Do not call btrace_add_pc for
8821         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8822         (btrace_fetch): Assert can_access_registers_ptid.
8823         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8824         validate_registers_access.
8825
8826 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
8827
8828         * gdbthread.h (can_access_registers_ptid): New.
8829         * thread.c (can_access_registers_ptid): New.
8830
8831 2017-02-01  Pedro Alves  <palves@redhat.com>
8832
8833         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8834
8835 2017-01-31  Pedro Alves  <palves@redhat.com>
8836
8837         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8838         Fix typos.
8839
8840 2017-01-31  Pedro Alves  <palves@redhat.com>
8841
8842         * stack.c (print_frame_args): Remove local mem_fileopen stream,
8843         not used.
8844
8845 2017-01-31  Pedro Alves  <palves@redhat.com>
8846
8847         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8848
8849 2017-01-31  Pedro Alves  <palves@redhat.com>
8850
8851         * common/scoped_restore.h
8852         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8853         change the value's parameter type to T2.
8854         (make_scoped_restore): Likewise.
8855
8856 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8857             Richard Henderson  <rth@redhat.com>
8858
8859         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8860         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8861         GS_BASE for older kernels.
8862         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8863         GS_BASE for older kernels.
8864         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8865         and GS_BASE to the offset table.
8866         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8867         system register group.
8868         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8869         for older kernels.
8870         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8871         amd64 ABI.
8872         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8873         AMD64_GSBASE_REGNUM.
8874         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8875         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8876         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8877         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8878         i386/64bit-segments.xml in those rules.
8879         * features/i386/64bit-segments.xml: New file.
8880         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8881         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8882         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8883         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8884         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8885         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8886         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8887         * features/i386/amd64-avx-linux.c: Regenerated.
8888         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8889         * features/i386/amd64-avx-mpx.c: Regenerated.
8890         * features/i386/amd64-avx512-linux.c: Regenerated.
8891         * features/i386/amd64-linux.c: Regenerated.
8892         * features/i386/amd64-mpx-linux.c: Regenerated.
8893         * features/i386/i386-avx-mpx-linux.c: Regenerated.
8894         * features/i386/i386-avx-mpx.c: Regenerated.
8895         * features/i386/x32-avx-linux.c: Regenerated.
8896         * features/i386/x32-avx512-linux.c: Regenerated.
8897         * regformats/i386/amd64-avx-linux.dat: Regenerated.
8898         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8899         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8900         * regformats/i386/amd64-linux.dat: Regenerated.
8901         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8902         * regformats/i386/x32-avx-linux.dat: Regenerated.
8903         * regformats/i386/x32-avx512-linux.dat: Regenerated.
8904         * regformats/i386/x32-linux.dat: Regenerated.
8905
8906 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8907
8908         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
8909         Set to AMD64_NUM_REGS.
8910
8911 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8912
8913         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
8914         that checks validity of a register number.
8915
8916 2017-01-27  Kees Cook  <keescook@google.com>
8917
8918         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
8919         fetch_fpregs if target has fpa registers.
8920         (arm_linux_store_inferior_registers): Call store_fpregs if target
8921         has fpa registers.
8922
8923 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8924
8925         * cris-tdep.c (cris_gdbarch_init): Remove check for
8926         info.byte_order and force it to BFD_ENDIAN_LITTLE.
8927
8928 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
8929
8930         * corelow.c (get_core_register_section): Check for regset
8931         existence before checking for REGSET_VARIABLE_SIZE.
8932
8933 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8934             Pedro Alves  <palves@redhat.com>
8935
8936         PR gdb/20939
8937         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
8938         call memory_error, save memaddr instead.
8939         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
8940         negative, cal memory_error.
8941         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
8942
8943 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8944
8945         * disasm-selftests.c (memory_error_test): New function.
8946         (_initialize_disasm_selftests): Register memory_error_test.
8947
8948 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8949
8950         * Makefile.in (SFILES): Add disasm-selftests.c and
8951         selftest-arch.c.
8952         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
8953         * disasm-selftests.c: New file.
8954         * selftest-arch.c: New file.
8955         * selftest-arch.h: New file.
8956
8957 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8958
8959         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
8960         to bfd_arch_mep.  Don't return 0 if section is not
8961         found.  Call print_insn_mep.
8962
8963 2017-01-26  Pedro Alves  <palves@redhat.com>
8964             Yao Qi  <yao.qi@linaro.org>
8965
8966         * arm-tdep.c: Include "disasm.h".
8967         (gdb_print_insn_arm): Update code to get gdbarch.
8968         * disasm.c (dis_asm_read_memory): Change it to
8969         gdb_disassembler::dis_asm_read_memory.
8970         (dis_asm_memory_error): Likewise.
8971         (dis_asm_print_address): Likewise.
8972         (gdb_pretty_print_insn): Change it to
8973         gdb_disassembler::pretty_print_insn.
8974         (dump_insns): Add one argument gdb_disassemlber.  All
8975         callers updated.
8976         (do_mixed_source_and_assembly_deprecated): Likewise.
8977         (do_mixed_source_and_assembly): Likewise.
8978         (do_assembly_only): Likewise.
8979         (gdb_disassembler::gdb_disassembler): New.
8980         (gdb_disassembler::print_insn): New.
8981         * disasm.h (class gdb_disassembler): New.
8982         (gdb_pretty_print_insn): Remove declaration.
8983         (gdb_disassemble_info): Likewise.
8984         * guile/scm-disasm.c (class gdbscm_disassembler): New.
8985         (gdbscm_disasm_read_memory_worker): Update.
8986         (gdbscm_disasm_read_memory): Update.
8987         (gdbscm_disasm_memory_error): Remove.
8988         (gdbscm_disasm_print_address): Remove.
8989         (gdbscm_disassembler::gdbscm_disassembler): New.
8990         (gdbscm_print_insn_from_port): Update.
8991         * mips-tdep.c: Include disasm.h.
8992         (gdb_print_insn_mips): Update code to get gdbarch.
8993         * record-btrace.c (btrace_insn_history): Update.
8994         * spu-tdep.c: Include disasm.h.
8995         (struct spu_dis_asm_data): Remove.
8996         (struct spu_dis_asm_info): New.
8997         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
8998         SPU id.
8999         (gdb_print_insn_spu): Cast disassemble_info to
9000         spu_dis_asm_info.
9001
9002 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9003
9004         * disasm.c (do_ui_file_delete): Delete.
9005         (gdb_insn_length): Move code creating stream to ...
9006         * utils.c (null_stream): ... here.  New function.
9007         * utils.h (null_stream): Declare.
9008
9009 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
9010
9011         * python/py-inferior.c (find_thread_object): Return directly
9012         from the loop.  Remove "found" variable.
9013
9014 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
9015
9016         GDB 7.12.1 released.
9017
9018 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
9019
9020         * python/py-function.c (fnpy_call): Reorder declarations to have
9021         the gdbpy_enter object declared first.
9022         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
9023
9024 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
9025
9026         PR python/21068
9027         * python/python-internal.h (PyMem_RawMalloc): Define for
9028         Python < 3.4.
9029         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
9030         PyMem_RawMalloc instead of PyMem_Malloc.
9031
9032 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
9033             Luis Machado  <lgustavo@codesourcery.com>
9034
9035         * NEWS (New commands): Mention flash-erase.
9036         (New MI commands): Mention target-flash-erase.
9037         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
9038         command.
9039         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
9040         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
9041         * target.c (flash_erase_command): New function.
9042         (initialize_targets): Add new flash-erase command.
9043         * target.h (flash_erase_command): New declaration.
9044
9045 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
9046
9047         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
9048         HAVE_SYS_PROCFS_H is defined.
9049
9050 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
9051
9052         * remote.c (struct cached_reg): Change data into a pointer.
9053         * (stop_reply_dtr): Free data pointers before deleting vector.
9054         (process_stop_reply): Likewise.
9055         (remote_parse_stop_reply): Allocate space for data
9056
9057 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
9058
9059         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
9060         MAX_REGISTER_SIZE.
9061         (amd64_pseudo_register_read_value): Likewise.
9062         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
9063         (store_register_using_P): Likewise.
9064         * regcache.c (regcache_xfer_part): Likewise.
9065
9066 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
9067
9068         Split real and pseudo registers.
9069         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
9070         (sparc32_pseudo_regnum): New enum.
9071         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
9072         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
9073         (SPARC32_CP0_REGISTERS): New macro.
9074         (sparc32_pseudo_register_name): New function.
9075         (sparc32_register_name): Use sparc32_pseudo_register_name.
9076         (sparc32_pseudo_register_type): New function.
9077         (sparc32_register_type): Use sparc32_pseudo_register_type.
9078         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
9079         pseudo register numbers.
9080         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
9081         (SPARC64_CP0_REGISTERS): New macro.
9082         (sparc64_pseudo_register_name): New function.
9083         (sparc64_register_name): Use sparc64_pseudo_register_name.
9084         (sparc64_pseudo_register_type): New function.
9085         (sparc64_register_type): Use sparc64_pseudo_register_type.
9086         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
9087         pseudo register numbers.
9088         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
9089         sparc64_store_arguments): Handle pseudo register numbers.
9090
9091 2017-01-13  Yao Qi  <yao.qi@linaro.org>
9092
9093         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
9094         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
9095         output.
9096         (getpkt_or_notif_sane_1): Likewise.
9097
9098 2017-01-13  Yao Qi  <yao.qi@linaro.org>
9099
9100         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
9101         of CC.  Pass "-x c++-header" instead of "-x c".
9102
9103 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9104
9105         * remote.c (remote_can_async_p): Update comment.
9106
9107 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9108
9109         * linux-nat.c (linux_nat_can_async_p): Update comment.
9110
9111 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9112
9113         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
9114
9115 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
9116
9117         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
9118
9119 2017-01-10  Tom Tromey  <tom@tromey.com>
9120
9121         * python/py-type.c (typy_legacy_template_argument): Update.
9122         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
9123         ~demangle_parse_info): Declare new members.
9124         (cp_demangled_name_to_comp): Return unique_ptr.
9125         (cp_demangled_name_parse_free)
9126         (make_cleanup_cp_demangled_name_parse_free)
9127         (cp_new_demangle_parse_info): Remove.
9128         * cp-support.c (do_demangled_name_parse_free_cleanup)
9129         (make_cleanup_cp_demangled_name_parse_free): Remove.
9130         (inspect_type, cp_canonicalize_string_full)
9131         (cp_canonicalize_string): Update.
9132         (mangled_name_to_comp): Change return type.
9133         (cp_class_name_from_physname, method_name_from_physname)
9134         (cp_func_name, cp_remove_params): Update.
9135         * cp-name-parser.y (demangle_parse_info): New constructor, from
9136         cp_new_demangle_parse_info.
9137         (~demangle_parse_info): New destructor, from
9138         cp_demangled_name_parse_free.
9139         (cp_merge_demangle_parse_infos): Update.
9140         (cp_demangled_name_to_comp): Change return type.
9141
9142 2017-01-10  Tom Tromey  <tom@tromey.com>
9143
9144         * top.c (prevent_dont_repeat): Change return type.
9145         * python/python.c (execute_gdb_command): Use std::string.
9146         Update.
9147         * guile/guile.c (gdbscm_execute_gdb_command): Update.
9148         * command.h (prevent_dont_repeat): Change return type.
9149         * breakpoint.c (bpstat_do_actions_1): Update.
9150
9151 2017-01-10  Tom Tromey  <tom@tromey.com>
9152
9153         * value.h (scoped_value_mark::~scoped_value_mark): Call
9154         free_to_mark.
9155         (scoped_value_mark::free_to_mark): New method.
9156         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
9157         scoped_value_mark.
9158
9159 2017-01-10  Tom Tromey  <tom@tromey.com>
9160
9161         * python/py-value.c (valpy_dereference, valpy_referenced_value)
9162         (valpy_reference_value, valpy_const_value, valpy_get_address)
9163         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
9164         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
9165         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
9166         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
9167         scoped_value_mark.
9168         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
9169         * value.h (scoped_value_mark): New class.
9170
9171 2017-01-10  Tom Tromey  <tom@tromey.com>
9172
9173         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
9174         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
9175         * psymtab.c (discard_psymtabs_upto): Remove.
9176         (make_cleanup_discard_psymtabs): Remove.
9177         (struct psymtab_state): Remove.
9178
9179 2017-01-10  Tom Tromey  <tom@tromey.com>
9180
9181         * record-full.c (record_full_save_cleanups): Remove.
9182         (record_full_save): Use gdb::unlinker.
9183         * gcore.c (do_bfd_delete_cleanup): Remove.
9184         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
9185         cleanups.
9186         * dwarf2read.c (unlink_if_set): Remove.
9187         (write_psymtabs_to_index): Use gdb::unlinker.
9188         * common/gdb_unlinker.h: New file.
9189
9190 2017-01-10  Tom Tromey  <tom@tromey.com>
9191
9192         * windows-tdep.c (windows_xfer_shared_library): Update.
9193         * windows-nat.c (windows_make_so): Update.
9194         * utils.h (make_cleanup_bfd_unref): Remove.
9195         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
9196         * symfile.h (symfile_bfd_open)
9197         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9198         * symfile.c (read_symbols, symbol_file_add)
9199         (separate_debug_file_exists): Update.
9200         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
9201         (generic_load, reread_symbols): Update.
9202         * symfile-mem.c (symbol_file_add_from_memory): Update.
9203         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
9204         (spu_symbol_file_add_from_memory): Update.
9205         * solist.h (struct target_so_ops) <bfd_open>: Return
9206         gdb_bfd_ref_ptr.
9207         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
9208         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
9209         gdb_bfd_ref_ptr.
9210         (solib_map_sections, reload_shared_libraries_1): Update.
9211         * solib-svr4.c (enable_break): Update.
9212         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
9213         * solib-frv.c (enable_break2): Update.
9214         * solib-dsbt.c (enable_break): Update.
9215         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
9216         gdb_bfd_ref_ptr.
9217         (darwin_solib_get_all_image_info_addr_at_init): Update.
9218         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
9219         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
9220         * record-full.c (record_full_save): Update.
9221         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
9222         * procfs.c (insert_dbx_link_bpt_in_file): Update.
9223         * minidebug.c (find_separate_debug_file_in_section): Return
9224         gdb_bfd_ref_ptr.
9225         * machoread.c (macho_add_oso_symfile): Change abfd to
9226         gdb_bfd_ref_ptr.
9227         (macho_symfile_read_all_oso): Update.
9228         (macho_check_dsym): Return gdb_bfd_ref_ptr.
9229         (macho_symfile_read): Update.
9230         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
9231         (jit_bfd_try_read_symtab): Update.
9232         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9233         (gdb_bfd_openw, gdb_bfd_openr_iovec)
9234         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9235         gdb_bfd_ref_ptr.
9236         (gdb_bfd_ref_policy): New struct.
9237         (gdb_bfd_ref_ptr): New typedef.
9238         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9239         (gdb_bfd_openw, gdb_bfd_openr_iovec)
9240         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9241         gdb_bfd_ref_ptr.
9242         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9243         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9244         (gcore_command): Update.
9245         * exec.c (exec_file_attach): Update.
9246         * elfread.c (elf_symfile_read): Update.
9247         * dwarf2read.c (dwarf2_get_dwz_file): Update.
9248         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
9249         (open_and_init_dwo_file): Update.
9250         (open_dwp_file): Return gdb_bfd_ref_ptr.
9251         (open_and_init_dwp_file): Update.
9252         * corelow.c (core_open): Update.
9253         * compile/compile-object-load.c (compile_object_load): Update.
9254         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
9255         * coffread.c (coff_symfile_read): Update.
9256         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
9257         gdb_bfd_ref_ptr.  Rename.
9258         (dump_bfd_file, restore_command): Update.
9259         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9260         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9261         (find_separate_debug_file_by_buildid): Update.
9262
9263 2017-01-10  Tom Tromey  <tom@tromey.com>
9264
9265         * common/gdb_ref_ptr.h: New file.
9266         * python/py-ref.h (struct gdbpy_ref_policy): New.
9267         (gdbpy_ref): Now a typedef.
9268
9269 2017-01-10  Tom Tromey  <tom@tromey.com>
9270
9271         * utils.h (make_cleanup_htab_delete): Don't declare.
9272         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
9273         Remove.
9274         * linespec.c (decode_compound_collector): Add constructor,
9275         destructor.
9276         (lookup_prefix_sym): Remove cleanup.
9277         (symtab_collector): Add constructor, destructor.
9278         (collect_symtabs_from_filename): Remove cleanup.
9279         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
9280         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
9281         Use htab_up.
9282         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
9283         * dwarf2read.c (dw2_expand_symtabs_matching)
9284         (dw2_map_symbol_filenames, dwarf_decode_macros)
9285         (write_psymtabs_to_index): Use htab_up.
9286         * dwarf2loc.c (func_verify_no_selftailcall)
9287         (call_site_find_chain_1, func_verify_no_selftailcall)
9288         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
9289         std::vector, gdb::unique_xmalloc_ptr.
9290         (call_sitep): Remove typedef.
9291         (dwarf2_locexpr_baton_eval): Remove unused variable.
9292
9293 2017-01-10  Tom Tromey  <tom@tromey.com>
9294
9295         * python/python-internal.h (make_cleanup_py_decref)
9296         (make_cleanup_py_xdecref): Don't declare.
9297         * python/py-utils.c (py_decref, make_cleanup_py_decref)
9298         (py_xdecref, make_cleanup_py_xdecref): Remove.
9299
9300 2017-01-10  Tom Tromey  <tom@tromey.com>
9301
9302         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
9303         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
9304
9305 2017-01-10  Tom Tromey  <tom@tromey.com>
9306
9307         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
9308
9309 2017-01-10  Tom Tromey  <tom@tromey.com>
9310
9311         * python/py-utils.c (unicode_to_encoded_string)
9312         (python_string_to_target_string)
9313         (python_string_to_target_python_string)
9314         (python_string_to_host_string, gdbpy_obj_to_string)
9315         (get_addr_from_python): Use gdbpy_ref.
9316
9317 2017-01-10  Tom Tromey  <tom@tromey.com>
9318
9319         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
9320         gdbpy_ref.
9321
9322 2017-01-10  Tom Tromey  <tom@tromey.com>
9323
9324         * python/python.c (eval_python_command, gdbpy_decode_line)
9325         (gdbpy_run_events, gdbpy_start_type_printers)
9326         (gdbpy_apply_type_printers): Use gdbpy_ref.
9327
9328 2017-01-10  Tom Tromey  <tom@tromey.com>
9329
9330         * python/py-param.c (get_doc_string, compute_enum_values): Use
9331         gdbpy_ref.
9332
9333 2017-01-10  Tom Tromey  <tom@tromey.com>
9334
9335         * python/py-inferior.c (find_thread_object, build_inferior_list):
9336         Use gdbpy_ref.
9337
9338 2017-01-10  Tom Tromey  <tom@tromey.com>
9339
9340         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9341
9342 2017-01-10  Tom Tromey  <tom@tromey.com>
9343
9344         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
9345         gdbpy_ref.
9346
9347 2017-01-10  Tom Tromey  <tom@tromey.com>
9348
9349         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
9350         extra incref.
9351         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
9352         Use gdbpy_ref.
9353
9354 2017-01-10  Tom Tromey  <tom@tromey.com>
9355
9356         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9357         gdbpy_ref.
9358
9359 2017-01-10  Tom Tromey  <tom@tromey.com>
9360
9361         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
9362         decref results of PyArg_ParseTupleAndKeywords.
9363
9364 2017-01-10  Tom Tromey  <tom@tromey.com>
9365
9366         * python/python.c (python_run_simple_file): Use
9367         unique_xmalloc_ptr, gdbpy_ref.
9368
9369 2017-01-10  Tom Tromey  <tom@tromey.com>
9370
9371         * python/py-prettyprint.c (print_stack_unless_memory_error)
9372         (print_string_repr, print_children): Use gdbpy_ref.
9373         (dummy_python_frame): New class.
9374         (dummy_python_frame::dummy_python_frame): Rename from
9375         push_dummy_python_frame.
9376         (py_restore_tstate): Remove.
9377
9378 2017-01-10  Tom Tromey  <tom@tromey.com>
9379
9380         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9381
9382 2017-01-10  Tom Tromey  <tom@tromey.com>
9383
9384         * python/python.c (ensure_python_env, restore_python_env):
9385         Remove.
9386         * python/python-internal.h (ensure_python_env): Don't declare.
9387         * varobj.h (varobj_ensure_python_env): Don't declare.
9388         * varobj.c (varobj_ensure_python_env): Remove.
9389
9390 2017-01-10  Tom Tromey  <tom@tromey.com>
9391
9392         * varobj.c (varobj_value_get_print_value): Use
9393         gdbpy_enter_varobj.
9394
9395 2017-01-10  Tom Tromey  <tom@tromey.com>
9396
9397         * python/py-prettyprint.c (print_string_repr, print_children):
9398         Update.
9399         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
9400         of "encoding".
9401         * varobj.c (varobj_value_get_print_value): Update.
9402         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
9403
9404 2017-01-10  Tom Tromey  <tom@tromey.com>
9405
9406         * varobj.c (varobj_get_display_hint)
9407         (dynamic_varobj_has_child_method, install_new_value_visualizer)
9408         (varobj_set_visualizer, free_variable): Use
9409         gdbpy_enter_varobj.
9410
9411 2017-01-10  Tom Tromey  <tom@tromey.com>
9412
9413         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
9414         (do_finish_initialization): New function.  Use gdbpy_ref.
9415         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
9416         do_finish_initialization.
9417
9418 2017-01-10  Tom Tromey  <tom@tromey.com>
9419
9420         * python/py-param.c (get_set_value, get_show_value): Use
9421         gdbpy_enter, gdbpy_ref.
9422
9423 2017-01-10  Tom Tromey  <tom@tromey.com>
9424
9425         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
9426
9427 2017-01-10  Tom Tromey  <tom@tromey.com>
9428
9429         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
9430
9431 2017-01-10  Tom Tromey  <tom@tromey.com>
9432
9433         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
9434         Use gdbpy_enter_varobj.
9435
9436 2017-01-10  Tom Tromey  <tom@tromey.com>
9437
9438         * varobj.c (gdbpy_enter_varobj): New constructor.
9439         * python/python-internal.h (gdbpy_enter_varobj): New class.
9440         * python/py-varobj.c (py_varobj_get_iterator): Use
9441         gdbpy_enter_varobj.
9442
9443 2017-01-10  Tom Tromey  <tom@tromey.com>
9444
9445         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
9446         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9447         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
9448         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
9449         unique_xmalloc_ptr.
9450         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
9451
9452 2017-01-10  Tom Tromey  <tom@tromey.com>
9453
9454         * python/py-xmethods.c (invoke_match_method): Use
9455         gdbpy_ref.
9456
9457 2017-01-10  Tom Tromey  <tom@tromey.com>
9458
9459         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
9460         gdbpy_enter, gdbpy_ref.
9461
9462 2017-01-10  Tom Tromey  <tom@tromey.com>
9463
9464         * python/python.c (python_interactive_command): Use gdbpy_enter.
9465
9466 2017-01-10  Tom Tromey  <tom@tromey.com>
9467
9468         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
9469         gdbpy_ref.
9470
9471 2017-01-10  Tom Tromey  <tom@tromey.com>
9472
9473         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
9474         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9475
9476 2017-01-10  Tom Tromey  <tom@tromey.com>
9477
9478         * utils.h (htab_deleter): New struct.
9479         (htab_up): New typedef.
9480         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
9481         gdbpy_enter, gdbpy_ref, htab_up.
9482
9483 2017-01-10  Tom Tromey  <tom@tromey.com>
9484
9485         * python/py-unwind.c (pending_frame_invalidate): Remove.
9486         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
9487
9488 2017-01-10  Tom Tromey  <tom@tromey.com>
9489
9490         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
9491         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
9492
9493 2017-01-10  Tom Tromey  <tom@tromey.com>
9494
9495         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
9496
9497 2017-01-10  Tom Tromey  <tom@tromey.com>
9498
9499         * python/python.c (gdbpy_eval_from_control_command)
9500         (gdbpy_source_script, gdbpy_run_events)
9501         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
9502         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
9503         gdbpy_enter.
9504
9505 2017-01-10  Tom Tromey  <tom@tromey.com>
9506
9507         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
9508
9509 2017-01-10  Tom Tromey  <tom@tromey.com>
9510
9511         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
9512
9513 2017-01-10  Tom Tromey  <tom@tromey.com>
9514
9515         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
9516         (python_on_inferior_call_pre, python_on_inferior_call_post)
9517         (python_on_memory_change, python_on_register_change)
9518         (python_inferior_exit, python_new_objfile, add_thread_object)
9519         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
9520
9521 2017-01-10  Tom Tromey  <tom@tromey.com>
9522
9523         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
9524         (bpfinishpy_handle_exit): Use gdbpy_enter.
9525
9526 2017-01-10  Tom Tromey  <tom@tromey.com>
9527
9528         * python/py-cmd.c (cmdpy_destroyer)
9529         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
9530         gdbpy_enter.
9531
9532 2017-01-10  Tom Tromey  <tom@tromey.com>
9533
9534         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9535         gdbpy_enter.
9536         (gdbpy_breakpoint_has_cond): Likewise.
9537
9538 2017-01-10  Tom Tromey  <tom@tromey.com>
9539
9540         * python/python.c (gdbpy_enter): New constructor.
9541         (~gdbpy_enter): New destructor.
9542         (restore_python_env, ensure_python_env): Rewrite.
9543         * python/python-internal.h (gdbpy_enter): New class.
9544
9545 2017-01-10  Tom Tromey  <tom@tromey.com>
9546
9547         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
9548
9549 2017-01-10  Tom Tromey  <tom@tromey.com>
9550
9551         * python/py-value.c (value_has_field, get_field_flag)
9552         (get_field_type, valpy_getitem, convert_value_from_python): Use
9553         gdbpy_ref.
9554
9555 2017-01-10  Tom Tromey  <tom@tromey.com>
9556
9557         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
9558         gdbpy_ref.
9559
9560 2017-01-10  Tom Tromey  <tom@tromey.com>
9561
9562         * python/py-prettyprint.c (search_pp_list)
9563         (find_pretty_printer_from_objfiles)
9564         (find_pretty_printer_from_progspace)
9565         (find_pretty_printer_from_gdb, find_pretty_printer)
9566         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
9567         gdbpy_ref.
9568
9569 2017-01-10  Tom Tromey  <tom@tromey.com>
9570
9571         * python/py-param.c (call_doc_function): Use gdbpy_ref.
9572
9573 2017-01-10  Tom Tromey  <tom@tromey.com>
9574
9575         * python/py-linetable.c (build_line_table_tuple_from_pcs)
9576         (ltpy_get_all_source_lines): Use gdbpy_ref.
9577
9578 2017-01-10  Tom Tromey  <tom@tromey.com>
9579
9580         * python/py-framefilter.c (extract_sym, extract_value)
9581         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
9582         gdbpy_ref.
9583
9584 2017-01-10  Tom Tromey  <tom@tromey.com>
9585
9586         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
9587
9588 2017-01-10  Tom Tromey  <tom@tromey.com>
9589
9590         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9591
9592 2017-01-10  Tom Tromey  <tom@tromey.com>
9593
9594         * python/py-function.c (convert_values_to_python, fnpy_init): Use
9595         gdbpy_ref.
9596
9597 2017-01-10  Tom Tromey  <tom@tromey.com>
9598
9599         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9600
9601 2017-01-10  Tom Tromey  <tom@tromey.com>
9602
9603         * python/py-type.c (convert_field, make_fielditem, typy_fields)
9604         (typy_range): Use gdbpy_ref.
9605
9606 2017-01-10  Tom Tromey  <tom@tromey.com>
9607
9608         * python/py-threadevent.c (create_thread_event_object): Use
9609         gdbpy_ref.
9610         * python/py-stopevent.c (create_stop_event_object): Simplify.
9611         (emit_stop_event): Use gdbpy_ref.
9612         * python/py-signalevent.c (create_signal_event_object): Use
9613         gdbpy_ref.
9614         * python/py-newobjfileevent.c (create_new_objfile_event_object)
9615         (emit_new_objfile_event, create_clear_objfiles_event_object)
9616         (emit_clear_objfiles_event): Use gdbpy_ref.
9617         * python/py-infevents.c (create_inferior_call_event_object)
9618         (create_register_changed_event_object)
9619         (create_memory_changed_event_object, emit_inferior_call_event)
9620         (emit_memory_changed_event, emit_register_changed_event): Use
9621         gdbpy_ref.
9622         * python/py-exitedevent.c (create_exited_event_object)
9623         (emit_exited_event): Use gdbpy_ref.
9624         * python/py-event.h (evpy_emit_event): Remove
9625         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9626         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9627         * python/py-continueevent.c (emit_continue_event): Use
9628         gdbpy_ref.
9629         * python/py-breakpoint.c (gdbpy_breakpoint_created)
9630         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9631         gdbpy_ref.
9632         * python/py-bpevent.c (create_breakpoint_event_object): Use
9633         gdbpy_ref.
9634
9635 2017-01-10  Tom Tromey  <tom@tromey.com>
9636
9637         * python/py-ref.h: New file.
9638
9639 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
9640
9641         * cli-out.c (cli_ui_out::do_redirect): Change return type to
9642         void.
9643         * cli-out.h (cli_ui_out::do_redirect): Likewise.
9644         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9645         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9646         * ui-out.c (ui_out::redirect): Likewise.
9647         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9648         * cli/cli-logging.c (set_logging_redirect): Update call site of
9649         ui_out::redirect.
9650         (handle_redirections): Likewise.
9651         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9652         * top.c (execute_command_to_string): Likewise.
9653         * utils.c (do_ui_out_redirect_pop): Likewise.
9654
9655 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
9656
9657         * stack.c (_initialize_stack): Update "frame" command help message.
9658
9659 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
9660
9661         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9662
9663 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9664
9665         * x86-linux-nat.h: Include gdb_proc_service.h.
9666
9667 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9668
9669         * ser-base.h: Include serial.h.
9670
9671 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9672
9673         * ppc-linux-tdep.h: Include ppc-tdep.h.
9674
9675 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9676
9677         * nat/amd64-linux-siginfo.h: Include signal.h.
9678
9679 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9680
9681         * nat/aarch64-linux-hw-point.h: Include break-common.h.
9682
9683 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9684
9685         * mi/mi-parse.h: Include mi-cmds.h.
9686
9687 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9688
9689         * inf-loop.c: Don't include "target.h".
9690         * inf-loop.h: Include it here.
9691
9692 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9693
9694         * dfp.h: Include "dboulest.h" and "expression.h".
9695
9696 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9697
9698         * ax-gdb.h: Include "ax.h".
9699
9700 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9701
9702         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9703         with nat/gdb_ptrace.h.
9704
9705 2017-01-05  Yao Qi  <yao.qi@linaro.org>
9706
9707         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9708         new line.
9709         (mips64_fbsd_sigframe_init): Likewise.
9710
9711 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9712
9713         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9714         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9715
9716 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9717
9718         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9719         * NEWS: Mention new FreeBSD/mips native configuration.
9720         * config/mips/fbsd.mh: New file.
9721         * configure.host: Add mips*-*-freebsd*.
9722         * mips-fbsd-nat.c: New file.
9723
9724 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9725
9726         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9727         (ALLDEPFILES): Add mips-fbsd-tdep.c.
9728         * NEWS: Mention new FreeBSD/mips target.
9729         * configure.tgt: Add mips*-*-freebsd*.
9730         * mips-fbsd-tdep.c: New file.
9731         * mips-fbsd-tdep.h: New file.
9732
9733 2017-01-04  Yao Qi  <yao.qi@linaro.org>
9734
9735         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9736         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9737
9738 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
9739
9740         Update copyright year range in all GDB files.
9741
9742 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
9743
9744         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
9745
9746 For older changes see ChangeLog-2016.
9747 \f
9748 Local Variables:
9749 mode: change-log
9750 left-margin: 8
9751 fill-column: 74
9752 version-control: never
9753 coding: utf-8
9754 End: