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