Move command lines types/declarations to cli-script.h
[external/binutils.git] / gdb / ChangeLog
1 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4         (enum command_control_type): Likewise.
5         (struct command_line): Likewise.
6         (free_command_lines): Likewise.
7         (struct command_lines_deleter): Likewise.
8         (command_line_up): Likewise.
9         (read_command_lines): Likewise.
10         (read_command_lines_1): Likewise.
11         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
12         (enum command_control_type): Likewise.
13         (struct command_line): Likewise.
14         (free_command_lines): Likewise.
15         (struct command_lines_deleter): Likewise.
16         (command_line_up): Likewise.
17         (read_command_lines): Likewise.
18         (read_command_lines_1): Likewise.
19         * breakpoint.h: Include cli/cli-script.h.
20         * extension-priv.h: Likewise.
21         * gdbcmd.h: Likewise.
22
23 2017-09-04  Pedro Alves  <palves@redhat.com>
24
25         * ada-lang.c (is_known_support_routine): Move sal declaration to
26         where it is initialized.
27         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
28         (parse_breakpoint_sals, decode_static_tracepoint_spec)
29         (clear_command, update_static_tracepoint): Remove init_sal
30         references.  Move declarations closer to initializations.
31         * cli/cli-cmds.c (list_command): Move sal declarations closer to
32         initializations.
33         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
34         references.  Move sal declarations closer to initializations.
35         * frame.c (find_frame_sal): Return a symtab_and_line via function
36         return instead of output parameter.  Remove init_sal references.
37         * frame.h (find_frame_sal): Return a symtab_and_line via function
38         return instead of output parameter.
39         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
40         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
41         instead of memset.
42         (gdbscm_find_pc_line): Remove init_sal reference.
43         * infcall.c (call_function_by_hand_dummy): Remove init_sal
44         references.  Move declarations closer to initializations.
45         * infcmd.c (set_step_frame): Update.  Move declarations closer to
46         initializations.
47         (finish_backward): Remove init_sal references.  Move declarations
48         closer to initializations.
49         * infrun.c (process_event_stop_test, handle_step_into_function)
50         (insert_hp_step_resume_breakpoint_at_frame)
51         (insert_step_resume_breakpoint_at_caller): Likewise.
52         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
53         (symbol_to_sal): Likewise.
54         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
55         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
56         to its initialization.
57         * reverse.c (save_bookmark_command): Use new/delete.  Remove
58         init_sal references.  Move declarations closer to initializations.
59         * source.c (get_current_source_symtab_and_line): Remove brace
60         initialization.
61         (set_current_source_symtab_and_line): Now takes the sal by const
62         reference.  Remove brace initialization.
63         (line_info): Remove init_sal reference.
64         * source.h (set_current_source_symtab_and_line): Now takes a
65         symtab_and_line via const reference.
66         * stack.c (set_current_sal_from_frame): Adjust.
67         (print_frame_info): Adjust.
68         (get_last_displayed_sal): Return the sal via function return
69         instead of via output parameter.  Simplify.
70         (frame_info): Adjust.
71         * stack.h (get_last_displayed_sal): Return the sal via function
72         return instead of via output parameter.
73         * symtab.c (init_sal): Delete.
74         (find_pc_sect_line): Remove init_sal references.  Move
75         declarations closer to initializations.
76         (find_function_start_sal): Remove init_sal references.  Move
77         declarations closer to initializations.
78         * symtab.h (struct symtab_and_line): In-class initialize all
79         fields.
80         * tracepoint.c (set_traceframe_context)
81         (print_one_static_tracepoint_marker): Remove init_sal references.
82         Move declarations closer to initializations.
83         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
84         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
85         declarations closer to initializations.
86         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
87         init_sal references.  Adjust.
88
89 2017-09-04  Pedro Alves  <palves@redhat.com>
90
91         * ax-gdb.c (agent_command_1): Use range-for.
92         * break-catch-throw.c (re_set_exception_catchpoint): Update.
93         * breakpoint.c: Include "common/array-view.h".
94         (init_breakpoint_sal, create_breakpoint_sal): Change sals
95         parameter from struct symtabs_and_lines to
96         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
97         (breakpoint_sals_to_pc): Change sals parameter from struct
98         symtabs_and_lines to std::vector reference.
99         (check_fast_tracepoint_sals): Change sals parameter from struct
100         symtabs_and_lines to std::array_view.  Use range-for.
101         (decode_static_tracepoint_spec): Return a std::vector instead of
102         symtabs_and_lines.  Update.
103         (create_breakpoint): Update.
104         (break_range_command, until_break_command, clear_command): Update.
105         (base_breakpoint_decode_location, bkpt_decode_location)
106         (bkpt_probe_create_sals_from_location)
107         (bkpt_probe_decode_location, tracepoint_decode_location)
108         (tracepoint_probe_decode_location)
109         (strace_marker_create_sals_from_location): Return a std::vector
110         instead of symtabs_and_lines.
111         (strace_marker_create_breakpoints_sal): Update.
112         (strace_marker_decode_location): Return a std::vector instead of
113         symtabs_and_lines.  Update.
114         (update_breakpoint_locations): Change struct symtabs_and_lines
115         parameters to gdb::array_view.  Adjust.
116         (location_to_sals): Return a std::vector instead of
117         symtabs_and_lines.  Update.
118         (breakpoint_re_set_default): Use std::vector instead of struct
119         symtabs_and_lines.
120         (decode_location_default): Return a std::vector instead of
121         symtabs_and_lines.  Update.
122         * breakpoint.h: Include "common/array-view.h".
123         (struct breakpoint_ops) <decode_location>: Now returns a
124         std::vector instead of returning a symtabs_and_lines via output
125         parameter.
126         (update_breakpoint_locations): Change sals parameters to use
127         gdb::array_view.
128         * cli/cli-cmds.c (edit_command, list_command): Update to use
129         std::vector and gdb::array_view.
130         (ambiguous_line_spec): Adjust to use gdb::array_view and
131         range-for.
132         (compare_symtabs): Rename to ...
133         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
134         const reference and adjust.
135         (filter_sals): Rewrite using std::vector and standard algorithms.
136         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
137         (jump_command): Update to use std::vector.
138         * linespec.c (struct linespec_state) <canonical_names>: Update
139         comment.
140         (add_sal_to_sals_basic): Delete.
141         (add_sal_to_sals, filter_results, convert_results_to_lsals)
142         (decode_line_2, create_sals_line_offset)
143         (convert_address_location_to_sals, convert_linespec_to_sals)
144         (convert_explicit_location_to_sals, parse_linespec)
145         (event_location_to_sals, decode_line_full, decode_line_1)
146         (decode_line_with_current_source)
147         (decode_line_with_last_displayed, decode_objc)
148         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
149         (linespec_result::~linespec_result): Adjust to use std::vector
150         instead of symtabs_and_lines.
151         * linespec.h (linespec_sals::sals): Now a std::vector.
152         (struct linespec_result): Use std::vector, bool, and in-class
153         initialization.
154         (decode_line_1, decode_line_with_current_source)
155         (decode_line_with_last_displayed): Return std::vector.
156         * macrocmd.c (info_macros_command): Use std::vector.
157         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
158         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
159         std::vector.
160         * probe.h (parse_probes): Return a std::vector.
161         * python/python.c (gdbpy_decode_line): Use std::vector and
162         gdb::array_view.
163         * source.c (select_source_symtab, line_info): Use std::vector.
164         * stack.c (func_command): Use std::vector.
165         * symtab.h (struct symtabs_and_lines): Delete.
166         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
167
168 2017-09-04  Pedro Alves  <palves@redhat.com>
169
170         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
171         unittests/array-view-selftests.c.
172         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
173         * common/array-view.h: New file.
174         * unittests/array-view-selftests.c: New file.
175
176 2017-09-04  Pedro Alves  <palves@redhat.com>
177
178         * cli/cli-cmds.c (edit_command): Pass message to
179         ambiguous_line_spec.
180         (list_command): Pass message to ambiguous_line_spec.  Say
181         "first"/"last" instead of "start" and "end" to be consistent with
182         the manual.
183         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
184         them to print formatted message.
185
186 2017-09-04  Pedro Alves  <palves@redhat.com>
187
188         * btrace.c (ftrace_add_pt): Pass btrace_insn to
189         ftrace_update_insns by reference instead of pointer.
190
191 2017-09-04  Yao Qi  <yao.qi@linaro.org>
192
193         * i386-go32-tdep.c: Include x86-xstate.h.
194         (i386_go32_init_abi): Call i386_target_description.
195         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
196         if xcr0 is X86_XSTATE_X87_MASK.
197         * i386-tdep.h (tdesc_i386): Remove the declaration.
198         (tdesc_i386_mmx): Likewise.
199
200 2017-09-04  Yao Qi  <yao.qi@linaro.org>
201
202         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
203         X86_XSTATE_SSE_MASK instead of 0.
204
205 2017-09-04  Yao Qi  <yao.qi@linaro.org>
206
207         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
208         i386_target_description.
209         * i386-fbsd-nat.c (i386fbsd_read_description): Call
210         i386_target_description.
211         * i386-tdep.c (i386_gdbarch_init): Likewise.
212
213 2017-09-04  Yao Qi  <yao.qi@linaro.org>
214
215         * amd64-darwin-tdep.c: Include "x86-xstate.h".
216         (x86_darwin_init_abi_64): Call amd64_target_description.
217         * amd64-dicos-tdep.c: Likewise.
218         * amd64-fbsd-nat.c: Likewise.
219         * amd64-fbsd-tdep.c: Likewise.
220         * amd64-nbsd-tdep.c: Likewise.
221         * amd64-obsd-tdep.c: Likewise.
222         * amd64-sol2-tdep.c: Likewise.
223         * amd64-windows-tdep.c: Likewise.
224         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
225
226 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
227
228         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
229         (btrace_function) <insn>: Change type to use std::vector.
230         * btrace.c (ftrace_debug, ftrace_call_num_insn,
231         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
232         ftrace_update_insns, ftrace_compute_global_level_offset,
233         btrace_stitch_bts, btrace_clear, btrace_insn_get,
234         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
235         change to std::vector.
236         (ftrace_update_insns): Adjust to change to std::vector, change
237         type of INSN parameter.
238         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
239         * record-btrace.c (btrace_call_history_insn_range,
240         btrace_compute_src_line_range,
241         record_btrace_frame_prev_register): Adjust to change to
242         std::vector.
243         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
244         to change to std::vector.
245
246 2017-09-03  Tom Tromey  <tom@tromey.com>
247
248         * corefile.c (reopen_exec_file): Use std::string.
249
250 2017-09-03  Tom Tromey  <tom@tromey.com>
251
252         * compile/compile.c (compile_register_name_mangled): Return
253         std::string.
254         * compile/compile-loc2c.c (pushf_register_address): Update.
255         (pushf_register): Update.
256         * compile/compile-c-types.c (convert_array): Update.
257         * compile/compile-c-symbols.c (generate_vla_size): Update.
258         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
259         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
260         (convert_one_symbol): Update.
261         (generate_c_for_for_one_variable): Update.
262         * compile/compile-c-support.c (c_get_range_decl_name): Return a
263         std::string.
264         (generate_register_struct): Update.
265         * compile/compile-internal.h (c_get_range_decl_name): Return a
266         std::string.
267         (compile_register_name_mangled): Return std::string.
268
269 2017-09-03  Tom Tromey  <tom@tromey.com>
270
271         * utils.c (perror_string): Return a std::string.
272         (throw_perror_with_name, perror_warning_with_name): Update.
273
274 2017-09-03  Tom Tromey  <tom@tromey.com>
275
276         * demangle.c (demangle_command): Use std::string,
277         unique_xmalloc_ptr.
278
279 2017-09-03  Tom Tromey  <tom@tromey.com>
280
281         * cli/cli-setshow.c (do_set_command): Use std::string.
282
283 2017-09-03  Tom Tromey  <tom@tromey.com>
284
285         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
286
287 2017-09-03  Tom Tromey  <tom@tromey.com>
288
289         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
290
291 2017-09-03  Tom Tromey  <tom@tromey.com>
292
293         * mi/mi-cmd-env.c (env_execute_cli_command): Use
294         gdb::unique_xmalloc_ptr.
295
296 2017-09-03  Tom Tromey  <tom@tromey.com>
297
298         * thread.c (print_thread_info_1): Use string_printf.
299         (thread_apply_command, thread_apply_all_command): Use
300         std::string.
301
302 2017-09-03  Tom Tromey  <tom@tromey.com>
303
304         * valprint.c (val_print_string): Update.
305         * gdbcore.h (memory_error_message): Return std::string.
306         * corefile.c (memory_error_message): Return std::string.
307         (memory_error): Update.
308         * breakpoint.c (insert_bp_location): Update.
309
310 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
311
312         * target/waitstatus.h (target_waitstatus_to_string): Change
313         return type to std::string.
314         * target/waitstatus.c (target_waitstatus_to_string): Return
315         std::string.
316         * target.h (target_waitstatus_to_string): Remove declaration.
317         * infrun.c (resume, clear_proceed_status_thread,
318         print_target_wait_results, do_target_wait, save_waitstatus,
319         stop_all_threads): Adjust.
320         * record-btrace.c (record_btrace_wait): Adjust.
321         * target-debug.h
322         (target_debug_print_struct_target_waitstatus_p): Adjust.
323
324 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
325
326         PR gdb/22046
327         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
328         detection.
329
330 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
331
332         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
333         for setting/unsetting environment variables on the remote target.
334         (New remote packets): Add entries for QEnvironmentHexEncoded,
335         QEnvironmentUnset and QEnvironmentReset.
336         * common/environ.c (gdb_environ::operator=): Extend method to
337         handle m_user_set_env_list and m_user_unset_env_list.
338         (gdb_environ::clear): Likewise.
339         (match_var_in_string): Change type of first parameter from 'char
340         *' to 'const char *'.
341         (gdb_environ::set): Extend method to handle
342         m_user_set_env_list and m_user_unset_env_list.
343         (gdb_environ::unset): Likewise.
344         (gdb_environ::clear_user_set_env): New method.
345         (gdb_environ::user_set_envp): Likewise.
346         (gdb_environ::user_unset_envp): Likewise.
347         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
348         m_user_unset_env_list on move constructor/assignment.
349         (unset): Add new default parameter 'update_unset_list = true'.
350         (clear_user_set_env): New method.
351         (user_set_envp): Likewise.
352         (user_unset_envp): Likewise.
353         (m_user_set_env_list): New std::set.
354         (m_user_unset_env_list): Likewise.
355         * common/rsp-low.c (hex2str): New function.
356         (bin2hex): New overload for bin2hex function.
357         * common/rsp-low.c (hex2str): New prototype.
358         (str2hex): New overload prototype.
359         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
360         QEnvironmentUnset and QEnvironmentReset.
361         (remote_protocol_features): Add QEnvironmentHexEncoded,
362         QEnvironmentUnset and QEnvironmentReset packets.
363         (send_environment_packet): New function.
364         (extended_remote_environment_support): Likewise.
365         (extended_remote_create_inferior): Call
366         extended_remote_environment_support.
367         (_initialize_remote): Add QEnvironmentHexEncoded,
368         QEnvironmentUnset and QEnvironmentReset packet configs.
369         * unittests/environ-selftests.c (gdb_selftest_env_var):
370         New variable.
371         (test_vector_initialization): New function.
372         (test_init_from_host_environ): Likewise.
373         (test_reinit_from_host_environ): Likewise.
374         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
375         Likewise.
376         (test_unset_set_empty_vector): Likewise.
377         (test_vector_clear): Likewise.
378         (test_std_move): Likewise.
379         (test_move_constructor):
380         (test_self_move): Likewise.
381         (test_set_unset_reset): Likewise.
382         (run_tests): Rewrite in terms of the functions above.
383
384 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
385
386         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
387         (adi_available): Use a temp variable of type CORE_ADDR as argument
388         3 when calling target_auxv_search.
389         (adi_normalize_address): Use masks and xor operators to calculate
390         normalized address.
391         (adi_read_versions, adi_write_versions, adi_print_versions)
392         (do_examine, do_assign): Use paddress.
393
394 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
395
396         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
397         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
398         out of loop and add supply of FIR.
399         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
400         add collect of FIR.
401
402 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
403
404         PR gdb/21827
405         * cli/cli-script.c (define_command): Don't convert command name
406         to lower case.
407
408 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
409
410         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
411         Update all callers accordingly. Remove all code blocks handling
412         the case where DISPP is not NULL.
413
414 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
415
416         PR symtab/22003
417         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
418         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
419         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
420
421 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
422
423         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
424         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
425         (read_comp_units_from_section): New parameter abbrev_section, use
426         read_and_check_comp_unit_head, allocate signatured_type if needed.
427         (create_all_comp_units): Update read_comp_units_from_section caller.
428
429 2017-08-23  Pedro Alves  <palves@redhat.com>
430
431         PR remote/21852
432         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
433         to null_ptid and switch to thread without reading the registers
434         after adding the inferior.
435
436 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
437
438         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
439         compile-gcc.
440         * compile/compile.c (compile_gcc, show_compile_gcc): New.
441         (compile_to_object): Implement compile_gcc.
442         (_initialize_compile): Install "set compile-gcc".  Initialize
443         compile_gcc.
444
445 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
446
447         * compile/compile.c (compile_to_object): Conditionally call
448         set_verbose.  Conditionally call compile or compile_v0.
449
450 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
451
452         * sparc64-tdep.h: (adi_normalize_address): New export.
453         * sparc-nat.h: (open_adi_tag_fd): New export.
454         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
455         * sparc64-linux-tdep.c:
456         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
457         (sparc64_linux_handle_segmentation_fault): New function.
458         (sparc64_linux_init_abi): Register
459         sparc64_linux_handle_segmentation_fault
460         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
461         (sparc64_addr_bits_remove): New function.
462         (sparc64_init_abi): Register sparc64_addr_bits_remove.
463         (MAX_PROC_NAME_SIZE): New macro.
464         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
465         (sparc64adilist): New variable.
466         (adi_proc_list): New variable.
467         (find_adi_info): New function.
468         (add_adi_info): New function.
469         (get_adi_info_proc): New function.
470         (get_adi_info): New function.
471         (info_adi_command): New function.
472         (read_maps_entry): New function.
473         (adi_available): New function.
474         (adi_normalize_address): New function.
475         (adi_align_address): New function.
476         (adi_convert_byte_count): New function.
477         (adi_tag_fd): New function.
478         (adi_is_addr_mapped): New function.
479         (adi_read_versions): New function.
480         (adi_write_versions): New function.
481         (adi_print_versions): New function.
482         (do_examine): New function.
483         (do_assign): New function.
484         (adi_examine_command): New function.
485         (adi_assign_command): New function.
486         (_initialize_sparc64_adi_tdep): New function.
487
488 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
489
490         * breakpoint.c (breakpoints_info): Rename to ...
491         (info_breakpoints_command): ... this.
492         (watchpoints_info): Rename to ...
493         (info_watchpoints_command): ... this.
494         (tracepoints_info): Rename to ...
495         (info_tracepoints_command): ... this.
496         (_initialize_breakpoint): Adjust.
497         * dcache.c (dcache_info): Rename to ...
498         (info_display_command): ... this.
499         (_initialize_dcache): Adjust.
500         * frame.h (args_info): Rename to ...
501         (info_args_command): ... this.
502         (locals_info): Rename to ...
503         (info_locals_command): ... this.
504         * infcmd.c (nofp_registers_info): Rename to ...
505         (info_registers_command): ... this.
506         (float_info): Rename to ...
507         (info_float_command): ... this.
508         (program_info): Rename to ...
509         (info_program_command): ... this.
510         (all_registers_info): Rename to ...
511         (info_all_registers_command): ... this.
512         (vector_info): Rename to ...
513         (info_vector_command): ... this.
514         (float_info): Rename to ...
515         (info_float_command): ... this.
516         (_initialize_infcmd): Adjust.
517         * inferior.h (term_info): Rename to ...
518         (info_terminal_command): ... this.
519         * inflow.c (term_info): Rename to ...
520         (info_terminal_command): ... this.
521         (_initialize_inflow): Adjust.
522         * infrun.c (signals_info): Rename to ...
523         (info_signals_command): ... this.
524         (_initialize_infrun): Adjust.
525         * objc-lang.c (classes_info): Rename to ...
526         (info_classes_command): ... this.
527         (selectors_info): Rename to ...
528         (info_selectors_command): ... this.
529         (_initialize_objc_language): Adjust.
530         * printcmd.c (sym_info): Rename to ...
531         (info_symbol_command): ... this.
532         (address_info): Rename to ...
533         (info_address_command): ... this.
534         (display_info): Rename to ...
535         (info_display_command): ... this.
536         (_initialize_printcmd): Adjust.
537         * reverse.c (bookmarks_info): Rename to ...
538         (info_breakpoints_command): ... this.
539         (_initialize_reverse): Adjust.
540         * ser-go32.c (dos_info): Rename to ...
541         (info_serial_command): ... this.
542         (_initialize_ser_dos): Adjust.
543         * skip.c (skip_info): Rename to ...
544         (info_skip_command): ... this.
545         (_initialize_step_skip): Adjust.
546         * source.c (line_info): Rename to ...
547         (info_line_command): ... this.
548         (source_info): Rename to ...
549         (info_source_command)
550         * stack.c (frame_info): Rename to ...
551         (info_frame_command): ... this.
552         (locals_info): Rename to ...
553         (info_locals_command): ... this.
554         (args_info): Rename to ...
555         (info_args_command): ... this.
556         (_initialize_stack): Adjust.
557         * symtab.c (sources_info): Rename to ...
558         (info_sources_command): ... this.
559         (variables_info): Rename to ...
560         (info_variables_command): ... this.
561         (functions_info): Rename to ...
562         (info_functions_command): ... this.
563         (types_info): Rename to ...
564         (info_types_command): ... this.
565         (_initialize_symtab): Adjust.
566         * target.c (target_info): Rename to ...
567         (info_target_command): ... this.
568         (initialize_targets): Adjust.
569         * tracepoint.c (tvariables_info): Rename to ...
570         (info_tvariables_command): ... this.
571         (scope_info): Rename to ...
572         (info_scope_command): ... this.
573         (trace_dump_actions): Adjust.
574         (_initialize_tracepoint): Adjust.
575
576 2017-08-22  Tom Tromey  <tom@tromey.com>
577
578         * breakpoint.h (install_breakpoint): Update.
579         * breakpoint.c (add_solib_catchpoint): Update.
580         (install_breakpoint): Change argument to a std::unique_ptr.
581         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
582         (create_breakpoint_sal, create_breakpoint): Update.
583         (watch_command_1, catch_exec_command_1)
584         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
585         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
586         Return the breakpoint.
587         (set_raw_breakpoint_without_location, set_raw_breakpoint)
588         (new_single_step_breakpoint): Update.
589         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
590         std::unique_ptr.
591         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
592         std::unique_ptr.
593         * break-catch-sig.c (create_signal_catchpoint): Use
594         std::unique_ptr.
595         * ada-lang.c (create_ada_exception_catchpoint): Use
596         std::unique_ptr.
597
598 2017-08-22  Tom Tromey  <tom@tromey.com>
599
600         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
601
602 2017-08-22  Tom Tromey  <tom@tromey.com>
603
604         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
605         (lookup_partial_symbol): Update.
606
607 2017-08-22  Tom Tromey  <tom@tromey.com>
608
609         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
610         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
611         (find_and_open_source, symtab_to_fullname): Update.
612         * psymtab.c (psymtab_to_fullname): Update.
613
614 2017-08-22  Tom Tromey  <tom@tromey.com>
615
616         * exec.c (exec_file_attach): Update.
617         * linux-thread-db.c (try_thread_db_load): Update.
618         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
619         * utils.c (gdb_realpath): Change return type.
620         (gdb_realpath_keepfile): Update.
621         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
622         (_initialize_utils): Register the new self test.
623         * source.c (openp): Update.
624         (find_and_open_source): Update.
625         * nto-tdep.c (nto_find_and_open_solib): Update.
626         * main.c (set_gdb_data_directory): Update.
627         (captured_main_1): Update.
628         * dwarf2read.c (dwarf2_get_dwz_file): Update
629         (dw2_map_symbol_filenames): Update.
630         * auto-load.c (auto_load_safe_path_vec_update): Update.
631         (filename_is_in_auto_load_safe_path_vec): Change type of
632         "filename_realp".
633         (auto_load_objfile_script): Update.
634         (file_is_auto_load_safe): Update.  Use std::string.
635         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
636
637 2017-08-22  Tom Tromey  <tom@tromey.com>
638
639         * utils.c (gdb_realpath_keepfile): Return a
640         gdb::unique_xmalloc_ptr.
641         * exec.c (exec_file_attach): Update.
642         * utils.h (gdb_realpath_keepfile): Return a
643         gdb::unique_xmalloc_ptr.
644
645 2017-08-22  Tom Tromey  <tom@tromey.com>
646
647         * compile/compile.c (compile_file_command): Use
648         gdb::unique_xmalloc_ptr, std::string.
649         * utils.c (gdb_abspath): Change return type.
650         * source.c (openp): Update.
651         * objfiles.c (allocate_objfile): Update.
652         * main.c (set_gdb_data_directory): Update.
653         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
654
655 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
656
657         * cli-cmds.c (list_commands): List actual code around more than
658         one location.
659
660 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
661
662         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
663
664 2017-08-21  Pedro Alves  <palves@redhat.com>
665
666         PR gdb/19487
667         * c-exp.y (variable production): Handle function aliases.
668         * minsyms.c (msymbol_is_text): New function.
669         * minsyms.h (msymbol_is_text): Declare.
670         * symtab.c (find_function_alias_target): New function.
671         * symtab.h (find_function_alias_target): Declare.
672
673 2017-08-21  Pedro Alves  <palves@redhat.com>
674
675         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
676         typedefs.
677         * typeprint.c (whatis_exp): If handling "whatis", and expression
678         is OP_TYPE, strip one typedef level.  Otherwise don't strip
679         typedefs here.
680         * valops.c (value_cast): Save "to" type before resolving
681         stubs/typedefs.  Use that type as resulting value's type.
682
683 2017-08-18  Tom Tromey  <tom@tromey.com>
684             Pedro Alves  <palves@redhat.com>
685
686         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
687         * sol-thread.c (sol_thread_resume, sol_thread_wait)
688         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
689         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
690         * proc-service.c (ps_xfer_memory): Use scoped_restore.
691         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
692         (linux_get_siginfo_data): Add "thread" argument.  Use
693         scoped_restore.
694         * linux-nat.c (linux_child_follow_fork)
695         (check_stopped_by_watchpoint): Use scoped_restore.
696         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
697         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
698         (restore_inferior_ptid, save_inferior_ptid): Remove.
699         * btrace.c (btrace_fetch): Use scoped_restore.
700         * bsd-uthread.c (bsd_uthread_fetch_registers)
701         (bsd_uthread_store_registers): Use scoped_restore.
702         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
703         scoped_restore.
704         * aix-thread.c (aix_thread_resume, aix_thread_wait)
705         (aix_thread_xfer_partial): Use scoped_restore.
706         * inferior.h (save_inferior_ptid): Remove.
707
708 2017-08-18  Yao Qi  <yao.qi@linaro.org>
709
710         PR tdep/21818
711         * arm-tdep.c (gdb_print_insn_arm): Mark
712         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
713
714 2017-08-18  Yao Qi  <yao.qi@linaro.org>
715
716         * NEWS: Mention GDBserver's new option "--selftest".
717         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
718         * selftest.c: Move it to common/selftest.c.
719         * selftest.h: Move it to common/selftest.h.
720         * selftest-arch.c (reset): New function.
721         (tests_with_arch): Call reset.
722
723 2017-08-18  Yao Qi  <yao.qi@linaro.org>
724
725         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
726         instead of exception_fprintf and printf_filtered.
727
728 2017-08-18  Yao Qi  <yao.qi@linaro.org>
729
730         * selftest.c (register_self_test): Rename it to
731         selftests::register_test.
732         (run_self_tests): selftest::run_tests.
733         * selftest.h: Update declarations.
734         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
735         selftests::register_test_foreach_arch.
736         * selftest-arch.h: Update declaration.
737         * aarch64-tdep.c: Update.
738         * arm-tdep.c: Likewise.
739         * disasm-selftests.c: Likewise.
740         * dwarf2loc.c: Likewise.
741         * dwarf2-frame.c: Likewise.
742         * findvar.c: Likewise.
743         * gdbarch-selftests.c: Likewise.
744         * maint.c (maintenance_selftest): Likewise.
745         * regcache.c: Likewise.
746         * rust-exp.y: Likewise.
747         * selftest-arch.c: Likewise.
748         * unittests/environ-selftests.c: Likewise.
749         * unittests/function-view-selftests.c: Likewise.
750         * unittests/offset-type-selftests.c: Likewise.
751         * unittests/optional-selftests.c: Likewise.
752         * unittests/scoped_restore-selftests.c: Likewise.
753         * utils-selftests.c: Likewise.
754
755 2017-08-17  Pedro Alves  <palves@redhat.com>
756
757         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
758         local.
759
760 2017-08-17  Pedro Alves  <palves@redhat.com>
761
762         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
763         field.
764         (reset_die_in_process): Delete, replaced by ...
765         (process_die_scope): ... this new class.  Make it responsible for
766         freeing cu->line_header too.
767         (process_die): Use process_die_scope.
768         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
769         cu->line_header_die_owner.  Don't release the line header if it's
770         owned by the CU.
771         (setup_type_unit_groups): Make the CU/DIE own the line header.
772         Don't release the line header here.
773
774 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
775
776         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
777
778 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
779
780         * NEWS: Mention new shortcuts for nexti and stepi in TUI
781         Single-Key mode
782
783 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
784
785         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
786         mode command list.
787
788 2017-08-15  Stafford Horne  <shorne@gmail.com>
789
790         * MAINTAINERS (Write After Approval): Add Stafford Horne.
791
792 2017-08-15  Stafford Horne  <shorne@gmail.com>
793
794         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
795
796 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
797
798         PR gdb/21954
799         * infcmd.c (unset_environment_command): Use the 'clear' method on
800         the environment instead of resetting it.
801
802 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
803
804         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
805         platforms.
806
807 2017-08-14  Tom Tromey  <tom@tromey.com>
808
809         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
810         (print_binary_chars): Likewise.
811         (BITS_IN_BYTES): Remove.
812
813 2017-08-14  Tom Tromey  <tom@tromey.com>
814
815         PR gdb/21675
816         * valprint.c (LOW_ZERO): Change value to 034.
817         (print_octal_chars): Add static_asserts for octal constants.
818         * printcmd.c (print_scalar_formatted): Add 'd' case.
819
820 2017-08-11  Tom Tromey  <tom@tromey.com>
821
822         * symfile.c (add_symbol_file_command): Use std::vector.
823
824 2017-08-14  Tom Tromey  <tom@tromey.com>
825
826         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
827         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
828         std::move.
829         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
830
831 2017-08-11  Pedro Alves  <palves@redhat.com>
832
833         * infrun.c (process_event_stop_test): Adjust
834         function_name_is_marked_for_skip call.
835         * skip.c: Include <list>.
836         (skiplist_entry): Make it a class with private fields, and
837         getters/setters.
838         (skiplist_entry_chain): Delete.
839         (skiplist_entries): New.
840         (skiplist_entry_count): Delete.
841         (highest_skiplist_entry_num): New.
842         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
843         (add_skiplist_entry): Delete.
844         (skiplist_entry::skiplist_entry): New.
845         (skiplist_entry::add_entry): New.
846         (skip_file_command, skip_function): Adjust.
847         (compile_skip_regexp): Delete.
848         (skip_command): Don't compile regexp here.  Adjust to use
849         skiplist_entry::add_entry.
850         (skip_info): Adjust to use range-for and getters.
851         (skip_enable_command, skip_disable_command): Adjust to use
852         range-for and setters.
853         (skip_delete_command): Adjust to use std::list.
854         (add_skiplist_entry): Delete.
855         (skip_file_p): Delete, refactored as ...
856         (skiplist_entry::do_skip_file_p): ... this new method.
857         (skip_gfile_p): Delete, refactored as ...
858         (skiplist_entry::do_gskip_file_p): ... this new method.
859         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
860         (skiplist_entry::skip_function_p): ... this new method.
861         (function_name_is_marked_for_skip): Now returns bool, and takes
862         the function sal by const reference.  Adjust to use range-for and
863         skiplist_entry methods.
864         (_initialize_step_skip): Remove references to
865         skiplist_entry_chain, skiplist_entry_count.
866         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
867         takes the function sal by const reference.
868
869 2017-08-11  Yao Qi  <yao.qi@linaro.org>
870
871         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
872         (dwarf2_frame_cache): Remove reset_cache_cleanup.
873         (dwarf2_frame_cache):
874         * frame-unwind.c (frame_unwind_try_unwinder): Catch
875         RETURN_MASK_ALL and set *this_case to NULL.
876         * frame-unwind.h: Update comments.
877
878 2017-08-11  Yao Qi  <yao.qi@linaro.org>
879
880         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
881         (dwarf2_frame_state_copy_regs): Remove.
882         (dwarf2_frame_state_free_regs): Remove.
883         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
884         (dwarf2_restore_rule): Call method .alloc_regs instead of
885         dwarf2_frame_state_alloc_regs.
886         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
887         constructor.  Call std::move.
888         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
889         (dwarf2_frame_cache): Likewise.
890
891         [GDB_SELF_TEST]: Include selftest.h and
892         selftest-arch.h.
893         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
894         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
895         execute_cfa_program_test.
896
897         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
898         copy ctor, assignment operator, move assignment.
899         <alloc_regs>: New method.
900         <swap>: New method.
901         (struct dwarf2_frame_state): Delete dtor.
902         (dwarf2_frame_state_alloc_regs): Remove declaration.
903         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
904         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
905
906 2017-08-11  Yao Qi  <yao.qi@linaro.org>
907
908         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
909         (dwarf2_frame_state::dwarf2_frame_state): New.
910         (dwarf2_frame_state::~dwarf2_frame_state): New.
911         (dwarf2_fetch_cfa_info): Update.
912         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
913         rather than a pointer.  Update code.
914         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
915         dtor.
916         <data_align, code_align, retaddr_column>: Change them to const.
917         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
918         to bool.
919
920 2017-08-11  Yao Qi  <yao.qi@linaro.org>
921
922         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
923         <loc.exp>: New field.
924         * dwarf2-frame.c (execute_cfa_program): Update.
925         (dwarf2_frame_prev_register): Update.
926
927 2017-08-10  Pedro Alves  <palves@redhat.com>
928
929         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
930
931 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
932
933         * fbsd-nat.c (struct fbsd_fork_info): Remove.
934         (fbsd_pending_children): Use std::list.
935         (fbsd_remember_child): Likewise.
936         (fbsd_is_child_pending): Likewise.
937         (fbsd_pending_vfork_done): Use std::forward_list.
938         (fbsd_add_vfork_done): Likewise.
939         (fbsd_is_vfork_done_pending): Likewise.
940         (fbsd_next_vfork_done): Likewise.
941
942 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
943
944         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
945         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
946         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
947         for `mapfilename'.
948         (fbsd_xfer_partial): Use gdb::byte_vector.
949         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
950
951 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
952
953         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
954         "filestuff.h".
955         (fbsd_find_memory_regions): Fix `mapfile' initialization.
956
957 2017-08-09  Tom Tromey  <tom@tromey.com>
958
959         * skip.c (skiplist_entry): New constructor.
960         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
961         (skiplist_entry::file_is_glob): Now bool.
962         (skiplist_entry::file, skiplist_entry::function): Now
963         std::string.
964         (make_skip_entry): Return a unique_ptr.  Use new.
965         (free_skiplist_entry, free_skiplist_entry_cleanup)
966         (make_free_skiplist_entry_cleanup): Remove.
967         (skip_command, skip_disable_command, add_skiplist_entry)
968         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
969         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
970         (function_name_is_marked_for_skip): Update.
971         (skip_delete_command): Update.  Use delete.
972
973 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
974
975         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
976         (aarch64_linux_core_read_description): New function.
977         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
978
979 2017-08-09  Pedro Alves  <palves@redhat.com>
980
981         * cp-name-parser.y (cp_comp_to_string): Return a
982         gdb::unique_xmalloc_ptr<char>.
983         * cp-support.c (replace_typedefs_qualified_name)
984         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
985         (cp_canonicalize_string_full): Use op= instead of explicit
986         convertion.
987         (cp_class_name_from_physname, method_name_from_physname)
988         (cp_func_name, cp_remove_params): Adjust to use
989         gdb::unique_xmalloc_ptr<char>.
990         * cp-support.h (cp_comp_to_string): Return a
991         gdb::unique_xmalloc_ptr<char>.
992         * python/py-type.c (typy_lookup_type): Adjust to use
993         gdb::unique_xmalloc_ptr<char>.
994
995 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
996
997         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
998
999 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
1000             Yao Qi  <yao.qi@linaro.org>
1001
1002         * cp-support.c (cp_canonicalize_string_full): Use
1003         gdb::unique_xmalloc_ptr<char>.
1004         (cp_canonicalize_string): Likewise.
1005
1006 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1007
1008         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
1009         * regformats/i386/amd64-avx-avx512.dat: Remove.
1010         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
1011         * regformats/i386/amd64-avx-mpx.dat:Remove.
1012         * regformats/i386/amd64-avx.dat: Remove.
1013         * regformats/i386/amd64-mpx.dat: Remove.
1014         * regformats/i386/i386-avx-avx512.dat: Remove.
1015         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
1016         * regformats/i386/i386-avx-mpx.dat: Remove.
1017         * regformats/i386/i386-mmx.dat: Remove.
1018         * regformats/i386/i386-mpx.dat: Remove.
1019
1020 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1021
1022         * amd64-tdep.h (tdesc_x32): Remove the declaration.
1023         * amd64-tdep.c: Don't include features/i386/x32*.c.
1024         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
1025         functions.
1026         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
1027         and i386/x32-avx-avx512.
1028         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
1029         and i386/x32.xml.
1030         * features/i386/x32-avx-avx512.c: Removed.
1031         * features/i386/x32-avx-avx512.xml: Removed.
1032         * features/i386/x32-avx.c: Removed.
1033         * features/i386/x32-avx.xml: Removed.
1034         * features/i386/x32.c: Removed.
1035         * features/i386/x32.xml: Removed.
1036         * regformats/i386/x32-avx-avx512.dat: Removed.
1037         * regformats/i386/x32-avx.dat: Removed.
1038         * regformats/i386/x32.dat: Removed.
1039
1040 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
1041
1042         PR breakpoints/21886
1043         * mem-break.c (default_memory_insert_breakpoint): Use
1044         `->placed_address' rather than `->reqstd_address' for the
1045         breakpoint location.
1046
1047 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
1048
1049         * arch-utils.c (default_print_insn): Remove arch/mach/endian
1050         assertions.
1051
1052 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
1053
1054         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
1055         a union of `tdep_info', `tdesc_data' and `id'.
1056         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
1057         rather than `info.tdep_info'.
1058         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
1059         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
1060         * i386-tdep.c (i386_gdbarch_init): Likewise.
1061         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
1062         * mips-tdep.c (mips_gdbarch_init): Likewise.
1063         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1064         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
1065         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
1066         `info.tdep_info'.
1067         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
1068         `info.tdep_info'.
1069         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1070         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
1071         `info.tdep_info'.
1072         * spu-tdep.c (spu_gdbarch_init): Likewise.
1073         * gdbarch.h: Regenerate.
1074
1075 2017-08-07  Leszek Swirski  <leszeks@google.com>
1076
1077         PR symtab/20899
1078         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
1079
1080 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
1081
1082         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
1083         (gdbsim_open): Rename gdb_argv args object to argv.
1084
1085 2017-08-05  Tom Tromey  <tom@tromey.com>
1086
1087         * compile/compile-object-load.c (compile_object_load): Use
1088         gdb::unique_xmalloc_ptr.
1089         * cli/cli-dump.c (scan_filename): Rename from
1090         scan_filename_with_cleanup.  Change return type.
1091         (scan_expression): Rename from scan_expression_with_cleanup.
1092         Change return type.
1093         (dump_memory_to_file, dump_value_to_file, restore_command):
1094         Use gdb::unique_xmalloc_ptr.  Update.
1095         * cli/cli-cmds.c (find_and_open_script): Use
1096         gdb::unique_xmalloc_ptr.
1097         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
1098         * symmisc.c (maintenance_print_symbols)
1099         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
1100         * symfile.c (symfile_bfd_open, generic_load)
1101         (add_symbol_file_command, remove_symbol_file_command): Use
1102         gdb::unique_xmalloc_ptr.
1103         * source.c (openp): Use gdb::unique_xmalloc_ptr.
1104         * psymtab.c (maintenance_print_psymbols): Use
1105         gdb::unique_xmalloc_ptr.
1106         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
1107         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
1108         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
1109         (reload_shared_libraries_1): Likewise.
1110
1111 2017-08-05  Tom Tromey  <tom@tromey.com>
1112
1113         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
1114         (rust_op_vector, rust_set_vector): New typedefs.
1115         (current_parser): New global.
1116         (work_obstack): Change to pointer type.  Update all users.
1117         (rust_ast, pstate): Remove globals.
1118         (struct rust_parser): New.
1119         (%union) <params, field_inits>: Change type.
1120         (start, tuple_expr, unit_expr, struct_expr_list, literal)
1121         (field_expr, expr_list, maybe_expr_list, type_list): Update.
1122         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
1123         (convert_params_to_types, convert_params_to_expression): Change
1124         type of "params".
1125         (ast_string): Change type of "fields".
1126         (rust_parse): Make a rust_parser.  Remove cleanups.
1127         (rust_lex_tests): Make and install an auto_obstack.
1128
1129 2017-08-04  Yao Qi  <yao.qi@linaro.org>
1130
1131         * configure.srv (ipa_x32_linux_regobj): New.
1132         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
1133         instead of X86_TDESC_AVX512.
1134         (initialize_low_tracepoint): Call
1135         init_registers_x32_avx_avx512_linux.
1136
1137 2017-08-04  Yao Qi  <yao.qi@linaro.org>
1138
1139         * utils.h (gdb_argv): Add namespace std for nullptr_t.
1140
1141 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1142
1143         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
1144
1145 2017-08-03  Tom Tromey  <tom@tromey.com>
1146
1147         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
1148         Remove.
1149         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
1150
1151 2017-08-03  Tom Tromey  <tom@tromey.com>
1152
1153         * python/py-param.c (compute_enum_values): Use gdb_argv.
1154
1155 2017-08-03  Tom Tromey  <tom@tromey.com>
1156
1157         * utils.h (struct gdb_argv_deleter): New.
1158         (gdb_argv): New class.
1159         * utils.c (gdb_argv::reset): New method.
1160         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
1161         * tracefile.c (tsave_command): Use gdb_argv.
1162         * top.c (new_ui_command): Use gdb_argv.
1163         * symmisc.c (maintenance_print_symbols)
1164         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
1165         * symfile.c (symbol_file_command, generic_load)
1166         (remove_symbol_file_command): Use gdb_argv.
1167         * stack.c (backtrace_command): Use gdb_argv.
1168         * source.c (add_path, show_substitute_path_command)
1169         (unset_substitute_path_command, set_substitute_path_command):
1170         Use gdb_argv.
1171         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
1172         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
1173         * remote.c (extended_remote_run, remote_put_command)
1174         (remote_get_command, remote_delete_command): Use gdb_argv.
1175         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
1176         (gdbsim_open): Use gdb_argv.
1177         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
1178         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
1179         * procfs.c (procfs_info_proc): Use gdb_argv.
1180         * interps.c (interpreter_exec_cmd): Use gdb_argv.
1181         * infrun.c (handle_command): Use gdb_argv.
1182         * inferior.c (add_inferior_command, clone_inferior_command):
1183         Use gdb_argv.
1184         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
1185         * exec.c (exec_file_command): Use gdb_argv.
1186         * cli/cli-cmds.c (alias_command): Use gdb_argv.
1187         * compile/compile.c (build_argc_argv): Use gdb_argv.
1188
1189 2017-08-03  Tom Tromey  <tom@tromey.com>
1190
1191         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
1192
1193 2017-08-03  Tom Tromey  <tom@tromey.com>
1194
1195         * python/python.c (compute_python_string): Return std::string.
1196         (gdbpy_eval_from_control_command): Update.
1197         (do_start_initialization): Use std::string.
1198         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
1199         xstrprintf.
1200         * python/py-breakpoint.c (local_setattro): Use string_printf, not
1201         xstrprintf.
1202
1203 2017-08-03  Tom Tromey  <tom@tromey.com>
1204
1205         * top.h (do_restore_instream_cleanup): Remove.
1206         * top.c (do_restore_instream_cleanup): Remove.
1207         (read_command_file): Use scoped_restore.
1208         * cli/cli-script.c (execute_user_command): Use scoped_restore.
1209
1210 2017-08-03  Tom Tromey  <tom@tromey.com>
1211
1212         * cli/cli-script.c (execute_user_command)
1213         (execute_control_command): Use scoped_restore.
1214
1215 2017-08-03  Tom Tromey  <tom@tromey.com>
1216
1217         * cli/cli-script.c (do_restore_user_call_depth): Remove.
1218         (execute_user_command): Remove user_call_depth; use
1219         user_args_stack's size instead.
1220
1221 2017-08-03  Tom Tromey  <tom@tromey.com>
1222
1223         * top.h (in_user_command): Remove.
1224         * top.c (in_user_command): Remove.
1225         * cli/cli-script.c (do_restore_user_call_depth)
1226         (execute_user_command): Update.
1227
1228 2017-08-03  Tom Tromey  <tom@tromey.com>
1229
1230         * valops.c (search_struct_method): Use gdb::byte_vector.
1231         * valarith.c (value_concat): Use std::vector.
1232         * target.c (memory_xfer_partial): Use gdb::byte_vector.
1233         (simple_search_memory): Likewise.
1234         * printcmd.c (find_string_backward): Use gdb::byte_vector.
1235         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
1236         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
1237         * elfread.c (elf_rel_plt_read): Use std::string.
1238         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
1239         * cli/cli-dump.c (restore_section_callback): Use
1240         gdb::byte_vector.
1241
1242 2017-08-03  Tom Tromey  <tom@tromey.com>
1243
1244         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
1245
1246 2017-08-03  Tom Tromey  <tom@tromey.com>
1247
1248         * tui/tui-regs.c (tui_restore_gdbout): Remove.
1249         (tui_register_format): Use scoped_restore.
1250
1251 2017-08-03  Tom Tromey  <tom@tromey.com>
1252
1253         * reverse.c (exec_direction_default): Remove.
1254         (exec_reverse_once): Use scoped_restore.
1255         * remote.c (restore_remote_timeout): Remove.
1256         (remote_flash_erase, remote_flash_write, remote_flash_done)
1257         (readchar, remote_serial_write): Use scoped_restore.
1258         * cli/cli-script.c (struct source_cleanup_lines_args)
1259         (source_cleanup_lines): Remove.
1260         (script_from_file): Use scoped_restore.
1261         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
1262         (source_command): Use scoped_restore.
1263
1264 2017-08-03  Tom Tromey  <tom@tromey.com>
1265
1266         * utils.h (make_cleanup_free_so): Remove.
1267         * utils.c (do_free_so, make_cleanup_free_so): Remove.
1268         * solist.h (struct so_deleter): New.
1269         (so_list_up): New typedef.
1270         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
1271
1272 2017-08-03  Tom Tromey  <tom@tromey.com>
1273
1274         * utils.h (make_cleanup_restore_current_language): Remove.
1275         * utils.c (do_restore_current_language)
1276         (make_cleanup_restore_current_language): Remove.
1277         * parse.c (parse_exp_in_context_1)
1278         (parse_expression_with_language): Use
1279         scoped_restore_current_language.
1280         * mi/mi-main.c (mi_cmd_execute): Use
1281         scoped_restore_current_language.
1282         * language.h (scoped_restore_current_language): New class.
1283
1284 2017-08-03  Tom Tromey  <tom@tromey.com>
1285
1286         * compile/compile.c (cleanup_unlink_file): Remove.
1287         (compile_to_object): Use gdb::unlinker.
1288         (eval_compile_command): Likewise.
1289
1290 2017-08-03  Tom Tromey  <tom@tromey.com>
1291
1292         * utils.h (make_cleanup_fclose): Remove.
1293         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
1294
1295 2017-08-03  Tom Tromey  <tom@tromey.com>
1296
1297         * top.c (open_terminal_stream): Return gdb_file_up.
1298         (new_ui_command): Update.
1299
1300 2017-08-03  Tom Tromey  <tom@tromey.com>
1301
1302         * source.c (print_source_lines_base, forward_search_command)
1303         (reverse_search_command): Use gdb_file_up.
1304
1305 2017-08-03  Tom Tromey  <tom@tromey.com>
1306
1307         * fbsd-nat.c (fbsd_find_memory_regions): Update.
1308
1309 2017-08-03  Tom Tromey  <tom@tromey.com>
1310
1311         * cli/cli-cmds.c (find_and_open_script): Change return type.
1312         Remove "streamp" and "full_path" parameters.
1313         (source_script_with_search): Update.
1314         * auto-load.c (source_script_file): Update.
1315         * cli/cli-cmds.h (find_and_open_script): Change type.
1316         (open_script): New struct.
1317
1318 2017-08-03  Tom Tromey  <tom@tromey.com>
1319
1320         * xml-support.c (xml_fetch_content_from_file): Update.
1321         * ui-file.c (stdio_file::open): Update.
1322         * tracefile-tfile.c (tfile_start): Update.
1323         * remote.c (remote_file_put, remote_file_get): Update.
1324         * nat/linux-procfs.c (linux_proc_get_int)
1325         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
1326         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
1327         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
1328         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
1329         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
1330         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
1331         * linux-nat.c (linux_proc_pending_signals): Update.
1332         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
1333         (file_closer): Remove.
1334         * compile/compile.c (compile_to_object): Update.
1335         * common/filestuff.h (struct gdb_file_deleter): New.
1336         (gdb_file_up): New typedef.
1337         (gdb_fopen_cloexec): Change return type.
1338         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
1339         * cli/cli-dump.c (fopen_with_cleanup): Remove.
1340         (dump_binary_file, restore_binary_file): Update.
1341         * auto-load.c (auto_load_objfile_script_1): Update.
1342
1343 2017-08-03  Tom Tromey  <tom@tromey.com>
1344
1345         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
1346         (info_static_tracepoint_markers_command): Likewise.
1347         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
1348         * skip.c (skip_info): Use ui_out_emit_table.
1349         * progspace.c (print_program_space): Use ui_out_emit_table.
1350         * osdata.c (info_osdata): Use ui_out_emit_table.
1351         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
1352         ui_out_emit_table.
1353         * linux-thread-db.c (info_auto_load_libthread_db): Use
1354         ui_out_emit_table.
1355         * inferior.c (print_inferior): Use ui_out_emit_table.
1356         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
1357         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
1358         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
1359         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
1360         * ui-out.h (class ui_out_emit_table): New.
1361
1362 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
1363
1364         * mips-tdep.c (mips_fpu_type_str): New function.
1365         (mips_dump_tdep): Call it.
1366
1367 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
1368
1369         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
1370         `->mips_fpu_type'.
1371
1372 2017-07-31  Xavier Roirand  <roirand@adacore.com>
1373
1374         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
1375
1376 2017-07-27  Xavier Roirand  <roirand@adacore.com>
1377
1378         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
1379
1380 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1381
1382         * cli/cli-cmds.c (maintenancechecklist): New variable.
1383         * gdbcmd.h (maintenancechecklist): Declare it.
1384         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
1385         Call i386_linux_read_description with different masks.
1386         * maint.c (maintenance_check_command): New function.
1387         (_initialize_maint_cmds): Call add_prefix_cmd.
1388         * target-descriptions.c (tdesc_reg): override operator != and ==.
1389         (tdesc_type): Likewise.
1390         (tdesc_feature): Likewise.
1391         (target_desc): Likewise.
1392         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
1393         (maintenance_check_xml_descriptions): New function.
1394         (_initialize_target_descriptions) Add command "xml-descriptions".
1395         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
1396
1397 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1398
1399         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
1400         Include features/i386/32bit-*.c.
1401         (i386_linux_read_description): Generate target description if it
1402         doesn't exist.
1403         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
1404         functions.
1405         * features/i386/32bit-linux.c: Re-generated.
1406         * features/i386/32bit-sse.c: Likewise.
1407         * target-descriptions.c (print_c_feature::visit): Print code to
1408         set register number if needed.
1409         (print_c_feature) <m_next_regnum>: New field.
1410
1411 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1412
1413         * features/Makefile (CFILES): Rename with TDESC_CFILES.
1414         (FEATURE_XMLFILES): New.
1415         (FEATURE_CFILES): New.
1416         New rules.
1417         (clean-cfiles): Remove generated c files.
1418         * features/i386/32bit-avx.c: Generated.
1419         * features/i386/32bit-avx512.c: Generated.
1420         * features/i386/32bit-core.c: Generated.
1421         * features/i386/32bit-linux.c: Generated.
1422         * features/i386/32bit-mpx.c: Generated.
1423         * features/i386/32bit-pkeys.c: Generated.
1424         * features/i386/32bit-sse.c: Generated.
1425         * target-descriptions.c: Include algorithm.
1426         (tdesc_element_visitor): Add method visit_end.
1427         (print_c_tdesc): Implement visit_end.
1428         (print_c_tdesc:: m_filename_after_features): Move it to
1429         protected.
1430         (print_c_feature): New class.
1431         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
1432         name starts with "i386/32bit-".
1433
1434 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1435
1436         * target-descriptions.c (tdesc_element_visitor): New class.
1437         (tdesc_element): New class.
1438         (tdesc_reg): Inherit from tdesc_element.
1439         (tdesc_reg::accept): New function.
1440         (tdesc_type): Inherit from tdesc_element.
1441         (tdesc_type::accept): New function.
1442         (tdesc_feature): Inherit from tdesc_element.
1443         (tdesc_feature::accept): New function.
1444         (target_desc): Inherit from tdesc_element.
1445         (target_desc::target_desc): New.
1446         (target_desc::~target_desc): New.
1447         (target_desc::accept): New.
1448         (allocate_target_description): Use new.
1449         (free_target_description): Use delete.
1450         (print_c_tdesc): New class.
1451         (maint_print_c_tdesc_cmd): Adjust.
1452
1453         * features/aarch64.c: Re-generated.
1454         * features/arc-arcompact.c: Re-generated.
1455         * features/arc-v2.c: Re-generated.
1456         * features/arm/arm-with-iwmmxt.c: Re-generated.
1457         * features/arm/arm-with-m.c: Re-generated.
1458         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
1459         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
1460         * features/arm/arm-with-neon.c: Re-generated.
1461         * features/arm/arm-with-vfpv2.c: Re-generated.
1462         * features/arm/arm-with-vfpv3.c: Re-generated.
1463         * features/i386/amd64-avx-avx512.c: Re-generated.
1464         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1465         * features/i386/amd64-avx.c: Re-generated.
1466         * features/i386/amd64-avx-linux.c: Re-generated.
1467         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
1468         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1469         * features/i386/amd64-avx-mpx.c: Re-generated.
1470         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
1471         * features/i386/amd64.c: Re-generated.
1472         * features/i386/amd64-linux.c: Re-generated.
1473         * features/i386/amd64-mpx.c: Re-generated.
1474         * features/i386/amd64-mpx-linux.c: Re-generated.
1475         * features/i386/i386-avx-avx512.c: Re-generated.
1476         * features/i386/i386-avx-avx512-linux.c: Re-generated.
1477         * features/i386/i386-avx.c: Re-generated.
1478         * features/i386/i386-avx-linux.c: Re-generated.
1479         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
1480         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
1481         * features/i386/i386-avx-mpx.c: Re-generated.
1482         * features/i386/i386-avx-mpx-linux.c: Re-generated.
1483         * features/i386/i386.c: Re-generated.
1484         * features/i386/i386-linux.c: Re-generated.
1485         * features/i386/i386-mmx.c: Re-generated.
1486         * features/i386/i386-mmx-linux.c: Re-generated.
1487         * features/i386/i386-mpx.c: Re-generated.
1488         * features/i386/i386-mpx-linux.c: Re-generated.
1489         * features/i386/x32-avx-avx512.c: Re-generated.
1490         * features/i386/x32-avx-avx512-linux.c: Re-generated.
1491         * features/i386/x32-avx.c: Re-generated.
1492         * features/i386/x32-avx-linux.c: Re-generated.
1493         * features/i386/x32.c: Re-generated.
1494         * features/i386/x32-linux.c: Re-generated.
1495         * features/microblaze.c: Re-generated.
1496         * features/microblaze-with-stack-protect.c: Re-generated.
1497         * features/mips64-dsp-linux.c: Re-generated.
1498         * features/mips64-linux.c: Re-generated.
1499         * features/mips-dsp-linux.c: Re-generated.
1500         * features/mips-linux.c: Re-generated.
1501         * features/nds32.c: Re-generated.
1502         * features/nios2.c: Re-generated.
1503         * features/nios2-linux.c: Re-generated.
1504         * features/rs6000/powerpc-32.c: Re-generated.
1505         * features/rs6000/powerpc-32l.c: Re-generated.
1506         * features/rs6000/powerpc-403.c: Re-generated.
1507         * features/rs6000/powerpc-403gc.c : Re-generated.
1508         * features/rs6000/powerpc-405.c: Re-generated.
1509         * features/rs6000/powerpc-505.c: Re-generated.
1510         * features/rs6000/powerpc-601.c: Re-generated.
1511         * features/rs6000/powerpc-602.c: Re-generated.
1512         * features/rs6000/powerpc-603.c: Re-generated.
1513         * features/rs6000/powerpc-604.c: Re-generated.
1514         * features/rs6000/powerpc-64.c: Re-generated.
1515         * features/rs6000/powerpc-64l.c: Re-generated.
1516         * features/rs6000/powerpc-7400.c: Re-generated.
1517         * features/rs6000/powerpc-750.c: Re-generated.
1518         * features/rs6000/powerpc-860.c: Re-generated.
1519         * features/rs6000/powerpc-altivec32.c: Re-generated.
1520         * features/rs6000/powerpc-altivec32l.c: Re-generated.
1521         * features/rs6000/powerpc-altivec64.c: Re-generated.
1522         * features/rs6000/powerpc-altivec64l.c: Re-generated.
1523         * features/rs6000/powerpc-cell32l.c: Re-generated.
1524         * features/rs6000/powerpc-cell64l.c: Re-generated.
1525         * features/rs6000/powerpc-e500.c: Re-generated.
1526         * features/rs6000/powerpc-e500l.c: Re-generated.
1527         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
1528         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
1529         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
1530         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
1531         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
1532         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
1533         * features/rs6000/powerpc-vsx32.c: Re-generated.
1534         * features/rs6000/powerpc-vsx32l.c: Re-generated.
1535         * features/rs6000/powerpc-vsx64.c: Re-generated.
1536         * features/rs6000/powerpc-vsx64l.c: Re-generated.
1537         * features/rs6000/rs6000.c: Re-generated.
1538         * features/s390-linux32.c: Re-generated.
1539         * features/s390-linux32v1.c: Re-generated.
1540         * features/s390-linux32v2.c: Re-generated.
1541         * features/s390-linux64.c: Re-generated.
1542         * features/s390-linux64v1.c: Re-generated.
1543         * features/s390-linux64v2.c: Re-generated.
1544         * features/s390-te-linux64.c: Re-generated.
1545         * features/s390-tevx-linux64.c: Re-generated.
1546         * features/s390-vx-linux64.c: Re-generated.
1547         * features/s390x-linux64.c: Re-generated.
1548         * features/s390x-linux64v1.c: Re-generated.
1549         * features/s390x-linux64v2.c: Re-generated.
1550         * features/s390x-te-linux64.c: Re-generated.
1551         * features/s390x-tevx-linux64.c: Re-generated.
1552         * features/s390x-vx-linux64.c: Re-generated.
1553         * features/sparc/sparc32-solaris.c: Re-generated.
1554         * features/sparc/sparc64-solaris.c: Re-generated.
1555         * features/tic6x-c62x.c: Re-generated.
1556         * features/tic6x-c62x-linux.c: Re-generated.
1557         * features/tic6x-c64x.c: Re-generated.
1558         * features/tic6x-c64x-linux.c: Re-generated.
1559         * features/tic6x-c64xp.c: Re-generated.
1560         * features/tic6x-c64xp-linux.c: Re-generated.
1561
1562 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1563
1564         * i386-linux-tdep.c (i386_linux_read_description): New function.
1565         (i386_linux_core_read_description): Call
1566         i386_linux_read_description.
1567         * i386-linux-tdep.h (i386_linux_read_description): Declare.
1568         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
1569         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
1570         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
1571         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
1572         * x86-linux-nat.c (x86_linux_read_description): Call
1573         i386_linux_read_description.
1574
1575 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1576
1577         * NEWS: Mention it.
1578         * features/Makefile (%.c: %.xml): Pass the xml file name to
1579         command "maint print c-tdesc".
1580         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
1581         name from 'arg'.
1582
1583 2017-07-26  Yao Qi  <yao.qi@linaro.org>
1584
1585         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
1586         in-class initialization.
1587         (tdesc_create_feature): Call new instead of XCNEW.
1588         (free_target_description): Ue delete.
1589
1590 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
1591
1592         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
1593
1594 2017-07-25  Yao Qi  <yao.qi@linaro.org>
1595
1596         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
1597         constant.
1598         (amd64_x32_init_abi): Likewise.
1599         * amd64-tdep.h (amd64_init_abi): Update declaration.
1600         (amd64_x32_init_abi): Likewise.
1601
1602 2017-07-25  Yao Qi  <yao.qi@linaro.org>
1603
1604         PR tdep/21717
1605         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
1606         condition for FPSCR.
1607         (arm_linux_store_inferior_registers): Likewise.
1608
1609 2017-07-22  Tom Tromey  <tom@tromey.com>
1610
1611         * break-catch-syscall.c (struct catch_syscall_inferior_data)
1612         <syscalls_counts>: Now a std::vector.
1613         (get_catch_syscall_inferior_data): Use "new".
1614         (catch_syscall_inferior_data_cleanup): Use "delete".
1615         (insert_catch_syscall, remove_catch_syscall)
1616         (clear_syscall_counts): Update.
1617
1618 2017-07-22  Tom Tromey  <tom@tromey.com>
1619
1620         * break-catch-syscall.c (syscall_catchpoint)
1621         <syscalls_to_be_caught>: Now a std::vector<int>
1622         (~syscall_catchpoint): Remove.
1623         (insert_catch_syscall, remove_catch_syscall)
1624         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
1625         (print_mention_catch_syscall, print_recreate_catch_syscall):
1626         Update.
1627         (create_syscall_event_catchpoint): Change type of "filter"
1628         parameter.
1629         (catch_syscall_split_args): Return a std::vector.
1630         (catch_syscall_command_1, catching_syscall_number_1): Update.
1631
1632 2017-07-22  Tom Tromey  <tom@tromey.com>
1633
1634         * break-catch-throw.c (struct exception_catchpoint)
1635         <exception_rx>: Now a std::string.
1636         (~exception_catchpoint): Remove.
1637         (print_one_detail_exception_catchpoint): Update.
1638         (handle_gnu_v3_exceptions): Change type of except_rx.
1639         (extract_exception_regexp): Return a std::string.
1640         (catch_exception_command_1): Update.
1641
1642 2017-07-22  Tom Tromey  <tom@tromey.com>
1643
1644         * break-catch-sig.c (gdb_signal_type): Remove typedef.
1645         (struct signal_catchpoint) <signals_to_be_caught>: Now a
1646         std::vector.
1647         <catch_all>: Now a bool.
1648         (~signal_catchpoint): Remove.
1649         (signal_catchpoint_insert_location)
1650         (signal_catchpoint_remove_location)
1651         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
1652         (signal_catchpoint_print_mention)
1653         (signal_catchpoint_print_recreate)
1654         (signal_catchpoint_explains_signal): Update.
1655         (create_signal_catchpoint): Change type of "filter" and
1656         "catch_all".
1657         (catch_signal_split_args): Return a std::vector.  Change type of
1658         "catch_all".
1659         (catch_signal_command): Update.
1660
1661 2017-07-20  Pedro Alves  <palves@redhat.com>
1662
1663         * ada-lang.c (ada_language_defn): Make extern.
1664         (_initialize_ada_language): Remove add_language call.
1665         * c-lang.c (c_language_defn, cplus_language_defn)
1666         (asm_language_defn, minimal_language_defn): Make extern.
1667         (_initialize_c_language): Delete.
1668         * completer.c (compare_cstrings): Delete, moved to utils.h.
1669         * d-lang.c (d_language_defn): Make extern.
1670         (_initialize_d_language): Remove add_language calls.
1671         * defs.h (enum language): Add comment.
1672         * f-lang.c (f_language_defn): Make extern.
1673         (_initialize_f_language): Remove add_language call.
1674         * go-lang.c (go_language_defn): Make extern.
1675         (_initialize_go_language): Remove add_language call.
1676         * language.c: Include <algorithm>.
1677         (languages): Redefine as const array.
1678         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
1679         (set_language_command): Handle "local".  Use for-range loop.
1680         (set_language): Remove loop.
1681         (language_enum): Rewrite.
1682         (language_def, language_str): Remove loops.
1683         (add_language): Delete.
1684         (add_set_language_command): New, based on add_languages.
1685         (skip_language_trampoline): Adjust.
1686         (local_language_defn): Delete.
1687         (language_gdbarch_post_init): Adjust.
1688         (_initialize_language): Remove add_language calls.  Call
1689         add_set_language_command.
1690         * language.h (add_language): Delete.
1691         (auto_language_defn)
1692         (unknown_language_defn, minimal_language_defn, ada_language_defn)
1693         (asm_language_defn, c_language_defn, cplus_language_defn)
1694         (d_language_defn, f_language_defn, go_language_defn)
1695         (m2_language_defn, objc_language_defn, opencl_language_defn)
1696         (pascal_language_defn, rust_language_defn): Declare.
1697         * m2-lang.c (m2_language_defn): Make extern.
1698         (_initialize_m2_language): Remove add_language call.
1699         * objc-lang.c (objc_language_defn): Make extern.
1700         (_initialize_objc_language): Remove add_language call.
1701         * opencl-lang.c (opencl_language_defn): Make extern.
1702         (_initialize_opencl_language): Remove add_language call.
1703         * p-lang.c (pascal_language_defn): Make extern.
1704         (_initialize_pascal_language): Delete.
1705         * rust-lang.c (rust_language_defn): Make extern.
1706         (_initialize_rust_language): Delete.
1707         * utils.h (compare_cstrings): New static inline function.
1708
1709 2017-07-20  Pedro Alves  <palves@redhat.com>
1710
1711         * ada-lang.c (ada_to_fixed_type_1): Adjust.
1712         (get_var_value): Constify parameters.
1713         (get_int_var_value): Change prototype.
1714         (to_fixed_range_type): Adjust.
1715         * ada-lang.h (get_int_var_value): Change prototype.
1716
1717 2017-07-20  Pedro Alves  <palves@redhat.com>
1718
1719         * dwarf2read.c (dw2_lookup_symbol): Use
1720         SYMBOL_MATCHES_SEARCH_NAME.
1721         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
1722
1723 2017-07-20  Pedro Alves  <palves@redhat.com>
1724
1725         * block.c (block_iter_name_step, block_iter_name_first)
1726         (block_iter_name_next): Delete.
1727         (block_lookup_symbol_primary): Adjust to use
1728         dict_iter_match_first/dict_iter_match_next.
1729         * block.h (block_iter_name_first, block_iter_name_next): Delete
1730         declarations.
1731         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
1732         dict_iter_match_first/dict_iter_match_next.
1733
1734 2017-07-20  Pedro Alves  <palves@redhat.com>
1735
1736         * cp-support.c (cp_find_first_component_aux): Add missing case for
1737         end of string.
1738
1739 2017-07-18  David Blaikie  <dblaikie@gmail.com>
1740
1741         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
1742         of dwo_cu's dwo_file.
1743
1744 2017-07-18  Yao Qi  <yao.qi@linaro.org>
1745
1746         * remote.c (store_registers_using_G): Remove one line comment.
1747
1748 2017-07-18  Yao Qi  <yao.qi@linaro.org>
1749
1750         * regcache.c (regcache_cpy): Simplify it.
1751         (regcache::cpy_no_passthrough): Remove it.
1752         * regcache.h (cpy_no_passthrough): Remove it.
1753         (regcache_dup, regcache_cpy): Update comments.
1754
1755 2017-07-18  Pedro Alves  <palves@redhat.com>
1756
1757         * remote-sim.c (sim_command_completer): Adjust to work with a
1758         completion_tracker instead of a VEC.
1759
1760 2017-07-17  Pedro Alves  <palves@redhat.com>
1761
1762         * completer.c (complete_source_filenames): New function.
1763         (complete_address_and_linespec_locations): New function.
1764         (location_completer): Use complete_address_and_linespec_locations.
1765         (completion_tracker::build_completion_result): Honor the tracker's
1766         request to suppress append.
1767         * completer.h (completion_tracker::suppress_append_ws)
1768         (completion_tracker::set_suppress_append_ws): New methods.
1769         (completion_tracker::m_suppress_append_ws): New field.
1770         (complete_source_filenames): New declaration.
1771         * linespec.c (linespec_complete_what): New.
1772         (struct ls_parser) <complete_what, completion_word,
1773         completion_quote_char, completion_quote_end, completion_tracker>:
1774         New fields.
1775         (string_find_incomplete_keyword_at_end): New.
1776         (linespec_lexer_lex_string): Record quote char.  If in completion
1777         mode, don't throw.
1778         (linespec_lexer_consume_token): Advance the completion word point.
1779         (linespec_lexer_peek_token): Save/restore completion info.
1780         (save_stream_and_consume_token): New.
1781         (set_completion_after_number): New.
1782         (linespec_parse_basic): Set what to complete next depending on
1783         token.  Handle function and label completions specially.
1784         (parse_linespec): Disable objc shortcut in completion mode.  Set
1785         what to complete next depending on token type.  Skip keyword if in
1786         completion mode.
1787         (complete_linespec_component, linespec_complete): New.
1788         * linespec.h (linespec_complete): Declare.
1789
1790 2017-07-17  Pedro Alves  <palves@redhat.com>
1791
1792         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
1793         Handle 'operator<' / 'operator<<'.
1794
1795 2017-07-17  Pedro Alves  <palves@redhat.com>
1796
1797         * completer.c (collect_explicit_location_matches): Handle
1798         MATCH_LABEL.
1799         (convert_explicit_location_to_linespec): New, factored out from
1800         ...
1801         (convert_explicit_location_to_sals): ... this.
1802         (complete_label): New.
1803         (linespec_complete_label, find_label_symbols_in_block): New.
1804         (find_label_symbols): Add completion_mode parameter and adjust to
1805         call find_label_symbols_in_block.
1806         * linespec.h (linespec_complete_label): Declare.
1807
1808 2017-07-17  Pedro Alves  <palves@redhat.com>
1809
1810         * ada-lang.c (ada_collect_symbol_completion_matches): Add
1811         complete_symbol_mode parameter.
1812         * cli/cli-cmds.c (complete_command): Get the completion result out
1813         of the handle_brkchars tracker if used a custom word point.
1814         * completer.c: Include "linespec.h".
1815         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
1816         (advance_to_expression_complete_word_point): New.
1817         (completion_tracker::completes_to_completion_word): New.
1818         (complete_files_symbols): Pass down
1819         complete_symbol_mode::EXPRESSION.
1820         (explicit_options, probe_options): New.
1821         (collect_explicit_location_matches): Complete on the
1822         explictit_loc->foo instead of word.  Use
1823         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
1824         keyword and options completions.
1825         (backup_text_ptr): Delete.
1826         (skip_keyword): New.
1827         (complete_explicit_location): Remove 'word' parameter.  Add
1828         language, quoted_arg_start and quoted_arg_end parameters.
1829         Rewrite, parsing left to right.
1830         (location_completer): Rewrite.
1831         (location_completer_handle_brkchars): New function.
1832         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
1833         (enum complete_line_internal_reason): Adjust comments.
1834         (completion_tracker::discard_completions): New.
1835         (completer_handle_brkchars_func_for_completer): Handle
1836         location_completer.
1837         (gdb_custom_word_point_brkchars)
1838         (gdb_org_rl_basic_quote_characters): New.
1839         (gdb_completion_word_break_characters_throw)
1840         (completion_find_completion_word): Handle trackers that use a
1841         custom word point.
1842         (completion_tracker::advance_custom_word_point_by): New.
1843         (completion_tracker::build_completion_result): Don't rely on
1844         readline appending the quote char.
1845         (gdb_rl_attempted_completion_function_throw): Handle trackers that
1846         use a custom word point.
1847         (gdb_rl_attempted_completion_function): Restore
1848         rl_basic_quote_characters.
1849         * completer.h (class completion_tracker): Extend intro comment.
1850         (completion_tracker::set_quote_char)
1851         (completion_tracker::quote_char)
1852         (completion_tracker::set_use_custom_word_point)
1853         (completion_tracker::use_custom_word_point)
1854         (completion_tracker::custom_word_point)
1855         (completion_tracker::set_custom_word_point)
1856         (completion_tracker::advance_custom_word_point_by)
1857         (completion_tracker::completes_to_completion_word)
1858         (completion_tracker::discard_completions): New methods.
1859         (completion_tracker::m_quote_char)
1860         (completion_tracker::m_use_custom_word_point)
1861         (completion_tracker::m_custom_word_point): New fields.
1862         (advance_to_expression_complete_word_point): Declare.
1863         * f-lang.c (f_collect_symbol_completion_matches): Add
1864         complete_symbol_mode parameter.
1865         * language.h (struct language_defn)
1866         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
1867         parameter.
1868         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
1869         (linespec_complete_function): New function.
1870         (linespec_lexer_lex_keyword): Adjust.
1871         * linespec.h (linespec_keywords, linespec_complete_function): New
1872         declarations.
1873         * location.c (find_end_quote): New function.
1874         (explicit_location_lex_one): Add explicit_completion_info
1875         parameter.  Save quoting info.  Don't throw if being called for
1876         completion.  Don't handle Ada operators here.
1877         (is_cp_operator, skip_op_false_positives, first_of)
1878         (explicit_location_lex_one_function): New function.
1879         (string_to_explicit_location): Replace 'dont_throw' parameter with
1880         an explicit_completion_info pointer parameter.  Handle it.  Don't
1881         use explicit_location_lex_one to lex function names.  Use
1882         explicit_location_lex_one_function instead.
1883         * location.h (struct explicit_completion_info): New.
1884         (string_to_explicit_location): Replace 'dont_throw' parameter with
1885         an explicit_completion_info pointer parameter.
1886         * symtab.c (default_collect_symbol_completion_matches_break_on):
1887         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
1888         (default_collect_symbol_completion_matches)
1889         (collect_symbol_completion_matches): Add complete_symbol_mode
1890         parameter.
1891         (collect_symbol_completion_matches_type): Pass down
1892         complete_symbol_mode::EXPRESSION.
1893         (collect_file_symbol_completion_matches): Add complete_symbol_mode
1894         parameter.  Handle LINESPEC mode.
1895         * symtab.h (complete_symbol_mode): New.
1896         (default_collect_symbol_completion_matches_break_on)
1897         (default_collect_symbol_completion_matches)
1898         (collect_symbol_completion_matches)
1899         (collect_file_symbol_completion_matches): Add complete_symbol_mode
1900         parameter.
1901
1902 2017-07-17  Pedro Alves  <palves@redhat.com>
1903
1904         * utils.c (enum class strncmp_iw_mode): New.
1905         (strcmp_iw): Rename to ...
1906         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
1907         parameters.  Handle them.
1908         (strncmp_iw): New.
1909         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
1910         * utils.h (strncmp_iw): Declare.
1911         (strcmp_iw): Move describing comments here.
1912
1913 2017-07-17  Pedro Alves  <palves@redhat.com>
1914
1915         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
1916         CP_OPERATOR_STR.
1917         * c-typeprint.c (is_type_conversion_operator): Use
1918         CP_OPERATOR_STR.
1919         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
1920         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
1921         CP_OPERATOR_LEN.
1922         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
1923         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
1924         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
1925         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
1926         CP_OPERATOR_STR.
1927         * location.c: Include "cp-support.h".
1928         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
1929         CP_OPERATOR_STR.
1930         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
1931         CP_OPERATOR_LEN.
1932
1933 2017-07-17  Pedro Alves  <palves@redhat.com>
1934
1935         * cli/cli-cmds.c (complete_command): Use a completion tracker
1936         along with completion_find_completion_word for handle_brkchars
1937         phase.
1938         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
1939         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
1940         (struct gdb_rl_completion_word_info): New.
1941         (gdb_rl_find_completion_word): New.
1942         (completion_find_completion_word): New.
1943         * completer.h (completion_find_completion_word): Declare.
1944
1945 2017-07-17  Pedro Alves  <palves@redhat.com>
1946
1947         * ada-lang.c (symbol_completion_match): Adjust comments.
1948         (symbol_completion_add): Replace vector parameter with
1949         completion_tracker parameter.  Use it.
1950         (ada_make_symbol_completion_list): Rename to...
1951         (ada_collect_symbol_completion_matches): ... this.  Add
1952         completion_tracker parameter and use it.
1953         (ada_language_defn): Adjust.
1954         * break-catch-syscall.c (catch_syscall_completer): Adjust
1955         prototype and work with completion_tracker instead of VEC.
1956         * breakpoint.c (condition_completer): Adjust prototype and work
1957         with completion_tracker instead of VEC.
1958         * c-lang.c (c_language_defn, cplus_language_defn)
1959         (asm_language_defn, minimal_language_defn): Adjust to renames.
1960         * cli/cli-cmds.c (complete_command): Rework using
1961         completion_tracker.  Catch exceptions when completing.
1962         * cli/cli-decode.c (integer_unlimited_completer)
1963         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
1964         with completion_tracker instead of VEC.
1965         * command.h (struct completion_tracker): Forward declare.
1966         (completer_ftype, completer_handle_brkchars_ftype): Change
1967         types.
1968         (complete_on_cmdlist, complete_on_enum): Adjust.
1969         * completer.c: Include <algorithm>.
1970         (struct gdb_completer_state): New.
1971         (current_completion): New global.
1972         (readline_line_completion_function): Delete.
1973         (noop_completer, filename_completer)
1974         (filename_completer_handle_brkchars, complete_files_symbols)
1975         (linespec_location_completer): Adjust to work with a
1976         completion_tracker instead of a VEC.
1977         (string_or_empty): New.
1978         (collect_explicit_location_matches): Adjust to work with a
1979         completion_tracker instead of a VEC.
1980         (explicit_location_completer): Rename to ...
1981         (complete_explicit_location): ... this and adjust to work with a
1982         completion_tracker instead of a VEC.
1983         (location_completer): Adjust to work with a completion_tracker
1984         instead of a VEC.
1985         (add_struct_fields): Adjust to work with a completion_list instead
1986         of VEC.
1987         (expression_completer): Rename to ...
1988         (complete_expression): ... this and adjust to work with a
1989         completion_tracker instead of a VEC.  Use complete_files_symbols.
1990         (expression_completer): Reimplement on top of complete_expression.
1991         (symbol_completer): Adjust to work with a completion_tracker
1992         instead of a VEC.
1993         (enum complete_line_internal_reason): Add describing comments.
1994         (complete_line_internal_normal_command): Adjust to work with a
1995         completion_tracker instead of a VEC.
1996         (complete_line_internal): Rename to ...
1997         (complete_line_internal_1): ... this and adjust to work with a
1998         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
1999         handle_brkchars phase.
2000         (new_completion_tracker): Delete.
2001         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
2002         complete_line_internal_1.
2003         (free_completion_tracker): Delete.
2004         (INITIAL_COMPLETION_HTAB_SIZE): New.
2005         (completion_tracker::completion_tracker)
2006         (completion_tracker::~completion_tracker): New.
2007         (maybe_add_completion): Delete.
2008         (completion_tracker::maybe_add_completion)
2009         (completion_tracker::add_completion)
2010         (completion_tracker::add_completions): New.
2011         (throw_max_completions_reached_error): Delete.
2012         (complete_line): Adjust to work with a completion_tracker instead
2013         of a VEC.  Don't create a completion_tracker_t or check for max
2014         completions here.
2015         (command_completer, command_completer_handle_brkchars)
2016         (signal_completer, reg_or_group_completer_1)
2017         (reg_or_group_completer, default_completer_handle_brkchars):
2018         Adjust to work with a completion_tracker.
2019         (gdb_completion_word_break_characters_throw): New.
2020         (gdb_completion_word_break_characters): Reimplement.
2021         (line_completion_function): Delete.
2022         (completion_tracker::recompute_lowest_common_denominator)
2023         (expand_preserving_ws)
2024         (completion_tracker::build_completion_result)
2025         (completion_result::completion_result)
2026         (completion_result::completion_result)
2027         (completion_result::~completion_result)
2028         (completion_result::completion_result)
2029         (completion_result::release_match_list, compare_cstrings)
2030         (completion_result::sort_match_list)
2031         (completion_result::reset_match_list)
2032         (gdb_rl_attempted_completion_function_throw)
2033         (gdb_rl_attempted_completion_function): New.
2034         * completer.h (completion_list, struct completion_result)
2035         (class completion_tracker): New.
2036         (complete_line): Add completion_tracker parameter.
2037         (readline_line_completion_function): Delete.
2038         (gdb_rl_attempted_completion_function): New.
2039         (noop_completer, filename_completer, expression_completer)
2040         (location_completer, symbol_completer, command_completer)
2041         (signal_completer, reg_or_group_completer): Update prototypes.
2042         (completion_tracker_t, new_completion_tracker)
2043         (make_cleanup_free_completion_tracker): Delete.
2044         (enum maybe_add_completion_enum): Delete.
2045         (maybe_add_completion): Delete.
2046         (throw_max_completions_reached_error): Delete.
2047         * corefile.c (complete_set_gnutarget): Adjust to work with a
2048         completion_tracker instead of a VEC.
2049         * cp-abi.c (cp_abi_completer): Adjust to work with a
2050         completion_tracker instead of a VEC.
2051         * d-lang.c (d_language_defn): Adjust.
2052         * disasm.c (disassembler_options_completer): Adjust to work with a
2053         completion_tracker instead of a VEC.
2054         * f-lang.c (f_make_symbol_completion_list): Rename to ...
2055         (f_collect_symbol_completion_matches): ... this.  Adjust to work
2056         with a completion_tracker instead of a VEC.
2057         (f_language_defn): Adjust.
2058         * go-lang.c (go_language_defn): Adjust.
2059         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
2060         Adjust to work with a completion_tracker instead of a VEC.
2061         * infrun.c (handle_completer): Likewise.
2062         * interps.c (interpreter_completer): Likewise.
2063         * interps.h (interpreter_completer): Likewise.
2064         * language.c (unknown_language_defn, auto_language_defn)
2065         (local_language_defn): Adjust.
2066         * language.h (language_defn::la_make_symbol_completion_list):
2067         Rename to ...
2068         (language_defn::la_collect_symbol_completion_matches): ... this
2069         and adjust to work with a completion_tracker instead of a VEC.
2070         * m2-lang.c (m2_language_defn): Adjust.
2071         * objc-lang.c (objc_language_defn): Adjust.
2072         * opencl-lang.c (opencl_language_defn): Adjust.
2073         * p-lang.c (pascal_language_defn): Adjust.
2074         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
2075         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
2076         with a completion_tracker.
2077         * rust-lang.c (rust_language_defn): Adjust.
2078         * symtab.c (free_completion_list, do_free_completion_list)
2079         (return_val, completion_tracker): Delete.
2080         (completion_list_add_name, completion_list_add_symbol)
2081         (completion_list_add_msymbol, completion_list_objc_symbol)
2082         (completion_list_add_fields, add_symtab_completions): Add
2083         completion_tracker parameter and use it.
2084         (default_make_symbol_completion_list_break_on_1): Rename to...
2085         (default_collect_symbol_completion_matches_break_on): ... this.
2086         Add completion_tracker parameter and use it instead of allocating
2087         a completion tracker here.
2088         (default_make_symbol_completion_list_break_on): Delete old
2089         implementation.
2090         (default_make_symbol_completion_list): Delete.
2091         (default_collect_symbol_completion_matches): New.
2092         (make_symbol_completion_list): Delete.
2093         (collect_symbol_completion_matches): New.
2094         (make_symbol_completion_type): Rename to ...
2095         (collect_symbol_completion_matches_type): ... this.  Add
2096         completion_tracker parameter and use it instead of VEC.
2097         (make_file_symbol_completion_list_1): Rename to...
2098         (collect_file_symbol_completion_matches): ... this.  Add
2099         completion_tracker parameter and use it instead of VEC.
2100         (make_file_symbol_completion_list): Delete.
2101         (add_filename_to_list): Use completion_list instead of a VEC.
2102         (add_partial_filename_data::list): Now a completion_list.
2103         (make_source_files_completion_list): Work with a completion_list
2104         instead of a VEC.
2105         * symtab.h: Include "completer.h".
2106         (default_make_symbol_completion_list_break_on)
2107         (default_make_symbol_completion_list, make_symbol_completion_list)
2108         (make_symbol_completion_type, make_file_symbol_completion_list)
2109         (make_source_files_completion_list): Delete.
2110         (default_collect_symbol_completion_matches_break_on)
2111         (default_collect_symbol_completion_matches)
2112         (collect_symbol_completion_matches)
2113         (collect_symbol_completion_matches_type)
2114         (collect_file_symbol_completion_matches)
2115         (make_source_files_completion_list): New.
2116         * top.c (init_main): Don't install a rl_completion_entry_function
2117         hook.  Install a rl_attempted_completion_function hook instead.
2118         * tui/tui-layout.c (layout_completer): Adjust to work with a
2119         completion_tracker.
2120         * tui/tui-regs.c (tui_reggroup_completer):
2121         * tui/tui-win.c (window_name_completer, focus_completer)
2122         (winheight_completer): Adjust to work with a completion_tracker.
2123         * value.c: Include "completer.h".
2124         (complete_internalvar): Adjust to work with a completion_tracker.
2125         * value.h (complete_internalvar): Likewise.
2126
2127 2017-07-17  Pedro Alves  <palves@redhat.com>
2128
2129         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
2130         renames.
2131         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
2132         comments to completer_ftype's declaration.
2133         <completer_handle_brkchars>: Change type to
2134         completer_handle_brkchars_ftype.
2135         * command.h (completer_ftype): Add describing comment and give
2136         names to parameters.
2137         (completer_ftype_void): Rename to ...
2138         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
2139         (set_cmd_completer_handle_brkchars): Adjust.
2140         * completer.c (filename_completer_handle_brkchars): New function.
2141         (complete_line_internal_normal_command): New function, factored
2142         out from ...
2143         (complete_line_internal): ... here.
2144         (command_completer_handle_brkchars)
2145         (default_completer_handle_brkchars)
2146         (completer_handle_brkchars_func_for_completer): New functions.
2147         * completer.h (set_gdb_completion_word_break_characters): Delete
2148         declaration.
2149         (completer_handle_brkchars_func_for_completer): New declaration.
2150         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
2151         completer_handle_brkchars_func_for_completer.
2152
2153 2017-07-17  Pedro Alves  <palves@redhat.com>
2154
2155         * completer.c (symbol_completer): New function, based on
2156         make_symbol_completion_list_fn.
2157         * completer.h (symbol_completer): New declaration.
2158         * guile/scm-cmd.c (cmdscm_completers): Adjust.
2159         * python/py-cmd.c (completers): Adjust.
2160         * symtab.c (make_symbol_completion_list_fn): Delete.
2161         * symtab.h (make_symbol_completion_list_fn): Delete.
2162         * cli/cli-decode.c (add_cmd): Adjust.
2163
2164 2017-07-17  Pedro Alves  <palves@redhat.com>
2165
2166         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
2167         * dwarf2read.c: Include "filename-seen-cache.h".
2168         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
2169         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
2170         * filename-seen-cache.c: New file.
2171         * filename-seen-cache.h: New file.
2172         * symtab.c: Include "filename-seen-cache.h".
2173         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
2174         (create_filename_seen_cache, clear_filename_seen_cache)
2175         (delete_filename_seen_cache, filename_seen): Delete, parts moved
2176         to filename-seen-cache.h/filename-seen-cache.c.
2177         (output_source_filename, sources_info)
2178         (maybe_add_partial_symtab_filename)
2179         (make_source_files_completion_list): Adjust to use
2180         filename_seen_cache.
2181
2182 2017-07-17  Pedro Alves  <palves@redhat.com>
2183
2184         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
2185         fields.
2186         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
2187         dwarf2_debug_sections*)): New.
2188         (dwarf2_per_objfile::dwarf2_per_objfile(const
2189         dwarf2_per_objfile&)): Declare as deleted.
2190         (dwarf2_per_objfile::operator=): Declare as deleted.
2191         (dwarf2_per_objfile::dwarf2_per_objfile)
2192         (dwarf2_per_objfile::~dwarf2_per_objfile)
2193         (dwarf2_per_objfile::free_cached_comp_units): New.
2194         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
2195         ctor.  Call dwarf2_per_objfile's ctor manually.
2196         (dwarf2_locate_sections): Deleted/refactored as ...
2197         (dwarf2_per_objfile::locate_sections): ... this new method.
2198         (free_cached_comp_units): Defer to
2199         dwarf2_per_objfile::free_cached_comp_units.
2200         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
2201
2202 2017-07-14  Tom Tromey  <tom@tromey.com>
2203
2204         PR rust/21764:
2205         * rust-exp.y (convert_ast_to_expression): Add "want_type"
2206         parameter.
2207         <UNOP_SIZEOF>: Split into separate case.
2208         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
2209
2210 2017-07-14  Tom Tromey  <tom@tromey.com>
2211
2212         PR rust/21763:
2213         * symtab.c (symbol_matches_domain): Add language_rust to special
2214         case.
2215         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
2216         treat LOC_TYPEDEF symbols as variables.
2217
2218 2017-07-14  Pedro Alves  <palves@redhat.com>
2219
2220         * symtab.c (make_file_symbol_completion_list_1): Iterate over
2221         symtabs matching all symtabs with SRCFILE as file name instead of
2222         only considering the first hit, with lookup_symtab.
2223
2224 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2225
2226         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
2227         operator_name parameters.
2228         (gen_expr): Update function call.
2229
2230 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2231
2232         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
2233         parameter.
2234         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
2235         Likewise.
2236         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
2237         parameter, use agent_expr::gdbarch instead, update function
2238         calls.
2239         (locexpr_tracepoint_var_ref): Likewise.
2240         (loclist_tracepoint_var_ref): Likewise.
2241         * ax-gdb.c (gen_trace_static_fields): Likewise.
2242         (gen_traced_pop): Likewise.
2243         (gen_frame_args_address): Likewise.
2244         (gen_frame_locals_address): Likewise.
2245         (gen_var_ref): Likewise.
2246         (gen_struct_ref_recursive): Likewise.
2247         (gen_static_field): Likewise.
2248         (gen_maybe_namespace_elt): Likewise.
2249         (gen_expr): Likewise.
2250         (gen_trace_for_var): Likewise.
2251         (gen_trace_for_expr): Likewise.
2252         (gen_trace_for_return_address): Likewise.
2253
2254 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2255
2256         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
2257         parameter.
2258         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
2259
2260 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
2261
2262         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
2263         from ax, update calls.
2264         (gen_usual_arithmetic): Likewise.
2265         (gen_integral_promotions): Likewise.
2266         (gen_bitfield_ref): Likewise.
2267         (gen_primitive_field): Likewise.
2268         (gen_struct_ref_recursive): Likewise.
2269         (gen_struct_ref): Likewise.
2270         (gen_maybe_namespace_elt): Likewise.
2271         (gen_struct_elt_for_reference): Likewise.
2272         (gen_namespace_elt): Likewise.
2273         (gen_aggregate_elt_ref): Likewise.
2274         (gen_expr): Get gdbarch from ax, update calls.
2275         (gen_expr_binop_rest): Likewise.
2276
2277 2017-07-13  Pedro Alves  <palves@redhat.com>
2278
2279         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
2280         as default tdesc.
2281         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
2282         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
2283         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
2284         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
2285         tdep.
2286         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
2287         Get final tdesc from the tdep.
2288         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
2289         default tdesc.
2290         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2291         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2292         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
2293         Use it as default tdesc.
2294         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
2295         down to amd_init_abi.  No longer handle fallback tdesc here.
2296         * amd64-tdep.h (tdesc_x32): Declare.
2297         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
2298         parameter.
2299         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
2300         as default tdesc.
2301
2302 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2303
2304         * s390-linux-tdep.c (s390_process_record): Add support for
2305         instructions new in arch12.
2306
2307 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
2308
2309         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
2310         PT_GETFSBASE and PT_GETGSBASE.
2311         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
2312         PT_SETGSBASE.
2313
2314 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
2315
2316         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
2317         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
2318         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
2319         those rules.
2320         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
2321         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
2322         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
2323         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
2324         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
2325         * features/i386/amd64.xml: Add 64bit-segments.xml.
2326         * features/i386/amd64-avx-avx512.c: Regenerated.
2327         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
2328         * features/i386/amd64-avx-mpx.c: Regenerated.
2329         * features/i386/amd64-avx.c: Regenerated.
2330         * features/i386/amd64-mpx.c: Regenerated.
2331         * features/i386/amd64.c: Regenerated.
2332         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
2333         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2334         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
2335         * regformats/i386/amd64-avx.dat: Regenerated.
2336         * regformats/i386/amd64-mpx.dat: Regenerated.
2337         * regformats/i386/amd64.dat: Regenerated.
2338
2339 2017-07-10  Yao Qi  <yao.qi@linaro.org>
2340
2341         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2342         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2343
2344 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2345
2346         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
2347         unsetenv.
2348         * gnulib/aclocal.m4: Regenerate.
2349         * gnulib/config.in: Regenerate.
2350         * gnulib/configure: Regenerate.
2351         * gnulib/import/Makefile.am: Regenerate.
2352         * gnulib/import/Makefile.in: Regenerate.
2353         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2354         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2355         * gnulib/import/m4/environ.m4: New file.
2356         * gnulib/import/m4/setenv.m4: New file.
2357         * gnulib/import/setenv.c: New file.
2358         * gnulib/import/unsetenv.c: New file.
2359
2360 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
2361
2362         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
2363         address when op is DW_OP_addr.
2364
2365 2017-07-09  Tom Tromey  <tom@tromey.com>
2366
2367         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
2368         check and apply to outer type.
2369
2370 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2371
2372         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
2373         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
2374         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
2375         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
2376
2377 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2378
2379         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
2380
2381 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2382
2383         * corelow.c (get_core_siginfo): Remove.
2384         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
2385         instead of get_core_siginfo.
2386         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
2387         * gdbarch.h: Re-generate.
2388         * gdbarch.c: Re-generate.
2389         * linux-tdep.c (linux_core_xfer_siginfo): New.
2390         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
2391
2392 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2393
2394         * corelow.c (thread_section_name): Move to ...
2395         * gdbcore.h (thread_section_name): ... here.
2396
2397 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2398
2399         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
2400         (struct siginfo32): New.
2401         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
2402         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
2403         via ptrace(PT_LWPINFO).
2404
2405 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
2406
2407         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
2408         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
2409         (fbsd_get_siginfo_type): New.
2410         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
2411         (_initialize_fbsd_tdep): New.
2412
2413 2017-07-06  David Blaikie  <dblaikie@gmail.com>
2414
2415         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
2416         a singular dwo_unit*) to support multiple CUs in the same way that
2417         multiple TUs are supported.
2418         (create_cus_hash_table): Replace create_dwo_cu with a function for
2419         parsing multiple CUs from a DWO file.
2420         (open_and_init_dwo_file): Use create_cus_hash_table rather than
2421         create_dwo_cu.
2422         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
2423         htab_find, rather than comparing the signature to a singleton CU in
2424         the dwo_file.
2425
2426 2017-07-06  Pedro Alves  <palves@redhat.com>
2427
2428         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
2429
2430 2017-07-04  Pedro Alves  <palves@redhat.com>
2431
2432         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
2433         * gdbtypes.h (TYPE_STATIC): Delete.
2434         (struct fn_field) <is_public, is_abstract, is_static, is_final,
2435         is_synchronized, is_native>: Delete.
2436         <dummy>: Bump.
2437         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
2438         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
2439         (TYPE_FN_FIELD_ABSTRACT): Delete.
2440
2441 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
2442
2443         * buffer.h (buffer_finish): Fix spelling mistakes.
2444
2445 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
2446
2447         * .dir-locals.el: Automatically switch to C-style comments in
2448         versions of Emacs that support the feature.
2449
2450 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
2451             Pedro Alves  <palves@redhat.com>
2452
2453         PR cli/21688
2454         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
2455         (process_next_line): New variable 'inline_cmd'.
2456         Adjust 'if' clauses for "python", "compile" and "guile" to use
2457         'command_name_equals' and check for '!inline_cmd'.
2458
2459 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
2460
2461         PR cli/21688
2462         * cli/cli-script.c (command_name_equals_not_inline): New function.
2463         (process_next_line): Adjust 'if' clauses for "python", "compile"
2464         and "guile" to use command_name_equals_not_inline.
2465
2466 2017-06-29  Pedro Alves  <palves@redhat.com>
2467
2468         * completer.c (expression_completer): Call
2469         linespec_location_completer instead of location_completer.
2470
2471 2017-06-29  Pedro Alves  <palves@redhat.com>
2472
2473         * completer.c (expression_completer): Remove code that recomputes
2474         'text' from 'word'.
2475
2476 2017-06-29  Yao Qi  <yao.qi@linaro.org>
2477
2478         * regformats/regdat.sh: Generate code with
2479         "ifndef IN_PROCESS_AGENT".
2480
2481 2017-06-28  Pedro Alves  <palves@redhat.com>
2482
2483         * command.h: Include "common/scoped_restore.h".
2484
2485 2017-06-28  Yao Qi  <yao.qi@linaro.org>
2486
2487         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
2488         instead of obstack_grow.
2489
2490 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
2491
2492         PR gdb/21337
2493         * symfile.c (reread_symbols): Call objfiles_changed just before
2494         read_symbols.
2495
2496 2017-06-27  Pedro Alves  <palves@redhat.com>
2497
2498         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
2499         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
2500         (completion_list_add_symbol, completion_list_add_msymbol):
2501         ... these new functions.
2502         (add_symtab_completions)
2503         (default_make_symbol_completion_list_break_on_1): Adjust.
2504
2505 2017-06-27  Pedro Alves  <palves@redhat.com>
2506
2507         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
2508         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
2509         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
2510         dtor.
2511         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
2512         'storage_obstack' field an auto_obstack.  In-class initialize all
2513         non-bitfield fields.  Make minsyms_read bool.
2514         * symfile.c (read_symbols): Adjust.
2515
2516 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
2517
2518         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
2519         (gdbsim_store_register): Likewise.
2520
2521 2017-06-27  Pedro Alves  <palves@redhat.com>
2522
2523         * c-exp.y (name_obstack): Now an auto_obstack.
2524         (yylex): Use auto_obstack::clear.
2525         (c_parse): Use auto_obstack::clear instead of reinitializing and
2526         freeing the obstack.
2527         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
2528         * d-exp.y (name_obstack): Now an auto_obstack.
2529         (yylex): Use auto_obstack::clear.
2530         (d_parse): Use auto_obstack::clear instead of reinitializing and
2531         freeing the obstack.
2532         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
2533         auto_obstack.
2534         * dwarf2read.c (create_addrmap_from_index)
2535         (dwarf2_build_psymtabs_hard)
2536         (update_enumeration_type_from_children): Likewise.
2537         * gdb_obstack.h (auto_obstack): New type.
2538         * go-exp.y (name_obstack): Now an auto_obstack.
2539         (build_packaged_name): Use auto_obstack::clear.
2540         (go_parse): Use auto_obstack::clear instead of reinitializing and
2541         freeing the obstack.
2542         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
2543         auto_obstack.
2544         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
2545         * rust-exp.y (work_obstack): Now an auto_obstack.
2546         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
2547         reinitializing and freeing the obstack.
2548         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
2549         (host_char_to_target): Use auto_obstack.
2550         * utils.h (make_cleanup_obstack_free): Delete declaration.
2551         * valprint.c (generic_emit_char, generic_printstr): Use
2552         auto_obstack.
2553
2554 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
2555
2556         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
2557         thread.
2558         (darwin_init_thread_list): Don't update dummy thread.
2559         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
2560
2561 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2562
2563         * record-full.c (netorder16): Remove.
2564
2565 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2566
2567         * common/diagnostics.h: Define macros for GCC.
2568         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
2569         * common/vec.h: Include diagnostics.h.
2570         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
2571         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
2572         warning.
2573
2574 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
2575
2576         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
2577         New macro.
2578         * ada-lex.l: Ignore deprecated register warnings.
2579
2580 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2581
2582         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
2583         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
2584
2585 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2586
2587         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
2588         its own line.
2589
2590 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
2591
2592         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
2593
2594 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
2595
2596         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
2597         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
2598         (xtensa_register_read_masked): Likewise.
2599
2600 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2601
2602         * common/environ.c (gdb_environ::unset): Update comment.
2603
2604 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2605
2606         * python/py-unwind.c (pyuw_sniffer): Allocate space for
2607         registers.
2608
2609 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2610
2611         * record-full.c (record_full_exec_insn): Use byte_vector.
2612
2613 2017-06-22  Yao Qi  <yao.qi@linaro.org>
2614
2615         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
2616         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
2617
2618 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
2619
2620         * remote.c (cached_reg): Move from here...
2621         * regcache.h (cached_reg): ...to here.
2622         * python/py-unwind.c (struct reg_info): Remove.
2623         (cached_frame_info): Use cached_reg_t.
2624         (pyuw_prev_register): Likewise.
2625         (pyuw_sniffer): Use cached_reg_t and allocate registers.
2626         (pyuw_dealloc_cache): Free all registers.
2627
2628 2017-06-22  Pedro Alves  <palves@redhat.com>
2629             Simon Marchi  <simon.marchi@ericsson.com>
2630
2631         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
2632         warning.
2633         * common/diagnostics.h: New file.
2634
2635 2017-06-22  Pedro Alves  <palves@redhat.com>
2636
2637         * common/agent.h: Add include guards.
2638
2639 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
2640
2641         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
2642         talk about addressable units instead of bytes.
2643
2644 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2645
2646         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
2647         of '::const_iterator'.
2648
2649 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2650
2651         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2652         'unittests/environ-selftests.c'.
2653         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
2654         * charset.c (find_charset_names): Declare object 'iconv_env'.
2655         Update code to use 'iconv_env' object.  Remove call to
2656         'free_environ'.
2657         * common/environ.c: Include <utility>.
2658         (make_environ): Delete function.
2659         (free_environ): Delete function.
2660         (gdb_environ::clear): New function.
2661         (gdb_environ::operator=): New function.
2662         (gdb_environ::get): Likewise.
2663         (environ_vector): Delete function.
2664         (set_in_environ): Delete function.
2665         (gdb_environ::set): New function.
2666         (unset_in_environ): Delete function.
2667         (gdb_environ::unset): New function.
2668         (gdb_environ::envp): Likewise.
2669         * common/environ.h: Include <vector>.
2670         (struct gdb_environ): Delete; transform into...
2671         (class gdb_environ): ... this class.
2672         (free_environ): Delete prototype.
2673         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
2674         environ_vector): Likewise.
2675         * infcmd.c (run_command_1): Update code to call
2676         'envp' from 'gdb_environ' class.
2677         (environment_info): Update code to call methods from 'gdb_environ'
2678         class.
2679         (unset_environment_command): Likewise.
2680         (path_info): Likewise.
2681         (path_command): Likewise.
2682         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
2683         (inferior::inferior): Initialize 'environment' using the host's
2684         information.
2685         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
2686         Include "environ.h".
2687         (class inferior) <environment>: Change type from 'struct
2688         gdb_environ' to 'gdb_environ'.
2689         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
2690         methods from 'gdb_environ' class.
2691         * solib.c (solib_find_1): Likewise
2692         * unittests/environ-selftests.c: New file.
2693
2694 2017-06-20  Yao Qi  <yao.qi@linaro.org>
2695
2696         * features/i386/i386-linux.xml: Exchange the order of including
2697         32bit-linux.xml and 32bit-sse.xml.
2698         * features/i386/i386-linux.c: Regenerated.
2699
2700 2017-06-20  Yao Qi  <yao.qi@linaro.org>
2701
2702         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
2703         Delete copy ctor and assignment operator.
2704         (tdesc_type): Likewise.
2705         (tdesc_feature): Likewise.
2706         (tdesc_free_reg): Remove.
2707         (tdesc_create_reg): Use new.
2708         (tdesc_free_type): Remove.
2709         (tdesc_create_vector): Use new.
2710         (tdesc_create_union): Likewise.
2711         (tdesc_create_flags): Likewise.
2712         (tdesc_create_enum): Likewise.
2713         (tdesc_free_feature): Delete.
2714         (free_target_description): Use delete.
2715
2716 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
2717
2718         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
2719         registers.
2720
2721 2017-06-19  Pedro Alves  <palves@redhat.com>
2722
2723         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
2724         after gdb::unlinker.
2725
2726 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
2727
2728         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
2729         gdb_environ to access an environment variable.
2730
2731 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
2732
2733         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
2734         gdb_byte*.
2735
2736 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2737
2738         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
2739
2740 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2741
2742         * configure: Re-generate.
2743         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
2744
2745 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2746
2747         * configure: Re-generate.
2748         * warning.m4: Pass -Werror to compiler when checking for
2749         supported warning flags.
2750
2751 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2752
2753         * Makefile.in (COMPILE.pre): Add "-x c++".
2754
2755 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
2756             Pedro Alves  <palves@redhat.com>
2757             Yao Qi  <yao.qi@linaro.org>
2758
2759         * defs.h (RequireLongest): New.
2760         (extract_integer): Declare function template.
2761         (extract_signed_integer): Remove the declaration, but define it
2762         static inline.
2763         (extract_unsigned_integer): Likewise.
2764         (store_integer): Declare function template.
2765         (store_signed_integer): Remove the declaration, but define it
2766         static inline.
2767         (store_unsigned_integer): Likewise.
2768         * findvar.c (extract_integer): New function template.
2769         (extract_signed_integer): Remove.
2770         (extract_unsigned_integer): Remove.
2771         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
2772         instantiations.
2773         (store_integer): New function template.
2774         (store_signed_integer): Remove.
2775         (store_unsigned_integer): Remove.
2776         (store_integer): Explicit instantiations.
2777         * regcache.c (regcache_raw_read_signed): Update.
2778         (regcache::raw_read): New function.
2779         (regcache::raw_read_signed): Remove.
2780         (regcache::raw_read_unsigned): Remove.
2781         (regcache_raw_read_unsigned): Update.
2782         (regcache_raw_write_unsigned): Update.
2783         (regcache::raw_write_signed): Remove.
2784         (regcache::raw_write): New function.
2785         (regcache_cooked_read_signed): Update.
2786         (regcache::raw_write_unsigned): Remove.
2787         (regcache::cooked_read_signed): Remove.
2788         (regcache_cooked_read_unsigned): Update.
2789         (regcache::cooked_read_unsigned): Remove.
2790         (regcache_cooked_write_signed): Update.
2791         (regcache_cooked_write_unsigned): Update.
2792         * regcache.h (regcache) <raw_read_signed>: Remove.
2793         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
2794         <raw_read, raw_write>: New.
2795         <cooked_read_signed, cooked_write_signed>: Remove.
2796         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
2797         <cooked_read, cooked_write>: New.
2798         * sh64-tdep.c (sh64_pseudo_register_read): Update.
2799         (sh64_pseudo_register_write): Update.
2800
2801 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
2802
2803         * arc-tdep.c (arc_disassembler_options): New variable.
2804         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
2805         of default_print_insn.
2806         (arc_delayed_print_insn): Set info->section when needed,
2807         use default_print_insn to retrieve a disassembler.
2808
2809 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
2810
2811         PR gdb/21574
2812         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
2813         to mention $SHELL and startup-with-shell.
2814
2815 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
2816
2817         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
2818
2819 2017-06-14  Yao Qi  <yao.qi@linaro.org>
2820
2821         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
2822         default_print_insn instead of print_insn_aarch64.
2823         * arm-tdep.c (gdb_print_insn_arm): Call
2824         default_print_insn instead of print_insn_big_arm
2825         and print_insn_little_arm.
2826         * i386-tdep.c (i386_print_insn): Call default_print_insn
2827         instead of print_insn_i386.
2828         * ia64-tdep.c (ia64_print_insn): Call
2829         default_print_insn instead of print_insn_ia64.
2830         * mips-tdep.c (gdb_print_insn_mips): Call
2831         default_print_insn instead of print_insn_big_mips
2832         and print_insn_little_mips.
2833         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
2834         instead of print_insn_spu.
2835
2836 2017-06-14  Pedro Alves  <palves@redhat.com>
2837
2838         * ada-lang.c: Include "common/byte-vector.h".
2839         (ada_value_primitive_packed_val): Use gdb::byte_vector.
2840         * charset.c (wchar_iterator::iterate): Resize the vector instead
2841         of reserving it.
2842         * common/byte-vector.h: Include "common/def-vector.h".
2843         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
2844         * cli/cli-dump.c: Include "common/byte-vector.h".
2845         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
2846         * common/byte-vector.h: New file.
2847         * common/def-vector.h: New file.
2848         * common/default-init-alloc.h: New file.
2849         * dwarf2loc.c: Include "common/byte-vector.h".
2850         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
2851         instead of reserving it.
2852         * dwarf2read.c: Include "common/byte-vector.h".
2853         (data_buf::m_vec): Now a gdb::byte_vector.
2854         * gdb_regex.c: Include "common/def-vector.h".
2855         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
2856         * mi/mi-main.c: Include "common/byte-vector.h".
2857         (mi_cmd_data_read_memory): Use gdb::byte_vector.
2858         * printcmd.c: Include "common/byte-vector.h".
2859         (print_scalar_formatted): Use gdb::byte_vector.
2860         * valprint.c: Include "common/byte-vector.h".
2861         (maybe_negate_by_bytes, print_decimal_chars): Use
2862         gdb::byte_vector.
2863
2864 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2865
2866         * darwin-nat.c: Include "nat/fork-inferior.h".
2867
2868 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2869
2870         * configure.nat: Factor out Darwin bits that are not
2871         architecture-specific.  Add fork-inferior.o.
2872
2873 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
2874
2875         * configure.nat: Factor out AIX bits that are not
2876         architecture-specific.  Add fork-inferior.o.
2877
2878 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2879
2880         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
2881         (read_pieced_value, write_pieced_value): ...here.  Reduce to
2882         wrappers that just call rw_pieced_value.
2883
2884 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2885
2886         * dwarf2loc.c (write_pieced_value): When writing the data for a
2887         memory piece, use write_memory_with_notification instead of
2888         write_memory.
2889
2890 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2891
2892         * valops.c (read_value_memory): Change embedded_offset to
2893         represent a bit offset instead of a byte offset.
2894         * value.h (read_value_memory): Adjust comment.
2895
2896 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2897
2898         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
2899         dest_offset_bits and source_offset_bits.
2900         (write_pieced_value): Likewise.
2901
2902 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2903
2904         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
2905         given by DW_OP_bit_piece.
2906         (write_pieced_value): Likewise.
2907
2908 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2909
2910         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
2911         some other preparations to the places where sufficient information
2912         is available.
2913         (write_pieced_value): Likewise.
2914
2915 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2916
2917         * dwarf2loc.c (bits_to_bytes): New function.
2918         (read_pieced_value): Fix offset calculations for register pieces
2919         on big-endian targets.
2920         (write_pieced_value): Likewise.
2921
2922 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2923
2924         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
2925         (write_pieced_value): Likewise.
2926
2927 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2928
2929         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
2930         transfer the source value's least significant bits, instead of its
2931         lowest-addressed ones.  Rename type_len to max_offset.
2932         (read_pieced_value): Mirror above changes to write_pieced_value as
2933         applicable.
2934
2935 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2936
2937         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
2938         truncate full bytes from dest_offset_bits before using it as an
2939         offset into the buffer.
2940
2941 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2942
2943         * dwarf2loc.c (write_pieced_value): Include transfer size in
2944         byte-wise check.
2945
2946 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2947
2948         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
2949         calculation of this_size.
2950
2951 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2952
2953         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
2954         when targeting a bit-field.
2955         (write_pieced_value): Likewise.
2956
2957 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2958
2959         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
2960         (allocate_piece_closure): Drop addr_size parameter.
2961         (dwarf2_evaluate_loc_desc_full): Adjust call to
2962         allocate_piece_closure.
2963
2964 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2965
2966         PR gdb/21226
2967         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
2968         the LSB end, independent of endianness.
2969
2970 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2971
2972         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
2973         size capping.
2974
2975 2017-06-13  Yao Qi  <yao.qi@linaro.org>
2976
2977         * mips-linux-nat.c: Move include features/mips*-linux.c to
2978         mips-linux-tdep.c.
2979         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
2980         to mips-linux-tdep.c.
2981         * mips-linux-tdep.c: Include features/mips*-linux.c
2982         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
2983         functions.
2984         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
2985         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
2986         (tdesc_mips64_dsp_linux): Declare.
2987
2988 2017-06-12  Tom Tromey  <tom@tromey.com>
2989
2990         * valprint.h (val_print_type_code_int): Remove.
2991         * valprint.c (generic_val_print_int): Always call
2992         val_print_scalar_formatted.
2993         (val_print_type_code_int): Remove.
2994         * printcmd.c (print_scalar_formatted): Handle options->format==0.
2995         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
2996         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
2997         * ada-valprint.c (ada_val_print_num): Use
2998         val_print_scalar_formatted.
2999
3000 2017-06-12  Tom Tromey  <tom@tromey.com>
3001
3002         * printcmd.c (print_scalar_formatted): Unify the two switches.
3003         Don't convert scalars to LONGEST.
3004
3005 2017-06-12  Tom Tromey  <tom@tromey.com>
3006
3007         PR exp/16225:
3008         * valprint.h (print_decimal_chars): Update.
3009         * valprint.c (maybe_negate_by_bytes): New function.
3010         (print_decimal_chars): Add "is_signed" argument.
3011         * printcmd.c (print_scalar_formatted): Update.
3012
3013 2017-06-12  Tom Tromey  <tom@tromey.com>
3014
3015         PR exp/16225:
3016         * valprint.h (print_binary_chars, print_hex_chars): Update.
3017         * valprint.c (val_print_type_code_int): Update.
3018         (print_binary_chars): Add "zero_pad" argument.
3019         (emit_octal_digit): New function.
3020         (print_octal_chars): Don't zero-pad.
3021         (print_decimal_chars): Likewise.
3022         (print_hex_chars): Add "zero_pad" argument.
3023         * sh64-tdep.c (sh64_do_fp_register): Update.
3024         * regcache.c (regcache::dump): Update.
3025         * printcmd.c (print_scalar_formatted): Update.
3026         * infcmd.c (default_print_one_register_info): Update.
3027
3028 2017-06-12  Pedro Alves  <palves@redhat.com>
3029             Alan Hayward  <alan.hayward@arm.com>
3030
3031         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
3032         (mips_eabi_push_dummy_call): Rename local 'regsize' to
3033         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
3034         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
3035         Assert that abi_regsize bytes fit in 'ref_valbuf'.
3036
3037 2017-06-12  Pedro Alves  <palves@redhat.com>
3038
3039         * dwarf2read.c (mapped_symtab::data): Now a vector of
3040         symtab_index_entry instead of vector of
3041         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
3042         whether an element's name is NULL instead of checking whether the
3043         element itself is NULL.
3044         (find_slot): Change return type.  Adjust.
3045         (hash_expand, , add_index_entry, uniquify_cu_indices)
3046         (write_hash_table): Adjust.
3047
3048 2017-06-12  Pedro Alves  <palves@redhat.com>
3049
3050         * dwarf2read.c (recursively_count_psymbols): New function.
3051         (write_psymtabs_to_index): Call it to compute number of psyms and
3052         pass estimate size of psyms_seen to unordered_set's ctor.
3053
3054 2017-06-12  Pedro Alves  <palves@redhat.com>
3055
3056         * dwarf2read.c (write_hash_table): Check if key already exists
3057         before emplacing.
3058
3059 2017-06-12  Pedro Alves  <palves@redhat.com>
3060
3061         * dwarf2read.c (data_buf::append_space): Rename to...
3062         (data_buf::grow): ... this, and make private.  Adjust all callers.
3063         (data_buf::append_uint): New method.
3064         (add_address_entry, write_one_signatured_type)
3065         (write_psymtabs_to_index): Use it.
3066
3067 2017-06-12  Pedro Alves  <palves@redhat.com>
3068
3069         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
3070         (file_write (FILE *, const std::vector<Elem>&)): Delete.
3071         (data_buf::file_write): Call ::fwrite directly.
3072
3073 2017-06-12  Pedro Alves  <palves@redhat.com>
3074
3075         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
3076         std::vector::erase.
3077
3078 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
3079
3080         Code cleanup: C++ify .gdb_index producer.
3081         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
3082         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
3083         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
3084         (create_strtab, add_string): Remove.
3085         (file_write, data_buf): New.
3086         (struct symtab_index_entry): Use std::vector for cu_indices.
3087         (struct mapped_symtab): Use std::vector for data.
3088         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
3089         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
3090         Remove.
3091         (find_slot): Change return type.  Update it to the new data structures.
3092         (hash_expand, add_index_entry): Update it to the new data structures.
3093         (offset_type_compare): Remove.
3094         (uniquify_cu_indices): Update it to the new data structures.
3095         (c_str_view, c_str_view_hasher, vector_hasher): New.
3096         (add_indices_to_cpool): Remove.
3097         (write_hash_table): Update it to the new data structures.
3098         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
3099         (eq_psymtab_cu_index): Remove.
3100         (psym_index_map): New typedef.
3101         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
3102         reference and std::unordered_map for cu_index_htab.
3103         (add_address_entry, add_address_entry_worker, write_address_map)
3104         (write_psymbols): Update it to the new data structures.
3105         (write_obstack): Remove.
3106         (struct signatured_type_index_data): Change types_list to a data_buf
3107         reference and psyms_seen to a std::unordered_set reference.
3108         (write_one_signatured_type, recursively_write_psymbols)
3109         (write_psymtabs_to_index): Update it to the new data structures.
3110
3111 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
3112
3113         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
3114         separate-debug-file commands.
3115         * symfile.h (separate_debug_file_debug): New global.
3116         * symfile.c (separate_debug_file_debug): New global.
3117         (separate_debug_file_exists, find_separate_debug_file): Add
3118         debug output.
3119         (_initialize_symfile): Add "set debug separate-debug-file"
3120         command.
3121         * build-id.c (build_id_to_debug_bfd,
3122         find_separate_debug_file_by_buildid): Add debug output.
3123
3124 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
3125
3126         * gdbarch.sh (displaced_step_free_closure): Remove.
3127         * gdbarch.h, gdbarch.c: Re-generate.
3128         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
3129         displaced_step_free_closure.
3130         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
3131         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
3132         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3133         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
3134         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3135         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3136         * arch-utils.h (simple_displaced_step_free_closure): Remove.
3137         * arch-utils.c (simple_displaced_step_free_closure): Remove.
3138         * infrun.c (displaced_step_clear): Call xfree instead of
3139         gdbarch_displaced_step_free_closure.
3140
3141 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
3142
3143         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
3144         NULL".
3145
3146 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
3147
3148         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
3149         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
3150         (mn10300_push_dummy_call): Likewise.
3151
3152 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
3153
3154         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
3155
3156 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
3157
3158         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
3159
3160 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3161
3162         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
3163         able to start inferiors using a shell.
3164         (New remote packets): Announce new packet "QStartupWithShell".
3165         * remote.c: Add PACKET_QStartupWithShell.
3166         (extended_remote_create_inferior): Handle new
3167         PACKET_QStartupWithShell.
3168         (remote_protocol_features) <QStartupWithShell>: New entry for
3169         PACKET_QStartupWithShell.
3170         (_initialize_remote): Call "add_packet_config_cmd" for
3171         QStartupShell.
3172
3173 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3174             Pedro Alves  <palves@redhat.com>
3175
3176         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
3177         and "nat/fork-inferior.h".
3178         * common/common-inferior.h: New file, with contents from
3179         "gdb/inferior.h".
3180         * commom/common-utils.c: Include "common-utils.h".
3181         (stringify_argv): New function.
3182         * common/common-utils.h (stringify_argv): New prototype.
3183         * configure.nat: Add "fork-inferior.o" as a dependency for
3184         "*linux*", "fbsd*" and "nbsd*" hosts.
3185         * corefile.c (get_exec_file): Update comment.
3186         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
3187         instead of "startup_inferior".
3188         (darwin_create_inferior): Call "add_thread_silent" after
3189         "fork_inferior".
3190         * fork-child.c: Cleanup unnecessary includes.
3191         (SHELL_FILE): Move to "common/common-fork-child.c".
3192         (environ): Likewise.
3193         (exec_wrapper): Initialize.
3194         (get_exec_wrapper): New function.
3195         (breakup_args): Move to "common/common-fork-child.c"; rename to
3196         "breakup_args_for_exec".
3197         (escape_bang_in_quoted_argument): Move to
3198         "common/common-fork-child.c".
3199         (saved_ui): New variable.
3200         (prefork_hook): New function.
3201         (postfork_hook): Likewise.
3202         (postfork_child_hook): Likewise.
3203         (gdb_startup_inferior): Likewise.
3204         (fork_inferior): Move to "common/common-fork-child.c".  Update
3205         function to support gdbserver.
3206         (startup_inferior): Likewise.
3207         * gdbcore.h (get_exec_file): Remove declaration.
3208         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
3209         instead of "startup_inferior".  Call "add_thread_silent" after
3210         "fork_inferior".
3211         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
3212         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
3213         instead of "startup_inferior".  Call "add_thread_silent" after
3214         "fork_inferior".
3215         * inferior.h: Include "common-inferior.h".
3216         (trace_start_error): Move to "common/common-utils.h".
3217         (trace_start_error_with_name): Likewise.
3218         (fork_inferior): Move prototype to "nat/fork-inferior.h".
3219         (startup_inferior): Likewise.
3220         (gdb_startup_inferior): New prototype.
3221         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
3222         * nat/fork-inferior.h: New file.
3223         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
3224         instead of "startup_inferior".  Call "add_thread_silent" after
3225         "fork_inferior".
3226         * target.h (target_terminal_init): Move prototype to
3227         "target/target.h".
3228         (target_terminal_inferior): Likewise.
3229         (target_terminal_ours): Likewise.
3230         * target/target.h (target_terminal_init): New prototype, moved
3231         from "target.h".
3232         (target_terminal_inferior): Likewise.
3233         (target_terminal_ours): Likewise.
3234         * utils.c (gdb_flush_out_err): New function.
3235
3236 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3237
3238         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
3239         * common/common-gdbthread.h: New file, with parts from
3240         "gdb/gdbthread.h".
3241         * gdbthread.h: Include "common-gdbthread.h".
3242         (switch_to_thread): Moved to "common/common-gdbthread.h".
3243
3244 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
3245
3246         * Makefile.in (SFILES): Add "common/job-control.c".
3247         (HFILES_NO_SRCDIR): Add "common/job-control.h".
3248         (COMMON_OBS): Add "job-control.o".
3249         * common/job-control.c: New file, with contents from
3250         "gdb/inflow.c".
3251         * common/job-control.h: New file, with contents from "terminal.h".
3252         * fork-child.c: Include "job-control.h".
3253         * inflow.c: Include "job-control.h".
3254         (gdb_setpgid): Move to "common/common-inflow.c".
3255         (_initialize_inflow): Move setting of "job_control" to
3256         "handle_job_control".
3257         * terminal.h (job_control): Moved to "common/common-terminal.h".
3258         (gdb_setpgid): Likewise.
3259         * top.c: Include "job_control.h".
3260         * utils.c: Likewise.
3261         (job_control): Moved to "job-control.c".
3262
3263 2017-06-07  Pedro Alves  <palves@redhat.com>
3264
3265         * Makefile.in (SFILES): Add gdb_regex.c.
3266         (COMMON_OBS): Add gdb_regex.o.
3267         * ada-lang.c (ada_add_standard_exceptions)
3268         (ada_add_exceptions_from_frame, name_matches_regex)
3269         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
3270         parameter type to compiled_regex.  Adjust.
3271         (ada_exceptions_list): Use compiled_regex.
3272         * break-catch-throw.c (exception_catchpoint::pattern): Now a
3273         std::unique_ptr<compiled_regex>.
3274         (exception_catchpoint::~exception_catchpoint): Remove regfree
3275         call.
3276         (check_status_exception_catchpoint): Adjust to use compiled_regex.
3277         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
3278         * breakpoint.c (solib_catchpoint::compiled): Now a
3279         std::unique_ptr<compiled_regex>.
3280         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
3281         (check_status_catch_solib): Adjust to use compiled_regex.
3282         (add_solib_catchpoint): Adjust to use compiled_regex.
3283         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
3284         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
3285         compiled_regex reference.  Adjust to use it.
3286         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
3287         declaration.  Include "gdb_regex.h".
3288         (apropos_cmd): Change regex parameter to compiled_regex reference.
3289         * gdb_regex.c: New file.
3290         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
3291         declarations.
3292         (class compiled_regex): New.
3293         * linux-tdep.c: Include "common/gdb_optional.h".
3294         (struct mapping_regexes): New, factored out from
3295         mapping_is_anonymous_p, and adjusted to use compiled_regex.
3296         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
3297         gdb::optional and remove cleanups.  Adjust to compiled_regex.
3298         * probe.c: Include "common/gdb_optional.h".
3299         (collect_probes): Use compiled_regex and gdb::optional and remove
3300         cleanups.
3301         * skip.c: Include "common/gdb_optional.h".
3302         (skiplist_entry::compiled_function_regexp): Now a
3303         gdb::optional<compiled_regex>.
3304         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
3305         (free_skiplist_entry): Remove regfree call.
3306         (compile_skip_regexp, skip_rfunction_p): Adjust to use
3307         compiled_regex and gdb::optional.
3308         * symtab.c: Include "common/gdb_optional.h".
3309         (search_symbols): Use compiled_regex and gdb::optional.
3310         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
3311         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
3312         to gdb_regex.c.
3313
3314 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3315
3316         * regcache.c (regcache::save): Avoid buffer use.
3317         (regcache::dump): Likewise.
3318
3319 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3320
3321         * sh-tdep.c (sh_pseudo_register_read): Remove
3322         MAX_REGISTER_SIZE.
3323         (sh_pseudo_register_write): Likewise.
3324         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
3325         (sh64_pseudo_register_write): Likewise
3326
3327 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
3328
3329         * aarch64-tdep.c (aarch64_store_return_value): Use
3330         V_REGISTER_SIZE.
3331         (aarch64_pseudo_read_value): Likewise.
3332         (aarch64_pseudo_write): Likewise.
3333
3334 2017-06-06  Yao Qi  <yao.qi@linaro.org>
3335
3336         * regformats/regdef.h (set_register_cache): Remove the
3337         declaration.
3338
3339 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
3340
3341         * frame.c (frame_unwind_register_signed): Use
3342         frame_unwind_register_value.
3343
3344 2017-06-06  Pedro Alves  <palves@redhat.com>
3345
3346         PR breakpoints/21553
3347         * breakpoint.c (create_breakpoints_sal_default)
3348         (init_breakpoint_sal, create_breakpoint_sal): Use
3349         gdb::unique_xmalloc_ptr for string parameters.
3350         (create_breakpoint): Constify 'extra_string' and 'cond_string'
3351         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
3352         (base_breakpoint_create_breakpoints_sal)
3353         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
3354         (strace_marker_create_breakpoints_sal)
3355         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
3356         string parameters.
3357         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
3358         gdb::unique_xmalloc_ptr for string parameters.
3359         (create_breakpoint): Constify 'extra_string' and 'cond_string'
3360         parameters.
3361
3362 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
3363
3364         * alpha-tdep.c (alpha_register_to_value): Use
3365         get_frame_register_value.
3366         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
3367
3368 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
3369
3370         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
3371         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
3372         (ia64_value_to_register): Likewise.
3373         (ia64_extract_return_value): Likewise.
3374         (ia64_store_return_value): Likewise.
3375         (ia64_push_dummy_call): Likewise.
3376
3377 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
3378
3379         GDB 8.0 released.
3380
3381 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
3382
3383         * x86-linux-nat.c (struct arch_lwp_info): Remove.
3384
3385 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
3386
3387         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
3388         parameter.
3389         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
3390
3391 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
3392
3393         * event-loop.c (poll_timers): Unallocate timer using delete
3394         instead of xfree.
3395
3396 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3397
3398         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
3399         (struct breakpoint) <~breakpoint>: New.
3400         (struct watchpoint): Inherit from breakpoint.
3401         <~watchpoint>: New.
3402         <base>: Remove.
3403         (struct tracepoint): Inherit from breakpoint.
3404         <base>: Remove.
3405         * breakpoint.c (longjmp_breakpoint_ops): Remove.
3406         (struct longjmp_breakpoint): Inherit from breakpoint.
3407         <~longjmp_breakpoint>: New.
3408         <base>: Remove.
3409         (new_breakpoint_from_type): Remove casts.
3410         (watchpoint_in_thread_scope): Remove reference to base field.
3411         (watchpoint_del_at_next_stop): Likewise.
3412         (update_watchpoint): Likewise.
3413         (watchpoint_check): Likewise.
3414         (bpstat_check_watchpoint): Likewise.
3415         (set_longjmp_breakpoint): Likewise.
3416         (struct fork_catchpoint): Inherit from breakpoint.
3417         <base>: Remove.
3418         (struct solib_catchpoint): Inherit from breakpoint.
3419         <~solib_catchpoint>: New.
3420         <base>: Remove.
3421         (dtor_catch_solib): Change to ...
3422         (solib_catchpoint::~solib_catchpoint): ... this.
3423         (breakpoint_hit_catch_solib): Remove reference to base field.
3424         (add_solib_catchpoint): Likewise.
3425         (create_fork_vfork_event_catchpoint): Likewise.
3426         (struct exec_catchpoint): Inherit from breakpoint.
3427         <~exec_catchpoint>: New.
3428         <base>: Remove.
3429         (dtor_catch_exec): Change to ...
3430         (exec_catchpoint::~exec_catchpoint): ... this.
3431         (dtor_watchpoint): Change to ...
3432         (watchpoint::~watchpoint): ... this.
3433         (watch_command_1): Remove reference to base field.
3434         (catch_exec_command_1): Likewise.
3435         (base_breakpoint_dtor): Change to ...
3436         (breakpoint::~breakpoint): ... this.
3437         (base_breakpoint_ops): Remove dtor field value.
3438         (longjmp_bkpt_dtor): Change to ...
3439         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
3440         (strace_marker_create_breakpoints_sal): Remove reference to base
3441         field.
3442         (delete_breakpoint): Don't manually call breakpoint destructor.
3443         (create_tracepoint_from_upload): Remove reference to base field.
3444         (trace_pass_set_count): Likewise.
3445         (initialize_breakpoint_ops): Don't initialize
3446         momentary_breakpoint_ops, don't set dtors.
3447         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
3448         <~ada_catchpoint>: New.
3449         <base>: Remove.
3450         (create_excep_cond_exprs): Remove reference to base field.
3451         (dtor_exception): Change to ...
3452         (ada_catchpoint::~ada_catchpoint): ... this.
3453         (dtor_catch_exception): Remove.
3454         (dtor_catch_exception_unhandled): Remove.
3455         (dtor_catch_assert): Remove.
3456         (create_ada_exception_catchpoint): Remove reference to base
3457         field.
3458         (initialize_ada_catchpoint_ops): Don't set dtors.
3459         * break-catch-sig.c (struct signal_catchpoint): Inherit from
3460         breakpoint.
3461         <~signal_catchpoint>: New.
3462         <base>: Remove.
3463         (signal_catchpoint_dtor): Change to ...
3464         (signal_catchpoint::~signal_catchpoint): ... this.
3465         (create_signal_catchpoint): Remove reference to base field.
3466         (initialize_signal_catchpoint_ops): Don't set dtor.
3467         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
3468         from breakpoint.
3469         <~syscall_catchpoint>: New.
3470         <base>: Remove.
3471         (dtor_catch_syscall): Change to ...
3472         (syscall_catchpoint::~syscall_catchpoint): ... this.
3473         (create_syscall_event_catchpoint): Remove reference to base
3474         field.
3475         (initialize_syscall_catchpoint_ops): Don't set dtor.
3476         * break-catch-throw.c (struct exception_catchpoint): Inherit
3477         from breakpoint.
3478         <~exception_catchpoint>: New.
3479         <base>: Remove.
3480         (dtor_exception_catchpoint): Change to ...
3481         (exception_catchpoint::~exception_catchpoint): ... this.
3482         (handle_gnu_v3_exceptions): Remove reference to base field.
3483         (initialize_throw_catchpoint_ops): Don't set dtor.
3484         * ctf.c (ctf_get_traceframe_address): Remove reference to base
3485         field.
3486         * remote.c (remote_get_tracepoint_status): Likewise.
3487         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
3488         * tracefile.c (tracefile_fetch_registers): Likewise.
3489         * tracepoint.c (actions_command): Likewise.
3490         (validate_actionline): Likewise.
3491         (tfind_1): Likewise.
3492         (get_traceframe_location): Likewise.
3493         (find_matching_tracepoint_location): Likewise.
3494         (parse_tracepoint_status): Likewise.
3495         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
3496
3497 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3498
3499         * breakpoint.c (struct longjmp_breakpoint): New struct.
3500         (is_tracepoint_type): Change return type to bool.
3501         (is_longjmp_type): New function.
3502         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
3503         (set_raw_breakpoint_without_location): Use
3504         new_breakpoint_from_type.
3505         (set_raw_breakpoint): Likewise.
3506
3507 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
3508
3509         * breakpoint.c (new_breakpoint_from_type): New function.
3510         (create_breakpoint_sal): Use new_breakpoint_from_type and
3511         unique_ptr.
3512         (create_breakpoint): Likewise.
3513
3514 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
3515
3516         * memattr.c (mem_info_command): Rename to ...
3517         (info_mem_command): ... this.
3518         (mem_enable_command): Rename to ...
3519         (enable_mem_command): ... this.
3520         (mem_disable_command): Rename to ...
3521         (disable_mem_command): ... this.
3522         (mem_delete_command): Rename to ...
3523         (delete_mem_command): ... this.
3524         (_initialize_mem): Adjust function names.
3525
3526 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
3527
3528         * btrace.c (handle_pt_insn_events): New.
3529         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
3530         STATUS.  Split into this and ...
3531         (handle_pt_insn_event_flags): ... this.
3532
3533 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
3534
3535         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
3536         and struct pt_insn.resynced.
3537         * configure: Regenerated.
3538         * config.in: Regenerated.
3539
3540 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3541
3542         * btrace.c (ftrace_find_call_by_number): New function.
3543         (ftrace_new_function): Store objects, not pointers.
3544         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
3545         ftrace_new_gap, ftrace_update_function,
3546         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
3547         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
3548         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
3549         btrace_ends_with_single_insn, btrace_call_get): Account for
3550         btrace_thread_info::functions now storing objects.
3551         * btrace.h (struct btrace_thread_info): Add constructor.
3552         (struct btrace_thread_info) <functions>: Make std::vector.
3553         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
3554         Initialize with default values.
3555         * record-btrace.c (record_btrace_frame_sniffer): Account for
3556         btrace_thread_info::functions now storing objects.
3557
3558 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3559
3560         * btrace.c: Remove typedef bfun_s.
3561         (ftrace_new_gap): Directly add gaps to the list of gaps.
3562         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
3563         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
3564         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
3565         instead of gdb VEC.
3566
3567 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3568
3569         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
3570         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
3571         with btrace_thread_info::next_segment and
3572         btrace_thread_info::prev_segment.
3573         * btrace.h: Remove struct btrace_func_link.
3574         (struct btrace_function): Replace pair of function segment pointers
3575         with pair of indices.
3576         * python/py-record-btrace.c (btpy_call_prev_sibling,
3577         btpy_call_next_sibling): Replace references to
3578         btrace_thread_info::segment with btrace_thread_info::next_segment and
3579         btrace_thread_info::prev_segment.
3580         * record-btrace.c (record_btrace_frame_this_id): Use
3581         btrace_find_call_by_number.
3582
3583 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3584
3585         * btrace.c (ftrace_new_function, ftrace_fixup_level,
3586         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
3587         btrace_insn_next, btrace_insn_prev): Remove references to
3588         btrace_thread_info::flow.
3589         * btrace.h (struct btrace_function): Remove FLOW.
3590
3591 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3592
3593         * btrace.c (ftrace_find_call_by_number): New function.
3594         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
3595         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
3596         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
3597         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
3598         index.
3599         * btrace.h (struct btrace_function): Turn UP into an index.
3600         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
3601         as an index.
3602         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
3603         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
3604         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
3605
3606 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3607
3608         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3609         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3610         ftrace_update_function, ftrace_compute_global_level_offset,
3611         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
3612         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
3613         btrace_insn_end, btrace_is_empty): Remove references to
3614         btrace_thread_info::begin and btrace_thread_info::end.
3615         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
3616         (struct btrace_thread_info) <functions>: Adjust comment.
3617         * record-btrace.c (record_btrace_start_replaying): Remove reference to
3618         btrace_thread_info::begin.
3619
3620 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3621
3622         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
3623         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
3624         ftrace_update_function): Remove arguments that implicitly were always
3625         BTINFO->END.
3626         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
3627         Don't pass BTINFO->END.
3628
3629 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3630
3631         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
3632         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
3633         btrace_find_insn_by_number): Replace function segment pointer with
3634         index.
3635         (btrace_insn_cmp): Simplify.
3636         * btrace.h: (struct btrace_insn_iterator) Rename index to
3637         insn_index.  Replace function segment pointer with index into function
3638         segment vector.
3639         * record-btrace.c (record_btrace_call_history): Replace function
3640         segment pointer use with index.
3641         (record_btrace_frame_sniffer): Retrieve function call segment through
3642         vector.
3643         (record_btrace_set_replay): Remove defunc't safety check.
3644
3645 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3646
3647         * btrace.c (btrace_ends_with_single_insn): New function.
3648         (btrace_call_get, btrace_call_number, btrace_call_begin,
3649         btrace_call_end, btrace_call_next, btrace_call_prev,
3650         btrace_find_call_by_number): Use index into call segment vector
3651         instead of pointer.
3652         (btrace_call_cmp): Simplify.
3653         * btrace.h (struct btrace_call_iterator): Replace function call segment
3654         pointer with index into vector.
3655         * record-btrace.c (record_btrace_call_history): Use index instead of
3656         pointer.
3657
3658 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3659
3660         * btrace.c (btrace_insn_begin, btrace_insn_end,
3661         btrace_find_insn_by_number): Add btinfo to iterator.
3662         * btrace.h (struct btrace_insn_iterator): Add btinfo.
3663
3664 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3665
3666         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
3667         and save pointers directly.
3668         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
3669         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
3670         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
3671         changed signature of functions.
3672         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
3673         (btrace_fetch): Remove code that adds btrace_function pointers to
3674         vector of btrace_functions.
3675         (btrace_clear): Simplify freeing vector of btrace_functions.
3676
3677 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
3678
3679         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
3680         Replace VEC_* with std::vector functions.
3681         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
3682         (struct btrace_thread_info)<functions>: Change type to std::vector.
3683
3684 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
3685
3686         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
3687         "Removed targets and native configurations" up.  Merge duplicate
3688         "New commands" sub-sections.  Add "New options" sub-sections.
3689
3690 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
3691
3692         * defs.h (copy_integer_to_size): New declaration.
3693         * findvar.c (copy_integer_to_size): New function.
3694         (do_cint_test): New selftest function.
3695         (copy_integer_to_size_test): Likewise.
3696         (_initialize_findvar): Likewise.
3697         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
3698         (mips_fbsd_collect_reg): Use raw_collect_integer.
3699         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
3700         (mips64_fill_gregset): Use raw_collect_integer
3701         (mips64_fill_fpregset): Use raw_supply_integer.
3702         * regcache.c (regcache::raw_supply_integer): New function.
3703         (regcache::raw_collect_integer): Likewise.
3704         * regcache.h: (regcache::raw_supply_integer): New declaration.
3705         (regcache::raw_collect_integer): Likewise.
3706
3707 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3708
3709         * Makefile.in (SFILES): Add gdbarch-selftests.c.
3710         (COMMON_OBS): Add gdbarch-selftests.o.
3711         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
3712         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
3713         * gdbarch-selftests.c: New file.
3714         * regcache.h (regcache) <~regcache>: Mark it virtual if
3715         GDB_SELF_TEST.
3716         <raw_write>: Likewise.
3717
3718 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3719
3720         * regcache.c (current_regcache): Change it to
3721         regcache::current_regcache.
3722         (regcache_observer_target_changed): Update.
3723         (regcache_thread_ptid_changed): Make it a regcache static
3724         method.
3725         (regcache_thread_ptid_changed): Update.
3726         (class regcache_access): New.
3727         (current_regcache_test): Update.
3728         (_initialize_regcache): Update.
3729         * regcache.h: Include forward_list.
3730         (regcache): Declare regcache_thread_ptid_changed and declare
3731         registers_changed_ptid as friend.
3732
3733 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3734
3735         * i387-tdep.c (i387_register_to_value): Use register_size
3736         instead of TYPE_LENGTH.
3737         * m68k-tdep.c (m68k_register_to_value): Likewise.
3738
3739 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3740
3741         * i387-tdep.c (i387_convert_register_p): Return false if type
3742         code isn't TYPE_CODE_FLT.
3743
3744 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3745
3746         * alpha-tdep.c (alpha_convert_register_p): Return true if type
3747         length is 4.
3748         (alpha_register_to_value): Remove type length check.
3749         (alpha_value_to_register): Likewise.
3750
3751 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3752
3753         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
3754         TYPE_CODE_FLT.
3755
3756 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3757
3758         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
3759         TYPE_CODE_FLT or not.
3760
3761 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3762
3763         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
3764         * avr-tdep.c (avr_gdbarch_init): Likewise.
3765         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3766         * cris-tdep.c (cris_gdbarch_init): Likewise.
3767         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3768         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3769         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3770         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
3771         * mep-tdep.c (mep_gdbarch_init): Likewise.
3772         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3773         * mips-tdep.c (mips_gdbarch_init): Likewise.
3774         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3775         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3776         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3777         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3778         * v850-tdep.c (v850_gdbarch_init): Likewise.
3779
3780 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3781
3782         * selftest-arch.c (tests_with_arch): Call registers_changed
3783         and reinit_frame_cache.
3784         * selftest.c (run_self_tests): Likewise.
3785
3786 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3787
3788         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
3789         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
3790
3791 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3792
3793         * rl78-tdep.c (rl78_gdbarch_init): Don't call
3794         set_gdbarch_print_insn.
3795
3796 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3797
3798         * h8300-tdep.c (h8300_gdbarch_init): Don't call
3799         set_gdbarch_print_insn.
3800
3801 2017-05-24  Yao Qi  <yao.qi@linaro.org>
3802
3803         * alpha-tdep.c (alpha_gdbarch_init): Don't call
3804         set_gdbarch_print_insn.
3805         * arc-tdep.c (arc_gdbarch_init): Likewise.
3806         * arch-utils.c: include dis-asm.h.
3807         (default_print_insn): New function.
3808         * arch-utils.h (default_print_insn): Declare.
3809         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
3810         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
3811         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
3812         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
3813         * frv-tdep.c (frv_gdbarch_init): Likewise.
3814         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3815         * gdbarch.sh (print_insn): Use default_print_insn.
3816         * gdbarch.c: Regenerated.
3817         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
3818         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
3819         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
3820         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
3821         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
3822         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
3823         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
3824         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
3825         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
3826         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
3827         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
3828         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
3829         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
3830         * mt-tdep.c (mt_gdbarch_init): Likewise.
3831         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3832         * nios2-tdep.c (nios2_print_insn): Remove.
3833         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
3834         * rx-tdep.c (rx_gdbarch_init): Likewise.
3835         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
3836         * score-tdep.c (score_print_insn): Remove.
3837         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
3838         * sh-tdep.c (sh_gdbarch_init): Likewise.
3839         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
3840         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3841         * tic6x-tdep.c (tic6x_print_insn): Remove.
3842         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
3843         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
3844         * v850-tdep.c (v850_gdbarch_init): Likewise.
3845         * vax-tdep.c (vax_gdbarch_init): Likewise.
3846         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
3847         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
3848
3849 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
3850
3851         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
3852         (MIPS_FP0_REGNUM): Remove.
3853         (MIPS_FSR_REGNUM): Remove.
3854         (mips_fbsd_supply_fpregs): Use mips_regnum.
3855         (mips_fbsd_supply_gregs): Likewise.
3856         (mips_fbsd_collect_fpregs): Likewise.
3857         (mips_fbsd_collect_gregs): Likewise.
3858
3859 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
3860
3861         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
3862         (getpfpregs_supplies): New function.
3863         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
3864         getfpregs_supplies.
3865         (mips_fbsd_store_inferior_registers): Likewise.
3866
3867 2017-05-22  Pedro Alves <palves@redhat.com>
3868
3869         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
3870         maintainer.
3871
3872 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
3873
3874         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
3875         (store_register): Likewise.
3876         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
3877         (get_decimal_float_return_value): Likewise.
3878         (do_ppc_sysv_return_value): Likewise.
3879         (ppc64_sysv_abi_push_integer): Likewise.
3880         (ppc64_sysv_abi_push_freg): Likewise.
3881         (ppc64_sysv_abi_return_value_base): Likewise.
3882         (ppc64_sysv_abi_return_value): Likewise.
3883         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
3884         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
3885         * rs6000-nat.c: Likewise.
3886         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
3887         (rs6000_value_to_register): Likewise.
3888         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
3889
3890 2017-05-21  Tom Tromey  <tom@tromey.com>
3891
3892         PR rust/21466:
3893         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
3894         arrays as "[T]", not "[T; ]".
3895
3896 2017-05-19  Tom Tromey  <tom@tromey.com>
3897
3898         PR rust/21484:
3899         * rust-lang.c (exp_descriptor_rust): New function.
3900         (rust_language_defn): Use it.
3901         * p-lang.c (pascal_language_defn): Update.
3902         * opencl-lang.c (opencl_language_defn): Update.
3903         * objc-lang.c (objc_language_defn): Update.
3904         * m2-lang.c (m2_language_defn): Update.
3905         * language.h (struct language_defn)
3906         <la_watch_location_expression>: New member.
3907         * language.c (unknown_language_defn, auto_language_defn)
3908         (local_language_defn): Update.
3909         * go-lang.c (go_language_defn): Update.
3910         * f-lang.c (f_language_defn): Update.
3911         * d-lang.c (d_language_defn): Update.
3912         * c-lang.h (c_watch_location_expression): Declare.
3913         * c-lang.c (c_watch_location_expression): New function.
3914         (c_language_defn, cplus_language_defn, asm_language_defn)
3915         (minimal_language_defn): Use it.
3916         * breakpoint.c (watch_command_1): Call
3917         la_watch_location_expression.
3918         * ada-lang.c (ada_language_defn): Update.
3919
3920 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3921
3922         PR tui/21482
3923         * gdb_curses.h (NOMACROS): Define.
3924         (NCURSES_NOMACROS): Define.
3925
3926 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3927
3928         PR tui/21482
3929         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
3930         arg to char *.
3931         * tui/tui-wingeneral.c (box_win): Likewise.
3932         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
3933         (tui_show_source_line): Likewise.
3934         (tui_show_exec_info_content): Likewise.
3935
3936 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
3937
3938         * sparc-tdep.c (sparc_structure_return_p)
3939         (sparc_arg_on_registers_p): New functions.
3940         (sparc32_store_arguments): Use them.
3941         * sparc64-tdep.c (sparc64_16_byte_align_p)
3942         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
3943         Handle TYPE_CODE_ARRAY.
3944
3945 2017-05-17  Yao Qi  <yao.qi@linaro.org>
3946
3947         * cli/cli-decode.c (add_alias_cmd): New function.
3948         * command.h (add_alias_cmd): Declare.
3949         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
3950         instead call add_alias_cmd.
3951
3952 2017-05-17  Pedro Alves  <palves@redhat.com>
3953
3954         * Makefile.in (nat_extra_makefile_frag): Rename to ...
3955         (nat_makefile_frag): ... this.  All references updated.
3956         * configure.ac: Likewise.
3957         * configure.nat: Likewise.  Enhance comments.
3958         * configure: Regenerate.
3959
3960 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3961
3962         * procfs.c (procfs_create_inferior): Change prototype to match
3963         definition.
3964
3965 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
3966
3967         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
3968         C++ compiler warning.
3969
3970 2017-05-12  Tom Tromey  <tom@tromey.com>
3971
3972         PR rust/21483:
3973         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
3974         recurse, just call value_struct_elt directly.
3975
3976 2017-05-12  Tom Tromey  <tom@tromey.com>
3977
3978         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
3979         OP_RUST_ARRAY>: Fix.
3980
3981 2017-05-12  Tom Tromey  <tom@tromey.com>
3982
3983         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
3984
3985 2017-05-09  Yao Qi  <yao.qi@linaro.org>
3986
3987         * regcache.c: Include <forward_list>.
3988         (struct regcache_list): Remove.
3989         (current_regcache): Update.
3990         (get_thread_arch_aspace_regcache): Update for std::forward_list.
3991         (regcache_thread_ptid_changed): Likewise.
3992         (registers_changed_ptid): Likewise.
3993         (current_regcache_size): Likewise.
3994
3995 2017-05-09  Yao Qi  <yao.qi@linaro.org>
3996
3997         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
3998         (current_regcache_size): New function.
3999         (current_regcache_test): New function.
4000         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
4001
4002 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4003
4004         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
4005         (print_gp_register_row): Use get_frame_register_value.
4006
4007 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4008
4009         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
4010         (mips_supply_fpregset): Likewise.
4011         (mips64_supply_gregset): Likewise.
4012
4013 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4014
4015         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
4016         regcache->raw_supply_zeroed.
4017
4018 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4019
4020         * configure.nat: Rearrange 'case' statements to match
4021         host before cpu.
4022
4023 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
4024
4025         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
4026         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
4027         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
4028         "@nat_extra_makefile_frag@".
4029         (Makefile): Remove dependency on "@frags@".
4030         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
4031         (data-directory/Makefile): Likewise.
4032         * config/aarch64/linux.mh: Deleted; moved contents to
4033         "gdb/configure.nat".
4034         * config/alpha/alpha-linux.mh: Likewise.
4035         * config/alpha/nbsd.mh: Likewise.
4036         * config/arm/linux.mh: Likewise.
4037         * config/arm/nbsdelf.mh: Likewise.
4038         * config/i386/cygwin.mh: Likewise.
4039         * config/i386/cygwin64.mh: Likewise.
4040         * config/i386/darwin.mh: Likewise.
4041         * config/i386/fbsd.mh: Likewise.
4042         * config/i386/fbsd64.mh: Likewise.
4043         * config/i386/go32.mh: Likewise.
4044         * config/i386/i386gnu.mh: Likewise.
4045         * config/i386/i386sol2.mh: Likewise.
4046         * config/i386/linux.mh: Likewise.
4047         * config/i386/linux64.mh: Likewise.
4048         * config/i386/mingw.mh: Likewise.
4049         * config/i386/mingw64.mh: Likewise.
4050         * config/i386/nbsd64.mh: Likewise.
4051         * config/i386/nbsdelf.mh: Likewise.
4052         * config/i386/nto.mh: Likewise.
4053         * config/i386/obsd.mh: Likewise.
4054         * config/i386/obsd64.mh: Likewise.
4055         * config/i386/sol2-64.mh: Likewise.
4056         * config/ia64/linux.mh: Likewise.
4057         * config/m32r/linux.mh: Likewise.
4058         * config/m68k/linux.mh: Likewise.
4059         * config/m68k/nbsdelf.mh: Likewise.
4060         * config/m68k/obsd.mh: Likewise.
4061         * config/m88k/obsd.mh: Likewise.
4062         * config/mips/fbsd.mh: Likewise.
4063         * config/mips/linux.mh: Likewise.
4064         * config/mips/nbsd.mh: Likewise.
4065         * config/mips/obsd64.mh: Likewise.
4066         * config/pa/linux.mh: Likewise.
4067         * config/pa/nbsd.mh: Likewise.
4068         * config/pa/obsd.mh: Likewise.
4069         * config/powerpc/aix.mh: Likewise.
4070         * config/powerpc/fbsd.mh: Likewise.
4071         * config/powerpc/linux.mh: Likewise.
4072         * config/powerpc/nbsd.mh: Likewise.
4073         * config/powerpc/obsd.mh: Likewise.
4074         * config/powerpc/ppc64-linux.mh: Likewise.
4075         * config/powerpc/spu-linux.mh: Likewise.
4076         * config/s390/linux.mh: Likewise.
4077         * config/sh/nbsd.mh: Likewise.
4078         * config/sparc/fbsd.mh: Likewise.
4079         * config/sparc/linux.mh: Likewise.
4080         * config/sparc/linux64.mh: Likewise.
4081         * config/sparc/nbsd64.mh: Likewise.
4082         * config/sparc/nbsdelf.mh: Likewise.
4083         * config/sparc/obsd64.mh: Likewise.
4084         * config/sparc/sol2.mh: Likewise.
4085         * config/tilegx/linux.mh: Likewise.
4086         * config/vax/nbsdelf.mh: Likewise.
4087         * config/vax/obsd.mh: Likewise.
4088         * config/xtensa/linux.mh: Likewise.
4089         * config/i386/i386gnu.mn: New file, with excerpts from
4090         "config/i386/i386gnu.mh".
4091         * configure: Regenerate.
4092         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
4093         *.mh files under "gdb/config".
4094         * configure.nat: New file, with contents from the
4095         "gdb/config/*/*.mh" files.
4096
4097 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
4098
4099         * btrace.c (btrace_clear): Free insn vector.
4100
4101 2017-05-05  Pedro Alves  <palves@redhat.com>
4102
4103         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
4104         * configure: Regenerate.
4105
4106 2017-05-04  Pedro Alves  <palves@redhat.com>
4107
4108         * Makefile.in (SFILES): Add progspace-and-thread.c.
4109         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
4110         (COMMON_OBS): Add progspace-and-thread.o.
4111         * breakpoint.c: Include "progspace-and-thread.h".
4112         (update_inserted_breakpoint_locations)
4113         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
4114         Use scoped_restore_current_pspace_and_thread.
4115         (create_std_terminate_master_breakpoint): Use
4116         scoped_restore_current_program_space.
4117         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
4118         (print_breakpoint_location): Use
4119         scoped_restore_current_program_space.
4120         (bp_loc_is_permanent): Use
4121         scoped_restore_current_pspace_and_thread.
4122         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
4123         (download_tracepoint_locations): Use
4124         scoped_restore_current_pspace_and_thread.
4125         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
4126         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
4127         (enum step_over_calls_kind): Moved from inferior.h.
4128         (class scoped_restore_current_thread): New class.
4129         * gdbthread.h (make_cleanup_restore_current_thread): Delete
4130         declaration.
4131         (scoped_restore_current_thread): New class.
4132         * infcmd.c: Include "common/gdb_optional.h".
4133         (continue_1, proceed_after_attach): Use
4134         scoped_restore_current_thread.
4135         (notice_new_inferior): Use scoped_restore_current_thread.
4136         * inferior.c: Include "progspace-and-thread.h".
4137         (restore_inferior, save_current_inferior): Delete.
4138         (add_inferior_command, clone_inferior_command): Use
4139         scoped_restore_current_pspace_and_thread.
4140         * inferior.h (scoped_restore_current_inferior): New class.
4141         * infrun.c: Include "progspace-and-thread.h" and
4142         "common/gdb_optional.h".
4143         (follow_fork_inferior): Use
4144         scoped_restore_current_pspace_and_thread.
4145         (scoped_restore_exited_inferior): New class.
4146         (handle_vfork_child_exec_or_exit): Use
4147         scoped_restore_exited_inferior,
4148         scoped_restore_current_pspace_and_thread,
4149         scoped_restore_current_thread and scoped_restore.
4150         (fetch_inferior_event): Use scoped_restore_current_thread.
4151         * linespec.c (decode_line_full, decode_line_1): Use
4152         scoped_restore_current_program_space.
4153         * mi/mi-main.c: Include "progspace-and-thread.h".
4154         (exec_continue): Use scoped_restore_current_thread.
4155         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
4156         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
4157         * proc-service.c (ps_pglobal_lookup): Use
4158         scoped_restore_current_program_space.
4159         * progspace-and-thread.c: New file.
4160         * progspace-and-thread.h: New file.
4161         * progspace.c (release_program_space, clone_program_space): Use
4162         scoped_restore_current_program_space.
4163         (restore_program_space, save_current_program_space)
4164         (save_current_space_and_thread): Delete.
4165         (switch_to_program_space_and_thread): Moved to
4166         progspace-and-thread.c.
4167         * progspace.h (save_current_program_space)
4168         (save_current_space_and_thread): Delete declarations.
4169         (scoped_restore_current_program_space): New class.
4170         * remote.c (remote_btrace_maybe_reopen): Use
4171         scoped_restore_current_thread.
4172         * symtab.c: Include "progspace-and-thread.h".
4173         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
4174         * thread.c (print_thread_info_1): Use
4175         scoped_restore_current_thread.
4176         (struct current_thread_cleanup): Delete.
4177         (do_restore_current_thread_cleanup)
4178         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
4179         (scoped_restore_current_thread::~scoped_restore_current_thread):
4180         ... this new dtor.
4181         (make_cleanup_restore_current_thread): Rename/convert to ...
4182         (scoped_restore_current_thread::scoped_restore_current_thread):
4183         ... this new ctor.
4184         (thread_apply_all_command): Use scoped_restore_current_thread.
4185         (thread_apply_command): Use scoped_restore_current_thread.
4186         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
4187         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
4188
4189 2017-05-04  Pedro Alves  <palves@redhat.com>
4190
4191         * thread.c (make_cleanup_restore_current_thread): Move
4192         find_thread_ptid call before the is_stopped call.  Assert that the
4193         thread is found.  Replace is_stopped call by checking the thread's
4194         state directly.  Remove unnecessary NULL-thread check.
4195
4196 2017-05-04  Pedro Alves  <palves@redhat.com>
4197
4198         * corelow.c (thread_section_name): New class.
4199         (get_core_register_section, get_core_siginfo): Use it.
4200
4201 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4202
4203         * corelow.c (sniff_core_bfd): Remove extra semicolon.
4204         (get_core_register_section): Remove xfree of NULL pointer.
4205
4206 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
4207
4208         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
4209         * regcache.c (regcache::raw_supply_zeroed): New function.
4210         * regcache.h (regcache::raw_supply_zeroed): New declaration.
4211
4212 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
4213
4214         * gdbarch.sh: Remove commented out definition of
4215         TARGET_CHAR_BIT.
4216         * gdbarch.h: Re-generate.
4217
4218 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4219
4220         * configure: Regenerate.
4221
4222 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
4223
4224         * solib-target.c (solib_target_relocate_section_addresses):
4225         Remove num_section_bases, num_bases, segment_bases variables.
4226
4227 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4228
4229         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
4230
4231 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4232
4233         * solib-target.c: Include <vector>
4234         (struct lm_info_target) <~lm_info_target>: Remove.
4235         <segment_bases, section_bases>: Change type to
4236         std::vector<CORE_ADDR>.
4237         (library_list_start_segment, library_list_start_section,
4238         library_list_end_library,
4239         solib_target_relocate_section_addresses): Adjust.
4240
4241 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4242
4243         * gdbarch.sh (software_single_step): Change return type to
4244         std::vector<CORE_ADDR>.
4245         * gdbarch.c, gdbarch.h: Re-generate.
4246         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
4247         Adjust.
4248         (arm_deal_with_atomic_sequence_raw): Adjust.
4249         (thumb_get_next_pcs_raw): Adjust.
4250         (arm_get_next_pcs_raw): Adjust.
4251         (arm_get_next_pcs): Adjust.
4252         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
4253         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
4254         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
4255         (alpha_software_single_step): Adjust.
4256         * alpha-tdep.h (alpha_software_single_step): Adjust.
4257         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
4258         * arm-tdep.c (arm_software_single_step): Adjust.
4259         (arm_breakpoint_kind_from_current_state): Adjust.
4260         * arm-tdep.h (arm_software_single_step): Adjust.
4261         * breakpoint.c (insert_single_step_breakpoint): Adjust.
4262         * cris-tdep.c (cris_software_single_step): Adjust.
4263         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
4264         (micromips_deal_with_atomic_sequence): Adjust.
4265         (deal_with_atomic_sequence): Adjust.
4266         (mips_software_single_step): Adjust.
4267         * mips-tdep.h (mips_software_single_step): Adjust.
4268         * moxie-tdep.c (moxie_software_single_step): Adjust.
4269         * nios2-tdep.c (nios2_software_single_step): Adjust.
4270         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
4271         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
4272         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
4273         * s390-linux-tdep.c (s390_software_single_step): Adjust.
4274         * sparc-tdep.c (sparc_software_single_step): Adjust.
4275         * spu-tdep.c (spu_software_single_step): Adjust.
4276         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
4277
4278 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
4279
4280         * gdbarch.sh: Use semi-colon as field separator instead of colon.
4281         * gdbarch.h: Re-generate.
4282
4283 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4284
4285         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
4286         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
4287         * python/py-instruction.c, python/py-instruction.h: New file.
4288         * python/py-record.c: Add py-instruction.h include.
4289         (gdbpy_initialize_record): Make gdb.Instruction a super class of
4290         gdb.RecordInstruction.
4291         * python/python-internal.h: Add gdbpy_initialize_instruction
4292         declaration.
4293         * python/python.c (do_start_initialization): Add
4294         gdbpy_initialize_instruction.
4295
4296 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4297
4298         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
4299         Remove.
4300         (btrace_func_from_recpy_func): New function.
4301         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
4302         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
4303         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
4304         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
4305         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
4306         Also, use new helper functions.
4307         (btpy_list_item): Use new helper functions.
4308         (recpy_bt_function_call_history): Use new type name.
4309         (btpy_call_getset): Remove.
4310         (gdbpy_initialize_btrace): Remove code to initialize
4311         gdb.BtraceFunctionCall.
4312         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
4313         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
4314         recpy_bt_func_prev, recpy_bt_func_next): New export.
4315         * python/py-record.c (recpy_func_type): New static object.
4316         (recpy_func_new, recpy_func_level, recpy_func_symbol,
4317         recpy_func_instructions, recpy_func_up, recpy_func_prev,
4318         recpy_func_next): New function.
4319         (recpy_element_hash, recpy_element_richcompare): Updated comment.
4320         (recpy_func_getset): New static object.
4321         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
4322         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
4323
4324 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4325
4326         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
4327         (btpy_object, btpy_insn_type, btpy_new): Remove.
4328         (btpy_list_object): Use gdb.RecordInstruction type instead of
4329         gdb.BtraceInstruction type.
4330         (btrace_insn_from_recpy_insn): New function.
4331         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
4332         btpy_new.
4333         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
4334         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
4335         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
4336         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
4337         instead of btpy_object.
4338         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4339         btpy_insn_data, btpy_insn_decode): Rename to ...
4340         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
4341         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
4342         recpy_bt_insn_decode): This.  Also, use new helper functions.
4343         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
4344         recpy_insn_type.
4345         (btpy_insn_getset): Remove.
4346         (gdbpy_initialize_btrace): Remove code to initialize
4347         gdb.BtraceInstruction.  Use recpy_element_object.
4348         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
4349         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
4350         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
4351         * python/py-record.c (recpy_insn_type): New static object.
4352         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
4353         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
4354         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
4355         New function.
4356         (recpy_insn_getset): New static object.
4357         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
4358         * python/py-record.h (recpy_element_object): New typedef.
4359         (recpy_insn_type, recpy_insn_new): New export.
4360
4361 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4362
4363         * py-record-btrace.c (btpy_insn_new): Removed.
4364         (btpy_insn_or_gap_new): New function.
4365         (btpy_insn_error): Removed.
4366         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
4367         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
4368         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
4369         btpy_insn_or_gap_new instead of btpy_insn_new.
4370         (btpy_insn_getset): Remove btpy_insn_error.
4371         * py-record.c (recpy_gap_type): New static object.
4372         (recpy_gap_object): New typedef.
4373         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
4374         recpy_gap_reason_string): New function.
4375         (recpy_gap_getset): New static object.
4376         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
4377         * py-record.h (recpy_gap_new): New export.
4378
4379 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4380
4381         * python/py-record.c (recpy_ptid): Remove.
4382         (recpy_record_getset): Remove recpy_ptid.
4383
4384 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4385
4386         * btrace.c (btrace_fetch): Set inferior_ptid.
4387         * python/py-record-btrace.c: Add "py-record.h" include.
4388         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
4389         recpy_bt_end, recpy_bt_instruction_history,
4390         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
4391         in gdb.Record object instead of current ptid.
4392         * python/py-record.c: Include new "py-record.h" file.
4393         (recpy_record_object): Moved to py-record.h.
4394         * python/py-record.h: New file.
4395
4396 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
4397
4398         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
4399         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
4400         indentation.
4401
4402 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
4403
4404         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
4405         the past maintainers section.
4406
4407 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4408
4409         * infcmd.c (get_return_value): Use regcache ctor, and remove
4410         cleanup.
4411
4412 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4413             Pedro Alves  <palves@redhat.com>
4414
4415         * regcache.c (regcache::regcache): New tag dispatch ctor.
4416         (do_cooked_read): Moved above.
4417         (regcache_dup): Use the tag dispatch ctor..
4418         * regcache.h (regcache): Declare ctor, delete copy ctor and
4419         assignment operator, remove friend regcache_dup.
4420
4421 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4422
4423         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
4424         call method save instead of regcache_cpy.
4425         * regcache.h (struct regcache): Make regcache_dup a friend.
4426
4427 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4428
4429         * regcache.c (struct regcache): Move to regcache.h
4430         (regcache::arch): New method.
4431         (regcache_get_ptid): Update.
4432         (get_regcache_arch): Call arch method.
4433         (get_regcache_aspace): Call method aspace.
4434         (register_buffer): Change it to method.
4435         (regcache_save): Change it to regcache::save.
4436         (regcache_restore): Likewise.
4437         (regcache_cpy_no_passthrough): Remove the declaration.
4438         (regcache_cpy): Call methods restore and cpy_no_passthrough.
4439         (regcache_cpy_no_passthrough): Change it to method
4440         cpy_no_passthrough.
4441         (regcache_register_status): Change it to method
4442         get_register_status.
4443         (regcache_invalidate): Change it to method invalidate.
4444         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
4445         (regcache_raw_update): Change it to method raw_update.
4446         (regcache_raw_read): Likewise.
4447         (regcache_raw_read_signed): Likewise.
4448         (regcache_raw_read_unsigned): Likewise.
4449         (regcache_raw_write_signed): Likewise.
4450         (regcache_raw_write_unsigned): Likewise.
4451         (regcache_cooked_read): Likewise.
4452         (regcache_cooked_read_value): Likewise.
4453         (regcache_cooked_read_signed): Likewise.
4454         (regcache_cooked_read_unsigned): Likewise.
4455         (regcache_cooked_write_signed): Likewise.
4456         (regcache_cooked_write_unsigned): Likewise.
4457         (regcache_raw_set_cached_value): Likewise.
4458         (regcache_raw_write): Likewise.
4459         (regcache_cooked_write): Likewise.
4460         (regcache_xfer_part): Likewise.
4461         (regcache_raw_read_part): Likewise.
4462         (regcache_raw_write_part): Likewise.
4463         (regcache_cooked_read_part): Likewise.
4464         (regcache_cooked_write_part): Likewise.
4465         (regcache_raw_supply): Likewise.
4466         (regcache_raw_collect): Likewise.
4467         (regcache_transfer_regset): Likewise.
4468         (regcache_supply_regset): Likewise.
4469         (regcache_collect_regset): Likewise.
4470         (regcache_debug_print_register): Likewise.
4471         (enum regcache_dump_what): Move it to regcache.h.
4472         (regcache_dump): Change it to method dump.
4473         * regcache.h (enum regcache_dump_what): New.
4474         (class regcache): New.
4475         * target.c (target_fetch_registers): Call method
4476         debug_print_register.
4477         (target_store_registers): Likewise.
4478
4479 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4480
4481         * windows-nat.c (struct lm_info_windows): Initialize field.
4482         (windows_make_so): Allocate lm_info_windows with new.
4483         (windows_free_so): Free lm_info_windows with delete.
4484
4485 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4486
4487         * solib-darwin.c (struct lm_info_darwin): Initialize field.
4488         (darwin_current_sos): Allocate lm_info_darwin with new, remove
4489         cleanup.
4490         (darwin_free_so): Free lm_info_darwin with delete.
4491
4492 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4493
4494         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
4495         <l_addr_p>: Change type to bool.
4496         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
4497         (svr4_free_so): Free lm_info_svr4 with delete.
4498         (svr4_copy_library_list): Replace memcpy with call to copy
4499         constructor.
4500         (library_list_start_library, svr4_default_sos): Allocate
4501         lm_info_svr4 with new.
4502
4503 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4504
4505         * solib-target.c (struct lm_info_target): Add destructor,
4506         initialize fields.
4507         <name>: Change type to std::string.
4508         (library_list_start_library): Allocate lm_info_target with new.
4509         (solib_target_free_library_list): Free lm_info_target with
4510         delete.
4511         (solib_target_current_sos): Adapt to std::string.
4512         (solib_target_free_so): Free lm_info_target with delete.
4513
4514 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4515
4516         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
4517         fields.
4518         (frv_current_sos): Allocate lm_info_frv with new.
4519         (frv_relocate_main_executable): Free lm_info_frv with delete,
4520         allocate with new.
4521         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
4522
4523 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4524
4525         * solib-frv.c (struct lm_info_frv): Fix indentation.
4526
4527 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4528
4529         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
4530         map field.
4531         (dsbt_current_sos): Allocate lm_info_dsbt with new.
4532         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
4533         and allocate with new.
4534         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
4535
4536 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4537
4538         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
4539         <filename, member_name>: Change type to std::string.
4540         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
4541         (library_list_start_library): Allocate lm_info_aix with new.
4542         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
4543         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
4544         with copy constructor.
4545
4546 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4547
4548         * solist.h (struct lm_info): Remove.
4549         (struct lm_info_base): New class.
4550         (struct so_list) <lm_info>: Change type to lm_info_base *.
4551         * nto-tdep.c (struct lm_info): Remove.
4552         (lm_addr): Adjust.
4553         * solib-aix.c (struct lm_info): Rename to ...
4554         (struct lm_info_aix): ... this.  Extend lm_info_base.
4555         (lm_info_p): Rename to ...
4556         (lm_info_aix_p): ... this, and adjust.
4557         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
4558         solib_aix_parse_libraries, library_list_start_library,
4559         solib_aix_free_library_list, solib_aix_parse_libraries,
4560         solib_aix_get_library_list,
4561         solib_aix_relocate_section_addresses, solib_aix_free_so,
4562         solib_aix_get_section_offsets,
4563         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
4564         Adjust.
4565         (struct solib_aix_inferior_data) <library_list>: Adjust.
4566         * solib-darwin.c (struct lm_info): Rename to ...
4567         (struct lm_info_darwin): ... this.  Extend lm_info_base.
4568         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
4569         * solib-dsbt.c (struct lm_info): Rename to ...
4570         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
4571         (struct dsbt_info) <main_executable_lm_info): Adjust.
4572         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
4573         dsbt_relocate_section_addresses): Adjust.
4574         * solib-frv.c (struct lm_info): Rename to ...
4575         (struct lm_info_frv): ... this.  Extend lm_info_base.
4576         (main_executable_lm_info): Adjust.
4577         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
4578         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
4579         find_canonical_descriptor_in_load_object,
4580         frv_fdpic_find_canonical_descriptor): Adjust.
4581         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
4582         to lm_info_svr4.
4583         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
4584         svr4_clear_so, svr4_copy_library_list,
4585         library_list_start_library, svr4_default_sos, svr4_read_so_list,
4586         svr4_current_sos, svr4_fetch_objfile_link_map,
4587         solist_update_incremental): Adjust.
4588         * solib-svr4.h (struct lm_info_svr4): Move here from
4589         solib-svr4.c.
4590         * solib-target.c (struct lm_info): Rename to ...
4591         (struct lm_info_target): ... this.  Extend lm_info_base.
4592         (lm_info_p): Rename to ...
4593         (lm_info_target_p): ... this.
4594         (solib_target_parse_libraries, library_list_start_segment,
4595         library_list_start_section, library_list_start_library,
4596         library_list_end_library, solib_target_free_library_list,
4597         solib_target_current_sos, solib_target_free_so,
4598         solib_target_relocate_section_addresses): Adjust.
4599         * windows-nat.c (struct lm_info): Rename to ...
4600         (struct lm_info_windows): ... this.  Extend lm_info_base.
4601         (windows_make_so, handle_load_dll, handle_unload_dll,
4602         windows_xfer_shared_libraries): Adjust.
4603
4604 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
4605
4606         * solib-darwin.c (struct darwin_so_list): Remove.
4607         (darwin_current_sos): Allocate an so_list object instead of a
4608         darwin_so_list, separately allocate an lm_info object.
4609         (darwin_free_so): Free lm_info.
4610
4611 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
4612
4613         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
4614         with fprintf_filtered.
4615
4616 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4617
4618         * regcache.c (regcache::regcache): New function.
4619         (regcache::~regcache): New function.
4620         (regcache_xmalloc_1): Remove.
4621         (regcache_xmalloc): Call new regcache.
4622         (regcache_xfree): Call delete regcache.
4623         (get_thread_arch_aspace_regcache): Call new regcache.
4624
4625 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4626
4627         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
4628         lwp instead of ptid_get_lwp.
4629
4630 2017-04-28  Yao Qi  <yao.qi@linaro.org>
4631
4632         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
4633         lwp_info instead of getting from inferior_ptid.
4634
4635 2017-04-27  Keith Seitz  <keiths@redhat.com>
4636
4637         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
4638         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
4639         (CV_CONVERSION_BADNESS): Define.
4640         (rank_one_type): Remove overly restrictive rvalue reference
4641         rank checks.
4642         Add cv-qualifier checks and subranks for type equality.
4643         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
4644         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
4645         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
4646
4647 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
4648
4649         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
4650         count when creating the object.
4651
4652 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
4653             Ulrich Weigand  <uweigand@de.ibm.com>
4654
4655         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
4656         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
4657         is used in AIX.
4658         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
4659         (process_xcoff_symbol): Likewise.
4660         (scan_xcoff_symtab): Likewise.
4661
4662 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
4663
4664         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
4665         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
4666         (ia64_access_reg): Use get_frame_register_unsigned.
4667         (ia64_access_rse_reg): Likewise.
4668         (ia64_libunwind_frame_prev_register): Likewise.
4669
4670 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
4671
4672         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
4673         * gdbarch.c: Regenerated.
4674         * gdbarch.h: Regenerated.
4675         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
4676         visibility external.
4677         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
4678         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
4679         (enum cfa_how_kind): Move to ...
4680         (struct dwarf2_frame_state_reg_info): Likewise.
4681         (struct dwarf2_frame_state): Likewise.
4682         * dwarf2-frame.h: ... here.
4683         (dwarf2_frame_state_alloc_regs): New declaration.
4684         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
4685         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
4686
4687 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
4688
4689         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
4690         regcache_raw_read_unsigned.
4691         (xtensa_pseudo_register_write): Likewise.
4692
4693 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
4694
4695         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
4696         (nds32_pseudo_register_write): Likewise.
4697
4698 2017-04-25  Yao Qi  <yao.qi@linaro.org>
4699
4700         * regcache.c (struct regcache) <readonly_p>: Change its type
4701         to bool.
4702         (regcache_xmalloc_1): Update parameter type and callers update.
4703
4704 2017-04-25  Yao Qi  <yao.qi@linaro.org>
4705
4706         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
4707         set_gdbarch_wchar_bit.
4708         * arm-tdep.c (arm_gdbarch_init): Likewise.
4709
4710 2017-04-25  Pedro Alves  <palves@redhat.com>
4711
4712         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
4713         (BothAreRelocatable, memcopy, memmove): Don't define.
4714         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
4715         macros.
4716
4717 2017-04-25  Pedro Alves  <palves@redhat.com>
4718
4719         * common/common-defs.h: Include "common/poison.h".
4720         * common/function-view.h: (Not, Or, Requires): Move to traits.h
4721         and adjust.
4722         * common/poison.h: New file.
4723         * common/traits.h: Include <type_traits>.
4724         (Not, Or, Requires): New, moved from common/function-view.h.
4725
4726 2017-04-25  Pedro Alves  <palves@redhat.com>
4727
4728         * breakpoint.h (struct breakpoint): In-class initialize all
4729         fields.  Make boolean fields "bool".
4730         * breakpoint.c (init_raw_breakpoint_without_location): Remove
4731         memset call and initializations no longer necessary.
4732
4733 2017-04-25  Pedro Alves  <palves@redhat.com>
4734
4735         * btrace.c (pt_btrace_insn_flags): Change parameter type to
4736         reference.
4737         (pt_btrace_insn): New function.
4738         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
4739
4740 2017-04-25  Pedro Alves  <palves@redhat.com>
4741
4742         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
4743         "base" field and inherit from "bp_location" instead.  Add
4744         non-default ctor.
4745         (allocate_location_exception): Use new non-default ctor.
4746         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
4747         (init_bp_location): Convert to ...
4748         (bp_location::bp_location): ... this new ctor, and remove memset
4749         call.
4750         (base_breakpoint_allocate_location): Use the new non-default ctor.
4751         * breakpoint.h (bp_location): Now a class.  Declare default and
4752         non-default ctors.  In-class initialize all members.
4753         (init_bp_location): Remove declaration.
4754
4755 2017-04-25  Pedro Alves  <palves@redhat.com>
4756
4757         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
4758         assignment operator.
4759
4760 2017-04-24  Yao Qi  <yao.qi@linaro.org>
4761
4762         * doublest.c (convert_doublest_to_floatformat): Call
4763         floatformat_totalsize_bytes.
4764
4765 2017-04-22  Tom Tromey  <tom@tromey.com>
4766
4767         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4768         ui_out_emit_list.
4769         * stack.c (print_frame): Use ui_out_emit_list.
4770         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4771         ui_out_emit_list.
4772         * mi/mi-main.c (print_one_inferior)
4773         (mi_cmd_data_list_register_names)
4774         (mi_cmd_data_list_register_values, mi_cmd_list_features)
4775         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
4776         ui_out_emit_list.
4777         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
4778         (mi_output_solib_attribs): Use ui_out_emit_list,
4779         ui_out_emit_tuple.
4780         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
4781         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
4782         (mi_cmd_stack_list_args, list_args_or_locals): Use
4783         ui_out_emit_list.
4784         * disasm.c (do_assembly_only): Use ui_out_emit_list.
4785         * breakpoint.c (print_solib_event, output_thread_groups): Use
4786         ui_out_emit_list.
4787
4788 2017-04-22  Tom Tromey  <tom@tromey.com>
4789
4790         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
4791         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
4792         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
4793
4794 2017-04-22  Tom Tromey  <tom@tromey.com>
4795
4796         * tracepoint.c (tvariables_info_1)
4797         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
4798
4799 2017-04-22  Tom Tromey  <tom@tromey.com>
4800
4801         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
4802         annotate_arg_emitter.
4803         * breakpoint.c (print_mention_watchpoint)
4804         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
4805         * annotate.h (struct annotate_arg_emitter): New.
4806
4807 2017-04-22  Tom Tromey  <tom@tromey.com>
4808
4809         * record-btrace.c (record_btrace_insn_history)
4810         (record_btrace_insn_history_range, record_btrace_call_history)
4811         (record_btrace_call_history_range): Use ui_out_emit_tuple.
4812         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
4813         ui_out_emit_tuple.
4814         * stack.c (print_frame_info): Use ui_out_emit_tuple.
4815         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
4816         * skip.c (skip_info): Use ui_out_emit_tuple.
4817         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
4818         * progspace.c (print_program_space): Use ui_out_emit_tuple.
4819         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
4820         * osdata.c (info_osdata): Use ui_out_emit_tuple.
4821         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
4822         ui_out_emit_tuple.
4823         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
4824         (output_register, mi_cmd_data_read_memory)
4825         (mi_cmd_data_read_memory_bytes, mi_load_progress)
4826         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
4827         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
4828         Use ui_out_emit_tuple.
4829         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
4830         ui_out_emit_tuple.
4831         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
4832         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
4833         * linux-thread-db.c (info_auto_load_libthread_db): Use
4834         ui_out_emit_tuple.
4835         * inferior.c (print_inferior): Use ui_out_emit_tuple.
4836         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
4837         * disasm.c (do_mixed_source_and_assembly_deprecated)
4838         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
4839         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
4840         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
4841         * breakpoint.c (print_one_breakpoint_location)
4842         (print_one_breakpoint): Use ui_out_emit_tuple.
4843         * auto-load.c (print_script, info_auto_load_cmd): Use
4844         ui_out_emit_tuple.
4845         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
4846
4847 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
4848
4849         * thread.c (print_thread_info_1): Remove dead code.
4850
4851 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4852
4853         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
4854         GDB_SELF_TEST.
4855         * arm-tdep.c (selftests::arm_record_test): Likewise.
4856
4857 2017-04-21  Yao Qi  <yao.qi@linaro.org>
4858
4859         * regcache.c (regcache_restore): Remove argument 2.  Replace
4860         argument 3 with regcache.  Get register status from
4861         src->register_status and get register contents from
4862         register_buffer (src, regnum).
4863         (regcache_cpy): Update.
4864
4865 2017-04-19  Pedro Alves  <palves@redhat.com>
4866
4867         * gdbthread.h (thread): Add missing closing parenthesis in
4868         comment.
4869
4870 2017-04-19  Pedro Alves  <palves@redhat.com>
4871
4872         * common/refcounted-object.h: New file.
4873         * gdbthread.h: Include "common/refcounted-object.h".
4874         (thread_info): Inherit from refcounted_object and add comments.
4875         (thread_info::incref, thread_info::decref)
4876         (thread_info::m_refcount): Delete.
4877         (thread_info::deletable): Use the refcounted_object::refcount()
4878         method.
4879         * inferior.c (current_inferior_): Add comment.
4880         (set_current_inferior): Increment/decrement refcounts.
4881         (prune_inferiors, remove_inferior_command): Skip inferiors marked
4882         not-deletable instead of comparing with the current inferior.
4883         (initialize_inferiors): Increment the initial inferior's refcount.
4884         * inferior.h (struct inferior): Forward declare.
4885         Include "common/refcounted-object.h".
4886         (current_inferior, set_current_inferior): Move declaration to
4887         before struct inferior's definition, and fix comment.
4888         (inferior): Inherit from refcounted_object.  Add comments.
4889         * thread.c (switch_to_thread_no_regs): Reference the thread's
4890         inferior pointer directly instead of doing a ptid lookup.
4891         (switch_to_no_thread): New function.
4892         (switch_to_thread(thread_info *)): New function, factored out
4893         from ...
4894         (switch_to_thread(ptid_t)): ... this.
4895         (restore_current_thread): Delete.
4896         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
4897         fields, and add 'inf' field.
4898         (do_restore_current_thread_cleanup): Check whether old->inf is
4899         alive instead of looking up an inferior by ptid.  Use
4900         switch_to_thread and switch_to_no_thread.
4901         (restore_current_thread_cleanup_dtor): Use old->inf directly
4902         instead of lookup up an inferior by id.  Decref the inferior.
4903         Don't restore 'removable'.
4904         (make_cleanup_restore_current_thread): Same the inferior pointer
4905         in old, instead of the inferior number.  Incref the inferior.
4906         Don't save/clear 'removable'.
4907
4908 2017-04-19  Pedro Alves  <palves@redhat.com>
4909
4910         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4911         unittests/scoped_restore-selftests.c.
4912         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
4913         * common/scoped_restore.h (scoped_restore_base): Make "class".
4914         (scoped_restore_base::release): New public method.
4915         (scoped_restore_base::scoped_restore_base): New protected ctor.
4916         (scoped_restore_base::m_saved_var): New protected field.
4917         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
4918         scoped_restore_base base class instead of m_saved_var directly.
4919         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
4920         (scoped_restore_tmpl::scoped_restore_tmpl(const
4921         scoped_restore_tmpl<T>&)): Likewise.
4922         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
4923         method.
4924         (scoped_restore_tmpl::saved_var): New method.
4925         (scoped_restore_tmpl::m_saved_var): Delete.
4926         * inferior.h (inferior::detaching): Now a bool.
4927         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
4928         cleanup.
4929         * unittests/scoped_restore-selftests.c: New file.
4930
4931 2017-04-19  Pedro Alves  <palves@redhat.com>
4932
4933         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
4934         Re-sort in alphabetic order.
4935
4936 2017-04-18  Pedro Alves  <palves@redhat.com>
4937
4938         * xml-support.c (obstack_xml_printf): Delete.
4939         * xml-support.h (obstack_xml_printf): Delete.
4940
4941 2017-04-18  Pedro Alves  <palves@redhat.com>
4942
4943         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
4944         vdebug, verror, body_text, start_element, end_element, name,
4945         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
4946         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
4947         is_xinclude>: Make private and add m_ prefix.
4948         (gdb_xml_parser::body_text): New method, based on ...
4949         (gdb_xml_body_text): ... this.  Adjust.
4950         (gdb_xml_parser::vdebug): New method, based on ...
4951         (gdb_xml_debug): ... this.  Adjust.
4952         (gdb_xml_parser::verror): New method, based on ...
4953         (gdb_xml_error): ... this.  Adjust.
4954         (gdb_xml_parser::start_element): New method, based on ...
4955         (gdb_xml_start_element): ... this.  Adjust.
4956         (gdb_xml_start_element_wrapper): Defer to
4957         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
4958         (gdb_xml_parser::end_element): New method, based on ...
4959         (gdb_xml_end_element_wrapper): ... this.  Adjust.
4960         (gdb_xml_parser::~gdb_xml_parser): Adjust.
4961         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
4962         (gdb_xml_parser::use_dtd): New method, based on ...
4963         (gdb_xml_use_dtd): ... this.  Adjust.
4964         (gdb_xml_parser::parse): New method, based on ...
4965         (gdb_xml_parse): ... this.  Adjust.
4966         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
4967         (xinclude_start_include): Adjust to call the parser's name method.
4968         (xml_xinclude_default, xml_xinclude_start_doctype)
4969         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
4970         method.
4971         (xml_process_xincludes): Adjust to call parser methods.
4972         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
4973         declarations.
4974
4975 2017-04-18  Pedro Alves  <palves@redhat.com>
4976
4977         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
4978         gdb::optional<std::string>.
4979         * xml-support.c: Include <string>.
4980         (scope_level::scope_level(scope_level &&))
4981         (scope_level::~scope_level): Delete.
4982         (scope_level::body): Now a std::string.
4983         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
4984         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
4985         parameter.
4986         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
4987         (xinclude_parsing_data::output): Now a std::string reference.
4988         (xinclude_start_include): Adjust.
4989         (xml_xinclude_default): Adjust.
4990         (xml_process_xincludes): Add 'output' parameter, and return bool.
4991         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
4992         and return bool.
4993         * xml-tdesc.c: Include <unordered_map> and <string>.
4994         (tdesc_xml_cache): Delete.
4995         (tdesc_xml_cache_s): Delete.
4996         (xml_cache): Now an std::unordered_map.
4997         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
4998         (target_fetch_description_xml): Change return type to
4999         gdb::optional<std::string>, and adjust.
5000         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
5001         (target_fetch_description_xml): Change return type to
5002         gdb::optional<std::string>.
5003
5004 2017-04-18  Pedro Alves  <palves@redhat.com>
5005
5006         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5007         unittests/optional-selftests.c.
5008         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
5009         * unittests/optional-selftests.c: New file.
5010         * unittests/optional/assignment/1.cc: New file.
5011         * unittests/optional/assignment/2.cc: New file.
5012         * unittests/optional/assignment/3.cc: New file.
5013         * unittests/optional/assignment/4.cc: New file.
5014         * unittests/optional/assignment/5.cc: New file.
5015         * unittests/optional/assignment/6.cc: New file.
5016         * unittests/optional/assignment/7.cc: New file.
5017         * unittests/optional/cons/copy.cc: New file.
5018         * unittests/optional/cons/default.cc: New file.
5019         * unittests/optional/cons/move.cc: New file.
5020         * unittests/optional/cons/value.cc: New file.
5021         * unittests/optional/in_place.cc: New file.
5022         * unittests/optional/observers/1.cc: New file.
5023         * unittests/optional/observers/2.cc: New file.
5024
5025 2017-04-18  Pedro Alves  <palves@redhat.com>
5026
5027         * common/gdb_optional.h: Include common/traits.h.
5028         (in_place_t): New type.
5029         (in_place): New constexpr variable.
5030         (optional::optional): Remove member initialization of
5031         m_instantiated.
5032         (optional::optional(in_place_t...)): New constructor.
5033         (optional::~optional): Use reset.
5034         (optional::optional(const optional&)): New.
5035         (optional::optional(const optional&&)): New.
5036         (optional::optional(T &)): New.
5037         (optional::optional(T &&)): New.
5038         (operator::operator=(const optional &)): New.
5039         (operator::operator=(optional &&)): New.
5040         (operator::operator= (const T &))
5041         (operator::operator= (T &&))
5042         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
5043         (operator::reset): New.
5044         (operator::m_instantiated):: Add in-class initializer.
5045         * common/traits.h: Include <type_traits>.
5046         (struct And): New types.
5047
5048 2017-04-18  Pedro Alves  <palves@redhat.com>
5049
5050         * xml-support.c: Include <vector>.
5051         (scope_level::scope_level(const gdb_xml_element *))
5052         (scope_level::scope_level(scope_level&&)): New.
5053         (scope_level::~scope_level): New.
5054         (scope_level_s): Delete.
5055         (gdb_xml_parser::scopes): Now a std::vector.
5056         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
5057         Use std::vector.
5058         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
5059         scope cleanup code.
5060         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
5061         of the scopes member.  Use std::vector::emplace_back.
5062
5063 2017-04-18  Pedro Alves  <palves@redhat.com>
5064
5065         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
5066         a bool.
5067         (gdb_xml_end_element): Change type of first parameter.
5068         (gdb_xml_cleanup): Rename to ...
5069         (gdb_xml_parser::~gdb_xml_parser): ... this.
5070         (gdb_xml_create_parser_and_cleanup): Delete with ...
5071         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
5072         to this new ctor.
5073         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
5074         using gdb_xml_create_parser_and_cleanup.
5075         (xinclude_parsing_data): Add ctor/dtor.
5076         (xml_xinclude_cleanup): Delete.
5077         (xml_process_xincludes): Create a local xinclude_parsing_data
5078         instead of heap-allocating one.  Create a local gdb_xml_parser
5079         instead of heap-allocating one with
5080         gdb_xml_create_parser_and_cleanup.
5081
5082 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
5083
5084         PR threads/20743
5085         * fbsd-nat.c (resume_one_thread_cb): Remove.
5086         (resume_all_threads_cb): Remove.
5087         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
5088         iterate_over_threads.
5089
5090 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
5091
5092         * NEWS: Create a new section for the next release branch.
5093         Rename the section of the current branch, now that it has
5094         been cut.
5095
5096 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
5097
5098         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
5099         * version.in: Bump version to 8.0.50.DATE-git.
5100
5101 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
5102
5103         PR gdb/21385
5104         * windows-nat.c (windows_create_inferior): Declare 'allargs'
5105         independently of the host, and fix build breakage on Cygwin.
5106
5107 2017-04-13  Pedro Alves  <palves@redhat.com>
5108
5109         * inferior.c (free_inferior): Convert to ...
5110         (inferior::~inferior): ... this dtor.
5111         (inferior::inferior): New ctor, factored out from ...
5112         (add_inferior_silent): ... here.  Allocate the inferior with a new
5113         expression.
5114         (delete_inferior): Call delete instead of free_inferior.
5115         * inferior.h (gdb_environ, continuation): Forward declare.
5116         (inferior): Now a class.  Add in-class initialization to all
5117         members.  Make boolean fields bool, except 'detaching'.
5118         (inferior::inferior): New explicit ctor.
5119         (inferior::~inferior): New.
5120
5121 2017-04-13  Pedro Alves  <palves@redhat.com>
5122
5123         * inferior.c (init_inferior_list): Delete.
5124         * inferior.h (init_inferior_list): Delete.
5125
5126 2017-04-13  Pedro Alves  <palves@redhat.com>
5127
5128         PR threads/13217
5129         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
5130         (top level): Call it twice, with different thread sets.
5131
5132 2017-04-13  Pedro Alves  <palves@redhat.com>
5133
5134         * thread.c: Include <algorithm>.
5135         (thread_array_cleanup): Delete.
5136         (scoped_inc_dec_ref): New class.
5137         (live_threads_count): New function.
5138         (set_thread_refcount): Delete.
5139         (tp_array_compar_ascending): Now a bool.
5140         (tp_array_compar): Convert to a std::sort comparison function.
5141         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
5142         and live_threads_count.
5143
5144 2017-04-13  Pedro Alves  <palves@redhat.com>
5145
5146         * infrun.c (follow_fork_inferior): Also switch the current
5147         inferior.
5148
5149 2017-04-13  Pedro Alves  <palves@redhat.com>
5150
5151         * breakpoint.c (watch_command_1): Save watchpoint-frame info
5152         before calling create_internal_breakpoint.
5153
5154 2017-04-13  Pedro Alves  <palves@redhat.com>
5155
5156         * fork-child.c (execv_argv): New class.
5157         (breakup_args): Refactored as ...
5158         (execv_argv::init_for_no_shell): .. this method of execv_argv.
5159         Copy arguments to storage and replace separators with NULL
5160         terminators in place.
5161         (escape_bang_in_quoted_argument): Adjust to return bool.
5162         (execv_argv::execv_argv): New ctor.
5163         (execv_argv::init_for_shell): New method, factored out from
5164         fork_inferior.  Don't strdup strings into the vector.
5165         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
5166         Remove free_vector_argv call.
5167
5168 2017-04-13  Yao Qi  <yao.qi@linaro.org>
5169
5170         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
5171         tdep->rx_psw_type.
5172
5173 2017-04-13  Yao Qi  <yao.qi@linaro.org>
5174
5175         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
5176         * rx-tdep.c (rx_gdbarch_init): Likewise.
5177
5178 2017-04-13  Pedro Alves  <palves@redhat.com>
5179
5180         * breakpoint.h (struct breakpoint): Reindent.
5181
5182 2017-04-13  Pedro Alves  <palves@redhat.com>
5183
5184         * breakpoint.c (bp_location): Rename to ...
5185         (bp_locations): ... this.  All references updated.
5186         (bp_location_count): Rename to ...
5187         (bp_locations_count): ... this.  All references updated.
5188         (bp_location_placed_address_before_address_max): Rename to ...
5189         (bp_locations_placed_address_before_address_max): ... this.  All
5190         references updated.
5191         (bp_location_shadow_len_after_address_max): Rename to ...
5192         (bp_locations_shadow_len_after_address_max): ... this.  All
5193         references updated.
5194         (bp_location_compare_addrs): Rename to ...
5195         (bp_locations_compare_addrs): ... this.  All references updated.
5196         (bp_location_compare):Rename to ...
5197         (bp_locations_compare): ... this.  All references updated.
5198         (bp_location_target_extensions_update): Rename to ...
5199         (bp_locations_target_extensions_update): ... this.  All references
5200         updated.
5201
5202 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5203
5204         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
5205         * common/common.m4: Check headers 'termios.h', 'termio.h' and
5206         'sgtty.h'.
5207         * common/gdb_termios.h: New file, with parts of "terminal.h".
5208         * inflow.c: Include "gdb_termios.h".
5209         * ser-unix.c: Include "gdb_termios.h".
5210         * terminal.h: Move terminal-related defines to
5211         "common/gdb_termios.h".
5212
5213 2017-04-12  Tom Tromey  <tom@tromey.com>
5214
5215         * probe.c (parse_probes): Update.
5216         * location.h (delete_event_location): Don't declare.
5217         (event_location_deleter::operator()): Update.
5218         * location.c (event_location_deleter::operator()): Rename from
5219         delete_event_location.
5220         * linespec.h (linespec_result) <location>: Change type to
5221         event_location_up.
5222         * linespec.c (canonicalize_linespec, event_location_to_sals)
5223         (decode_objc): Update.
5224         (linespec_result): Don't call delete_event_location.
5225         * breakpoint.c (create_breakpoints_sal)
5226         (bkpt_probe_create_sals_from_location)
5227         (strace_marker_create_sals_from_location): Update.
5228
5229 2017-04-12  Tom Tromey  <tom@tromey.com>
5230
5231         * linespec.h (struct linespec_result): Add constructor and
5232         destructor.
5233         (init_linespec_result, destroy_linespec_result)
5234         (make_cleanup_destroy_linespec_result): Don't declare.
5235         * linespec.c (init_linespec_result): Remove.
5236         (linespec_result::~linespec_result): Rename from
5237         destroy_linespec_result.  Update.
5238         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
5239         Remove.
5240         * breakpoint.c (create_breakpoint, break_range_command)
5241         (decode_location_default): Update.
5242         * ax-gdb.c (agent_command_1): Update.
5243
5244 2017-04-12  Tom Tromey  <tom@tromey.com>
5245
5246         * remote.c (remote_download_tracepoint): Update.
5247         * python/py-breakpoint.c (bppy_get_location): Update.
5248         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
5249         (gdbscm_breakpoint_location): Update.
5250         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
5251         * breakpoint.h (struct breakpoint) <location, location_range_end>:
5252         Change type to event_location_up.
5253         * breakpoint.c (create_overlay_event_breakpoint)
5254         (create_longjmp_master_breakpoint)
5255         (create_std_terminate_master_breakpoint)
5256         (create_exception_master_breakpoint)
5257         (breakpoint_event_location_empty_p, print_breakpoint_location)
5258         (print_one_breakpoint_location, create_thread_event_breakpoint)
5259         (init_breakpoint_sal, create_breakpoint)
5260         (print_recreate_ranged_breakpoint, break_range_command)
5261         (init_ada_exception_breakpoint, say_where): Update.
5262         (base_breakpoint_dtor): Don't call delete_event_location.
5263         (bkpt_print_recreate, tracepoint_print_recreate)
5264         (dprintf_print_recreate, update_static_tracepoint)
5265         (breakpoint_re_set_default): Update.
5266
5267 2017-04-12  Tom Tromey  <tom@tromey.com>
5268
5269         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
5270         type of "to_do".  Update.
5271         (compute_stack_depth): Use std::vector.
5272
5273 2017-04-12  Tom Tromey  <tom@tromey.com>
5274
5275         * printcmd.c (find_instruction_backward): Use std::vector.
5276
5277 2017-04-12  Tom Tromey  <tom@tromey.com>
5278
5279         * symfile.c (objfilep): Remove typedef.
5280         (reread_symbols): Use a std::vector.
5281
5282 2017-04-12  Tom Tromey  <tom@tromey.com>
5283
5284         * mi/mi-main.c (exec_direction_forward): Remove.
5285         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
5286         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5287         scoped_restore.
5288         * guile/guile.c (guile_repl_command, guile_command)
5289         (gdbscm_execute_gdb_command): Use scoped_restore.
5290         * go-exp.y (go_parse): Use scoped_restore.
5291         * d-exp.y (d_parse): Use scoped_restore.
5292         * cli/cli-decode.c (cmd_func): Use scoped_restore.
5293         * c-exp.y (c_parse): Use scoped_restore.
5294
5295 2017-04-12  Tom Tromey  <tom@tromey.com>
5296
5297         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
5298         (mi_parse): Update return type.
5299         (mi_parse_free): Remove.
5300         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
5301         (mi_parse::~mi_parse): Rename from mi_parse_free.
5302         (mi_parse_cleanup): Remove.
5303         (mi_parse): Return a unique_ptr.  Use new.
5304         * mi/mi-main.c (mi_execute_command): Update.
5305
5306 2017-04-12  Tom Tromey  <tom@tromey.com>
5307
5308         * location.c (explicit_location_lex_one): Return a
5309         unique_xmalloc_ptr.
5310         (string_to_explicit_location): Update.  Remove cleanups.
5311
5312 2017-04-12  Tom Tromey  <tom@tromey.com>
5313
5314         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
5315         (compare_value_and_voffset): Change type.  Update.
5316         (compute_vtable_size): Change type of "offset_vec".
5317         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
5318         (gnuv3_get_typeid): Remove extraneous declaration.
5319
5320 2017-04-12  Tom Tromey  <tom@tromey.com>
5321
5322         * charset.h (wchar_iterator): Fix comment.
5323
5324 2017-04-12  Tom Tromey  <tom@tromey.com>
5325
5326         * charset.c (iconv_wrapper): New class.
5327         (cleanup_iconv): Remove.
5328         (convert_between_encodings): Use it.
5329
5330 2017-04-12  Tom Tromey  <tom@tromey.com>
5331
5332         * symfile.h (increment_reading_symtab): Update type.
5333         * symfile.c (decrement_reading_symtab): Remove.
5334         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
5335         * psymtab.c (psymtab_to_symtab): Update.
5336         * dwarf2read.c (dw2_instantiate_symtab): Update.
5337
5338 2017-04-12  Tom Tromey  <tom@tromey.com>
5339
5340         * jit.c (struct jit_reader): Declare separately.  Add constructor
5341         and destructor.  Change type of "handle".
5342         (loaded_jit_reader): Define separately.
5343         (jit_reader_load): Update.  New "new".
5344         (jit_reader_unload_command): Use "delete".
5345         * gdb-dlfcn.h (struct dlclose_deleter): New.
5346         (gdb_dlhandle_up): New typedef.
5347         (gdb_dlopen, gdb_dlsym): Update types.
5348         (gdb_dlclose): Remove.
5349         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
5350         (gdb_dlsym): Change type of "handle".
5351         (make_cleanup_dlclose): Remove.
5352         (dlclose_deleter::operator()): Rename from gdb_dlclose.
5353         * compile/compile-c-support.c (load_libcc): Update.
5354
5355 2017-04-12  Tom Tromey  <tom@tromey.com>
5356
5357         * symtab.h (find_pcs_for_symtab_line): Change return type.
5358         * symtab.c (find_pcs_for_symtab_line): Change return type.
5359         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
5360         type of "vec".  Update.
5361         (ltpy_get_pcs_for_line): Update.
5362         * linespec.c (decode_digits_ordinary): Update.
5363
5364 2017-04-12  Tom Tromey  <tom@tromey.com>
5365
5366         * tracepoint.c (actions_command): Update.
5367         * python/python.c (python_command, python_interactive_command):
5368         Update.
5369         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5370         * guile/guile.c (guile_command): Update.
5371         * defs.h (read_command_lines, read_command_lines_1): Return
5372         command_line_up.
5373         (command_lines_deleter): New struct.
5374         (command_line_up): New typedef.
5375         * compile/compile.c (compile_code_command)
5376         (compile_print_command): Update.
5377         * cli/cli-script.h (get_command_line, copy_command_lines): Return
5378         command_line_up.
5379         (make_cleanup_free_command_lines): Remove.
5380         * cli/cli-script.c (get_command_line, read_command_lines_1)
5381         (copy_command_lines): Return command_line_up.
5382         (while_command, if_command, read_command_lines, define_command)
5383         (document_command): Update.
5384         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
5385         Remove.
5386         * breakpoint.h (breakpoint_set_commands): Change type of
5387         "commands".
5388         * breakpoint.c (breakpoint_set_commands): Change type of
5389         "commands".  Update.
5390         (do_map_commands_command, update_dprintf_command_list)
5391         (create_tracepoint_from_upload): Update.
5392
5393 2017-04-12  Tom Tromey  <tom@tromey.com>
5394
5395         * tracepoint.c (scope_info): Update.
5396         * spu-tdep.c (spu_catch_start): Update.
5397         * python/python.c (gdbpy_decode_line): Update.
5398         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
5399         * python/py-breakpoint.c (bppy_init): Update.
5400         * probe.c (parse_probes): Update.
5401         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
5402         * location.h (event_location_deleter): New struct.
5403         (event_location_up): New typedef.
5404         (new_linespec_location, new_address_location, new_probe_location)
5405         (new_explicit_location, copy_event_location)
5406         (string_to_event_location, string_to_event_location_basic)
5407         (string_to_explicit_location): Update return type.
5408         (make_cleanup_delete_event_location): Remove.
5409         * location.c (new_linespec_location, new_address_location)
5410         (new_probe_location, new_explicit_location, copy_event_location):
5411         Return event_location_up.
5412         (delete_event_location_cleanup)
5413         (make_cleanup_delete_event_location): Remove.
5414         (string_to_explicit_location, string_to_event_location_basic)
5415         (string_to_event_location): Return event_location_up.
5416         * linespec.c (canonicalize_linespec, event_location_to_sals)
5417         (decode_line_with_current_source)
5418         (decode_line_with_last_displayed, decode_objc): Update.
5419         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
5420         * completer.c (location_completer): Update.
5421         * cli/cli-cmds.c (edit_command, list_command): Update.
5422         * breakpoint.c (create_overlay_event_breakpoint)
5423         (create_longjmp_master_breakpoint)
5424         (create_std_terminate_master_breakpoint)
5425         (create_exception_master_breakpoint)
5426         (create_thread_event_breakpoint): Update.
5427         (init_breakpoint_sal): Update.  Remove some dead code.
5428         (create_breakpoint_sal): Change type of "location".  Update.
5429         (create_breakpoints_sal, create_breakpoint, break_command_1)
5430         (dprintf_command, break_range_command, until_break_command)
5431         (init_ada_exception_breakpoint)
5432         (strace_marker_create_sals_from_location)
5433         (update_static_tracepoint, trace_command, ftrace_command)
5434         (strace_command, create_tracepoint_from_upload): Update.
5435         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5436         * ax-gdb.c (agent_command_1): Update.
5437
5438 2017-04-12  Pedro Alves  <palves@redhat.com>
5439
5440         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
5441         * configure.tgt: Handle i[34567]86-*-go32* and
5442         i[34567]86-*-msdosdjgpp*.
5443         * i386-tdep.c (i386_svr4_reg_to_regnum):
5444         Make extern.
5445         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
5446         i386-go32-tdep.c.
5447         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
5448         * i386-go32-tdep.c: New file.
5449         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
5450         declarations.
5451
5452 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
5453
5454         * aix-thread.c (pd_status2str): Change return type to const char *.
5455
5456 2017-04-12  Pedro Alves  <palves@redhat.com>
5457
5458         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
5459         calls to set_gdbarch_gnu_triplet_regexp.
5460
5461 2017-04-12  Pedro Alves  <palves@redhat.com>
5462
5463         PR gdb/21323
5464         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
5465         New enum value.
5466         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
5467         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
5468         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
5469         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
5470         * gdbarch.h, gdbarch.c: Regenerate.
5471         * aarch64-tdep.c (aarch64_gdbarch_init): Override
5472         gdbarch_wchar_bit and gdbarch_wchar_signed.
5473         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
5474         * arm-tdep.c (arm_gdbarch_init): Likewise.
5475         * avr-tdep.c (avr_gdbarch_init): Likewise.
5476         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
5477         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
5478         * i386-tdep.c (i386_go32_init_abi): Likewise.
5479         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5480         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5481         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5482         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5483         * sh-tdep.c (sh_gdbarch_init): Likewise.
5484         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5485         * sparc64-tdep.c (sparc64_init_abi): Likewise.
5486         * windows-tdep.c (windows_init_abi): Likewise.
5487         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5488
5489 2017-04-12  Pedro Alves  <palves@redhat.com>
5490
5491         PR c++/21323
5492         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
5493         cplus_primitive_type_char32_t>: New enum values.
5494         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
5495         and cplus_primitive_type_char32_t.
5496         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
5497         32, use the archtecture's built-in type for char16_t and char32_t,
5498         respectively.  Otherwise, fallback to init_integer_type as before,
5499         but make the type unsigned, and issue a complaint.
5500         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
5501
5502 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
5503
5504         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
5505         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
5506
5507 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5508
5509         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
5510         'const char *'.
5511
5512 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5513
5514         * common/common-utils.c (free_vector_argv): New function.
5515         * common/common-utils.h: Include <vector>.
5516         (free_vector_argv): New prototype.
5517         * darwin-nat.c (darwin_create_inferior): Rewrite function
5518         prototype in order to constify "exec_file" and accept a
5519         "std::string" for "allargs".
5520         * fork-child.c: Include <vector>.
5521         (breakup_args): Rewrite function, using C++.
5522         (fork_inferior): Rewrite function header, constify "exec_file_arg"
5523         and accept "std::string" for "allargs".  Update the code to
5524         calculate "argv" based on "allargs".  Update calls to "exec_fun"
5525         and "execvp".
5526         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
5527         order to constify "exec_file" and accept a "std::string" for
5528         "allargs".
5529         * go32-nat.c (go32_create_inferior): Likewise.
5530         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
5531         * infcmd.c (run_command_1): Constify "exec_file".  Use
5532         "std::string" for inferior arguments.
5533         * inferior.h (fork_inferior): Update prototype.
5534         * linux-nat.c (linux_nat_create_inferior): Rewrite function
5535         prototype in order to constify "exec_file" and accept a
5536         "std::string" for "allargs".
5537         * nto-procfs.c (procfs_create_inferior): Likewise.
5538         * procfs.c (procfs_create_inferior): Likewise.
5539         * remote-sim.c (gdbsim_create_inferior): Likewise.
5540         * remote.c (extended_remote_run): Update code to accept
5541         "std::string" as argument.
5542         (extended_remote_create_inferior): Rewrite function prototype in
5543         order to constify "exec_file" and accept a "std::string" for
5544         "allargs".
5545         * rs6000-nat.c (super_create_inferior): Likewise.
5546         (rs6000_create_inferior): Likewise.
5547         * target.h (struct target_ops) <to_create_inferior>: Likewise.
5548         * windows-nat.c (windows_create_inferior): Likewise.
5549
5550 2017-04-11  Pedro Alves  <palves@redhat.com>
5551
5552         * thread.c: Fix whitespace throughout.
5553
5554 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
5555
5556         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
5557
5558 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
5559
5560         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
5561
5562 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
5563
5564         PR gdb/21364
5565         * osdata.c (info_osdata): Check if 'type' is an empty string
5566         instead of NULL.
5567
5568 2017-04-10  Pedro Alves  <palves@redhat.com>
5569
5570         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
5571         (ptid_to_global_thread_id, in_thread_list)
5572         (do_captured_list_thread_ids, set_resumed, set_running)
5573         (set_executing, set_stop_requested, finish_thread_state)
5574         (validate_registers_access, can_access_registers_ptid)
5575         (print_thread_info_1, switch_to_thread)
5576         (do_restore_current_thread_cleanup)
5577         (make_cleanup_restore_current_thread, thread_command)
5578         (thread_name_command): Use operator== instead of ptid_equal.
5579
5580 2017-04-10  Pedro Alves  <palves@redhat.com>
5581
5582         * thread.c (struct current_thread_cleanup) <next>: Delete field.
5583         (current_thread_cleanup_chain): Delete.
5584         (restore_current_thread_cleanup_dtor)
5585         (make_cleanup_restore_current_thread): Remove references to
5586         current_thread_cleanup_chain.
5587
5588 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
5589
5590         * msp430-tdep.c (msp430_pseudo_register_read): Never return
5591         REG_UNKNOWN.
5592
5593 2017-04-10  Yao Qi  <yao.qi@linaro.org>
5594
5595         PR gdb/19942
5596         * gdbthread.h (thread_info::deletable): New method.
5597         (thread_info::incref): New method.
5598         (thread_info::decref): New method.
5599         (thread_info::refcount): Move it to private.
5600         * infrun.c (save_stop_context): Call inc_refcount.
5601         (release_stop_context_cleanup): Likewise.
5602         * thread.c (set_thread_exited): New function.
5603         (init_thread_list): Delete "tp" only it is deletable, otherwise
5604         call set_thread_exited.
5605         (delete_thread_1): Call set_thread_exited.
5606         (current_thread_cleanup) <inferior_pid>: Remove.
5607         <thread>: New field.
5608         (restore_current_thread_ptid_changed): Removed.
5609         (do_restore_current_thread_cleanup): Adjust.
5610         (restore_current_thread_cleanup_dtor): Don't call
5611         find_thread_ptid.
5612         (set_thread_refcount): Use dec_refcount.
5613         (make_cleanup_restore_current_thread): Adjust.
5614         (thread_apply_all_command): Call inc_refcount.
5615         (_initialize_thread): Don't call
5616         observer_attach_thread_ptid_changed.
5617
5618 2017-04-10  Yao Qi  <yao.qi@linaro.org>
5619
5620         * thread.c (delete_thread_1): Hoist code on marking thread as
5621         exited.
5622
5623 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
5624
5625         * windows-nat.c (windows_detach): Initialize ptid with
5626         minus_one_ptid.
5627
5628 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
5629
5630         * unittests/ptid-selftests.c: Fix erroneous assert messages.
5631
5632 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
5633
5634         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
5635         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
5636         (bfin_pseudo_register_write): Likewise
5637
5638 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
5639
5640         * common/ptid.h (struct ptid): Change to...
5641         (class ptid_t): ... this.
5642         <ptid_t>: New constructors.
5643         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
5644         matches>: New methods.
5645         <make_null, make_minus_one>: New static methods.
5646         <pid>: Rename to...
5647         <m_pid>: ...this.
5648         <lwp>: Rename to...
5649         <m_lwp>: ...this.
5650         <tid>: Rename to...
5651         <m_tid>: ...this.
5652         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
5653         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
5654         as references, move comment to class ptid_t.
5655         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
5656         ptid_t static methods.
5657         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
5658         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
5659         Take ptid arguments as references, implement using ptid_t methods.
5660         * unittests/ptid-selftests.c: New file.
5661         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5662         unittests/ptid-selftests.c.
5663         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
5664
5665 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5666
5667         * python/python.c (python_run_simple_file): Cast mode literal to
5668         non-const char pointer as expected by PyFile_FromString.
5669
5670 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
5671
5672         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
5673         minus_one_ptid and null_ptid.
5674
5675 2017-04-05  Pedro Alves  <palves@redhat.com>
5676
5677         * warning.m4 (build_warnings): Remove -Wno-write-strings.
5678         * configure: Regenerate.
5679
5680 2017-04-05  Pedro Alves  <palves@redhat.com>
5681
5682         * ada-exp.y (yyerror): Constify.
5683         * ada-lang.c (bound_name, get_selections)
5684         (ada_variant_discrim_type)
5685         (ada_variant_discrim_name, ada_value_struct_elt)
5686         (ada_lookup_struct_elt_type, is_unchecked_variant)
5687         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
5688         (catch_ada_exception_command_split)
5689         (catch_ada_assert_command_split, catch_assert_command)
5690         (ada_op_name): Constify.
5691         * ada-lang.h (ada_yyerror, get_selections)
5692         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
5693         * arc-tdep.c (arc_print_frame_cache): Constify.
5694         * arm-tdep.c (arm_skip_stub): Constify.
5695         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
5696         (gen_aggregate_elt_ref): Constify.
5697         * bcache.c (print_bcache_statistics): Constify.
5698         * bcache.h (print_bcache_statistics): Constify.
5699         * break-catch-throw.c (catch_exception_command_1):
5700         * breakpoint.c (struct ep_type_description::description):
5701         Constify.
5702         (add_solib_catchpoint): Constify.
5703         (catch_fork_command_1): Add cast.
5704         (add_catch_command): Constify.
5705         * breakpoint.h (add_catch_command, add_solib_catchpoint):
5706         Constify.
5707         * bsd-uthread.c (bsd_uthread_state): Constify.
5708         * buildsym.c (patch_subfile_names): Constify.
5709         * buildsym.h (next_symbol_text_func, patch_subfile_names):
5710         Constify.
5711         * c-exp.y (yyerror): Constify.
5712         (token::oper): Constify.
5713         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
5714         * c-varobj.c (cplus_describe_child): Constify.
5715         * charset.c (find_charset_names): Add cast.
5716         (find_charset_names): Constify array and add const_cast.
5717         * cli/cli-cmds.c (complete_command, cd_command): Constify.
5718         (edit_command): Constify.
5719         * cli/cli-decode.c (lookup_cmd): Constify.
5720         * cli/cli-dump.c (dump_memory_command, dump_value_command):
5721         Constify.
5722         (struct dump_context): Constify.
5723         (add_dump_command, restore_command): Constify.
5724         * cli/cli-script.c (get_command_line): Constify.
5725         * cli/cli-script.h (get_command_line): Constify.
5726         * cli/cli-utils.c (check_for_argument): Constify.
5727         * cli/cli-utils.h (check_for_argument): Constify.
5728         * coff-pe-read.c (struct read_pe_section_data): Constify.
5729         * command.h (lookup_cmd): Constify.
5730         * common/print-utils.c (decimal2str): Constify.
5731         * completer.c (gdb_print_filename): Constify.
5732         * corefile.c (set_gnutarget): Constify.
5733         * cp-name-parser.y (yyerror): Constify.
5734         * cp-valprint.c (cp_print_class_member): Constify.
5735         * cris-tdep.c (cris_register_name, crisv32_register_name):
5736         Constify.
5737         * d-exp.y (yyerror): Constify.
5738         (struct token::oper): Constify.
5739         * d-lang.h (d_yyerror): Constify.
5740         * dbxread.c (struct header_file_location::name): Constify.
5741         (add_old_header_file, add_new_header_file, last_function_name)
5742         (dbx_next_symbol_text, add_bincl_to_list)
5743         (find_corresponding_bincl_psymtab, set_namestring)
5744         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
5745         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
5746         * defs.h (command_line_input, print_address_symbolic)
5747         (deprecated_readline_begin_hook): Constify.
5748         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
5749         Constify.
5750         * event-top.c (handle_line_of_input): Constify and add cast.
5751         * exceptions.c (catch_errors): Constify.
5752         * exceptions.h (catch_errors): Constify.
5753         * expprint.c (print_subexp_standard, op_string, op_name)
5754         (op_name_standard, dump_raw_expression, dump_raw_expression):
5755         * expression.h (op_name, op_string, dump_raw_expression):
5756         Constify.
5757         * f-exp.y (yyerror): Constify.
5758         (struct token::oper): Constify.
5759         (struct f77_boolean_val::name): Constify.
5760         * f-lang.c (f_word_break_characters): Constify.
5761         * f-lang.h (f_yyerror): Constify.
5762         * fork-child.c (fork_inferior): Add cast.
5763         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
5764         (new_variant): Constify.
5765         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
5766         * gdbarch.c: Regenerate.
5767         * gdbcore.h (set_gnutarget): Constify.
5768         * go-exp.y (yyerror): Constify.
5769         (token::oper): Constify.
5770         * go-lang.h (go_yyerror): Constify.
5771         * go32-nat.c (go32_sysinfo): Constify.
5772         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
5773         * guile/scm-cmd.c (cmdscm_function): Constify.
5774         * guile/scm-param.c (pascm_param_value): Constify.
5775         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
5776         (h8300sx_register_name): Constify.
5777         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
5778         Constify.
5779         * ia64-tdep.c (ia64_register_names): Constify.
5780         * infcmd.c (construct_inferior_arguments): Constify.
5781         (path_command, attach_post_wait): Constify.
5782         * language.c (show_range_command, show_case_command)
5783         (unk_lang_error): Constify.
5784         * language.h (language_defn::la_error)
5785         (language_defn::la_name_of_this): Constify.
5786         * linespec.c (decode_line_2): Constify.
5787         * linux-thread-db.c (thread_db_err_str): Constify.
5788         * lm32-tdep.c (lm32_register_name): Constify.
5789         * m2-exp.y (yyerror): Constify.
5790         * m2-lang.h (m2_yyerror): Constify.
5791         * m32r-tdep.c (m32r_register_names): Constify and make static.
5792         * m68hc11-tdep.c (m68hc11_register_names): Constify.
5793         * m88k-tdep.c (m88k_register_name): Constify.
5794         * macroexp.c (appendmem): Constify.
5795         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
5796         (upgrade_type, parse_external, parse_partial_symbols)
5797         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
5798         (new_symbol): Constify.
5799         * memattr.c (mem_info_command): Constify.
5800         * mep-tdep.c (register_name_from_keyword): Constify.
5801         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
5802         Constify.
5803         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
5804         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
5805         * mi/mi-main.c (captured_mi_execute_command): Constify and add
5806         cast.
5807         (mi_execute_async_cli_command): Constify.
5808         * mips-tdep.c (mips_register_name): Constify.
5809         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
5810         (am33_register_name, am33_2_register_name)
5811         * moxie-tdep.c (moxie_register_names): Constify.
5812         * nat/linux-osdata.c (osdata_type): Constify fields.
5813         * nto-tdep.c (nto_parse_redirection): Constify.
5814         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
5815         (lookup_child_selector): Constify.
5816         (objc_methcall::name): Constify.
5817         * objc-lang.h (lookup_objc_class, lookup_child_selector)
5818         (lookup_struct_typedef): Constify.
5819         * objfiles.c (pc_in_section): Constify.
5820         * objfiles.h (pc_in_section): Constify.
5821         * p-exp.y (struct token::oper): Constify.
5822         (yyerror): Constify.
5823         * p-lang.h (pascal_yyerror): Constify.
5824         * parser-defs.h (op_name_standard): Constify.
5825         (op_print::string): Constify.
5826         (exp_descriptor::op_name): Constify.
5827         * printcmd.c (print_address_symbolic): Constify.
5828         * psymtab.c (print_partial_symbols): Constify.
5829         * python/py-breakpoint.c (stop_func): Constify.
5830         (bppy_get_expression): Constify.
5831         * python/py-cmd.c (cmdpy_completer::name): Constify.
5832         (cmdpy_function): Constify.
5833         * python/py-event.c (evpy_add_attribute)
5834         (gdbpy_initialize_event_generic): Constify.
5835         * python/py-event.h (evpy_add_attribute)
5836         (gdbpy_initialize_event_generic): Constify.
5837         * python/py-evts.c (add_new_registry): Constify.
5838         * python/py-finishbreakpoint.c (outofscope_func): Constify.
5839         * python/py-framefilter.c (get_py_iter_from_func): Constify.
5840         * python/py-inferior.c (get_buffer): Add cast.
5841         * python/py-param.c (parm_constant::name): Constify.
5842         * python/py-unwind.c (fprint_frame_id): Constify.
5843         * python/python.c (gdbpy_parameter_value): Constify.
5844         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
5845         * remote.c (memory_packet_config::name): Constify.
5846         (show_packet_config_cmd, remote_write_bytes)
5847         (remote_buffer_add_string):
5848         * reverse.c (exec_reverse_once): Constify.
5849         * rs6000-tdep.c (variant::name, variant::description): Constify.
5850         * rust-exp.y (rustyyerror): Constify.
5851         * rust-lang.c (rust_op_name): Constify.
5852         * rust-lang.h (rustyyerror): Constify.
5853         * serial.h (serial_ops::name): Constify.
5854         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
5855         (sh_sh3e_register_name, sh_sh2e_register_name)
5856         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
5857         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
5858         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
5859         (sh_sh4al_dsp_register_name): Constify.
5860         * sh64-tdep.c (sh64_register_name): Constify.
5861         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
5862         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
5863         * stabsread.c (patch_block_stabs, read_type_number)
5864         (ref_map::stabs, ref_add, process_reference)
5865         (symbol_reference_defined, define_symbol, define_symbol)
5866         (error_type, read_type, read_member_functions, read_cpp_abbrev)
5867         (read_one_struct_field, read_struct_fields, read_baseclasses)
5868         (read_tilde_fields, read_struct_type, read_array_type)
5869         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
5870         (read_huge_number, read_range_type, read_args, common_block_start)
5871         (find_name_end): Constify.
5872         * stabsread.h (common_block_start, define_symbol)
5873         (process_one_symbol, symbol_reference_defined, ref_add):
5874         * symfile.c (get_section_index, add_symbol_file_command):
5875         * symfile.h (get_section_index): Constify.
5876         * target-descriptions.c (tdesc_type::name): Constify.
5877         (tdesc_free_type): Add cast.
5878         * target.c (find_default_run_target):
5879         (add_deprecated_target_alias, find_default_run_target)
5880         (target_announce_detach): Constify.
5881         (do_option): Constify.
5882         * target.h (add_deprecated_target_alias): Constify.
5883         * thread.c (print_thread_info_1): Constify.
5884         * top.c (deprecated_readline_begin_hook, command_line_input):
5885         Constify.
5886         (init_main): Add casts.
5887         * top.h (handle_line_of_input): Constify.
5888         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
5889         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
5890         (tfind_command): Rename to ...
5891         (tfind_command_1): ... this and constify.
5892         (tfind_command): New function.
5893         (tfind_end_command, tfind_start_command): Adjust.
5894         (encode_source_string): Constify.
5895         * tracepoint.h (encode_source_string): Constify.
5896         * tui/tui-data.c (tui_partial_win_by_name): Constify.
5897         * tui/tui-data.h (tui_partial_win_by_name): Constify.
5898         * tui/tui-source.c (tui_set_source_content_nil): Constify.
5899         * tui/tui-source.h (tui_set_source_content_nil): Constify.
5900         * tui/tui-win.c (parse_scrolling_args): Constify.
5901         * tui/tui-windata.c (tui_erase_data_content): Constify.
5902         * tui/tui-windata.h (tui_erase_data_content): Constify.
5903         * tui/tui-winsource.c (tui_erase_source_content): Constify.
5904         * tui/tui.c (tui_enable): Add cast.
5905         * utils.c (defaulted_query): Constify.
5906         (init_page_info): Add cast.
5907         (puts_debug, subset_compare): Constify.
5908         * utils.h (subset_compare): Constify.
5909         * varobj.c (varobj_format_string): Constify.
5910         * varobj.h (varobj_format_string): Constify.
5911         * vax-tdep.c (vax_register_name): Constify.
5912         * windows-nat.c (windows_detach): Constify.
5913         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
5914         * xml-support.c (gdb_xml_end_element): Constify.
5915         * xml-tdesc.c (tdesc_start_reg): Constify.
5916         * xstormy16-tdep.c (xstormy16_register_name): Constify.
5917         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
5918         * xtensa-tdep.h (xtensa_register_t::name): Constify.
5919
5920 2017-04-05  Pedro Alves  <palves@redhat.com>
5921
5922         * proc-api.c (struct trans): Constify.
5923         (procfs_note): Constify.
5924         * proc-events.c (struct trans, syscall_table):
5925         * proc-flags.c (struct trans): Constify.
5926         * proc-utils.h (procfs_note): Constify.
5927         * proc-why.c (struct trans): Constify.
5928         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
5929         (procfs_detach): Constify.
5930         * sol-thread.c (struct string_map): Constify.
5931         (td_err_string, td_state_string): Constify.
5932
5933 2017-04-05  Pedro Alves  <palves@redhat.com>
5934
5935         * proc-api.c (procfs_filename): Don't initialize
5936         procfs_filename.
5937         (prepare_to_trace): Assume procfs_filename is non-NULL.
5938         (_initialize_proc_api): Give procfs_filename a default value here.
5939
5940 2017-04-05  Pedro Alves  <palves@redhat.com>
5941
5942         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
5943         'cond_string' parameter.
5944         (extract_exception_regexp): Constify 'string' parameter.
5945         (catch_exception_command_1): Constify.
5946         * breakpoint.c (init_catchpoint)
5947         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
5948         parameter.
5949         (ep_parse_optional_if_clause, catch_fork_command_1)
5950         (catch_exec_command_1): Constify.
5951         * breakpoint.h (init_catchpoint): Constify 'cond_string'
5952         parameter.
5953         (ep_parse_optional_if_clause): Constify.
5954         * cli/cli-utils.c (remove_trailing_whitespace)
5955         (check_for_argument): Constify.
5956         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
5957         non-const overload.
5958         (check_for_argument): Likewise.
5959
5960 2017-04-05  Pedro Alves  <palves@redhat.com>
5961
5962         * event-top.c (command_line_handler): Add cast to execute_command
5963         call.
5964         * record-btrace.c (cmd_record_btrace_bts_start)
5965         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
5966         (cmd_record_btrace_start): Add cast to execute_command call.
5967         * record-full.c (record_full_goto_insn):
5968         * record.c (record_start, record_stop): Add cast to
5969         execute_command_to_string calls.
5970         (cmd_record_start): Add cast to execute_command calls.
5971
5972 2017-04-05  Pedro Alves  <palves@redhat.com>
5973
5974         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
5975         static inline function.
5976         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
5977         array and use gdb_PyArg_ParseTupleAndKeywords.
5978         * python/py-cmd.c (cmdpy_init): Likewise.
5979         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
5980         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
5981         (infpy_search_memory): Likewise.
5982         * python/py-objfile.c (objfpy_add_separate_debug_file)
5983         (gdbpy_lookup_objfile): Likewise.
5984         * python/py-symbol.c (gdbpy_lookup_symbol)
5985         (gdbpy_lookup_global_symbol): Likewise.
5986         * python/py-type.c (gdbpy_lookup_type): Likewise.
5987         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
5988         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
5989         Likewise.
5990
5991 2017-04-05  Pedro Alves  <palves@redhat.com>
5992
5993         * python/python-internal.h (gdb_PyGetSetDef): New type.
5994         * python/py-block.c (block_object_getset)
5995         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
5996         * python/py-event.c (event_object_getset)
5997         (finish_breakpoint_object_getset): Likewise.
5998         * python/py-inferior.c (inferior_object_getset): Likewise.
5999         * python/py-infthread.c (thread_object_getset): Likewise.
6000         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
6001         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
6002         * python/py-objfile.c (objfile_getset): Likewise.
6003         * python/py-progspace.c (pspace_getset): Likewise.
6004         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
6005         Likewise.
6006         * python/py-record.c (recpy_record_getset): Likewise.
6007         * python/py-symbol.c (symbol_object_getset): Likewise.
6008         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
6009         Likewise.
6010         * python/py-type.c (type_object_getset, field_object_getset):
6011         Likewise.
6012         * python/py-value.c (value_object_getset): Likewise.
6013
6014 2017-04-05  Pedro Alves  <palves@redhat.com>
6015
6016         * python/python-internal.h (gdb_PyObject_CallMethod)
6017         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
6018         New functions.
6019         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
6020         (PySys_GetObject, PySys_SetPath): New macros.
6021
6022 2017-04-05  Pedro Alves  <palves@redhat.com>
6023
6024         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
6025         info_osdata_command.
6026         * osdata.c (info_osdata_command): Rename to ...
6027         (info_osdata): ... this.  Constify 'type' parameter, and remove
6028         the 'from_tty' parameter.  Accept NULL TYPE.
6029         (info_osdata_command): New function.
6030         * osdata.h (info_osdata_command): Remove declaration.
6031         (info_osdata): New declaration.
6032
6033 2017-04-05  Pedro Alves  <palves@redhat.com>
6034
6035         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
6036         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
6037         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
6038         parameter.
6039         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
6040         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
6041         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
6042         parameter.
6043         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
6044         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
6045         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
6046         (mi_cmd_file_list_exec_source_files)
6047         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
6048         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6049         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
6050         parameter.
6051         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
6052         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
6053         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
6054         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
6055         (mi_cmd_stack_info_frame): Constify 'command' parameter.
6056         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
6057         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
6058         'command' parameter.
6059         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
6060         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
6061         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
6062         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
6063         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
6064         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
6065         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
6066         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
6067         (mi_cmd_var_set_update_range): Constify 'command' parameter.
6068         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
6069         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
6070         parameter.
6071         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
6072         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
6073         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
6074         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
6075         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
6076         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
6077         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
6078         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
6079         (mi_cmd_data_list_changed_registers)
6080         (mi_cmd_data_write_register_values)
6081         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
6082         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
6083         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
6084         (mi_cmd_list_features, mi_cmd_list_target_features)
6085         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
6086         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
6087         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
6088         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
6089         (mi_cmd_trace_frame_collected): Constify 'command'
6090         parameter.
6091         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
6092         'command' parameter.
6093
6094 2017-04-05  Pedro Alves  <palves@redhat.com>
6095
6096         * ada-lang.c (ada_completer_word_break_characters): Now a const
6097         array.
6098         (ada_get_gdb_completer_word_break_characters): Constify.
6099         * completer.c (gdb_completer_command_word_break_characters)
6100         (gdb_completer_file_name_break_characters)
6101         (gdb_completer_quote_characters): Now const arrays.
6102         (get_gdb_completer_quote_characters): Constify.
6103         (set_rl_completer_word_break_characters): New function.
6104         (set_gdb_completion_word_break_characters)
6105         (complete_line_internal): Use it.
6106         * completer.h (get_gdb_completer_quote_characters): Constify.
6107         (set_rl_completer_word_break_characters): Declare.
6108         * f-lang.c (f_word_break_characters): Constify.
6109         * language.c (default_word_break_characters): Constify.
6110         * language.h (language_defn::la_word_break_characters): Constify.
6111         (default_word_break_characters): Constify.
6112         * top.c (init_main): Use set_rl_completer_word_break_characters.
6113
6114 2017-04-05  Pedro Alves  <palves@redhat.com>
6115
6116         * aix-thread.c (aix_thread_pid_to_str)
6117         (aix_thread_extra_thread_info): Constify.
6118         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
6119         * bsd-uthread.c (bsd_uthread_extra_thread_info)
6120         (bsd_uthread_pid_to_str): Constify.
6121         * corelow.c (core_pid_to_str): Constify.
6122         * darwin-nat.c (darwin_pid_to_str): Constify.
6123         * fbsd-nat.c (fbsd_pid_to_str): Constify.
6124         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
6125         Constify.
6126         * gnu-nat.c (gnu_pid_to_str): Constify.
6127         * go32-nat.c (go32_pid_to_str): Constify.
6128         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
6129         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
6130         * inferior.c (inferior_pid_to_str): Constify.
6131         * linux-nat.c (linux_nat_pid_to_str): Constify.
6132         * linux-tdep.c (linux_core_pid_to_str): Constify.
6133         * linux-thread-db.c (thread_db_pid_to_str)
6134         (thread_db_extra_thread_info): Constify.
6135         * nto-tdep.c (nto_extra_thread_info): Constify.
6136         * nto-tdep.h (nto_extra_thread_info): Constify.
6137         * obsd-nat.c (obsd_pid_to_str): Constify.
6138         * procfs.c (procfs_pid_to_str): Constify.
6139         * ravenscar-thread.c (ravenscar_extra_thread_info)
6140         (ravenscar_pid_to_str): Constify.
6141         * remote-sim.c (gdbsim_pid_to_str): Constify.
6142         * remote.c (remote_threads_extra_info, remote_pid_to_str):
6143         Constify.
6144         * sol-thread.c (solaris_pid_to_str): Constify.
6145         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
6146         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
6147         * target.c (default_pid_to_str, target_pid_to_str)
6148         (normal_pid_to_str, default_pid_to_str): Constify.
6149         * target.h (target_ops::to_pid_to_str)
6150         (target_ops::to_extra_thread_info): Constify.
6151         (target_pid_to_str, normal_pid_to_str): Constify.
6152         * windows-nat.c (windows_pid_to_str): Constify.
6153         * gdbarch.sh (core_pid_to_str): Constify.
6154         * target-delegates.c: Regenerate.
6155         * gdbarch.h, gdbarch.c: Regenerate.
6156
6157 2017-04-05  Pedro Alves  <palves@redhat.com>
6158
6159         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
6160         the memory of the temporary warning_pre_print override.
6161         * utils.c (warning_pre_print): Constify.
6162         * utils.h (warning_pre_print): Constify.
6163
6164 2017-04-05  Pedro Alves  <palves@redhat.com>
6165
6166         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
6167         (shell_command): New function.
6168         (make_command): Use std::string.
6169         (init_cli_cmds): Register shell_command instead of shell_escape.
6170
6171 2017-04-05  Pedro Alves  <palves@redhat.com>
6172
6173         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
6174         * tracepoint.c (default_collect): Don't initialize.
6175
6176 2017-04-05  Pedro Alves  <palves@redhat.com>
6177
6178         * macroexp.c (macro_buffer::shared): Now a bool.
6179         (init_buffer): Update.
6180         (init_shared_buffer): Constify 'addr' parameter.
6181         (substitute_args, expand, macro_expand, macro_expand_next): Remove
6182         casts.
6183
6184 2017-04-05  Pedro Alves  <palves@redhat.com>
6185
6186         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
6187         * disasm.c (set_disassembler_options): Constify local.
6188         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
6189
6190 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
6191
6192         PR gdb/21352
6193         * tracefile.c (tsave_command): Fix argument parsing for '-r'
6194         option.
6195
6196 2017-04-05  Yao Qi  <yao.qi@linaro.org>
6197
6198         * frame.c (frame_unwind_register_unsigned): Call
6199         frame_unwind_register_value.
6200
6201 2017-04-05  Yao Qi  <yao.qi@linaro.org>
6202
6203         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
6204         Use gdb_test_multiple, and don't match anchor.
6205
6206 2017-04-05  Pedro Alves  <palves@redhat.com>
6207
6208         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
6209         (Write After Approval): Remove Simon Marchi.
6210
6211 2017-04-05  Pedro Alves  <palves@redhat.com>
6212
6213         * common/gdb_optional.h (optional::optional): Make constexpr and
6214         initialize m_dummy.
6215
6216 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6217
6218         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6219         (amd64fbsd_jmp_buf_reg_offset): Remove.
6220         (amd64fbsd_supply_uthread): Remove function.
6221         (amd64fbsd_collect_uthread): Remove function.
6222         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
6223         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
6224         (x86_64-*-freebsd*): Remove bsd-uthread.o.
6225         (fbsd-nat.c): Update comment.
6226         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
6227         (i386fbsd_jmp_buf_reg_offset): Remove.
6228         (i386fbsd_supply_uthread): Remove function.
6229         (i386fbsd_collect_uthread): Remove function.
6230         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
6231
6232 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6233
6234         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
6235         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
6236         * NEWS: Mention that support for FreeBSD/alpha was removed.
6237         * alpha-fbsd-tdep.c: Delete file.
6238         * config/alpha/fbsd.mh: Delete file.
6239         * configure.host: Delete alpha*-*-freebsd* and
6240         alpha*-*-kfreebsd*-gnu.
6241         * configure.tgt: Delete alpha*-*-freebsd* and
6242         alpha*-*-kfreebsd*-gnu.
6243
6244 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
6245
6246         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
6247         amd64bsd_store_inferior_registers): Use ptid from regcache.
6248
6249 2017-04-04  Pedro Alves  <palves@redhat.com>
6250
6251         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
6252         data fields, make them private and add "m_" prefixes.
6253         (lnp_state_machine::lnp_state_machine): New ctor.
6254         (record_line, check_line_address, handle_set_discriminator)
6255         (handle_set_address, handle_advance_pc, handle_special_opcode)
6256         (handle_advance_line, handle_set_file, handle_negate_stmt)
6257         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
6258         (end_sequence, advance_line): New methods.
6259         (m_gdbarch, m_record_lines_p): New fields.
6260         (lnp_reader_state): Delete.
6261         (dwarf_record_line): Rename to ...
6262         (lnp_state_machine::record_line): ... adjust.
6263         (init_lnp_state_machine): Delete.
6264         (lnp_state_machine::lnp_state_machine): New.
6265         (check_line_address): Rename to ...
6266         (lnp_state_machine::check_line_address): This.
6267         (dwarf_decode_lines_1): Remove reference to "reader_state".
6268         Adjust lnp_state_machine having a non-default ctor.  Use bool.
6269         State machine internal state manipulation moved to
6270         lnp_state_machine methods.
6271
6272 2017-04-04  Pedro Alves  <palves@redhat.com>
6273
6274         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6275         unittests/offset-type-selftests.c.
6276         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
6277         * common/offset-type.h: New file.
6278         * common/preprocessor.h: New file.
6279         * common/traits.h: New file.
6280         * common/valid-expr.h: New file.
6281         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
6282         sect_offset and cu_offset strong typedefs throughout.
6283         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
6284         typedefs throughout.
6285         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
6286         sect_offset and cu_offset strong typedefs throughout.
6287         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
6288         typedefs throughout.
6289         * gdbtypes.h: Include "common/offset-type.h".
6290         (cu_offset): Now an offset type (strong typedef) instead of a
6291         struct.
6292         (sect_offset): Likewise.
6293         (union call_site_parameter_u): Rename "param_offset" field to
6294         "param_cu_off".
6295         * unittests/offset-type-selftests.c: New file.
6296
6297 2017-04-04  Pedro Alves  <palves@redhat.com>
6298
6299         * common/underlying.h: New file.
6300         * dwarf2read.c: Include "common/gdb_optional.h" and
6301         "common/underlying.h".
6302         (dir_index, file_name_index): New types.
6303         (file_entry): Use them.
6304         (file_entry::include): Use to_underlying.
6305         (line_header::add_file_name): Use dir_index.
6306         (read_formatted_entries): Use gdb::optional.  Read form before
6307         writting to file_entry.
6308         (dwarf_decode_line_header): Use dir_index.
6309         (lnp_state_machine::current_file): Use to_underlying.
6310         (lnp_state_machine::file): Change type to file_name_index.
6311         (dwarf_record_line): Use to_underlying.
6312         (init_lnp_state_machine): Use file_name_index.
6313         (dwarf_decode_lines_1): Use dir_index and file_name_index.
6314
6315 2017-04-04  Pedro Alves  <palves@redhat.com>
6316
6317         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
6318         operator bool, has_value and get methods.
6319
6320 2017-04-04  Pedro Alves  <palves@redhat.com>
6321
6322         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
6323         fields.
6324         (line_header): Initialize all data fields.  Change type of
6325         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
6326         Change type of include_dirs to std::vector<const char *>.  Remove
6327         num_include_dirs, include_dirs_size.  Change type of file_names to
6328         std::vector<file_entry>.  Remove num_file_names, file_names_size.
6329         (line_header::line_header): New.
6330         (line_header::add_include_dir, line_header::add_file_name): New
6331         methods.
6332         (line_header::include_dir_at): Remove NULL check.
6333         (line_header::file_name_at): Add const overload.
6334         (line_header_up): New unique_ptr typedef.
6335         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
6336         std::vector.  Remove free_line_header call.
6337         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
6338         free_line_header call.
6339         (free_cu_line_header): Delete.
6340         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
6341         (setup_type_unit_groups): Use line_header_up instead of cleanups.
6342         Adjust to use std::vector.
6343         (free_line_header): Delete.
6344         (free_line_header_voidp): Use delete.
6345         (add_include_dir): Replace with ...
6346         (line_header::add_include_dir): ... this method.  Use std::vector.
6347         (add_file_name): Replace with ...
6348         (line_header::add_file_name): ... this method.  Use std::vector.
6349         (add_include_dir_stub): Delete.
6350         (read_formatted_entries): Remove memset.
6351         (dwarf_decode_line_header): Return a line_header_up instead of a
6352         raw pointer.  Remove cleanup handling.  Pass lambdas to
6353         read_formatted_entries.  Adjust to use line_header methods.
6354         (dwarf_decode_lines_1): Adjust to use line_header methods.
6355         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
6356         use std::vector.
6357
6358 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
6359
6360         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
6361         instead of struct ptid.
6362
6363 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
6364
6365         * frame.c (get_frame_register_bytes): Unwind using value.
6366         (put_frame_register_bytes): Likewise.
6367
6368 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
6369
6370         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
6371         aggregate-like.
6372
6373 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
6374
6375         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
6376
6377 2017-03-29  Yao Qi  <yao.qi@linaro.org>
6378
6379         * gdbthread.h (struct thread_info): Declare constructor and
6380         destructor.  Add some in-class member initializers.
6381         * thread.c (free_thread): Remove.
6382         (init_thread_list): Call delete instead of free_thread.
6383         (new_thread): Call thread_info constructor.
6384         (thread_info::thread_info): New function.
6385         (thread_info::~thread_info): New function.
6386         (delete_thread_1): Call delete instead of free_thread.
6387         (make_cleanup_restore_current_thread): Move tp and frame to
6388         inner block.
6389
6390 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6391
6392         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
6393         (arc_skip_prologue): Likewise.
6394         (arc_make_frame_cache): Likewise.
6395         (arc_pv_get_operand): New function.
6396         (arc_is_in_prologue): Likewise.
6397         (arc_analyze_prologue): Likewise.
6398         (arc_print_frame_cache): Likewise.
6399         (MAX_PROLOGUE_LENGTH): New constant.
6400
6401 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6402
6403         * configure.tgt: Add arc-insn.o.
6404         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
6405         (dump_arc_instruction_command): New function.
6406         (arc_fprintf_disasm): Likewise.
6407         (arc_disassemble_info): Likewise.
6408         (arc_insn_get_operand_value): Likewise.
6409         (arc_insn_get_operand_value_signed): Likewise.
6410         (arc_insn_get_memory_base_reg): Likewise.
6411         (arc_insn_get_memory_offset): Likewise.
6412         (arc_insn_get_branch_target): Likewise.
6413         (arc_insn_dump): Likewise.
6414         (arc_insn_get_linear_next_pc): Likewise.
6415         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
6416         (arc_disassemble_info): Likewise.
6417         (arc_insn_get_branch_target): Likewise.
6418         (arc_insn_get_linear_next_pc): Likewise.
6419         * NEWS: Mention new "maint print arc arc-instruction".
6420
6421 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6422
6423         * arc-tdep (maintenance_print_arc_list): New variable.
6424         (maintenance_print_arc_command): New function.
6425
6426 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
6427
6428         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
6429         Add "limm" and "reserved".
6430         (arc_cannot_fetch_register, arc_cannot_store_register): Add
6431         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
6432         * arc-tdep.h (arc_regnum): Likewise.
6433
6434 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6435
6436         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6437         for THREADPTR register.
6438         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
6439         register.
6440         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
6441         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
6442         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
6443
6444 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6445
6446         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
6447         registers above gdbarch_num_regs (gdbarch) as privileged in
6448         call0 ABI.
6449
6450 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6451
6452         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
6453         for a single specified register or for all registers in
6454         a0_base..a0_base + C0_NREGS range.
6455         (supply_gregset_reg): Call regcache_raw_supply for a single
6456         specified register or for all registers in a0_base..a0_base +
6457         C0_NREGS range.
6458
6459 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6460
6461         * arch/xtensa.h (C0_NREGS): Add definition.
6462         * xtensa-tdep.c (C0_NREGS): Remove definition.
6463
6464 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
6465
6466         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
6467         Drop xtensa_default_isa initialization.
6468         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
6469
6470 2017-03-27  Pedro Alves  <palves@redhat.com>
6471
6472         * dwarf2read.c (file_entry) <dir_index>: Add comment.
6473         (file_entry::include_dir): New method.
6474         (line_header::include_dir_at, line_header::file_name_at): New
6475         methods.
6476         (setup_type_unit_groups, setup_type_unit_groups)
6477         (psymtab_include_file_name): Simplify using the new methods.
6478         (lnp_state_machine) <the_line_header>: New field.
6479         <file>: Add comment.
6480         (lnp_state_machine::current_file): New method.
6481         (dwarf_record_line): Simplify using the new methods.
6482         (init_lnp_state_machine): Initialize the "the_line_header" field.
6483         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
6484         Simplify using the new methods.
6485
6486 2017-03-27  Pedro Alves  <palves@redhat.com>
6487
6488         * cp-name-parser.y (make_empty): Delete.
6489         (demangler_special, nested_name, ptr_operator, array_indicator)
6490         (direct_declarator, declarator_1): Use fill_comp instead of
6491         make_empty.
6492
6493 2017-03-27  Pedro Alves  <palves@redhat.com>
6494
6495         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
6496         to ATTRIBUTE_PRINTF.
6497         * solib-target.c (library_list_start_list): Print "string" not
6498         "version".
6499         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
6500         gdb_xml_error call.
6501
6502 2017-03-27  Pedro Alves  <palves@redhat.com>
6503
6504         * dwarf2read.c (struct file_and_directory): New.
6505         (dwarf2_get_dwz_file): Adjust to use std::string.
6506         (dw2_get_file_names_reader): Adjust to use file_and_directory.
6507         (find_file_and_directory): Adjust to return a file_and_directory
6508         object.
6509         (read_file_scope): Adjust to use file_and_directory.  Remove
6510         make_cleanup/do_cleanups calls.
6511         (open_and_init_dwp_file): Adjust to use std::string.  Remove
6512         make_cleanup/do_cleanups calls.
6513         * python/python.c (do_start_initialization): Adjust to ldirname
6514         returning a std::string.
6515         * utils.c (ldirname): Now returns a std::string.
6516         * utils.h (ldirname): Change return type to std::string.
6517         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
6518         returning a std::string.
6519         * xml-tdesc.c (file_read_description_xml): Likewise.
6520
6521 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
6522
6523         * regcache.c (regcache_debug_print_register): New function.
6524         * regcache.h (regcache_debug_print_register): New declaration.
6525         * target.c (debug_print_register): Remove.
6526         (target_fetch_registers): Call regcache_debug_print_register.
6527         (target_store_registers): Likewise.
6528
6529 2017-03-24  Pádraig Brady  <pbrady@fb.com>
6530
6531         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
6532         reference beyond the 'lh->include_dirs' array before accessing to
6533         it.
6534         (psymtab_include_file_name): Likewise.
6535         (dwarf_decode_lines_1): Likewise.
6536         (dwarf_decode_lines): Likewise.
6537         (file_file_name): Likewise.
6538
6539 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
6540
6541         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
6542         inferior_ptid.
6543         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6544         ps_lsetfpregs): Likewise.
6545         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
6546         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
6547         ps_lsetfpregs): Likewise.
6548         * target.c (target_fetch_registers, target_store_registers):
6549         Remove asserts.
6550
6551 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
6552
6553         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
6554
6555 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6556
6557         * aarch64-tdep.c (aarch64_process_record_test): Declare.
6558         (_initialize_aarch64_tdep): Register it.
6559         (aarch64_record_load_store): Handle PRFM instruction.
6560         (aarch64_process_record_test): New function.
6561
6562 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6563
6564         * aarch64-tdep.c (aarch64_record_load_store): Fix code
6565         indentation.
6566
6567 2017-03-23  Yao Qi  <yao.qi@linaro.org>
6568
6569         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
6570
6571 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6572
6573         python/python.c (do_start_initialization): Fix memory leak.
6574
6575 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
6576
6577         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
6578         using get_ptrace_pid.
6579         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
6580         inferior_ptid.
6581         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
6582         inferior_ptid instead of pid.
6583
6584 2017-03-22  Yao Qi  <yao.qi@linaro.org>
6585
6586         * aarch64-tdep.c: Wrap locally used classes in anonymous
6587         namespace.
6588         * arm-tdep.c: Likewise.
6589         * linespec.c: Likewise.
6590         * ui-out.c: Likewise.
6591
6592 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
6593
6594         PR gdb/19637
6595         * python/lib/gdb/printer/bound_registers.py: Import sys.
6596
6597 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
6598
6599         * windows-nat.c (do_windows_fetch_inferior_registers): Add
6600         windows_thread_info parameter and use it instead of
6601         current_thread.
6602         (windows_fetch_inferior_registers): Don't set current_thread,
6603         pass the thread to do_windows_fetch_inferior_registers.  Use
6604         ptid from regcache instead of inferior_ptid.
6605         (do_windows_store_inferior_registers): Add windows_thread_info
6606         parameter and use it instead of current_thread.
6607         (windows_store_inferior_registers): Don't set current_thread,
6608         pass the thread to do_windows_store_inferior_registers.  Use
6609         ptid from regcache instead of inferior_ptid.
6610
6611 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
6612
6613         * ser-mingw.c (ser_windows_raw): Remove reference to
6614         struct serial::current_timeout.
6615
6616 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
6617
6618         PR tdep/20928
6619         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
6620         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
6621         (sparc64_fsr_type): Fix %fsr decoding.
6622
6623 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
6624
6625         * python/py-record-btrace.c (btpy_insn_data): Change return type
6626         for Python 2.
6627
6628 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
6629
6630         * spu-linux-nat.c (spu_fetch_inferior_registers,
6631         spu_store_inferior_registers): Use ptid from regcache, set and
6632         restore inferior_ptid.
6633         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
6634         Likewise.
6635
6636 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
6637
6638         * i386-linux-nat.c (fetch_register, store_register,
6639         i386_linux_fetch_inferior_registers,
6640         i386_linux_store_inferior_registers): Use ptid from regcache.
6641         * ia64-linux-nat.c (ia64_linux_fetch_register,
6642         ia64_linux_store_register): Likewise.
6643         * inf-ptrace.c (inf_ptrace_fetch_register,
6644         inf_ptrace_store_register): Likewise.
6645         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
6646         m32r_linux_store_inferior_registers): Likewise.
6647         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
6648         m68kbsd_store_inferior_registers): Likewise.
6649         * m68k-linux-nat.c (fetch_register, store_register,
6650         m68k_linux_fetch_inferior_registers,
6651         m68k_linux_store_inferior_registers): Likewise.
6652         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
6653         m88kbsd_store_inferior_registers): Likewise.
6654         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
6655         mips_fbsd_store_inferior_registers): Likewise.
6656         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
6657         mips64_linux_regsets_store_registers): Likewise.
6658         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
6659         mipsnbsd_store_inferior_registers): Likewise.
6660         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
6661         mips64obsd_store_inferior_registers): Likewise.
6662         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
6663         Likewise.
6664         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
6665         ppcfbsd_store_inferior_registers): Likewise.
6666         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
6667         ppc_linux_store_inferior_registers): Likewise.
6668         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
6669         ppcnbsd_store_inferior_registers): Likewise.
6670         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
6671         ppcobsd_store_registers): Likewise.
6672         * procfs.c (procfs_fetch_registers, procfs_store_registers):
6673         Likewise.
6674         * ravenscar-thread.c (ravenscar_fetch_registers,
6675         ravenscar_store_registers, ravenscar_prepare_to_store):
6676         Likewise.
6677         * record-btrace.c (record_btrace_fetch_registers,
6678         record_btrace_store_registers, record_btrace_prepare_to_store):
6679         Likewise.
6680         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
6681         Lookup inferior using ptid from regcache, instead of
6682         current_inferior.
6683         * remote.c (remote_fetch_registers, remote_store_registers): Use
6684         ptid from regcache.
6685         * rs6000-nat.c (fetch_register, store_register): Likewise.
6686         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
6687         s390_linux_store_inferior_registers): Likewise.
6688         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
6689         shnbsd_store_inferior_registers): Likewise.
6690         * sol-thread.c (sol_thread_fetch_registers,
6691         sol_thread_store_registers): Likewise.
6692         * sparc-nat.c (sparc_fetch_inferior_registers,
6693         sparc_store_inferior_registers): Likewise.
6694         * tilegx-linux-nat.c (fetch_inferior_registers,
6695         store_inferior_registers): Likewise.
6696         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
6697         vaxbsd_store_inferior_registers): Likewise.
6698         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
6699         store_xtregs): Likewise.
6700
6701 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6702
6703         PR gdb/14441
6704         * NEWS: Mention support for rvalue references in GDB and python.
6705         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
6706         supports both lvalue and rvalue references.
6707
6708 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6709
6710         PR gdb/14441
6711         * gdbtypes.c (rank_one_type): Implement overloading
6712         resolution rules regarding rvalue references.
6713
6714 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6715
6716         PR gdb/14441
6717         * aarch64-tdep.c (aarch64_type_align)
6718         (aarch64_extract_return_value, aarch64_store_return_value): Change
6719         lvalue reference type checks to general reference type checks.
6720         * amd64-tdep.c (amd64_classify): Likewise.
6721         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
6722         Likewise.
6723         * arm-tdep.c (arm_type_align, arm_extract_return_value)
6724         (arm_store_return_value): Likewise.
6725         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
6726         * c-typeprint.c (c_print_type): Likewise.
6727         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
6728         (cplus_number_of_children, cplus_describe_child): Likewise.
6729         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
6730         * completer.c (expression_completer): Likewise.
6731         * cp-support.c (make_symbol_overload_list_adl_namespace):
6732         Likewise.
6733         * darwin-nat-info.c (info_mach_region_command): Likewise.
6734         * dwarf2loc.c (entry_data_value_coerce_ref)
6735         (value_of_dwarf_reg_entry): Likewise.
6736         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
6737         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
6738         Likewise.
6739         * findvar.c (extract_typed_address, store_typed_address):
6740         Likewise.
6741         * gdbtypes.c (rank_one_type): Likewise.
6742         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
6743         * infcall.c (value_arg_coerce): Likewise.
6744         * language.c (pointer_type): Likewise.
6745         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
6746         Likewise.
6747         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
6748         * mn10300-tdep.c (mn10300_type_align): Likewise.
6749         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
6750         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
6751         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
6752         Likewise.
6753         * printcmd.c (print_formatted, x_command): Likewise.
6754         * python/py-type.c (typy_get_composite, typy_template_argument):
6755         Likewise.
6756         * python/py-value.c (valpy_referenced_value)
6757         (valpy_get_dynamic_type, value_has_field): Likewise.
6758         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
6759         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
6760         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
6761         * spu-tdep.c (spu_scalar_value_p): Likewise.
6762         * symtab.c (lookup_symbol_aux): Likewise.
6763         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
6764         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
6765         Likewise.
6766         * valops.c (value_cast_pointers, value_cast)
6767         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
6768         (value_struct_elt, value_struct_elt_bitpos)
6769         (value_find_oload_method_list, find_overload_match)
6770         (value_rtti_indirect_type): Likewise.
6771         * valprint.c (val_print_scalar_type_p, generic_val_print):
6772         Likewise.
6773         * value.c (value_actual_type, value_as_address, unpack_long)
6774         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
6775         (coerce_ref): Likewise.
6776         * varobj.c (varobj_get_value_type): Likewise.
6777
6778 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6779
6780         PR gdb/14441
6781         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
6782         table of constants.
6783         * python/lib/gdb/command/explore.py: Support exploring values
6784         of rvalue reference types.
6785         * python/lib/gdb/types.py: Implement get_basic_type() for
6786         rvalue reference types.
6787         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
6788         constant.
6789         * python/py-value.c (valpy_getitem): Add an rvalue reference
6790         check.
6791         (valpy_reference_value): Add new parameter "refcode".
6792         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
6793         New wrappers for valpy_reference_value().
6794         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6795         (gdbpy_invoke_xmethod): Likewise.
6796
6797 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6798
6799         PR gdb/14441
6800         * dwarf2read.c (process_die, read_type_die_1): Handle the
6801         DW_TAG_rvalue_reference_type DIE.
6802         (read_tag_reference_type): Add new parameter "refcode".
6803
6804 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6805
6806         PR gdb/14441
6807         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
6808         (c_type_print_modifier, c_type_print_varspec_suffix)
6809         (c_type_print_base): Support printing rvalue reference types.
6810         * c-valprint.c (c_val_print, c_value_print): Support printing
6811         rvalue reference values.
6812
6813 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6814
6815         PR gdb/14441
6816         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
6817         typename.
6818         * cp-support.c (replace_typedefs): Handle
6819         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
6820         * python/py-type.c (typy_lookup_type): Likewise.
6821
6822 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6823
6824         PR gdb/14441
6825         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
6826         * parse.c (insert_type): Change assert statement.
6827         (follow_types): Handle rvalue reference types.
6828         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
6829         constant.
6830
6831 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6832
6833         PR gdb/14441
6834         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
6835         value_ref() interface.
6836         * c-valprint.c (c_value_print): Likewise.
6837         * infcall.c (value_arg_coerce): Likewise.
6838         * python/py-value.c (valpy_reference_value): Likewise.
6839         * valops.c (value_cast, value_reinterpret_cast)
6840         (value_dynamic_cast, typecmp): Likewise.
6841         (value_ref): Parameterize by kind of return value reference type.
6842         * value.h (value_ref): Add new parameter "refcode".
6843
6844 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6845
6846         PR gdb/14441
6847         * dwarf2read.c (read_tag_reference_type): Use
6848         lookup_lvalue_reference_type() instead of lookup_reference_type().
6849         * eval.c (evaluate_subexp_standard): Likewise.
6850         * f-exp.y: Likewise.
6851         * gdbtypes.c (make_reference_type, lookup_reference_type):
6852         Generalize with rvalue reference types.
6853         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
6854         convenience wrappers for lookup_reference_type().
6855         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
6856         reference kind parameter.
6857         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
6858         wrappers for lookup_reference_type().
6859         * guile/scm-type.c (gdbscm_type_reference): Use
6860         lookup_lvalue_reference_type() instead of lookup_reference_type().
6861         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
6862         * parse.c (follow_types): Likewise.
6863         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
6864         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
6865         Likewise.
6866         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
6867         (gdbpy_invoke_xmethod): Likewise.
6868         * stabsread.c: Provide extra argument to make_reference_type()
6869         call.
6870         * valops.c (value_ref, value_rtti_indirect_type): Use
6871         lookup_lvalue_reference_type() instead of lookup_reference_type().
6872
6873 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
6874
6875         PR gdb/14441
6876         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
6877         (TYPE_IS_REFERENCE): New macro.
6878         (struct type): Add rvalue_reference_type field.
6879         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
6880
6881 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
6882
6883         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
6884         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
6885         New function definition.
6886         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
6887         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
6888         New function declaration.
6889         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
6890         * mi/mi-interp.h: New file.
6891         * solib.c (info_sharedlibrary_command): Replace for loop with
6892         ALL_SO_LIBS macro
6893         * solib.h (update_solib_list): New function declaration.
6894         (so_list_head): Move macro.
6895         * solist.h (ALL_SO_LIBS): New macro.
6896
6897 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
6898
6899         * infcmd.c (post_create_inferior): Remove unused argument in
6900         call to solib_add.
6901         * remote.c (remote_start_remote): Likewise.
6902         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
6903         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
6904         (enable_break): Likewise.
6905         * solib.c (update_solib_list): Remove unused target argument
6906         and its documentation.
6907         (solib_add): Remove unused target argument.  Remove unused
6908         argument in call to update_solib_list.
6909         (info_sharedlibrary_command): Remove unused argument in call
6910         to update_solib_list.
6911         (sharedlibrary_command): Remove unused argument in call to
6912         solib_add.
6913         (handle_solib_event): Likewise.
6914         (reload_shared_libraries): Likewise.
6915         * solib.h (solib_add): Remove unused target argument.
6916
6917 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6918
6919         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
6920         (s390_displaced_step_fixup): Cover relative branches with the
6921         default fixup handling.  This fixes lack of support for some
6922         relative branch instructions.
6923
6924 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6925
6926         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
6927         ptid from regcache.
6928
6929 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6930
6931         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
6932         i386_darwin_store_inferior_registers): Use ptid from regcache.
6933
6934 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6935
6936         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
6937         i386bsd_store_inferior_registers): Use ptid from regcache.
6938
6939 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6940
6941         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
6942         hppaobsd_store_registers): Use ptid from regcache.
6943
6944 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6945
6946         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
6947         hppanbsd_store_registers): Use ptid from regcache.
6948
6949 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6950
6951         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
6952         from regcache.  Use get_ptrace_pid.
6953
6954 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6955
6956         * corelow.c (get_core_register_section): Use ptid from regcache,
6957         update doc.
6958
6959 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6960
6961         * bsd-uthread.c (bsd_uthread_fetch_registers,
6962         bsd_uthread_store_registers): Use ptid from regcache, set and
6963         restore inferior_ptid.
6964
6965 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6966
6967         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
6968         fetch_fp_regs, store_register, store_regs, store_fp_register,
6969         store_fp_regs): Use ptid from regcache.
6970
6971 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
6972
6973         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
6974         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
6975         store_vfp_regs): Use ptid from regcache.
6976
6977 2017-03-17  Pedro Alves  <palves@redhat.com>
6978
6979         PR remote/21188
6980         * ser-base.c (ser_base_wait_for): Add comment.
6981         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
6982         version.
6983         * ser-unix.c (hardwire_raw): Remove reference to
6984         scb->current_timeout.
6985         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
6986         (hardwire_ops): Install ser_base_readchar instead of
6987         hardwire_readchar.
6988         * serial.h (struct serial) <current_timeout, timeout_remaining>:
6989         Remove fields.
6990
6991 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
6992
6993         PR gdb/19637
6994         * python/lib/gdb/printer/bound_registers.py: Add support for
6995         Python 3.
6996
6997 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6998
6999         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
7000         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
7001         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
7002         byte_offset to subobj_byte_offset.  Fix the handling of
7003         DWARF_VALUE_STACK on big-endian targets when coming via an
7004         implicit pointer.
7005         (dwarf2_evaluate_loc_desc): Adjust call to
7006         dwarf2_evaluate_loc_desc_full.
7007         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
7008         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
7009
7010 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7011
7012         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
7013         and REVSH instructions.
7014
7015 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7016
7017         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
7018         (arm_record_test): Declare.
7019         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
7020         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
7021         align with the manual.
7022         (thumb_record_misc): Adjust the code order to align with the
7023         manual.
7024         (thumb2_record_decode_insn_handler): Fix instruction matching.
7025         (instruction_reader_thumb): New class.
7026         (arm_record_test): New function.
7027
7028 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7029
7030         * arm-tdep.c (abstract_memory_reader): New class.
7031         (instruction_reader): New class.
7032         (extract_arm_insn): Add argument 'reader'.  Callers updated.
7033         (decode_insn): Likewise.
7034
7035 2017-03-16  Doug Evans  <dje@google.com>
7036
7037         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
7038         member.  Change type of TYPE member to SCM.  All uses updated.
7039         (lsscm_make_lazy_string_smob): Add assert.
7040         (lsscm_make_lazy_string): Flag bad length values.
7041         (lsscm_elt_type): New function.
7042         (gdbscm_lazy_string_to_value): Rewrite to use
7043         lsscm_safe_lazy_string_to_value.
7044         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
7045         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
7046         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
7047         in incoming type.
7048         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7049         * guile/scm-type.c (tyscm_scm_to_type): New function.
7050
7051 2017-03-15  Doug Evans  <dje@google.com>
7052
7053         PR python/17728, python/18439, python/18779
7054         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
7055         member.  Change type of TYPE member to PyObject *.  All uses updated.
7056         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
7057         (gdbpy_create_lazy_string_object): Flag bad length values.
7058         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
7059         Handle typedefs in incoming type.
7060         (stpy_lazy_string_elt_type): New function.
7061         (gdbpy_extract_lazy_string): Call it.
7062         * python/py-value.c (valpy_lazy_string): Flag bad length values.
7063         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
7064         typedefs in incoming type.
7065
7066 2017-03-16  Doug Evans  <dje@google.com>
7067
7068         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
7069         * guile/scm-type.c (tyscm_scm_to_type): New function.
7070
7071 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
7072
7073         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
7074         "ULONGEST" for "skip".
7075
7076 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7077
7078         PR gdb/21220
7079         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
7080         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
7081         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
7082         over ptrace peek/poke until end of buffer or error.
7083
7084 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
7085
7086         * parse.c (length_of_subexp): Make static.
7087         * parser-defs.h (length_of_subexp): Remove.
7088
7089 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7090
7091         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
7092         as well.
7093
7094 2017-03-14  Pedro Alves  <palves@redhat.com>
7095
7096         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
7097         (main): Use std::unique_ptr.  Remove calls to
7098         cp_demangled_name_parse_free.
7099
7100 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7101
7102         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
7103         alphabsd_store_inferior_registers): Use regcache->ptid instead
7104         of inferior_ptid.
7105
7106 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7107
7108         * aix-thread.c (aix_thread_fetch_registers,
7109         aix_thread_store_registers): Use regcache->ptid instead of
7110         inferior_ptid.
7111
7112 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7113
7114         * aarch64-linux-nat.c (fetch_gregs_from_thread,
7115         store_gregs_to_thread, fetch_fpregs_from_thread,
7116         store_fpregs_to_thread): Use regcache->ptid instead of
7117         inferior_ptid.
7118
7119 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7120
7121         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
7122         amd64_linux_fetch_inferior_registers): Use regcache->ptid
7123         instead of inferior_ptid.
7124
7125 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7126
7127         * target.c (target_fetch_registers, target_store_registers): Add
7128         assert.
7129
7130 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
7131
7132         * regcache.h (regcache_get_ptid): New function.
7133         * regcache.c (regcache_get_ptid): New function.
7134
7135 2017-03-13  Mark Wielaard  <mark@klomp.org>
7136
7137         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
7138
7139 2017-03-10  Keith Seitz  <keiths@redhat.com>
7140
7141         PR c++/8218
7142         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
7143
7144 2017-03-08  Pedro Alves  <palves@redhat.com>
7145
7146         PR gdb/18360
7147         * infrun.c (start_step_over, do_target_resume, resume)
7148         (restart_threads): Assert we're not resuming a thread that is
7149         meant to be stopped.
7150         (infrun_thread_stop_requested_callback): Delete.
7151         (infrun_thread_stop_requested): If the thread is internally
7152         stopped, queue a pending stop event and clear the thread's
7153         inline-frame state.
7154         (handle_stop_requested): New function.
7155         (handle_syscall_event, handle_inferior_event_1): Use
7156         handle_stop_requested.
7157         (handle_stop_requested): New function.
7158         (handle_signal_stop): Set the thread's stop_signal here instead of
7159         at caller.
7160         (finish_step_over): Clear step over info unconditionally.
7161         (handle_signal_stop): If the user had interrupted the event
7162         thread, consider the stop a random signal.
7163         (handle_signal_stop) <signal arrived while stepping over
7164         breakpoint>: Don't restart threads here.
7165         (stop_waiting): Don't clear step-over info here.
7166
7167 2017-03-08  Pedro Alves  <palves@redhat.com>
7168
7169         PR 21206
7170         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
7171         goes to argument 2, not 1.
7172
7173 2017-03-08  Pedro Alves  <palves@redhat.com>
7174
7175         PR cli/21218
7176         * top.c (gdb_readline_wrapper): Avoid passing NULL to
7177         display_gdb_prompt.
7178         (command_line_input): Add comment.
7179
7180 2017-03-08  Pedro Alves  <palves@redhat.com>
7181
7182         PR tui/21216
7183         * tui/tui-file.c (tui_file::write): New.
7184         * tui/tui-file.h (tui_file): Override "write".
7185         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
7186         factored out from ...
7187         (tui_puts): ... here.
7188         (tui_putc): Use them.
7189         (tui_write): New function.
7190         * tui/tui-io.h (tui_write): Declare.
7191
7192 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7193
7194         * Makefile.in (SFILES): Replace "environ.c" with
7195         "common/environ.c".
7196         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
7197         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
7198         to...
7199         * common/environ.c: ... here.
7200         * environ.h: Moved to...
7201         * common/environ.h: ... here.
7202
7203 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
7204
7205         * gdbarch.sh (pstring_ptr): New static function.
7206         (gdbarch_disassembler_options): Use it.
7207         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
7208         not valid_disassembler_option->name.
7209         * gdbarch.c: Regenerate.
7210
7211 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
7212
7213         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
7214
7215 2017-03-07  Pedro Alves  <palves@redhat.com>
7216
7217         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
7218
7219 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7220
7221         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
7222         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
7223         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
7224         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
7225
7226 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
7227
7228         * xtensa-linux-nat.c (fetch_gregs): Remove const.
7229
7230 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
7231
7232         * remote.c (remote_add_target_side_commands): Use range-based
7233         for loop.
7234
7235 2017-03-03  Yao Qi  <yao.qi@linaro.org>
7236
7237         PR gdb/21165
7238         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
7239         value is lazy.
7240         * valprint.c (common_val_print): Likewise.
7241
7242 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
7243
7244         * NEWS: Mention new set/show disassembler-options commands.
7245         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
7246         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
7247         (prospective_options): New static variable.
7248         (gdb_disassembler::gdb_disassembler): Initialize
7249         m_di.disassembler_options.
7250         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
7251         (get_disassembler_options): New function.
7252         (set_disassembler_options): Likewise.
7253         (set_disassembler_options_sfunc): Likewise.
7254         (show_disassembler_options_sfunc): Likewise.
7255         (disassembler_options_completer): Likewise.
7256         (_initialize_disasm): Likewise.
7257         * disasm.h (get_disassembler_options): New prototype.
7258         (set_disassembler_options): Likewise.
7259         * gdbarch.sh (gdbarch_disassembler_options): New variable.
7260         (gdbarch_verify_disassembler_options): Likewise.
7261         * gdbarch.c: Regenerate.
7262         * gdbarch.h: Likewise.
7263         * arm-tdep.c (num_disassembly_options): Delete.
7264         (set_disassembly_style): Likewise.
7265         (arm_disassembler_options): New static variable.
7266         (set_disassembly_style_sfunc): Convert short style name into long
7267         option name.  Call set_disassembler_options.
7268         (show_disassembly_style_sfunc): New function.
7269         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
7270         set_gdbarch_verify_disassembler_options.
7271         (_initialize_arm_tdep): Delete regnames variable and update callers.
7272         (arm_disassembler_options): Initialize.
7273         (disasm_options): New variable.
7274         (num_disassembly_options): Rename from this...
7275         (num_disassembly_styles): ...to this.  Compute by scanning through
7276         disasm_options.
7277         (valid_disassembly_styles): Initialize using disasm_options.
7278         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
7279         set_arm_regname_option.
7280         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
7281         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
7282         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
7283         set_gdbarch_verify_disassembler_options.
7284         * s390-tdep.c (s390_disassembler_options): New static variable.
7285         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
7286         set_gdbarch_verify_disassembler_options.
7287
7288 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
7289
7290         * remote.c (remote_add_target_side_condition): Remove "struct"
7291         keyword from range-based for loop.
7292
7293 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
7294
7295         * remote.c (remote_add_target_side_condition): Use range-based
7296         for loop.  Update comment.
7297
7298 2017-02-27  Yao Qi  <yao.qi@linaro.org>
7299
7300         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
7301
7302 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
7303
7304         * regcache.c (regcache_raw_update): New function.
7305         (regcache_raw_read): Move code to regcache_raw_update.
7306         * regcache.h (regcache_raw_update): New declaration.
7307         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
7308
7309 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
7310
7311         * dwarf2read.c (create_debug_type_hash_table): Initialize
7312         header.signature and header.type_offset_in_tu.
7313
7314 2017-02-24  Pedro Alves  <palves@redhat.com>
7315
7316         * symtab.c (make_file_symbol_completion_list_1): Use
7317         add_symtab_completions.
7318
7319 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
7320
7321         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
7322
7323 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
7324
7325         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
7326         I386_MAX_REGISTER_SIZE.
7327         (i386_pseudo_register_write): Likewise.
7328         (i386_process_record): Likewise.
7329         * i387-tdep.c (i387_supply_xsave): Likewise.
7330         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
7331         (store_register): Likewise.
7332
7333 2017-02-23  Pedro Alves  <palves@redhat.com>
7334
7335         * ada-lang.c: Include "common/function-view.h".
7336         (ada_iterate_over_symbols): Adjust to use function_view as
7337         callback type.
7338         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
7339         (ada_make_symbol_completion_list): Use a lambda.
7340         (ada_exc_search_name_matches): Delete.
7341         (name_matches_regex): New.
7342         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
7343         * compile/compile-c-support.c: Include "common/function-view.h".
7344         (print_one_macro): Change prototype to accept a ui_file pointer.
7345         (write_macro_definitions): Use a lambda.
7346         * dwarf2read.c: Include "common/function-view.h".
7347         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
7348         (dw2_expand_symtabs_matching): Adjust to use function_view as
7349         callback type.
7350         * language.h: Include "common/function-view.h".
7351         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
7352         function_view as callback type.
7353         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
7354         * linespec.c: Include "common/function-view.h".
7355         (collect_info::add_symbol): New method.
7356         (struct symbol_and_data_callback, iterate_inline_only, struct
7357         symbol_matcher_data, iterate_name_matcher): Delete.
7358         (iterate_over_all_matching_symtabs): Adjust to use function_view
7359         as callback type and lambdas.
7360         (iterate_over_file_blocks): Adjust to use function_view as
7361         callback type.
7362         (decode_compound_collector): Now a class with private fields.
7363         (decode_compound_collector::release_symbols): New method.
7364         (collect_one_symbol): Rename to...
7365         (decode_compound_collector::operator()): ... this and adjust.
7366         (lookup_prefix_sym): decode_compound_collector construction bits
7367         move to decode_compound_collector ctor.  Pass the
7368         decode_compound_collector object directly as callback.  Remove
7369         cleanups and use decode_compound_collector::release_symbols
7370         instead.
7371         (symtab_collector): Now a class with private fields.
7372         (symtab_collector::release_symtabs): New method.
7373         (add_symtabs_to_list): Rename to...
7374         (symtab_collector::operator()): ... this and adjust.
7375         (collect_symtabs_from_filename): symtab_collector construction
7376         bits move to symtab_collector ctor.  Pass the symtab_collector
7377         object directly as callback.  Remove cleanups and use
7378         symtab_collector::release_symtabs instead.
7379         (collect_symbols): Delete.
7380         (add_matching_symbols_to_info): Use lambdas.
7381         * macrocmd.c (print_macro_callback): Delete.
7382         (info_macro_command): Use a lambda.
7383         (info_macros_command): Pass print_macro_definition as callable
7384         directly.
7385         (print_one_macro): Remove 'ignore' parameter.
7386         (macro_list_command): Adjust.
7387         * macrotab.c (macro_for_each_data::fn): Now a function_view.
7388         (macro_for_each_data::user_data): Delete field.
7389         (foreach_macro): Adjust to call the function_view.
7390         (macro_for_each): Adjust to use function_view as callback type.
7391         (foreach_macro_in_scope): Adjust to call the function_view.
7392         (macro_for_each_in_scope): Adjust to use function_view as callback
7393         type.
7394         * macrotab.h: Include "common/function-view.h".
7395         (macro_callback_fn): Declare a prototype instead of a pointer.
7396         Remove "user_data" parameter.
7397         (macro_for_each, macro_for_each_in_scope): Adjust to use
7398         function_view as callback type.
7399         * psymtab.c (partial_map_expand_apply)
7400         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
7401         Adjust to use function_view as callback type and to return bool.
7402         (psym_expand_symtabs_matching): Adjust to use function_view as
7403         callback types.
7404         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
7405         to use function_view as callback type and to return bool.
7406         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
7407         callback types.
7408         * symfile.c (expand_symtabs_matching): Adjust to use function_view
7409         as callback types.
7410         * symfile.h: Include "common/function-view.h".
7411         (expand_symtabs_file_matcher_ftype)
7412         (expand_symtabs_symbol_matcher_ftype)
7413         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
7414         return bool.
7415         (quick_symbol_functions::map_symtabs_matching_filename)
7416         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
7417         function_view as callback type and return bool.
7418         (expand_symtabs_matching): Adjust to use function_view as callback
7419         type.
7420         (maintenance_expand_name_matcher)
7421         (maintenance_expand_file_matcher): Delete.
7422         (maintenance_expand_symtabs): Use lambdas.
7423         * symtab.c (iterate_over_some_symtabs): Adjust to use
7424         function_view as callback types and return bool.
7425         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
7426         of a cleanup.
7427         (lookup_symtab_callback): Delete.
7428         (lookup_symtab): Use a lambda.
7429         (iterate_over_symbols): Adjust to use function_view as callback
7430         type.
7431         (struct search_symbols_data, search_symbols_file_matches)
7432         (search_symbols_name_matches): Delete.
7433         (search_symbols): Use a pair of lambdas.
7434         (struct add_name_data, add_macro_name, symbol_completion_matcher)
7435         (symtab_expansion_callback): Delete.
7436         (default_make_symbol_completion_list_break_on_1): Use lambdas.
7437         * symtab.h: Include "common/function-view.h".
7438         (iterate_over_some_symtabs): Adjust to use function_view as
7439         callback type and return bool.
7440         (iterate_over_symtabs): Adjust to use function_view as callback
7441         type.
7442         (symbol_found_callback_ftype): Remove 'data' parameter and return
7443         bool.
7444         (iterate_over_symbols): Adjust to use function_view as callback
7445         type.
7446
7447 2017-02-23  Pedro Alves  <palves@redhat.com>
7448
7449         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
7450         (%.o) <unittests/%.c>: New pattern.
7451         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
7452         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
7453         * common/function-view.h: New file.
7454         * unittests/function-view-selftests.c: New file.
7455         * configure: Regenerate.
7456
7457 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
7458
7459         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
7460         inferior_ptid.
7461         * go32-nat.c (go32_thread_alive): Likewise.
7462
7463 2017-02-23  Yao Qi  <yao.qi@linaro.org>
7464
7465         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
7466         delete.
7467
7468 2017-02-23  Yao Qi  <yao.qi@linaro.org>
7469
7470         * varobj.c (varobj_clear_saved_item): Use delete instead of
7471         xfree.
7472         (update_dynamic_varobj_children): Likewise.
7473
7474 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7475
7476         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
7477
7478 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
7479
7480         * common/enum-flags.h (enum_flags::enum_flags): Initialize
7481         m_enum_value to 0 in default constructor.
7482
7483 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
7484
7485         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
7486         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
7487         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
7488         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
7489         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
7490         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
7491         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
7492         IS_STORE_CONDITIONAL_INSN.
7493
7494 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7495
7496         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
7497
7498 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7499
7500         * NEWS (Changes since GDB 7.12): Add DWARF-5.
7501
7502 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7503
7504         * dwarf2read.c (skip_one_die, read_attribute_value)
7505         (dwarf2_const_value_attr, dump_die_shallow)
7506         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7507         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
7508
7509 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7510
7511         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
7512         (dwarf_parse_macro_header): Accept DWARF version 5.
7513         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
7514
7515 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7516
7517         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
7518         DW_AT_GNU_*.
7519         * common/common-exceptions.h (enum errors): Likewise.
7520         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
7521         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
7522         (dwarf_expr_context::execute_stack_op): Likewise.
7523         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
7524         Likewise.
7525         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
7526         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
7527         (show_entry_values_debug, call_site_to_target_addr)
7528         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
7529         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
7530         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
7531         (value_of_dwarf_block_entry, indirect_pieced_value)
7532         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
7533         (disassemble_dwarf_expression): Likewise.
7534         * dwarf2read.c (process_die, inherit_abstract_dies)
7535         (read_call_site_scope): Likewise.
7536         * gdbtypes.h (struct func_type, struct call_site_parameter)
7537         (struct call_site): Likewise.
7538         * stack.c (read_frame_arg): Likewise.
7539         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
7540
7541 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7542
7543         * defs.h (read_unsigned_leb128): New declaration.
7544         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
7545         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
7546         (dwarf2_find_location_expression): Call also
7547         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
7548         * dwarf2loc.h (dwarf2_version): New declaration.
7549         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
7550         rnglists.
7551         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
7552         .debug_rnglists.
7553         (struct dwop_section_names): Add loclists_dwo.
7554         (dwop_section_names): Add .debug_loclists.dwo.
7555         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
7556         (struct dwarf2_per_cu_data): Add dwarf_version.
7557         (struct dwo_sections): Add loclists.
7558         (struct attr_abbrev): Add implicit_const.
7559         (read_indirect_line_string): New declaration.
7560         (read_unsigned_leb128): Delete declaration.
7561         (rcuh_kind): New definition.
7562         (read_and_check_comp_unit_head): Change parameter
7563         is_debug_types_section to section_kind.
7564         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
7565         (read_comp_unit_head): Change parameter abfd to section, add parameter
7566         section_kind.  Handle DWARF-5.
7567         (error_check_comp_unit_head): Accept also DWARF version 5.
7568         (read_and_check_comp_unit_head): Change parameter
7569         is_debug_types_section to section_kind.
7570         (read_and_check_type_unit_head): Delete function.
7571         (read_abbrev_offset): Handle DWARF-5.
7572         (create_debug_type_hash_table): Add parameter section_kind.  Process
7573         only DW_UT_type.  Use signature and type_offset_in_tu from struct
7574         comp_unit_head.
7575         (create_debug_types_hash_table): Update create_debug_type_hash_table
7576         caller.
7577         (create_all_type_units): Call create_debug_type_hash_table.
7578         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
7579         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
7580         caller.
7581         (skip_one_die): Handle DW_FORM_implicit_const.
7582         (dwarf2_rnglists_process): New function.
7583         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
7584         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
7585         (read_attribute_value): Handle DW_FORM_implicit_const,
7586         DW_FORM_line_strp.
7587         (read_attribute): Handle DW_FORM_implicit_const.
7588         (read_indirect_string_at_offset_from): New function from
7589         read_indirect_string_at_offset.
7590         (read_indirect_string_at_offset): Call
7591         read_indirect_string_at_offset_from.
7592         (read_indirect_line_string_at_offset): New function.
7593         (read_indirect_string): New function comment.
7594         (read_indirect_line_string): New function.
7595         (read_unsigned_leb128): Make it global.
7596         (dwarf2_string_attr): Handle DWARF-5.
7597         (add_include_dir_stub, read_formatted_entries): New functions.
7598         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
7599         Handle DWARF-5.
7600         (per_cu_header_read_in): Update read_comp_unit_head caller.
7601         (dwarf2_version): New function.
7602         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
7603         rnglists.
7604         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
7605         fields.
7606
7607 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7608
7609         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
7610
7611 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7612
7613         * dwarf2read.c (dwarf2_ranges_process): New function from
7614         dwarf2_ranges_read.
7615         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
7616         dwarf2_ranges_process.
7617
7618 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7619
7620         * dwarf2read.c (create_debug_type_hash_table): New function from
7621         create_debug_types_hash_table.
7622         (create_debug_types_hash_table): Call create_debug_type_hash_table.
7623         (create_all_type_units, open_and_init_dwo_file): Update
7624         create_debug_types_hash_table callers.
7625
7626 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7627
7628         PR gdb/16188
7629         * fork-child.c (trace_start_error): Fix thinko.  va_end should
7630         refer to 'ap', not 'args'.
7631
7632 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7633             Pedro Alves  <palves@redhat.com>
7634
7635         PR gdb/16188
7636         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
7637         calls succeeded.
7638         * fork-child.c (trace_start_error): New function.
7639         (trace_start_error_with_name): Likewise.
7640         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
7641         * inf-ptrace.c (inf_ptrace_me): Likewise.
7642         * inferior.h (trace_start_error): New prototype.
7643         (trace_start_error_with_name): Likewise.
7644
7645 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7646
7647         PR gdb/21164
7648         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
7649         NULL before using it.
7650         * symmisc.c (maintenance_print_symbols): Likewise.
7651         (maintenance_print_msymbols): Likewise.
7652
7653 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7654
7655         * NEWS: Add record Python bindings entry.
7656
7657 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7658
7659         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
7660         py-record-full.o.
7661         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
7662         * python/py-record-btrace.c, python/py-record-btrace.h,
7663         python/py-record-full.c, python/py-record-full.h: New file.
7664         * python/py-record.c: Add include for py-record-btrace.h and
7665         py-record-full.h.
7666         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
7667         recpy_instruction_history, recpy_function_call_history, recpy_begin,
7668         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
7669         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
7670         New definition.
7671         (gdbpy_initialize_btrace): New export.
7672         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
7673
7674 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7675
7676         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
7677         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
7678         * python/py-record.c: New file.
7679         * python/python-internal.h (gdbpy_start_recording,
7680         gdbpy_current_recording, gdpy_stop_recording,
7681         gdbpy_initialize_record): New export.
7682         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
7683         (python_GdbMethods): Add gdbpy_start_recording,
7684         gdbpy_current_recording and gdbpy_stop_recording.
7685
7686 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7687
7688         * record-btrace.c (record_btrace_record_method): New function.
7689         (init_record_btrace_ops): Initialize to_record_method.
7690         * record-full.c (record_full_record_method): New function.
7691         (init_record_full_ops, init_record_full_core_ops): Add
7692         record_full_record_method.
7693         * record.h (enum record_method): New enum.
7694         * target-debug.h (target_debug_print_enum_record_method: New define.
7695         * target-delegates.c: Regenerate.
7696         * target.c (target_record_method): New function.
7697         * target.h: Include record.h.
7698         (struct target_ops) <to_record_method>: New field.
7699         (target_record_method): New export.
7700
7701 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7702
7703         * record.h (record_start, record_stop): New export.
7704         * record.c (record_start, record_stop): New function.
7705
7706 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7707
7708         * btrace.c (btrace_fetch): Copy function call segments pointer
7709         into a vector.
7710         (btrace_clear): Clear the vector.
7711         (btrace_find_insn_by_number): Use binary search to find the correct
7712         function call segment.
7713         * btrace.h (brace_fun_p): New typedef.
7714         (struct btrace_thread_info) <functions>: New field.
7715
7716 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7717
7718         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
7719         * btrace.c (btrace_decode_error): ... here.  New function.
7720         * btrace.h (btrace_decode_error): New export.
7721
7722 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
7723
7724         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
7725         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
7726         btrace_find_insn_by_number): Remove special case for gaps.
7727         * btrace.h (btrace_insn_get_error): New export.
7728         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
7729         * record-btrace.c (btrace_insn_history): Print number for gaps.
7730         (record_btrace_info, record_btrace_goto): Handle gaps.
7731
7732 2017-02-14  Tom Tromey  <tom@tromey.com>
7733
7734         PR python/13598:
7735         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
7736         event.
7737         * python/py-evts.c (gdbpy_initialize_py_events): Add
7738         before_prompt registry.
7739         * python/py-events.h (events_object) <before_prompt>: New field.
7740
7741 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
7742
7743         * btrace.c (ftrace_new_switch): Preserve up link and flags.
7744
7745 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
7746
7747         * symfile (_initialize_symfile): Add usage text to the load command's
7748         help text.
7749
7750 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
7751
7752         * utils.c (defaulted_query): Don't query on secondary UIs.
7753
7754 2017-02-10  Tom Tromey  <tom@tromey.com>
7755
7756         * rust-lang.c (rust_get_disr_info): Remove unused variable.
7757
7758 2017-02-10  Tom Tromey  <tom@tromey.com>
7759
7760         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
7761         "cleanup" local.
7762         * python/py-type.c (typy_legacy_template_argument): Remove
7763         unnecessary "cleanup" local.
7764
7765 2017-02-10  Tom Tromey  <tom@tromey.com>
7766
7767         * python/python.c (do_start_initialization): New function, from
7768         _initialize_python.
7769         (_initialize_python): Call do_start_initialization.
7770         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
7771         goto.
7772
7773 2017-02-10  Tom Tromey  <tom@tromey.com>
7774
7775         * python/py-prettyprint.c (pretty_print_one_value): Use
7776         gdbpy_ref.
7777
7778 2017-02-10  Tom Tromey  <tom@tromey.com>
7779
7780         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
7781         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
7782         gdbpy_ref.
7783         * python/py-type.c (field_new): Use gdbpy_ref.
7784         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
7785         gdbpy_ref.
7786         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
7787         (py_free_pspace): Likewise.
7788         (pspace_to_pspace_object): Likewise.
7789         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
7790         (py_free_objfile): Likewise.
7791         (objfile_to_objfile_object): Likewise.
7792         * python/py-inferior.c (delete_thread_object): Use
7793         gdbpy_ref.
7794         (infpy_read_memory): Likewise.
7795         (py_free_inferior): Likewise.
7796         * python/py-evtregistry.c (create_eventregistry_object): Use
7797         gdbpy_ref.
7798         * python/py-event.c (create_event_object): Use gdbpy_ref.
7799
7800 2017-02-10  Tom Tromey  <tom@tromey.com>
7801
7802         * python/py-ref.h (gdbpy_ref_policy): Now a template.
7803         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
7804         used.
7805         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
7806         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
7807         python/py-exitedevent.c, python/py-finishbreakpoint.c,
7808         python/py-framefilter.c, python/py-function.c,
7809         python/py-inferior.c, python/py-infevents.c,
7810         python/py-linetable.c, python/py-newobjfileevent.c,
7811         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
7812         python/py-signalevent.c, python/py-stopevent.c,
7813         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
7814         python/py-unwind.c, python/py-utils.c, python/py-value.c,
7815         python/py-varobj.c, python/py-xmethods.c, python/python.c,
7816         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
7817
7818 2017-02-10  Tom Tromey  <tom@tromey.com>
7819
7820         * ui-out.h (ui_out_emit_type): New class.
7821         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
7822         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
7823         and ui_out_emit_tuple.
7824         (enumerate_locals): Likewise.
7825         (py_mi_print_variables, py_print_locals, py_print_args): Use
7826         ui_out_emit_list.
7827         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
7828         ui_out_emit_list.
7829         * common/gdb_optional.h: New file.
7830
7831 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
7832
7833         * MAINTAINERS (Write After Approval): Update my e-mail address.
7834
7835 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
7836
7837         PR gdb/21122
7838         * breakpoint.c (_initialize_breakpoint): Update the help description
7839         of the 'commands' command to indicate that it takes a list argument.
7840
7841 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
7842
7843         * interps.c (current_interp_set_logging): Remove "return".
7844
7845 2017-02-09  Gary Benson  <gbenson@redhat.com>
7846
7847         * symtab.c (add_symtab_completions): Prevent NULL pointer
7848         dereference.
7849
7850 2017-02-08  Pedro Alves  <palves@redhat.com>
7851
7852         * interps.c (interp::interp): Remove reference to quiet_p.
7853         (interp_set): Make static.  Remove dead "Switching to" output
7854         code.
7855         (interp_quiet_p, interp_set_quiet): Delete.
7856         (interpreter_exec_cmd): Don't set the interpreter quiet.
7857         * interps.h (interp_quiet_p): Make static.
7858         (class interp) <quiet_p>: Remove field
7859
7860 2017-02-08  Jerome Guitton  <guitton@adacore.com>
7861
7862         * cli/cli-decode.c (find_command_name_length): Make it extern.
7863         * cli/cli-decode.h (find_command_name_length): Declare.
7864         * cli/cli-script.c (command_name_equals, line_first_arg):
7865         New functions.
7866         (process_next_line): Use cli-decode to parse command names.
7867         (build_command_line): Make args a constant pointer.
7868
7869 2017-02-08  Jerome Guitton  <guitton@adacore.com>
7870
7871         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
7872         Remove case-insensitive search.
7873
7874 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
7875
7876         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
7877         at the end of the line.  Avoids an ARI warning.
7878
7879 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
7880
7881         * NEWS: Mention support for record/replay of Intel 64 rdrand and
7882         rdseed instructions.
7883         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
7884
7885 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
7886
7887         PR tdep/20936
7888         Provide and use sparc32 and sparc64 target description XML files.
7889         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
7890         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
7891         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
7892         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
7893         * features/sparc/sparc32-solaris.xml: New file.
7894         * features/sparc/sparc64-solaris.xml: New file.
7895         * features/sparc/sparc32-solaris.c: Generated.
7896         * features/sparc/sparc64-solaris.c: Generated.
7897         * sparc-tdep.h: Account for differences in target descriptions.
7898         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
7899         (sparc32_register_type): Use target provided registers.
7900         (validate_tdesc_registers): New function.
7901         (sparc32_gdbarch_init): Use tdesc_has_registers.
7902         Set pseudoregister functions.
7903         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
7904         (sparc64_register_type): Use target provided registers.
7905         (sparc64_init_abi): Set pseudoregister functions.
7906
7907 2017-02-03  Tom Tromey  <tom@tromey.com>
7908
7909         PR rust/21097:
7910         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
7911         with a single member.
7912
7913 2017-02-03  Pedro Alves  <palves@redhat.com>
7914
7915         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
7916         (cli_interp_base::~cli_interp_base): New.
7917         (cli_interp): New struct.
7918         (as_cli_interp): Cast the interp itself to cli_interp.
7919         (cli_interpreter_pre_command_loop): Rename to ...
7920         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
7921         parameter.
7922         (cli_interpreter_init): Rename to ...
7923         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
7924         boolean.  Make extern.
7925         (cli_interpreter_resume): Rename to ...
7926         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
7927         extern.
7928         (cli_interpreter_suspend): Rename to ...
7929         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
7930         extern.
7931         (cli_interpreter_exec): Rename to ...
7932         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
7933         extern.
7934         (cli_interpreter_supports_command_editing): Rename to ...
7935         (cli_interp_base::supports_command_editing): ... this.  Remove
7936         'interp' parameter.  Make extern.
7937         (cli_ui_out): Rename to ...
7938         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
7939         Make extern.
7940         (cli_set_logging): Rename to ...
7941         (cli_interp_base::set_logging): ... this.  Remove 'interp'
7942         parameter.  Make extern.
7943         (cli_interp_procs): Delete.
7944         (cli_interp_factory): Adjust to use "new".
7945         * cli/cli-interp.h: Include "interps.h".
7946         (struct cli_interp_base): New struct.
7947         * interps.c (struct interp): Delete.  Fields moved to interps.h.
7948         (interp_new): Delete.
7949         (interp::interp, interp::~interp): New.
7950         (interp_set): Use bool, and return void.  Assume the interpreter
7951         has suspend, init and resume methods, and that the all return
7952         void.
7953         (set_top_level_interpreter): interp_set returns void.
7954         (interp_ui_out): Adapt.
7955         (current_interp_set_logging): Adapt.
7956         (interp_data): Delete.
7957         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
7958         (interp_exec): Adapt.
7959         (top_level_interpreter_data): Delete.
7960         * interps.h (interp_init_ftype, interp_resume_ftype)
7961         (interp_suspend_ftype, interp_exec_ftype)
7962         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
7963         (class interp): New.
7964         (interp_new): Delete.
7965         (interp_set): Now returns void.  Use bool.
7966         (interp_data, top_level_interpreter_data): Delete.
7967         * mi/mi-common.h: Include interps.h.
7968         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
7969         init, resume, suspect, exec, interp_ui_out, set_logging and
7970         pre_command_loop methods.
7971         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
7972         (mi_interpreter_init): Rename to ...
7973         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
7974         bool, return void and make extern.  Adjust.
7975         (mi_interpreter_resume): ... Rename to ...
7976         (mi_interp::resume): ... this.  Remove the 'data' parameter,
7977         return void and make extern.  Adjust.
7978         (mi_interpreter_suspend): ... Rename to ...
7979         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
7980         return void and make extern.  Adjust.
7981         (mi_interpreter_exec): ... Rename to ...
7982         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
7983         extern.  Adjust.
7984         (mi_interpreter_pre_command_loop): ... Rename to ...
7985         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
7986         parameter and make extern.
7987         (mi_on_normal_stop_1): Adjust.
7988         (mi_ui_out): Rename to ...
7989         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
7990         parameter and make extern.  Adjust.
7991         (mi_set_logging): Rename to ...
7992         (mi_interp::set_logging): ... this.  Remove the 'interp'
7993         parameter and make extern.  Adjust.
7994         (mi_interp_procs): Delete.
7995         (mi_interp_factory): Adjust to use 'new'.
7996         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
7997         (mi_print_exception, mi_execute_command, mi_load_progress):
7998         Adjust.
7999         * tui/tui-interp.c (tui_interp): New class.
8000         (as_tui_interp): Return a tui_interp pointer.
8001         (tui_on_normal_stop, tui_on_signal_received)
8002         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
8003         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
8004         to use interp::interp_ui_out.
8005         (tui_init): Rename to ...
8006         (tui_interp::init): ... this.  Remove the 'self' parameter, use
8007         bool, return void and make extern.  Adjust.
8008         (tui_resume): Rename to ...
8009         (tui_interp::resume): ... this.  Remove the 'data' parameter,
8010         return void and make extern.  Adjust.
8011         (tui_suspend): Rename to ...
8012         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
8013         return void and make extern.  Adjust.
8014         (tui_ui_out): Rename to ...
8015         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
8016         parameter, and make extern.  Adjust.
8017         (tui_exec): Rename to ...
8018         (tui_interp::exec): ... this.  Remove the 'data' parameter and
8019         make extern.
8020         (tui_interp_procs): Delete.
8021         (tui_interp_factory): Use "new".
8022
8023 2017-02-02  Tom Tromey  <tom@tromey.com>
8024
8025         * rust-exp.y (ends_raw_string, space_then_number)
8026         (rust_identifier_start_p): Return bool.
8027         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
8028         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
8029         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
8030         (rust_chartype_p): Return bool.
8031         (val_print_struct, rust_print_struct_def, rust_print_type):
8032         Update.
8033         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
8034         Return bool.
8035
8036 2017-02-02  Tom Tromey  <tom@tromey.com>
8037
8038         * rust-lang.c: Reindent.
8039
8040 2017-02-02  Tom Tromey  <tom@tromey.com>
8041
8042         * rust-lang.h (rust_crate_for_block): Update.
8043         * rust-lang.c (rust_crate_for_block): Return std::string.
8044         (rust_get_disr_info): Use std:;string, not
8045         gdb::unique_xmalloc_ptr.
8046         * rust-exp.y (crate_name): Update.
8047
8048 2017-02-02  Pedro Alves  <palves@redhat.com>
8049
8050         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
8051         field out of gdb_disassembler_test and make it static.
8052
8053 2017-02-02  Pedro Alves  <palves@redhat.com>
8054
8055         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
8056         mi1_interp and mi_interp fields.
8057
8058 2017-02-02  Pedro Alves  <palves@redhat.com>
8059
8060         * cli/cli-interp.c (struct saved_output_files, saved_output):
8061         Moved from cli/cli-logging.c.
8062         (cli_set_logging): New function.
8063         (cli_interp_procs): Install cli_set_logging.
8064         * cli/cli-interp.h (make_logging_output, cli_set_logging):
8065         Declare.
8066         * cli/cli-logging.c (struct saved_output_files, saved_output):
8067         Moved to cli/cli-interp.c.
8068         (pop_output_files): Don't save outputs here.
8069         (make_logging_output): New function.
8070         (handle_redirections): Don't build tee nor save previous outputs
8071         here.
8072         * interps.c (current_interp_set_logging): Change prototype.
8073         Assume there's always a set_logging_proc method installed.
8074         * interps.h (interp_set_logging_ftype): Change prototype.
8075         (current_interp_set_logging): Change prototype and adjust comment.
8076         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
8077         use make_logging_output.
8078         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
8079 2017-02-02  Pedro Alves  <palves@redhat.com>
8080
8081         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
8082         from ...
8083         (set_logging_overwrite): ... here.
8084         (logging_no_redirect_file): Delete.
8085         (set_logging_redirect): Don't handle redirection on the fly.
8086         Instead warn that "logging off" / "logging on" is necessary.
8087         (pop_output_files): Delete references to logging_no_redirect_file.
8088         (show_logging_command): Always speak in terms of what will happen
8089         once logging is reenabled.
8090
8091 2017-02-02  Pedro Alves  <palves@redhat.com>
8092
8093         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
8094
8095 2017-02-02  Pedro Alves  <palves@redhat.com>
8096
8097         * disasm.c (gdb_pretty_print_insn): Rename to ...
8098         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
8099         Remove gdbarch parameter.  Adapt to clear the object's buffers
8100         instead of allocating new buffers, and to print using the object's
8101         gdb_disassembler instead of calling gdb_print_insn.
8102         (dump_insns): Use gdb_pretty_print_disassembler.
8103         * disasm.h (gdb_pretty_print_insn): Delete declaration.
8104         (gdb_pretty_print_disassembler): New class.
8105         * record-btrace.c (btrace_insn_history): Use
8106         gdb_pretty_print_disassembler.
8107
8108 2017-02-02  Pedro Alves  <palves@redhat.com>
8109
8110         * ada-lang.c (type_as_string): Use string_file.
8111         * ada-valprint.c (ada_print_floating): Use string_file.
8112         * ada-varobj.c (ada_varobj_scalar_image)
8113         (ada_varobj_get_value_image): Use string_file.
8114         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
8115         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
8116         * breakpoint.c (update_inserted_breakpoint_locations)
8117         (insert_breakpoint_locations, reattach_breakpoints)
8118         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
8119         (print_it_watchpoint): Use string_file.
8120         (save_breakpoints): Use stdio_file.
8121         * c-exp.y (oper): Use string_file.
8122         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
8123         tee_file.
8124         (pop_output_files): Use delete.
8125         (handle_redirections): Use stdio_file and tee_file.
8126         * cli/cli-setshow.c (do_show_command): Use string_file.
8127         * compile/compile-c-support.c (c_compute_program): Use
8128         string_file.
8129         * compile/compile-c-symbols.c (generate_vla_size): Take a
8130         'string_file &' instead of a 'ui_file *'.
8131         (generate_c_for_for_one_variable): Take a 'string_file &' instead
8132         of a 'ui_file *'.  Use string_file.
8133         (generate_c_for_variable_locations): Take a 'string_file &'
8134         instead of a 'ui_file *'.
8135         * compile/compile-internal.h (generate_c_for_for_one_variable):
8136         Take a 'string_file &' instead of a 'ui_file *'.
8137         * compile/compile-loc2c.c (push, pushf, unary, binary)
8138         (print_label, pushf_register_address, pushf_register)
8139         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
8140         'ui_file *'.  Adjust.
8141         * compile/compile.c (compile_to_object): Use string_file.
8142         * compile/compile.h (compile_dwarf_expr_to_c)
8143         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
8144         'ui_file *'.
8145         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
8146         (replace_typedefs_qualified_name): Use string_file and
8147         obstack_copy0.
8148         * disasm.c (gdb_pretty_print_insn): Use string_file.
8149         (gdb_disassembly): Adjust reference the null_stream global.
8150         (do_ui_file_delete): Delete.
8151         (gdb_insn_length): Use null_stream.
8152         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
8153         * dwarf2loc.c (dwarf2_compile_property_to_c)
8154         (locexpr_generate_c_location, loclist_generate_c_location): Take a
8155         'string_file &' instead of a 'ui_file *'.
8156         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
8157         * dwarf2read.c (do_ui_file_peek_last): Delete.
8158         (dwarf2_compute_name): Use string_file.
8159         * event-top.c (gdb_setup_readline): Use stdio_file.
8160         * gdbarch.sh (verify_gdbarch): Use string_file.
8161         * gdbtypes.c (safe_parse_type): Use null_stream.
8162         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
8163         string_file.
8164         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
8165         'string_file *' instead of a 'ui_file *'.
8166         (gdbscm_arch_disassemble): Use string_file.
8167         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
8168         * guile/scm-ports.c (class ioscm_file_port): Now a class that
8169         inherits from ui_file.
8170         (ioscm_file_port_delete, ioscm_file_port_rewind)
8171         (ioscm_file_port_put): Delete.
8172         (ioscm_file_port_write): Rename to ...
8173         (ioscm_file_port::write): ... this.  Remove file_port_magic
8174         checks.
8175         (ioscm_file_port_new): Delete.
8176         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
8177         ui_file_up.
8178         * guile/scm-type.c (tyscm_type_name): Use string_file.
8179         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
8180         Use string_file.
8181         * infcmd.c (print_return_value_1): Use string_file.
8182         * infrun.c (print_target_wait_results): Use string_file.
8183         * language.c (add_language): Use string_file.
8184         * location.c (explicit_to_string_internal): Use string_file.
8185         * main.c (captured_main_1): Use null_file.
8186         * maint.c (maintenance_print_architecture): Use stdio_file.
8187         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
8188         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
8189         event_channel>: Change type to mi_console_file pointer.
8190         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
8191         (mi_console_file_delete): Delete.
8192         (struct mi_console_file): Delete.
8193         (mi_console_file_magic): Delete.
8194         (mi_console_file_new): Delete.
8195         (mi_console_file::mi_console_file): New.
8196         (mi_console_file_delete): Delete.
8197         (mi_console_file_fputs): Delete.
8198         (mi_console_file::write): New.
8199         (mi_console_raw_packet): Delete.
8200         (mi_console_file::flush): New.
8201         (mi_console_file_flush): Delete.
8202         (mi_console_set_raw): Rename to ...
8203         (mi_console_file::set_raw): ... this.
8204         * mi/mi-console.h (class mi_console_file): New class.
8205         (mi_console_file_new, mi_console_set_raw): Delete.
8206         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
8207         (mi_set_logging): Use delete and tee_file.  Adjust.
8208         * mi/mi-main.c (output_register): Use string_file.
8209         (mi_cmd_data_evaluate_expression): Use string_file.
8210         (mi_cmd_data_read_memory): Use string_file.
8211         (mi_cmd_execute, print_variable_or_computed): Use string_file.
8212         * mi/mi-out.c (mi_ui_out::main_stream): New.
8213         (mi_ui_out::rewind): Use main_stream and
8214         string_file.
8215         (mi_ui_out::put): Use main_stream and string_file.
8216         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8217         Allocate a 'string_file' instead.
8218         (mi_out_new): Don't allocate a mem_fileopen stream here.
8219         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
8220         (mi_ui_out::main_stream): Declare method.
8221         * printcmd.c (eval_command): Use string_file.
8222         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
8223         * python/py-arch.c (archpy_disassemble): Use string_file.
8224         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
8225         * python/py-frame.c (frapy_str): Use string_file.
8226         * python/py-framefilter.c (py_print_type, py_print_single_arg):
8227         Use string_file.
8228         * python/py-type.c (typy_str): Use string_file.
8229         * python/py-unwind.c (unwind_infopy_str): Use string_file.
8230         * python/py-value.c (valpy_str): Use string_file.
8231         * record-btrace.c (btrace_insn_history): Use string_file.
8232         * regcache.c (regcache_print): Use stdio_file.
8233         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
8234         * remote.c (escape_buffer): Use string_file.
8235         * rust-lang.c (rust_get_disr_info): Use string_file.
8236         * serial.c (serial_open_ops_1): Use stdio_file.
8237         (do_serial_close): Use delete.
8238         * stack.c (print_frame_arg): Use string_file.
8239         (print_frame_args): Remove local mem_fileopen stream, not used.
8240         (print_frame): Use string_file.
8241         * symmisc.c (maintenance_print_symbols): Use stdio_file.
8242         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
8243         Take a 'string_file *' instead of a 'ui_file *'.
8244         * top.c (new_ui): Use stdio_file and stderr_file.
8245         (free_ui): Use delete.
8246         (execute_command_to_string): Use string_file.
8247         (quit_confirm): Use string_file.
8248         * tracepoint.c (collection_list::append_exp): Use string_file.
8249         * tui/tui-disasm.c (tui_disassemble): Use string_file.
8250         * tui/tui-file.c: Don't include "ui-file.h".
8251         (enum streamtype, struct tui_stream): Delete.
8252         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
8253         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
8254         (tui_file::tui_file): New method.
8255         (tui_file_fputs): Delete.
8256         (tui_file_get_strbuf): Delete.
8257         (tui_file::puts): New method.
8258         (tui_file_adjust_strbuf): Delete.
8259         (tui_file_flush): Delete.
8260         (tui_file::flush): New method.
8261         * tui/tui-file.h: Tweak intro comment.
8262         Include ui-file.h.
8263         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
8264         (tui_file_adjust_strbuf): Delete declarations.
8265         (class tui_file): New class.
8266         * tui/tui-io.c (tui_initialize_io): Use tui_file.
8267         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
8268         (tui_register_format): Use string_stream.
8269         * tui/tui-stack.c (tui_make_status_line): Use string_file.
8270         (tui_get_function_from_frame): Use string_file.
8271         * typeprint.c (type_to_string): Use string_file.
8272         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
8273         (null_stream): New global.
8274         (ui_file_delete): Delete.
8275         (ui_file::ui_file): New.
8276         (null_file_isatty): Delete.
8277         (ui_file::~ui_file): New.
8278         (null_file_rewind): Delete.
8279         (ui_file::printf): New.
8280         (null_file_put): Delete.
8281         (null_file_flush): Delete.
8282         (ui_file::putstr): New.
8283         (null_file_write): Delete.
8284         (ui_file::putstrn): New.
8285         (null_file_read): Delete.
8286         (ui_file::putc): New.
8287         (null_file_fputs): Delete.
8288         (null_file_write_async_safe): Delete.
8289         (ui_file::vprintf): New.
8290         (null_file_delete): Delete.
8291         (null_file::write): New.
8292         (null_file_fseek): Delete.
8293         (null_file::puts): New.
8294         (ui_file_data): Delete.
8295         (null_file::write_async_safe): New.
8296         (gdb_flush, ui_file_isatty): Adjust.
8297         (ui_file_put, ui_file_rewind): Delete.
8298         (ui_file_write): Adjust.
8299         (ui_file_write_for_put): Delete.
8300         (ui_file_write_async_safe, ui_file_read): Adjust.
8301         (ui_file_fseek): Delete.
8302         (fputs_unfiltered): Adjust.
8303         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
8304         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
8305         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
8306         (set_ui_file_data): Delete.
8307         (string_file::~string_file, string_file::write)
8308         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
8309         (do_ui_file_as_string, ui_file_as_string): Delete.
8310         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
8311         (struct mem_file): Delete.
8312         (mem_file_new): Delete.
8313         (stdio_file::stdio_file): New.
8314         (mem_file_delete): Delete.
8315         (stdio_file::stdio_file): New.
8316         (mem_fileopen): Delete.
8317         (stdio_file::~stdio_file): New.
8318         (mem_file_rewind): Delete.
8319         (stdio_file::set_stream): New.
8320         (mem_file_put): Delete.
8321         (stdio_file::open): New.
8322         (mem_file_write): Delete.
8323         (stdio_file_magic, struct stdio_file): Delete.
8324         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
8325         (stdio_file::flush): New.
8326         (stdio_file_read): Rename to ...
8327         (stdio_file::read): ... this.  Adjust.
8328         (stdio_file_write): Rename to ...
8329         (stdio_file::write): ... this.  Adjust.
8330         (stdio_file_write_async_safe): Rename to ...
8331         (stdio_file::write_async_safe) ... this.  Adjust.
8332         (stdio_file_fputs): Rename to ...
8333         (stdio_file::puts) ... this.  Adjust.
8334         (stdio_file_isatty): Delete.
8335         (stdio_file_fseek): Delete.
8336         (stdio_file::isatty): New.
8337         (stderr_file_write): Rename to ...
8338         (stderr_file::write) ... this.  Adjust.
8339         (stderr_file_fputs): Rename to ...
8340         (stderr_file::puts) ... this.  Adjust.
8341         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
8342         (stderr_file::stderr_file): New.
8343         (tee_file_magic): Delete.
8344         (struct tee_file): Delete.
8345         (tee_file::tee_file): New.
8346         (tee_file_new): Delete.
8347         (tee_file::~tee_file): New.
8348         (tee_file_delete): Delete.
8349         (tee_file_flush): Rename to ...
8350         (tee_file::flush): ... this.  Adjust.
8351         (tee_file_write): Rename to ...
8352         (tee_file::write): ... this.  Adjust.
8353         (tee_file::write_async_safe): New.
8354         (tee_file_fputs): Rename to ...
8355         (tee_file::puts): ... this.  Adjust.
8356         (tee_file_isatty): Rename to ...
8357         (tee_file::isatty): ... this.  Adjust.
8358         * ui-file.h (struct obstack, struct ui_file): Don't
8359         forward-declare.
8360         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
8361         (ui_file_write_ftype)
8362         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
8363         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
8364         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
8365         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
8366         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
8367         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
8368         (set_ui_file_fseek): Delete.
8369         (ui_file_data, ui_file_delete, ui_file_rewind)
8370         (struct ui_file): New.
8371         (ui_file_up): New.
8372         (class null_file): New.
8373         (null_stream): Declare.
8374         (ui_file_write_for_put, ui_file_put): Delete.
8375         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
8376         Delete.
8377         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
8378         (gdb_fopen, tee_file_new): Delete.
8379         (struct string_file): New.
8380         (struct stdio_file): New.
8381         (stdio_file_up): New.
8382         (struct stderr_file): New.
8383         (class tee_file): New.
8384         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
8385         of a 'ui_file *'.  Adjust.
8386         * ui-out.h (class ui_out) <field_stream>: Likewise.
8387         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
8388         (null_stream): Delete.
8389         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
8390         Adjust.
8391         * utils.h (struct ui_file): Delete forward declaration..
8392         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
8393         (error_stream): Take a 'string_file &' instead of a
8394         'ui_file *'.
8395         * varobj.c (varobj_value_get_print_value): Use string_file.
8396         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
8397         * gdbarch.c: Regenerate.
8398
8399 2017-02-02  Pedro Alves  <palves@redhat.com>
8400
8401         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
8402         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
8403         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
8404         Adjust to call gdb_print_insn instead of
8405         gdb_disassembler::print_insn.
8406         (dump_insns, do_mixed_source_and_assembly_deprecated)
8407         (do_mixed_source_and_assembly, do_assembly_only): Add back a
8408         'gdbarch' parameter.  Remove gdb_disassembler parameter.
8409         (gdb_disassembly): Don't allocate a gdb_disassembler here.
8410         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
8411         declaration.
8412         (gdb_pretty_print_insn): Re-add declaration.
8413         * record-btrace.c (btrace_insn_history): Don't allocate a
8414         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
8415
8416 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
8417
8418         * disasm.h (gdb_disassembly): Remove file_string parameter.
8419         * disasm.c (gdb_disassembly): Likewise.
8420         * cli/cli-cmds.c (print_disassembly): Adapt.
8421         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
8422         * stack.c (do_gdb_disassembly): Likewise.
8423
8424 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8425
8426         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
8427         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
8428         targets.  And if the implicit value is longer than needed, extract
8429         the first bytes instead of the "least significant" ones.
8430
8431 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
8432
8433         * btrace.c (btrace_enable): Do not call btrace_add_pc for
8434         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
8435         (btrace_fetch): Assert can_access_registers_ptid.
8436         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
8437         validate_registers_access.
8438
8439 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
8440
8441         * gdbthread.h (can_access_registers_ptid): New.
8442         * thread.c (can_access_registers_ptid): New.
8443
8444 2017-02-01  Pedro Alves  <palves@redhat.com>
8445
8446         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
8447
8448 2017-01-31  Pedro Alves  <palves@redhat.com>
8449
8450         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
8451         Fix typos.
8452
8453 2017-01-31  Pedro Alves  <palves@redhat.com>
8454
8455         * stack.c (print_frame_args): Remove local mem_fileopen stream,
8456         not used.
8457
8458 2017-01-31  Pedro Alves  <palves@redhat.com>
8459
8460         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
8461
8462 2017-01-31  Pedro Alves  <palves@redhat.com>
8463
8464         * common/scoped_restore.h
8465         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
8466         change the value's parameter type to T2.
8467         (make_scoped_restore): Likewise.
8468
8469 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8470             Richard Henderson  <rth@redhat.com>
8471
8472         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
8473         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
8474         GS_BASE for older kernels.
8475         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
8476         GS_BASE for older kernels.
8477         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
8478         and GS_BASE to the offset table.
8479         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
8480         system register group.
8481         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
8482         for older kernels.
8483         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
8484         amd64 ABI.
8485         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
8486         AMD64_GSBASE_REGNUM.
8487         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
8488         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
8489         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
8490         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
8491         i386/64bit-segments.xml in those rules.
8492         * features/i386/64bit-segments.xml: New file.
8493         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
8494         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
8495         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
8496         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
8497         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
8498         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
8499         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
8500         * features/i386/amd64-avx-linux.c: Regenerated.
8501         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
8502         * features/i386/amd64-avx-mpx.c: Regenerated.
8503         * features/i386/amd64-avx512-linux.c: Regenerated.
8504         * features/i386/amd64-linux.c: Regenerated.
8505         * features/i386/amd64-mpx-linux.c: Regenerated.
8506         * features/i386/i386-avx-mpx-linux.c: Regenerated.
8507         * features/i386/i386-avx-mpx.c: Regenerated.
8508         * features/i386/x32-avx-linux.c: Regenerated.
8509         * features/i386/x32-avx512-linux.c: Regenerated.
8510         * regformats/i386/amd64-avx-linux.dat: Regenerated.
8511         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
8512         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
8513         * regformats/i386/amd64-linux.dat: Regenerated.
8514         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
8515         * regformats/i386/x32-avx-linux.dat: Regenerated.
8516         * regformats/i386/x32-avx512-linux.dat: Regenerated.
8517         * regformats/i386/x32-linux.dat: Regenerated.
8518
8519 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8520
8521         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
8522         Set to AMD64_NUM_REGS.
8523
8524 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8525
8526         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
8527         that checks validity of a register number.
8528
8529 2017-01-27  Kees Cook  <keescook@google.com>
8530
8531         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
8532         fetch_fpregs if target has fpa registers.
8533         (arm_linux_store_inferior_registers): Call store_fpregs if target
8534         has fpa registers.
8535
8536 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8537
8538         * cris-tdep.c (cris_gdbarch_init): Remove check for
8539         info.byte_order and force it to BFD_ENDIAN_LITTLE.
8540
8541 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
8542
8543         * corelow.c (get_core_register_section): Check for regset
8544         existence before checking for REGSET_VARIABLE_SIZE.
8545
8546 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8547             Pedro Alves  <palves@redhat.com>
8548
8549         PR gdb/20939
8550         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
8551         call memory_error, save memaddr instead.
8552         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
8553         negative, cal memory_error.
8554         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
8555
8556 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8557
8558         * disasm-selftests.c (memory_error_test): New function.
8559         (_initialize_disasm_selftests): Register memory_error_test.
8560
8561 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8562
8563         * Makefile.in (SFILES): Add disasm-selftests.c and
8564         selftest-arch.c.
8565         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
8566         * disasm-selftests.c: New file.
8567         * selftest-arch.c: New file.
8568         * selftest-arch.h: New file.
8569
8570 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8571
8572         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
8573         to bfd_arch_mep.  Don't return 0 if section is not
8574         found.  Call print_insn_mep.
8575
8576 2017-01-26  Pedro Alves  <palves@redhat.com>
8577             Yao Qi  <yao.qi@linaro.org>
8578
8579         * arm-tdep.c: Include "disasm.h".
8580         (gdb_print_insn_arm): Update code to get gdbarch.
8581         * disasm.c (dis_asm_read_memory): Change it to
8582         gdb_disassembler::dis_asm_read_memory.
8583         (dis_asm_memory_error): Likewise.
8584         (dis_asm_print_address): Likewise.
8585         (gdb_pretty_print_insn): Change it to
8586         gdb_disassembler::pretty_print_insn.
8587         (dump_insns): Add one argument gdb_disassemlber.  All
8588         callers updated.
8589         (do_mixed_source_and_assembly_deprecated): Likewise.
8590         (do_mixed_source_and_assembly): Likewise.
8591         (do_assembly_only): Likewise.
8592         (gdb_disassembler::gdb_disassembler): New.
8593         (gdb_disassembler::print_insn): New.
8594         * disasm.h (class gdb_disassembler): New.
8595         (gdb_pretty_print_insn): Remove declaration.
8596         (gdb_disassemble_info): Likewise.
8597         * guile/scm-disasm.c (class gdbscm_disassembler): New.
8598         (gdbscm_disasm_read_memory_worker): Update.
8599         (gdbscm_disasm_read_memory): Update.
8600         (gdbscm_disasm_memory_error): Remove.
8601         (gdbscm_disasm_print_address): Remove.
8602         (gdbscm_disassembler::gdbscm_disassembler): New.
8603         (gdbscm_print_insn_from_port): Update.
8604         * mips-tdep.c: Include disasm.h.
8605         (gdb_print_insn_mips): Update code to get gdbarch.
8606         * record-btrace.c (btrace_insn_history): Update.
8607         * spu-tdep.c: Include disasm.h.
8608         (struct spu_dis_asm_data): Remove.
8609         (struct spu_dis_asm_info): New.
8610         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
8611         SPU id.
8612         (gdb_print_insn_spu): Cast disassemble_info to
8613         spu_dis_asm_info.
8614
8615 2017-01-26  Yao Qi  <yao.qi@linaro.org>
8616
8617         * disasm.c (do_ui_file_delete): Delete.
8618         (gdb_insn_length): Move code creating stream to ...
8619         * utils.c (null_stream): ... here.  New function.
8620         * utils.h (null_stream): Declare.
8621
8622 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
8623
8624         * python/py-inferior.c (find_thread_object): Return directly
8625         from the loop.  Remove "found" variable.
8626
8627 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
8628
8629         GDB 7.12.1 released.
8630
8631 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
8632
8633         * python/py-function.c (fnpy_call): Reorder declarations to have
8634         the gdbpy_enter object declared first.
8635         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
8636
8637 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
8638
8639         PR python/21068
8640         * python/python-internal.h (PyMem_RawMalloc): Define for
8641         Python < 3.4.
8642         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
8643         PyMem_RawMalloc instead of PyMem_Malloc.
8644
8645 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
8646             Luis Machado  <lgustavo@codesourcery.com>
8647
8648         * NEWS (New commands): Mention flash-erase.
8649         (New MI commands): Mention target-flash-erase.
8650         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
8651         command.
8652         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
8653         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
8654         * target.c (flash_erase_command): New function.
8655         (initialize_targets): Add new flash-erase command.
8656         * target.h (flash_erase_command): New declaration.
8657
8658 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
8659
8660         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
8661         HAVE_SYS_PROCFS_H is defined.
8662
8663 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
8664
8665         * remote.c (struct cached_reg): Change data into a pointer.
8666         * (stop_reply_dtr): Free data pointers before deleting vector.
8667         (process_stop_reply): Likewise.
8668         (remote_parse_stop_reply): Allocate space for data
8669
8670 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
8671
8672         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
8673         MAX_REGISTER_SIZE.
8674         (amd64_pseudo_register_read_value): Likewise.
8675         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
8676         (store_register_using_P): Likewise.
8677         * regcache.c (regcache_xfer_part): Likewise.
8678
8679 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
8680
8681         Split real and pseudo registers.
8682         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
8683         (sparc32_pseudo_regnum): New enum.
8684         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
8685         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
8686         (SPARC32_CP0_REGISTERS): New macro.
8687         (sparc32_pseudo_register_name): New function.
8688         (sparc32_register_name): Use sparc32_pseudo_register_name.
8689         (sparc32_pseudo_register_type): New function.
8690         (sparc32_register_type): Use sparc32_pseudo_register_type.
8691         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
8692         pseudo register numbers.
8693         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
8694         (SPARC64_CP0_REGISTERS): New macro.
8695         (sparc64_pseudo_register_name): New function.
8696         (sparc64_register_name): Use sparc64_pseudo_register_name.
8697         (sparc64_pseudo_register_type): New function.
8698         (sparc64_register_type): Use sparc64_pseudo_register_type.
8699         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
8700         pseudo register numbers.
8701         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
8702         sparc64_store_arguments): Handle pseudo register numbers.
8703
8704 2017-01-13  Yao Qi  <yao.qi@linaro.org>
8705
8706         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
8707         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
8708         output.
8709         (getpkt_or_notif_sane_1): Likewise.
8710
8711 2017-01-13  Yao Qi  <yao.qi@linaro.org>
8712
8713         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
8714         of CC.  Pass "-x c++-header" instead of "-x c".
8715
8716 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
8717
8718         * remote.c (remote_can_async_p): Update comment.
8719
8720 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
8721
8722         * linux-nat.c (linux_nat_can_async_p): Update comment.
8723
8724 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
8725
8726         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
8727
8728 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
8729
8730         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
8731
8732 2017-01-10  Tom Tromey  <tom@tromey.com>
8733
8734         * python/py-type.c (typy_legacy_template_argument): Update.
8735         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
8736         ~demangle_parse_info): Declare new members.
8737         (cp_demangled_name_to_comp): Return unique_ptr.
8738         (cp_demangled_name_parse_free)
8739         (make_cleanup_cp_demangled_name_parse_free)
8740         (cp_new_demangle_parse_info): Remove.
8741         * cp-support.c (do_demangled_name_parse_free_cleanup)
8742         (make_cleanup_cp_demangled_name_parse_free): Remove.
8743         (inspect_type, cp_canonicalize_string_full)
8744         (cp_canonicalize_string): Update.
8745         (mangled_name_to_comp): Change return type.
8746         (cp_class_name_from_physname, method_name_from_physname)
8747         (cp_func_name, cp_remove_params): Update.
8748         * cp-name-parser.y (demangle_parse_info): New constructor, from
8749         cp_new_demangle_parse_info.
8750         (~demangle_parse_info): New destructor, from
8751         cp_demangled_name_parse_free.
8752         (cp_merge_demangle_parse_infos): Update.
8753         (cp_demangled_name_to_comp): Change return type.
8754
8755 2017-01-10  Tom Tromey  <tom@tromey.com>
8756
8757         * top.c (prevent_dont_repeat): Change return type.
8758         * python/python.c (execute_gdb_command): Use std::string.
8759         Update.
8760         * guile/guile.c (gdbscm_execute_gdb_command): Update.
8761         * command.h (prevent_dont_repeat): Change return type.
8762         * breakpoint.c (bpstat_do_actions_1): Update.
8763
8764 2017-01-10  Tom Tromey  <tom@tromey.com>
8765
8766         * value.h (scoped_value_mark::~scoped_value_mark): Call
8767         free_to_mark.
8768         (scoped_value_mark::free_to_mark): New method.
8769         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
8770         scoped_value_mark.
8771
8772 2017-01-10  Tom Tromey  <tom@tromey.com>
8773
8774         * python/py-value.c (valpy_dereference, valpy_referenced_value)
8775         (valpy_reference_value, valpy_const_value, valpy_get_address)
8776         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
8777         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
8778         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
8779         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
8780         scoped_value_mark.
8781         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
8782         * value.h (scoped_value_mark): New class.
8783
8784 2017-01-10  Tom Tromey  <tom@tromey.com>
8785
8786         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
8787         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
8788         * psymtab.c (discard_psymtabs_upto): Remove.
8789         (make_cleanup_discard_psymtabs): Remove.
8790         (struct psymtab_state): Remove.
8791
8792 2017-01-10  Tom Tromey  <tom@tromey.com>
8793
8794         * record-full.c (record_full_save_cleanups): Remove.
8795         (record_full_save): Use gdb::unlinker.
8796         * gcore.c (do_bfd_delete_cleanup): Remove.
8797         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
8798         cleanups.
8799         * dwarf2read.c (unlink_if_set): Remove.
8800         (write_psymtabs_to_index): Use gdb::unlinker.
8801         * common/gdb_unlinker.h: New file.
8802
8803 2017-01-10  Tom Tromey  <tom@tromey.com>
8804
8805         * windows-tdep.c (windows_xfer_shared_library): Update.
8806         * windows-nat.c (windows_make_so): Update.
8807         * utils.h (make_cleanup_bfd_unref): Remove.
8808         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
8809         * symfile.h (symfile_bfd_open)
8810         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
8811         * symfile.c (read_symbols, symbol_file_add)
8812         (separate_debug_file_exists): Update.
8813         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
8814         (generic_load, reread_symbols): Update.
8815         * symfile-mem.c (symbol_file_add_from_memory): Update.
8816         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
8817         (spu_symbol_file_add_from_memory): Update.
8818         * solist.h (struct target_so_ops) <bfd_open>: Return
8819         gdb_bfd_ref_ptr.
8820         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
8821         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
8822         gdb_bfd_ref_ptr.
8823         (solib_map_sections, reload_shared_libraries_1): Update.
8824         * solib-svr4.c (enable_break): Update.
8825         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
8826         * solib-frv.c (enable_break2): Update.
8827         * solib-dsbt.c (enable_break): Update.
8828         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
8829         gdb_bfd_ref_ptr.
8830         (darwin_solib_get_all_image_info_addr_at_init): Update.
8831         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
8832         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
8833         * record-full.c (record_full_save): Update.
8834         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
8835         * procfs.c (insert_dbx_link_bpt_in_file): Update.
8836         * minidebug.c (find_separate_debug_file_in_section): Return
8837         gdb_bfd_ref_ptr.
8838         * machoread.c (macho_add_oso_symfile): Change abfd to
8839         gdb_bfd_ref_ptr.
8840         (macho_symfile_read_all_oso): Update.
8841         (macho_check_dsym): Return gdb_bfd_ref_ptr.
8842         (macho_symfile_read): Update.
8843         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
8844         (jit_bfd_try_read_symtab): Update.
8845         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8846         (gdb_bfd_openw, gdb_bfd_openr_iovec)
8847         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8848         gdb_bfd_ref_ptr.
8849         (gdb_bfd_ref_policy): New struct.
8850         (gdb_bfd_ref_ptr): New typedef.
8851         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8852         (gdb_bfd_openw, gdb_bfd_openr_iovec)
8853         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
8854         gdb_bfd_ref_ptr.
8855         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8856         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
8857         (gcore_command): Update.
8858         * exec.c (exec_file_attach): Update.
8859         * elfread.c (elf_symfile_read): Update.
8860         * dwarf2read.c (dwarf2_get_dwz_file): Update.
8861         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
8862         (open_and_init_dwo_file): Update.
8863         (open_dwp_file): Return gdb_bfd_ref_ptr.
8864         (open_and_init_dwp_file): Update.
8865         * corelow.c (core_open): Update.
8866         * compile/compile-object-load.c (compile_object_load): Update.
8867         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
8868         * coffread.c (coff_symfile_read): Update.
8869         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
8870         gdb_bfd_ref_ptr.  Rename.
8871         (dump_bfd_file, restore_command): Update.
8872         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8873         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
8874         (find_separate_debug_file_by_buildid): Update.
8875
8876 2017-01-10  Tom Tromey  <tom@tromey.com>
8877
8878         * common/gdb_ref_ptr.h: New file.
8879         * python/py-ref.h (struct gdbpy_ref_policy): New.
8880         (gdbpy_ref): Now a typedef.
8881
8882 2017-01-10  Tom Tromey  <tom@tromey.com>
8883
8884         * utils.h (make_cleanup_htab_delete): Don't declare.
8885         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
8886         Remove.
8887         * linespec.c (decode_compound_collector): Add constructor,
8888         destructor.
8889         (lookup_prefix_sym): Remove cleanup.
8890         (symtab_collector): Add constructor, destructor.
8891         (collect_symtabs_from_filename): Remove cleanup.
8892         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
8893         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
8894         Use htab_up.
8895         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
8896         * dwarf2read.c (dw2_expand_symtabs_matching)
8897         (dw2_map_symbol_filenames, dwarf_decode_macros)
8898         (write_psymtabs_to_index): Use htab_up.
8899         * dwarf2loc.c (func_verify_no_selftailcall)
8900         (call_site_find_chain_1, func_verify_no_selftailcall)
8901         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
8902         std::vector, gdb::unique_xmalloc_ptr.
8903         (call_sitep): Remove typedef.
8904         (dwarf2_locexpr_baton_eval): Remove unused variable.
8905
8906 2017-01-10  Tom Tromey  <tom@tromey.com>
8907
8908         * python/python-internal.h (make_cleanup_py_decref)
8909         (make_cleanup_py_xdecref): Don't declare.
8910         * python/py-utils.c (py_decref, make_cleanup_py_decref)
8911         (py_xdecref, make_cleanup_py_xdecref): Remove.
8912
8913 2017-01-10  Tom Tromey  <tom@tromey.com>
8914
8915         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
8916         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
8917
8918 2017-01-10  Tom Tromey  <tom@tromey.com>
8919
8920         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
8921
8922 2017-01-10  Tom Tromey  <tom@tromey.com>
8923
8924         * python/py-utils.c (unicode_to_encoded_string)
8925         (python_string_to_target_string)
8926         (python_string_to_target_python_string)
8927         (python_string_to_host_string, gdbpy_obj_to_string)
8928         (get_addr_from_python): Use gdbpy_ref.
8929
8930 2017-01-10  Tom Tromey  <tom@tromey.com>
8931
8932         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
8933         gdbpy_ref.
8934
8935 2017-01-10  Tom Tromey  <tom@tromey.com>
8936
8937         * python/python.c (eval_python_command, gdbpy_decode_line)
8938         (gdbpy_run_events, gdbpy_start_type_printers)
8939         (gdbpy_apply_type_printers): Use gdbpy_ref.
8940
8941 2017-01-10  Tom Tromey  <tom@tromey.com>
8942
8943         * python/py-param.c (get_doc_string, compute_enum_values): Use
8944         gdbpy_ref.
8945
8946 2017-01-10  Tom Tromey  <tom@tromey.com>
8947
8948         * python/py-inferior.c (find_thread_object, build_inferior_list):
8949         Use gdbpy_ref.
8950
8951 2017-01-10  Tom Tromey  <tom@tromey.com>
8952
8953         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8954
8955 2017-01-10  Tom Tromey  <tom@tromey.com>
8956
8957         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
8958         gdbpy_ref.
8959
8960 2017-01-10  Tom Tromey  <tom@tromey.com>
8961
8962         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
8963         extra incref.
8964         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
8965         Use gdbpy_ref.
8966
8967 2017-01-10  Tom Tromey  <tom@tromey.com>
8968
8969         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
8970         gdbpy_ref.
8971
8972 2017-01-10  Tom Tromey  <tom@tromey.com>
8973
8974         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
8975         decref results of PyArg_ParseTupleAndKeywords.
8976
8977 2017-01-10  Tom Tromey  <tom@tromey.com>
8978
8979         * python/python.c (python_run_simple_file): Use
8980         unique_xmalloc_ptr, gdbpy_ref.
8981
8982 2017-01-10  Tom Tromey  <tom@tromey.com>
8983
8984         * python/py-prettyprint.c (print_stack_unless_memory_error)
8985         (print_string_repr, print_children): Use gdbpy_ref.
8986         (dummy_python_frame): New class.
8987         (dummy_python_frame::dummy_python_frame): Rename from
8988         push_dummy_python_frame.
8989         (py_restore_tstate): Remove.
8990
8991 2017-01-10  Tom Tromey  <tom@tromey.com>
8992
8993         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8994
8995 2017-01-10  Tom Tromey  <tom@tromey.com>
8996
8997         * python/python.c (ensure_python_env, restore_python_env):
8998         Remove.
8999         * python/python-internal.h (ensure_python_env): Don't declare.
9000         * varobj.h (varobj_ensure_python_env): Don't declare.
9001         * varobj.c (varobj_ensure_python_env): Remove.
9002
9003 2017-01-10  Tom Tromey  <tom@tromey.com>
9004
9005         * varobj.c (varobj_value_get_print_value): Use
9006         gdbpy_enter_varobj.
9007
9008 2017-01-10  Tom Tromey  <tom@tromey.com>
9009
9010         * python/py-prettyprint.c (print_string_repr, print_children):
9011         Update.
9012         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
9013         of "encoding".
9014         * varobj.c (varobj_value_get_print_value): Update.
9015         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
9016
9017 2017-01-10  Tom Tromey  <tom@tromey.com>
9018
9019         * varobj.c (varobj_get_display_hint)
9020         (dynamic_varobj_has_child_method, install_new_value_visualizer)
9021         (varobj_set_visualizer, free_variable): Use
9022         gdbpy_enter_varobj.
9023
9024 2017-01-10  Tom Tromey  <tom@tromey.com>
9025
9026         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
9027         (do_finish_initialization): New function.  Use gdbpy_ref.
9028         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
9029         do_finish_initialization.
9030
9031 2017-01-10  Tom Tromey  <tom@tromey.com>
9032
9033         * python/py-param.c (get_set_value, get_show_value): Use
9034         gdbpy_enter, gdbpy_ref.
9035
9036 2017-01-10  Tom Tromey  <tom@tromey.com>
9037
9038         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
9039
9040 2017-01-10  Tom Tromey  <tom@tromey.com>
9041
9042         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
9043
9044 2017-01-10  Tom Tromey  <tom@tromey.com>
9045
9046         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
9047         Use gdbpy_enter_varobj.
9048
9049 2017-01-10  Tom Tromey  <tom@tromey.com>
9050
9051         * varobj.c (gdbpy_enter_varobj): New constructor.
9052         * python/python-internal.h (gdbpy_enter_varobj): New class.
9053         * python/py-varobj.c (py_varobj_get_iterator): Use
9054         gdbpy_enter_varobj.
9055
9056 2017-01-10  Tom Tromey  <tom@tromey.com>
9057
9058         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
9059         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9060         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
9061         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
9062         unique_xmalloc_ptr.
9063         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
9064
9065 2017-01-10  Tom Tromey  <tom@tromey.com>
9066
9067         * python/py-xmethods.c (invoke_match_method): Use
9068         gdbpy_ref.
9069
9070 2017-01-10  Tom Tromey  <tom@tromey.com>
9071
9072         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
9073         gdbpy_enter, gdbpy_ref.
9074
9075 2017-01-10  Tom Tromey  <tom@tromey.com>
9076
9077         * python/python.c (python_interactive_command): Use gdbpy_enter.
9078
9079 2017-01-10  Tom Tromey  <tom@tromey.com>
9080
9081         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
9082         gdbpy_ref.
9083
9084 2017-01-10  Tom Tromey  <tom@tromey.com>
9085
9086         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
9087         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
9088
9089 2017-01-10  Tom Tromey  <tom@tromey.com>
9090
9091         * utils.h (htab_deleter): New struct.
9092         (htab_up): New typedef.
9093         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
9094         gdbpy_enter, gdbpy_ref, htab_up.
9095
9096 2017-01-10  Tom Tromey  <tom@tromey.com>
9097
9098         * python/py-unwind.c (pending_frame_invalidate): Remove.
9099         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
9100
9101 2017-01-10  Tom Tromey  <tom@tromey.com>
9102
9103         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
9104         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
9105
9106 2017-01-10  Tom Tromey  <tom@tromey.com>
9107
9108         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
9109
9110 2017-01-10  Tom Tromey  <tom@tromey.com>
9111
9112         * python/python.c (gdbpy_eval_from_control_command)
9113         (gdbpy_source_script, gdbpy_run_events)
9114         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
9115         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
9116         gdbpy_enter.
9117
9118 2017-01-10  Tom Tromey  <tom@tromey.com>
9119
9120         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
9121
9122 2017-01-10  Tom Tromey  <tom@tromey.com>
9123
9124         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
9125
9126 2017-01-10  Tom Tromey  <tom@tromey.com>
9127
9128         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
9129         (python_on_inferior_call_pre, python_on_inferior_call_post)
9130         (python_on_memory_change, python_on_register_change)
9131         (python_inferior_exit, python_new_objfile, add_thread_object)
9132         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
9133
9134 2017-01-10  Tom Tromey  <tom@tromey.com>
9135
9136         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
9137         (bpfinishpy_handle_exit): Use gdbpy_enter.
9138
9139 2017-01-10  Tom Tromey  <tom@tromey.com>
9140
9141         * python/py-cmd.c (cmdpy_destroyer)
9142         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
9143         gdbpy_enter.
9144
9145 2017-01-10  Tom Tromey  <tom@tromey.com>
9146
9147         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9148         gdbpy_enter.
9149         (gdbpy_breakpoint_has_cond): Likewise.
9150
9151 2017-01-10  Tom Tromey  <tom@tromey.com>
9152
9153         * python/python.c (gdbpy_enter): New constructor.
9154         (~gdbpy_enter): New destructor.
9155         (restore_python_env, ensure_python_env): Rewrite.
9156         * python/python-internal.h (gdbpy_enter): New class.
9157
9158 2017-01-10  Tom Tromey  <tom@tromey.com>
9159
9160         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
9161
9162 2017-01-10  Tom Tromey  <tom@tromey.com>
9163
9164         * python/py-value.c (value_has_field, get_field_flag)
9165         (get_field_type, valpy_getitem, convert_value_from_python): Use
9166         gdbpy_ref.
9167
9168 2017-01-10  Tom Tromey  <tom@tromey.com>
9169
9170         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
9171         gdbpy_ref.
9172
9173 2017-01-10  Tom Tromey  <tom@tromey.com>
9174
9175         * python/py-prettyprint.c (search_pp_list)
9176         (find_pretty_printer_from_objfiles)
9177         (find_pretty_printer_from_progspace)
9178         (find_pretty_printer_from_gdb, find_pretty_printer)
9179         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
9180         gdbpy_ref.
9181
9182 2017-01-10  Tom Tromey  <tom@tromey.com>
9183
9184         * python/py-param.c (call_doc_function): Use gdbpy_ref.
9185
9186 2017-01-10  Tom Tromey  <tom@tromey.com>
9187
9188         * python/py-linetable.c (build_line_table_tuple_from_pcs)
9189         (ltpy_get_all_source_lines): Use gdbpy_ref.
9190
9191 2017-01-10  Tom Tromey  <tom@tromey.com>
9192
9193         * python/py-framefilter.c (extract_sym, extract_value)
9194         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
9195         gdbpy_ref.
9196
9197 2017-01-10  Tom Tromey  <tom@tromey.com>
9198
9199         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
9200
9201 2017-01-10  Tom Tromey  <tom@tromey.com>
9202
9203         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
9204
9205 2017-01-10  Tom Tromey  <tom@tromey.com>
9206
9207         * python/py-function.c (convert_values_to_python, fnpy_init): Use
9208         gdbpy_ref.
9209
9210 2017-01-10  Tom Tromey  <tom@tromey.com>
9211
9212         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
9213
9214 2017-01-10  Tom Tromey  <tom@tromey.com>
9215
9216         * python/py-type.c (convert_field, make_fielditem, typy_fields)
9217         (typy_range): Use gdbpy_ref.
9218
9219 2017-01-10  Tom Tromey  <tom@tromey.com>
9220
9221         * python/py-threadevent.c (create_thread_event_object): Use
9222         gdbpy_ref.
9223         * python/py-stopevent.c (create_stop_event_object): Simplify.
9224         (emit_stop_event): Use gdbpy_ref.
9225         * python/py-signalevent.c (create_signal_event_object): Use
9226         gdbpy_ref.
9227         * python/py-newobjfileevent.c (create_new_objfile_event_object)
9228         (emit_new_objfile_event, create_clear_objfiles_event_object)
9229         (emit_clear_objfiles_event): Use gdbpy_ref.
9230         * python/py-infevents.c (create_inferior_call_event_object)
9231         (create_register_changed_event_object)
9232         (create_memory_changed_event_object, emit_inferior_call_event)
9233         (emit_memory_changed_event, emit_register_changed_event): Use
9234         gdbpy_ref.
9235         * python/py-exitedevent.c (create_exited_event_object)
9236         (emit_exited_event): Use gdbpy_ref.
9237         * python/py-event.h (evpy_emit_event): Remove
9238         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
9239         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
9240         * python/py-continueevent.c (emit_continue_event): Use
9241         gdbpy_ref.
9242         * python/py-breakpoint.c (gdbpy_breakpoint_created)
9243         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
9244         gdbpy_ref.
9245         * python/py-bpevent.c (create_breakpoint_event_object): Use
9246         gdbpy_ref.
9247
9248 2017-01-10  Tom Tromey  <tom@tromey.com>
9249
9250         * python/py-ref.h: New file.
9251
9252 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
9253
9254         * cli-out.c (cli_ui_out::do_redirect): Change return type to
9255         void.
9256         * cli-out.h (cli_ui_out::do_redirect): Likewise.
9257         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
9258         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
9259         * ui-out.c (ui_out::redirect): Likewise.
9260         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
9261         * cli/cli-logging.c (set_logging_redirect): Update call site of
9262         ui_out::redirect.
9263         (handle_redirections): Likewise.
9264         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
9265         * top.c (execute_command_to_string): Likewise.
9266         * utils.c (do_ui_out_redirect_pop): Likewise.
9267
9268 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
9269
9270         * stack.c (_initialize_stack): Update "frame" command help message.
9271
9272 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
9273
9274         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
9275
9276 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9277
9278         * x86-linux-nat.h: Include gdb_proc_service.h.
9279
9280 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9281
9282         * ser-base.h: Include serial.h.
9283
9284 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9285
9286         * ppc-linux-tdep.h: Include ppc-tdep.h.
9287
9288 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9289
9290         * nat/amd64-linux-siginfo.h: Include signal.h.
9291
9292 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9293
9294         * nat/aarch64-linux-hw-point.h: Include break-common.h.
9295
9296 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9297
9298         * mi/mi-parse.h: Include mi-cmds.h.
9299
9300 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9301
9302         * inf-loop.c: Don't include "target.h".
9303         * inf-loop.h: Include it here.
9304
9305 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9306
9307         * dfp.h: Include "dboulest.h" and "expression.h".
9308
9309 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9310
9311         * ax-gdb.h: Include "ax.h".
9312
9313 2017-01-06  Yao Qi  <yao.qi@linaro.org>
9314
9315         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
9316         with nat/gdb_ptrace.h.
9317
9318 2017-01-05  Yao Qi  <yao.qi@linaro.org>
9319
9320         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
9321         new line.
9322         (mips64_fbsd_sigframe_init): Likewise.
9323
9324 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9325
9326         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
9327         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
9328
9329 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9330
9331         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
9332         * NEWS: Mention new FreeBSD/mips native configuration.
9333         * config/mips/fbsd.mh: New file.
9334         * configure.host: Add mips*-*-freebsd*.
9335         * mips-fbsd-nat.c: New file.
9336
9337 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
9338
9339         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
9340         (ALLDEPFILES): Add mips-fbsd-tdep.c.
9341         * NEWS: Mention new FreeBSD/mips target.
9342         * configure.tgt: Add mips*-*-freebsd*.
9343         * mips-fbsd-tdep.c: New file.
9344         * mips-fbsd-tdep.h: New file.
9345
9346 2017-01-04  Yao Qi  <yao.qi@linaro.org>
9347
9348         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
9349         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
9350
9351 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
9352
9353         Update copyright year range in all GDB files.
9354
9355 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
9356
9357         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
9358
9359 For older changes see ChangeLog-2016.
9360 \f
9361 Local Variables:
9362 mode: change-log
9363 left-margin: 8
9364 fill-column: 74
9365 version-control: never
9366 coding: utf-8
9367 End: