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