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