Avoid segfault on invalid directory table
[external/binutils.git] / gdb / ChangeLog
1 2017-03-24  Pádraig Brady  <pbrady@fb.com>
2
3         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
4         reference beyond the 'lh->include_dirs' array before accessing to
5         it.
6         (psymtab_include_file_name): Likewise.
7         (dwarf_decode_lines_1): Likewise.
8         (dwarf_decode_lines): Likewise.
9         (file_file_name): Likewise.
10
11 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
12
13         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14         inferior_ptid.
15         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
16         ps_lsetfpregs): Likewise.
17         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
18         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
19         ps_lsetfpregs): Likewise.
20         * target.c (target_fetch_registers, target_store_registers):
21         Remove asserts.
22
23 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
24
25         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
26
27 2017-03-23  Yao Qi  <yao.qi@linaro.org>
28
29         * aarch64-tdep.c (aarch64_process_record_test): Declare.
30         (_initialize_aarch64_tdep): Register it.
31         (aarch64_record_load_store): Handle PRFM instruction.
32         (aarch64_process_record_test): New function.
33
34 2017-03-23  Yao Qi  <yao.qi@linaro.org>
35
36         * aarch64-tdep.c (aarch64_record_load_store): Fix code
37         indentation.
38
39 2017-03-23  Yao Qi  <yao.qi@linaro.org>
40
41         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
42
43 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
44
45         python/python.c (do_start_initialization): Fix memory leak.
46
47 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
48
49         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
50         using get_ptrace_pid.
51         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
52         inferior_ptid.
53         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
54         inferior_ptid instead of pid.
55
56 2017-03-22  Yao Qi  <yao.qi@linaro.org>
57
58         * aarch64-tdep.c: Wrap locally used classes in anonymous
59         namespace.
60         * arm-tdep.c: Likewise.
61         * linespec.c: Likewise.
62         * ui-out.c: Likewise.
63
64 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
65
66         PR gdb/19637
67         * python/lib/gdb/printer/bound_registers.py: Import sys.
68
69 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
70
71         * windows-nat.c (do_windows_fetch_inferior_registers): Add
72         windows_thread_info parameter and use it instead of
73         current_thread.
74         (windows_fetch_inferior_registers): Don't set current_thread,
75         pass the thread to do_windows_fetch_inferior_registers.  Use
76         ptid from regcache instead of inferior_ptid.
77         (do_windows_store_inferior_registers): Add windows_thread_info
78         parameter and use it instead of current_thread.
79         (windows_store_inferior_registers): Don't set current_thread,
80         pass the thread to do_windows_store_inferior_registers.  Use
81         ptid from regcache instead of inferior_ptid.
82
83 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
84
85         * ser-mingw.c (ser_windows_raw): Remove reference to
86         struct serial::current_timeout.
87
88 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
89
90         PR tdep/20928
91         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
92         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
93         (sparc64_fsr_type): Fix %fsr decoding.
94
95 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
96
97         * python/py-record-btrace.c (btpy_insn_data): Change return type
98         for Python 2.
99
100 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
101
102         * spu-linux-nat.c (spu_fetch_inferior_registers,
103         spu_store_inferior_registers): Use ptid from regcache, set and
104         restore inferior_ptid.
105         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
106         Likewise.
107
108 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
109
110         * i386-linux-nat.c (fetch_register, store_register,
111         i386_linux_fetch_inferior_registers,
112         i386_linux_store_inferior_registers): Use ptid from regcache.
113         * ia64-linux-nat.c (ia64_linux_fetch_register,
114         ia64_linux_store_register): Likewise.
115         * inf-ptrace.c (inf_ptrace_fetch_register,
116         inf_ptrace_store_register): Likewise.
117         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
118         m32r_linux_store_inferior_registers): Likewise.
119         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
120         m68kbsd_store_inferior_registers): Likewise.
121         * m68k-linux-nat.c (fetch_register, store_register,
122         m68k_linux_fetch_inferior_registers,
123         m68k_linux_store_inferior_registers): Likewise.
124         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
125         m88kbsd_store_inferior_registers): Likewise.
126         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
127         mips_fbsd_store_inferior_registers): Likewise.
128         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
129         mips64_linux_regsets_store_registers): Likewise.
130         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
131         mipsnbsd_store_inferior_registers): Likewise.
132         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
133         mips64obsd_store_inferior_registers): Likewise.
134         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
135         Likewise.
136         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
137         ppcfbsd_store_inferior_registers): Likewise.
138         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
139         ppc_linux_store_inferior_registers): Likewise.
140         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
141         ppcnbsd_store_inferior_registers): Likewise.
142         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
143         ppcobsd_store_registers): Likewise.
144         * procfs.c (procfs_fetch_registers, procfs_store_registers):
145         Likewise.
146         * ravenscar-thread.c (ravenscar_fetch_registers,
147         ravenscar_store_registers, ravenscar_prepare_to_store):
148         Likewise.
149         * record-btrace.c (record_btrace_fetch_registers,
150         record_btrace_store_registers, record_btrace_prepare_to_store):
151         Likewise.
152         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
153         Lookup inferior using ptid from regcache, instead of
154         current_inferior.
155         * remote.c (remote_fetch_registers, remote_store_registers): Use
156         ptid from regcache.
157         * rs6000-nat.c (fetch_register, store_register): Likewise.
158         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
159         s390_linux_store_inferior_registers): Likewise.
160         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
161         shnbsd_store_inferior_registers): Likewise.
162         * sol-thread.c (sol_thread_fetch_registers,
163         sol_thread_store_registers): Likewise.
164         * sparc-nat.c (sparc_fetch_inferior_registers,
165         sparc_store_inferior_registers): Likewise.
166         * tilegx-linux-nat.c (fetch_inferior_registers,
167         store_inferior_registers): Likewise.
168         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
169         vaxbsd_store_inferior_registers): Likewise.
170         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
171         store_xtregs): Likewise.
172
173 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
174
175         PR gdb/14441
176         * NEWS: Mention support for rvalue references in GDB and python.
177         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
178         supports both lvalue and rvalue references.
179
180 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
181
182         PR gdb/14441
183         * gdbtypes.c (rank_one_type): Implement overloading
184         resolution rules regarding rvalue references.
185
186 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
187
188         PR gdb/14441
189         * aarch64-tdep.c (aarch64_type_align)
190         (aarch64_extract_return_value, aarch64_store_return_value): Change
191         lvalue reference type checks to general reference type checks.
192         * amd64-tdep.c (amd64_classify): Likewise.
193         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
194         Likewise.
195         * arm-tdep.c (arm_type_align, arm_extract_return_value)
196         (arm_store_return_value): Likewise.
197         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
198         * c-typeprint.c (c_print_type): Likewise.
199         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
200         (cplus_number_of_children, cplus_describe_child): Likewise.
201         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
202         * completer.c (expression_completer): Likewise.
203         * cp-support.c (make_symbol_overload_list_adl_namespace):
204         Likewise.
205         * darwin-nat-info.c (info_mach_region_command): Likewise.
206         * dwarf2loc.c (entry_data_value_coerce_ref)
207         (value_of_dwarf_reg_entry): Likewise.
208         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
209         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
210         Likewise.
211         * findvar.c (extract_typed_address, store_typed_address):
212         Likewise.
213         * gdbtypes.c (rank_one_type): Likewise.
214         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
215         * infcall.c (value_arg_coerce): Likewise.
216         * language.c (pointer_type): Likewise.
217         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
218         Likewise.
219         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
220         * mn10300-tdep.c (mn10300_type_align): Likewise.
221         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
222         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
223         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
224         Likewise.
225         * printcmd.c (print_formatted, x_command): Likewise.
226         * python/py-type.c (typy_get_composite, typy_template_argument):
227         Likewise.
228         * python/py-value.c (valpy_referenced_value)
229         (valpy_get_dynamic_type, value_has_field): Likewise.
230         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
231         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
232         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
233         * spu-tdep.c (spu_scalar_value_p): Likewise.
234         * symtab.c (lookup_symbol_aux): Likewise.
235         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
236         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
237         Likewise.
238         * valops.c (value_cast_pointers, value_cast)
239         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
240         (value_struct_elt, value_struct_elt_bitpos)
241         (value_find_oload_method_list, find_overload_match)
242         (value_rtti_indirect_type): Likewise.
243         * valprint.c (val_print_scalar_type_p, generic_val_print):
244         Likewise.
245         * value.c (value_actual_type, value_as_address, unpack_long)
246         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
247         (coerce_ref): Likewise.
248         * varobj.c (varobj_get_value_type): Likewise.
249
250 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
251
252         PR gdb/14441
253         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
254         table of constants.
255         * python/lib/gdb/command/explore.py: Support exploring values
256         of rvalue reference types.
257         * python/lib/gdb/types.py: Implement get_basic_type() for
258         rvalue reference types.
259         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
260         constant.
261         * python/py-value.c (valpy_getitem): Add an rvalue reference
262         check.
263         (valpy_reference_value): Add new parameter "refcode".
264         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
265         New wrappers for valpy_reference_value().
266         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
267         (gdbpy_invoke_xmethod): Likewise.
268
269 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
270
271         PR gdb/14441
272         * dwarf2read.c (process_die, read_type_die_1): Handle the
273         DW_TAG_rvalue_reference_type DIE.
274         (read_tag_reference_type): Add new parameter "refcode".
275
276 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
277
278         PR gdb/14441
279         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
280         (c_type_print_modifier, c_type_print_varspec_suffix)
281         (c_type_print_base): Support printing rvalue reference types.
282         * c-valprint.c (c_val_print, c_value_print): Support printing
283         rvalue reference values.
284
285 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
286
287         PR gdb/14441
288         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
289         typename.
290         * cp-support.c (replace_typedefs): Handle
291         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
292         * python/py-type.c (typy_lookup_type): Likewise.
293
294 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
295
296         PR gdb/14441
297         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
298         * parse.c (insert_type): Change assert statement.
299         (follow_types): Handle rvalue reference types.
300         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
301         constant.
302
303 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
304
305         PR gdb/14441
306         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
307         value_ref() interface.
308         * c-valprint.c (c_value_print): Likewise.
309         * infcall.c (value_arg_coerce): Likewise.
310         * python/py-value.c (valpy_reference_value): Likewise.
311         * valops.c (value_cast, value_reinterpret_cast)
312         (value_dynamic_cast, typecmp): Likewise.
313         (value_ref): Parameterize by kind of return value reference type.
314         * value.h (value_ref): Add new parameter "refcode".
315
316 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
317
318         PR gdb/14441
319         * dwarf2read.c (read_tag_reference_type): Use
320         lookup_lvalue_reference_type() instead of lookup_reference_type().
321         * eval.c (evaluate_subexp_standard): Likewise.
322         * f-exp.y: Likewise.
323         * gdbtypes.c (make_reference_type, lookup_reference_type):
324         Generalize with rvalue reference types.
325         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
326         convenience wrappers for lookup_reference_type().
327         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
328         reference kind parameter.
329         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
330         wrappers for lookup_reference_type().
331         * guile/scm-type.c (gdbscm_type_reference): Use
332         lookup_lvalue_reference_type() instead of lookup_reference_type().
333         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
334         * parse.c (follow_types): Likewise.
335         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
336         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
337         Likewise.
338         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
339         (gdbpy_invoke_xmethod): Likewise.
340         * stabsread.c: Provide extra argument to make_reference_type()
341         call.
342         * valops.c (value_ref, value_rtti_indirect_type): Use
343         lookup_lvalue_reference_type() instead of lookup_reference_type().
344
345 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
346
347         PR gdb/14441
348         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
349         (TYPE_IS_REFERENCE): New macro.
350         (struct type): Add rvalue_reference_type field.
351         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
352
353 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
354
355         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
356         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
357         New function definition.
358         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
359         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
360         New function declaration.
361         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
362         * mi/mi-interp.h: New file.
363         * solib.c (info_sharedlibrary_command): Replace for loop with
364         ALL_SO_LIBS macro
365         * solib.h (update_solib_list): New function declaration.
366         (so_list_head): Move macro.
367         * solist.h (ALL_SO_LIBS): New macro.
368
369 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
370
371         * infcmd.c (post_create_inferior): Remove unused argument in
372         call to solib_add.
373         * remote.c (remote_start_remote): Likewise.
374         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
375         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
376         (enable_break): Likewise.
377         * solib.c (update_solib_list): Remove unused target argument
378         and its documentation.
379         (solib_add): Remove unused target argument.  Remove unused
380         argument in call to update_solib_list.
381         (info_sharedlibrary_command): Remove unused argument in call
382         to update_solib_list.
383         (sharedlibrary_command): Remove unused argument in call to
384         solib_add.
385         (handle_solib_event): Likewise.
386         (reload_shared_libraries): Likewise.
387         * solib.h (solib_add): Remove unused target argument.
388
389 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
390
391         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
392         (s390_displaced_step_fixup): Cover relative branches with the
393         default fixup handling.  This fixes lack of support for some
394         relative branch instructions.
395
396 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
397
398         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
399         ptid from regcache.
400
401 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
402
403         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
404         i386_darwin_store_inferior_registers): Use ptid from regcache.
405
406 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
407
408         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
409         i386bsd_store_inferior_registers): Use ptid from regcache.
410
411 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
412
413         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
414         hppaobsd_store_registers): Use ptid from regcache.
415
416 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
417
418         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
419         hppanbsd_store_registers): Use ptid from regcache.
420
421 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
422
423         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
424         from regcache.  Use get_ptrace_pid.
425
426 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
427
428         * corelow.c (get_core_register_section): Use ptid from regcache,
429         update doc.
430
431 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
432
433         * bsd-uthread.c (bsd_uthread_fetch_registers,
434         bsd_uthread_store_registers): Use ptid from regcache, set and
435         restore inferior_ptid.
436
437 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
438
439         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
440         fetch_fp_regs, store_register, store_regs, store_fp_register,
441         store_fp_regs): Use ptid from regcache.
442
443 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
444
445         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
446         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
447         store_vfp_regs): Use ptid from regcache.
448
449 2017-03-17  Pedro Alves  <palves@redhat.com>
450
451         PR remote/21188
452         * ser-base.c (ser_base_wait_for): Add comment.
453         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
454         version.
455         * ser-unix.c (hardwire_raw): Remove reference to
456         scb->current_timeout.
457         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
458         (hardwire_ops): Install ser_base_readchar instead of
459         hardwire_readchar.
460         * serial.h (struct serial) <current_timeout, timeout_remaining>:
461         Remove fields.
462
463 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
464
465         PR gdb/19637
466         * python/lib/gdb/printer/bound_registers.py: Add support for
467         Python 3.
468
469 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
470
471         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
472         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
473         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
474         byte_offset to subobj_byte_offset.  Fix the handling of
475         DWARF_VALUE_STACK on big-endian targets when coming via an
476         implicit pointer.
477         (dwarf2_evaluate_loc_desc): Adjust call to
478         dwarf2_evaluate_loc_desc_full.
479         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
480         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
481
482 2017-03-16  Yao Qi  <yao.qi@linaro.org>
483
484         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
485         and REVSH instructions.
486
487 2017-03-16  Yao Qi  <yao.qi@linaro.org>
488
489         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
490         (arm_record_test): Declare.
491         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
492         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
493         align with the manual.
494         (thumb_record_misc): Adjust the code order to align with the
495         manual.
496         (thumb2_record_decode_insn_handler): Fix instruction matching.
497         (instruction_reader_thumb): New class.
498         (arm_record_test): New function.
499
500 2017-03-16  Yao Qi  <yao.qi@linaro.org>
501
502         * arm-tdep.c (abstract_memory_reader): New class.
503         (instruction_reader): New class.
504         (extract_arm_insn): Add argument 'reader'.  Callers updated.
505         (decode_insn): Likewise.
506
507 2017-03-16  Doug Evans  <dje@google.com>
508
509         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
510         member.  Change type of TYPE member to SCM.  All uses updated.
511         (lsscm_make_lazy_string_smob): Add assert.
512         (lsscm_make_lazy_string): Flag bad length values.
513         (lsscm_elt_type): New function.
514         (gdbscm_lazy_string_to_value): Rewrite to use
515         lsscm_safe_lazy_string_to_value.
516         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
517         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
518         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
519         in incoming type.
520         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
521         * guile/scm-type.c (tyscm_scm_to_type): New function.
522
523 2017-03-15  Doug Evans  <dje@google.com>
524
525         PR python/17728, python/18439, python/18779
526         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
527         member.  Change type of TYPE member to PyObject *.  All uses updated.
528         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
529         (gdbpy_create_lazy_string_object): Flag bad length values.
530         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
531         Handle typedefs in incoming type.
532         (stpy_lazy_string_elt_type): New function.
533         (gdbpy_extract_lazy_string): Call it.
534         * python/py-value.c (valpy_lazy_string): Flag bad length values.
535         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
536         typedefs in incoming type.
537
538 2017-03-16  Doug Evans  <dje@google.com>
539
540         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
541         * guile/scm-type.c (tyscm_scm_to_type): New function.
542
543 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
544
545         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
546         "ULONGEST" for "skip".
547
548 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
549
550         PR gdb/21220
551         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
552         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
553         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
554         over ptrace peek/poke until end of buffer or error.
555
556 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
557
558         * parse.c (length_of_subexp): Make static.
559         * parser-defs.h (length_of_subexp): Remove.
560
561 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
562
563         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
564         as well.
565
566 2017-03-14  Pedro Alves  <palves@redhat.com>
567
568         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
569         (main): Use std::unique_ptr.  Remove calls to
570         cp_demangled_name_parse_free.
571
572 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
573
574         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
575         alphabsd_store_inferior_registers): Use regcache->ptid instead
576         of inferior_ptid.
577
578 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
579
580         * aix-thread.c (aix_thread_fetch_registers,
581         aix_thread_store_registers): Use regcache->ptid instead of
582         inferior_ptid.
583
584 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
585
586         * aarch64-linux-nat.c (fetch_gregs_from_thread,
587         store_gregs_to_thread, fetch_fpregs_from_thread,
588         store_fpregs_to_thread): Use regcache->ptid instead of
589         inferior_ptid.
590
591 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
592
593         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
594         amd64_linux_fetch_inferior_registers): Use regcache->ptid
595         instead of inferior_ptid.
596
597 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
598
599         * target.c (target_fetch_registers, target_store_registers): Add
600         assert.
601
602 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
603
604         * regcache.h (regcache_get_ptid): New function.
605         * regcache.c (regcache_get_ptid): New function.
606
607 2017-03-13  Mark Wielaard  <mark@klomp.org>
608
609         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
610
611 2017-03-10  Keith Seitz  <keiths@redhat.com>
612
613         PR c++/8218
614         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
615
616 2017-03-08  Pedro Alves  <palves@redhat.com>
617
618         PR gdb/18360
619         * infrun.c (start_step_over, do_target_resume, resume)
620         (restart_threads): Assert we're not resuming a thread that is
621         meant to be stopped.
622         (infrun_thread_stop_requested_callback): Delete.
623         (infrun_thread_stop_requested): If the thread is internally
624         stopped, queue a pending stop event and clear the thread's
625         inline-frame state.
626         (handle_stop_requested): New function.
627         (handle_syscall_event, handle_inferior_event_1): Use
628         handle_stop_requested.
629         (handle_stop_requested): New function.
630         (handle_signal_stop): Set the thread's stop_signal here instead of
631         at caller.
632         (finish_step_over): Clear step over info unconditionally.
633         (handle_signal_stop): If the user had interrupted the event
634         thread, consider the stop a random signal.
635         (handle_signal_stop) <signal arrived while stepping over
636         breakpoint>: Don't restart threads here.
637         (stop_waiting): Don't clear step-over info here.
638
639 2017-03-08  Pedro Alves  <palves@redhat.com>
640
641         PR 21206
642         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
643         goes to argument 2, not 1.
644
645 2017-03-08  Pedro Alves  <palves@redhat.com>
646
647         PR cli/21218
648         * top.c (gdb_readline_wrapper): Avoid passing NULL to
649         display_gdb_prompt.
650         (command_line_input): Add comment.
651
652 2017-03-08  Pedro Alves  <palves@redhat.com>
653
654         PR tui/21216
655         * tui/tui-file.c (tui_file::write): New.
656         * tui/tui-file.h (tui_file): Override "write".
657         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
658         factored out from ...
659         (tui_puts): ... here.
660         (tui_putc): Use them.
661         (tui_write): New function.
662         * tui/tui-io.h (tui_write): Declare.
663
664 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
665
666         * Makefile.in (SFILES): Replace "environ.c" with
667         "common/environ.c".
668         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
669         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
670         to...
671         * common/environ.c: ... here.
672         * environ.h: Moved to...
673         * common/environ.h: ... here.
674
675 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
676
677         * gdbarch.sh (pstring_ptr): New static function.
678         (gdbarch_disassembler_options): Use it.
679         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
680         not valid_disassembler_option->name.
681         * gdbarch.c: Regenerate.
682
683 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
684
685         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
686
687 2017-03-07  Pedro Alves  <palves@redhat.com>
688
689         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
690
691 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
692
693         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
694         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
695         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
696         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
697
698 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
699
700         * xtensa-linux-nat.c (fetch_gregs): Remove const.
701
702 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
703
704         * remote.c (remote_add_target_side_commands): Use range-based
705         for loop.
706
707 2017-03-03  Yao Qi  <yao.qi@linaro.org>
708
709         PR gdb/21165
710         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
711         value is lazy.
712         * valprint.c (common_val_print): Likewise.
713
714 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
715
716         * NEWS: Mention new set/show disassembler-options commands.
717         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
718         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
719         (prospective_options): New static variable.
720         (gdb_disassembler::gdb_disassembler): Initialize
721         m_di.disassembler_options.
722         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
723         (get_disassembler_options): New function.
724         (set_disassembler_options): Likewise.
725         (set_disassembler_options_sfunc): Likewise.
726         (show_disassembler_options_sfunc): Likewise.
727         (disassembler_options_completer): Likewise.
728         (_initialize_disasm): Likewise.
729         * disasm.h (get_disassembler_options): New prototype.
730         (set_disassembler_options): Likewise.
731         * gdbarch.sh (gdbarch_disassembler_options): New variable.
732         (gdbarch_verify_disassembler_options): Likewise.
733         * gdbarch.c: Regenerate.
734         * gdbarch.h: Likewise.
735         * arm-tdep.c (num_disassembly_options): Delete.
736         (set_disassembly_style): Likewise.
737         (arm_disassembler_options): New static variable.
738         (set_disassembly_style_sfunc): Convert short style name into long
739         option name.  Call set_disassembler_options.
740         (show_disassembly_style_sfunc): New function.
741         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
742         set_gdbarch_verify_disassembler_options.
743         (_initialize_arm_tdep): Delete regnames variable and update callers.
744         (arm_disassembler_options): Initialize.
745         (disasm_options): New variable.
746         (num_disassembly_options): Rename from this...
747         (num_disassembly_styles): ...to this.  Compute by scanning through
748         disasm_options.
749         (valid_disassembly_styles): Initialize using disasm_options.
750         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
751         set_arm_regname_option.
752         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
753         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
754         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
755         set_gdbarch_verify_disassembler_options.
756         * s390-tdep.c (s390_disassembler_options): New static variable.
757         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
758         set_gdbarch_verify_disassembler_options.
759
760 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
761
762         * remote.c (remote_add_target_side_condition): Remove "struct"
763         keyword from range-based for loop.
764
765 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
766
767         * remote.c (remote_add_target_side_condition): Use range-based
768         for loop.  Update comment.
769
770 2017-02-27  Yao Qi  <yao.qi@linaro.org>
771
772         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
773
774 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
775
776         * regcache.c (regcache_raw_update): New function.
777         (regcache_raw_read): Move code to regcache_raw_update.
778         * regcache.h (regcache_raw_update): New declaration.
779         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
780
781 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
782
783         * dwarf2read.c (create_debug_type_hash_table): Initialize
784         header.signature and header.type_offset_in_tu.
785
786 2017-02-24  Pedro Alves  <palves@redhat.com>
787
788         * symtab.c (make_file_symbol_completion_list_1): Use
789         add_symtab_completions.
790
791 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
792
793         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
794
795 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
796
797         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
798         I386_MAX_REGISTER_SIZE.
799         (i386_pseudo_register_write): Likewise.
800         (i386_process_record): Likewise.
801         * i387-tdep.c (i387_supply_xsave): Likewise.
802         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
803         (store_register): Likewise.
804
805 2017-02-23  Pedro Alves  <palves@redhat.com>
806
807         * ada-lang.c: Include "common/function-view.h".
808         (ada_iterate_over_symbols): Adjust to use function_view as
809         callback type.
810         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
811         (ada_make_symbol_completion_list): Use a lambda.
812         (ada_exc_search_name_matches): Delete.
813         (name_matches_regex): New.
814         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
815         * compile/compile-c-support.c: Include "common/function-view.h".
816         (print_one_macro): Change prototype to accept a ui_file pointer.
817         (write_macro_definitions): Use a lambda.
818         * dwarf2read.c: Include "common/function-view.h".
819         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
820         (dw2_expand_symtabs_matching): Adjust to use function_view as
821         callback type.
822         * language.h: Include "common/function-view.h".
823         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
824         function_view as callback type.
825         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
826         * linespec.c: Include "common/function-view.h".
827         (collect_info::add_symbol): New method.
828         (struct symbol_and_data_callback, iterate_inline_only, struct
829         symbol_matcher_data, iterate_name_matcher): Delete.
830         (iterate_over_all_matching_symtabs): Adjust to use function_view
831         as callback type and lambdas.
832         (iterate_over_file_blocks): Adjust to use function_view as
833         callback type.
834         (decode_compound_collector): Now a class with private fields.
835         (decode_compound_collector::release_symbols): New method.
836         (collect_one_symbol): Rename to...
837         (decode_compound_collector::operator()): ... this and adjust.
838         (lookup_prefix_sym): decode_compound_collector construction bits
839         move to decode_compound_collector ctor.  Pass the
840         decode_compound_collector object directly as callback.  Remove
841         cleanups and use decode_compound_collector::release_symbols
842         instead.
843         (symtab_collector): Now a class with private fields.
844         (symtab_collector::release_symtabs): New method.
845         (add_symtabs_to_list): Rename to...
846         (symtab_collector::operator()): ... this and adjust.
847         (collect_symtabs_from_filename): symtab_collector construction
848         bits move to symtab_collector ctor.  Pass the symtab_collector
849         object directly as callback.  Remove cleanups and use
850         symtab_collector::release_symtabs instead.
851         (collect_symbols): Delete.
852         (add_matching_symbols_to_info): Use lambdas.
853         * macrocmd.c (print_macro_callback): Delete.
854         (info_macro_command): Use a lambda.
855         (info_macros_command): Pass print_macro_definition as callable
856         directly.
857         (print_one_macro): Remove 'ignore' parameter.
858         (macro_list_command): Adjust.
859         * macrotab.c (macro_for_each_data::fn): Now a function_view.
860         (macro_for_each_data::user_data): Delete field.
861         (foreach_macro): Adjust to call the function_view.
862         (macro_for_each): Adjust to use function_view as callback type.
863         (foreach_macro_in_scope): Adjust to call the function_view.
864         (macro_for_each_in_scope): Adjust to use function_view as callback
865         type.
866         * macrotab.h: Include "common/function-view.h".
867         (macro_callback_fn): Declare a prototype instead of a pointer.
868         Remove "user_data" parameter.
869         (macro_for_each, macro_for_each_in_scope): Adjust to use
870         function_view as callback type.
871         * psymtab.c (partial_map_expand_apply)
872         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
873         Adjust to use function_view as callback type and to return bool.
874         (psym_expand_symtabs_matching): Adjust to use function_view as
875         callback types.
876         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
877         to use function_view as callback type and to return bool.
878         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
879         callback types.
880         * symfile.c (expand_symtabs_matching): Adjust to use function_view
881         as callback types.
882         * symfile.h: Include "common/function-view.h".
883         (expand_symtabs_file_matcher_ftype)
884         (expand_symtabs_symbol_matcher_ftype)
885         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
886         return bool.
887         (quick_symbol_functions::map_symtabs_matching_filename)
888         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
889         function_view as callback type and return bool.
890         (expand_symtabs_matching): Adjust to use function_view as callback
891         type.
892         (maintenance_expand_name_matcher)
893         (maintenance_expand_file_matcher): Delete.
894         (maintenance_expand_symtabs): Use lambdas.
895         * symtab.c (iterate_over_some_symtabs): Adjust to use
896         function_view as callback types and return bool.
897         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
898         of a cleanup.
899         (lookup_symtab_callback): Delete.
900         (lookup_symtab): Use a lambda.
901         (iterate_over_symbols): Adjust to use function_view as callback
902         type.
903         (struct search_symbols_data, search_symbols_file_matches)
904         (search_symbols_name_matches): Delete.
905         (search_symbols): Use a pair of lambdas.
906         (struct add_name_data, add_macro_name, symbol_completion_matcher)
907         (symtab_expansion_callback): Delete.
908         (default_make_symbol_completion_list_break_on_1): Use lambdas.
909         * symtab.h: Include "common/function-view.h".
910         (iterate_over_some_symtabs): Adjust to use function_view as
911         callback type and return bool.
912         (iterate_over_symtabs): Adjust to use function_view as callback
913         type.
914         (symbol_found_callback_ftype): Remove 'data' parameter and return
915         bool.
916         (iterate_over_symbols): Adjust to use function_view as callback
917         type.
918
919 2017-02-23  Pedro Alves  <palves@redhat.com>
920
921         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
922         (%.o) <unittests/%.c>: New pattern.
923         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
924         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
925         * common/function-view.h: New file.
926         * unittests/function-view-selftests.c: New file.
927         * configure: Regenerate.
928
929 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
930
931         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
932         inferior_ptid.
933         * go32-nat.c (go32_thread_alive): Likewise.
934
935 2017-02-23  Yao Qi  <yao.qi@linaro.org>
936
937         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
938         delete.
939
940 2017-02-23  Yao Qi  <yao.qi@linaro.org>
941
942         * varobj.c (varobj_clear_saved_item): Use delete instead of
943         xfree.
944         (update_dynamic_varobj_children): Likewise.
945
946 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
947
948         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
949
950 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
951
952         * common/enum-flags.h (enum_flags::enum_flags): Initialize
953         m_enum_value to 0 in default constructor.
954
955 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
956
957         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
958         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
959         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
960         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
961         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
962         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
963         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
964         IS_STORE_CONDITIONAL_INSN.
965
966 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
967
968         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
969
970 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
971
972         * NEWS (Changes since GDB 7.12): Add DWARF-5.
973
974 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
975
976         * dwarf2read.c (skip_one_die, read_attribute_value)
977         (dwarf2_const_value_attr, dump_die_shallow)
978         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
979         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
980
981 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
982
983         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
984         (dwarf_parse_macro_header): Accept DWARF version 5.
985         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
986
987 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
988
989         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
990         DW_AT_GNU_*.
991         * common/common-exceptions.h (enum errors): Likewise.
992         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
993         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
994         (dwarf_expr_context::execute_stack_op): Likewise.
995         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
996         Likewise.
997         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
998         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
999         (show_entry_values_debug, call_site_to_target_addr)
1000         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
1001         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
1002         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
1003         (value_of_dwarf_block_entry, indirect_pieced_value)
1004         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
1005         (disassemble_dwarf_expression): Likewise.
1006         * dwarf2read.c (process_die, inherit_abstract_dies)
1007         (read_call_site_scope): Likewise.
1008         * gdbtypes.h (struct func_type, struct call_site_parameter)
1009         (struct call_site): Likewise.
1010         * stack.c (read_frame_arg): Likewise.
1011         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
1012
1013 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1014
1015         * defs.h (read_unsigned_leb128): New declaration.
1016         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
1017         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
1018         (dwarf2_find_location_expression): Call also
1019         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
1020         * dwarf2loc.h (dwarf2_version): New declaration.
1021         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
1022         rnglists.
1023         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
1024         .debug_rnglists.
1025         (struct dwop_section_names): Add loclists_dwo.
1026         (dwop_section_names): Add .debug_loclists.dwo.
1027         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
1028         (struct dwarf2_per_cu_data): Add dwarf_version.
1029         (struct dwo_sections): Add loclists.
1030         (struct attr_abbrev): Add implicit_const.
1031         (read_indirect_line_string): New declaration.
1032         (read_unsigned_leb128): Delete declaration.
1033         (rcuh_kind): New definition.
1034         (read_and_check_comp_unit_head): Change parameter
1035         is_debug_types_section to section_kind.
1036         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
1037         (read_comp_unit_head): Change parameter abfd to section, add parameter
1038         section_kind.  Handle DWARF-5.
1039         (error_check_comp_unit_head): Accept also DWARF version 5.
1040         (read_and_check_comp_unit_head): Change parameter
1041         is_debug_types_section to section_kind.
1042         (read_and_check_type_unit_head): Delete function.
1043         (read_abbrev_offset): Handle DWARF-5.
1044         (create_debug_type_hash_table): Add parameter section_kind.  Process
1045         only DW_UT_type.  Use signature and type_offset_in_tu from struct
1046         comp_unit_head.
1047         (create_debug_types_hash_table): Update create_debug_type_hash_table
1048         caller.
1049         (create_all_type_units): Call create_debug_type_hash_table.
1050         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
1051         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
1052         caller.
1053         (skip_one_die): Handle DW_FORM_implicit_const.
1054         (dwarf2_rnglists_process): New function.
1055         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
1056         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
1057         (read_attribute_value): Handle DW_FORM_implicit_const,
1058         DW_FORM_line_strp.
1059         (read_attribute): Handle DW_FORM_implicit_const.
1060         (read_indirect_string_at_offset_from): New function from
1061         read_indirect_string_at_offset.
1062         (read_indirect_string_at_offset): Call
1063         read_indirect_string_at_offset_from.
1064         (read_indirect_line_string_at_offset): New function.
1065         (read_indirect_string): New function comment.
1066         (read_indirect_line_string): New function.
1067         (read_unsigned_leb128): Make it global.
1068         (dwarf2_string_attr): Handle DWARF-5.
1069         (add_include_dir_stub, read_formatted_entries): New functions.
1070         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
1071         Handle DWARF-5.
1072         (per_cu_header_read_in): Update read_comp_unit_head caller.
1073         (dwarf2_version): New function.
1074         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
1075         rnglists.
1076         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
1077         fields.
1078
1079 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1080
1081         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
1082
1083 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1084
1085         * dwarf2read.c (dwarf2_ranges_process): New function from
1086         dwarf2_ranges_read.
1087         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
1088         dwarf2_ranges_process.
1089
1090 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1091
1092         * dwarf2read.c (create_debug_type_hash_table): New function from
1093         create_debug_types_hash_table.
1094         (create_debug_types_hash_table): Call create_debug_type_hash_table.
1095         (create_all_type_units, open_and_init_dwo_file): Update
1096         create_debug_types_hash_table callers.
1097
1098 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1099
1100         PR gdb/16188
1101         * fork-child.c (trace_start_error): Fix thinko.  va_end should
1102         refer to 'ap', not 'args'.
1103
1104 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1105             Pedro Alves  <palves@redhat.com>
1106
1107         PR gdb/16188
1108         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
1109         calls succeeded.
1110         * fork-child.c (trace_start_error): New function.
1111         (trace_start_error_with_name): Likewise.
1112         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
1113         * inf-ptrace.c (inf_ptrace_me): Likewise.
1114         * inferior.h (trace_start_error): New prototype.
1115         (trace_start_error_with_name): Likewise.
1116
1117 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1118
1119         PR gdb/21164
1120         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
1121         NULL before using it.
1122         * symmisc.c (maintenance_print_symbols): Likewise.
1123         (maintenance_print_msymbols): Likewise.
1124
1125 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1126
1127         * NEWS: Add record Python bindings entry.
1128
1129 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1130
1131         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
1132         py-record-full.o.
1133         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
1134         * python/py-record-btrace.c, python/py-record-btrace.h,
1135         python/py-record-full.c, python/py-record-full.h: New file.
1136         * python/py-record.c: Add include for py-record-btrace.h and
1137         py-record-full.h.
1138         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
1139         recpy_instruction_history, recpy_function_call_history, recpy_begin,
1140         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
1141         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
1142         New definition.
1143         (gdbpy_initialize_btrace): New export.
1144         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
1145
1146 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1147
1148         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
1149         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
1150         * python/py-record.c: New file.
1151         * python/python-internal.h (gdbpy_start_recording,
1152         gdbpy_current_recording, gdpy_stop_recording,
1153         gdbpy_initialize_record): New export.
1154         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
1155         (python_GdbMethods): Add gdbpy_start_recording,
1156         gdbpy_current_recording and gdbpy_stop_recording.
1157
1158 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1159
1160         * record-btrace.c (record_btrace_record_method): New function.
1161         (init_record_btrace_ops): Initialize to_record_method.
1162         * record-full.c (record_full_record_method): New function.
1163         (init_record_full_ops, init_record_full_core_ops): Add
1164         record_full_record_method.
1165         * record.h (enum record_method): New enum.
1166         * target-debug.h (target_debug_print_enum_record_method: New define.
1167         * target-delegates.c: Regenerate.
1168         * target.c (target_record_method): New function.
1169         * target.h: Include record.h.
1170         (struct target_ops) <to_record_method>: New field.
1171         (target_record_method): New export.
1172
1173 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1174
1175         * record.h (record_start, record_stop): New export.
1176         * record.c (record_start, record_stop): New function.
1177
1178 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1179
1180         * btrace.c (btrace_fetch): Copy function call segments pointer
1181         into a vector.
1182         (btrace_clear): Clear the vector.
1183         (btrace_find_insn_by_number): Use binary search to find the correct
1184         function call segment.
1185         * btrace.h (brace_fun_p): New typedef.
1186         (struct btrace_thread_info) <functions>: New field.
1187
1188 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1189
1190         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
1191         * btrace.c (btrace_decode_error): ... here.  New function.
1192         * btrace.h (btrace_decode_error): New export.
1193
1194 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
1195
1196         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
1197         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
1198         btrace_find_insn_by_number): Remove special case for gaps.
1199         * btrace.h (btrace_insn_get_error): New export.
1200         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
1201         * record-btrace.c (btrace_insn_history): Print number for gaps.
1202         (record_btrace_info, record_btrace_goto): Handle gaps.
1203
1204 2017-02-14  Tom Tromey  <tom@tromey.com>
1205
1206         PR python/13598:
1207         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
1208         event.
1209         * python/py-evts.c (gdbpy_initialize_py_events): Add
1210         before_prompt registry.
1211         * python/py-events.h (events_object) <before_prompt>: New field.
1212
1213 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
1214
1215         * btrace.c (ftrace_new_switch): Preserve up link and flags.
1216
1217 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
1218
1219         * symfile (_initialize_symfile): Add usage text to the load command's
1220         help text.
1221
1222 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
1223
1224         * utils.c (defaulted_query): Don't query on secondary UIs.
1225
1226 2017-02-10  Tom Tromey  <tom@tromey.com>
1227
1228         * rust-lang.c (rust_get_disr_info): Remove unused variable.
1229
1230 2017-02-10  Tom Tromey  <tom@tromey.com>
1231
1232         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
1233         "cleanup" local.
1234         * python/py-type.c (typy_legacy_template_argument): Remove
1235         unnecessary "cleanup" local.
1236
1237 2017-02-10  Tom Tromey  <tom@tromey.com>
1238
1239         * python/python.c (do_start_initialization): New function, from
1240         _initialize_python.
1241         (_initialize_python): Call do_start_initialization.
1242         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
1243         goto.
1244
1245 2017-02-10  Tom Tromey  <tom@tromey.com>
1246
1247         * python/py-prettyprint.c (pretty_print_one_value): Use
1248         gdbpy_ref.
1249
1250 2017-02-10  Tom Tromey  <tom@tromey.com>
1251
1252         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
1253         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
1254         gdbpy_ref.
1255         * python/py-type.c (field_new): Use gdbpy_ref.
1256         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
1257         gdbpy_ref.
1258         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
1259         (py_free_pspace): Likewise.
1260         (pspace_to_pspace_object): Likewise.
1261         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
1262         (py_free_objfile): Likewise.
1263         (objfile_to_objfile_object): Likewise.
1264         * python/py-inferior.c (delete_thread_object): Use
1265         gdbpy_ref.
1266         (infpy_read_memory): Likewise.
1267         (py_free_inferior): Likewise.
1268         * python/py-evtregistry.c (create_eventregistry_object): Use
1269         gdbpy_ref.
1270         * python/py-event.c (create_event_object): Use gdbpy_ref.
1271
1272 2017-02-10  Tom Tromey  <tom@tromey.com>
1273
1274         * python/py-ref.h (gdbpy_ref_policy): Now a template.
1275         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
1276         used.
1277         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
1278         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
1279         python/py-exitedevent.c, python/py-finishbreakpoint.c,
1280         python/py-framefilter.c, python/py-function.c,
1281         python/py-inferior.c, python/py-infevents.c,
1282         python/py-linetable.c, python/py-newobjfileevent.c,
1283         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
1284         python/py-signalevent.c, python/py-stopevent.c,
1285         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
1286         python/py-unwind.c, python/py-utils.c, python/py-value.c,
1287         python/py-varobj.c, python/py-xmethods.c, python/python.c,
1288         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
1289
1290 2017-02-10  Tom Tromey  <tom@tromey.com>
1291
1292         * ui-out.h (ui_out_emit_type): New class.
1293         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
1294         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
1295         and ui_out_emit_tuple.
1296         (enumerate_locals): Likewise.
1297         (py_mi_print_variables, py_print_locals, py_print_args): Use
1298         ui_out_emit_list.
1299         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
1300         ui_out_emit_list.
1301         * common/gdb_optional.h: New file.
1302
1303 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
1304
1305         * MAINTAINERS (Write After Approval): Update my e-mail address.
1306
1307 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
1308
1309         PR gdb/21122
1310         * breakpoint.c (_initialize_breakpoint): Update the help description
1311         of the 'commands' command to indicate that it takes a list argument.
1312
1313 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
1314
1315         * interps.c (current_interp_set_logging): Remove "return".
1316
1317 2017-02-09  Gary Benson  <gbenson@redhat.com>
1318
1319         * symtab.c (add_symtab_completions): Prevent NULL pointer
1320         dereference.
1321
1322 2017-02-08  Pedro Alves  <palves@redhat.com>
1323
1324         * interps.c (interp::interp): Remove reference to quiet_p.
1325         (interp_set): Make static.  Remove dead "Switching to" output
1326         code.
1327         (interp_quiet_p, interp_set_quiet): Delete.
1328         (interpreter_exec_cmd): Don't set the interpreter quiet.
1329         * interps.h (interp_quiet_p): Make static.
1330         (class interp) <quiet_p>: Remove field
1331
1332 2017-02-08  Jerome Guitton  <guitton@adacore.com>
1333
1334         * cli/cli-decode.c (find_command_name_length): Make it extern.
1335         * cli/cli-decode.h (find_command_name_length): Declare.
1336         * cli/cli-script.c (command_name_equals, line_first_arg):
1337         New functions.
1338         (process_next_line): Use cli-decode to parse command names.
1339         (build_command_line): Make args a constant pointer.
1340
1341 2017-02-08  Jerome Guitton  <guitton@adacore.com>
1342
1343         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
1344         Remove case-insensitive search.
1345
1346 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
1347
1348         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
1349         at the end of the line.  Avoids an ARI warning.
1350
1351 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
1352
1353         * NEWS: Mention support for record/replay of Intel 64 rdrand and
1354         rdseed instructions.
1355         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
1356
1357 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
1358
1359         PR tdep/20936
1360         Provide and use sparc32 and sparc64 target description XML files.
1361         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
1362         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
1363         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
1364         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
1365         * features/sparc/sparc32-solaris.xml: New file.
1366         * features/sparc/sparc64-solaris.xml: New file.
1367         * features/sparc/sparc32-solaris.c: Generated.
1368         * features/sparc/sparc64-solaris.c: Generated.
1369         * sparc-tdep.h: Account for differences in target descriptions.
1370         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
1371         (sparc32_register_type): Use target provided registers.
1372         (validate_tdesc_registers): New function.
1373         (sparc32_gdbarch_init): Use tdesc_has_registers.
1374         Set pseudoregister functions.
1375         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
1376         (sparc64_register_type): Use target provided registers.
1377         (sparc64_init_abi): Set pseudoregister functions.
1378
1379 2017-02-03  Tom Tromey  <tom@tromey.com>
1380
1381         PR rust/21097:
1382         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
1383         with a single member.
1384
1385 2017-02-03  Pedro Alves  <palves@redhat.com>
1386
1387         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
1388         (cli_interp_base::~cli_interp_base): New.
1389         (cli_interp): New struct.
1390         (as_cli_interp): Cast the interp itself to cli_interp.
1391         (cli_interpreter_pre_command_loop): Rename to ...
1392         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
1393         parameter.
1394         (cli_interpreter_init): Rename to ...
1395         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
1396         boolean.  Make extern.
1397         (cli_interpreter_resume): Rename to ...
1398         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
1399         extern.
1400         (cli_interpreter_suspend): Rename to ...
1401         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
1402         extern.
1403         (cli_interpreter_exec): Rename to ...
1404         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
1405         extern.
1406         (cli_interpreter_supports_command_editing): Rename to ...
1407         (cli_interp_base::supports_command_editing): ... this.  Remove
1408         'interp' parameter.  Make extern.
1409         (cli_ui_out): Rename to ...
1410         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
1411         Make extern.
1412         (cli_set_logging): Rename to ...
1413         (cli_interp_base::set_logging): ... this.  Remove 'interp'
1414         parameter.  Make extern.
1415         (cli_interp_procs): Delete.
1416         (cli_interp_factory): Adjust to use "new".
1417         * cli/cli-interp.h: Include "interps.h".
1418         (struct cli_interp_base): New struct.
1419         * interps.c (struct interp): Delete.  Fields moved to interps.h.
1420         (interp_new): Delete.
1421         (interp::interp, interp::~interp): New.
1422         (interp_set): Use bool, and return void.  Assume the interpreter
1423         has suspend, init and resume methods, and that the all return
1424         void.
1425         (set_top_level_interpreter): interp_set returns void.
1426         (interp_ui_out): Adapt.
1427         (current_interp_set_logging): Adapt.
1428         (interp_data): Delete.
1429         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
1430         (interp_exec): Adapt.
1431         (top_level_interpreter_data): Delete.
1432         * interps.h (interp_init_ftype, interp_resume_ftype)
1433         (interp_suspend_ftype, interp_exec_ftype)
1434         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
1435         (class interp): New.
1436         (interp_new): Delete.
1437         (interp_set): Now returns void.  Use bool.
1438         (interp_data, top_level_interpreter_data): Delete.
1439         * mi/mi-common.h: Include interps.h.
1440         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
1441         init, resume, suspect, exec, interp_ui_out, set_logging and
1442         pre_command_loop methods.
1443         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
1444         (mi_interpreter_init): Rename to ...
1445         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
1446         bool, return void and make extern.  Adjust.
1447         (mi_interpreter_resume): ... Rename to ...
1448         (mi_interp::resume): ... this.  Remove the 'data' parameter,
1449         return void and make extern.  Adjust.
1450         (mi_interpreter_suspend): ... Rename to ...
1451         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
1452         return void and make extern.  Adjust.
1453         (mi_interpreter_exec): ... Rename to ...
1454         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
1455         extern.  Adjust.
1456         (mi_interpreter_pre_command_loop): ... Rename to ...
1457         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
1458         parameter and make extern.
1459         (mi_on_normal_stop_1): Adjust.
1460         (mi_ui_out): Rename to ...
1461         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
1462         parameter and make extern.  Adjust.
1463         (mi_set_logging): Rename to ...
1464         (mi_interp::set_logging): ... this.  Remove the 'interp'
1465         parameter and make extern.  Adjust.
1466         (mi_interp_procs): Delete.
1467         (mi_interp_factory): Adjust to use 'new'.
1468         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
1469         (mi_print_exception, mi_execute_command, mi_load_progress):
1470         Adjust.
1471         * tui/tui-interp.c (tui_interp): New class.
1472         (as_tui_interp): Return a tui_interp pointer.
1473         (tui_on_normal_stop, tui_on_signal_received)
1474         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
1475         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
1476         to use interp::interp_ui_out.
1477         (tui_init): Rename to ...
1478         (tui_interp::init): ... this.  Remove the 'self' parameter, use
1479         bool, return void and make extern.  Adjust.
1480         (tui_resume): Rename to ...
1481         (tui_interp::resume): ... this.  Remove the 'data' parameter,
1482         return void and make extern.  Adjust.
1483         (tui_suspend): Rename to ...
1484         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
1485         return void and make extern.  Adjust.
1486         (tui_ui_out): Rename to ...
1487         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
1488         parameter, and make extern.  Adjust.
1489         (tui_exec): Rename to ...
1490         (tui_interp::exec): ... this.  Remove the 'data' parameter and
1491         make extern.
1492         (tui_interp_procs): Delete.
1493         (tui_interp_factory): Use "new".
1494
1495 2017-02-02  Tom Tromey  <tom@tromey.com>
1496
1497         * rust-exp.y (ends_raw_string, space_then_number)
1498         (rust_identifier_start_p): Return bool.
1499         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
1500         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
1501         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
1502         (rust_chartype_p): Return bool.
1503         (val_print_struct, rust_print_struct_def, rust_print_type):
1504         Update.
1505         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
1506         Return bool.
1507
1508 2017-02-02  Tom Tromey  <tom@tromey.com>
1509
1510         * rust-lang.c: Reindent.
1511
1512 2017-02-02  Tom Tromey  <tom@tromey.com>
1513
1514         * rust-lang.h (rust_crate_for_block): Update.
1515         * rust-lang.c (rust_crate_for_block): Return std::string.
1516         (rust_get_disr_info): Use std:;string, not
1517         gdb::unique_xmalloc_ptr.
1518         * rust-exp.y (crate_name): Update.
1519
1520 2017-02-02  Pedro Alves  <palves@redhat.com>
1521
1522         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
1523         field out of gdb_disassembler_test and make it static.
1524
1525 2017-02-02  Pedro Alves  <palves@redhat.com>
1526
1527         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
1528         mi1_interp and mi_interp fields.
1529
1530 2017-02-02  Pedro Alves  <palves@redhat.com>
1531
1532         * cli/cli-interp.c (struct saved_output_files, saved_output):
1533         Moved from cli/cli-logging.c.
1534         (cli_set_logging): New function.
1535         (cli_interp_procs): Install cli_set_logging.
1536         * cli/cli-interp.h (make_logging_output, cli_set_logging):
1537         Declare.
1538         * cli/cli-logging.c (struct saved_output_files, saved_output):
1539         Moved to cli/cli-interp.c.
1540         (pop_output_files): Don't save outputs here.
1541         (make_logging_output): New function.
1542         (handle_redirections): Don't build tee nor save previous outputs
1543         here.
1544         * interps.c (current_interp_set_logging): Change prototype.
1545         Assume there's always a set_logging_proc method installed.
1546         * interps.h (interp_set_logging_ftype): Change prototype.
1547         (current_interp_set_logging): Change prototype and adjust comment.
1548         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
1549         use make_logging_output.
1550         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
1551 2017-02-02  Pedro Alves  <palves@redhat.com>
1552
1553         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
1554         from ...
1555         (set_logging_overwrite): ... here.
1556         (logging_no_redirect_file): Delete.
1557         (set_logging_redirect): Don't handle redirection on the fly.
1558         Instead warn that "logging off" / "logging on" is necessary.
1559         (pop_output_files): Delete references to logging_no_redirect_file.
1560         (show_logging_command): Always speak in terms of what will happen
1561         once logging is reenabled.
1562
1563 2017-02-02  Pedro Alves  <palves@redhat.com>
1564
1565         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
1566
1567 2017-02-02  Pedro Alves  <palves@redhat.com>
1568
1569         * disasm.c (gdb_pretty_print_insn): Rename to ...
1570         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
1571         Remove gdbarch parameter.  Adapt to clear the object's buffers
1572         instead of allocating new buffers, and to print using the object's
1573         gdb_disassembler instead of calling gdb_print_insn.
1574         (dump_insns): Use gdb_pretty_print_disassembler.
1575         * disasm.h (gdb_pretty_print_insn): Delete declaration.
1576         (gdb_pretty_print_disassembler): New class.
1577         * record-btrace.c (btrace_insn_history): Use
1578         gdb_pretty_print_disassembler.
1579
1580 2017-02-02  Pedro Alves  <palves@redhat.com>
1581
1582         * ada-lang.c (type_as_string): Use string_file.
1583         * ada-valprint.c (ada_print_floating): Use string_file.
1584         * ada-varobj.c (ada_varobj_scalar_image)
1585         (ada_varobj_get_value_image): Use string_file.
1586         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
1587         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
1588         * breakpoint.c (update_inserted_breakpoint_locations)
1589         (insert_breakpoint_locations, reattach_breakpoints)
1590         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
1591         (print_it_watchpoint): Use string_file.
1592         (save_breakpoints): Use stdio_file.
1593         * c-exp.y (oper): Use string_file.
1594         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
1595         tee_file.
1596         (pop_output_files): Use delete.
1597         (handle_redirections): Use stdio_file and tee_file.
1598         * cli/cli-setshow.c (do_show_command): Use string_file.
1599         * compile/compile-c-support.c (c_compute_program): Use
1600         string_file.
1601         * compile/compile-c-symbols.c (generate_vla_size): Take a
1602         'string_file &' instead of a 'ui_file *'.
1603         (generate_c_for_for_one_variable): Take a 'string_file &' instead
1604         of a 'ui_file *'.  Use string_file.
1605         (generate_c_for_variable_locations): Take a 'string_file &'
1606         instead of a 'ui_file *'.
1607         * compile/compile-internal.h (generate_c_for_for_one_variable):
1608         Take a 'string_file &' instead of a 'ui_file *'.
1609         * compile/compile-loc2c.c (push, pushf, unary, binary)
1610         (print_label, pushf_register_address, pushf_register)
1611         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
1612         'ui_file *'.  Adjust.
1613         * compile/compile.c (compile_to_object): Use string_file.
1614         * compile/compile.h (compile_dwarf_expr_to_c)
1615         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
1616         'ui_file *'.
1617         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
1618         (replace_typedefs_qualified_name): Use string_file and
1619         obstack_copy0.
1620         * disasm.c (gdb_pretty_print_insn): Use string_file.
1621         (gdb_disassembly): Adjust reference the null_stream global.
1622         (do_ui_file_delete): Delete.
1623         (gdb_insn_length): Use null_stream.
1624         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
1625         * dwarf2loc.c (dwarf2_compile_property_to_c)
1626         (locexpr_generate_c_location, loclist_generate_c_location): Take a
1627         'string_file &' instead of a 'ui_file *'.
1628         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
1629         * dwarf2read.c (do_ui_file_peek_last): Delete.
1630         (dwarf2_compute_name): Use string_file.
1631         * event-top.c (gdb_setup_readline): Use stdio_file.
1632         * gdbarch.sh (verify_gdbarch): Use string_file.
1633         * gdbtypes.c (safe_parse_type): Use null_stream.
1634         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
1635         string_file.
1636         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
1637         'string_file *' instead of a 'ui_file *'.
1638         (gdbscm_arch_disassemble): Use string_file.
1639         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
1640         * guile/scm-ports.c (class ioscm_file_port): Now a class that
1641         inherits from ui_file.
1642         (ioscm_file_port_delete, ioscm_file_port_rewind)
1643         (ioscm_file_port_put): Delete.
1644         (ioscm_file_port_write): Rename to ...
1645         (ioscm_file_port::write): ... this.  Remove file_port_magic
1646         checks.
1647         (ioscm_file_port_new): Delete.
1648         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
1649         ui_file_up.
1650         * guile/scm-type.c (tyscm_type_name): Use string_file.
1651         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
1652         Use string_file.
1653         * infcmd.c (print_return_value_1): Use string_file.
1654         * infrun.c (print_target_wait_results): Use string_file.
1655         * language.c (add_language): Use string_file.
1656         * location.c (explicit_to_string_internal): Use string_file.
1657         * main.c (captured_main_1): Use null_file.
1658         * maint.c (maintenance_print_architecture): Use stdio_file.
1659         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
1660         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
1661         event_channel>: Change type to mi_console_file pointer.
1662         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
1663         (mi_console_file_delete): Delete.
1664         (struct mi_console_file): Delete.
1665         (mi_console_file_magic): Delete.
1666         (mi_console_file_new): Delete.
1667         (mi_console_file::mi_console_file): New.
1668         (mi_console_file_delete): Delete.
1669         (mi_console_file_fputs): Delete.
1670         (mi_console_file::write): New.
1671         (mi_console_raw_packet): Delete.
1672         (mi_console_file::flush): New.
1673         (mi_console_file_flush): Delete.
1674         (mi_console_set_raw): Rename to ...
1675         (mi_console_file::set_raw): ... this.
1676         * mi/mi-console.h (class mi_console_file): New class.
1677         (mi_console_file_new, mi_console_set_raw): Delete.
1678         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
1679         (mi_set_logging): Use delete and tee_file.  Adjust.
1680         * mi/mi-main.c (output_register): Use string_file.
1681         (mi_cmd_data_evaluate_expression): Use string_file.
1682         (mi_cmd_data_read_memory): Use string_file.
1683         (mi_cmd_execute, print_variable_or_computed): Use string_file.
1684         * mi/mi-out.c (mi_ui_out::main_stream): New.
1685         (mi_ui_out::rewind): Use main_stream and
1686         string_file.
1687         (mi_ui_out::put): Use main_stream and string_file.
1688         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1689         Allocate a 'string_file' instead.
1690         (mi_out_new): Don't allocate a mem_fileopen stream here.
1691         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
1692         (mi_ui_out::main_stream): Declare method.
1693         * printcmd.c (eval_command): Use string_file.
1694         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
1695         * python/py-arch.c (archpy_disassemble): Use string_file.
1696         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
1697         * python/py-frame.c (frapy_str): Use string_file.
1698         * python/py-framefilter.c (py_print_type, py_print_single_arg):
1699         Use string_file.
1700         * python/py-type.c (typy_str): Use string_file.
1701         * python/py-unwind.c (unwind_infopy_str): Use string_file.
1702         * python/py-value.c (valpy_str): Use string_file.
1703         * record-btrace.c (btrace_insn_history): Use string_file.
1704         * regcache.c (regcache_print): Use stdio_file.
1705         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
1706         * remote.c (escape_buffer): Use string_file.
1707         * rust-lang.c (rust_get_disr_info): Use string_file.
1708         * serial.c (serial_open_ops_1): Use stdio_file.
1709         (do_serial_close): Use delete.
1710         * stack.c (print_frame_arg): Use string_file.
1711         (print_frame_args): Remove local mem_fileopen stream, not used.
1712         (print_frame): Use string_file.
1713         * symmisc.c (maintenance_print_symbols): Use stdio_file.
1714         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1715         Take a 'string_file *' instead of a 'ui_file *'.
1716         * top.c (new_ui): Use stdio_file and stderr_file.
1717         (free_ui): Use delete.
1718         (execute_command_to_string): Use string_file.
1719         (quit_confirm): Use string_file.
1720         * tracepoint.c (collection_list::append_exp): Use string_file.
1721         * tui/tui-disasm.c (tui_disassemble): Use string_file.
1722         * tui/tui-file.c: Don't include "ui-file.h".
1723         (enum streamtype, struct tui_stream): Delete.
1724         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
1725         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
1726         (tui_file::tui_file): New method.
1727         (tui_file_fputs): Delete.
1728         (tui_file_get_strbuf): Delete.
1729         (tui_file::puts): New method.
1730         (tui_file_adjust_strbuf): Delete.
1731         (tui_file_flush): Delete.
1732         (tui_file::flush): New method.
1733         * tui/tui-file.h: Tweak intro comment.
1734         Include ui-file.h.
1735         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
1736         (tui_file_adjust_strbuf): Delete declarations.
1737         (class tui_file): New class.
1738         * tui/tui-io.c (tui_initialize_io): Use tui_file.
1739         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
1740         (tui_register_format): Use string_stream.
1741         * tui/tui-stack.c (tui_make_status_line): Use string_file.
1742         (tui_get_function_from_frame): Use string_file.
1743         * typeprint.c (type_to_string): Use string_file.
1744         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
1745         (null_stream): New global.
1746         (ui_file_delete): Delete.
1747         (ui_file::ui_file): New.
1748         (null_file_isatty): Delete.
1749         (ui_file::~ui_file): New.
1750         (null_file_rewind): Delete.
1751         (ui_file::printf): New.
1752         (null_file_put): Delete.
1753         (null_file_flush): Delete.
1754         (ui_file::putstr): New.
1755         (null_file_write): Delete.
1756         (ui_file::putstrn): New.
1757         (null_file_read): Delete.
1758         (ui_file::putc): New.
1759         (null_file_fputs): Delete.
1760         (null_file_write_async_safe): Delete.
1761         (ui_file::vprintf): New.
1762         (null_file_delete): Delete.
1763         (null_file::write): New.
1764         (null_file_fseek): Delete.
1765         (null_file::puts): New.
1766         (ui_file_data): Delete.
1767         (null_file::write_async_safe): New.
1768         (gdb_flush, ui_file_isatty): Adjust.
1769         (ui_file_put, ui_file_rewind): Delete.
1770         (ui_file_write): Adjust.
1771         (ui_file_write_for_put): Delete.
1772         (ui_file_write_async_safe, ui_file_read): Adjust.
1773         (ui_file_fseek): Delete.
1774         (fputs_unfiltered): Adjust.
1775         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
1776         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
1777         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
1778         (set_ui_file_data): Delete.
1779         (string_file::~string_file, string_file::write)
1780         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
1781         (do_ui_file_as_string, ui_file_as_string): Delete.
1782         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
1783         (struct mem_file): Delete.
1784         (mem_file_new): Delete.
1785         (stdio_file::stdio_file): New.
1786         (mem_file_delete): Delete.
1787         (stdio_file::stdio_file): New.
1788         (mem_fileopen): Delete.
1789         (stdio_file::~stdio_file): New.
1790         (mem_file_rewind): Delete.
1791         (stdio_file::set_stream): New.
1792         (mem_file_put): Delete.
1793         (stdio_file::open): New.
1794         (mem_file_write): Delete.
1795         (stdio_file_magic, struct stdio_file): Delete.
1796         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
1797         (stdio_file::flush): New.
1798         (stdio_file_read): Rename to ...
1799         (stdio_file::read): ... this.  Adjust.
1800         (stdio_file_write): Rename to ...
1801         (stdio_file::write): ... this.  Adjust.
1802         (stdio_file_write_async_safe): Rename to ...
1803         (stdio_file::write_async_safe) ... this.  Adjust.
1804         (stdio_file_fputs): Rename to ...
1805         (stdio_file::puts) ... this.  Adjust.
1806         (stdio_file_isatty): Delete.
1807         (stdio_file_fseek): Delete.
1808         (stdio_file::isatty): New.
1809         (stderr_file_write): Rename to ...
1810         (stderr_file::write) ... this.  Adjust.
1811         (stderr_file_fputs): Rename to ...
1812         (stderr_file::puts) ... this.  Adjust.
1813         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
1814         (stderr_file::stderr_file): New.
1815         (tee_file_magic): Delete.
1816         (struct tee_file): Delete.
1817         (tee_file::tee_file): New.
1818         (tee_file_new): Delete.
1819         (tee_file::~tee_file): New.
1820         (tee_file_delete): Delete.
1821         (tee_file_flush): Rename to ...
1822         (tee_file::flush): ... this.  Adjust.
1823         (tee_file_write): Rename to ...
1824         (tee_file::write): ... this.  Adjust.
1825         (tee_file::write_async_safe): New.
1826         (tee_file_fputs): Rename to ...
1827         (tee_file::puts): ... this.  Adjust.
1828         (tee_file_isatty): Rename to ...
1829         (tee_file::isatty): ... this.  Adjust.
1830         * ui-file.h (struct obstack, struct ui_file): Don't
1831         forward-declare.
1832         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
1833         (ui_file_write_ftype)
1834         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
1835         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
1836         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
1837         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
1838         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
1839         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
1840         (set_ui_file_fseek): Delete.
1841         (ui_file_data, ui_file_delete, ui_file_rewind)
1842         (struct ui_file): New.
1843         (ui_file_up): New.
1844         (class null_file): New.
1845         (null_stream): Declare.
1846         (ui_file_write_for_put, ui_file_put): Delete.
1847         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
1848         Delete.
1849         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
1850         (gdb_fopen, tee_file_new): Delete.
1851         (struct string_file): New.
1852         (struct stdio_file): New.
1853         (stdio_file_up): New.
1854         (struct stderr_file): New.
1855         (class tee_file): New.
1856         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
1857         of a 'ui_file *'.  Adjust.
1858         * ui-out.h (class ui_out) <field_stream>: Likewise.
1859         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
1860         (null_stream): Delete.
1861         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
1862         Adjust.
1863         * utils.h (struct ui_file): Delete forward declaration..
1864         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
1865         (error_stream): Take a 'string_file &' instead of a
1866         'ui_file *'.
1867         * varobj.c (varobj_value_get_print_value): Use string_file.
1868         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
1869         * gdbarch.c: Regenerate.
1870
1871 2017-02-02  Pedro Alves  <palves@redhat.com>
1872
1873         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
1874         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
1875         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
1876         Adjust to call gdb_print_insn instead of
1877         gdb_disassembler::print_insn.
1878         (dump_insns, do_mixed_source_and_assembly_deprecated)
1879         (do_mixed_source_and_assembly, do_assembly_only): Add back a
1880         'gdbarch' parameter.  Remove gdb_disassembler parameter.
1881         (gdb_disassembly): Don't allocate a gdb_disassembler here.
1882         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
1883         declaration.
1884         (gdb_pretty_print_insn): Re-add declaration.
1885         * record-btrace.c (btrace_insn_history): Don't allocate a
1886         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
1887
1888 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
1889
1890         * disasm.h (gdb_disassembly): Remove file_string parameter.
1891         * disasm.c (gdb_disassembly): Likewise.
1892         * cli/cli-cmds.c (print_disassembly): Adapt.
1893         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
1894         * stack.c (do_gdb_disassembly): Likewise.
1895
1896 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1897
1898         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
1899         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
1900         targets.  And if the implicit value is longer than needed, extract
1901         the first bytes instead of the "least significant" ones.
1902
1903 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
1904
1905         * btrace.c (btrace_enable): Do not call btrace_add_pc for
1906         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
1907         (btrace_fetch): Assert can_access_registers_ptid.
1908         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
1909         validate_registers_access.
1910
1911 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
1912
1913         * gdbthread.h (can_access_registers_ptid): New.
1914         * thread.c (can_access_registers_ptid): New.
1915
1916 2017-02-01  Pedro Alves  <palves@redhat.com>
1917
1918         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
1919
1920 2017-01-31  Pedro Alves  <palves@redhat.com>
1921
1922         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
1923         Fix typos.
1924
1925 2017-01-31  Pedro Alves  <palves@redhat.com>
1926
1927         * stack.c (print_frame_args): Remove local mem_fileopen stream,
1928         not used.
1929
1930 2017-01-31  Pedro Alves  <palves@redhat.com>
1931
1932         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
1933
1934 2017-01-31  Pedro Alves  <palves@redhat.com>
1935
1936         * common/scoped_restore.h
1937         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
1938         change the value's parameter type to T2.
1939         (make_scoped_restore): Likewise.
1940
1941 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1942             Richard Henderson  <rth@redhat.com>
1943
1944         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
1945         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
1946         GS_BASE for older kernels.
1947         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
1948         GS_BASE for older kernels.
1949         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
1950         and GS_BASE to the offset table.
1951         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
1952         system register group.
1953         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
1954         for older kernels.
1955         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
1956         amd64 ABI.
1957         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
1958         AMD64_GSBASE_REGNUM.
1959         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
1960         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
1961         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
1962         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
1963         i386/64bit-segments.xml in those rules.
1964         * features/i386/64bit-segments.xml: New file.
1965         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
1966         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
1967         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
1968         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
1969         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
1970         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
1971         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
1972         * features/i386/amd64-avx-linux.c: Regenerated.
1973         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
1974         * features/i386/amd64-avx-mpx.c: Regenerated.
1975         * features/i386/amd64-avx512-linux.c: Regenerated.
1976         * features/i386/amd64-linux.c: Regenerated.
1977         * features/i386/amd64-mpx-linux.c: Regenerated.
1978         * features/i386/i386-avx-mpx-linux.c: Regenerated.
1979         * features/i386/i386-avx-mpx.c: Regenerated.
1980         * features/i386/x32-avx-linux.c: Regenerated.
1981         * features/i386/x32-avx512-linux.c: Regenerated.
1982         * regformats/i386/amd64-avx-linux.dat: Regenerated.
1983         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
1984         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
1985         * regformats/i386/amd64-linux.dat: Regenerated.
1986         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
1987         * regformats/i386/x32-avx-linux.dat: Regenerated.
1988         * regformats/i386/x32-avx512-linux.dat: Regenerated.
1989         * regformats/i386/x32-linux.dat: Regenerated.
1990
1991 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1992
1993         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
1994         Set to AMD64_NUM_REGS.
1995
1996 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1997
1998         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
1999         that checks validity of a register number.
2000
2001 2017-01-27  Kees Cook  <keescook@google.com>
2002
2003         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
2004         fetch_fpregs if target has fpa registers.
2005         (arm_linux_store_inferior_registers): Call store_fpregs if target
2006         has fpa registers.
2007
2008 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2009
2010         * cris-tdep.c (cris_gdbarch_init): Remove check for
2011         info.byte_order and force it to BFD_ENDIAN_LITTLE.
2012
2013 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2014
2015         * corelow.c (get_core_register_section): Check for regset
2016         existence before checking for REGSET_VARIABLE_SIZE.
2017
2018 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2019             Pedro Alves  <palves@redhat.com>
2020
2021         PR gdb/20939
2022         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
2023         call memory_error, save memaddr instead.
2024         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
2025         negative, cal memory_error.
2026         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
2027
2028 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2029
2030         * disasm-selftests.c (memory_error_test): New function.
2031         (_initialize_disasm_selftests): Register memory_error_test.
2032
2033 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2034
2035         * Makefile.in (SFILES): Add disasm-selftests.c and
2036         selftest-arch.c.
2037         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
2038         * disasm-selftests.c: New file.
2039         * selftest-arch.c: New file.
2040         * selftest-arch.h: New file.
2041
2042 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2043
2044         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
2045         to bfd_arch_mep.  Don't return 0 if section is not
2046         found.  Call print_insn_mep.
2047
2048 2017-01-26  Pedro Alves  <palves@redhat.com>
2049             Yao Qi  <yao.qi@linaro.org>
2050
2051         * arm-tdep.c: Include "disasm.h".
2052         (gdb_print_insn_arm): Update code to get gdbarch.
2053         * disasm.c (dis_asm_read_memory): Change it to
2054         gdb_disassembler::dis_asm_read_memory.
2055         (dis_asm_memory_error): Likewise.
2056         (dis_asm_print_address): Likewise.
2057         (gdb_pretty_print_insn): Change it to
2058         gdb_disassembler::pretty_print_insn.
2059         (dump_insns): Add one argument gdb_disassemlber.  All
2060         callers updated.
2061         (do_mixed_source_and_assembly_deprecated): Likewise.
2062         (do_mixed_source_and_assembly): Likewise.
2063         (do_assembly_only): Likewise.
2064         (gdb_disassembler::gdb_disassembler): New.
2065         (gdb_disassembler::print_insn): New.
2066         * disasm.h (class gdb_disassembler): New.
2067         (gdb_pretty_print_insn): Remove declaration.
2068         (gdb_disassemble_info): Likewise.
2069         * guile/scm-disasm.c (class gdbscm_disassembler): New.
2070         (gdbscm_disasm_read_memory_worker): Update.
2071         (gdbscm_disasm_read_memory): Update.
2072         (gdbscm_disasm_memory_error): Remove.
2073         (gdbscm_disasm_print_address): Remove.
2074         (gdbscm_disassembler::gdbscm_disassembler): New.
2075         (gdbscm_print_insn_from_port): Update.
2076         * mips-tdep.c: Include disasm.h.
2077         (gdb_print_insn_mips): Update code to get gdbarch.
2078         * record-btrace.c (btrace_insn_history): Update.
2079         * spu-tdep.c: Include disasm.h.
2080         (struct spu_dis_asm_data): Remove.
2081         (struct spu_dis_asm_info): New.
2082         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
2083         SPU id.
2084         (gdb_print_insn_spu): Cast disassemble_info to
2085         spu_dis_asm_info.
2086
2087 2017-01-26  Yao Qi  <yao.qi@linaro.org>
2088
2089         * disasm.c (do_ui_file_delete): Delete.
2090         (gdb_insn_length): Move code creating stream to ...
2091         * utils.c (null_stream): ... here.  New function.
2092         * utils.h (null_stream): Declare.
2093
2094 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
2095
2096         * python/py-inferior.c (find_thread_object): Return directly
2097         from the loop.  Remove "found" variable.
2098
2099 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
2100
2101         GDB 7.12.1 released.
2102
2103 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
2104
2105         * python/py-function.c (fnpy_call): Reorder declarations to have
2106         the gdbpy_enter object declared first.
2107         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
2108
2109 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
2110
2111         PR python/21068
2112         * python/python-internal.h (PyMem_RawMalloc): Define for
2113         Python < 3.4.
2114         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
2115         PyMem_RawMalloc instead of PyMem_Malloc.
2116
2117 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
2118             Luis Machado  <lgustavo@codesourcery.com>
2119
2120         * NEWS (New commands): Mention flash-erase.
2121         (New MI commands): Mention target-flash-erase.
2122         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
2123         command.
2124         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
2125         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
2126         * target.c (flash_erase_command): New function.
2127         (initialize_targets): Add new flash-erase command.
2128         * target.h (flash_erase_command): New declaration.
2129
2130 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
2131
2132         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
2133         HAVE_SYS_PROCFS_H is defined.
2134
2135 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
2136
2137         * remote.c (struct cached_reg): Change data into a pointer.
2138         * (stop_reply_dtr): Free data pointers before deleting vector.
2139         (process_stop_reply): Likewise.
2140         (remote_parse_stop_reply): Allocate space for data
2141
2142 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
2143
2144         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
2145         MAX_REGISTER_SIZE.
2146         (amd64_pseudo_register_read_value): Likewise.
2147         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
2148         (store_register_using_P): Likewise.
2149         * regcache.c (regcache_xfer_part): Likewise.
2150
2151 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
2152
2153         Split real and pseudo registers.
2154         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
2155         (sparc32_pseudo_regnum): New enum.
2156         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
2157         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
2158         (SPARC32_CP0_REGISTERS): New macro.
2159         (sparc32_pseudo_register_name): New function.
2160         (sparc32_register_name): Use sparc32_pseudo_register_name.
2161         (sparc32_pseudo_register_type): New function.
2162         (sparc32_register_type): Use sparc32_pseudo_register_type.
2163         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
2164         pseudo register numbers.
2165         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
2166         (SPARC64_CP0_REGISTERS): New macro.
2167         (sparc64_pseudo_register_name): New function.
2168         (sparc64_register_name): Use sparc64_pseudo_register_name.
2169         (sparc64_pseudo_register_type): New function.
2170         (sparc64_register_type): Use sparc64_pseudo_register_type.
2171         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
2172         pseudo register numbers.
2173         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
2174         sparc64_store_arguments): Handle pseudo register numbers.
2175
2176 2017-01-13  Yao Qi  <yao.qi@linaro.org>
2177
2178         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
2179         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
2180         output.
2181         (getpkt_or_notif_sane_1): Likewise.
2182
2183 2017-01-13  Yao Qi  <yao.qi@linaro.org>
2184
2185         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
2186         of CC.  Pass "-x c++-header" instead of "-x c".
2187
2188 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
2189
2190         * remote.c (remote_can_async_p): Update comment.
2191
2192 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
2193
2194         * linux-nat.c (linux_nat_can_async_p): Update comment.
2195
2196 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
2197
2198         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
2199
2200 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
2201
2202         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
2203
2204 2017-01-10  Tom Tromey  <tom@tromey.com>
2205
2206         * python/py-type.c (typy_legacy_template_argument): Update.
2207         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
2208         ~demangle_parse_info): Declare new members.
2209         (cp_demangled_name_to_comp): Return unique_ptr.
2210         (cp_demangled_name_parse_free)
2211         (make_cleanup_cp_demangled_name_parse_free)
2212         (cp_new_demangle_parse_info): Remove.
2213         * cp-support.c (do_demangled_name_parse_free_cleanup)
2214         (make_cleanup_cp_demangled_name_parse_free): Remove.
2215         (inspect_type, cp_canonicalize_string_full)
2216         (cp_canonicalize_string): Update.
2217         (mangled_name_to_comp): Change return type.
2218         (cp_class_name_from_physname, method_name_from_physname)
2219         (cp_func_name, cp_remove_params): Update.
2220         * cp-name-parser.y (demangle_parse_info): New constructor, from
2221         cp_new_demangle_parse_info.
2222         (~demangle_parse_info): New destructor, from
2223         cp_demangled_name_parse_free.
2224         (cp_merge_demangle_parse_infos): Update.
2225         (cp_demangled_name_to_comp): Change return type.
2226
2227 2017-01-10  Tom Tromey  <tom@tromey.com>
2228
2229         * top.c (prevent_dont_repeat): Change return type.
2230         * python/python.c (execute_gdb_command): Use std::string.
2231         Update.
2232         * guile/guile.c (gdbscm_execute_gdb_command): Update.
2233         * command.h (prevent_dont_repeat): Change return type.
2234         * breakpoint.c (bpstat_do_actions_1): Update.
2235
2236 2017-01-10  Tom Tromey  <tom@tromey.com>
2237
2238         * value.h (scoped_value_mark::~scoped_value_mark): Call
2239         free_to_mark.
2240         (scoped_value_mark::free_to_mark): New method.
2241         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
2242         scoped_value_mark.
2243
2244 2017-01-10  Tom Tromey  <tom@tromey.com>
2245
2246         * python/py-value.c (valpy_dereference, valpy_referenced_value)
2247         (valpy_reference_value, valpy_const_value, valpy_get_address)
2248         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
2249         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
2250         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
2251         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
2252         scoped_value_mark.
2253         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
2254         * value.h (scoped_value_mark): New class.
2255
2256 2017-01-10  Tom Tromey  <tom@tromey.com>
2257
2258         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
2259         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
2260         * psymtab.c (discard_psymtabs_upto): Remove.
2261         (make_cleanup_discard_psymtabs): Remove.
2262         (struct psymtab_state): Remove.
2263
2264 2017-01-10  Tom Tromey  <tom@tromey.com>
2265
2266         * record-full.c (record_full_save_cleanups): Remove.
2267         (record_full_save): Use gdb::unlinker.
2268         * gcore.c (do_bfd_delete_cleanup): Remove.
2269         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
2270         cleanups.
2271         * dwarf2read.c (unlink_if_set): Remove.
2272         (write_psymtabs_to_index): Use gdb::unlinker.
2273         * common/gdb_unlinker.h: New file.
2274
2275 2017-01-10  Tom Tromey  <tom@tromey.com>
2276
2277         * windows-tdep.c (windows_xfer_shared_library): Update.
2278         * windows-nat.c (windows_make_so): Update.
2279         * utils.h (make_cleanup_bfd_unref): Remove.
2280         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
2281         * symfile.h (symfile_bfd_open)
2282         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
2283         * symfile.c (read_symbols, symbol_file_add)
2284         (separate_debug_file_exists): Update.
2285         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
2286         (generic_load, reread_symbols): Update.
2287         * symfile-mem.c (symbol_file_add_from_memory): Update.
2288         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
2289         (spu_symbol_file_add_from_memory): Update.
2290         * solist.h (struct target_so_ops) <bfd_open>: Return
2291         gdb_bfd_ref_ptr.
2292         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
2293         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
2294         gdb_bfd_ref_ptr.
2295         (solib_map_sections, reload_shared_libraries_1): Update.
2296         * solib-svr4.c (enable_break): Update.
2297         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
2298         * solib-frv.c (enable_break2): Update.
2299         * solib-dsbt.c (enable_break): Update.
2300         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
2301         gdb_bfd_ref_ptr.
2302         (darwin_solib_get_all_image_info_addr_at_init): Update.
2303         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
2304         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
2305         * record-full.c (record_full_save): Update.
2306         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
2307         * procfs.c (insert_dbx_link_bpt_in_file): Update.
2308         * minidebug.c (find_separate_debug_file_in_section): Return
2309         gdb_bfd_ref_ptr.
2310         * machoread.c (macho_add_oso_symfile): Change abfd to
2311         gdb_bfd_ref_ptr.
2312         (macho_symfile_read_all_oso): Update.
2313         (macho_check_dsym): Return gdb_bfd_ref_ptr.
2314         (macho_symfile_read): Update.
2315         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
2316         (jit_bfd_try_read_symtab): Update.
2317         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2318         (gdb_bfd_openw, gdb_bfd_openr_iovec)
2319         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
2320         gdb_bfd_ref_ptr.
2321         (gdb_bfd_ref_policy): New struct.
2322         (gdb_bfd_ref_ptr): New typedef.
2323         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2324         (gdb_bfd_openw, gdb_bfd_openr_iovec)
2325         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
2326         gdb_bfd_ref_ptr.
2327         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
2328         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
2329         (gcore_command): Update.
2330         * exec.c (exec_file_attach): Update.
2331         * elfread.c (elf_symfile_read): Update.
2332         * dwarf2read.c (dwarf2_get_dwz_file): Update.
2333         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
2334         (open_and_init_dwo_file): Update.
2335         (open_dwp_file): Return gdb_bfd_ref_ptr.
2336         (open_and_init_dwp_file): Update.
2337         * corelow.c (core_open): Update.
2338         * compile/compile-object-load.c (compile_object_load): Update.
2339         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
2340         * coffread.c (coff_symfile_read): Update.
2341         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
2342         gdb_bfd_ref_ptr.  Rename.
2343         (dump_bfd_file, restore_command): Update.
2344         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
2345         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
2346         (find_separate_debug_file_by_buildid): Update.
2347
2348 2017-01-10  Tom Tromey  <tom@tromey.com>
2349
2350         * common/gdb_ref_ptr.h: New file.
2351         * python/py-ref.h (struct gdbpy_ref_policy): New.
2352         (gdbpy_ref): Now a typedef.
2353
2354 2017-01-10  Tom Tromey  <tom@tromey.com>
2355
2356         * utils.h (make_cleanup_htab_delete): Don't declare.
2357         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
2358         Remove.
2359         * linespec.c (decode_compound_collector): Add constructor,
2360         destructor.
2361         (lookup_prefix_sym): Remove cleanup.
2362         (symtab_collector): Add constructor, destructor.
2363         (collect_symtabs_from_filename): Remove cleanup.
2364         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
2365         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2366         Use htab_up.
2367         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
2368         * dwarf2read.c (dw2_expand_symtabs_matching)
2369         (dw2_map_symbol_filenames, dwarf_decode_macros)
2370         (write_psymtabs_to_index): Use htab_up.
2371         * dwarf2loc.c (func_verify_no_selftailcall)
2372         (call_site_find_chain_1, func_verify_no_selftailcall)
2373         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
2374         std::vector, gdb::unique_xmalloc_ptr.
2375         (call_sitep): Remove typedef.
2376         (dwarf2_locexpr_baton_eval): Remove unused variable.
2377
2378 2017-01-10  Tom Tromey  <tom@tromey.com>
2379
2380         * python/python-internal.h (make_cleanup_py_decref)
2381         (make_cleanup_py_xdecref): Don't declare.
2382         * python/py-utils.c (py_decref, make_cleanup_py_decref)
2383         (py_xdecref, make_cleanup_py_xdecref): Remove.
2384
2385 2017-01-10  Tom Tromey  <tom@tromey.com>
2386
2387         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
2388         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
2389
2390 2017-01-10  Tom Tromey  <tom@tromey.com>
2391
2392         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
2393
2394 2017-01-10  Tom Tromey  <tom@tromey.com>
2395
2396         * python/py-utils.c (unicode_to_encoded_string)
2397         (python_string_to_target_string)
2398         (python_string_to_target_python_string)
2399         (python_string_to_host_string, gdbpy_obj_to_string)
2400         (get_addr_from_python): Use gdbpy_ref.
2401
2402 2017-01-10  Tom Tromey  <tom@tromey.com>
2403
2404         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
2405         gdbpy_ref.
2406
2407 2017-01-10  Tom Tromey  <tom@tromey.com>
2408
2409         * python/python.c (eval_python_command, gdbpy_decode_line)
2410         (gdbpy_run_events, gdbpy_start_type_printers)
2411         (gdbpy_apply_type_printers): Use gdbpy_ref.
2412
2413 2017-01-10  Tom Tromey  <tom@tromey.com>
2414
2415         * python/py-param.c (get_doc_string, compute_enum_values): Use
2416         gdbpy_ref.
2417
2418 2017-01-10  Tom Tromey  <tom@tromey.com>
2419
2420         * python/py-inferior.c (find_thread_object, build_inferior_list):
2421         Use gdbpy_ref.
2422
2423 2017-01-10  Tom Tromey  <tom@tromey.com>
2424
2425         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
2426
2427 2017-01-10  Tom Tromey  <tom@tromey.com>
2428
2429         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
2430         gdbpy_ref.
2431
2432 2017-01-10  Tom Tromey  <tom@tromey.com>
2433
2434         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
2435         extra incref.
2436         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
2437         Use gdbpy_ref.
2438
2439 2017-01-10  Tom Tromey  <tom@tromey.com>
2440
2441         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
2442         gdbpy_ref.
2443
2444 2017-01-10  Tom Tromey  <tom@tromey.com>
2445
2446         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
2447         decref results of PyArg_ParseTupleAndKeywords.
2448
2449 2017-01-10  Tom Tromey  <tom@tromey.com>
2450
2451         * python/python.c (python_run_simple_file): Use
2452         unique_xmalloc_ptr, gdbpy_ref.
2453
2454 2017-01-10  Tom Tromey  <tom@tromey.com>
2455
2456         * python/py-prettyprint.c (print_stack_unless_memory_error)
2457         (print_string_repr, print_children): Use gdbpy_ref.
2458         (dummy_python_frame): New class.
2459         (dummy_python_frame::dummy_python_frame): Rename from
2460         push_dummy_python_frame.
2461         (py_restore_tstate): Remove.
2462
2463 2017-01-10  Tom Tromey  <tom@tromey.com>
2464
2465         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
2466
2467 2017-01-10  Tom Tromey  <tom@tromey.com>
2468
2469         * python/python.c (ensure_python_env, restore_python_env):
2470         Remove.
2471         * python/python-internal.h (ensure_python_env): Don't declare.
2472         * varobj.h (varobj_ensure_python_env): Don't declare.
2473         * varobj.c (varobj_ensure_python_env): Remove.
2474
2475 2017-01-10  Tom Tromey  <tom@tromey.com>
2476
2477         * varobj.c (varobj_value_get_print_value): Use
2478         gdbpy_enter_varobj.
2479
2480 2017-01-10  Tom Tromey  <tom@tromey.com>
2481
2482         * python/py-prettyprint.c (print_string_repr, print_children):
2483         Update.
2484         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
2485         of "encoding".
2486         * varobj.c (varobj_value_get_print_value): Update.
2487         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
2488
2489 2017-01-10  Tom Tromey  <tom@tromey.com>
2490
2491         * varobj.c (varobj_get_display_hint)
2492         (dynamic_varobj_has_child_method, install_new_value_visualizer)
2493         (varobj_set_visualizer, free_variable): Use
2494         gdbpy_enter_varobj.
2495
2496 2017-01-10  Tom Tromey  <tom@tromey.com>
2497
2498         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
2499         (do_finish_initialization): New function.  Use gdbpy_ref.
2500         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
2501         do_finish_initialization.
2502
2503 2017-01-10  Tom Tromey  <tom@tromey.com>
2504
2505         * python/py-param.c (get_set_value, get_show_value): Use
2506         gdbpy_enter, gdbpy_ref.
2507
2508 2017-01-10  Tom Tromey  <tom@tromey.com>
2509
2510         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
2511
2512 2017-01-10  Tom Tromey  <tom@tromey.com>
2513
2514         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
2515
2516 2017-01-10  Tom Tromey  <tom@tromey.com>
2517
2518         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
2519         Use gdbpy_enter_varobj.
2520
2521 2017-01-10  Tom Tromey  <tom@tromey.com>
2522
2523         * varobj.c (gdbpy_enter_varobj): New constructor.
2524         * python/python-internal.h (gdbpy_enter_varobj): New class.
2525         * python/py-varobj.c (py_varobj_get_iterator): Use
2526         gdbpy_enter_varobj.
2527
2528 2017-01-10  Tom Tromey  <tom@tromey.com>
2529
2530         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
2531         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
2532         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
2533         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
2534         unique_xmalloc_ptr.
2535         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
2536
2537 2017-01-10  Tom Tromey  <tom@tromey.com>
2538
2539         * python/py-xmethods.c (invoke_match_method): Use
2540         gdbpy_ref.
2541
2542 2017-01-10  Tom Tromey  <tom@tromey.com>
2543
2544         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
2545         gdbpy_enter, gdbpy_ref.
2546
2547 2017-01-10  Tom Tromey  <tom@tromey.com>
2548
2549         * python/python.c (python_interactive_command): Use gdbpy_enter.
2550
2551 2017-01-10  Tom Tromey  <tom@tromey.com>
2552
2553         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
2554         gdbpy_ref.
2555
2556 2017-01-10  Tom Tromey  <tom@tromey.com>
2557
2558         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
2559         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
2560
2561 2017-01-10  Tom Tromey  <tom@tromey.com>
2562
2563         * utils.h (htab_deleter): New struct.
2564         (htab_up): New typedef.
2565         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
2566         gdbpy_enter, gdbpy_ref, htab_up.
2567
2568 2017-01-10  Tom Tromey  <tom@tromey.com>
2569
2570         * python/py-unwind.c (pending_frame_invalidate): Remove.
2571         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
2572
2573 2017-01-10  Tom Tromey  <tom@tromey.com>
2574
2575         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
2576         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
2577
2578 2017-01-10  Tom Tromey  <tom@tromey.com>
2579
2580         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
2581
2582 2017-01-10  Tom Tromey  <tom@tromey.com>
2583
2584         * python/python.c (gdbpy_eval_from_control_command)
2585         (gdbpy_source_script, gdbpy_run_events)
2586         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
2587         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
2588         gdbpy_enter.
2589
2590 2017-01-10  Tom Tromey  <tom@tromey.com>
2591
2592         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
2593
2594 2017-01-10  Tom Tromey  <tom@tromey.com>
2595
2596         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
2597
2598 2017-01-10  Tom Tromey  <tom@tromey.com>
2599
2600         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
2601         (python_on_inferior_call_pre, python_on_inferior_call_post)
2602         (python_on_memory_change, python_on_register_change)
2603         (python_inferior_exit, python_new_objfile, add_thread_object)
2604         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
2605
2606 2017-01-10  Tom Tromey  <tom@tromey.com>
2607
2608         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
2609         (bpfinishpy_handle_exit): Use gdbpy_enter.
2610
2611 2017-01-10  Tom Tromey  <tom@tromey.com>
2612
2613         * python/py-cmd.c (cmdpy_destroyer)
2614         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
2615         gdbpy_enter.
2616
2617 2017-01-10  Tom Tromey  <tom@tromey.com>
2618
2619         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
2620         gdbpy_enter.
2621         (gdbpy_breakpoint_has_cond): Likewise.
2622
2623 2017-01-10  Tom Tromey  <tom@tromey.com>
2624
2625         * python/python.c (gdbpy_enter): New constructor.
2626         (~gdbpy_enter): New destructor.
2627         (restore_python_env, ensure_python_env): Rewrite.
2628         * python/python-internal.h (gdbpy_enter): New class.
2629
2630 2017-01-10  Tom Tromey  <tom@tromey.com>
2631
2632         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
2633
2634 2017-01-10  Tom Tromey  <tom@tromey.com>
2635
2636         * python/py-value.c (value_has_field, get_field_flag)
2637         (get_field_type, valpy_getitem, convert_value_from_python): Use
2638         gdbpy_ref.
2639
2640 2017-01-10  Tom Tromey  <tom@tromey.com>
2641
2642         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
2643         gdbpy_ref.
2644
2645 2017-01-10  Tom Tromey  <tom@tromey.com>
2646
2647         * python/py-prettyprint.c (search_pp_list)
2648         (find_pretty_printer_from_objfiles)
2649         (find_pretty_printer_from_progspace)
2650         (find_pretty_printer_from_gdb, find_pretty_printer)
2651         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
2652         gdbpy_ref.
2653
2654 2017-01-10  Tom Tromey  <tom@tromey.com>
2655
2656         * python/py-param.c (call_doc_function): Use gdbpy_ref.
2657
2658 2017-01-10  Tom Tromey  <tom@tromey.com>
2659
2660         * python/py-linetable.c (build_line_table_tuple_from_pcs)
2661         (ltpy_get_all_source_lines): Use gdbpy_ref.
2662
2663 2017-01-10  Tom Tromey  <tom@tromey.com>
2664
2665         * python/py-framefilter.c (extract_sym, extract_value)
2666         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
2667         gdbpy_ref.
2668
2669 2017-01-10  Tom Tromey  <tom@tromey.com>
2670
2671         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
2672
2673 2017-01-10  Tom Tromey  <tom@tromey.com>
2674
2675         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
2676
2677 2017-01-10  Tom Tromey  <tom@tromey.com>
2678
2679         * python/py-function.c (convert_values_to_python, fnpy_init): Use
2680         gdbpy_ref.
2681
2682 2017-01-10  Tom Tromey  <tom@tromey.com>
2683
2684         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
2685
2686 2017-01-10  Tom Tromey  <tom@tromey.com>
2687
2688         * python/py-type.c (convert_field, make_fielditem, typy_fields)
2689         (typy_range): Use gdbpy_ref.
2690
2691 2017-01-10  Tom Tromey  <tom@tromey.com>
2692
2693         * python/py-threadevent.c (create_thread_event_object): Use
2694         gdbpy_ref.
2695         * python/py-stopevent.c (create_stop_event_object): Simplify.
2696         (emit_stop_event): Use gdbpy_ref.
2697         * python/py-signalevent.c (create_signal_event_object): Use
2698         gdbpy_ref.
2699         * python/py-newobjfileevent.c (create_new_objfile_event_object)
2700         (emit_new_objfile_event, create_clear_objfiles_event_object)
2701         (emit_clear_objfiles_event): Use gdbpy_ref.
2702         * python/py-infevents.c (create_inferior_call_event_object)
2703         (create_register_changed_event_object)
2704         (create_memory_changed_event_object, emit_inferior_call_event)
2705         (emit_memory_changed_event, emit_register_changed_event): Use
2706         gdbpy_ref.
2707         * python/py-exitedevent.c (create_exited_event_object)
2708         (emit_exited_event): Use gdbpy_ref.
2709         * python/py-event.h (evpy_emit_event): Remove
2710         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
2711         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
2712         * python/py-continueevent.c (emit_continue_event): Use
2713         gdbpy_ref.
2714         * python/py-breakpoint.c (gdbpy_breakpoint_created)
2715         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
2716         gdbpy_ref.
2717         * python/py-bpevent.c (create_breakpoint_event_object): Use
2718         gdbpy_ref.
2719
2720 2017-01-10  Tom Tromey  <tom@tromey.com>
2721
2722         * python/py-ref.h: New file.
2723
2724 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
2725
2726         * cli-out.c (cli_ui_out::do_redirect): Change return type to
2727         void.
2728         * cli-out.h (cli_ui_out::do_redirect): Likewise.
2729         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
2730         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
2731         * ui-out.c (ui_out::redirect): Likewise.
2732         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
2733         * cli/cli-logging.c (set_logging_redirect): Update call site of
2734         ui_out::redirect.
2735         (handle_redirections): Likewise.
2736         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
2737         * top.c (execute_command_to_string): Likewise.
2738         * utils.c (do_ui_out_redirect_pop): Likewise.
2739
2740 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
2741
2742         * stack.c (_initialize_stack): Update "frame" command help message.
2743
2744 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
2745
2746         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
2747
2748 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2749
2750         * x86-linux-nat.h: Include gdb_proc_service.h.
2751
2752 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2753
2754         * ser-base.h: Include serial.h.
2755
2756 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2757
2758         * ppc-linux-tdep.h: Include ppc-tdep.h.
2759
2760 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2761
2762         * nat/amd64-linux-siginfo.h: Include signal.h.
2763
2764 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2765
2766         * nat/aarch64-linux-hw-point.h: Include break-common.h.
2767
2768 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2769
2770         * mi/mi-parse.h: Include mi-cmds.h.
2771
2772 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2773
2774         * inf-loop.c: Don't include "target.h".
2775         * inf-loop.h: Include it here.
2776
2777 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2778
2779         * dfp.h: Include "dboulest.h" and "expression.h".
2780
2781 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2782
2783         * ax-gdb.h: Include "ax.h".
2784
2785 2017-01-06  Yao Qi  <yao.qi@linaro.org>
2786
2787         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
2788         with nat/gdb_ptrace.h.
2789
2790 2017-01-05  Yao Qi  <yao.qi@linaro.org>
2791
2792         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
2793         new line.
2794         (mips64_fbsd_sigframe_init): Likewise.
2795
2796 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
2797
2798         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
2799         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
2800
2801 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
2802
2803         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
2804         * NEWS: Mention new FreeBSD/mips native configuration.
2805         * config/mips/fbsd.mh: New file.
2806         * configure.host: Add mips*-*-freebsd*.
2807         * mips-fbsd-nat.c: New file.
2808
2809 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
2810
2811         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
2812         (ALLDEPFILES): Add mips-fbsd-tdep.c.
2813         * NEWS: Mention new FreeBSD/mips target.
2814         * configure.tgt: Add mips*-*-freebsd*.
2815         * mips-fbsd-tdep.c: New file.
2816         * mips-fbsd-tdep.h: New file.
2817
2818 2017-01-04  Yao Qi  <yao.qi@linaro.org>
2819
2820         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
2821         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
2822
2823 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
2824
2825         Update copyright year range in all GDB files.
2826
2827 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
2828
2829         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
2830
2831 For older changes see ChangeLog-2016.
2832 \f
2833 Local Variables:
2834 mode: change-log
2835 left-margin: 8
2836 fill-column: 74
2837 version-control: never
2838 coding: utf-8
2839 End: