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