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