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