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