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