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