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