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