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