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