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