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