Clear GDB internal state after each unit test
[external/binutils.git] / gdb / ChangeLog
1 2017-05-24  Yao Qi  <yao.qi@linaro.org>
2
3         * selftest-arch.c (tests_with_arch): Call registers_changed
4         and reinit_frame_cache.
5         * selftest.c (run_self_tests): Likewise.
6
7 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8
9         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11
12 2017-05-24  Yao Qi  <yao.qi@linaro.org>
13
14         * rl78-tdep.c (rl78_gdbarch_init): Don't call
15         set_gdbarch_print_insn.
16
17 2017-05-24  Yao Qi  <yao.qi@linaro.org>
18
19         * h8300-tdep.c (h8300_gdbarch_init): Don't call
20         set_gdbarch_print_insn.
21
22 2017-05-24  Yao Qi  <yao.qi@linaro.org>
23
24         * alpha-tdep.c (alpha_gdbarch_init): Don't call
25         set_gdbarch_print_insn.
26         * arc-tdep.c (arc_gdbarch_init): Likewise.
27         * arch-utils.c: include dis-asm.h.
28         (default_print_insn): New function.
29         * arch-utils.h (default_print_insn): Declare.
30         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
31         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
32         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
33         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
34         * frv-tdep.c (frv_gdbarch_init): Likewise.
35         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
36         * gdbarch.sh (print_insn): Use default_print_insn.
37         * gdbarch.c: Regenerated.
38         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
39         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
40         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
41         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
42         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
43         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
44         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
45         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
46         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
47         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
48         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
49         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
50         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
51         * mt-tdep.c (mt_gdbarch_init): Likewise.
52         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
53         * nios2-tdep.c (nios2_print_insn): Remove.
54         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
55         * rx-tdep.c (rx_gdbarch_init): Likewise.
56         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
57         * score-tdep.c (score_print_insn): Remove.
58         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
59         * sh-tdep.c (sh_gdbarch_init): Likewise.
60         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
61         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
62         * tic6x-tdep.c (tic6x_print_insn): Remove.
63         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
64         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
65         * v850-tdep.c (v850_gdbarch_init): Likewise.
66         * vax-tdep.c (vax_gdbarch_init): Likewise.
67         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
68         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
69
70 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
71
72         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
73         (MIPS_FP0_REGNUM): Remove.
74         (MIPS_FSR_REGNUM): Remove.
75         (mips_fbsd_supply_fpregs): Use mips_regnum.
76         (mips_fbsd_supply_gregs): Likewise.
77         (mips_fbsd_collect_fpregs): Likewise.
78         (mips_fbsd_collect_gregs): Likewise.
79
80 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
81
82         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
83         (getpfpregs_supplies): New function.
84         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
85         getfpregs_supplies.
86         (mips_fbsd_store_inferior_registers): Likewise.
87
88 2017-05-22  Pedro Alves <palves@redhat.com>
89
90         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
91         maintainer.
92
93 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
94
95         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
96         (store_register): Likewise.
97         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
98         (get_decimal_float_return_value): Likewise.
99         (do_ppc_sysv_return_value): Likewise.
100         (ppc64_sysv_abi_push_integer): Likewise.
101         (ppc64_sysv_abi_push_freg): Likewise.
102         (ppc64_sysv_abi_return_value_base): Likewise.
103         (ppc64_sysv_abi_return_value): Likewise.
104         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
105         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
106         * rs6000-nat.c: Likewise.
107         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
108         (rs6000_value_to_register): Likewise.
109         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
110
111 2017-05-21  Tom Tromey  <tom@tromey.com>
112
113         PR rust/21466:
114         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
115         arrays as "[T]", not "[T; ]".
116
117 2017-05-19  Tom Tromey  <tom@tromey.com>
118
119         PR rust/21484:
120         * rust-lang.c (exp_descriptor_rust): New function.
121         (rust_language_defn): Use it.
122         * p-lang.c (pascal_language_defn): Update.
123         * opencl-lang.c (opencl_language_defn): Update.
124         * objc-lang.c (objc_language_defn): Update.
125         * m2-lang.c (m2_language_defn): Update.
126         * language.h (struct language_defn)
127         <la_watch_location_expression>: New member.
128         * language.c (unknown_language_defn, auto_language_defn)
129         (local_language_defn): Update.
130         * go-lang.c (go_language_defn): Update.
131         * f-lang.c (f_language_defn): Update.
132         * d-lang.c (d_language_defn): Update.
133         * c-lang.h (c_watch_location_expression): Declare.
134         * c-lang.c (c_watch_location_expression): New function.
135         (c_language_defn, cplus_language_defn, asm_language_defn)
136         (minimal_language_defn): Use it.
137         * breakpoint.c (watch_command_1): Call
138         la_watch_location_expression.
139         * ada-lang.c (ada_language_defn): Update.
140
141 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
142
143         PR tui/21482
144         * gdb_curses.h (NOMACROS): Define.
145         (NCURSES_NOMACROS): Define.
146
147 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
148
149         PR tui/21482
150         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
151         arg to char *.
152         * tui/tui-wingeneral.c (box_win): Likewise.
153         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
154         (tui_show_source_line): Likewise.
155         (tui_show_exec_info_content): Likewise.
156
157 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
158
159         * sparc-tdep.c (sparc_structure_return_p)
160         (sparc_arg_on_registers_p): New functions.
161         (sparc32_store_arguments): Use them.
162         * sparc64-tdep.c (sparc64_16_byte_align_p)
163         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
164         Handle TYPE_CODE_ARRAY.
165
166 2017-05-17  Yao Qi  <yao.qi@linaro.org>
167
168         * cli/cli-decode.c (add_alias_cmd): New function.
169         * command.h (add_alias_cmd): Declare.
170         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
171         instead call add_alias_cmd.
172
173 2017-05-17  Pedro Alves  <palves@redhat.com>
174
175         * Makefile.in (nat_extra_makefile_frag): Rename to ...
176         (nat_makefile_frag): ... this.  All references updated.
177         * configure.ac: Likewise.
178         * configure.nat: Likewise.  Enhance comments.
179         * configure: Regenerate.
180
181 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
182
183         * procfs.c (procfs_create_inferior): Change prototype to match
184         definition.
185
186 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
187
188         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
189         C++ compiler warning.
190
191 2017-05-12  Tom Tromey  <tom@tromey.com>
192
193         PR rust/21483:
194         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
195         recurse, just call value_struct_elt directly.
196
197 2017-05-12  Tom Tromey  <tom@tromey.com>
198
199         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
200         OP_RUST_ARRAY>: Fix.
201
202 2017-05-12  Tom Tromey  <tom@tromey.com>
203
204         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
205
206 2017-05-09  Yao Qi  <yao.qi@linaro.org>
207
208         * regcache.c: Include <forward_list>.
209         (struct regcache_list): Remove.
210         (current_regcache): Update.
211         (get_thread_arch_aspace_regcache): Update for std::forward_list.
212         (regcache_thread_ptid_changed): Likewise.
213         (registers_changed_ptid): Likewise.
214         (current_regcache_size): Likewise.
215
216 2017-05-09  Yao Qi  <yao.qi@linaro.org>
217
218         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
219         (current_regcache_size): New function.
220         (current_regcache_test): New function.
221         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
222
223 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
224
225         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
226         (print_gp_register_row): Use get_frame_register_value.
227
228 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
229
230         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
231         (mips_supply_fpregset): Likewise.
232         (mips64_supply_gregset): Likewise.
233
234 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
235
236         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
237         regcache->raw_supply_zeroed.
238
239 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
240
241         * configure.nat: Rearrange 'case' statements to match
242         host before cpu.
243
244 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
245
246         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
247         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
248         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
249         "@nat_extra_makefile_frag@".
250         (Makefile): Remove dependency on "@frags@".
251         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
252         (data-directory/Makefile): Likewise.
253         * config/aarch64/linux.mh: Deleted; moved contents to
254         "gdb/configure.nat".
255         * config/alpha/alpha-linux.mh: Likewise.
256         * config/alpha/nbsd.mh: Likewise.
257         * config/arm/linux.mh: Likewise.
258         * config/arm/nbsdelf.mh: Likewise.
259         * config/i386/cygwin.mh: Likewise.
260         * config/i386/cygwin64.mh: Likewise.
261         * config/i386/darwin.mh: Likewise.
262         * config/i386/fbsd.mh: Likewise.
263         * config/i386/fbsd64.mh: Likewise.
264         * config/i386/go32.mh: Likewise.
265         * config/i386/i386gnu.mh: Likewise.
266         * config/i386/i386sol2.mh: Likewise.
267         * config/i386/linux.mh: Likewise.
268         * config/i386/linux64.mh: Likewise.
269         * config/i386/mingw.mh: Likewise.
270         * config/i386/mingw64.mh: Likewise.
271         * config/i386/nbsd64.mh: Likewise.
272         * config/i386/nbsdelf.mh: Likewise.
273         * config/i386/nto.mh: Likewise.
274         * config/i386/obsd.mh: Likewise.
275         * config/i386/obsd64.mh: Likewise.
276         * config/i386/sol2-64.mh: Likewise.
277         * config/ia64/linux.mh: Likewise.
278         * config/m32r/linux.mh: Likewise.
279         * config/m68k/linux.mh: Likewise.
280         * config/m68k/nbsdelf.mh: Likewise.
281         * config/m68k/obsd.mh: Likewise.
282         * config/m88k/obsd.mh: Likewise.
283         * config/mips/fbsd.mh: Likewise.
284         * config/mips/linux.mh: Likewise.
285         * config/mips/nbsd.mh: Likewise.
286         * config/mips/obsd64.mh: Likewise.
287         * config/pa/linux.mh: Likewise.
288         * config/pa/nbsd.mh: Likewise.
289         * config/pa/obsd.mh: Likewise.
290         * config/powerpc/aix.mh: Likewise.
291         * config/powerpc/fbsd.mh: Likewise.
292         * config/powerpc/linux.mh: Likewise.
293         * config/powerpc/nbsd.mh: Likewise.
294         * config/powerpc/obsd.mh: Likewise.
295         * config/powerpc/ppc64-linux.mh: Likewise.
296         * config/powerpc/spu-linux.mh: Likewise.
297         * config/s390/linux.mh: Likewise.
298         * config/sh/nbsd.mh: Likewise.
299         * config/sparc/fbsd.mh: Likewise.
300         * config/sparc/linux.mh: Likewise.
301         * config/sparc/linux64.mh: Likewise.
302         * config/sparc/nbsd64.mh: Likewise.
303         * config/sparc/nbsdelf.mh: Likewise.
304         * config/sparc/obsd64.mh: Likewise.
305         * config/sparc/sol2.mh: Likewise.
306         * config/tilegx/linux.mh: Likewise.
307         * config/vax/nbsdelf.mh: Likewise.
308         * config/vax/obsd.mh: Likewise.
309         * config/xtensa/linux.mh: Likewise.
310         * config/i386/i386gnu.mn: New file, with excerpts from
311         "config/i386/i386gnu.mh".
312         * configure: Regenerate.
313         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
314         *.mh files under "gdb/config".
315         * configure.nat: New file, with contents from the
316         "gdb/config/*/*.mh" files.
317
318 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
319
320         * btrace.c (btrace_clear): Free insn vector.
321
322 2017-05-05  Pedro Alves  <palves@redhat.com>
323
324         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
325         * configure: Regenerate.
326
327 2017-05-04  Pedro Alves  <palves@redhat.com>
328
329         * Makefile.in (SFILES): Add progspace-and-thread.c.
330         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
331         (COMMON_OBS): Add progspace-and-thread.o.
332         * breakpoint.c: Include "progspace-and-thread.h".
333         (update_inserted_breakpoint_locations)
334         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
335         Use scoped_restore_current_pspace_and_thread.
336         (create_std_terminate_master_breakpoint): Use
337         scoped_restore_current_program_space.
338         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
339         (print_breakpoint_location): Use
340         scoped_restore_current_program_space.
341         (bp_loc_is_permanent): Use
342         scoped_restore_current_pspace_and_thread.
343         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
344         (download_tracepoint_locations): Use
345         scoped_restore_current_pspace_and_thread.
346         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
347         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
348         (enum step_over_calls_kind): Moved from inferior.h.
349         (class scoped_restore_current_thread): New class.
350         * gdbthread.h (make_cleanup_restore_current_thread): Delete
351         declaration.
352         (scoped_restore_current_thread): New class.
353         * infcmd.c: Include "common/gdb_optional.h".
354         (continue_1, proceed_after_attach): Use
355         scoped_restore_current_thread.
356         (notice_new_inferior): Use scoped_restore_current_thread.
357         * inferior.c: Include "progspace-and-thread.h".
358         (restore_inferior, save_current_inferior): Delete.
359         (add_inferior_command, clone_inferior_command): Use
360         scoped_restore_current_pspace_and_thread.
361         * inferior.h (scoped_restore_current_inferior): New class.
362         * infrun.c: Include "progspace-and-thread.h" and
363         "common/gdb_optional.h".
364         (follow_fork_inferior): Use
365         scoped_restore_current_pspace_and_thread.
366         (scoped_restore_exited_inferior): New class.
367         (handle_vfork_child_exec_or_exit): Use
368         scoped_restore_exited_inferior,
369         scoped_restore_current_pspace_and_thread,
370         scoped_restore_current_thread and scoped_restore.
371         (fetch_inferior_event): Use scoped_restore_current_thread.
372         * linespec.c (decode_line_full, decode_line_1): Use
373         scoped_restore_current_program_space.
374         * mi/mi-main.c: Include "progspace-and-thread.h".
375         (exec_continue): Use scoped_restore_current_thread.
376         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
377         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
378         * proc-service.c (ps_pglobal_lookup): Use
379         scoped_restore_current_program_space.
380         * progspace-and-thread.c: New file.
381         * progspace-and-thread.h: New file.
382         * progspace.c (release_program_space, clone_program_space): Use
383         scoped_restore_current_program_space.
384         (restore_program_space, save_current_program_space)
385         (save_current_space_and_thread): Delete.
386         (switch_to_program_space_and_thread): Moved to
387         progspace-and-thread.c.
388         * progspace.h (save_current_program_space)
389         (save_current_space_and_thread): Delete declarations.
390         (scoped_restore_current_program_space): New class.
391         * remote.c (remote_btrace_maybe_reopen): Use
392         scoped_restore_current_thread.
393         * symtab.c: Include "progspace-and-thread.h".
394         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
395         * thread.c (print_thread_info_1): Use
396         scoped_restore_current_thread.
397         (struct current_thread_cleanup): Delete.
398         (do_restore_current_thread_cleanup)
399         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
400         (scoped_restore_current_thread::~scoped_restore_current_thread):
401         ... this new dtor.
402         (make_cleanup_restore_current_thread): Rename/convert to ...
403         (scoped_restore_current_thread::scoped_restore_current_thread):
404         ... this new ctor.
405         (thread_apply_all_command): Use scoped_restore_current_thread.
406         (thread_apply_command): Use scoped_restore_current_thread.
407         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
408         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
409
410 2017-05-04  Pedro Alves  <palves@redhat.com>
411
412         * thread.c (make_cleanup_restore_current_thread): Move
413         find_thread_ptid call before the is_stopped call.  Assert that the
414         thread is found.  Replace is_stopped call by checking the thread's
415         state directly.  Remove unnecessary NULL-thread check.
416
417 2017-05-04  Pedro Alves  <palves@redhat.com>
418
419         * corelow.c (thread_section_name): New class.
420         (get_core_register_section, get_core_siginfo): Use it.
421
422 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
423
424         * corelow.c (sniff_core_bfd): Remove extra semicolon.
425         (get_core_register_section): Remove xfree of NULL pointer.
426
427 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
428
429         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
430         * regcache.c (regcache::raw_supply_zeroed): New function.
431         * regcache.h (regcache::raw_supply_zeroed): New declaration.
432
433 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
434
435         * gdbarch.sh: Remove commented out definition of
436         TARGET_CHAR_BIT.
437         * gdbarch.h: Re-generate.
438
439 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
440
441         * configure: Regenerate.
442
443 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
444
445         * solib-target.c (solib_target_relocate_section_addresses):
446         Remove num_section_bases, num_bases, segment_bases variables.
447
448 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
449
450         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
451
452 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
453
454         * solib-target.c: Include <vector>
455         (struct lm_info_target) <~lm_info_target>: Remove.
456         <segment_bases, section_bases>: Change type to
457         std::vector<CORE_ADDR>.
458         (library_list_start_segment, library_list_start_section,
459         library_list_end_library,
460         solib_target_relocate_section_addresses): Adjust.
461
462 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
463
464         * gdbarch.sh (software_single_step): Change return type to
465         std::vector<CORE_ADDR>.
466         * gdbarch.c, gdbarch.h: Re-generate.
467         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
468         Adjust.
469         (arm_deal_with_atomic_sequence_raw): Adjust.
470         (thumb_get_next_pcs_raw): Adjust.
471         (arm_get_next_pcs_raw): Adjust.
472         (arm_get_next_pcs): Adjust.
473         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
474         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
475         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
476         (alpha_software_single_step): Adjust.
477         * alpha-tdep.h (alpha_software_single_step): Adjust.
478         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
479         * arm-tdep.c (arm_software_single_step): Adjust.
480         (arm_breakpoint_kind_from_current_state): Adjust.
481         * arm-tdep.h (arm_software_single_step): Adjust.
482         * breakpoint.c (insert_single_step_breakpoint): Adjust.
483         * cris-tdep.c (cris_software_single_step): Adjust.
484         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
485         (micromips_deal_with_atomic_sequence): Adjust.
486         (deal_with_atomic_sequence): Adjust.
487         (mips_software_single_step): Adjust.
488         * mips-tdep.h (mips_software_single_step): Adjust.
489         * moxie-tdep.c (moxie_software_single_step): Adjust.
490         * nios2-tdep.c (nios2_software_single_step): Adjust.
491         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
492         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
493         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
494         * s390-linux-tdep.c (s390_software_single_step): Adjust.
495         * sparc-tdep.c (sparc_software_single_step): Adjust.
496         * spu-tdep.c (spu_software_single_step): Adjust.
497         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
498
499 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
500
501         * gdbarch.sh: Use semi-colon as field separator instead of colon.
502         * gdbarch.h: Re-generate.
503
504 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
505
506         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
507         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
508         * python/py-instruction.c, python/py-instruction.h: New file.
509         * python/py-record.c: Add py-instruction.h include.
510         (gdbpy_initialize_record): Make gdb.Instruction a super class of
511         gdb.RecordInstruction.
512         * python/python-internal.h: Add gdbpy_initialize_instruction
513         declaration.
514         * python/python.c (do_start_initialization): Add
515         gdbpy_initialize_instruction.
516
517 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
518
519         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
520         Remove.
521         (btrace_func_from_recpy_func): New function.
522         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
523         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
524         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
525         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
526         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
527         Also, use new helper functions.
528         (btpy_list_item): Use new helper functions.
529         (recpy_bt_function_call_history): Use new type name.
530         (btpy_call_getset): Remove.
531         (gdbpy_initialize_btrace): Remove code to initialize
532         gdb.BtraceFunctionCall.
533         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
534         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
535         recpy_bt_func_prev, recpy_bt_func_next): New export.
536         * python/py-record.c (recpy_func_type): New static object.
537         (recpy_func_new, recpy_func_level, recpy_func_symbol,
538         recpy_func_instructions, recpy_func_up, recpy_func_prev,
539         recpy_func_next): New function.
540         (recpy_element_hash, recpy_element_richcompare): Updated comment.
541         (recpy_func_getset): New static object.
542         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
543         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
544
545 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
546
547         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
548         (btpy_object, btpy_insn_type, btpy_new): Remove.
549         (btpy_list_object): Use gdb.RecordInstruction type instead of
550         gdb.BtraceInstruction type.
551         (btrace_insn_from_recpy_insn): New function.
552         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
553         btpy_new.
554         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
555         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
556         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
557         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
558         instead of btpy_object.
559         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
560         btpy_insn_data, btpy_insn_decode): Rename to ...
561         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
562         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
563         recpy_bt_insn_decode): This.  Also, use new helper functions.
564         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
565         recpy_insn_type.
566         (btpy_insn_getset): Remove.
567         (gdbpy_initialize_btrace): Remove code to initialize
568         gdb.BtraceInstruction.  Use recpy_element_object.
569         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
570         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
571         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
572         * python/py-record.c (recpy_insn_type): New static object.
573         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
574         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
575         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
576         New function.
577         (recpy_insn_getset): New static object.
578         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
579         * python/py-record.h (recpy_element_object): New typedef.
580         (recpy_insn_type, recpy_insn_new): New export.
581
582 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
583
584         * py-record-btrace.c (btpy_insn_new): Removed.
585         (btpy_insn_or_gap_new): New function.
586         (btpy_insn_error): Removed.
587         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
588         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
589         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
590         btpy_insn_or_gap_new instead of btpy_insn_new.
591         (btpy_insn_getset): Remove btpy_insn_error.
592         * py-record.c (recpy_gap_type): New static object.
593         (recpy_gap_object): New typedef.
594         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
595         recpy_gap_reason_string): New function.
596         (recpy_gap_getset): New static object.
597         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
598         * py-record.h (recpy_gap_new): New export.
599
600 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
601
602         * python/py-record.c (recpy_ptid): Remove.
603         (recpy_record_getset): Remove recpy_ptid.
604
605 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
606
607         * btrace.c (btrace_fetch): Set inferior_ptid.
608         * python/py-record-btrace.c: Add "py-record.h" include.
609         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
610         recpy_bt_end, recpy_bt_instruction_history,
611         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
612         in gdb.Record object instead of current ptid.
613         * python/py-record.c: Include new "py-record.h" file.
614         (recpy_record_object): Moved to py-record.h.
615         * python/py-record.h: New file.
616
617 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
618
619         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
620         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
621         indentation.
622
623 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
624
625         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
626         the past maintainers section.
627
628 2017-04-28  Yao Qi  <yao.qi@linaro.org>
629
630         * infcmd.c (get_return_value): Use regcache ctor, and remove
631         cleanup.
632
633 2017-04-28  Yao Qi  <yao.qi@linaro.org>
634             Pedro Alves  <palves@redhat.com>
635
636         * regcache.c (regcache::regcache): New tag dispatch ctor.
637         (do_cooked_read): Moved above.
638         (regcache_dup): Use the tag dispatch ctor..
639         * regcache.h (regcache): Declare ctor, delete copy ctor and
640         assignment operator, remove friend regcache_dup.
641
642 2017-04-28  Yao Qi  <yao.qi@linaro.org>
643
644         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
645         call method save instead of regcache_cpy.
646         * regcache.h (struct regcache): Make regcache_dup a friend.
647
648 2017-04-28  Yao Qi  <yao.qi@linaro.org>
649
650         * regcache.c (struct regcache): Move to regcache.h
651         (regcache::arch): New method.
652         (regcache_get_ptid): Update.
653         (get_regcache_arch): Call arch method.
654         (get_regcache_aspace): Call method aspace.
655         (register_buffer): Change it to method.
656         (regcache_save): Change it to regcache::save.
657         (regcache_restore): Likewise.
658         (regcache_cpy_no_passthrough): Remove the declaration.
659         (regcache_cpy): Call methods restore and cpy_no_passthrough.
660         (regcache_cpy_no_passthrough): Change it to method
661         cpy_no_passthrough.
662         (regcache_register_status): Change it to method
663         get_register_status.
664         (regcache_invalidate): Change it to method invalidate.
665         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
666         (regcache_raw_update): Change it to method raw_update.
667         (regcache_raw_read): Likewise.
668         (regcache_raw_read_signed): Likewise.
669         (regcache_raw_read_unsigned): Likewise.
670         (regcache_raw_write_signed): Likewise.
671         (regcache_raw_write_unsigned): Likewise.
672         (regcache_cooked_read): Likewise.
673         (regcache_cooked_read_value): Likewise.
674         (regcache_cooked_read_signed): Likewise.
675         (regcache_cooked_read_unsigned): Likewise.
676         (regcache_cooked_write_signed): Likewise.
677         (regcache_cooked_write_unsigned): Likewise.
678         (regcache_raw_set_cached_value): Likewise.
679         (regcache_raw_write): Likewise.
680         (regcache_cooked_write): Likewise.
681         (regcache_xfer_part): Likewise.
682         (regcache_raw_read_part): Likewise.
683         (regcache_raw_write_part): Likewise.
684         (regcache_cooked_read_part): Likewise.
685         (regcache_cooked_write_part): Likewise.
686         (regcache_raw_supply): Likewise.
687         (regcache_raw_collect): Likewise.
688         (regcache_transfer_regset): Likewise.
689         (regcache_supply_regset): Likewise.
690         (regcache_collect_regset): Likewise.
691         (regcache_debug_print_register): Likewise.
692         (enum regcache_dump_what): Move it to regcache.h.
693         (regcache_dump): Change it to method dump.
694         * regcache.h (enum regcache_dump_what): New.
695         (class regcache): New.
696         * target.c (target_fetch_registers): Call method
697         debug_print_register.
698         (target_store_registers): Likewise.
699
700 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
701
702         * windows-nat.c (struct lm_info_windows): Initialize field.
703         (windows_make_so): Allocate lm_info_windows with new.
704         (windows_free_so): Free lm_info_windows with delete.
705
706 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
707
708         * solib-darwin.c (struct lm_info_darwin): Initialize field.
709         (darwin_current_sos): Allocate lm_info_darwin with new, remove
710         cleanup.
711         (darwin_free_so): Free lm_info_darwin with delete.
712
713 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
714
715         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
716         <l_addr_p>: Change type to bool.
717         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
718         (svr4_free_so): Free lm_info_svr4 with delete.
719         (svr4_copy_library_list): Replace memcpy with call to copy
720         constructor.
721         (library_list_start_library, svr4_default_sos): Allocate
722         lm_info_svr4 with new.
723
724 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
725
726         * solib-target.c (struct lm_info_target): Add destructor,
727         initialize fields.
728         <name>: Change type to std::string.
729         (library_list_start_library): Allocate lm_info_target with new.
730         (solib_target_free_library_list): Free lm_info_target with
731         delete.
732         (solib_target_current_sos): Adapt to std::string.
733         (solib_target_free_so): Free lm_info_target with delete.
734
735 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
736
737         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
738         fields.
739         (frv_current_sos): Allocate lm_info_frv with new.
740         (frv_relocate_main_executable): Free lm_info_frv with delete,
741         allocate with new.
742         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
743
744 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
745
746         * solib-frv.c (struct lm_info_frv): Fix indentation.
747
748 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
749
750         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
751         map field.
752         (dsbt_current_sos): Allocate lm_info_dsbt with new.
753         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
754         and allocate with new.
755         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
756
757 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
758
759         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
760         <filename, member_name>: Change type to std::string.
761         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
762         (library_list_start_library): Allocate lm_info_aix with new.
763         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
764         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
765         with copy constructor.
766
767 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
768
769         * solist.h (struct lm_info): Remove.
770         (struct lm_info_base): New class.
771         (struct so_list) <lm_info>: Change type to lm_info_base *.
772         * nto-tdep.c (struct lm_info): Remove.
773         (lm_addr): Adjust.
774         * solib-aix.c (struct lm_info): Rename to ...
775         (struct lm_info_aix): ... this.  Extend lm_info_base.
776         (lm_info_p): Rename to ...
777         (lm_info_aix_p): ... this, and adjust.
778         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
779         solib_aix_parse_libraries, library_list_start_library,
780         solib_aix_free_library_list, solib_aix_parse_libraries,
781         solib_aix_get_library_list,
782         solib_aix_relocate_section_addresses, solib_aix_free_so,
783         solib_aix_get_section_offsets,
784         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
785         Adjust.
786         (struct solib_aix_inferior_data) <library_list>: Adjust.
787         * solib-darwin.c (struct lm_info): Rename to ...
788         (struct lm_info_darwin): ... this.  Extend lm_info_base.
789         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
790         * solib-dsbt.c (struct lm_info): Rename to ...
791         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
792         (struct dsbt_info) <main_executable_lm_info): Adjust.
793         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
794         dsbt_relocate_section_addresses): Adjust.
795         * solib-frv.c (struct lm_info): Rename to ...
796         (struct lm_info_frv): ... this.  Extend lm_info_base.
797         (main_executable_lm_info): Adjust.
798         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
799         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
800         find_canonical_descriptor_in_load_object,
801         frv_fdpic_find_canonical_descriptor): Adjust.
802         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
803         to lm_info_svr4.
804         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
805         svr4_clear_so, svr4_copy_library_list,
806         library_list_start_library, svr4_default_sos, svr4_read_so_list,
807         svr4_current_sos, svr4_fetch_objfile_link_map,
808         solist_update_incremental): Adjust.
809         * solib-svr4.h (struct lm_info_svr4): Move here from
810         solib-svr4.c.
811         * solib-target.c (struct lm_info): Rename to ...
812         (struct lm_info_target): ... this.  Extend lm_info_base.
813         (lm_info_p): Rename to ...
814         (lm_info_target_p): ... this.
815         (solib_target_parse_libraries, library_list_start_segment,
816         library_list_start_section, library_list_start_library,
817         library_list_end_library, solib_target_free_library_list,
818         solib_target_current_sos, solib_target_free_so,
819         solib_target_relocate_section_addresses): Adjust.
820         * windows-nat.c (struct lm_info): Rename to ...
821         (struct lm_info_windows): ... this.  Extend lm_info_base.
822         (windows_make_so, handle_load_dll, handle_unload_dll,
823         windows_xfer_shared_libraries): Adjust.
824
825 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
826
827         * solib-darwin.c (struct darwin_so_list): Remove.
828         (darwin_current_sos): Allocate an so_list object instead of a
829         darwin_so_list, separately allocate an lm_info object.
830         (darwin_free_so): Free lm_info.
831
832 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
833
834         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
835         with fprintf_filtered.
836
837 2017-04-28  Yao Qi  <yao.qi@linaro.org>
838
839         * regcache.c (regcache::regcache): New function.
840         (regcache::~regcache): New function.
841         (regcache_xmalloc_1): Remove.
842         (regcache_xmalloc): Call new regcache.
843         (regcache_xfree): Call delete regcache.
844         (get_thread_arch_aspace_regcache): Call new regcache.
845
846 2017-04-28  Yao Qi  <yao.qi@linaro.org>
847
848         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
849         lwp instead of ptid_get_lwp.
850
851 2017-04-28  Yao Qi  <yao.qi@linaro.org>
852
853         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
854         lwp_info instead of getting from inferior_ptid.
855
856 2017-04-27  Keith Seitz  <keiths@redhat.com>
857
858         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
859         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
860         (CV_CONVERSION_BADNESS): Define.
861         (rank_one_type): Remove overly restrictive rvalue reference
862         rank checks.
863         Add cv-qualifier checks and subranks for type equality.
864         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
865         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
866         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
867
868 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
869
870         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
871         count when creating the object.
872
873 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
874             Ulrich Weigand  <uweigand@de.ibm.com>
875
876         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
877         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
878         is used in AIX.
879         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
880         (process_xcoff_symbol): Likewise.
881         (scan_xcoff_symtab): Likewise.
882
883 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
884
885         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
886         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
887         (ia64_access_reg): Use get_frame_register_unsigned.
888         (ia64_access_rse_reg): Likewise.
889         (ia64_libunwind_frame_prev_register): Likewise.
890
891 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
892
893         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
894         * gdbarch.c: Regenerated.
895         * gdbarch.h: Regenerated.
896         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
897         visibility external.
898         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
899         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
900         (enum cfa_how_kind): Move to ...
901         (struct dwarf2_frame_state_reg_info): Likewise.
902         (struct dwarf2_frame_state): Likewise.
903         * dwarf2-frame.h: ... here.
904         (dwarf2_frame_state_alloc_regs): New declaration.
905         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
906         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
907
908 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
909
910         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
911         regcache_raw_read_unsigned.
912         (xtensa_pseudo_register_write): Likewise.
913
914 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
915
916         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
917         (nds32_pseudo_register_write): Likewise.
918
919 2017-04-25  Yao Qi  <yao.qi@linaro.org>
920
921         * regcache.c (struct regcache) <readonly_p>: Change its type
922         to bool.
923         (regcache_xmalloc_1): Update parameter type and callers update.
924
925 2017-04-25  Yao Qi  <yao.qi@linaro.org>
926
927         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
928         set_gdbarch_wchar_bit.
929         * arm-tdep.c (arm_gdbarch_init): Likewise.
930
931 2017-04-25  Pedro Alves  <palves@redhat.com>
932
933         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
934         (BothAreRelocatable, memcopy, memmove): Don't define.
935         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
936         macros.
937
938 2017-04-25  Pedro Alves  <palves@redhat.com>
939
940         * common/common-defs.h: Include "common/poison.h".
941         * common/function-view.h: (Not, Or, Requires): Move to traits.h
942         and adjust.
943         * common/poison.h: New file.
944         * common/traits.h: Include <type_traits>.
945         (Not, Or, Requires): New, moved from common/function-view.h.
946
947 2017-04-25  Pedro Alves  <palves@redhat.com>
948
949         * breakpoint.h (struct breakpoint): In-class initialize all
950         fields.  Make boolean fields "bool".
951         * breakpoint.c (init_raw_breakpoint_without_location): Remove
952         memset call and initializations no longer necessary.
953
954 2017-04-25  Pedro Alves  <palves@redhat.com>
955
956         * btrace.c (pt_btrace_insn_flags): Change parameter type to
957         reference.
958         (pt_btrace_insn): New function.
959         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
960
961 2017-04-25  Pedro Alves  <palves@redhat.com>
962
963         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
964         "base" field and inherit from "bp_location" instead.  Add
965         non-default ctor.
966         (allocate_location_exception): Use new non-default ctor.
967         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
968         (init_bp_location): Convert to ...
969         (bp_location::bp_location): ... this new ctor, and remove memset
970         call.
971         (base_breakpoint_allocate_location): Use the new non-default ctor.
972         * breakpoint.h (bp_location): Now a class.  Declare default and
973         non-default ctors.  In-class initialize all members.
974         (init_bp_location): Remove declaration.
975
976 2017-04-25  Pedro Alves  <palves@redhat.com>
977
978         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
979         assignment operator.
980
981 2017-04-24  Yao Qi  <yao.qi@linaro.org>
982
983         * doublest.c (convert_doublest_to_floatformat): Call
984         floatformat_totalsize_bytes.
985
986 2017-04-22  Tom Tromey  <tom@tromey.com>
987
988         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
989         ui_out_emit_list.
990         * stack.c (print_frame): Use ui_out_emit_list.
991         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
992         ui_out_emit_list.
993         * mi/mi-main.c (print_one_inferior)
994         (mi_cmd_data_list_register_names)
995         (mi_cmd_data_list_register_values, mi_cmd_list_features)
996         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
997         ui_out_emit_list.
998         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
999         (mi_output_solib_attribs): Use ui_out_emit_list,
1000         ui_out_emit_tuple.
1001         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
1002         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
1003         (mi_cmd_stack_list_args, list_args_or_locals): Use
1004         ui_out_emit_list.
1005         * disasm.c (do_assembly_only): Use ui_out_emit_list.
1006         * breakpoint.c (print_solib_event, output_thread_groups): Use
1007         ui_out_emit_list.
1008
1009 2017-04-22  Tom Tromey  <tom@tromey.com>
1010
1011         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
1012         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
1013         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
1014
1015 2017-04-22  Tom Tromey  <tom@tromey.com>
1016
1017         * tracepoint.c (tvariables_info_1)
1018         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
1019
1020 2017-04-22  Tom Tromey  <tom@tromey.com>
1021
1022         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
1023         annotate_arg_emitter.
1024         * breakpoint.c (print_mention_watchpoint)
1025         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
1026         * annotate.h (struct annotate_arg_emitter): New.
1027
1028 2017-04-22  Tom Tromey  <tom@tromey.com>
1029
1030         * record-btrace.c (record_btrace_insn_history)
1031         (record_btrace_insn_history_range, record_btrace_call_history)
1032         (record_btrace_call_history_range): Use ui_out_emit_tuple.
1033         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
1034         ui_out_emit_tuple.
1035         * stack.c (print_frame_info): Use ui_out_emit_tuple.
1036         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
1037         * skip.c (skip_info): Use ui_out_emit_tuple.
1038         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
1039         * progspace.c (print_program_space): Use ui_out_emit_tuple.
1040         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
1041         * osdata.c (info_osdata): Use ui_out_emit_tuple.
1042         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
1043         ui_out_emit_tuple.
1044         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
1045         (output_register, mi_cmd_data_read_memory)
1046         (mi_cmd_data_read_memory_bytes, mi_load_progress)
1047         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
1048         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
1049         Use ui_out_emit_tuple.
1050         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
1051         ui_out_emit_tuple.
1052         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
1053         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
1054         * linux-thread-db.c (info_auto_load_libthread_db): Use
1055         ui_out_emit_tuple.
1056         * inferior.c (print_inferior): Use ui_out_emit_tuple.
1057         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
1058         * disasm.c (do_mixed_source_and_assembly_deprecated)
1059         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
1060         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
1061         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
1062         * breakpoint.c (print_one_breakpoint_location)
1063         (print_one_breakpoint): Use ui_out_emit_tuple.
1064         * auto-load.c (print_script, info_auto_load_cmd): Use
1065         ui_out_emit_tuple.
1066         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
1067
1068 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
1069
1070         * thread.c (print_thread_info_1): Remove dead code.
1071
1072 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1073
1074         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
1075         GDB_SELF_TEST.
1076         * arm-tdep.c (selftests::arm_record_test): Likewise.
1077
1078 2017-04-21  Yao Qi  <yao.qi@linaro.org>
1079
1080         * regcache.c (regcache_restore): Remove argument 2.  Replace
1081         argument 3 with regcache.  Get register status from
1082         src->register_status and get register contents from
1083         register_buffer (src, regnum).
1084         (regcache_cpy): Update.
1085
1086 2017-04-19  Pedro Alves  <palves@redhat.com>
1087
1088         * gdbthread.h (thread): Add missing closing parenthesis in
1089         comment.
1090
1091 2017-04-19  Pedro Alves  <palves@redhat.com>
1092
1093         * common/refcounted-object.h: New file.
1094         * gdbthread.h: Include "common/refcounted-object.h".
1095         (thread_info): Inherit from refcounted_object and add comments.
1096         (thread_info::incref, thread_info::decref)
1097         (thread_info::m_refcount): Delete.
1098         (thread_info::deletable): Use the refcounted_object::refcount()
1099         method.
1100         * inferior.c (current_inferior_): Add comment.
1101         (set_current_inferior): Increment/decrement refcounts.
1102         (prune_inferiors, remove_inferior_command): Skip inferiors marked
1103         not-deletable instead of comparing with the current inferior.
1104         (initialize_inferiors): Increment the initial inferior's refcount.
1105         * inferior.h (struct inferior): Forward declare.
1106         Include "common/refcounted-object.h".
1107         (current_inferior, set_current_inferior): Move declaration to
1108         before struct inferior's definition, and fix comment.
1109         (inferior): Inherit from refcounted_object.  Add comments.
1110         * thread.c (switch_to_thread_no_regs): Reference the thread's
1111         inferior pointer directly instead of doing a ptid lookup.
1112         (switch_to_no_thread): New function.
1113         (switch_to_thread(thread_info *)): New function, factored out
1114         from ...
1115         (switch_to_thread(ptid_t)): ... this.
1116         (restore_current_thread): Delete.
1117         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
1118         fields, and add 'inf' field.
1119         (do_restore_current_thread_cleanup): Check whether old->inf is
1120         alive instead of looking up an inferior by ptid.  Use
1121         switch_to_thread and switch_to_no_thread.
1122         (restore_current_thread_cleanup_dtor): Use old->inf directly
1123         instead of lookup up an inferior by id.  Decref the inferior.
1124         Don't restore 'removable'.
1125         (make_cleanup_restore_current_thread): Same the inferior pointer
1126         in old, instead of the inferior number.  Incref the inferior.
1127         Don't save/clear 'removable'.
1128
1129 2017-04-19  Pedro Alves  <palves@redhat.com>
1130
1131         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1132         unittests/scoped_restore-selftests.c.
1133         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
1134         * common/scoped_restore.h (scoped_restore_base): Make "class".
1135         (scoped_restore_base::release): New public method.
1136         (scoped_restore_base::scoped_restore_base): New protected ctor.
1137         (scoped_restore_base::m_saved_var): New protected field.
1138         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
1139         scoped_restore_base base class instead of m_saved_var directly.
1140         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
1141         (scoped_restore_tmpl::scoped_restore_tmpl(const
1142         scoped_restore_tmpl<T>&)): Likewise.
1143         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
1144         method.
1145         (scoped_restore_tmpl::saved_var): New method.
1146         (scoped_restore_tmpl::m_saved_var): Delete.
1147         * inferior.h (inferior::detaching): Now a bool.
1148         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
1149         cleanup.
1150         * unittests/scoped_restore-selftests.c: New file.
1151
1152 2017-04-19  Pedro Alves  <palves@redhat.com>
1153
1154         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
1155         Re-sort in alphabetic order.
1156
1157 2017-04-18  Pedro Alves  <palves@redhat.com>
1158
1159         * xml-support.c (obstack_xml_printf): Delete.
1160         * xml-support.h (obstack_xml_printf): Delete.
1161
1162 2017-04-18  Pedro Alves  <palves@redhat.com>
1163
1164         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
1165         vdebug, verror, body_text, start_element, end_element, name,
1166         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
1167         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
1168         is_xinclude>: Make private and add m_ prefix.
1169         (gdb_xml_parser::body_text): New method, based on ...
1170         (gdb_xml_body_text): ... this.  Adjust.
1171         (gdb_xml_parser::vdebug): New method, based on ...
1172         (gdb_xml_debug): ... this.  Adjust.
1173         (gdb_xml_parser::verror): New method, based on ...
1174         (gdb_xml_error): ... this.  Adjust.
1175         (gdb_xml_parser::start_element): New method, based on ...
1176         (gdb_xml_start_element): ... this.  Adjust.
1177         (gdb_xml_start_element_wrapper): Defer to
1178         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
1179         (gdb_xml_parser::end_element): New method, based on ...
1180         (gdb_xml_end_element_wrapper): ... this.  Adjust.
1181         (gdb_xml_parser::~gdb_xml_parser): Adjust.
1182         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
1183         (gdb_xml_parser::use_dtd): New method, based on ...
1184         (gdb_xml_use_dtd): ... this.  Adjust.
1185         (gdb_xml_parser::parse): New method, based on ...
1186         (gdb_xml_parse): ... this.  Adjust.
1187         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
1188         (xinclude_start_include): Adjust to call the parser's name method.
1189         (xml_xinclude_default, xml_xinclude_start_doctype)
1190         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
1191         method.
1192         (xml_process_xincludes): Adjust to call parser methods.
1193         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
1194         declarations.
1195
1196 2017-04-18  Pedro Alves  <palves@redhat.com>
1197
1198         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
1199         gdb::optional<std::string>.
1200         * xml-support.c: Include <string>.
1201         (scope_level::scope_level(scope_level &&))
1202         (scope_level::~scope_level): Delete.
1203         (scope_level::body): Now a std::string.
1204         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
1205         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
1206         parameter.
1207         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
1208         (xinclude_parsing_data::output): Now a std::string reference.
1209         (xinclude_start_include): Adjust.
1210         (xml_xinclude_default): Adjust.
1211         (xml_process_xincludes): Add 'output' parameter, and return bool.
1212         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
1213         and return bool.
1214         * xml-tdesc.c: Include <unordered_map> and <string>.
1215         (tdesc_xml_cache): Delete.
1216         (tdesc_xml_cache_s): Delete.
1217         (xml_cache): Now an std::unordered_map.
1218         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
1219         (target_fetch_description_xml): Change return type to
1220         gdb::optional<std::string>, and adjust.
1221         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
1222         (target_fetch_description_xml): Change return type to
1223         gdb::optional<std::string>.
1224
1225 2017-04-18  Pedro Alves  <palves@redhat.com>
1226
1227         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1228         unittests/optional-selftests.c.
1229         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
1230         * unittests/optional-selftests.c: New file.
1231         * unittests/optional/assignment/1.cc: New file.
1232         * unittests/optional/assignment/2.cc: New file.
1233         * unittests/optional/assignment/3.cc: New file.
1234         * unittests/optional/assignment/4.cc: New file.
1235         * unittests/optional/assignment/5.cc: New file.
1236         * unittests/optional/assignment/6.cc: New file.
1237         * unittests/optional/assignment/7.cc: New file.
1238         * unittests/optional/cons/copy.cc: New file.
1239         * unittests/optional/cons/default.cc: New file.
1240         * unittests/optional/cons/move.cc: New file.
1241         * unittests/optional/cons/value.cc: New file.
1242         * unittests/optional/in_place.cc: New file.
1243         * unittests/optional/observers/1.cc: New file.
1244         * unittests/optional/observers/2.cc: New file.
1245
1246 2017-04-18  Pedro Alves  <palves@redhat.com>
1247
1248         * common/gdb_optional.h: Include common/traits.h.
1249         (in_place_t): New type.
1250         (in_place): New constexpr variable.
1251         (optional::optional): Remove member initialization of
1252         m_instantiated.
1253         (optional::optional(in_place_t...)): New constructor.
1254         (optional::~optional): Use reset.
1255         (optional::optional(const optional&)): New.
1256         (optional::optional(const optional&&)): New.
1257         (optional::optional(T &)): New.
1258         (optional::optional(T &&)): New.
1259         (operator::operator=(const optional &)): New.
1260         (operator::operator=(optional &&)): New.
1261         (operator::operator= (const T &))
1262         (operator::operator= (T &&))
1263         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
1264         (operator::reset): New.
1265         (operator::m_instantiated):: Add in-class initializer.
1266         * common/traits.h: Include <type_traits>.
1267         (struct And): New types.
1268
1269 2017-04-18  Pedro Alves  <palves@redhat.com>
1270
1271         * xml-support.c: Include <vector>.
1272         (scope_level::scope_level(const gdb_xml_element *))
1273         (scope_level::scope_level(scope_level&&)): New.
1274         (scope_level::~scope_level): New.
1275         (scope_level_s): Delete.
1276         (gdb_xml_parser::scopes): Now a std::vector.
1277         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
1278         Use std::vector.
1279         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
1280         scope cleanup code.
1281         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
1282         of the scopes member.  Use std::vector::emplace_back.
1283
1284 2017-04-18  Pedro Alves  <palves@redhat.com>
1285
1286         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
1287         a bool.
1288         (gdb_xml_end_element): Change type of first parameter.
1289         (gdb_xml_cleanup): Rename to ...
1290         (gdb_xml_parser::~gdb_xml_parser): ... this.
1291         (gdb_xml_create_parser_and_cleanup): Delete with ...
1292         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
1293         to this new ctor.
1294         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
1295         using gdb_xml_create_parser_and_cleanup.
1296         (xinclude_parsing_data): Add ctor/dtor.
1297         (xml_xinclude_cleanup): Delete.
1298         (xml_process_xincludes): Create a local xinclude_parsing_data
1299         instead of heap-allocating one.  Create a local gdb_xml_parser
1300         instead of heap-allocating one with
1301         gdb_xml_create_parser_and_cleanup.
1302
1303 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
1304
1305         PR threads/20743
1306         * fbsd-nat.c (resume_one_thread_cb): Remove.
1307         (resume_all_threads_cb): Remove.
1308         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
1309         iterate_over_threads.
1310
1311 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
1312
1313         * NEWS: Create a new section for the next release branch.
1314         Rename the section of the current branch, now that it has
1315         been cut.
1316
1317 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
1318
1319         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
1320         * version.in: Bump version to 8.0.50.DATE-git.
1321
1322 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
1323
1324         PR gdb/21385
1325         * windows-nat.c (windows_create_inferior): Declare 'allargs'
1326         independently of the host, and fix build breakage on Cygwin.
1327
1328 2017-04-13  Pedro Alves  <palves@redhat.com>
1329
1330         * inferior.c (free_inferior): Convert to ...
1331         (inferior::~inferior): ... this dtor.
1332         (inferior::inferior): New ctor, factored out from ...
1333         (add_inferior_silent): ... here.  Allocate the inferior with a new
1334         expression.
1335         (delete_inferior): Call delete instead of free_inferior.
1336         * inferior.h (gdb_environ, continuation): Forward declare.
1337         (inferior): Now a class.  Add in-class initialization to all
1338         members.  Make boolean fields bool, except 'detaching'.
1339         (inferior::inferior): New explicit ctor.
1340         (inferior::~inferior): New.
1341
1342 2017-04-13  Pedro Alves  <palves@redhat.com>
1343
1344         * inferior.c (init_inferior_list): Delete.
1345         * inferior.h (init_inferior_list): Delete.
1346
1347 2017-04-13  Pedro Alves  <palves@redhat.com>
1348
1349         PR threads/13217
1350         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
1351         (top level): Call it twice, with different thread sets.
1352
1353 2017-04-13  Pedro Alves  <palves@redhat.com>
1354
1355         * thread.c: Include <algorithm>.
1356         (thread_array_cleanup): Delete.
1357         (scoped_inc_dec_ref): New class.
1358         (live_threads_count): New function.
1359         (set_thread_refcount): Delete.
1360         (tp_array_compar_ascending): Now a bool.
1361         (tp_array_compar): Convert to a std::sort comparison function.
1362         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
1363         and live_threads_count.
1364
1365 2017-04-13  Pedro Alves  <palves@redhat.com>
1366
1367         * infrun.c (follow_fork_inferior): Also switch the current
1368         inferior.
1369
1370 2017-04-13  Pedro Alves  <palves@redhat.com>
1371
1372         * breakpoint.c (watch_command_1): Save watchpoint-frame info
1373         before calling create_internal_breakpoint.
1374
1375 2017-04-13  Pedro Alves  <palves@redhat.com>
1376
1377         * fork-child.c (execv_argv): New class.
1378         (breakup_args): Refactored as ...
1379         (execv_argv::init_for_no_shell): .. this method of execv_argv.
1380         Copy arguments to storage and replace separators with NULL
1381         terminators in place.
1382         (escape_bang_in_quoted_argument): Adjust to return bool.
1383         (execv_argv::execv_argv): New ctor.
1384         (execv_argv::init_for_shell): New method, factored out from
1385         fork_inferior.  Don't strdup strings into the vector.
1386         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
1387         Remove free_vector_argv call.
1388
1389 2017-04-13  Yao Qi  <yao.qi@linaro.org>
1390
1391         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
1392         tdep->rx_psw_type.
1393
1394 2017-04-13  Yao Qi  <yao.qi@linaro.org>
1395
1396         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
1397         * rx-tdep.c (rx_gdbarch_init): Likewise.
1398
1399 2017-04-13  Pedro Alves  <palves@redhat.com>
1400
1401         * breakpoint.h (struct breakpoint): Reindent.
1402
1403 2017-04-13  Pedro Alves  <palves@redhat.com>
1404
1405         * breakpoint.c (bp_location): Rename to ...
1406         (bp_locations): ... this.  All references updated.
1407         (bp_location_count): Rename to ...
1408         (bp_locations_count): ... this.  All references updated.
1409         (bp_location_placed_address_before_address_max): Rename to ...
1410         (bp_locations_placed_address_before_address_max): ... this.  All
1411         references updated.
1412         (bp_location_shadow_len_after_address_max): Rename to ...
1413         (bp_locations_shadow_len_after_address_max): ... this.  All
1414         references updated.
1415         (bp_location_compare_addrs): Rename to ...
1416         (bp_locations_compare_addrs): ... this.  All references updated.
1417         (bp_location_compare):Rename to ...
1418         (bp_locations_compare): ... this.  All references updated.
1419         (bp_location_target_extensions_update): Rename to ...
1420         (bp_locations_target_extensions_update): ... this.  All references
1421         updated.
1422
1423 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1424
1425         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
1426         * common/common.m4: Check headers 'termios.h', 'termio.h' and
1427         'sgtty.h'.
1428         * common/gdb_termios.h: New file, with parts of "terminal.h".
1429         * inflow.c: Include "gdb_termios.h".
1430         * ser-unix.c: Include "gdb_termios.h".
1431         * terminal.h: Move terminal-related defines to
1432         "common/gdb_termios.h".
1433
1434 2017-04-12  Tom Tromey  <tom@tromey.com>
1435
1436         * probe.c (parse_probes): Update.
1437         * location.h (delete_event_location): Don't declare.
1438         (event_location_deleter::operator()): Update.
1439         * location.c (event_location_deleter::operator()): Rename from
1440         delete_event_location.
1441         * linespec.h (linespec_result) <location>: Change type to
1442         event_location_up.
1443         * linespec.c (canonicalize_linespec, event_location_to_sals)
1444         (decode_objc): Update.
1445         (linespec_result): Don't call delete_event_location.
1446         * breakpoint.c (create_breakpoints_sal)
1447         (bkpt_probe_create_sals_from_location)
1448         (strace_marker_create_sals_from_location): Update.
1449
1450 2017-04-12  Tom Tromey  <tom@tromey.com>
1451
1452         * linespec.h (struct linespec_result): Add constructor and
1453         destructor.
1454         (init_linespec_result, destroy_linespec_result)
1455         (make_cleanup_destroy_linespec_result): Don't declare.
1456         * linespec.c (init_linespec_result): Remove.
1457         (linespec_result::~linespec_result): Rename from
1458         destroy_linespec_result.  Update.
1459         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
1460         Remove.
1461         * breakpoint.c (create_breakpoint, break_range_command)
1462         (decode_location_default): Update.
1463         * ax-gdb.c (agent_command_1): Update.
1464
1465 2017-04-12  Tom Tromey  <tom@tromey.com>
1466
1467         * remote.c (remote_download_tracepoint): Update.
1468         * python/py-breakpoint.c (bppy_get_location): Update.
1469         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
1470         (gdbscm_breakpoint_location): Update.
1471         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
1472         * breakpoint.h (struct breakpoint) <location, location_range_end>:
1473         Change type to event_location_up.
1474         * breakpoint.c (create_overlay_event_breakpoint)
1475         (create_longjmp_master_breakpoint)
1476         (create_std_terminate_master_breakpoint)
1477         (create_exception_master_breakpoint)
1478         (breakpoint_event_location_empty_p, print_breakpoint_location)
1479         (print_one_breakpoint_location, create_thread_event_breakpoint)
1480         (init_breakpoint_sal, create_breakpoint)
1481         (print_recreate_ranged_breakpoint, break_range_command)
1482         (init_ada_exception_breakpoint, say_where): Update.
1483         (base_breakpoint_dtor): Don't call delete_event_location.
1484         (bkpt_print_recreate, tracepoint_print_recreate)
1485         (dprintf_print_recreate, update_static_tracepoint)
1486         (breakpoint_re_set_default): Update.
1487
1488 2017-04-12  Tom Tromey  <tom@tromey.com>
1489
1490         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1491         type of "to_do".  Update.
1492         (compute_stack_depth): Use std::vector.
1493
1494 2017-04-12  Tom Tromey  <tom@tromey.com>
1495
1496         * printcmd.c (find_instruction_backward): Use std::vector.
1497
1498 2017-04-12  Tom Tromey  <tom@tromey.com>
1499
1500         * symfile.c (objfilep): Remove typedef.
1501         (reread_symbols): Use a std::vector.
1502
1503 2017-04-12  Tom Tromey  <tom@tromey.com>
1504
1505         * mi/mi-main.c (exec_direction_forward): Remove.
1506         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
1507         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1508         scoped_restore.
1509         * guile/guile.c (guile_repl_command, guile_command)
1510         (gdbscm_execute_gdb_command): Use scoped_restore.
1511         * go-exp.y (go_parse): Use scoped_restore.
1512         * d-exp.y (d_parse): Use scoped_restore.
1513         * cli/cli-decode.c (cmd_func): Use scoped_restore.
1514         * c-exp.y (c_parse): Use scoped_restore.
1515
1516 2017-04-12  Tom Tromey  <tom@tromey.com>
1517
1518         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
1519         (mi_parse): Update return type.
1520         (mi_parse_free): Remove.
1521         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
1522         (mi_parse::~mi_parse): Rename from mi_parse_free.
1523         (mi_parse_cleanup): Remove.
1524         (mi_parse): Return a unique_ptr.  Use new.
1525         * mi/mi-main.c (mi_execute_command): Update.
1526
1527 2017-04-12  Tom Tromey  <tom@tromey.com>
1528
1529         * location.c (explicit_location_lex_one): Return a
1530         unique_xmalloc_ptr.
1531         (string_to_explicit_location): Update.  Remove cleanups.
1532
1533 2017-04-12  Tom Tromey  <tom@tromey.com>
1534
1535         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
1536         (compare_value_and_voffset): Change type.  Update.
1537         (compute_vtable_size): Change type of "offset_vec".
1538         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
1539         (gnuv3_get_typeid): Remove extraneous declaration.
1540
1541 2017-04-12  Tom Tromey  <tom@tromey.com>
1542
1543         * charset.h (wchar_iterator): Fix comment.
1544
1545 2017-04-12  Tom Tromey  <tom@tromey.com>
1546
1547         * charset.c (iconv_wrapper): New class.
1548         (cleanup_iconv): Remove.
1549         (convert_between_encodings): Use it.
1550
1551 2017-04-12  Tom Tromey  <tom@tromey.com>
1552
1553         * symfile.h (increment_reading_symtab): Update type.
1554         * symfile.c (decrement_reading_symtab): Remove.
1555         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
1556         * psymtab.c (psymtab_to_symtab): Update.
1557         * dwarf2read.c (dw2_instantiate_symtab): Update.
1558
1559 2017-04-12  Tom Tromey  <tom@tromey.com>
1560
1561         * jit.c (struct jit_reader): Declare separately.  Add constructor
1562         and destructor.  Change type of "handle".
1563         (loaded_jit_reader): Define separately.
1564         (jit_reader_load): Update.  New "new".
1565         (jit_reader_unload_command): Use "delete".
1566         * gdb-dlfcn.h (struct dlclose_deleter): New.
1567         (gdb_dlhandle_up): New typedef.
1568         (gdb_dlopen, gdb_dlsym): Update types.
1569         (gdb_dlclose): Remove.
1570         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
1571         (gdb_dlsym): Change type of "handle".
1572         (make_cleanup_dlclose): Remove.
1573         (dlclose_deleter::operator()): Rename from gdb_dlclose.
1574         * compile/compile-c-support.c (load_libcc): Update.
1575
1576 2017-04-12  Tom Tromey  <tom@tromey.com>
1577
1578         * symtab.h (find_pcs_for_symtab_line): Change return type.
1579         * symtab.c (find_pcs_for_symtab_line): Change return type.
1580         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
1581         type of "vec".  Update.
1582         (ltpy_get_pcs_for_line): Update.
1583         * linespec.c (decode_digits_ordinary): Update.
1584
1585 2017-04-12  Tom Tromey  <tom@tromey.com>
1586
1587         * tracepoint.c (actions_command): Update.
1588         * python/python.c (python_command, python_interactive_command):
1589         Update.
1590         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
1591         * guile/guile.c (guile_command): Update.
1592         * defs.h (read_command_lines, read_command_lines_1): Return
1593         command_line_up.
1594         (command_lines_deleter): New struct.
1595         (command_line_up): New typedef.
1596         * compile/compile.c (compile_code_command)
1597         (compile_print_command): Update.
1598         * cli/cli-script.h (get_command_line, copy_command_lines): Return
1599         command_line_up.
1600         (make_cleanup_free_command_lines): Remove.
1601         * cli/cli-script.c (get_command_line, read_command_lines_1)
1602         (copy_command_lines): Return command_line_up.
1603         (while_command, if_command, read_command_lines, define_command)
1604         (document_command): Update.
1605         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
1606         Remove.
1607         * breakpoint.h (breakpoint_set_commands): Change type of
1608         "commands".
1609         * breakpoint.c (breakpoint_set_commands): Change type of
1610         "commands".  Update.
1611         (do_map_commands_command, update_dprintf_command_list)
1612         (create_tracepoint_from_upload): Update.
1613
1614 2017-04-12  Tom Tromey  <tom@tromey.com>
1615
1616         * tracepoint.c (scope_info): Update.
1617         * spu-tdep.c (spu_catch_start): Update.
1618         * python/python.c (gdbpy_decode_line): Update.
1619         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
1620         * python/py-breakpoint.c (bppy_init): Update.
1621         * probe.c (parse_probes): Update.
1622         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
1623         * location.h (event_location_deleter): New struct.
1624         (event_location_up): New typedef.
1625         (new_linespec_location, new_address_location, new_probe_location)
1626         (new_explicit_location, copy_event_location)
1627         (string_to_event_location, string_to_event_location_basic)
1628         (string_to_explicit_location): Update return type.
1629         (make_cleanup_delete_event_location): Remove.
1630         * location.c (new_linespec_location, new_address_location)
1631         (new_probe_location, new_explicit_location, copy_event_location):
1632         Return event_location_up.
1633         (delete_event_location_cleanup)
1634         (make_cleanup_delete_event_location): Remove.
1635         (string_to_explicit_location, string_to_event_location_basic)
1636         (string_to_event_location): Return event_location_up.
1637         * linespec.c (canonicalize_linespec, event_location_to_sals)
1638         (decode_line_with_current_source)
1639         (decode_line_with_last_displayed, decode_objc): Update.
1640         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
1641         * completer.c (location_completer): Update.
1642         * cli/cli-cmds.c (edit_command, list_command): Update.
1643         * breakpoint.c (create_overlay_event_breakpoint)
1644         (create_longjmp_master_breakpoint)
1645         (create_std_terminate_master_breakpoint)
1646         (create_exception_master_breakpoint)
1647         (create_thread_event_breakpoint): Update.
1648         (init_breakpoint_sal): Update.  Remove some dead code.
1649         (create_breakpoint_sal): Change type of "location".  Update.
1650         (create_breakpoints_sal, create_breakpoint, break_command_1)
1651         (dprintf_command, break_range_command, until_break_command)
1652         (init_ada_exception_breakpoint)
1653         (strace_marker_create_sals_from_location)
1654         (update_static_tracepoint, trace_command, ftrace_command)
1655         (strace_command, create_tracepoint_from_upload): Update.
1656         * break-catch-throw.c (re_set_exception_catchpoint): Update.
1657         * ax-gdb.c (agent_command_1): Update.
1658
1659 2017-04-12  Pedro Alves  <palves@redhat.com>
1660
1661         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
1662         * configure.tgt: Handle i[34567]86-*-go32* and
1663         i[34567]86-*-msdosdjgpp*.
1664         * i386-tdep.c (i386_svr4_reg_to_regnum):
1665         Make extern.
1666         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
1667         i386-go32-tdep.c.
1668         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
1669         * i386-go32-tdep.c: New file.
1670         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
1671         declarations.
1672
1673 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
1674
1675         * aix-thread.c (pd_status2str): Change return type to const char *.
1676
1677 2017-04-12  Pedro Alves  <palves@redhat.com>
1678
1679         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
1680         calls to set_gdbarch_gnu_triplet_regexp.
1681
1682 2017-04-12  Pedro Alves  <palves@redhat.com>
1683
1684         PR gdb/21323
1685         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
1686         New enum value.
1687         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
1688         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
1689         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
1690         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
1691         * gdbarch.h, gdbarch.c: Regenerate.
1692         * aarch64-tdep.c (aarch64_gdbarch_init): Override
1693         gdbarch_wchar_bit and gdbarch_wchar_signed.
1694         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
1695         * arm-tdep.c (arm_gdbarch_init): Likewise.
1696         * avr-tdep.c (avr_gdbarch_init): Likewise.
1697         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
1698         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
1699         * i386-tdep.c (i386_go32_init_abi): Likewise.
1700         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1701         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1702         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1703         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
1704         * sh-tdep.c (sh_gdbarch_init): Likewise.
1705         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1706         * sparc64-tdep.c (sparc64_init_abi): Likewise.
1707         * windows-tdep.c (windows_init_abi): Likewise.
1708         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
1709
1710 2017-04-12  Pedro Alves  <palves@redhat.com>
1711
1712         PR c++/21323
1713         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
1714         cplus_primitive_type_char32_t>: New enum values.
1715         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
1716         and cplus_primitive_type_char32_t.
1717         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
1718         32, use the archtecture's built-in type for char16_t and char32_t,
1719         respectively.  Otherwise, fallback to init_integer_type as before,
1720         but make the type unsigned, and issue a complaint.
1721         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
1722
1723 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
1724
1725         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
1726         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
1727
1728 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1729
1730         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
1731         'const char *'.
1732
1733 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1734
1735         * common/common-utils.c (free_vector_argv): New function.
1736         * common/common-utils.h: Include <vector>.
1737         (free_vector_argv): New prototype.
1738         * darwin-nat.c (darwin_create_inferior): Rewrite function
1739         prototype in order to constify "exec_file" and accept a
1740         "std::string" for "allargs".
1741         * fork-child.c: Include <vector>.
1742         (breakup_args): Rewrite function, using C++.
1743         (fork_inferior): Rewrite function header, constify "exec_file_arg"
1744         and accept "std::string" for "allargs".  Update the code to
1745         calculate "argv" based on "allargs".  Update calls to "exec_fun"
1746         and "execvp".
1747         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
1748         order to constify "exec_file" and accept a "std::string" for
1749         "allargs".
1750         * go32-nat.c (go32_create_inferior): Likewise.
1751         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
1752         * infcmd.c (run_command_1): Constify "exec_file".  Use
1753         "std::string" for inferior arguments.
1754         * inferior.h (fork_inferior): Update prototype.
1755         * linux-nat.c (linux_nat_create_inferior): Rewrite function
1756         prototype in order to constify "exec_file" and accept a
1757         "std::string" for "allargs".
1758         * nto-procfs.c (procfs_create_inferior): Likewise.
1759         * procfs.c (procfs_create_inferior): Likewise.
1760         * remote-sim.c (gdbsim_create_inferior): Likewise.
1761         * remote.c (extended_remote_run): Update code to accept
1762         "std::string" as argument.
1763         (extended_remote_create_inferior): Rewrite function prototype in
1764         order to constify "exec_file" and accept a "std::string" for
1765         "allargs".
1766         * rs6000-nat.c (super_create_inferior): Likewise.
1767         (rs6000_create_inferior): Likewise.
1768         * target.h (struct target_ops) <to_create_inferior>: Likewise.
1769         * windows-nat.c (windows_create_inferior): Likewise.
1770
1771 2017-04-11  Pedro Alves  <palves@redhat.com>
1772
1773         * thread.c: Fix whitespace throughout.
1774
1775 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1776
1777         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
1778
1779 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
1780
1781         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
1782
1783 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1784
1785         PR gdb/21364
1786         * osdata.c (info_osdata): Check if 'type' is an empty string
1787         instead of NULL.
1788
1789 2017-04-10  Pedro Alves  <palves@redhat.com>
1790
1791         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
1792         (ptid_to_global_thread_id, in_thread_list)
1793         (do_captured_list_thread_ids, set_resumed, set_running)
1794         (set_executing, set_stop_requested, finish_thread_state)
1795         (validate_registers_access, can_access_registers_ptid)
1796         (print_thread_info_1, switch_to_thread)
1797         (do_restore_current_thread_cleanup)
1798         (make_cleanup_restore_current_thread, thread_command)
1799         (thread_name_command): Use operator== instead of ptid_equal.
1800
1801 2017-04-10  Pedro Alves  <palves@redhat.com>
1802
1803         * thread.c (struct current_thread_cleanup) <next>: Delete field.
1804         (current_thread_cleanup_chain): Delete.
1805         (restore_current_thread_cleanup_dtor)
1806         (make_cleanup_restore_current_thread): Remove references to
1807         current_thread_cleanup_chain.
1808
1809 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
1810
1811         * msp430-tdep.c (msp430_pseudo_register_read): Never return
1812         REG_UNKNOWN.
1813
1814 2017-04-10  Yao Qi  <yao.qi@linaro.org>
1815
1816         PR gdb/19942
1817         * gdbthread.h (thread_info::deletable): New method.
1818         (thread_info::incref): New method.
1819         (thread_info::decref): New method.
1820         (thread_info::refcount): Move it to private.
1821         * infrun.c (save_stop_context): Call inc_refcount.
1822         (release_stop_context_cleanup): Likewise.
1823         * thread.c (set_thread_exited): New function.
1824         (init_thread_list): Delete "tp" only it is deletable, otherwise
1825         call set_thread_exited.
1826         (delete_thread_1): Call set_thread_exited.
1827         (current_thread_cleanup) <inferior_pid>: Remove.
1828         <thread>: New field.
1829         (restore_current_thread_ptid_changed): Removed.
1830         (do_restore_current_thread_cleanup): Adjust.
1831         (restore_current_thread_cleanup_dtor): Don't call
1832         find_thread_ptid.
1833         (set_thread_refcount): Use dec_refcount.
1834         (make_cleanup_restore_current_thread): Adjust.
1835         (thread_apply_all_command): Call inc_refcount.
1836         (_initialize_thread): Don't call
1837         observer_attach_thread_ptid_changed.
1838
1839 2017-04-10  Yao Qi  <yao.qi@linaro.org>
1840
1841         * thread.c (delete_thread_1): Hoist code on marking thread as
1842         exited.
1843
1844 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
1845
1846         * windows-nat.c (windows_detach): Initialize ptid with
1847         minus_one_ptid.
1848
1849 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
1850
1851         * unittests/ptid-selftests.c: Fix erroneous assert messages.
1852
1853 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
1854
1855         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
1856         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
1857         (bfin_pseudo_register_write): Likewise
1858
1859 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
1860
1861         * common/ptid.h (struct ptid): Change to...
1862         (class ptid_t): ... this.
1863         <ptid_t>: New constructors.
1864         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
1865         matches>: New methods.
1866         <make_null, make_minus_one>: New static methods.
1867         <pid>: Rename to...
1868         <m_pid>: ...this.
1869         <lwp>: Rename to...
1870         <m_lwp>: ...this.
1871         <tid>: Rename to...
1872         <m_tid>: ...this.
1873         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
1874         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
1875         as references, move comment to class ptid_t.
1876         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
1877         ptid_t static methods.
1878         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
1879         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
1880         Take ptid arguments as references, implement using ptid_t methods.
1881         * unittests/ptid-selftests.c: New file.
1882         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1883         unittests/ptid-selftests.c.
1884         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
1885
1886 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1887
1888         * python/python.c (python_run_simple_file): Cast mode literal to
1889         non-const char pointer as expected by PyFile_FromString.
1890
1891 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
1892
1893         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
1894         minus_one_ptid and null_ptid.
1895
1896 2017-04-05  Pedro Alves  <palves@redhat.com>
1897
1898         * warning.m4 (build_warnings): Remove -Wno-write-strings.
1899         * configure: Regenerate.
1900
1901 2017-04-05  Pedro Alves  <palves@redhat.com>
1902
1903         * ada-exp.y (yyerror): Constify.
1904         * ada-lang.c (bound_name, get_selections)
1905         (ada_variant_discrim_type)
1906         (ada_variant_discrim_name, ada_value_struct_elt)
1907         (ada_lookup_struct_elt_type, is_unchecked_variant)
1908         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
1909         (catch_ada_exception_command_split)
1910         (catch_ada_assert_command_split, catch_assert_command)
1911         (ada_op_name): Constify.
1912         * ada-lang.h (ada_yyerror, get_selections)
1913         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
1914         * arc-tdep.c (arc_print_frame_cache): Constify.
1915         * arm-tdep.c (arm_skip_stub): Constify.
1916         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
1917         (gen_aggregate_elt_ref): Constify.
1918         * bcache.c (print_bcache_statistics): Constify.
1919         * bcache.h (print_bcache_statistics): Constify.
1920         * break-catch-throw.c (catch_exception_command_1):
1921         * breakpoint.c (struct ep_type_description::description):
1922         Constify.
1923         (add_solib_catchpoint): Constify.
1924         (catch_fork_command_1): Add cast.
1925         (add_catch_command): Constify.
1926         * breakpoint.h (add_catch_command, add_solib_catchpoint):
1927         Constify.
1928         * bsd-uthread.c (bsd_uthread_state): Constify.
1929         * buildsym.c (patch_subfile_names): Constify.
1930         * buildsym.h (next_symbol_text_func, patch_subfile_names):
1931         Constify.
1932         * c-exp.y (yyerror): Constify.
1933         (token::oper): Constify.
1934         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
1935         * c-varobj.c (cplus_describe_child): Constify.
1936         * charset.c (find_charset_names): Add cast.
1937         (find_charset_names): Constify array and add const_cast.
1938         * cli/cli-cmds.c (complete_command, cd_command): Constify.
1939         (edit_command): Constify.
1940         * cli/cli-decode.c (lookup_cmd): Constify.
1941         * cli/cli-dump.c (dump_memory_command, dump_value_command):
1942         Constify.
1943         (struct dump_context): Constify.
1944         (add_dump_command, restore_command): Constify.
1945         * cli/cli-script.c (get_command_line): Constify.
1946         * cli/cli-script.h (get_command_line): Constify.
1947         * cli/cli-utils.c (check_for_argument): Constify.
1948         * cli/cli-utils.h (check_for_argument): Constify.
1949         * coff-pe-read.c (struct read_pe_section_data): Constify.
1950         * command.h (lookup_cmd): Constify.
1951         * common/print-utils.c (decimal2str): Constify.
1952         * completer.c (gdb_print_filename): Constify.
1953         * corefile.c (set_gnutarget): Constify.
1954         * cp-name-parser.y (yyerror): Constify.
1955         * cp-valprint.c (cp_print_class_member): Constify.
1956         * cris-tdep.c (cris_register_name, crisv32_register_name):
1957         Constify.
1958         * d-exp.y (yyerror): Constify.
1959         (struct token::oper): Constify.
1960         * d-lang.h (d_yyerror): Constify.
1961         * dbxread.c (struct header_file_location::name): Constify.
1962         (add_old_header_file, add_new_header_file, last_function_name)
1963         (dbx_next_symbol_text, add_bincl_to_list)
1964         (find_corresponding_bincl_psymtab, set_namestring)
1965         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
1966         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
1967         * defs.h (command_line_input, print_address_symbolic)
1968         (deprecated_readline_begin_hook): Constify.
1969         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
1970         Constify.
1971         * event-top.c (handle_line_of_input): Constify and add cast.
1972         * exceptions.c (catch_errors): Constify.
1973         * exceptions.h (catch_errors): Constify.
1974         * expprint.c (print_subexp_standard, op_string, op_name)
1975         (op_name_standard, dump_raw_expression, dump_raw_expression):
1976         * expression.h (op_name, op_string, dump_raw_expression):
1977         Constify.
1978         * f-exp.y (yyerror): Constify.
1979         (struct token::oper): Constify.
1980         (struct f77_boolean_val::name): Constify.
1981         * f-lang.c (f_word_break_characters): Constify.
1982         * f-lang.h (f_yyerror): Constify.
1983         * fork-child.c (fork_inferior): Add cast.
1984         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
1985         (new_variant): Constify.
1986         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
1987         * gdbarch.c: Regenerate.
1988         * gdbcore.h (set_gnutarget): Constify.
1989         * go-exp.y (yyerror): Constify.
1990         (token::oper): Constify.
1991         * go-lang.h (go_yyerror): Constify.
1992         * go32-nat.c (go32_sysinfo): Constify.
1993         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
1994         * guile/scm-cmd.c (cmdscm_function): Constify.
1995         * guile/scm-param.c (pascm_param_value): Constify.
1996         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
1997         (h8300sx_register_name): Constify.
1998         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
1999         Constify.
2000         * ia64-tdep.c (ia64_register_names): Constify.
2001         * infcmd.c (construct_inferior_arguments): Constify.
2002         (path_command, attach_post_wait): Constify.
2003         * language.c (show_range_command, show_case_command)
2004         (unk_lang_error): Constify.
2005         * language.h (language_defn::la_error)
2006         (language_defn::la_name_of_this): Constify.
2007         * linespec.c (decode_line_2): Constify.
2008         * linux-thread-db.c (thread_db_err_str): Constify.
2009         * lm32-tdep.c (lm32_register_name): Constify.
2010         * m2-exp.y (yyerror): Constify.
2011         * m2-lang.h (m2_yyerror): Constify.
2012         * m32r-tdep.c (m32r_register_names): Constify and make static.
2013         * m68hc11-tdep.c (m68hc11_register_names): Constify.
2014         * m88k-tdep.c (m88k_register_name): Constify.
2015         * macroexp.c (appendmem): Constify.
2016         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
2017         (upgrade_type, parse_external, parse_partial_symbols)
2018         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
2019         (new_symbol): Constify.
2020         * memattr.c (mem_info_command): Constify.
2021         * mep-tdep.c (register_name_from_keyword): Constify.
2022         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
2023         Constify.
2024         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
2025         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
2026         * mi/mi-main.c (captured_mi_execute_command): Constify and add
2027         cast.
2028         (mi_execute_async_cli_command): Constify.
2029         * mips-tdep.c (mips_register_name): Constify.
2030         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
2031         (am33_register_name, am33_2_register_name)
2032         * moxie-tdep.c (moxie_register_names): Constify.
2033         * nat/linux-osdata.c (osdata_type): Constify fields.
2034         * nto-tdep.c (nto_parse_redirection): Constify.
2035         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
2036         (lookup_child_selector): Constify.
2037         (objc_methcall::name): Constify.
2038         * objc-lang.h (lookup_objc_class, lookup_child_selector)
2039         (lookup_struct_typedef): Constify.
2040         * objfiles.c (pc_in_section): Constify.
2041         * objfiles.h (pc_in_section): Constify.
2042         * p-exp.y (struct token::oper): Constify.
2043         (yyerror): Constify.
2044         * p-lang.h (pascal_yyerror): Constify.
2045         * parser-defs.h (op_name_standard): Constify.
2046         (op_print::string): Constify.
2047         (exp_descriptor::op_name): Constify.
2048         * printcmd.c (print_address_symbolic): Constify.
2049         * psymtab.c (print_partial_symbols): Constify.
2050         * python/py-breakpoint.c (stop_func): Constify.
2051         (bppy_get_expression): Constify.
2052         * python/py-cmd.c (cmdpy_completer::name): Constify.
2053         (cmdpy_function): Constify.
2054         * python/py-event.c (evpy_add_attribute)
2055         (gdbpy_initialize_event_generic): Constify.
2056         * python/py-event.h (evpy_add_attribute)
2057         (gdbpy_initialize_event_generic): Constify.
2058         * python/py-evts.c (add_new_registry): Constify.
2059         * python/py-finishbreakpoint.c (outofscope_func): Constify.
2060         * python/py-framefilter.c (get_py_iter_from_func): Constify.
2061         * python/py-inferior.c (get_buffer): Add cast.
2062         * python/py-param.c (parm_constant::name): Constify.
2063         * python/py-unwind.c (fprint_frame_id): Constify.
2064         * python/python.c (gdbpy_parameter_value): Constify.
2065         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
2066         * remote.c (memory_packet_config::name): Constify.
2067         (show_packet_config_cmd, remote_write_bytes)
2068         (remote_buffer_add_string):
2069         * reverse.c (exec_reverse_once): Constify.
2070         * rs6000-tdep.c (variant::name, variant::description): Constify.
2071         * rust-exp.y (rustyyerror): Constify.
2072         * rust-lang.c (rust_op_name): Constify.
2073         * rust-lang.h (rustyyerror): Constify.
2074         * serial.h (serial_ops::name): Constify.
2075         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
2076         (sh_sh3e_register_name, sh_sh2e_register_name)
2077         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
2078         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
2079         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
2080         (sh_sh4al_dsp_register_name): Constify.
2081         * sh64-tdep.c (sh64_register_name): Constify.
2082         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
2083         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
2084         * stabsread.c (patch_block_stabs, read_type_number)
2085         (ref_map::stabs, ref_add, process_reference)
2086         (symbol_reference_defined, define_symbol, define_symbol)
2087         (error_type, read_type, read_member_functions, read_cpp_abbrev)
2088         (read_one_struct_field, read_struct_fields, read_baseclasses)
2089         (read_tilde_fields, read_struct_type, read_array_type)
2090         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
2091         (read_huge_number, read_range_type, read_args, common_block_start)
2092         (find_name_end): Constify.
2093         * stabsread.h (common_block_start, define_symbol)
2094         (process_one_symbol, symbol_reference_defined, ref_add):
2095         * symfile.c (get_section_index, add_symbol_file_command):
2096         * symfile.h (get_section_index): Constify.
2097         * target-descriptions.c (tdesc_type::name): Constify.
2098         (tdesc_free_type): Add cast.
2099         * target.c (find_default_run_target):
2100         (add_deprecated_target_alias, find_default_run_target)
2101         (target_announce_detach): Constify.
2102         (do_option): Constify.
2103         * target.h (add_deprecated_target_alias): Constify.
2104         * thread.c (print_thread_info_1): Constify.
2105         * top.c (deprecated_readline_begin_hook, command_line_input):
2106         Constify.
2107         (init_main): Add casts.
2108         * top.h (handle_line_of_input): Constify.
2109         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
2110         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
2111         (tfind_command): Rename to ...
2112         (tfind_command_1): ... this and constify.
2113         (tfind_command): New function.
2114         (tfind_end_command, tfind_start_command): Adjust.
2115         (encode_source_string): Constify.
2116         * tracepoint.h (encode_source_string): Constify.
2117         * tui/tui-data.c (tui_partial_win_by_name): Constify.
2118         * tui/tui-data.h (tui_partial_win_by_name): Constify.
2119         * tui/tui-source.c (tui_set_source_content_nil): Constify.
2120         * tui/tui-source.h (tui_set_source_content_nil): Constify.
2121         * tui/tui-win.c (parse_scrolling_args): Constify.
2122         * tui/tui-windata.c (tui_erase_data_content): Constify.
2123         * tui/tui-windata.h (tui_erase_data_content): Constify.
2124         * tui/tui-winsource.c (tui_erase_source_content): Constify.
2125         * tui/tui.c (tui_enable): Add cast.
2126         * utils.c (defaulted_query): Constify.
2127         (init_page_info): Add cast.
2128         (puts_debug, subset_compare): Constify.
2129         * utils.h (subset_compare): Constify.
2130         * varobj.c (varobj_format_string): Constify.
2131         * varobj.h (varobj_format_string): Constify.
2132         * vax-tdep.c (vax_register_name): Constify.
2133         * windows-nat.c (windows_detach): Constify.
2134         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
2135         * xml-support.c (gdb_xml_end_element): Constify.
2136         * xml-tdesc.c (tdesc_start_reg): Constify.
2137         * xstormy16-tdep.c (xstormy16_register_name): Constify.
2138         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
2139         * xtensa-tdep.h (xtensa_register_t::name): Constify.
2140
2141 2017-04-05  Pedro Alves  <palves@redhat.com>
2142
2143         * proc-api.c (struct trans): Constify.
2144         (procfs_note): Constify.
2145         * proc-events.c (struct trans, syscall_table):
2146         * proc-flags.c (struct trans): Constify.
2147         * proc-utils.h (procfs_note): Constify.
2148         * proc-why.c (struct trans): Constify.
2149         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
2150         (procfs_detach): Constify.
2151         * sol-thread.c (struct string_map): Constify.
2152         (td_err_string, td_state_string): Constify.
2153
2154 2017-04-05  Pedro Alves  <palves@redhat.com>
2155
2156         * proc-api.c (procfs_filename): Don't initialize
2157         procfs_filename.
2158         (prepare_to_trace): Assume procfs_filename is non-NULL.
2159         (_initialize_proc_api): Give procfs_filename a default value here.
2160
2161 2017-04-05  Pedro Alves  <palves@redhat.com>
2162
2163         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
2164         'cond_string' parameter.
2165         (extract_exception_regexp): Constify 'string' parameter.
2166         (catch_exception_command_1): Constify.
2167         * breakpoint.c (init_catchpoint)
2168         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
2169         parameter.
2170         (ep_parse_optional_if_clause, catch_fork_command_1)
2171         (catch_exec_command_1): Constify.
2172         * breakpoint.h (init_catchpoint): Constify 'cond_string'
2173         parameter.
2174         (ep_parse_optional_if_clause): Constify.
2175         * cli/cli-utils.c (remove_trailing_whitespace)
2176         (check_for_argument): Constify.
2177         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
2178         non-const overload.
2179         (check_for_argument): Likewise.
2180
2181 2017-04-05  Pedro Alves  <palves@redhat.com>
2182
2183         * event-top.c (command_line_handler): Add cast to execute_command
2184         call.
2185         * record-btrace.c (cmd_record_btrace_bts_start)
2186         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
2187         (cmd_record_btrace_start): Add cast to execute_command call.
2188         * record-full.c (record_full_goto_insn):
2189         * record.c (record_start, record_stop): Add cast to
2190         execute_command_to_string calls.
2191         (cmd_record_start): Add cast to execute_command calls.
2192
2193 2017-04-05  Pedro Alves  <palves@redhat.com>
2194
2195         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
2196         static inline function.
2197         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
2198         array and use gdb_PyArg_ParseTupleAndKeywords.
2199         * python/py-cmd.c (cmdpy_init): Likewise.
2200         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
2201         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
2202         (infpy_search_memory): Likewise.
2203         * python/py-objfile.c (objfpy_add_separate_debug_file)
2204         (gdbpy_lookup_objfile): Likewise.
2205         * python/py-symbol.c (gdbpy_lookup_symbol)
2206         (gdbpy_lookup_global_symbol): Likewise.
2207         * python/py-type.c (gdbpy_lookup_type): Likewise.
2208         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
2209         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
2210         Likewise.
2211
2212 2017-04-05  Pedro Alves  <palves@redhat.com>
2213
2214         * python/python-internal.h (gdb_PyGetSetDef): New type.
2215         * python/py-block.c (block_object_getset)
2216         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
2217         * python/py-event.c (event_object_getset)
2218         (finish_breakpoint_object_getset): Likewise.
2219         * python/py-inferior.c (inferior_object_getset): Likewise.
2220         * python/py-infthread.c (thread_object_getset): Likewise.
2221         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
2222         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
2223         * python/py-objfile.c (objfile_getset): Likewise.
2224         * python/py-progspace.c (pspace_getset): Likewise.
2225         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
2226         Likewise.
2227         * python/py-record.c (recpy_record_getset): Likewise.
2228         * python/py-symbol.c (symbol_object_getset): Likewise.
2229         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
2230         Likewise.
2231         * python/py-type.c (type_object_getset, field_object_getset):
2232         Likewise.
2233         * python/py-value.c (value_object_getset): Likewise.
2234
2235 2017-04-05  Pedro Alves  <palves@redhat.com>
2236
2237         * python/python-internal.h (gdb_PyObject_CallMethod)
2238         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
2239         New functions.
2240         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
2241         (PySys_GetObject, PySys_SetPath): New macros.
2242
2243 2017-04-05  Pedro Alves  <palves@redhat.com>
2244
2245         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
2246         info_osdata_command.
2247         * osdata.c (info_osdata_command): Rename to ...
2248         (info_osdata): ... this.  Constify 'type' parameter, and remove
2249         the 'from_tty' parameter.  Accept NULL TYPE.
2250         (info_osdata_command): New function.
2251         * osdata.h (info_osdata_command): Remove declaration.
2252         (info_osdata): New declaration.
2253
2254 2017-04-05  Pedro Alves  <palves@redhat.com>
2255
2256         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
2257         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
2258         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
2259         parameter.
2260         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
2261         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
2262         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
2263         parameter.
2264         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
2265         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
2266         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
2267         (mi_cmd_file_list_exec_source_files)
2268         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
2269         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
2270         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
2271         parameter.
2272         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
2273         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
2274         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
2275         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
2276         (mi_cmd_stack_info_frame): Constify 'command' parameter.
2277         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
2278         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
2279         'command' parameter.
2280         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
2281         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
2282         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
2283         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
2284         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
2285         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
2286         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
2287         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
2288         (mi_cmd_var_set_update_range): Constify 'command' parameter.
2289         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
2290         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
2291         parameter.
2292         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
2293         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
2294         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
2295         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
2296         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
2297         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
2298         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
2299         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
2300         (mi_cmd_data_list_changed_registers)
2301         (mi_cmd_data_write_register_values)
2302         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
2303         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
2304         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
2305         (mi_cmd_list_features, mi_cmd_list_target_features)
2306         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
2307         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
2308         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
2309         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
2310         (mi_cmd_trace_frame_collected): Constify 'command'
2311         parameter.
2312         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
2313         'command' parameter.
2314
2315 2017-04-05  Pedro Alves  <palves@redhat.com>
2316
2317         * ada-lang.c (ada_completer_word_break_characters): Now a const
2318         array.
2319         (ada_get_gdb_completer_word_break_characters): Constify.
2320         * completer.c (gdb_completer_command_word_break_characters)
2321         (gdb_completer_file_name_break_characters)
2322         (gdb_completer_quote_characters): Now const arrays.
2323         (get_gdb_completer_quote_characters): Constify.
2324         (set_rl_completer_word_break_characters): New function.
2325         (set_gdb_completion_word_break_characters)
2326         (complete_line_internal): Use it.
2327         * completer.h (get_gdb_completer_quote_characters): Constify.
2328         (set_rl_completer_word_break_characters): Declare.
2329         * f-lang.c (f_word_break_characters): Constify.
2330         * language.c (default_word_break_characters): Constify.
2331         * language.h (language_defn::la_word_break_characters): Constify.
2332         (default_word_break_characters): Constify.
2333         * top.c (init_main): Use set_rl_completer_word_break_characters.
2334
2335 2017-04-05  Pedro Alves  <palves@redhat.com>
2336
2337         * aix-thread.c (aix_thread_pid_to_str)
2338         (aix_thread_extra_thread_info): Constify.
2339         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
2340         * bsd-uthread.c (bsd_uthread_extra_thread_info)
2341         (bsd_uthread_pid_to_str): Constify.
2342         * corelow.c (core_pid_to_str): Constify.
2343         * darwin-nat.c (darwin_pid_to_str): Constify.
2344         * fbsd-nat.c (fbsd_pid_to_str): Constify.
2345         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
2346         Constify.
2347         * gnu-nat.c (gnu_pid_to_str): Constify.
2348         * go32-nat.c (go32_pid_to_str): Constify.
2349         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
2350         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
2351         * inferior.c (inferior_pid_to_str): Constify.
2352         * linux-nat.c (linux_nat_pid_to_str): Constify.
2353         * linux-tdep.c (linux_core_pid_to_str): Constify.
2354         * linux-thread-db.c (thread_db_pid_to_str)
2355         (thread_db_extra_thread_info): Constify.
2356         * nto-tdep.c (nto_extra_thread_info): Constify.
2357         * nto-tdep.h (nto_extra_thread_info): Constify.
2358         * obsd-nat.c (obsd_pid_to_str): Constify.
2359         * procfs.c (procfs_pid_to_str): Constify.
2360         * ravenscar-thread.c (ravenscar_extra_thread_info)
2361         (ravenscar_pid_to_str): Constify.
2362         * remote-sim.c (gdbsim_pid_to_str): Constify.
2363         * remote.c (remote_threads_extra_info, remote_pid_to_str):
2364         Constify.
2365         * sol-thread.c (solaris_pid_to_str): Constify.
2366         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
2367         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
2368         * target.c (default_pid_to_str, target_pid_to_str)
2369         (normal_pid_to_str, default_pid_to_str): Constify.
2370         * target.h (target_ops::to_pid_to_str)
2371         (target_ops::to_extra_thread_info): Constify.
2372         (target_pid_to_str, normal_pid_to_str): Constify.
2373         * windows-nat.c (windows_pid_to_str): Constify.
2374         * gdbarch.sh (core_pid_to_str): Constify.
2375         * target-delegates.c: Regenerate.
2376         * gdbarch.h, gdbarch.c: Regenerate.
2377
2378 2017-04-05  Pedro Alves  <palves@redhat.com>
2379
2380         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
2381         the memory of the temporary warning_pre_print override.
2382         * utils.c (warning_pre_print): Constify.
2383         * utils.h (warning_pre_print): Constify.
2384
2385 2017-04-05  Pedro Alves  <palves@redhat.com>
2386
2387         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
2388         (shell_command): New function.
2389         (make_command): Use std::string.
2390         (init_cli_cmds): Register shell_command instead of shell_escape.
2391
2392 2017-04-05  Pedro Alves  <palves@redhat.com>
2393
2394         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
2395         * tracepoint.c (default_collect): Don't initialize.
2396
2397 2017-04-05  Pedro Alves  <palves@redhat.com>
2398
2399         * macroexp.c (macro_buffer::shared): Now a bool.
2400         (init_buffer): Update.
2401         (init_shared_buffer): Constify 'addr' parameter.
2402         (substitute_args, expand, macro_expand, macro_expand_next): Remove
2403         casts.
2404
2405 2017-04-05  Pedro Alves  <palves@redhat.com>
2406
2407         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
2408         * disasm.c (set_disassembler_options): Constify local.
2409         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
2410
2411 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
2412
2413         PR gdb/21352
2414         * tracefile.c (tsave_command): Fix argument parsing for '-r'
2415         option.
2416
2417 2017-04-05  Yao Qi  <yao.qi@linaro.org>
2418
2419         * frame.c (frame_unwind_register_unsigned): Call
2420         frame_unwind_register_value.
2421
2422 2017-04-05  Yao Qi  <yao.qi@linaro.org>
2423
2424         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
2425         Use gdb_test_multiple, and don't match anchor.
2426
2427 2017-04-05  Pedro Alves  <palves@redhat.com>
2428
2429         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
2430         (Write After Approval): Remove Simon Marchi.
2431
2432 2017-04-05  Pedro Alves  <palves@redhat.com>
2433
2434         * common/gdb_optional.h (optional::optional): Make constexpr and
2435         initialize m_dummy.
2436
2437 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
2438
2439         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2440         (amd64fbsd_jmp_buf_reg_offset): Remove.
2441         (amd64fbsd_supply_uthread): Remove function.
2442         (amd64fbsd_collect_uthread): Remove function.
2443         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
2444         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
2445         (x86_64-*-freebsd*): Remove bsd-uthread.o.
2446         (fbsd-nat.c): Update comment.
2447         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
2448         (i386fbsd_jmp_buf_reg_offset): Remove.
2449         (i386fbsd_supply_uthread): Remove function.
2450         (i386fbsd_collect_uthread): Remove function.
2451         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
2452
2453 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
2454
2455         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
2456         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
2457         * NEWS: Mention that support for FreeBSD/alpha was removed.
2458         * alpha-fbsd-tdep.c: Delete file.
2459         * config/alpha/fbsd.mh: Delete file.
2460         * configure.host: Delete alpha*-*-freebsd* and
2461         alpha*-*-kfreebsd*-gnu.
2462         * configure.tgt: Delete alpha*-*-freebsd* and
2463         alpha*-*-kfreebsd*-gnu.
2464
2465 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
2466
2467         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
2468         amd64bsd_store_inferior_registers): Use ptid from regcache.
2469
2470 2017-04-04  Pedro Alves  <palves@redhat.com>
2471
2472         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
2473         data fields, make them private and add "m_" prefixes.
2474         (lnp_state_machine::lnp_state_machine): New ctor.
2475         (record_line, check_line_address, handle_set_discriminator)
2476         (handle_set_address, handle_advance_pc, handle_special_opcode)
2477         (handle_advance_line, handle_set_file, handle_negate_stmt)
2478         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
2479         (end_sequence, advance_line): New methods.
2480         (m_gdbarch, m_record_lines_p): New fields.
2481         (lnp_reader_state): Delete.
2482         (dwarf_record_line): Rename to ...
2483         (lnp_state_machine::record_line): ... adjust.
2484         (init_lnp_state_machine): Delete.
2485         (lnp_state_machine::lnp_state_machine): New.
2486         (check_line_address): Rename to ...
2487         (lnp_state_machine::check_line_address): This.
2488         (dwarf_decode_lines_1): Remove reference to "reader_state".
2489         Adjust lnp_state_machine having a non-default ctor.  Use bool.
2490         State machine internal state manipulation moved to
2491         lnp_state_machine methods.
2492
2493 2017-04-04  Pedro Alves  <palves@redhat.com>
2494
2495         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2496         unittests/offset-type-selftests.c.
2497         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
2498         * common/offset-type.h: New file.
2499         * common/preprocessor.h: New file.
2500         * common/traits.h: New file.
2501         * common/valid-expr.h: New file.
2502         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
2503         sect_offset and cu_offset strong typedefs throughout.
2504         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
2505         typedefs throughout.
2506         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
2507         sect_offset and cu_offset strong typedefs throughout.
2508         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
2509         typedefs throughout.
2510         * gdbtypes.h: Include "common/offset-type.h".
2511         (cu_offset): Now an offset type (strong typedef) instead of a
2512         struct.
2513         (sect_offset): Likewise.
2514         (union call_site_parameter_u): Rename "param_offset" field to
2515         "param_cu_off".
2516         * unittests/offset-type-selftests.c: New file.
2517
2518 2017-04-04  Pedro Alves  <palves@redhat.com>
2519
2520         * common/underlying.h: New file.
2521         * dwarf2read.c: Include "common/gdb_optional.h" and
2522         "common/underlying.h".
2523         (dir_index, file_name_index): New types.
2524         (file_entry): Use them.
2525         (file_entry::include): Use to_underlying.
2526         (line_header::add_file_name): Use dir_index.
2527         (read_formatted_entries): Use gdb::optional.  Read form before
2528         writting to file_entry.
2529         (dwarf_decode_line_header): Use dir_index.
2530         (lnp_state_machine::current_file): Use to_underlying.
2531         (lnp_state_machine::file): Change type to file_name_index.
2532         (dwarf_record_line): Use to_underlying.
2533         (init_lnp_state_machine): Use file_name_index.
2534         (dwarf_decode_lines_1): Use dir_index and file_name_index.
2535
2536 2017-04-04  Pedro Alves  <palves@redhat.com>
2537
2538         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
2539         operator bool, has_value and get methods.
2540
2541 2017-04-04  Pedro Alves  <palves@redhat.com>
2542
2543         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
2544         fields.
2545         (line_header): Initialize all data fields.  Change type of
2546         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
2547         Change type of include_dirs to std::vector<const char *>.  Remove
2548         num_include_dirs, include_dirs_size.  Change type of file_names to
2549         std::vector<file_entry>.  Remove num_file_names, file_names_size.
2550         (line_header::line_header): New.
2551         (line_header::add_include_dir, line_header::add_file_name): New
2552         methods.
2553         (line_header::include_dir_at): Remove NULL check.
2554         (line_header::file_name_at): Add const overload.
2555         (line_header_up): New unique_ptr typedef.
2556         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
2557         std::vector.  Remove free_line_header call.
2558         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
2559         free_line_header call.
2560         (free_cu_line_header): Delete.
2561         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
2562         (setup_type_unit_groups): Use line_header_up instead of cleanups.
2563         Adjust to use std::vector.
2564         (free_line_header): Delete.
2565         (free_line_header_voidp): Use delete.
2566         (add_include_dir): Replace with ...
2567         (line_header::add_include_dir): ... this method.  Use std::vector.
2568         (add_file_name): Replace with ...
2569         (line_header::add_file_name): ... this method.  Use std::vector.
2570         (add_include_dir_stub): Delete.
2571         (read_formatted_entries): Remove memset.
2572         (dwarf_decode_line_header): Return a line_header_up instead of a
2573         raw pointer.  Remove cleanup handling.  Pass lambdas to
2574         read_formatted_entries.  Adjust to use line_header methods.
2575         (dwarf_decode_lines_1): Adjust to use line_header methods.
2576         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
2577         use std::vector.
2578
2579 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
2580
2581         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
2582         instead of struct ptid.
2583
2584 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
2585
2586         * frame.c (get_frame_register_bytes): Unwind using value.
2587         (put_frame_register_bytes): Likewise.
2588
2589 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
2590
2591         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
2592         aggregate-like.
2593
2594 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
2595
2596         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
2597
2598 2017-03-29  Yao Qi  <yao.qi@linaro.org>
2599
2600         * gdbthread.h (struct thread_info): Declare constructor and
2601         destructor.  Add some in-class member initializers.
2602         * thread.c (free_thread): Remove.
2603         (init_thread_list): Call delete instead of free_thread.
2604         (new_thread): Call thread_info constructor.
2605         (thread_info::thread_info): New function.
2606         (thread_info::~thread_info): New function.
2607         (delete_thread_1): Call delete instead of free_thread.
2608         (make_cleanup_restore_current_thread): Move tp and frame to
2609         inner block.
2610
2611 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
2612
2613         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
2614         (arc_skip_prologue): Likewise.
2615         (arc_make_frame_cache): Likewise.
2616         (arc_pv_get_operand): New function.
2617         (arc_is_in_prologue): Likewise.
2618         (arc_analyze_prologue): Likewise.
2619         (arc_print_frame_cache): Likewise.
2620         (MAX_PROLOGUE_LENGTH): New constant.
2621
2622 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
2623
2624         * configure.tgt: Add arc-insn.o.
2625         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
2626         (dump_arc_instruction_command): New function.
2627         (arc_fprintf_disasm): Likewise.
2628         (arc_disassemble_info): Likewise.
2629         (arc_insn_get_operand_value): Likewise.
2630         (arc_insn_get_operand_value_signed): Likewise.
2631         (arc_insn_get_memory_base_reg): Likewise.
2632         (arc_insn_get_memory_offset): Likewise.
2633         (arc_insn_get_branch_target): Likewise.
2634         (arc_insn_dump): Likewise.
2635         (arc_insn_get_linear_next_pc): Likewise.
2636         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
2637         (arc_disassemble_info): Likewise.
2638         (arc_insn_get_branch_target): Likewise.
2639         (arc_insn_get_linear_next_pc): Likewise.
2640         * NEWS: Mention new "maint print arc arc-instruction".
2641
2642 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
2643
2644         * arc-tdep (maintenance_print_arc_list): New variable.
2645         (maintenance_print_arc_command): New function.
2646
2647 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
2648
2649         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
2650         Add "limm" and "reserved".
2651         (arc_cannot_fetch_register, arc_cannot_store_register): Add
2652         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
2653         * arc-tdep.h (arc_regnum): Likewise.
2654
2655 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2656
2657         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
2658         for THREADPTR register.
2659         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
2660         register.
2661         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
2662         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
2663         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
2664
2665 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2666
2667         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
2668         registers above gdbarch_num_regs (gdbarch) as privileged in
2669         call0 ABI.
2670
2671 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2672
2673         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
2674         for a single specified register or for all registers in
2675         a0_base..a0_base + C0_NREGS range.
2676         (supply_gregset_reg): Call regcache_raw_supply for a single
2677         specified register or for all registers in a0_base..a0_base +
2678         C0_NREGS range.
2679
2680 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2681
2682         * arch/xtensa.h (C0_NREGS): Add definition.
2683         * xtensa-tdep.c (C0_NREGS): Remove definition.
2684
2685 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2686
2687         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
2688         Drop xtensa_default_isa initialization.
2689         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
2690
2691 2017-03-27  Pedro Alves  <palves@redhat.com>
2692
2693         * dwarf2read.c (file_entry) <dir_index>: Add comment.
2694         (file_entry::include_dir): New method.
2695         (line_header::include_dir_at, line_header::file_name_at): New
2696         methods.
2697         (setup_type_unit_groups, setup_type_unit_groups)
2698         (psymtab_include_file_name): Simplify using the new methods.
2699         (lnp_state_machine) <the_line_header>: New field.
2700         <file>: Add comment.
2701         (lnp_state_machine::current_file): New method.
2702         (dwarf_record_line): Simplify using the new methods.
2703         (init_lnp_state_machine): Initialize the "the_line_header" field.
2704         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
2705         Simplify using the new methods.
2706
2707 2017-03-27  Pedro Alves  <palves@redhat.com>
2708
2709         * cp-name-parser.y (make_empty): Delete.
2710         (demangler_special, nested_name, ptr_operator, array_indicator)
2711         (direct_declarator, declarator_1): Use fill_comp instead of
2712         make_empty.
2713
2714 2017-03-27  Pedro Alves  <palves@redhat.com>
2715
2716         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
2717         to ATTRIBUTE_PRINTF.
2718         * solib-target.c (library_list_start_list): Print "string" not
2719         "version".
2720         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
2721         gdb_xml_error call.
2722
2723 2017-03-27  Pedro Alves  <palves@redhat.com>
2724
2725         * dwarf2read.c (struct file_and_directory): New.
2726         (dwarf2_get_dwz_file): Adjust to use std::string.
2727         (dw2_get_file_names_reader): Adjust to use file_and_directory.
2728         (find_file_and_directory): Adjust to return a file_and_directory
2729         object.
2730         (read_file_scope): Adjust to use file_and_directory.  Remove
2731         make_cleanup/do_cleanups calls.
2732         (open_and_init_dwp_file): Adjust to use std::string.  Remove
2733         make_cleanup/do_cleanups calls.
2734         * python/python.c (do_start_initialization): Adjust to ldirname
2735         returning a std::string.
2736         * utils.c (ldirname): Now returns a std::string.
2737         * utils.h (ldirname): Change return type to std::string.
2738         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
2739         returning a std::string.
2740         * xml-tdesc.c (file_read_description_xml): Likewise.
2741
2742 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
2743
2744         * regcache.c (regcache_debug_print_register): New function.
2745         * regcache.h (regcache_debug_print_register): New declaration.
2746         * target.c (debug_print_register): Remove.
2747         (target_fetch_registers): Call regcache_debug_print_register.
2748         (target_store_registers): Likewise.
2749
2750 2017-03-24  Pádraig Brady  <pbrady@fb.com>
2751
2752         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
2753         reference beyond the 'lh->include_dirs' array before accessing to
2754         it.
2755         (psymtab_include_file_name): Likewise.
2756         (dwarf_decode_lines_1): Likewise.
2757         (dwarf_decode_lines): Likewise.
2758         (file_file_name): Likewise.
2759
2760 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
2761
2762         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
2763         inferior_ptid.
2764         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
2765         ps_lsetfpregs): Likewise.
2766         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
2767         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
2768         ps_lsetfpregs): Likewise.
2769         * target.c (target_fetch_registers, target_store_registers):
2770         Remove asserts.
2771
2772 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
2773
2774         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
2775
2776 2017-03-23  Yao Qi  <yao.qi@linaro.org>
2777
2778         * aarch64-tdep.c (aarch64_process_record_test): Declare.
2779         (_initialize_aarch64_tdep): Register it.
2780         (aarch64_record_load_store): Handle PRFM instruction.
2781         (aarch64_process_record_test): New function.
2782
2783 2017-03-23  Yao Qi  <yao.qi@linaro.org>
2784
2785         * aarch64-tdep.c (aarch64_record_load_store): Fix code
2786         indentation.
2787
2788 2017-03-23  Yao Qi  <yao.qi@linaro.org>
2789
2790         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
2791
2792 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
2793
2794         python/python.c (do_start_initialization): Fix memory leak.
2795
2796 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
2797
2798         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
2799         using get_ptrace_pid.
2800         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
2801         inferior_ptid.
2802         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
2803         inferior_ptid instead of pid.
2804
2805 2017-03-22  Yao Qi  <yao.qi@linaro.org>
2806
2807         * aarch64-tdep.c: Wrap locally used classes in anonymous
2808         namespace.
2809         * arm-tdep.c: Likewise.
2810         * linespec.c: Likewise.
2811         * ui-out.c: Likewise.
2812
2813 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
2814
2815         PR gdb/19637
2816         * python/lib/gdb/printer/bound_registers.py: Import sys.
2817
2818 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
2819
2820         * windows-nat.c (do_windows_fetch_inferior_registers): Add
2821         windows_thread_info parameter and use it instead of
2822         current_thread.
2823         (windows_fetch_inferior_registers): Don't set current_thread,
2824         pass the thread to do_windows_fetch_inferior_registers.  Use
2825         ptid from regcache instead of inferior_ptid.
2826         (do_windows_store_inferior_registers): Add windows_thread_info
2827         parameter and use it instead of current_thread.
2828         (windows_store_inferior_registers): Don't set current_thread,
2829         pass the thread to do_windows_store_inferior_registers.  Use
2830         ptid from regcache instead of inferior_ptid.
2831
2832 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
2833
2834         * ser-mingw.c (ser_windows_raw): Remove reference to
2835         struct serial::current_timeout.
2836
2837 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
2838
2839         PR tdep/20928
2840         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
2841         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
2842         (sparc64_fsr_type): Fix %fsr decoding.
2843
2844 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
2845
2846         * python/py-record-btrace.c (btpy_insn_data): Change return type
2847         for Python 2.
2848
2849 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
2850
2851         * spu-linux-nat.c (spu_fetch_inferior_registers,
2852         spu_store_inferior_registers): Use ptid from regcache, set and
2853         restore inferior_ptid.
2854         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
2855         Likewise.
2856
2857 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
2858
2859         * i386-linux-nat.c (fetch_register, store_register,
2860         i386_linux_fetch_inferior_registers,
2861         i386_linux_store_inferior_registers): Use ptid from regcache.
2862         * ia64-linux-nat.c (ia64_linux_fetch_register,
2863         ia64_linux_store_register): Likewise.
2864         * inf-ptrace.c (inf_ptrace_fetch_register,
2865         inf_ptrace_store_register): Likewise.
2866         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
2867         m32r_linux_store_inferior_registers): Likewise.
2868         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
2869         m68kbsd_store_inferior_registers): Likewise.
2870         * m68k-linux-nat.c (fetch_register, store_register,
2871         m68k_linux_fetch_inferior_registers,
2872         m68k_linux_store_inferior_registers): Likewise.
2873         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
2874         m88kbsd_store_inferior_registers): Likewise.
2875         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
2876         mips_fbsd_store_inferior_registers): Likewise.
2877         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
2878         mips64_linux_regsets_store_registers): Likewise.
2879         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
2880         mipsnbsd_store_inferior_registers): Likewise.
2881         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
2882         mips64obsd_store_inferior_registers): Likewise.
2883         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
2884         Likewise.
2885         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
2886         ppcfbsd_store_inferior_registers): Likewise.
2887         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
2888         ppc_linux_store_inferior_registers): Likewise.
2889         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
2890         ppcnbsd_store_inferior_registers): Likewise.
2891         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
2892         ppcobsd_store_registers): Likewise.
2893         * procfs.c (procfs_fetch_registers, procfs_store_registers):
2894         Likewise.
2895         * ravenscar-thread.c (ravenscar_fetch_registers,
2896         ravenscar_store_registers, ravenscar_prepare_to_store):
2897         Likewise.
2898         * record-btrace.c (record_btrace_fetch_registers,
2899         record_btrace_store_registers, record_btrace_prepare_to_store):
2900         Likewise.
2901         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
2902         Lookup inferior using ptid from regcache, instead of
2903         current_inferior.
2904         * remote.c (remote_fetch_registers, remote_store_registers): Use
2905         ptid from regcache.
2906         * rs6000-nat.c (fetch_register, store_register): Likewise.
2907         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
2908         s390_linux_store_inferior_registers): Likewise.
2909         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
2910         shnbsd_store_inferior_registers): Likewise.
2911         * sol-thread.c (sol_thread_fetch_registers,
2912         sol_thread_store_registers): Likewise.
2913         * sparc-nat.c (sparc_fetch_inferior_registers,
2914         sparc_store_inferior_registers): Likewise.
2915         * tilegx-linux-nat.c (fetch_inferior_registers,
2916         store_inferior_registers): Likewise.
2917         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
2918         vaxbsd_store_inferior_registers): Likewise.
2919         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
2920         store_xtregs): Likewise.
2921
2922 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
2923
2924         PR gdb/14441
2925         * NEWS: Mention support for rvalue references in GDB and python.
2926         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
2927         supports both lvalue and rvalue references.
2928
2929 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
2930
2931         PR gdb/14441
2932         * gdbtypes.c (rank_one_type): Implement overloading
2933         resolution rules regarding rvalue references.
2934
2935 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
2936
2937         PR gdb/14441
2938         * aarch64-tdep.c (aarch64_type_align)
2939         (aarch64_extract_return_value, aarch64_store_return_value): Change
2940         lvalue reference type checks to general reference type checks.
2941         * amd64-tdep.c (amd64_classify): Likewise.
2942         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
2943         Likewise.
2944         * arm-tdep.c (arm_type_align, arm_extract_return_value)
2945         (arm_store_return_value): Likewise.
2946         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
2947         * c-typeprint.c (c_print_type): Likewise.
2948         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
2949         (cplus_number_of_children, cplus_describe_child): Likewise.
2950         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2951         * completer.c (expression_completer): Likewise.
2952         * cp-support.c (make_symbol_overload_list_adl_namespace):
2953         Likewise.
2954         * darwin-nat-info.c (info_mach_region_command): Likewise.
2955         * dwarf2loc.c (entry_data_value_coerce_ref)
2956         (value_of_dwarf_reg_entry): Likewise.
2957         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
2958         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
2959         Likewise.
2960         * findvar.c (extract_typed_address, store_typed_address):
2961         Likewise.
2962         * gdbtypes.c (rank_one_type): Likewise.
2963         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
2964         * infcall.c (value_arg_coerce): Likewise.
2965         * language.c (pointer_type): Likewise.
2966         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
2967         Likewise.
2968         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
2969         * mn10300-tdep.c (mn10300_type_align): Likewise.
2970         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
2971         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
2972         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
2973         Likewise.
2974         * printcmd.c (print_formatted, x_command): Likewise.
2975         * python/py-type.c (typy_get_composite, typy_template_argument):
2976         Likewise.
2977         * python/py-value.c (valpy_referenced_value)
2978         (valpy_get_dynamic_type, value_has_field): Likewise.
2979         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
2980         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
2981         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
2982         * spu-tdep.c (spu_scalar_value_p): Likewise.
2983         * symtab.c (lookup_symbol_aux): Likewise.
2984         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
2985         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
2986         Likewise.
2987         * valops.c (value_cast_pointers, value_cast)
2988         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
2989         (value_struct_elt, value_struct_elt_bitpos)
2990         (value_find_oload_method_list, find_overload_match)
2991         (value_rtti_indirect_type): Likewise.
2992         * valprint.c (val_print_scalar_type_p, generic_val_print):
2993         Likewise.
2994         * value.c (value_actual_type, value_as_address, unpack_long)
2995         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
2996         (coerce_ref): Likewise.
2997         * varobj.c (varobj_get_value_type): Likewise.
2998
2999 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3000
3001         PR gdb/14441
3002         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
3003         table of constants.
3004         * python/lib/gdb/command/explore.py: Support exploring values
3005         of rvalue reference types.
3006         * python/lib/gdb/types.py: Implement get_basic_type() for
3007         rvalue reference types.
3008         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
3009         constant.
3010         * python/py-value.c (valpy_getitem): Add an rvalue reference
3011         check.
3012         (valpy_reference_value): Add new parameter "refcode".
3013         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
3014         New wrappers for valpy_reference_value().
3015         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
3016         (gdbpy_invoke_xmethod): Likewise.
3017
3018 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3019
3020         PR gdb/14441
3021         * dwarf2read.c (process_die, read_type_die_1): Handle the
3022         DW_TAG_rvalue_reference_type DIE.
3023         (read_tag_reference_type): Add new parameter "refcode".
3024
3025 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3026
3027         PR gdb/14441
3028         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
3029         (c_type_print_modifier, c_type_print_varspec_suffix)
3030         (c_type_print_base): Support printing rvalue reference types.
3031         * c-valprint.c (c_val_print, c_value_print): Support printing
3032         rvalue reference values.
3033
3034 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3035
3036         PR gdb/14441
3037         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
3038         typename.
3039         * cp-support.c (replace_typedefs): Handle
3040         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
3041         * python/py-type.c (typy_lookup_type): Likewise.
3042
3043 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3044
3045         PR gdb/14441
3046         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
3047         * parse.c (insert_type): Change assert statement.
3048         (follow_types): Handle rvalue reference types.
3049         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
3050         constant.
3051
3052 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3053
3054         PR gdb/14441
3055         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
3056         value_ref() interface.
3057         * c-valprint.c (c_value_print): Likewise.
3058         * infcall.c (value_arg_coerce): Likewise.
3059         * python/py-value.c (valpy_reference_value): Likewise.
3060         * valops.c (value_cast, value_reinterpret_cast)
3061         (value_dynamic_cast, typecmp): Likewise.
3062         (value_ref): Parameterize by kind of return value reference type.
3063         * value.h (value_ref): Add new parameter "refcode".
3064
3065 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3066
3067         PR gdb/14441
3068         * dwarf2read.c (read_tag_reference_type): Use
3069         lookup_lvalue_reference_type() instead of lookup_reference_type().
3070         * eval.c (evaluate_subexp_standard): Likewise.
3071         * f-exp.y: Likewise.
3072         * gdbtypes.c (make_reference_type, lookup_reference_type):
3073         Generalize with rvalue reference types.
3074         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
3075         convenience wrappers for lookup_reference_type().
3076         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
3077         reference kind parameter.
3078         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
3079         wrappers for lookup_reference_type().
3080         * guile/scm-type.c (gdbscm_type_reference): Use
3081         lookup_lvalue_reference_type() instead of lookup_reference_type().
3082         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
3083         * parse.c (follow_types): Likewise.
3084         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
3085         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
3086         Likewise.
3087         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
3088         (gdbpy_invoke_xmethod): Likewise.
3089         * stabsread.c: Provide extra argument to make_reference_type()
3090         call.
3091         * valops.c (value_ref, value_rtti_indirect_type): Use
3092         lookup_lvalue_reference_type() instead of lookup_reference_type().
3093
3094 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
3095
3096         PR gdb/14441
3097         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
3098         (TYPE_IS_REFERENCE): New macro.
3099         (struct type): Add rvalue_reference_type field.
3100         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
3101
3102 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
3103
3104         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
3105         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
3106         New function definition.
3107         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
3108         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
3109         New function declaration.
3110         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
3111         * mi/mi-interp.h: New file.
3112         * solib.c (info_sharedlibrary_command): Replace for loop with
3113         ALL_SO_LIBS macro
3114         * solib.h (update_solib_list): New function declaration.
3115         (so_list_head): Move macro.
3116         * solist.h (ALL_SO_LIBS): New macro.
3117
3118 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
3119
3120         * infcmd.c (post_create_inferior): Remove unused argument in
3121         call to solib_add.
3122         * remote.c (remote_start_remote): Likewise.
3123         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
3124         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
3125         (enable_break): Likewise.
3126         * solib.c (update_solib_list): Remove unused target argument
3127         and its documentation.
3128         (solib_add): Remove unused target argument.  Remove unused
3129         argument in call to update_solib_list.
3130         (info_sharedlibrary_command): Remove unused argument in call
3131         to update_solib_list.
3132         (sharedlibrary_command): Remove unused argument in call to
3133         solib_add.
3134         (handle_solib_event): Likewise.
3135         (reload_shared_libraries): Likewise.
3136         * solib.h (solib_add): Remove unused target argument.
3137
3138 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3139
3140         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
3141         (s390_displaced_step_fixup): Cover relative branches with the
3142         default fixup handling.  This fixes lack of support for some
3143         relative branch instructions.
3144
3145 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3146
3147         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
3148         ptid from regcache.
3149
3150 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3151
3152         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
3153         i386_darwin_store_inferior_registers): Use ptid from regcache.
3154
3155 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3156
3157         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
3158         i386bsd_store_inferior_registers): Use ptid from regcache.
3159
3160 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3161
3162         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
3163         hppaobsd_store_registers): Use ptid from regcache.
3164
3165 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3166
3167         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
3168         hppanbsd_store_registers): Use ptid from regcache.
3169
3170 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3171
3172         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
3173         from regcache.  Use get_ptrace_pid.
3174
3175 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3176
3177         * corelow.c (get_core_register_section): Use ptid from regcache,
3178         update doc.
3179
3180 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3181
3182         * bsd-uthread.c (bsd_uthread_fetch_registers,
3183         bsd_uthread_store_registers): Use ptid from regcache, set and
3184         restore inferior_ptid.
3185
3186 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3187
3188         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
3189         fetch_fp_regs, store_register, store_regs, store_fp_register,
3190         store_fp_regs): Use ptid from regcache.
3191
3192 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
3193
3194         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
3195         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
3196         store_vfp_regs): Use ptid from regcache.
3197
3198 2017-03-17  Pedro Alves  <palves@redhat.com>
3199
3200         PR remote/21188
3201         * ser-base.c (ser_base_wait_for): Add comment.
3202         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
3203         version.
3204         * ser-unix.c (hardwire_raw): Remove reference to
3205         scb->current_timeout.
3206         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
3207         (hardwire_ops): Install ser_base_readchar instead of
3208         hardwire_readchar.
3209         * serial.h (struct serial) <current_timeout, timeout_remaining>:
3210         Remove fields.
3211
3212 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
3213
3214         PR gdb/19637
3215         * python/lib/gdb/printer/bound_registers.py: Add support for
3216         Python 3.
3217
3218 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3219
3220         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
3221         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
3222         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
3223         byte_offset to subobj_byte_offset.  Fix the handling of
3224         DWARF_VALUE_STACK on big-endian targets when coming via an
3225         implicit pointer.
3226         (dwarf2_evaluate_loc_desc): Adjust call to
3227         dwarf2_evaluate_loc_desc_full.
3228         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
3229         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
3230
3231 2017-03-16  Yao Qi  <yao.qi@linaro.org>
3232
3233         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
3234         and REVSH instructions.
3235
3236 2017-03-16  Yao Qi  <yao.qi@linaro.org>
3237
3238         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
3239         (arm_record_test): Declare.
3240         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
3241         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
3242         align with the manual.
3243         (thumb_record_misc): Adjust the code order to align with the
3244         manual.
3245         (thumb2_record_decode_insn_handler): Fix instruction matching.
3246         (instruction_reader_thumb): New class.
3247         (arm_record_test): New function.
3248
3249 2017-03-16  Yao Qi  <yao.qi@linaro.org>
3250
3251         * arm-tdep.c (abstract_memory_reader): New class.
3252         (instruction_reader): New class.
3253         (extract_arm_insn): Add argument 'reader'.  Callers updated.
3254         (decode_insn): Likewise.
3255
3256 2017-03-16  Doug Evans  <dje@google.com>
3257
3258         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
3259         member.  Change type of TYPE member to SCM.  All uses updated.
3260         (lsscm_make_lazy_string_smob): Add assert.
3261         (lsscm_make_lazy_string): Flag bad length values.
3262         (lsscm_elt_type): New function.
3263         (gdbscm_lazy_string_to_value): Rewrite to use
3264         lsscm_safe_lazy_string_to_value.
3265         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
3266         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
3267         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
3268         in incoming type.
3269         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3270         * guile/scm-type.c (tyscm_scm_to_type): New function.
3271
3272 2017-03-15  Doug Evans  <dje@google.com>
3273
3274         PR python/17728, python/18439, python/18779
3275         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
3276         member.  Change type of TYPE member to PyObject *.  All uses updated.
3277         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
3278         (gdbpy_create_lazy_string_object): Flag bad length values.
3279         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
3280         Handle typedefs in incoming type.
3281         (stpy_lazy_string_elt_type): New function.
3282         (gdbpy_extract_lazy_string): Call it.
3283         * python/py-value.c (valpy_lazy_string): Flag bad length values.
3284         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
3285         typedefs in incoming type.
3286
3287 2017-03-16  Doug Evans  <dje@google.com>
3288
3289         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
3290         * guile/scm-type.c (tyscm_scm_to_type): New function.
3291
3292 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
3293
3294         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
3295         "ULONGEST" for "skip".
3296
3297 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3298
3299         PR gdb/21220
3300         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
3301         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
3302         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
3303         over ptrace peek/poke until end of buffer or error.
3304
3305 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
3306
3307         * parse.c (length_of_subexp): Make static.
3308         * parser-defs.h (length_of_subexp): Remove.
3309
3310 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3311
3312         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
3313         as well.
3314
3315 2017-03-14  Pedro Alves  <palves@redhat.com>
3316
3317         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
3318         (main): Use std::unique_ptr.  Remove calls to
3319         cp_demangled_name_parse_free.
3320
3321 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
3322
3323         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
3324         alphabsd_store_inferior_registers): Use regcache->ptid instead
3325         of inferior_ptid.
3326
3327 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
3328
3329         * aix-thread.c (aix_thread_fetch_registers,
3330         aix_thread_store_registers): Use regcache->ptid instead of
3331         inferior_ptid.
3332
3333 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
3334
3335         * aarch64-linux-nat.c (fetch_gregs_from_thread,
3336         store_gregs_to_thread, fetch_fpregs_from_thread,
3337         store_fpregs_to_thread): Use regcache->ptid instead of
3338         inferior_ptid.
3339
3340 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
3341
3342         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
3343         amd64_linux_fetch_inferior_registers): Use regcache->ptid
3344         instead of inferior_ptid.
3345
3346 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
3347
3348         * target.c (target_fetch_registers, target_store_registers): Add
3349         assert.
3350
3351 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
3352
3353         * regcache.h (regcache_get_ptid): New function.
3354         * regcache.c (regcache_get_ptid): New function.
3355
3356 2017-03-13  Mark Wielaard  <mark@klomp.org>
3357
3358         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
3359
3360 2017-03-10  Keith Seitz  <keiths@redhat.com>
3361
3362         PR c++/8218
3363         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
3364
3365 2017-03-08  Pedro Alves  <palves@redhat.com>
3366
3367         PR gdb/18360
3368         * infrun.c (start_step_over, do_target_resume, resume)
3369         (restart_threads): Assert we're not resuming a thread that is
3370         meant to be stopped.
3371         (infrun_thread_stop_requested_callback): Delete.
3372         (infrun_thread_stop_requested): If the thread is internally
3373         stopped, queue a pending stop event and clear the thread's
3374         inline-frame state.
3375         (handle_stop_requested): New function.
3376         (handle_syscall_event, handle_inferior_event_1): Use
3377         handle_stop_requested.
3378         (handle_stop_requested): New function.
3379         (handle_signal_stop): Set the thread's stop_signal here instead of
3380         at caller.
3381         (finish_step_over): Clear step over info unconditionally.
3382         (handle_signal_stop): If the user had interrupted the event
3383         thread, consider the stop a random signal.
3384         (handle_signal_stop) <signal arrived while stepping over
3385         breakpoint>: Don't restart threads here.
3386         (stop_waiting): Don't clear step-over info here.
3387
3388 2017-03-08  Pedro Alves  <palves@redhat.com>
3389
3390         PR 21206
3391         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
3392         goes to argument 2, not 1.
3393
3394 2017-03-08  Pedro Alves  <palves@redhat.com>
3395
3396         PR cli/21218
3397         * top.c (gdb_readline_wrapper): Avoid passing NULL to
3398         display_gdb_prompt.
3399         (command_line_input): Add comment.
3400
3401 2017-03-08  Pedro Alves  <palves@redhat.com>
3402
3403         PR tui/21216
3404         * tui/tui-file.c (tui_file::write): New.
3405         * tui/tui-file.h (tui_file): Override "write".
3406         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
3407         factored out from ...
3408         (tui_puts): ... here.
3409         (tui_putc): Use them.
3410         (tui_write): New function.
3411         * tui/tui-io.h (tui_write): Declare.
3412
3413 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3414
3415         * Makefile.in (SFILES): Replace "environ.c" with
3416         "common/environ.c".
3417         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
3418         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
3419         to...
3420         * common/environ.c: ... here.
3421         * environ.h: Moved to...
3422         * common/environ.h: ... here.
3423
3424 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
3425
3426         * gdbarch.sh (pstring_ptr): New static function.
3427         (gdbarch_disassembler_options): Use it.
3428         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
3429         not valid_disassembler_option->name.
3430         * gdbarch.c: Regenerate.
3431
3432 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
3433
3434         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
3435
3436 2017-03-07  Pedro Alves  <palves@redhat.com>
3437
3438         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
3439
3440 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3441
3442         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
3443         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
3444         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
3445         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
3446
3447 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
3448
3449         * xtensa-linux-nat.c (fetch_gregs): Remove const.
3450
3451 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
3452
3453         * remote.c (remote_add_target_side_commands): Use range-based
3454         for loop.
3455
3456 2017-03-03  Yao Qi  <yao.qi@linaro.org>
3457
3458         PR gdb/21165
3459         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
3460         value is lazy.
3461         * valprint.c (common_val_print): Likewise.
3462
3463 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
3464
3465         * NEWS: Mention new set/show disassembler-options commands.
3466         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
3467         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
3468         (prospective_options): New static variable.
3469         (gdb_disassembler::gdb_disassembler): Initialize
3470         m_di.disassembler_options.
3471         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
3472         (get_disassembler_options): New function.
3473         (set_disassembler_options): Likewise.
3474         (set_disassembler_options_sfunc): Likewise.
3475         (show_disassembler_options_sfunc): Likewise.
3476         (disassembler_options_completer): Likewise.
3477         (_initialize_disasm): Likewise.
3478         * disasm.h (get_disassembler_options): New prototype.
3479         (set_disassembler_options): Likewise.
3480         * gdbarch.sh (gdbarch_disassembler_options): New variable.
3481         (gdbarch_verify_disassembler_options): Likewise.
3482         * gdbarch.c: Regenerate.
3483         * gdbarch.h: Likewise.
3484         * arm-tdep.c (num_disassembly_options): Delete.
3485         (set_disassembly_style): Likewise.
3486         (arm_disassembler_options): New static variable.
3487         (set_disassembly_style_sfunc): Convert short style name into long
3488         option name.  Call set_disassembler_options.
3489         (show_disassembly_style_sfunc): New function.
3490         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
3491         set_gdbarch_verify_disassembler_options.
3492         (_initialize_arm_tdep): Delete regnames variable and update callers.
3493         (arm_disassembler_options): Initialize.
3494         (disasm_options): New variable.
3495         (num_disassembly_options): Rename from this...
3496         (num_disassembly_styles): ...to this.  Compute by scanning through
3497         disasm_options.
3498         (valid_disassembly_styles): Initialize using disasm_options.
3499         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
3500         set_arm_regname_option.
3501         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
3502         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
3503         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
3504         set_gdbarch_verify_disassembler_options.
3505         * s390-tdep.c (s390_disassembler_options): New static variable.
3506         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
3507         set_gdbarch_verify_disassembler_options.
3508
3509 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
3510
3511         * remote.c (remote_add_target_side_condition): Remove "struct"
3512         keyword from range-based for loop.
3513
3514 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
3515
3516         * remote.c (remote_add_target_side_condition): Use range-based
3517         for loop.  Update comment.
3518
3519 2017-02-27  Yao Qi  <yao.qi@linaro.org>
3520
3521         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
3522
3523 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
3524
3525         * regcache.c (regcache_raw_update): New function.
3526         (regcache_raw_read): Move code to regcache_raw_update.
3527         * regcache.h (regcache_raw_update): New declaration.
3528         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
3529
3530 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
3531
3532         * dwarf2read.c (create_debug_type_hash_table): Initialize
3533         header.signature and header.type_offset_in_tu.
3534
3535 2017-02-24  Pedro Alves  <palves@redhat.com>
3536
3537         * symtab.c (make_file_symbol_completion_list_1): Use
3538         add_symtab_completions.
3539
3540 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
3541
3542         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
3543
3544 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
3545
3546         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
3547         I386_MAX_REGISTER_SIZE.
3548         (i386_pseudo_register_write): Likewise.
3549         (i386_process_record): Likewise.
3550         * i387-tdep.c (i387_supply_xsave): Likewise.
3551         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
3552         (store_register): Likewise.
3553
3554 2017-02-23  Pedro Alves  <palves@redhat.com>
3555
3556         * ada-lang.c: Include "common/function-view.h".
3557         (ada_iterate_over_symbols): Adjust to use function_view as
3558         callback type.
3559         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
3560         (ada_make_symbol_completion_list): Use a lambda.
3561         (ada_exc_search_name_matches): Delete.
3562         (name_matches_regex): New.
3563         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
3564         * compile/compile-c-support.c: Include "common/function-view.h".
3565         (print_one_macro): Change prototype to accept a ui_file pointer.
3566         (write_macro_definitions): Use a lambda.
3567         * dwarf2read.c: Include "common/function-view.h".
3568         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
3569         (dw2_expand_symtabs_matching): Adjust to use function_view as
3570         callback type.
3571         * language.h: Include "common/function-view.h".
3572         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
3573         function_view as callback type.
3574         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
3575         * linespec.c: Include "common/function-view.h".
3576         (collect_info::add_symbol): New method.
3577         (struct symbol_and_data_callback, iterate_inline_only, struct
3578         symbol_matcher_data, iterate_name_matcher): Delete.
3579         (iterate_over_all_matching_symtabs): Adjust to use function_view
3580         as callback type and lambdas.
3581         (iterate_over_file_blocks): Adjust to use function_view as
3582         callback type.
3583         (decode_compound_collector): Now a class with private fields.
3584         (decode_compound_collector::release_symbols): New method.
3585         (collect_one_symbol): Rename to...
3586         (decode_compound_collector::operator()): ... this and adjust.
3587         (lookup_prefix_sym): decode_compound_collector construction bits
3588         move to decode_compound_collector ctor.  Pass the
3589         decode_compound_collector object directly as callback.  Remove
3590         cleanups and use decode_compound_collector::release_symbols
3591         instead.
3592         (symtab_collector): Now a class with private fields.
3593         (symtab_collector::release_symtabs): New method.
3594         (add_symtabs_to_list): Rename to...
3595         (symtab_collector::operator()): ... this and adjust.
3596         (collect_symtabs_from_filename): symtab_collector construction
3597         bits move to symtab_collector ctor.  Pass the symtab_collector
3598         object directly as callback.  Remove cleanups and use
3599         symtab_collector::release_symtabs instead.
3600         (collect_symbols): Delete.
3601         (add_matching_symbols_to_info): Use lambdas.
3602         * macrocmd.c (print_macro_callback): Delete.
3603         (info_macro_command): Use a lambda.
3604         (info_macros_command): Pass print_macro_definition as callable
3605         directly.
3606         (print_one_macro): Remove 'ignore' parameter.
3607         (macro_list_command): Adjust.
3608         * macrotab.c (macro_for_each_data::fn): Now a function_view.
3609         (macro_for_each_data::user_data): Delete field.
3610         (foreach_macro): Adjust to call the function_view.
3611         (macro_for_each): Adjust to use function_view as callback type.
3612         (foreach_macro_in_scope): Adjust to call the function_view.
3613         (macro_for_each_in_scope): Adjust to use function_view as callback
3614         type.
3615         * macrotab.h: Include "common/function-view.h".
3616         (macro_callback_fn): Declare a prototype instead of a pointer.
3617         Remove "user_data" parameter.
3618         (macro_for_each, macro_for_each_in_scope): Adjust to use
3619         function_view as callback type.
3620         * psymtab.c (partial_map_expand_apply)
3621         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
3622         Adjust to use function_view as callback type and to return bool.
3623         (psym_expand_symtabs_matching): Adjust to use function_view as
3624         callback types.
3625         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
3626         to use function_view as callback type and to return bool.
3627         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
3628         callback types.
3629         * symfile.c (expand_symtabs_matching): Adjust to use function_view
3630         as callback types.
3631         * symfile.h: Include "common/function-view.h".
3632         (expand_symtabs_file_matcher_ftype)
3633         (expand_symtabs_symbol_matcher_ftype)
3634         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
3635         return bool.
3636         (quick_symbol_functions::map_symtabs_matching_filename)
3637         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
3638         function_view as callback type and return bool.
3639         (expand_symtabs_matching): Adjust to use function_view as callback
3640         type.
3641         (maintenance_expand_name_matcher)
3642         (maintenance_expand_file_matcher): Delete.
3643         (maintenance_expand_symtabs): Use lambdas.
3644         * symtab.c (iterate_over_some_symtabs): Adjust to use
3645         function_view as callback types and return bool.
3646         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
3647         of a cleanup.
3648         (lookup_symtab_callback): Delete.
3649         (lookup_symtab): Use a lambda.
3650         (iterate_over_symbols): Adjust to use function_view as callback
3651         type.
3652         (struct search_symbols_data, search_symbols_file_matches)
3653         (search_symbols_name_matches): Delete.
3654         (search_symbols): Use a pair of lambdas.
3655         (struct add_name_data, add_macro_name, symbol_completion_matcher)
3656         (symtab_expansion_callback): Delete.
3657         (default_make_symbol_completion_list_break_on_1): Use lambdas.
3658         * symtab.h: Include "common/function-view.h".
3659         (iterate_over_some_symtabs): Adjust to use function_view as
3660         callback type and return bool.
3661         (iterate_over_symtabs): Adjust to use function_view as callback
3662         type.
3663         (symbol_found_callback_ftype): Remove 'data' parameter and return
3664         bool.
3665         (iterate_over_symbols): Adjust to use function_view as callback
3666         type.
3667
3668 2017-02-23  Pedro Alves  <palves@redhat.com>
3669
3670         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
3671         (%.o) <unittests/%.c>: New pattern.
3672         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
3673         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
3674         * common/function-view.h: New file.
3675         * unittests/function-view-selftests.c: New file.
3676         * configure: Regenerate.
3677
3678 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
3679
3680         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
3681         inferior_ptid.
3682         * go32-nat.c (go32_thread_alive): Likewise.
3683
3684 2017-02-23  Yao Qi  <yao.qi@linaro.org>
3685
3686         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
3687         delete.
3688
3689 2017-02-23  Yao Qi  <yao.qi@linaro.org>
3690
3691         * varobj.c (varobj_clear_saved_item): Use delete instead of
3692         xfree.
3693         (update_dynamic_varobj_children): Likewise.
3694
3695 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3696
3697         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
3698
3699 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
3700
3701         * common/enum-flags.h (enum_flags::enum_flags): Initialize
3702         m_enum_value to 0 in default constructor.
3703
3704 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3705
3706         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
3707         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
3708         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
3709         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
3710         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
3711         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
3712         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
3713         IS_STORE_CONDITIONAL_INSN.
3714
3715 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3716
3717         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
3718
3719 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3720
3721         * NEWS (Changes since GDB 7.12): Add DWARF-5.
3722
3723 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3724
3725         * dwarf2read.c (skip_one_die, read_attribute_value)
3726         (dwarf2_const_value_attr, dump_die_shallow)
3727         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
3728         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
3729
3730 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3731
3732         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
3733         (dwarf_parse_macro_header): Accept DWARF version 5.
3734         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
3735
3736 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3737
3738         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
3739         DW_AT_GNU_*.
3740         * common/common-exceptions.h (enum errors): Likewise.
3741         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
3742         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
3743         (dwarf_expr_context::execute_stack_op): Likewise.
3744         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
3745         Likewise.
3746         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
3747         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
3748         (show_entry_values_debug, call_site_to_target_addr)
3749         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
3750         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
3751         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
3752         (value_of_dwarf_block_entry, indirect_pieced_value)
3753         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
3754         (disassemble_dwarf_expression): Likewise.
3755         * dwarf2read.c (process_die, inherit_abstract_dies)
3756         (read_call_site_scope): Likewise.
3757         * gdbtypes.h (struct func_type, struct call_site_parameter)
3758         (struct call_site): Likewise.
3759         * stack.c (read_frame_arg): Likewise.
3760         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
3761
3762 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3763
3764         * defs.h (read_unsigned_leb128): New declaration.
3765         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
3766         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
3767         (dwarf2_find_location_expression): Call also
3768         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
3769         * dwarf2loc.h (dwarf2_version): New declaration.
3770         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
3771         rnglists.
3772         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
3773         .debug_rnglists.
3774         (struct dwop_section_names): Add loclists_dwo.
3775         (dwop_section_names): Add .debug_loclists.dwo.
3776         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
3777         (struct dwarf2_per_cu_data): Add dwarf_version.
3778         (struct dwo_sections): Add loclists.
3779         (struct attr_abbrev): Add implicit_const.
3780         (read_indirect_line_string): New declaration.
3781         (read_unsigned_leb128): Delete declaration.
3782         (rcuh_kind): New definition.
3783         (read_and_check_comp_unit_head): Change parameter
3784         is_debug_types_section to section_kind.
3785         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
3786         (read_comp_unit_head): Change parameter abfd to section, add parameter
3787         section_kind.  Handle DWARF-5.
3788         (error_check_comp_unit_head): Accept also DWARF version 5.
3789         (read_and_check_comp_unit_head): Change parameter
3790         is_debug_types_section to section_kind.
3791         (read_and_check_type_unit_head): Delete function.
3792         (read_abbrev_offset): Handle DWARF-5.
3793         (create_debug_type_hash_table): Add parameter section_kind.  Process
3794         only DW_UT_type.  Use signature and type_offset_in_tu from struct
3795         comp_unit_head.
3796         (create_debug_types_hash_table): Update create_debug_type_hash_table
3797         caller.
3798         (create_all_type_units): Call create_debug_type_hash_table.
3799         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
3800         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
3801         caller.
3802         (skip_one_die): Handle DW_FORM_implicit_const.
3803         (dwarf2_rnglists_process): New function.
3804         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
3805         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
3806         (read_attribute_value): Handle DW_FORM_implicit_const,
3807         DW_FORM_line_strp.
3808         (read_attribute): Handle DW_FORM_implicit_const.
3809         (read_indirect_string_at_offset_from): New function from
3810         read_indirect_string_at_offset.
3811         (read_indirect_string_at_offset): Call
3812         read_indirect_string_at_offset_from.
3813         (read_indirect_line_string_at_offset): New function.
3814         (read_indirect_string): New function comment.
3815         (read_indirect_line_string): New function.
3816         (read_unsigned_leb128): Make it global.
3817         (dwarf2_string_attr): Handle DWARF-5.
3818         (add_include_dir_stub, read_formatted_entries): New functions.
3819         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
3820         Handle DWARF-5.
3821         (per_cu_header_read_in): Update read_comp_unit_head caller.
3822         (dwarf2_version): New function.
3823         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
3824         rnglists.
3825         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
3826         fields.
3827
3828 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3829
3830         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
3831
3832 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3833
3834         * dwarf2read.c (dwarf2_ranges_process): New function from
3835         dwarf2_ranges_read.
3836         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
3837         dwarf2_ranges_process.
3838
3839 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3840
3841         * dwarf2read.c (create_debug_type_hash_table): New function from
3842         create_debug_types_hash_table.
3843         (create_debug_types_hash_table): Call create_debug_type_hash_table.
3844         (create_all_type_units, open_and_init_dwo_file): Update
3845         create_debug_types_hash_table callers.
3846
3847 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3848
3849         PR gdb/16188
3850         * fork-child.c (trace_start_error): Fix thinko.  va_end should
3851         refer to 'ap', not 'args'.
3852
3853 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3854             Pedro Alves  <palves@redhat.com>
3855
3856         PR gdb/16188
3857         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
3858         calls succeeded.
3859         * fork-child.c (trace_start_error): New function.
3860         (trace_start_error_with_name): Likewise.
3861         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
3862         * inf-ptrace.c (inf_ptrace_me): Likewise.
3863         * inferior.h (trace_start_error): New prototype.
3864         (trace_start_error_with_name): Likewise.
3865
3866 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3867
3868         PR gdb/21164
3869         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
3870         NULL before using it.
3871         * symmisc.c (maintenance_print_symbols): Likewise.
3872         (maintenance_print_msymbols): Likewise.
3873
3874 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3875
3876         * NEWS: Add record Python bindings entry.
3877
3878 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3879
3880         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
3881         py-record-full.o.
3882         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
3883         * python/py-record-btrace.c, python/py-record-btrace.h,
3884         python/py-record-full.c, python/py-record-full.h: New file.
3885         * python/py-record.c: Add include for py-record-btrace.h and
3886         py-record-full.h.
3887         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
3888         recpy_instruction_history, recpy_function_call_history, recpy_begin,
3889         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
3890         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
3891         New definition.
3892         (gdbpy_initialize_btrace): New export.
3893         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
3894
3895 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3896
3897         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
3898         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
3899         * python/py-record.c: New file.
3900         * python/python-internal.h (gdbpy_start_recording,
3901         gdbpy_current_recording, gdpy_stop_recording,
3902         gdbpy_initialize_record): New export.
3903         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
3904         (python_GdbMethods): Add gdbpy_start_recording,
3905         gdbpy_current_recording and gdbpy_stop_recording.
3906
3907 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3908
3909         * record-btrace.c (record_btrace_record_method): New function.
3910         (init_record_btrace_ops): Initialize to_record_method.
3911         * record-full.c (record_full_record_method): New function.
3912         (init_record_full_ops, init_record_full_core_ops): Add
3913         record_full_record_method.
3914         * record.h (enum record_method): New enum.
3915         * target-debug.h (target_debug_print_enum_record_method: New define.
3916         * target-delegates.c: Regenerate.
3917         * target.c (target_record_method): New function.
3918         * target.h: Include record.h.
3919         (struct target_ops) <to_record_method>: New field.
3920         (target_record_method): New export.
3921
3922 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3923
3924         * record.h (record_start, record_stop): New export.
3925         * record.c (record_start, record_stop): New function.
3926
3927 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3928
3929         * btrace.c (btrace_fetch): Copy function call segments pointer
3930         into a vector.
3931         (btrace_clear): Clear the vector.
3932         (btrace_find_insn_by_number): Use binary search to find the correct
3933         function call segment.
3934         * btrace.h (brace_fun_p): New typedef.
3935         (struct btrace_thread_info) <functions>: New field.
3936
3937 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3938
3939         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
3940         * btrace.c (btrace_decode_error): ... here.  New function.
3941         * btrace.h (btrace_decode_error): New export.
3942
3943 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
3944
3945         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
3946         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
3947         btrace_find_insn_by_number): Remove special case for gaps.
3948         * btrace.h (btrace_insn_get_error): New export.
3949         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
3950         * record-btrace.c (btrace_insn_history): Print number for gaps.
3951         (record_btrace_info, record_btrace_goto): Handle gaps.
3952
3953 2017-02-14  Tom Tromey  <tom@tromey.com>
3954
3955         PR python/13598:
3956         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
3957         event.
3958         * python/py-evts.c (gdbpy_initialize_py_events): Add
3959         before_prompt registry.
3960         * python/py-events.h (events_object) <before_prompt>: New field.
3961
3962 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
3963
3964         * btrace.c (ftrace_new_switch): Preserve up link and flags.
3965
3966 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
3967
3968         * symfile (_initialize_symfile): Add usage text to the load command's
3969         help text.
3970
3971 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
3972
3973         * utils.c (defaulted_query): Don't query on secondary UIs.
3974
3975 2017-02-10  Tom Tromey  <tom@tromey.com>
3976
3977         * rust-lang.c (rust_get_disr_info): Remove unused variable.
3978
3979 2017-02-10  Tom Tromey  <tom@tromey.com>
3980
3981         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
3982         "cleanup" local.
3983         * python/py-type.c (typy_legacy_template_argument): Remove
3984         unnecessary "cleanup" local.
3985
3986 2017-02-10  Tom Tromey  <tom@tromey.com>
3987
3988         * python/python.c (do_start_initialization): New function, from
3989         _initialize_python.
3990         (_initialize_python): Call do_start_initialization.
3991         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
3992         goto.
3993
3994 2017-02-10  Tom Tromey  <tom@tromey.com>
3995
3996         * python/py-prettyprint.c (pretty_print_one_value): Use
3997         gdbpy_ref.
3998
3999 2017-02-10  Tom Tromey  <tom@tromey.com>
4000
4001         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
4002         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
4003         gdbpy_ref.
4004         * python/py-type.c (field_new): Use gdbpy_ref.
4005         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
4006         gdbpy_ref.
4007         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
4008         (py_free_pspace): Likewise.
4009         (pspace_to_pspace_object): Likewise.
4010         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
4011         (py_free_objfile): Likewise.
4012         (objfile_to_objfile_object): Likewise.
4013         * python/py-inferior.c (delete_thread_object): Use
4014         gdbpy_ref.
4015         (infpy_read_memory): Likewise.
4016         (py_free_inferior): Likewise.
4017         * python/py-evtregistry.c (create_eventregistry_object): Use
4018         gdbpy_ref.
4019         * python/py-event.c (create_event_object): Use gdbpy_ref.
4020
4021 2017-02-10  Tom Tromey  <tom@tromey.com>
4022
4023         * python/py-ref.h (gdbpy_ref_policy): Now a template.
4024         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
4025         used.
4026         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
4027         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
4028         python/py-exitedevent.c, python/py-finishbreakpoint.c,
4029         python/py-framefilter.c, python/py-function.c,
4030         python/py-inferior.c, python/py-infevents.c,
4031         python/py-linetable.c, python/py-newobjfileevent.c,
4032         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
4033         python/py-signalevent.c, python/py-stopevent.c,
4034         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
4035         python/py-unwind.c, python/py-utils.c, python/py-value.c,
4036         python/py-varobj.c, python/py-xmethods.c, python/python.c,
4037         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
4038
4039 2017-02-10  Tom Tromey  <tom@tromey.com>
4040
4041         * ui-out.h (ui_out_emit_type): New class.
4042         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
4043         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
4044         and ui_out_emit_tuple.
4045         (enumerate_locals): Likewise.
4046         (py_mi_print_variables, py_print_locals, py_print_args): Use
4047         ui_out_emit_list.
4048         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
4049         ui_out_emit_list.
4050         * common/gdb_optional.h: New file.
4051
4052 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
4053
4054         * MAINTAINERS (Write After Approval): Update my e-mail address.
4055
4056 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
4057
4058         PR gdb/21122
4059         * breakpoint.c (_initialize_breakpoint): Update the help description
4060         of the 'commands' command to indicate that it takes a list argument.
4061
4062 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
4063
4064         * interps.c (current_interp_set_logging): Remove "return".
4065
4066 2017-02-09  Gary Benson  <gbenson@redhat.com>
4067
4068         * symtab.c (add_symtab_completions): Prevent NULL pointer
4069         dereference.
4070
4071 2017-02-08  Pedro Alves  <palves@redhat.com>
4072
4073         * interps.c (interp::interp): Remove reference to quiet_p.
4074         (interp_set): Make static.  Remove dead "Switching to" output
4075         code.
4076         (interp_quiet_p, interp_set_quiet): Delete.
4077         (interpreter_exec_cmd): Don't set the interpreter quiet.
4078         * interps.h (interp_quiet_p): Make static.
4079         (class interp) <quiet_p>: Remove field
4080
4081 2017-02-08  Jerome Guitton  <guitton@adacore.com>
4082
4083         * cli/cli-decode.c (find_command_name_length): Make it extern.
4084         * cli/cli-decode.h (find_command_name_length): Declare.
4085         * cli/cli-script.c (command_name_equals, line_first_arg):
4086         New functions.
4087         (process_next_line): Use cli-decode to parse command names.
4088         (build_command_line): Make args a constant pointer.
4089
4090 2017-02-08  Jerome Guitton  <guitton@adacore.com>
4091
4092         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
4093         Remove case-insensitive search.
4094
4095 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
4096
4097         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
4098         at the end of the line.  Avoids an ARI warning.
4099
4100 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
4101
4102         * NEWS: Mention support for record/replay of Intel 64 rdrand and
4103         rdseed instructions.
4104         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
4105
4106 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
4107
4108         PR tdep/20936
4109         Provide and use sparc32 and sparc64 target description XML files.
4110         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
4111         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
4112         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
4113         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
4114         * features/sparc/sparc32-solaris.xml: New file.
4115         * features/sparc/sparc64-solaris.xml: New file.
4116         * features/sparc/sparc32-solaris.c: Generated.
4117         * features/sparc/sparc64-solaris.c: Generated.
4118         * sparc-tdep.h: Account for differences in target descriptions.
4119         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
4120         (sparc32_register_type): Use target provided registers.
4121         (validate_tdesc_registers): New function.
4122         (sparc32_gdbarch_init): Use tdesc_has_registers.
4123         Set pseudoregister functions.
4124         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
4125         (sparc64_register_type): Use target provided registers.
4126         (sparc64_init_abi): Set pseudoregister functions.
4127
4128 2017-02-03  Tom Tromey  <tom@tromey.com>
4129
4130         PR rust/21097:
4131         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
4132         with a single member.
4133
4134 2017-02-03  Pedro Alves  <palves@redhat.com>
4135
4136         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
4137         (cli_interp_base::~cli_interp_base): New.
4138         (cli_interp): New struct.
4139         (as_cli_interp): Cast the interp itself to cli_interp.
4140         (cli_interpreter_pre_command_loop): Rename to ...
4141         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
4142         parameter.
4143         (cli_interpreter_init): Rename to ...
4144         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
4145         boolean.  Make extern.
4146         (cli_interpreter_resume): Rename to ...
4147         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
4148         extern.
4149         (cli_interpreter_suspend): Rename to ...
4150         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
4151         extern.
4152         (cli_interpreter_exec): Rename to ...
4153         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
4154         extern.
4155         (cli_interpreter_supports_command_editing): Rename to ...
4156         (cli_interp_base::supports_command_editing): ... this.  Remove
4157         'interp' parameter.  Make extern.
4158         (cli_ui_out): Rename to ...
4159         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
4160         Make extern.
4161         (cli_set_logging): Rename to ...
4162         (cli_interp_base::set_logging): ... this.  Remove 'interp'
4163         parameter.  Make extern.
4164         (cli_interp_procs): Delete.
4165         (cli_interp_factory): Adjust to use "new".
4166         * cli/cli-interp.h: Include "interps.h".
4167         (struct cli_interp_base): New struct.
4168         * interps.c (struct interp): Delete.  Fields moved to interps.h.
4169         (interp_new): Delete.
4170         (interp::interp, interp::~interp): New.
4171         (interp_set): Use bool, and return void.  Assume the interpreter
4172         has suspend, init and resume methods, and that the all return
4173         void.
4174         (set_top_level_interpreter): interp_set returns void.
4175         (interp_ui_out): Adapt.
4176         (current_interp_set_logging): Adapt.
4177         (interp_data): Delete.
4178         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
4179         (interp_exec): Adapt.
4180         (top_level_interpreter_data): Delete.
4181         * interps.h (interp_init_ftype, interp_resume_ftype)
4182         (interp_suspend_ftype, interp_exec_ftype)
4183         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
4184         (class interp): New.
4185         (interp_new): Delete.
4186         (interp_set): Now returns void.  Use bool.
4187         (interp_data, top_level_interpreter_data): Delete.
4188         * mi/mi-common.h: Include interps.h.
4189         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
4190         init, resume, suspect, exec, interp_ui_out, set_logging and
4191         pre_command_loop methods.
4192         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
4193         (mi_interpreter_init): Rename to ...
4194         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
4195         bool, return void and make extern.  Adjust.
4196         (mi_interpreter_resume): ... Rename to ...
4197         (mi_interp::resume): ... this.  Remove the 'data' parameter,
4198         return void and make extern.  Adjust.
4199         (mi_interpreter_suspend): ... Rename to ...
4200         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
4201         return void and make extern.  Adjust.
4202         (mi_interpreter_exec): ... Rename to ...
4203         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
4204         extern.  Adjust.
4205         (mi_interpreter_pre_command_loop): ... Rename to ...
4206         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
4207         parameter and make extern.
4208         (mi_on_normal_stop_1): Adjust.
4209         (mi_ui_out): Rename to ...
4210         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
4211         parameter and make extern.  Adjust.
4212         (mi_set_logging): Rename to ...
4213         (mi_interp::set_logging): ... this.  Remove the 'interp'
4214         parameter and make extern.  Adjust.
4215         (mi_interp_procs): Delete.
4216         (mi_interp_factory): Adjust to use 'new'.
4217         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
4218         (mi_print_exception, mi_execute_command, mi_load_progress):
4219         Adjust.
4220         * tui/tui-interp.c (tui_interp): New class.
4221         (as_tui_interp): Return a tui_interp pointer.
4222         (tui_on_normal_stop, tui_on_signal_received)
4223         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
4224         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
4225         to use interp::interp_ui_out.
4226         (tui_init): Rename to ...
4227         (tui_interp::init): ... this.  Remove the 'self' parameter, use
4228         bool, return void and make extern.  Adjust.
4229         (tui_resume): Rename to ...
4230         (tui_interp::resume): ... this.  Remove the 'data' parameter,
4231         return void and make extern.  Adjust.
4232         (tui_suspend): Rename to ...
4233         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
4234         return void and make extern.  Adjust.
4235         (tui_ui_out): Rename to ...
4236         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
4237         parameter, and make extern.  Adjust.
4238         (tui_exec): Rename to ...
4239         (tui_interp::exec): ... this.  Remove the 'data' parameter and
4240         make extern.
4241         (tui_interp_procs): Delete.
4242         (tui_interp_factory): Use "new".
4243
4244 2017-02-02  Tom Tromey  <tom@tromey.com>
4245
4246         * rust-exp.y (ends_raw_string, space_then_number)
4247         (rust_identifier_start_p): Return bool.
4248         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
4249         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
4250         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
4251         (rust_chartype_p): Return bool.
4252         (val_print_struct, rust_print_struct_def, rust_print_type):
4253         Update.
4254         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
4255         Return bool.
4256
4257 2017-02-02  Tom Tromey  <tom@tromey.com>
4258
4259         * rust-lang.c: Reindent.
4260
4261 2017-02-02  Tom Tromey  <tom@tromey.com>
4262
4263         * rust-lang.h (rust_crate_for_block): Update.
4264         * rust-lang.c (rust_crate_for_block): Return std::string.
4265         (rust_get_disr_info): Use std:;string, not
4266         gdb::unique_xmalloc_ptr.
4267         * rust-exp.y (crate_name): Update.
4268
4269 2017-02-02  Pedro Alves  <palves@redhat.com>
4270
4271         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
4272         field out of gdb_disassembler_test and make it static.
4273
4274 2017-02-02  Pedro Alves  <palves@redhat.com>
4275
4276         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
4277         mi1_interp and mi_interp fields.
4278
4279 2017-02-02  Pedro Alves  <palves@redhat.com>
4280
4281         * cli/cli-interp.c (struct saved_output_files, saved_output):
4282         Moved from cli/cli-logging.c.
4283         (cli_set_logging): New function.
4284         (cli_interp_procs): Install cli_set_logging.
4285         * cli/cli-interp.h (make_logging_output, cli_set_logging):
4286         Declare.
4287         * cli/cli-logging.c (struct saved_output_files, saved_output):
4288         Moved to cli/cli-interp.c.
4289         (pop_output_files): Don't save outputs here.
4290         (make_logging_output): New function.
4291         (handle_redirections): Don't build tee nor save previous outputs
4292         here.
4293         * interps.c (current_interp_set_logging): Change prototype.
4294         Assume there's always a set_logging_proc method installed.
4295         * interps.h (interp_set_logging_ftype): Change prototype.
4296         (current_interp_set_logging): Change prototype and adjust comment.
4297         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
4298         use make_logging_output.
4299         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
4300 2017-02-02  Pedro Alves  <palves@redhat.com>
4301
4302         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
4303         from ...
4304         (set_logging_overwrite): ... here.
4305         (logging_no_redirect_file): Delete.
4306         (set_logging_redirect): Don't handle redirection on the fly.
4307         Instead warn that "logging off" / "logging on" is necessary.
4308         (pop_output_files): Delete references to logging_no_redirect_file.
4309         (show_logging_command): Always speak in terms of what will happen
4310         once logging is reenabled.
4311
4312 2017-02-02  Pedro Alves  <palves@redhat.com>
4313
4314         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
4315
4316 2017-02-02  Pedro Alves  <palves@redhat.com>
4317
4318         * disasm.c (gdb_pretty_print_insn): Rename to ...
4319         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
4320         Remove gdbarch parameter.  Adapt to clear the object's buffers
4321         instead of allocating new buffers, and to print using the object's
4322         gdb_disassembler instead of calling gdb_print_insn.
4323         (dump_insns): Use gdb_pretty_print_disassembler.
4324         * disasm.h (gdb_pretty_print_insn): Delete declaration.
4325         (gdb_pretty_print_disassembler): New class.
4326         * record-btrace.c (btrace_insn_history): Use
4327         gdb_pretty_print_disassembler.
4328
4329 2017-02-02  Pedro Alves  <palves@redhat.com>
4330
4331         * ada-lang.c (type_as_string): Use string_file.
4332         * ada-valprint.c (ada_print_floating): Use string_file.
4333         * ada-varobj.c (ada_varobj_scalar_image)
4334         (ada_varobj_get_value_image): Use string_file.
4335         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
4336         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
4337         * breakpoint.c (update_inserted_breakpoint_locations)
4338         (insert_breakpoint_locations, reattach_breakpoints)
4339         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
4340         (print_it_watchpoint): Use string_file.
4341         (save_breakpoints): Use stdio_file.
4342         * c-exp.y (oper): Use string_file.
4343         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
4344         tee_file.
4345         (pop_output_files): Use delete.
4346         (handle_redirections): Use stdio_file and tee_file.
4347         * cli/cli-setshow.c (do_show_command): Use string_file.
4348         * compile/compile-c-support.c (c_compute_program): Use
4349         string_file.
4350         * compile/compile-c-symbols.c (generate_vla_size): Take a
4351         'string_file &' instead of a 'ui_file *'.
4352         (generate_c_for_for_one_variable): Take a 'string_file &' instead
4353         of a 'ui_file *'.  Use string_file.
4354         (generate_c_for_variable_locations): Take a 'string_file &'
4355         instead of a 'ui_file *'.
4356         * compile/compile-internal.h (generate_c_for_for_one_variable):
4357         Take a 'string_file &' instead of a 'ui_file *'.
4358         * compile/compile-loc2c.c (push, pushf, unary, binary)
4359         (print_label, pushf_register_address, pushf_register)
4360         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
4361         'ui_file *'.  Adjust.
4362         * compile/compile.c (compile_to_object): Use string_file.
4363         * compile/compile.h (compile_dwarf_expr_to_c)
4364         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
4365         'ui_file *'.
4366         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
4367         (replace_typedefs_qualified_name): Use string_file and
4368         obstack_copy0.
4369         * disasm.c (gdb_pretty_print_insn): Use string_file.
4370         (gdb_disassembly): Adjust reference the null_stream global.
4371         (do_ui_file_delete): Delete.
4372         (gdb_insn_length): Use null_stream.
4373         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
4374         * dwarf2loc.c (dwarf2_compile_property_to_c)
4375         (locexpr_generate_c_location, loclist_generate_c_location): Take a
4376         'string_file &' instead of a 'ui_file *'.
4377         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
4378         * dwarf2read.c (do_ui_file_peek_last): Delete.
4379         (dwarf2_compute_name): Use string_file.
4380         * event-top.c (gdb_setup_readline): Use stdio_file.
4381         * gdbarch.sh (verify_gdbarch): Use string_file.
4382         * gdbtypes.c (safe_parse_type): Use null_stream.
4383         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
4384         string_file.
4385         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
4386         'string_file *' instead of a 'ui_file *'.
4387         (gdbscm_arch_disassemble): Use string_file.
4388         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
4389         * guile/scm-ports.c (class ioscm_file_port): Now a class that
4390         inherits from ui_file.
4391         (ioscm_file_port_delete, ioscm_file_port_rewind)
4392         (ioscm_file_port_put): Delete.
4393         (ioscm_file_port_write): Rename to ...
4394         (ioscm_file_port::write): ... this.  Remove file_port_magic
4395         checks.
4396         (ioscm_file_port_new): Delete.
4397         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
4398         ui_file_up.
4399         * guile/scm-type.c (tyscm_type_name): Use string_file.
4400         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
4401         Use string_file.
4402         * infcmd.c (print_return_value_1): Use string_file.
4403         * infrun.c (print_target_wait_results): Use string_file.
4404         * language.c (add_language): Use string_file.
4405         * location.c (explicit_to_string_internal): Use string_file.
4406         * main.c (captured_main_1): Use null_file.
4407         * maint.c (maintenance_print_architecture): Use stdio_file.
4408         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
4409         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
4410         event_channel>: Change type to mi_console_file pointer.
4411         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
4412         (mi_console_file_delete): Delete.
4413         (struct mi_console_file): Delete.
4414         (mi_console_file_magic): Delete.
4415         (mi_console_file_new): Delete.
4416         (mi_console_file::mi_console_file): New.
4417         (mi_console_file_delete): Delete.
4418         (mi_console_file_fputs): Delete.
4419         (mi_console_file::write): New.
4420         (mi_console_raw_packet): Delete.
4421         (mi_console_file::flush): New.
4422         (mi_console_file_flush): Delete.
4423         (mi_console_set_raw): Rename to ...
4424         (mi_console_file::set_raw): ... this.
4425         * mi/mi-console.h (class mi_console_file): New class.
4426         (mi_console_file_new, mi_console_set_raw): Delete.
4427         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
4428         (mi_set_logging): Use delete and tee_file.  Adjust.
4429         * mi/mi-main.c (output_register): Use string_file.
4430         (mi_cmd_data_evaluate_expression): Use string_file.
4431         (mi_cmd_data_read_memory): Use string_file.
4432         (mi_cmd_execute, print_variable_or_computed): Use string_file.
4433         * mi/mi-out.c (mi_ui_out::main_stream): New.
4434         (mi_ui_out::rewind): Use main_stream and
4435         string_file.
4436         (mi_ui_out::put): Use main_stream and string_file.
4437         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4438         Allocate a 'string_file' instead.
4439         (mi_out_new): Don't allocate a mem_fileopen stream here.
4440         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
4441         (mi_ui_out::main_stream): Declare method.
4442         * printcmd.c (eval_command): Use string_file.
4443         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
4444         * python/py-arch.c (archpy_disassemble): Use string_file.
4445         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
4446         * python/py-frame.c (frapy_str): Use string_file.
4447         * python/py-framefilter.c (py_print_type, py_print_single_arg):
4448         Use string_file.
4449         * python/py-type.c (typy_str): Use string_file.
4450         * python/py-unwind.c (unwind_infopy_str): Use string_file.
4451         * python/py-value.c (valpy_str): Use string_file.
4452         * record-btrace.c (btrace_insn_history): Use string_file.
4453         * regcache.c (regcache_print): Use stdio_file.
4454         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
4455         * remote.c (escape_buffer): Use string_file.
4456         * rust-lang.c (rust_get_disr_info): Use string_file.
4457         * serial.c (serial_open_ops_1): Use stdio_file.
4458         (do_serial_close): Use delete.
4459         * stack.c (print_frame_arg): Use string_file.
4460         (print_frame_args): Remove local mem_fileopen stream, not used.
4461         (print_frame): Use string_file.
4462         * symmisc.c (maintenance_print_symbols): Use stdio_file.
4463         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
4464         Take a 'string_file *' instead of a 'ui_file *'.
4465         * top.c (new_ui): Use stdio_file and stderr_file.
4466         (free_ui): Use delete.
4467         (execute_command_to_string): Use string_file.
4468         (quit_confirm): Use string_file.
4469         * tracepoint.c (collection_list::append_exp): Use string_file.
4470         * tui/tui-disasm.c (tui_disassemble): Use string_file.
4471         * tui/tui-file.c: Don't include "ui-file.h".
4472         (enum streamtype, struct tui_stream): Delete.
4473         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
4474         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
4475         (tui_file::tui_file): New method.
4476         (tui_file_fputs): Delete.
4477         (tui_file_get_strbuf): Delete.
4478         (tui_file::puts): New method.
4479         (tui_file_adjust_strbuf): Delete.
4480         (tui_file_flush): Delete.
4481         (tui_file::flush): New method.
4482         * tui/tui-file.h: Tweak intro comment.
4483         Include ui-file.h.
4484         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
4485         (tui_file_adjust_strbuf): Delete declarations.
4486         (class tui_file): New class.
4487         * tui/tui-io.c (tui_initialize_io): Use tui_file.
4488         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
4489         (tui_register_format): Use string_stream.
4490         * tui/tui-stack.c (tui_make_status_line): Use string_file.
4491         (tui_get_function_from_frame): Use string_file.
4492         * typeprint.c (type_to_string): Use string_file.
4493         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
4494         (null_stream): New global.
4495         (ui_file_delete): Delete.
4496         (ui_file::ui_file): New.
4497         (null_file_isatty): Delete.
4498         (ui_file::~ui_file): New.
4499         (null_file_rewind): Delete.
4500         (ui_file::printf): New.
4501         (null_file_put): Delete.
4502         (null_file_flush): Delete.
4503         (ui_file::putstr): New.
4504         (null_file_write): Delete.
4505         (ui_file::putstrn): New.
4506         (null_file_read): Delete.
4507         (ui_file::putc): New.
4508         (null_file_fputs): Delete.
4509         (null_file_write_async_safe): Delete.
4510         (ui_file::vprintf): New.
4511         (null_file_delete): Delete.
4512         (null_file::write): New.
4513         (null_file_fseek): Delete.
4514         (null_file::puts): New.
4515         (ui_file_data): Delete.
4516         (null_file::write_async_safe): New.
4517         (gdb_flush, ui_file_isatty): Adjust.
4518         (ui_file_put, ui_file_rewind): Delete.
4519         (ui_file_write): Adjust.
4520         (ui_file_write_for_put): Delete.
4521         (ui_file_write_async_safe, ui_file_read): Adjust.
4522         (ui_file_fseek): Delete.
4523         (fputs_unfiltered): Adjust.
4524         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
4525         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
4526         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
4527         (set_ui_file_data): Delete.
4528         (string_file::~string_file, string_file::write)
4529         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
4530         (do_ui_file_as_string, ui_file_as_string): Delete.
4531         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
4532         (struct mem_file): Delete.
4533         (mem_file_new): Delete.
4534         (stdio_file::stdio_file): New.
4535         (mem_file_delete): Delete.
4536         (stdio_file::stdio_file): New.
4537         (mem_fileopen): Delete.
4538         (stdio_file::~stdio_file): New.
4539         (mem_file_rewind): Delete.
4540         (stdio_file::set_stream): New.
4541         (mem_file_put): Delete.
4542         (stdio_file::open): New.
4543         (mem_file_write): Delete.
4544         (stdio_file_magic, struct stdio_file): Delete.
4545         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
4546         (stdio_file::flush): New.
4547         (stdio_file_read): Rename to ...
4548         (stdio_file::read): ... this.  Adjust.
4549         (stdio_file_write): Rename to ...
4550         (stdio_file::write): ... this.  Adjust.
4551         (stdio_file_write_async_safe): Rename to ...
4552         (stdio_file::write_async_safe) ... this.  Adjust.
4553         (stdio_file_fputs): Rename to ...
4554         (stdio_file::puts) ... this.  Adjust.
4555         (stdio_file_isatty): Delete.
4556         (stdio_file_fseek): Delete.
4557         (stdio_file::isatty): New.
4558         (stderr_file_write): Rename to ...
4559         (stderr_file::write) ... this.  Adjust.
4560         (stderr_file_fputs): Rename to ...
4561         (stderr_file::puts) ... this.  Adjust.
4562         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
4563         (stderr_file::stderr_file): New.
4564         (tee_file_magic): Delete.
4565         (struct tee_file): Delete.
4566         (tee_file::tee_file): New.
4567         (tee_file_new): Delete.
4568         (tee_file::~tee_file): New.
4569         (tee_file_delete): Delete.
4570         (tee_file_flush): Rename to ...
4571         (tee_file::flush): ... this.  Adjust.
4572         (tee_file_write): Rename to ...
4573         (tee_file::write): ... this.  Adjust.
4574         (tee_file::write_async_safe): New.
4575         (tee_file_fputs): Rename to ...
4576         (tee_file::puts): ... this.  Adjust.
4577         (tee_file_isatty): Rename to ...
4578         (tee_file::isatty): ... this.  Adjust.
4579         * ui-file.h (struct obstack, struct ui_file): Don't
4580         forward-declare.
4581         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
4582         (ui_file_write_ftype)
4583         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
4584         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
4585         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
4586         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
4587         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
4588         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
4589         (set_ui_file_fseek): Delete.
4590         (ui_file_data, ui_file_delete, ui_file_rewind)
4591         (struct ui_file): New.
4592         (ui_file_up): New.
4593         (class null_file): New.
4594         (null_stream): Declare.
4595         (ui_file_write_for_put, ui_file_put): Delete.
4596         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
4597         Delete.
4598         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
4599         (gdb_fopen, tee_file_new): Delete.
4600         (struct string_file): New.
4601         (struct stdio_file): New.
4602         (stdio_file_up): New.
4603         (struct stderr_file): New.
4604         (class tee_file): New.
4605         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
4606         of a 'ui_file *'.  Adjust.
4607         * ui-out.h (class ui_out) <field_stream>: Likewise.
4608         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
4609         (null_stream): Delete.
4610         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
4611         Adjust.
4612         * utils.h (struct ui_file): Delete forward declaration..
4613         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
4614         (error_stream): Take a 'string_file &' instead of a
4615         'ui_file *'.
4616         * varobj.c (varobj_value_get_print_value): Use string_file.
4617         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
4618         * gdbarch.c: Regenerate.
4619
4620 2017-02-02  Pedro Alves  <palves@redhat.com>
4621
4622         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
4623         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
4624         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
4625         Adjust to call gdb_print_insn instead of
4626         gdb_disassembler::print_insn.
4627         (dump_insns, do_mixed_source_and_assembly_deprecated)
4628         (do_mixed_source_and_assembly, do_assembly_only): Add back a
4629         'gdbarch' parameter.  Remove gdb_disassembler parameter.
4630         (gdb_disassembly): Don't allocate a gdb_disassembler here.
4631         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
4632         declaration.
4633         (gdb_pretty_print_insn): Re-add declaration.
4634         * record-btrace.c (btrace_insn_history): Don't allocate a
4635         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
4636
4637 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
4638
4639         * disasm.h (gdb_disassembly): Remove file_string parameter.
4640         * disasm.c (gdb_disassembly): Likewise.
4641         * cli/cli-cmds.c (print_disassembly): Adapt.
4642         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
4643         * stack.c (do_gdb_disassembly): Likewise.
4644
4645 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4646
4647         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
4648         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
4649         targets.  And if the implicit value is longer than needed, extract
4650         the first bytes instead of the "least significant" ones.
4651
4652 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
4653
4654         * btrace.c (btrace_enable): Do not call btrace_add_pc for
4655         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
4656         (btrace_fetch): Assert can_access_registers_ptid.
4657         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
4658         validate_registers_access.
4659
4660 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
4661
4662         * gdbthread.h (can_access_registers_ptid): New.
4663         * thread.c (can_access_registers_ptid): New.
4664
4665 2017-02-01  Pedro Alves  <palves@redhat.com>
4666
4667         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
4668
4669 2017-01-31  Pedro Alves  <palves@redhat.com>
4670
4671         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
4672         Fix typos.
4673
4674 2017-01-31  Pedro Alves  <palves@redhat.com>
4675
4676         * stack.c (print_frame_args): Remove local mem_fileopen stream,
4677         not used.
4678
4679 2017-01-31  Pedro Alves  <palves@redhat.com>
4680
4681         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
4682
4683 2017-01-31  Pedro Alves  <palves@redhat.com>
4684
4685         * common/scoped_restore.h
4686         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
4687         change the value's parameter type to T2.
4688         (make_scoped_restore): Likewise.
4689
4690 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4691             Richard Henderson  <rth@redhat.com>
4692
4693         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
4694         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
4695         GS_BASE for older kernels.
4696         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
4697         GS_BASE for older kernels.
4698         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
4699         and GS_BASE to the offset table.
4700         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
4701         system register group.
4702         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
4703         for older kernels.
4704         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
4705         amd64 ABI.
4706         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
4707         AMD64_GSBASE_REGNUM.
4708         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
4709         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
4710         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
4711         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
4712         i386/64bit-segments.xml in those rules.
4713         * features/i386/64bit-segments.xml: New file.
4714         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
4715         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
4716         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
4717         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
4718         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
4719         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
4720         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
4721         * features/i386/amd64-avx-linux.c: Regenerated.
4722         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
4723         * features/i386/amd64-avx-mpx.c: Regenerated.
4724         * features/i386/amd64-avx512-linux.c: Regenerated.
4725         * features/i386/amd64-linux.c: Regenerated.
4726         * features/i386/amd64-mpx-linux.c: Regenerated.
4727         * features/i386/i386-avx-mpx-linux.c: Regenerated.
4728         * features/i386/i386-avx-mpx.c: Regenerated.
4729         * features/i386/x32-avx-linux.c: Regenerated.
4730         * features/i386/x32-avx512-linux.c: Regenerated.
4731         * regformats/i386/amd64-avx-linux.dat: Regenerated.
4732         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
4733         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
4734         * regformats/i386/amd64-linux.dat: Regenerated.
4735         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
4736         * regformats/i386/x32-avx-linux.dat: Regenerated.
4737         * regformats/i386/x32-avx512-linux.dat: Regenerated.
4738         * regformats/i386/x32-linux.dat: Regenerated.
4739
4740 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4741
4742         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
4743         Set to AMD64_NUM_REGS.
4744
4745 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4746
4747         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
4748         that checks validity of a register number.
4749
4750 2017-01-27  Kees Cook  <keescook@google.com>
4751
4752         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
4753         fetch_fpregs if target has fpa registers.
4754         (arm_linux_store_inferior_registers): Call store_fpregs if target
4755         has fpa registers.
4756
4757 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4758
4759         * cris-tdep.c (cris_gdbarch_init): Remove check for
4760         info.byte_order and force it to BFD_ENDIAN_LITTLE.
4761
4762 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4763
4764         * corelow.c (get_core_register_section): Check for regset
4765         existence before checking for REGSET_VARIABLE_SIZE.
4766
4767 2017-01-26  Yao Qi  <yao.qi@linaro.org>
4768             Pedro Alves  <palves@redhat.com>
4769
4770         PR gdb/20939
4771         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
4772         call memory_error, save memaddr instead.
4773         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
4774         negative, cal memory_error.
4775         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
4776
4777 2017-01-26  Yao Qi  <yao.qi@linaro.org>
4778
4779         * disasm-selftests.c (memory_error_test): New function.
4780         (_initialize_disasm_selftests): Register memory_error_test.
4781
4782 2017-01-26  Yao Qi  <yao.qi@linaro.org>
4783
4784         * Makefile.in (SFILES): Add disasm-selftests.c and
4785         selftest-arch.c.
4786         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
4787         * disasm-selftests.c: New file.
4788         * selftest-arch.c: New file.
4789         * selftest-arch.h: New file.
4790
4791 2017-01-26  Yao Qi  <yao.qi@linaro.org>
4792
4793         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
4794         to bfd_arch_mep.  Don't return 0 if section is not
4795         found.  Call print_insn_mep.
4796
4797 2017-01-26  Pedro Alves  <palves@redhat.com>
4798             Yao Qi  <yao.qi@linaro.org>
4799
4800         * arm-tdep.c: Include "disasm.h".
4801         (gdb_print_insn_arm): Update code to get gdbarch.
4802         * disasm.c (dis_asm_read_memory): Change it to
4803         gdb_disassembler::dis_asm_read_memory.
4804         (dis_asm_memory_error): Likewise.
4805         (dis_asm_print_address): Likewise.
4806         (gdb_pretty_print_insn): Change it to
4807         gdb_disassembler::pretty_print_insn.
4808         (dump_insns): Add one argument gdb_disassemlber.  All
4809         callers updated.
4810         (do_mixed_source_and_assembly_deprecated): Likewise.
4811         (do_mixed_source_and_assembly): Likewise.
4812         (do_assembly_only): Likewise.
4813         (gdb_disassembler::gdb_disassembler): New.
4814         (gdb_disassembler::print_insn): New.
4815         * disasm.h (class gdb_disassembler): New.
4816         (gdb_pretty_print_insn): Remove declaration.
4817         (gdb_disassemble_info): Likewise.
4818         * guile/scm-disasm.c (class gdbscm_disassembler): New.
4819         (gdbscm_disasm_read_memory_worker): Update.
4820         (gdbscm_disasm_read_memory): Update.
4821         (gdbscm_disasm_memory_error): Remove.
4822         (gdbscm_disasm_print_address): Remove.
4823         (gdbscm_disassembler::gdbscm_disassembler): New.
4824         (gdbscm_print_insn_from_port): Update.
4825         * mips-tdep.c: Include disasm.h.
4826         (gdb_print_insn_mips): Update code to get gdbarch.
4827         * record-btrace.c (btrace_insn_history): Update.
4828         * spu-tdep.c: Include disasm.h.
4829         (struct spu_dis_asm_data): Remove.
4830         (struct spu_dis_asm_info): New.
4831         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
4832         SPU id.
4833         (gdb_print_insn_spu): Cast disassemble_info to
4834         spu_dis_asm_info.
4835
4836 2017-01-26  Yao Qi  <yao.qi@linaro.org>
4837
4838         * disasm.c (do_ui_file_delete): Delete.
4839         (gdb_insn_length): Move code creating stream to ...
4840         * utils.c (null_stream): ... here.  New function.
4841         * utils.h (null_stream): Declare.
4842
4843 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
4844
4845         * python/py-inferior.c (find_thread_object): Return directly
4846         from the loop.  Remove "found" variable.
4847
4848 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
4849
4850         GDB 7.12.1 released.
4851
4852 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
4853
4854         * python/py-function.c (fnpy_call): Reorder declarations to have
4855         the gdbpy_enter object declared first.
4856         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
4857
4858 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
4859
4860         PR python/21068
4861         * python/python-internal.h (PyMem_RawMalloc): Define for
4862         Python < 3.4.
4863         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
4864         PyMem_RawMalloc instead of PyMem_Malloc.
4865
4866 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
4867             Luis Machado  <lgustavo@codesourcery.com>
4868
4869         * NEWS (New commands): Mention flash-erase.
4870         (New MI commands): Mention target-flash-erase.
4871         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
4872         command.
4873         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
4874         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
4875         * target.c (flash_erase_command): New function.
4876         (initialize_targets): Add new flash-erase command.
4877         * target.h (flash_erase_command): New declaration.
4878
4879 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
4880
4881         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
4882         HAVE_SYS_PROCFS_H is defined.
4883
4884 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
4885
4886         * remote.c (struct cached_reg): Change data into a pointer.
4887         * (stop_reply_dtr): Free data pointers before deleting vector.
4888         (process_stop_reply): Likewise.
4889         (remote_parse_stop_reply): Allocate space for data
4890
4891 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
4892
4893         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
4894         MAX_REGISTER_SIZE.
4895         (amd64_pseudo_register_read_value): Likewise.
4896         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
4897         (store_register_using_P): Likewise.
4898         * regcache.c (regcache_xfer_part): Likewise.
4899
4900 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
4901
4902         Split real and pseudo registers.
4903         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
4904         (sparc32_pseudo_regnum): New enum.
4905         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
4906         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
4907         (SPARC32_CP0_REGISTERS): New macro.
4908         (sparc32_pseudo_register_name): New function.
4909         (sparc32_register_name): Use sparc32_pseudo_register_name.
4910         (sparc32_pseudo_register_type): New function.
4911         (sparc32_register_type): Use sparc32_pseudo_register_type.
4912         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
4913         pseudo register numbers.
4914         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
4915         (SPARC64_CP0_REGISTERS): New macro.
4916         (sparc64_pseudo_register_name): New function.
4917         (sparc64_register_name): Use sparc64_pseudo_register_name.
4918         (sparc64_pseudo_register_type): New function.
4919         (sparc64_register_type): Use sparc64_pseudo_register_type.
4920         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
4921         pseudo register numbers.
4922         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
4923         sparc64_store_arguments): Handle pseudo register numbers.
4924
4925 2017-01-13  Yao Qi  <yao.qi@linaro.org>
4926
4927         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
4928         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
4929         output.
4930         (getpkt_or_notif_sane_1): Likewise.
4931
4932 2017-01-13  Yao Qi  <yao.qi@linaro.org>
4933
4934         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
4935         of CC.  Pass "-x c++-header" instead of "-x c".
4936
4937 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
4938
4939         * remote.c (remote_can_async_p): Update comment.
4940
4941 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
4942
4943         * linux-nat.c (linux_nat_can_async_p): Update comment.
4944
4945 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
4946
4947         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
4948
4949 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
4950
4951         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
4952
4953 2017-01-10  Tom Tromey  <tom@tromey.com>
4954
4955         * python/py-type.c (typy_legacy_template_argument): Update.
4956         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
4957         ~demangle_parse_info): Declare new members.
4958         (cp_demangled_name_to_comp): Return unique_ptr.
4959         (cp_demangled_name_parse_free)
4960         (make_cleanup_cp_demangled_name_parse_free)
4961         (cp_new_demangle_parse_info): Remove.
4962         * cp-support.c (do_demangled_name_parse_free_cleanup)
4963         (make_cleanup_cp_demangled_name_parse_free): Remove.
4964         (inspect_type, cp_canonicalize_string_full)
4965         (cp_canonicalize_string): Update.
4966         (mangled_name_to_comp): Change return type.
4967         (cp_class_name_from_physname, method_name_from_physname)
4968         (cp_func_name, cp_remove_params): Update.
4969         * cp-name-parser.y (demangle_parse_info): New constructor, from
4970         cp_new_demangle_parse_info.
4971         (~demangle_parse_info): New destructor, from
4972         cp_demangled_name_parse_free.
4973         (cp_merge_demangle_parse_infos): Update.
4974         (cp_demangled_name_to_comp): Change return type.
4975
4976 2017-01-10  Tom Tromey  <tom@tromey.com>
4977
4978         * top.c (prevent_dont_repeat): Change return type.
4979         * python/python.c (execute_gdb_command): Use std::string.
4980         Update.
4981         * guile/guile.c (gdbscm_execute_gdb_command): Update.
4982         * command.h (prevent_dont_repeat): Change return type.
4983         * breakpoint.c (bpstat_do_actions_1): Update.
4984
4985 2017-01-10  Tom Tromey  <tom@tromey.com>
4986
4987         * value.h (scoped_value_mark::~scoped_value_mark): Call
4988         free_to_mark.
4989         (scoped_value_mark::free_to_mark): New method.
4990         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
4991         scoped_value_mark.
4992
4993 2017-01-10  Tom Tromey  <tom@tromey.com>
4994
4995         * python/py-value.c (valpy_dereference, valpy_referenced_value)
4996         (valpy_reference_value, valpy_const_value, valpy_get_address)
4997         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
4998         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
4999         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
5000         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
5001         scoped_value_mark.
5002         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
5003         * value.h (scoped_value_mark): New class.
5004
5005 2017-01-10  Tom Tromey  <tom@tromey.com>
5006
5007         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
5008         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
5009         * psymtab.c (discard_psymtabs_upto): Remove.
5010         (make_cleanup_discard_psymtabs): Remove.
5011         (struct psymtab_state): Remove.
5012
5013 2017-01-10  Tom Tromey  <tom@tromey.com>
5014
5015         * record-full.c (record_full_save_cleanups): Remove.
5016         (record_full_save): Use gdb::unlinker.
5017         * gcore.c (do_bfd_delete_cleanup): Remove.
5018         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
5019         cleanups.
5020         * dwarf2read.c (unlink_if_set): Remove.
5021         (write_psymtabs_to_index): Use gdb::unlinker.
5022         * common/gdb_unlinker.h: New file.
5023
5024 2017-01-10  Tom Tromey  <tom@tromey.com>
5025
5026         * windows-tdep.c (windows_xfer_shared_library): Update.
5027         * windows-nat.c (windows_make_so): Update.
5028         * utils.h (make_cleanup_bfd_unref): Remove.
5029         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
5030         * symfile.h (symfile_bfd_open)
5031         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
5032         * symfile.c (read_symbols, symbol_file_add)
5033         (separate_debug_file_exists): Update.
5034         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
5035         (generic_load, reread_symbols): Update.
5036         * symfile-mem.c (symbol_file_add_from_memory): Update.
5037         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
5038         (spu_symbol_file_add_from_memory): Update.
5039         * solist.h (struct target_so_ops) <bfd_open>: Return
5040         gdb_bfd_ref_ptr.
5041         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
5042         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
5043         gdb_bfd_ref_ptr.
5044         (solib_map_sections, reload_shared_libraries_1): Update.
5045         * solib-svr4.c (enable_break): Update.
5046         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
5047         * solib-frv.c (enable_break2): Update.
5048         * solib-dsbt.c (enable_break): Update.
5049         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
5050         gdb_bfd_ref_ptr.
5051         (darwin_solib_get_all_image_info_addr_at_init): Update.
5052         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
5053         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
5054         * record-full.c (record_full_save): Update.
5055         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
5056         * procfs.c (insert_dbx_link_bpt_in_file): Update.
5057         * minidebug.c (find_separate_debug_file_in_section): Return
5058         gdb_bfd_ref_ptr.
5059         * machoread.c (macho_add_oso_symfile): Change abfd to
5060         gdb_bfd_ref_ptr.
5061         (macho_symfile_read_all_oso): Update.
5062         (macho_check_dsym): Return gdb_bfd_ref_ptr.
5063         (macho_symfile_read): Update.
5064         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
5065         (jit_bfd_try_read_symtab): Update.
5066         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5067         (gdb_bfd_openw, gdb_bfd_openr_iovec)
5068         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
5069         gdb_bfd_ref_ptr.
5070         (gdb_bfd_ref_policy): New struct.
5071         (gdb_bfd_ref_ptr): New typedef.
5072         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5073         (gdb_bfd_openw, gdb_bfd_openr_iovec)
5074         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
5075         gdb_bfd_ref_ptr.
5076         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
5077         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
5078         (gcore_command): Update.
5079         * exec.c (exec_file_attach): Update.
5080         * elfread.c (elf_symfile_read): Update.
5081         * dwarf2read.c (dwarf2_get_dwz_file): Update.
5082         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
5083         (open_and_init_dwo_file): Update.
5084         (open_dwp_file): Return gdb_bfd_ref_ptr.
5085         (open_and_init_dwp_file): Update.
5086         * corelow.c (core_open): Update.
5087         * compile/compile-object-load.c (compile_object_load): Update.
5088         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
5089         * coffread.c (coff_symfile_read): Update.
5090         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
5091         gdb_bfd_ref_ptr.  Rename.
5092         (dump_bfd_file, restore_command): Update.
5093         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
5094         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
5095         (find_separate_debug_file_by_buildid): Update.
5096
5097 2017-01-10  Tom Tromey  <tom@tromey.com>
5098
5099         * common/gdb_ref_ptr.h: New file.
5100         * python/py-ref.h (struct gdbpy_ref_policy): New.
5101         (gdbpy_ref): Now a typedef.
5102
5103 2017-01-10  Tom Tromey  <tom@tromey.com>
5104
5105         * utils.h (make_cleanup_htab_delete): Don't declare.
5106         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
5107         Remove.
5108         * linespec.c (decode_compound_collector): Add constructor,
5109         destructor.
5110         (lookup_prefix_sym): Remove cleanup.
5111         (symtab_collector): Add constructor, destructor.
5112         (collect_symtabs_from_filename): Remove cleanup.
5113         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
5114         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
5115         Use htab_up.
5116         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
5117         * dwarf2read.c (dw2_expand_symtabs_matching)
5118         (dw2_map_symbol_filenames, dwarf_decode_macros)
5119         (write_psymtabs_to_index): Use htab_up.
5120         * dwarf2loc.c (func_verify_no_selftailcall)
5121         (call_site_find_chain_1, func_verify_no_selftailcall)
5122         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
5123         std::vector, gdb::unique_xmalloc_ptr.
5124         (call_sitep): Remove typedef.
5125         (dwarf2_locexpr_baton_eval): Remove unused variable.
5126
5127 2017-01-10  Tom Tromey  <tom@tromey.com>
5128
5129         * python/python-internal.h (make_cleanup_py_decref)
5130         (make_cleanup_py_xdecref): Don't declare.
5131         * python/py-utils.c (py_decref, make_cleanup_py_decref)
5132         (py_xdecref, make_cleanup_py_xdecref): Remove.
5133
5134 2017-01-10  Tom Tromey  <tom@tromey.com>
5135
5136         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
5137         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
5138
5139 2017-01-10  Tom Tromey  <tom@tromey.com>
5140
5141         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
5142
5143 2017-01-10  Tom Tromey  <tom@tromey.com>
5144
5145         * python/py-utils.c (unicode_to_encoded_string)
5146         (python_string_to_target_string)
5147         (python_string_to_target_python_string)
5148         (python_string_to_host_string, gdbpy_obj_to_string)
5149         (get_addr_from_python): Use gdbpy_ref.
5150
5151 2017-01-10  Tom Tromey  <tom@tromey.com>
5152
5153         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
5154         gdbpy_ref.
5155
5156 2017-01-10  Tom Tromey  <tom@tromey.com>
5157
5158         * python/python.c (eval_python_command, gdbpy_decode_line)
5159         (gdbpy_run_events, gdbpy_start_type_printers)
5160         (gdbpy_apply_type_printers): Use gdbpy_ref.
5161
5162 2017-01-10  Tom Tromey  <tom@tromey.com>
5163
5164         * python/py-param.c (get_doc_string, compute_enum_values): Use
5165         gdbpy_ref.
5166
5167 2017-01-10  Tom Tromey  <tom@tromey.com>
5168
5169         * python/py-inferior.c (find_thread_object, build_inferior_list):
5170         Use gdbpy_ref.
5171
5172 2017-01-10  Tom Tromey  <tom@tromey.com>
5173
5174         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
5175
5176 2017-01-10  Tom Tromey  <tom@tromey.com>
5177
5178         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
5179         gdbpy_ref.
5180
5181 2017-01-10  Tom Tromey  <tom@tromey.com>
5182
5183         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
5184         extra incref.
5185         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
5186         Use gdbpy_ref.
5187
5188 2017-01-10  Tom Tromey  <tom@tromey.com>
5189
5190         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
5191         gdbpy_ref.
5192
5193 2017-01-10  Tom Tromey  <tom@tromey.com>
5194
5195         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
5196         decref results of PyArg_ParseTupleAndKeywords.
5197
5198 2017-01-10  Tom Tromey  <tom@tromey.com>
5199
5200         * python/python.c (python_run_simple_file): Use
5201         unique_xmalloc_ptr, gdbpy_ref.
5202
5203 2017-01-10  Tom Tromey  <tom@tromey.com>
5204
5205         * python/py-prettyprint.c (print_stack_unless_memory_error)
5206         (print_string_repr, print_children): Use gdbpy_ref.
5207         (dummy_python_frame): New class.
5208         (dummy_python_frame::dummy_python_frame): Rename from
5209         push_dummy_python_frame.
5210         (py_restore_tstate): Remove.
5211
5212 2017-01-10  Tom Tromey  <tom@tromey.com>
5213
5214         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
5215
5216 2017-01-10  Tom Tromey  <tom@tromey.com>
5217
5218         * python/python.c (ensure_python_env, restore_python_env):
5219         Remove.
5220         * python/python-internal.h (ensure_python_env): Don't declare.
5221         * varobj.h (varobj_ensure_python_env): Don't declare.
5222         * varobj.c (varobj_ensure_python_env): Remove.
5223
5224 2017-01-10  Tom Tromey  <tom@tromey.com>
5225
5226         * varobj.c (varobj_value_get_print_value): Use
5227         gdbpy_enter_varobj.
5228
5229 2017-01-10  Tom Tromey  <tom@tromey.com>
5230
5231         * python/py-prettyprint.c (print_string_repr, print_children):
5232         Update.
5233         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
5234         of "encoding".
5235         * varobj.c (varobj_value_get_print_value): Update.
5236         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
5237
5238 2017-01-10  Tom Tromey  <tom@tromey.com>
5239
5240         * varobj.c (varobj_get_display_hint)
5241         (dynamic_varobj_has_child_method, install_new_value_visualizer)
5242         (varobj_set_visualizer, free_variable): Use
5243         gdbpy_enter_varobj.
5244
5245 2017-01-10  Tom Tromey  <tom@tromey.com>
5246
5247         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
5248         (do_finish_initialization): New function.  Use gdbpy_ref.
5249         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
5250         do_finish_initialization.
5251
5252 2017-01-10  Tom Tromey  <tom@tromey.com>
5253
5254         * python/py-param.c (get_set_value, get_show_value): Use
5255         gdbpy_enter, gdbpy_ref.
5256
5257 2017-01-10  Tom Tromey  <tom@tromey.com>
5258
5259         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
5260
5261 2017-01-10  Tom Tromey  <tom@tromey.com>
5262
5263         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
5264
5265 2017-01-10  Tom Tromey  <tom@tromey.com>
5266
5267         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
5268         Use gdbpy_enter_varobj.
5269
5270 2017-01-10  Tom Tromey  <tom@tromey.com>
5271
5272         * varobj.c (gdbpy_enter_varobj): New constructor.
5273         * python/python-internal.h (gdbpy_enter_varobj): New class.
5274         * python/py-varobj.c (py_varobj_get_iterator): Use
5275         gdbpy_enter_varobj.
5276
5277 2017-01-10  Tom Tromey  <tom@tromey.com>
5278
5279         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
5280         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5281         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
5282         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
5283         unique_xmalloc_ptr.
5284         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
5285
5286 2017-01-10  Tom Tromey  <tom@tromey.com>
5287
5288         * python/py-xmethods.c (invoke_match_method): Use
5289         gdbpy_ref.
5290
5291 2017-01-10  Tom Tromey  <tom@tromey.com>
5292
5293         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
5294         gdbpy_enter, gdbpy_ref.
5295
5296 2017-01-10  Tom Tromey  <tom@tromey.com>
5297
5298         * python/python.c (python_interactive_command): Use gdbpy_enter.
5299
5300 2017-01-10  Tom Tromey  <tom@tromey.com>
5301
5302         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
5303         gdbpy_ref.
5304
5305 2017-01-10  Tom Tromey  <tom@tromey.com>
5306
5307         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
5308         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
5309
5310 2017-01-10  Tom Tromey  <tom@tromey.com>
5311
5312         * utils.h (htab_deleter): New struct.
5313         (htab_up): New typedef.
5314         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
5315         gdbpy_enter, gdbpy_ref, htab_up.
5316
5317 2017-01-10  Tom Tromey  <tom@tromey.com>
5318
5319         * python/py-unwind.c (pending_frame_invalidate): Remove.
5320         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
5321
5322 2017-01-10  Tom Tromey  <tom@tromey.com>
5323
5324         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
5325         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
5326
5327 2017-01-10  Tom Tromey  <tom@tromey.com>
5328
5329         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
5330
5331 2017-01-10  Tom Tromey  <tom@tromey.com>
5332
5333         * python/python.c (gdbpy_eval_from_control_command)
5334         (gdbpy_source_script, gdbpy_run_events)
5335         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
5336         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
5337         gdbpy_enter.
5338
5339 2017-01-10  Tom Tromey  <tom@tromey.com>
5340
5341         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
5342
5343 2017-01-10  Tom Tromey  <tom@tromey.com>
5344
5345         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
5346
5347 2017-01-10  Tom Tromey  <tom@tromey.com>
5348
5349         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
5350         (python_on_inferior_call_pre, python_on_inferior_call_post)
5351         (python_on_memory_change, python_on_register_change)
5352         (python_inferior_exit, python_new_objfile, add_thread_object)
5353         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
5354
5355 2017-01-10  Tom Tromey  <tom@tromey.com>
5356
5357         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
5358         (bpfinishpy_handle_exit): Use gdbpy_enter.
5359
5360 2017-01-10  Tom Tromey  <tom@tromey.com>
5361
5362         * python/py-cmd.c (cmdpy_destroyer)
5363         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
5364         gdbpy_enter.
5365
5366 2017-01-10  Tom Tromey  <tom@tromey.com>
5367
5368         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
5369         gdbpy_enter.
5370         (gdbpy_breakpoint_has_cond): Likewise.
5371
5372 2017-01-10  Tom Tromey  <tom@tromey.com>
5373
5374         * python/python.c (gdbpy_enter): New constructor.
5375         (~gdbpy_enter): New destructor.
5376         (restore_python_env, ensure_python_env): Rewrite.
5377         * python/python-internal.h (gdbpy_enter): New class.
5378
5379 2017-01-10  Tom Tromey  <tom@tromey.com>
5380
5381         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
5382
5383 2017-01-10  Tom Tromey  <tom@tromey.com>
5384
5385         * python/py-value.c (value_has_field, get_field_flag)
5386         (get_field_type, valpy_getitem, convert_value_from_python): Use
5387         gdbpy_ref.
5388
5389 2017-01-10  Tom Tromey  <tom@tromey.com>
5390
5391         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
5392         gdbpy_ref.
5393
5394 2017-01-10  Tom Tromey  <tom@tromey.com>
5395
5396         * python/py-prettyprint.c (search_pp_list)
5397         (find_pretty_printer_from_objfiles)
5398         (find_pretty_printer_from_progspace)
5399         (find_pretty_printer_from_gdb, find_pretty_printer)
5400         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
5401         gdbpy_ref.
5402
5403 2017-01-10  Tom Tromey  <tom@tromey.com>
5404
5405         * python/py-param.c (call_doc_function): Use gdbpy_ref.
5406
5407 2017-01-10  Tom Tromey  <tom@tromey.com>
5408
5409         * python/py-linetable.c (build_line_table_tuple_from_pcs)
5410         (ltpy_get_all_source_lines): Use gdbpy_ref.
5411
5412 2017-01-10  Tom Tromey  <tom@tromey.com>
5413
5414         * python/py-framefilter.c (extract_sym, extract_value)
5415         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
5416         gdbpy_ref.
5417
5418 2017-01-10  Tom Tromey  <tom@tromey.com>
5419
5420         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
5421
5422 2017-01-10  Tom Tromey  <tom@tromey.com>
5423
5424         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
5425
5426 2017-01-10  Tom Tromey  <tom@tromey.com>
5427
5428         * python/py-function.c (convert_values_to_python, fnpy_init): Use
5429         gdbpy_ref.
5430
5431 2017-01-10  Tom Tromey  <tom@tromey.com>
5432
5433         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
5434
5435 2017-01-10  Tom Tromey  <tom@tromey.com>
5436
5437         * python/py-type.c (convert_field, make_fielditem, typy_fields)
5438         (typy_range): Use gdbpy_ref.
5439
5440 2017-01-10  Tom Tromey  <tom@tromey.com>
5441
5442         * python/py-threadevent.c (create_thread_event_object): Use
5443         gdbpy_ref.
5444         * python/py-stopevent.c (create_stop_event_object): Simplify.
5445         (emit_stop_event): Use gdbpy_ref.
5446         * python/py-signalevent.c (create_signal_event_object): Use
5447         gdbpy_ref.
5448         * python/py-newobjfileevent.c (create_new_objfile_event_object)
5449         (emit_new_objfile_event, create_clear_objfiles_event_object)
5450         (emit_clear_objfiles_event): Use gdbpy_ref.
5451         * python/py-infevents.c (create_inferior_call_event_object)
5452         (create_register_changed_event_object)
5453         (create_memory_changed_event_object, emit_inferior_call_event)
5454         (emit_memory_changed_event, emit_register_changed_event): Use
5455         gdbpy_ref.
5456         * python/py-exitedevent.c (create_exited_event_object)
5457         (emit_exited_event): Use gdbpy_ref.
5458         * python/py-event.h (evpy_emit_event): Remove
5459         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
5460         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
5461         * python/py-continueevent.c (emit_continue_event): Use
5462         gdbpy_ref.
5463         * python/py-breakpoint.c (gdbpy_breakpoint_created)
5464         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
5465         gdbpy_ref.
5466         * python/py-bpevent.c (create_breakpoint_event_object): Use
5467         gdbpy_ref.
5468
5469 2017-01-10  Tom Tromey  <tom@tromey.com>
5470
5471         * python/py-ref.h: New file.
5472
5473 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
5474
5475         * cli-out.c (cli_ui_out::do_redirect): Change return type to
5476         void.
5477         * cli-out.h (cli_ui_out::do_redirect): Likewise.
5478         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
5479         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
5480         * ui-out.c (ui_out::redirect): Likewise.
5481         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
5482         * cli/cli-logging.c (set_logging_redirect): Update call site of
5483         ui_out::redirect.
5484         (handle_redirections): Likewise.
5485         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
5486         * top.c (execute_command_to_string): Likewise.
5487         * utils.c (do_ui_out_redirect_pop): Likewise.
5488
5489 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
5490
5491         * stack.c (_initialize_stack): Update "frame" command help message.
5492
5493 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
5494
5495         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
5496
5497 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5498
5499         * x86-linux-nat.h: Include gdb_proc_service.h.
5500
5501 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5502
5503         * ser-base.h: Include serial.h.
5504
5505 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5506
5507         * ppc-linux-tdep.h: Include ppc-tdep.h.
5508
5509 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5510
5511         * nat/amd64-linux-siginfo.h: Include signal.h.
5512
5513 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5514
5515         * nat/aarch64-linux-hw-point.h: Include break-common.h.
5516
5517 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5518
5519         * mi/mi-parse.h: Include mi-cmds.h.
5520
5521 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5522
5523         * inf-loop.c: Don't include "target.h".
5524         * inf-loop.h: Include it here.
5525
5526 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5527
5528         * dfp.h: Include "dboulest.h" and "expression.h".
5529
5530 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5531
5532         * ax-gdb.h: Include "ax.h".
5533
5534 2017-01-06  Yao Qi  <yao.qi@linaro.org>
5535
5536         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
5537         with nat/gdb_ptrace.h.
5538
5539 2017-01-05  Yao Qi  <yao.qi@linaro.org>
5540
5541         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
5542         new line.
5543         (mips64_fbsd_sigframe_init): Likewise.
5544
5545 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
5546
5547         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
5548         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
5549
5550 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
5551
5552         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
5553         * NEWS: Mention new FreeBSD/mips native configuration.
5554         * config/mips/fbsd.mh: New file.
5555         * configure.host: Add mips*-*-freebsd*.
5556         * mips-fbsd-nat.c: New file.
5557
5558 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
5559
5560         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
5561         (ALLDEPFILES): Add mips-fbsd-tdep.c.
5562         * NEWS: Mention new FreeBSD/mips target.
5563         * configure.tgt: Add mips*-*-freebsd*.
5564         * mips-fbsd-tdep.c: New file.
5565         * mips-fbsd-tdep.h: New file.
5566
5567 2017-01-04  Yao Qi  <yao.qi@linaro.org>
5568
5569         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
5570         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
5571
5572 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
5573
5574         Update copyright year range in all GDB files.
5575
5576 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
5577
5578         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
5579
5580 For older changes see ChangeLog-2016.
5581 \f
5582 Local Variables:
5583 mode: change-log
5584 left-margin: 8
5585 fill-column: 74
5586 version-control: never
5587 coding: utf-8
5588 End: