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