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