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