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