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