Make tdesc_feature::name an std::string
[external/binutils.git] / gdb / ChangeLog
1 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * target-descriptions.c (tdesc_feature) <name>: Change type to
4         std::string.
5         <~tdesc_feature>: Don't manually free name.
6         <operator==>: Adjust.
7         (tdesc_find_feature): Adjust.
8         (tdesc_feature_name): Adjust.
9         (class print_c_tdesc) <visit_pre>: Adjust.
10         (class print_c_feature) <visit_pre>: Adjust.
11
12 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
13
14         * target-descriptions.c (tdesc_feature_p): Remove typedef.
15         (DEF_VEC_P (tdesc_feature_p)): Remove.
16         (struct target_desc) <features>: Change type to std::vector.
17         <~target_desc>: Replace with default implementation.
18         <accept>: Adjust.
19         <operator==>: Adjust.
20         (tdesc_has_registers): Adjust.
21         (tdesc_find_feature): Adjust.
22         (tdesc_use_registers): Adjust.
23         (tdesc_create_feature): Adjust.
24
25 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
26
27         * target-descriptions.c (arch_p): Remove typedef.
28         (DEF_VEC_P (arch_p)): Remove.
29         (struct target_desc) <compatible>: Change type to std::vector.
30         <~target_desc>: Don't manually free compatible.
31         (tdesc_compatible_p): Adjust.
32         (tdesc_add_compatible): Adjust.
33         (class print_c_tdesc) <visit_pre>: Adjust.
34
35 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
36
37         * target-descriptions.c (property_s): Remove typedef.
38         (DEF_VEC_O (property_s)): Remove.
39         (struct target_desc) <properties>: Make an std::vector.
40         <~target_desc>: Don't manually free properties.
41         (tdesc_property): Adjust.
42         (set_tdesc_property): Adjust.
43         (class print_c_tdesc) <visit_pre>: Adjust.
44
45 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
46
47         * common/gdb_assert.h (gdb_static_assert): Redefine using
48         static_assert.
49
50 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
51
52         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
53         unused variables.
54         (ada_is_redundant_range_encoding): Likewise.
55         * ada-varobj.c (ada_varobj_get_value_of_array_variable):
56         Likewise.
57         * alpha-tdep.c (alpha_software_single_step): Likewise.
58         * arm-tdep.c (_initialize_arm_tdep): Likewise.
59         * auto-load.c (info_auto_load_cmd): Likewise.
60         * break-catch-syscall.c (insert_catch_syscall): Likewise.
61         (remove_catch_syscall): Likewise.
62         * breakpoint.c (condition_completer): Likewise.
63         (clear_command): Likewise.
64         (update_breakpoint_locations): Likewise.
65         * btrace.c (btrace_disable): Likewise.
66         (btrace_teardown): Likewise.
67         (btrace_maint_update_pt_packets): Likewise.
68         (maint_btrace_clear_cmd): Likewise.
69         * cli/cli-decode.c (lookup_cmd_1): Likewise.
70         (lookup_cmd_composition): Likewise.
71         * cli/cli-dump.c (scan_filename): Likewise.
72         (restore_command): Likewise.
73         * compile/compile-loc2c.c (compute_stack_depth): Likewise.
74         * compile/compile-object-load.c (compile_object_load): Likewise.
75         * compile/compile-object-run.c (compile_object_run): Likewise.
76         * compile/compile.c (compile_to_object): Likewise.
77         * completer.c (filename_completer): Likewise.
78         (complete_files_symbols): Likewise.
79         (complete_expression): Likewise.
80         * corelow.c (core_open): Likewise.
81         * ctf.c (ctf_start): Likewise.
82         (ctf_write_status): Likewise.
83         (ctf_write_uploaded_tsv): Likewise.
84         (ctf_write_definition_end): Likewise.
85         (ctf_open_dir): Likewise.
86         (ctf_xfer_partial): Likewise.
87         (ctf_trace_find): Likewise.
88         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
89         Likewise.
90         * dwarf2loc.c (allocate_piece_closure): Likewise.
91         (indirect_pieced_value): Likewise.
92         (dwarf2_evaluate_loc_desc_full): Likewise.
93         * dwarf2read.c (dw2_expand_marked_cus): Likewise.
94         (dw2_expand_symtabs_matching): Likewise.
95         (dw2_map_symbol_filenames): Likewise.
96         (read_and_check_comp_unit_head): Likewise.
97         (read_cutu_die_from_dwo): Likewise.
98         (lookup_dwo_unit): Likewise.
99         (read_comp_units_from_section): Likewise.
100         (dwarf2_compute_name): Likewise.
101         (handle_DW_AT_stmt_list): Likewise.
102         (create_cus_hash_table): Likewise.
103         (create_dwp_v2_section): Likewise.
104         (dwarf2_rnglists_process): Likewise.
105         (dwarf2_ranges_process): Likewise.
106         (dwarf2_record_block_ranges): Likewise.
107         (is_vtable_name): Likewise.
108         (read_formatted_entries): Likewise.
109         (skip_form_bytes): Likewise.
110         * elfread.c (elf_symtab_read): Likewise.
111         * exec.c (exec_file_command): Likewise.
112         * f-valprint.c (f_val_print): Likewise.
113         (info_common_command_for_block): Likewise.
114         * guile/guile.c (initialize_scheme_side): Likewise.
115         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
116         * guile/scm-cmd.c (cmdscm_completer): Likewise.
117         (gdbscm_register_command_x): Likewise.
118         * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
119         * guile/scm-param.c (gdbscm_parameter_value): Likewise.
120         * guile/scm-ports.c (file_port_magic): Likewise.
121         * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
122         (ppscm_pretty_print_one_value): Likewise.
123         (ppscm_print_children): Likewise.
124         * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
125         * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
126         * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
127         * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
128         * i386-tdep.c (i386_register_reggroup_p): Likewise.
129         * infcmd.c (run_command_1): Likewise.
130         (until_next_fsm_clean_up): Likewise.
131         * linespec.c (linespec_complete): Likewise.
132         (find_label_symbols): Likewise.
133         * m2-valprint.c (m2_val_print): Likewise.
134         * memattr.c (require_user_regions): Likewise.
135         (lookup_mem_region): Likewise.
136         (disable_mem_command): Likewise.
137         (mem_delete): Likewise.
138         * mep-tdep.c (mep_register_name): Likewise.
139         (mep_analyze_prologue): Likewise.
140         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
141         * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
142         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
143         * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
144         * minidebug.c (lzma_open): Likewise.
145         * minsyms.c (lookup_minimal_symbol): Likewise.
146         * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
147         * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
148         (mips_o64_return_value): Likewise.
149         (mips_single_step_through_delay): Likewise.
150         (_initialize_mips_tdep): Likewise.
151         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
152         (nios2_software_single_step): Likewise.
153         * parse.c (find_minsym_type_and_address): Likewise.
154         * psymtab.c (psym_relocate): Likewise.
155         * python/py-breakpoint.c (bppy_get_commands): Likewise.
156         (gdbpy_breakpoint_modified): Likewise.
157         * python/py-infevents.c (create_inferior_call_event_object):
158         Likewise.
159         * python/py-record-btrace.c (btpy_list_item): Likewise.
160         * python/py-type.c (typy_str): Likewise.
161         * python/py-value.c (valpy_call): Likewise.
162         * python/python.c (do_start_initialization): Likewise.
163         * record-btrace.c (record_btrace_insn_history_range): Likewise.
164         (record_btrace_call_history_range): Likewise.
165         (record_btrace_record_method): Likewise.
166         (record_btrace_xfer_partial): Likewise.
167         (btrace_get_frame_function): Likewise.
168         * record-full.c (record_full_open): Likewise.
169         * record.c (get_context_size): Likewise.
170         * registry.h (DEFINE_REGISTRY): Likewise.
171         * remote-fileio.c (remote_fileio_request): Likewise.
172         * remote.c (remote_update_thread_list): Likewise.
173         (remote_check_symbols): Likewise.
174         (remote_commit_resume): Likewise.
175         (remote_interrupt): Likewise.
176         (remote_insert_breakpoint): Likewise.
177         (compare_sections_command): Likewise.
178         * rust-exp.y (super_name): Likewise.
179         (lex_string): Likewise.
180         (convert_ast_to_type): Likewise.
181         (convert_ast_to_expression): Likewise.
182         * rust-lang.c (rust_print_struct_def): Likewise.
183         (rust_print_type): Likewise.
184         (rust_evaluate_subexp): Likewise.
185         * rx-tdep.c (rx_register_type): Likewise.
186         * ser-event.c (serial_event_clear): Likewise.
187         * serial.c (serial_open): Likewise.
188         * spu-tdep.c (spu_overlay_new_objfile): Likewise.
189         * symfile.c (section_is_overlay): Likewise.
190         (overlay_unmapped_address): Likewise.
191         (overlay_mapped_address): Likewise.
192         (simple_overlay_update_1): Likewise.
193         (simple_overlay_update): Likewise.
194         * symtab.c (symbol_find_demangled_name): Likewise.
195         (search_symbols): Likewise.
196         * target-descriptions.c (tdesc_predefined_type): Likewise.
197         * target.c (target_commit_resume): Likewise.
198         * thread.c (print_selected_thread_frame): Likewise.
199         * top.c (new_ui_command): Likewise.
200         (gdb_readline_no_editing): Likewise.
201         * tracefile-tfile.c (tfile_open): Likewise.
202         * tracepoint.c (create_tsv_from_upload): Likewise.
203         * utils.c (quit): Likewise.
204         (defaulted_query): Likewise.
205         * valarith.c (value_concat): Likewise.
206         * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
207         * xml-tdesc.c (target_fetch_description_xml): Likewise.
208         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
209         (xtensa_pseudo_register_write): Likewise.
210
211 2017-12-04  Tom Tromey  <tom@tromey.com>
212
213         * NEWS: Mention Rust trait object inspection.
214
215 2017-12-04  Pedro Alves  <palves@redhat.com>
216
217         PR gdb/22499
218         * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
219         (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
220         (vex2_prefix_p, vex3_prefix_p): New functions.
221         (amd64_get_insn_details): Adjust to rename.  Also skip VEX2 and
222         VEX3 prefixes.
223         (fixup_riprel): Set VEX3.!B.
224
225 2017-12-03  Simon Marchi  <simon.marchi@ericsson.com>
226
227         * target.h (mem_region_vector): Remove.
228         (struct target_ops) <to_memory_map>: Change return type to
229         std::vector<mem_region>.
230         * target-debug.h (target_debug_print_mem_region_vector): Rename
231         to ...
232         (target_debug_print_std_vector_mem_region): ... this.
233         * target-delegates.c: Re-generate.
234
235 2017-12-03  Pedro Alves  <palves@redhat.com>
236
237         * make-target-delegates (munge_type): Also munge '<', '>', and
238         ':'.  Avoid double underscores in identifiers, and trailing
239         underscores.
240         * target-debug.h
241         (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
242         ...
243         (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
244         * target-delegates.c: Regenerate.
245
246 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
247
248         * common/poison.h (XDELETE): Fix typo.
249
250 2017-12-01  Andrew Cagney  <cagney@redhat.com>
251             Joel Brobecker  <brobecker@adacore.com>
252             Sergio Durigan Junior  <sergiodj@redhat.com>
253
254         * NEWS (Changes since GDB 8.0: Mention new '--readnever'
255         feature.
256         * coffread.c (coff_symfile_read): Do not map over sections with
257         'coff_locate_sections' if readnever is on.
258         * dwarf2read.c (dwarf2_has_info): Return 0 if
259         readnever is on.
260         * elfread.c (elf_symfile_read): Do not map over sections with
261         'elf_locate_sections' if readnever is on.
262         * main.c (validate_readnow_readnever): New function.
263         (captured_main_1): Add support for --readnever.
264         (print_gdb_help): Document --readnever.
265         * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
266         flag.
267         * symfile.c (readnever_symbol_files): New global.
268         (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
269         'READNEVER_SYMBOL_FILES' is set.
270         (validate_readnow_readnever): New function.
271         (symbol_file_command): Handle '-readnever' option.
272         Call 'validate_readnow_readnever'.
273         (add_symbol_file_command): Handle '-readnever' option.
274         Call 'validate_readnow_readnever'.
275         (_initialize_symfile): Document new '-readnever' option for
276         both 'symbol-file' and 'add-symbol-file' commands.
277         * top.h (readnever_symbol_files): New extern global.
278         * xcoffread.c (xcoff_initial_scan): Do not read debug
279         information if readnever is on.
280
281 2017-12-01  Sergio Durigan Junior  <sergiodj@redhat.com>
282
283         * symfile.c (symbol_file_command): Call
284         'symbol_file_add_main_1' only after processing all command
285         line options.
286         (add_symbol_file_command): Modify logic to make arguments
287         position-independent.
288
289 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
290
291         * ada-lang.c (symbol_list_obstack): Delete.
292         (resolve_subexp): Make sure "candidates" gets xfree'ed.
293         (ada_lookup_symbol_list_worker): Remove the limitation that
294         the result is only good until the next call, now making it
295         the responsibility of the caller to free the result when no
296         longer needed.  Adjust the function's intro comment accordingly.
297         (ada_lookup_symbol_list): Adjust the function's intro comment.
298         (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
299         (ada_lookup_encoded_symbol, get_var_value): Likewise.
300         (_initialize_ada_language): Remove symbol_list_obstack
301         initialization.
302         * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
303         (write_var_or_type, write_name_assoc): Likewise.
304
305 2017-12-01  Tom Tromey  <tom@tromey.com>
306
307         * Makefile.in (all_deps_files): New variable.
308         Include .Po files using all_deps_files.
309
310 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
311
312         * MAINTAINERS: Update list of maintainers, moving those who
313         stepped down or became inactive to the "Past Maintainers"
314         section.
315
316 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
317
318         * configure.ac Don't check for sys/fault.h, sys/syscall.h,
319         sys/proc.h.
320         (NEW_PROC_API): Remove.
321         (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
322         Likewise.
323         * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
324         * configure: Regenerate.
325         * config.in: Regenerate.
326         * gdbserver/configure: Regenerate.
327         * gdbserver/config.in: Regenerate.
328
329         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
330         NEW_PROC_API test.
331         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
332
333         * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
334
335         * proc-api.c: Remove !NEW_PROC_API support.
336         Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
337         Remove tests for macros always defined on Solaris.
338         * proc-events.c: Remove !NEW_PROC_API support.
339         Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
340         HAVE_SYS_USER_H tests.
341         (init_syscall_table): Remove non-Solaris syscalls.
342         Remove tests for syscalls present on all Solaris versions.
343         Add missing Solaris 10+ syscalls.
344         (signal_table): Remove non-Solaris signals.
345         Remove tests for signals present on all Solaris versions.
346         (fault_table): Remove non-Solaris faults.
347         Remove tests for faults present on all Solaris versions.
348         * proc-flags.c: Remove !NEW_PROC_API support.
349         (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
350         Remove non-Solaris flags.
351         * proc-why.c: Remove !NEW_PROC_API support.
352         (pr_why_table): Remove meaningless comments.
353         Remove tests for reasons present on all Solaris versions.
354         Remove OSF/1 cases.
355         (proc_prettyfprint_why): Likewise.
356
357         * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
358         Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
359         Remove WA_READ test, IRIX watchpoint support.
360         (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
361         types.  Change users.
362         (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
363         (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
364         Change callers.
365         Remove CTL_PROC_NAME_FMT tests.
366         (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types.  Change
367         users.
368         (sysset_t_size): Remove.  Use sizeof (sysset_t) in callers.
369         Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
370         (proc_modify_flag): Replace GDBRESET by PCUNSET.
371         Remove PR_ASYNC, PR_KLC tests.
372         (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
373         (proc_parent_pid): Remove PCWATCH etc. tests.
374         (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
375         Remove PCAGENT test.
376         (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
377         Remove SYS_lwpcreate || SYS_lwp_create test.
378         (proc_get_current_thread): Likewise.
379         [PIOCNTHR && PIOCTLIST]: Remove.
380         [PIOCLSTATUS]: Remove.
381         (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
382         [PRFS_STOPEXEC]: Remove.
383         (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
384         (syscall_is_exit): Likewise.
385         (syscall_is_exec): Likewise.
386         (syscall_is_lwp_create): Likewise.
387         Remove SYS_syssgi support.
388         (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
389         [SYS_syssgi]: Remove.
390         Remove non-Solaris cases, conditionals.
391         (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
392         Remove.
393         (procfs_init_inferior) [SYS_syssgi]: Remove.
394         (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
395         (procfs_inferior_created) [SYS_syssgi]: Remove.
396         (procfs_set_watchpoint): Remove !AIX5 test.
397         (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
398         case.
399         (mappingflags) [MA_PHYS]: Remove.
400         (info_mappings_callback): Remove PCAGENT test.
401         Remove PIOCOPENLWP || PCAGENT test.
402
403 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
404
405         * sol-thread.c (info_solthreads): Constify args.
406         Cast args to void *.
407
408 2017-11-29  John Baldwin  <jhb@FreeBSD.org>
409
410         * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
411
412 2017-11-29  Joel Brobecker  <brobecker@adacore.com>
413
414         * ada-lang.c (to_fixed_range_type): Make sure that the size
415         of the range type being returned is the same as the size
416         of the range type being fixed.
417
418 2017-11-29  Pedro Alves  <palves@redhat.com>
419
420         PR c++/19436
421         * NEWS: Mention setting breakpoints on functions with C++ ABI
422         tags.
423         * completer.h (completion_match_for_lcd) <match,
424         mark_ignored_range>: New methods.
425         <finish>: Consider ignored ranges.
426         <clear>: Clear ignored ranges.
427         <m_ignored_ranges, m_finished_storage>: New fields.
428         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
429         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
430         completion_match_for_lcd pointer to strncmp_iw_with_mode.
431         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
432         * language.c (default_symbol_name_matcher): Pass the
433         completion_match_for_lcd pointer to strncmp_iw_with_mode.
434         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
435         * utils.c (skip_abi_tag): New function.
436         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
437         Handle ABI tags.
438         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
439         parameter.
440
441 2017-11-29  Pedro Alves  <palves@redhat.com>
442
443         PR c++/19436
444         * NEWS: Mention setting breakpoints on functions with C++ ABI
445         tags.
446         * completer.h (completion_match_for_lcd) <match,
447         mark_ignored_range>: New methods.
448         <finish>: Consider ignored ranges.
449         <clear>: Clear ignored ranges.
450         <m_ignored_ranges, m_finished_storage>: New fields.
451         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
452         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
453         completion_match_for_lcd pointer to strncmp_iw_with_mode.
454         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
455         * language.c (default_symbol_name_matcher): Pass the
456         completion_match_for_lcd pointer to strncmp_iw_with_mode.
457         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
458         * utils.c (skip_abi_tag): New function.
459         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
460         Handle ABI tags.
461         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
462         parameter.
463
464 2017-11-29  Pedro Alves  <palves@redhat.com>
465
466         * NEWS: Mention that breakpoints on C++ functions are now set on
467         on all namespaces/classes by default, and mention "break
468         -qualified".
469         * ax-gdb.c (agent_command_1): Adjust to pass a
470         symbol_name_match_type to new_linespec_location.
471         * breakpoint.c (parse_breakpoint_sals): Adjust to
472         get_linespec_location's return type change.
473         (strace_marker_create_sals_from_location): Adjust to pass a
474         symbol_name_match_type to new_linespec_location.
475         (strace_marker_decode_location): Adjust to get_linespec_location's
476         return type change.
477         (strace_command): Adjust to pass a symbol_name_match_type to
478         new_linespec_location.
479         (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
480         mention "-qualified".
481         * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
482         * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
483         enumerator.
484         (complete_address_and_linespec_locations): New parameter
485         'match_type'.  Pass it down.
486         (explicit_options): Add "-qualified".
487         (collect_explicit_location_matches): Pass the requested match type
488         to the linespec completers.  Handle MATCH_QUALIFIED.
489         (location_completer): Handle "-qualified" combined with linespecs.
490         * cp-support.c (cp_search_name_hash): New.
491         (cp_symbol_name_matches_1): Implement wild matching for C++.
492         (cp_fq_symbol_name_matches): Reimplement.
493         (cp_get_symbol_name_matcher): Return different matchers depending
494         on the lookup name's match type.
495         (selftests::test_cp_symbol_name_matches): Add wild matching tests.
496         * cp-support.h (cp_search_name_hash): New declaration.
497         * dwarf2read.c
498         (selftests::dw2_expand_symtabs_matching::test_symbols): Add
499         symbols.
500         (test_dw2_expand_symtabs_matching_symbol): Add wild matching
501         tests.
502         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
503         pass a symbol_name_match_type to new_linespec_location.
504         * linespec.c (linespec_parse_basic): Lookup function symbols using
505         the parser's symbol name match type.
506         (convert_explicit_location_to_linespec): New
507         symbol_name_match_type parameter.  Pass it down to
508         find_linespec_symbols.
509         (convert_explicit_location_to_sals): Pass the location's name
510         match type to convert_explicit_location_to_linespec.
511         (parse_linespec): New match_type parameter.  Save it in the
512         parser.
513         (linespec_parser_new): Default to symbol_name_match_type::WILD.
514         (linespec_complete_function): New symbol_name_match_type
515         parameter.  Use it.
516         (complete_linespec_component): Pass down the parser's recorded
517         name match type.
518         (linespec_complete_label): New symbol_name_match_type parameter.
519         Use it.
520         (linespec_complete): New symbol_name_match_type parameter.  Save
521         it in the parser and pass it down.  Adjust to
522         get_linespec_location's prototype change.
523         (find_function_symbols, find_linespec_symbols): New
524         symbol_name_match_type parameter.  Pass it down instead of
525         assuming symbol_name_match_type::WILD.
526         * linespec.h (linespec_complete, linespec_complete_function)
527         (linespec_complete_label): New symbol_name_match_type parameter.
528         * location.c (event_location::linespec_location): Now a struct
529         linespec_location.
530         (EL_LINESPEC): Adjust.
531         (initialize_explicit_location): Default to
532         symbol_name_match_type::WILD.
533         (new_linespec_location): New symbol_name_match_type parameter.
534         Record it in the location.
535         (get_linespec_location): Now returns a struct linespec_location.
536         (new_explicit_location): Also copy func_name_match_type.
537         (explicit_to_string_internal)
538         (string_to_explicit_location): Handle "-qualified".
539         (copy_event_location): Adjust to LINESPEC_LOCATION type change.
540         Copy symbol_name_match_type fields.
541         (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
542         type change.
543         (event_location_to_string): Adjust to LINESPEC_LOCATION type
544         change.  Handle "-qualfied".
545         (string_to_explicit_location): Handle "-qualified".
546         (string_to_event_location_basic): New symbol_name_match_type
547         parameter.  Pass it down.
548         (string_to_event_location): Handle "-qualified".
549         * location.h (struct linespec_location): New.
550         (explicit_location::func_name_match_type): New field.
551         (new_linespec_location): Now returns a const linespec_location *.
552         (string_to_event_location_basic): New symbol_name_match_type
553         parameter.
554         (explicit_completion_info::saw_explicit_location_option): New
555         field.
556         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
557         symbol_name_match_type to new_linespec_location.
558         * python/py-breakpoint.c (bppy_init): Likewise.
559         * python/python.c (gdbpy_decode_line): Likewise.
560
561 2017-11-29  Pedro Alves  <palves@redhat.com>
562
563         * ada-lang.c (ada_lookup_name_info::matches): Change type of
564         parameter from completion_match to completion_match_result.
565         Adjust.
566         (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
567         * completer.c (completion_tracker::maybe_add_completion): Add
568         match_for_lcd parameter and use it.
569         (completion_tracker::add_completion): Likewise.
570         * completer.h (class completion_match_for_lcd): New class.
571         (completion_match_result::match_for_lcd): New field.
572         (completion_match_result::set_match): New method.
573         (completion_tracker): Add comments.
574         (completion_tracker::add_completion): Add match_for_lcd parameter.
575         (completion_tracker::reset_completion_match_result): Reset
576         match_for_lcd too.
577         (completion_tracker::maybe_add_completion): Add match_for_lcd
578         parameter.
579         (completion_tracker::m_lowest_common_denominator_unique): Extend
580         comments.
581         * cp-support.c (cp_symbol_name_matches_1)
582         (cp_fq_symbol_name_matches): Change type of parameter from
583         completion_match to completion_match_result.  Adjust.
584         * language.c (default_symbol_name_matcher): Change type of
585         parameter from completion_match to completion_match_result.
586         Adjust.
587         * language.h (completion_match_for_lcd): Forward declare.
588         (default_symbol_name_matcher): Change type of parameter from
589         completion_match to completion_match_result.
590         * symtab.c (compare_symbol_name): Adjust.
591         (completion_list_add_name): Pass the match_for_lcd to the tracker.
592         * symtab.h (ada_lookup_name_info::matches): Change type of
593         parameter from completion_match to completion_match_result.
594         (symbol_name_matcher_ftype): Likewise, and update comments.
595
596 2017-11-29  Pedro Alves  <palves@redhat.com>
597
598         * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
599         * minsyms.c (msymbol_is_text): Delete.
600         (msymbol_is_function): New function.
601         * minsyms.h (msymbol_is_text): Delete.
602         (msymbol_is_function): New declaration.
603         * symtab.c (find_function_alias_target): Use msymbol_is_function.
604
605 2017-11-29  Tom Tromey  <tom@tromey.com>
606
607         * Makefile.in (distclean): Handle the case where rmdir fails.
608
609 2017-11-29  Tom Tromey  <tom@tromey.com>
610
611         * symfile.c (_initialize_symfile): Update usage text for
612         add-symbol-file, symbol-file, load.
613
614 2017-11-29  Tom Tromey  <tom@tromey.com>
615
616         * symfile.c (add_symbol_file_command): Error if some arguments to
617         -s are missing.  Change unrecognized-argument error message.
618         (_initialize_symfile): Fix usage text for add-symbol-file.
619
620 2017-11-27  Tom Tromey  <tom@tromey.com>
621
622         * Makefile.in (REMOTE_OBS): Remove.
623         (SFILES): Remove remote sources.
624         (COMMON_SFILES): Add remote sources.
625         (ALLDEPFILES): Remove dcache.c.
626
627 2017-11-27  Tom Tromey  <tom@tromey.com>
628
629         * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
630         variables.
631         (SFILES): Use SUBDIR_TARGET_SRCS.
632         (COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
633         (CONFIG_SRC_SUBDIR): Add target.
634         (%.o): Remove target rule.
635
636 2017-11-27  Tom Tromey  <tom@tromey.com>
637
638         * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
639         registry.o, thread-fsm.o, debug.o.
640         (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
641         thread-fsm.c, debug.c.
642
643 2017-11-27  Tom Tromey  <tom@tromey.com>
644
645         * Makefile.in (COMMON_SFILES): New.
646         (SFILES): Move some entries to COMMON_SFILES.
647         (COMMON_OBS): Use COMMON_SFILES.
648
649 2017-11-27  Tom Tromey  <tom@tromey.com>
650
651         * Makefile.in (YYFILES): Update comment.
652         (YYOBJ): Redefine.
653
654 2017-11-27  Tom Tromey  <tom@tromey.com>
655
656         * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
657         (CONFIG_SRC_SUBDIR): Add python.
658         (%.o): Remove python rule.
659         (python/%.o): New rule.
660         * configure: Rebuild.
661         * configure.ac (CONFIG_OBS): Refer to python/python.o
662
663 2017-11-27  Tom Tromey  <tom@tromey.com>
664
665         * configure: Rebuild.
666         * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
667         * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
668         (CONFIG_SRC_SUBDIR): Add guile.
669         (%.o): Remove guile rule.
670
671 2017-11-27  Tom Tromey  <tom@tromey.com>
672
673         * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
674         (%.o): Remove unittests rule.
675         (CONFIG_SRC_SUBDIR): Add unittests.
676
677 2017-11-27  Tom Tromey  <tom@tromey.com>
678
679         * Makefile.in (SUBDIR_TUI_OBS): Redefine.
680         (CONFIG_SRC_SUBDIR): Add tui.
681         (%.o): Remove tui rule.
682
683 2017-11-27  Tom Tromey  <tom@tromey.com>
684
685         * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
686         (%.o): Remove compile rule.
687         (CONFIG_SRC_SUBDIR): Add compile.
688
689 2017-11-27  Tom Tromey  <tom@tromey.com>
690
691         * Makefile.in (SUBDIR_MI_OBS): Redefine.
692         (%.o): Remove mi rule.
693         (CONFIG_SRC_SUBDIR): Add mi.
694         (COMMON_OBS): Use mi/mi-common.o
695
696 2017-11-27  Tom Tromey  <tom@tromey.com>
697
698         * Makefile.in (SUBDIR_CLI_OBS): Redefine.
699         (%.o): Remove cli rule.
700         (CONFIG_SRC_SUBDIR): Add cli.
701
702 2017-11-27  Tom Tromey  <tom@tromey.com>
703
704         * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
705         * configure: Rebuild.
706         * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
707         (CONFIG_DEP_SUBDIR): New variable.
708         (%.o): Add order-only dependency.
709         ($(CONFIG_DEP_SUBDIR)): New target.
710
711 2017-11-26  Dominik Czarnota  <dominik.b.czarnota@gmail.com>
712
713         PR gdb/21945
714         * findcmd.c (_initialize_mem_search): Update find command help
715         text.
716
717 2017-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
718
719         * python/python.c (do_start_initialization): Change progname
720         type to gdb::unique_xmalloc_ptr.  Release the pointer when using
721         Python 2.
722
723 2017-11-26  Tom Tromey  <tom@tromey.com>
724
725         * common/format.h: Add include guards.
726
727 2017-11-26  Tom Tromey  <tom@tromey.com>
728
729         * nat/linux-personality.h (class
730         maybe_disable_address_space_randomization): New class.
731         (maybe_disable_address_space_randomization): Don't declare
732         function.
733         * nat/linux-personality.c (restore_personality)
734         (make_disable_asr_cleanup): Remove.
735         (maybe_disable_address_space_randomization): Now a constructor.
736         (~maybe_disable_address_space_randomization): New destructor.
737         * linux-nat.c (linux_nat_create_inferior): Update.
738
739 2017-11-26  Tom Tromey  <tom@tromey.com>
740
741         * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
742
743 2017-11-26  Ulrich Weigand  <uweigand@de.ibm.com>
744
745         * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
746         "cooked" register.  Access only first four bytes of branch target
747         registers.
748
749 2017-11-25  Sergio Durigan Junior  <sergiodj@redhat.com>
750
751         PR gdb/22491
752         * stap-probe.c (relocate_address): New function.
753         (stap_probe::get_relocated_address): Use 'relocate_address'.
754         (stap_probe::set_semaphore): Use 'relocate_address' and pass
755         'm_sem_addr'.
756         (stap_probe::clear_semaphore): Likewise.
757
758 2017-11-25  Pedro Alves  <palves@redhat.com>
759
760         * dictionary.c: Include "safe-ctype.h".
761         * minsyms.c: Include "safe-ctype.h".
762         * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
763
764 2017-11-25   Pedro Alves  <palves@redhat.com>
765
766         * completer.c (complete_line_internal_1): Skip spaces until the
767         start of the command.
768
769 2017-11-24  Pedro Alves  <palves@redhat.com>
770
771         * cp-support.c (cp_symbol_name_matches_1): New, factored out from
772         cp_fq_symbol_name_matches.  Pass language_cplus to
773         strncmp_with_mode.
774         (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
775         (selftests::test_cp_symbol_name_cmp): New.
776         (_initialize_cp_support): Register "cp_symbol_name_matches"
777         selftests.
778         * language.c (default_symbol_name_matcher): Pass language_minimal
779         to strncmp_iw_with_mode.
780         * utils.c: Include "cp-support.h" and <algorithm>.
781         (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
782         (cp_is_operator): New functions.
783         (strncmp_iw_with_mode): Use them.  Add language parameter.  Don't
784         skip whitespace in the symbol name when the lookup name doesn't
785         have spaces, and vice versa.
786         (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
787         * utils.h (strncmp_iw_with_mode): Add language parameter.
788
789 2017-11-24  Joel Brobecker  <brobecker@adacore.com>
790
791         * ada-lang.c (ada_exception_message_1, ada_exception_message):
792         New functions.
793         (print_it_exception): If available, display the exception
794         message as well.
795         * NEWS: Document new feature.
796
797 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
798
799         * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
800
801 2017-11-24  Philipp Rudo  <prudo@linux.vnet.ibm.com>
802
803         * dtrace-probe.c (dtrace_probe::build_arg_exprs)
804         (dtrace_probe::is_enabled, dtrace_probe::enable)
805         (dtrace_probe::disable): Remove keyword 'struct' at for-range
806         variable
807         * probe.c (gen_ui_out_table_header_info)
808         (print_ui_out_not_applicables):  Remove keyword 'struct' at
809         for-range variable
810
811 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
812
813         * configure.tgt: Add arch/aarch64.o
814
815 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
816
817         * common/common-utils.h: Include poison.h.
818         (xfree): Remove declaration, add definition with static_assert.
819         * common/common-utils.c (xfree): Remove.
820         * common/poison.h (IsMallocatable): Define.
821         (IsFreeable): Define.
822         (free): Delete for non-freeable types.
823         (xnew): New.
824         (XNEW): Undef and redefine.
825         (xcnew): New.
826         (XCNEW): Undef and redefine.
827         (xdelete): New.
828         (XDELETE): Undef and redefine.
829         (xnewvec): New.
830         (XNEWVEC): Undef and redefine.
831         (xcnewvec): New.
832         (XCNEWVEC): Undef and redefine.
833         (xresizevec): New.
834         (XRESIZEVEC): Undef and redefine.
835         (xdeletevec): New.
836         (XDELETEVEC): Undef and redefine.
837         (xnewvar): New.
838         (XNEWVAR): Undef and redefine.
839         (xcnewvar): New.
840         (XCNEWVAR): Undef and redefine.
841         (xresizevar): New.
842         (XRESIZEVAR): Undef and redefine.
843
844 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
845
846         * gdbthread.h (private_thread_info): Define structure type, add
847         virtual pure destructor.
848         (thread_info) <priv>: Change type to unique_ptr.
849         <private_dtor>: Remove.
850         * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
851         (private_thread_info::~private_thread_info): Provide default
852         implementation.
853         (thread_info::~thread_info): Don't call private_dtor nor
854         manually free priv.
855         * aix-thread.c (private_thread_info): Rename to ...
856         (aix_thread_info): ... this.
857         (get_aix_thread_info): New.
858         (sync_threadlists): Adjust.
859         (iter_tid): Adjust.
860         (aix_thread_resume): Adjust.
861         (aix_thread_fetch_registers): Adjust.
862         (aix_thread_store_registers): Adjust.
863         (aix_thread_extra_thread_info): Adjust.
864         * darwin-nat.h (private_thread_info): Rename to ...
865         (darwin_thread_info): ... this.
866         (get_darwin_thread_info): New.
867         * darwin-nat.c (darwin_init_thread_list): Adjust.
868         (darwin_check_new_threads): Adjust.
869         (thread_info_from_private_thread_info): Adjust.
870         * linux-thread-db.c (private_thread_info): Rename to ...
871         (thread_db_thread_info): ... this, initialize fields.
872         (get_thread_db_thread_info): New.
873         <dying>: Change type to bool.
874         (update_thread_state): Adjust to type rename.
875         (record_thread): Adjust to type rename an use of unique_ptr.
876         (thread_db_pid_to_str): Likewise.
877         (thread_db_extra_thread_info): Likewise.
878         (thread_db_thread_handle_to_thread_info): Likewise.
879         (thread_db_get_thread_local_address): Likewise.
880         * nto-tdep.h (private_thread_info): Rename to ...
881         (nto_thread_info): ... this, initialize fields.
882         (get_nto_thread_info): New.
883         <name>: Change type to std::string.
884         * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
885         use of unique_ptr.
886         * nto-procfs.c (update_thread_private_data_name): Adjust to
887         std::string change, allocate nto_private_thread_info with new.
888         (update_thread_private_data): Adjust to unique_ptr.
889         * remote.c (private_thread_info): Rename to ...
890         (remote_thread_info): ... this, initialize data members with
891         default values.
892         <extra, name>: Change type to std::string.
893         <thread_handle>: Change type to non-pointer.
894         (free_private_thread_info): Remove.
895         (get_private_info_thread): Rename to...
896         (get_remote_thread_info): ... this, change return type, adjust to
897         use of unique_ptr, use remote_thread_info constructor.
898         (remote_add_thread): Adjust.
899         (get_private_info_ptid): Rename to...
900         (get_remote_thread_info): ...this, change return type.
901         (remote_thread_name): Use get_remote_thread_info, adjust to
902         change to std::string.
903         (struct thread_item) <~thread_item>: Remove.
904         <thread_handle>: Make non pointer.
905         (start_thread): Adjust to thread_item::thread_handle type
906         change.
907         (remote_update_thread_list): Adjust to type name change, move
908         strings from temporary to long-lived object instead of
909         duplicating.
910         (remote_threads_extra_info): Use get_remote_thread_info.
911         (process_initial_stop_replies): Likewise.
912         (resume_clear_thread_private_info): Likewise.
913         (remote_resume): Adjust to type name change.
914         (remote_commit_resume): Use get_remote_thread_info.
915         (process_stop_reply): Adjust to type name change.
916         (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
917         (remote_stopped_by_hw_breakpoint): Likewise.
918         (remote_stopped_by_watchpoint): Likewise.
919         (remote_stopped_data_address): Likewise.
920         (remote_core_of_thread): Likewise.
921         (remote_thread_handle_to_thread_info): Use
922         get_private_info_thread, adjust to thread_handle field type
923         change.
924
925 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
926
927         * remote.c (struct thread_item): Add constructor, disable copy
928         construction and copy assignment, define default move
929         construction and move assignment.
930         <extra, name>: Change type to std::string.
931         <core>: Initialize.
932         <thread_handle>: Make non-pointer.
933         (thread_item_t): Remove typedef.
934         (DEF_VEC_O(thread_item_t)): Remove.
935         (threads_listing_context) <contains_thread>: New method.
936         <remove_thread>: New method.
937         <items>: Change type to std::vector.
938         (clear_threads_listing_context): Remove.
939         (threads_listing_context_remove): Remove.
940         (remote_newthread_step): Use thread_item constructor, adjust to
941         change to std::vector.
942         (start_thread): Use thread_item constructor, adjust to change to
943         std::vector.
944         (end_thread): Adjust to change to std::vector and std::string.
945         (remote_get_threads_with_qthreadinfo): Use thread_item
946         constructor, adjust to std::vector.
947         (remote_update_thread_list): Adjust to change to std::vector and
948         std::string, use threads_listing_context methods.
949         (remove_child_of_pending_fork): Adjust.
950         (remove_new_fork_children): Adjust.
951         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
952         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
953         * unittests/rsp-low-selftests.c: New file.
954         * common/rsp-low.h: Include common/byte-vector.h.
955         (hex2bin): New overload.
956         * common/rsp-low.c (hex2bin): New overload.
957
958 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
959
960         * inferior.h (private_inferior): Define structure type, add
961         virtual pure destructor.
962         (inferior) <priv>: Change type to unique_ptr.
963         * inferior.c (private_inferior::~private_inferior): Provide
964         default implementation.
965         (inferior::~inferior): Don't free priv field.
966         (exit_inferior_1): Likewise.
967         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
968         (darwin_exception_info): Remove typedef.
969         (DEF_VEC_O (darwin_thread_t)); Remove.
970         (private_inferior): Rename to ...
971         (darwin_private_inferior): ... this, extend private_inferior.
972         (get_darwin_inferior): New.
973         <threads>: Change type to std::vector of darwin_thread_t pointers.
974         * darwin-nat.c (darwin_check_new_threads): Adjust.
975         (find_inferior_task_it): Adjust.
976         (darwin_find_thread); Adjust.
977         (darwin_suspend_inferior): Adjust.
978         (darwin_resume_inferior): Adjust.
979         (darwin_find_new_inferior): Adjust.
980         (darwin_decode_notify_message): Adjust.
981         (darwin_send_reply): Adjust.
982         (darwin_resume_inferior_threads): Adjust.
983         (darwin_suspend_inferior_threads): Adjust.
984         (darwin_decode_message): Adjust.
985         (darwin_wait): Adjust.
986         (darwin_interrupt): Adjust.
987         (darwin_deallocate_threads): Adjust.
988         (darwin_mourn_inferior): Adjust, don't free private data.
989         (darwin_reply_to_all_pending_messages): Adjust.
990         (darwin_stop_inferior): Adjust.
991         (darwin_setup_exceptions): Adjust.
992         (darwin_kill_inferior): Adjust.
993         (darwin_setup_request_notification): Adjust.
994         (darwin_attach_pid): Adjust.
995         (darwin_init_thread_list): Adjust.
996         (darwin_setup_fake_stop_event): Adjust.
997         (darwin_attach): Adjust.
998         (darwin_detach): Adjust.
999         (darwin_xfer_partial): Adjust.
1000         (set_enable_mach_exceptions): Adjust.
1001         (darwin_pid_to_exec_file): Adjust.
1002         (darwin_get_ada_task_ptid): Adjust.
1003         * darwin-nat-info.c (get_task_from_args): Adjust.
1004         (info_mach_ports_command): Adjust.
1005         (info_mach_region_command): Adjust.
1006         (info_mach_exceptions_command): Adjust.
1007         * remote.c (private_inferior): Rename to ...
1008         (remote_private_inferior): ... this, initialize fields.
1009         (get_remote_inferior); New.
1010         (remote_commit_resume): Use get_remote_inferior.
1011         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1012
1013 2017-11-24  Pedro Alves  <palves@redhat.com>
1014
1015         * NEWS: Mention linespecs and explicit locations, and completion
1016         improvements.
1017
1018 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1019
1020         * regcache.c (regcache::dump): Remove footnote_register_size.
1021
1022 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1023
1024         * regcache.c (cooked_read_test): Add more test for readonly
1025         regcache.
1026
1027 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1028
1029         * gdbarch-selftests.c (test_target_has_registers): Move it to
1030         target.c.
1031         (test_target_has_stack): Likewise.
1032         (test_target_has_memory): Likewise.
1033         (test_target_prepare_to_store): Likewise.
1034         (test_target_store_registers): Likewise.
1035         (test_target_ops): Likewise.
1036         * regcache.c: Include selftest-arch.h and gdbthread.h.
1037         (target_ops_no_register): New class.
1038         (test_target_fetch_registers): New.
1039         (test_target_store_registers): New.
1040         (test_target_xfer_partial): New.
1041         (readwrite_regcache): New.
1042         (cooked_read_test): New.
1043         (_initialize_regcache): Register the test.
1044         * target.c: (test_target_has_registers): Moved from
1045         gdbarch-selftests.c.
1046         (test_target_has_stack): Likewise.
1047         (test_target_has_memory): Likewise.
1048         (test_target_prepare_to_store): Likewise.
1049         (test_target_store_registers): Likewise.
1050         * target.h (test_target_ops): New class.
1051
1052 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1053
1054         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1055         selftest.
1056
1057 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1058
1059         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1060         * arch/aarch64.c (aarch64_create_target_description): Create
1061         new target description.
1062         * features/Makefile: Add new files.
1063         * features/aarch64.c: Remove file.
1064         * features/aarch64-core.c: New autogenerated file.
1065         * features/aarch64-fpu.c: New autogenerated file.
1066         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1067
1068 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1069
1070         * Makefile.in: Add new files.
1071         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1072         aarch64_read_description.
1073         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1074         Call aarch64_read_description.
1075         * aarch64-tdep.c (aarch64_read_description): New function.
1076         (aarch64_gdbarch_init): Call aarch64_read_description.
1077         * aarch64-tdep.h (aarch64_read_description): New function.
1078         * arch/aarch64.c: New file.
1079         * configure.tgt: Add new files.
1080
1081 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1082
1083         * mi/mi-main.c (register_changed_p): Update.
1084         * value.c (value_contents_bits_eq): Change return type.
1085         (value_contents_eq): Likewise.
1086         * value.h: Update comments.
1087
1088 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1089
1090         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1091         local 'changed'.  Remove error.
1092         (register_changed_p): Change return type to bool.
1093
1094 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1095
1096         * arch/tic6x.c: New file.
1097         * arch/tic6x.h: New file.
1098         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1099         tic6x-core.xml and tic6x-gp.xml.
1100         * features/tic6x-c6xp.c: Generated.
1101         * features/tic6x-core.c: Generated.
1102         * features/tic6x-gp.c: Generated.
1103         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1104         "tic6x-".
1105
1106 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1107
1108         * mi/mi-main.c (list_available_thread_groups): Change map value
1109         type to std::vector.
1110
1111 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1112
1113         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1114
1115 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1116
1117         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1118         back to...
1119         <children_requested>: ... this.
1120         (varobj_get_num_children, varobj_update): Adjust.
1121
1122 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1123
1124         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1125         (ada_value_has_mutated): Likewise.
1126         * c-varobj.c (varobj_is_anonymous_child): Likewise.
1127         (c_is_path_expr_parent): Likewise.
1128         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1129         (mi_cmd_var_set_frozen): Likewise.
1130         (mi_cmd_var_update_iter): Likewise.
1131         (mi_cmd_var_update): Likewise.
1132         * varobj.c (pretty_printing): Likewise.
1133         (varobj_enable_pretty_printing): Likewise.
1134         (struct varobj_root) <floating, is_valid>: Likewise.
1135         (struct varobj_dynamic) <children_requested>: Likewise.
1136         (delete_variable): Likewise.
1137         (delete_variable_1): Likewise.
1138         (install_variable): Likewise.
1139         (update_type_if_necessary): Likewise.
1140         (install_new_value): Likewise.
1141         (value_of_root): Likewise.
1142         (is_root_p): Likewise.
1143         (varobj_create): Likewise.
1144         (varobj_delete): Likewise.
1145         (varobj_has_more): Likewise.
1146         (varobj_set_frozen): Likewise.
1147         (varobj_get_frozen): Likewise.
1148         (install_dynamic_child): Likewise.
1149         (dynamic_varobj_has_child_method): Likewise.
1150         (update_dynamic_varobj_children): Likewise.
1151         (varobj_get_num_children): Likewise.
1152         (varobj_list_children): Likewise.
1153         (is_path_expr_parent): Likewise.
1154         (varobj_default_is_path_expr_parent): Likewise.
1155         (varobj_is_dynamic_p): Likewise.
1156         (varobj_set_value): Likewise.
1157         (varobj_value_has_mutated): Likewise.
1158         (varobj_update): Likewise.
1159         (check_scope): Likewise.
1160         (value_of_root_1): Likewise.
1161         (varobj_value_get_print_value): Likewise.
1162         (varobj_editable_p): Likewise.
1163         (varobj_value_is_changeable_p): Likewise.
1164         (varobj_floating_p): Likewise.
1165         (varobj_default_value_is_changeable_p): Likewise.
1166         (varobj_invalidate_iter): Likewise.
1167         * varobj.h (struct varobj_update_result) <type_changed,
1168         children_changed, changed, value_installed>: Likewise.
1169         (struct varobj) <updated, frozen, not_fetched>: Likewise.
1170         (struct lang_varobj_ops) <value_is_changeable_p,
1171         value_has_mutated, is_path_expr_parent>: Likewise.
1172         (varobj_delete): Likewise.
1173         (varobj_set_frozen): Likewise.
1174         (varobj_get_frozen): Likewise.
1175         (varobj_set_value): Likewise.
1176         (varobj_update): Likewise.
1177         (varobj_editable_p): Likewise.
1178         (varobj_floating_p): Likewise.
1179         (varobj_has_more): Likewise.
1180         (varobj_is_dynamic_p): Likewise.
1181         (varobj_default_value_is_changeable_p): Likewise.
1182         (varobj_value_is_changeable_p): Likewise.
1183         (varobj_is_anonymous_child): Likewise.
1184         (varobj_default_is_path_expr_parent): Likewise.
1185
1186 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1187
1188         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1189         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1190         <type_str>: Convert to 'std::string'.
1191         <expr>: Convert to 'expression_up'.
1192         (dtrace_probe_arg_s): Delete type and VEC.
1193         (dtrace_probe_enabler_s): Likewise.
1194         (struct dtrace_probe): Replace by...
1195         (class dtrace_static_probe_ops): ...this and...
1196         (class dtrace_probe): ...this.
1197         (dtrace_probe_is_linespec): Rename to...
1198         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
1199         to reflect change.
1200         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1201         Adjust code.  Create new instance of 'dtrace_probe'.
1202         (dtrace_build_arg_exprs): Rename to...
1203         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
1204         reflect change.
1205         (dtrace_get_probes): Rename to...
1206         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
1207         to reflect change.
1208         (dtrace_get_arg): Rename to...
1209         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
1210         reflect change.
1211         (dtrace_probe_is_enabled): Rename to...
1212         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
1213         change.
1214         (dtrace_get_probe_address): Rename to...
1215         (dtrace_probe::get_relocated_address): ...this.  Adjust code
1216         to reflect change.
1217         (dtrace_get_probe_argument_count): Rename to...
1218         (dtrace_probe::get_argument_count): ...this.  Adjust code to
1219         reflect change.
1220         (dtrace_can_evaluate_probe_arguments): Rename to...
1221         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
1222         to reflect change.
1223         (dtrace_evaluate_probe_argument): Rename to...
1224         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
1225         reflect change.
1226         (dtrace_compile_to_ax): Rename to...
1227         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
1228         reflect change.
1229         (dtrace_probe_destroy): Delete.
1230         (dtrace_type_name): Rename to...
1231         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
1232         reflect change.
1233         (dtrace_probe::get_static_ops): New method.
1234         (dtrace_gen_info_probes_table_header): Rename to...
1235         (dtrace_static_probe_ops::gen_info_probes_table_header):
1236         ...this.  Adjust code to reflect change.
1237         (dtrace_gen_info_probes_table_values): Rename to...
1238         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
1239         code to reflect change.
1240         (dtrace_enable_probe): Rename to...
1241         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
1242         change.
1243         (dtrace_disable_probe): Rename to...
1244         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
1245         change.
1246         (struct probe_ops dtrace_probe_ops): Delete.
1247         (info_probes_dtrace_command): Call 'info_probes_for_spops'
1248         instead of 'info_probes_for_ops'.
1249         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1250         of 'all_probe_ops'.
1251
1252 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1253             Simon Marchi  <simark@simark.ca>
1254
1255         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1256         variable.
1257         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1258         <aexpr>: Change type to 'expression_up'.
1259         (stap_probe_arg_s): Delete type and VEC.
1260         (struct stap_probe): Delete.  Replace by...
1261         (class stap_static_probe_ops): ...this and...
1262         (class stap_probe): ...this.  Rename variables to add 'm_'
1263         prefix.  Do not use 'union' for arguments anymore.
1264         (stap_get_expected_argument_type): Receive probe name instead
1265         of 'struct stap_probe'.  Adjust code.
1266         (stap_parse_probe_arguments): Rename to...
1267         (stap_probe::parse_arguments): ...this.  Adjust code to
1268         reflect change.
1269         (stap_get_probe_address): Rename to...
1270         (stap_probe::get_relocated_address): ...this.  Adjust code
1271         to reflect change.
1272         (stap_get_probe_argument_count): Rename to...
1273         (stap_probe::get_argument_count): ...this.  Adjust code
1274         to reflect change.
1275         (stap_get_arg): Rename to...
1276         (stap_probe::get_arg_by_number'): ...this. Adjust code to
1277         reflect change.
1278         (can_evaluate_probe_arguments): Rename to...
1279         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
1280         to reflect change.
1281         (stap_evaluate_probe_argument): Rename to...
1282         (stap_probe::evaluate_argument): ...this.  Adjust code
1283         to reflect change.
1284         (stap_compile_to_ax): Rename to...
1285         (stap_probe::compile_to_ax): ...this.  Adjust code to
1286         reflect change.
1287         (stap_probe_destroy): Delete.
1288         (stap_modify_semaphore): Adjust comment.
1289         (stap_set_semaphore): Rename to...
1290         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
1291         change.
1292         (stap_clear_semaphore): Rename to...
1293         (stap_probe::clear_semaphore): ...this.  Adjust code to
1294         reflect change.
1295         (stap_probe::get_static_ops): New method.
1296         (handle_stap_probe): Adjust code to create instance of
1297         'stap_probe'.
1298         (stap_get_probes): Rename to...
1299         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
1300         reflect change.
1301         (stap_probe_is_linespec): Rename to...
1302         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
1303         reflect change.
1304         (stap_type_name): Rename to...
1305         (stap_static_probe_ops::type_name): ...this.  Adjust code to
1306         reflect change.
1307         (stap_gen_info_probes_table_header): Rename to...
1308         (stap_static_probe_ops::gen_info_probes_table_header):
1309         ...this.  Adjust code to reflect change.
1310         (stap_gen_info_probes_table_values): Rename to...
1311         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
1312         code to reflect change.
1313         (struct probe_ops stap_probe_ops): Delete.
1314         (info_probes_stap_command): Use 'info_probes_for_spops'
1315         instead of 'info_probes_for_ops'.
1316         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1317         of 'all_probe_ops'.
1318
1319 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1320
1321         * break-catch-throw.c (fetch_probe_arguments): Use
1322         'probe.prob' instead of 'probe.probe'.
1323         * breakpoint.c (create_longjmp_master_breakpoint): Call
1324         'can_evaluate_arguments' and 'get_relocated_address' methods
1325         from probe.
1326         (create_exception_master_breakpoint): Likewise.
1327         (add_location_to_breakpoint): Use 'sal->prob' instead of
1328         'sal->probe'.
1329         (bkpt_probe_insert_location): Call 'set_semaphore' method from
1330         probe.
1331         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1332         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1333         of 'probe_ops'.
1334         (probe_key_free): Call 'delete' on probe.
1335         (check_exception_resume): Use 'probe.prob' instead of
1336         'probe.probe'.
1337         * location.c (string_to_event_location_basic): Call
1338         'probe_linespec_to_static_ops'.
1339         * probe.c (class any_static_probe_ops): New class.
1340         (any_static_probe_ops any_static_probe_ops): New variable.
1341         (parse_probes_in_pspace): Receive 'static_probe_ops' as
1342         argument.  Adjust code to reflect change.
1343         (parse_probes): Use 'static_probe_ops' instead of
1344         'probe_ops'.  Adjust code to reflect change.
1345         (find_probes_in_objfile): Call methods to get name and
1346         provider from probe.
1347         (find_probe_by_pc): Use 'result.prob' instead of
1348         'result.probe'.  Call 'get_relocated_address' method from
1349         probe.
1350         (collect_probes): Adjust comment and argument list to receive
1351         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
1352         reflect change.  Call necessary methods from probe.
1353         (compare_probes): Call methods to get name and provider from
1354         probes.
1355         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1356         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
1357         adjust code accordingly.
1358         (print_ui_out_not_applicables): Likewise.
1359         (info_probes_for_ops): Rename to...
1360         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
1361         as argument instead of 'probe_ops'.  Adjust code.  Call
1362         necessary methods from probe.
1363         (info_probes_command): Use 'info_probes_for_spops'.
1364         (enable_probes_command): Pass correct argument to
1365         'collect_probes'.  Call methods from probe.
1366         (disable_probes_command): Likewise.
1367         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1368         (get_probe_argument_count): Move to
1369         'any_static_probe_ops::get_argument_count'.
1370         (can_evaluate_probe_arguments): Move to
1371         'any_static_probe_ops::can_evaluate_arguments'.
1372         (evaluate_probe_argument): Move to
1373         'any_static_probe_ops::evaluate_argument'.
1374         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1375         'probe.probe'.
1376         (probe_linespec_to_ops): Rename to...
1377         (probe_linespec_to_static_ops): ...this.  Adjust code.
1378         (probe_any_is_linespec): Rename to...
1379         (any_static_probe_ops::is_linespec): ...this.
1380         (probe_any_get_probes): Rename to...
1381         (any_static_probe_ops::get_probes): ...this.
1382         (any_static_probe_ops::type_name): New method.
1383         (any_static_probe_ops::gen_info_probes_table_header): New
1384         method.
1385         (compute_probe_arg): Use 'pc_probe.prob' instead of
1386         'pc_probe.probe'.  Call methods from probe.
1387         (compile_probe_arg): Likewise.
1388         (std::vector<const probe_ops *> all_probe_ops): Delete.
1389         (std::vector<const static_probe_ops *> all_static_probe_ops):
1390         New variable.
1391         (_initialize_probe): Use 'all_static_probe_ops' instead of
1392         'all_probe_ops'.
1393         * probe.h (struct info_probe_column) <field_name>: Delete
1394         extraneous newline
1395         (info_probe_column_s): Delete type and VEC.
1396         (struct probe_ops): Delete.  Replace with...
1397         (class static_probe_ops): ...this and...
1398         (clas probe): ...this.
1399         (struct bound_probe) <bound_probe>: Delete extraneous
1400         newline.  Adjust constructor to receive 'probe' instead of
1401         'struct probe'.
1402         <probe>: Rename to...
1403         <prob>: ...this.  Delete extraneous newline.
1404         <objfile>: Delete extraneous newline.
1405         (register_probe_ops): Delete unused prototype.
1406         (info_probes_for_ops): Rename to...
1407         (info_probes_for_spops): ...this.  Adjust comment.
1408         (get_probe_address): Move to 'probe::get_address'.
1409         (get_probe_argument_count): Move to
1410         'probe::get_argument_count'.
1411         (can_evaluate_probe_arguments): Move to
1412         'probe::can_evaluate_arguments'.
1413         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1414         * solib-svr4.c (struct svr4_info): Adjust comment.
1415         (struct probe_and_action) <probe>: Rename to...
1416         <prob>: ...this.
1417         (register_solib_event_probe): Receive 'probe' instead of
1418         'struct probe' as argument.  Use 'prob' instead of 'probe'
1419         when applicable.
1420         (solib_event_probe_action): Call 'get_argument_count' method
1421         from probe.  Adjust comment.
1422         (svr4_handle_solib_event): Adjust comment.  Call
1423         'evaluate_argument' method from probe.
1424         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1425         from probe.
1426         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1427         'struct probe'.  Call 'can_evaluate_arguments' from probe.
1428         * symfile.h: Forward declare 'class probe' instead of 'struct
1429         probe'.
1430         * symtab.h: Likewise.
1431         (struct symtab_and_line) <probe>: Rename to...
1432         <prob>: ...this.
1433         * tracepoint.c (start_tracing): Use 'prob' when applicable.
1434         Call probe methods.
1435         (stop_tracing): Likewise.
1436
1437 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
1438
1439         * ravenscar-thread.c (ravenscar_inferior_created): Remove
1440         trailing newline at end of string in call to warning.
1441
1442 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1443
1444         * osdata.h: Include vector isntead of vec.h.
1445         (osdata_column_s): Remove typedef.
1446         (struct osdata_column): Add constructor.
1447         <name, value>: Change type to std::string.
1448         (DEF_VEC_O (osdata_column_s)): Remove.
1449         (osdata_item_s): Remove typedef.
1450         (struct osdata_item) <columns>: Change type to std::vector.
1451         (DEF_VEC_O (osdata_item_s)): Remove.
1452         (struct osdata): Add constructor.
1453         <type>: Change type to std::string.
1454         <items>: Change type to std::vector.
1455         (osdata_p): Remove typedef.
1456         (DEF_VEC_P (osdata_p)): Remove.
1457         (osdata_parse): Return a unique_ptr.
1458         (osdata_free): Remove.
1459         (make_cleanup_osdata_free): Remove.
1460         (get_osdata): Return a unique_ptr.
1461         (get_osdata_column): Return pointer to std::string, take a
1462         reference to osdata_item as parameter.
1463         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1464         unique_ptr.
1465         <property_name>: Change type to std::string.
1466         (osdata_start_osdata): Allocate osdata with new and adjust.
1467         (osdata_start_item): Adjust.
1468         (osdata_start_column): Adjust.
1469         (osdata_end_column): Adjust.
1470         (clear_parsing_data): Remove.
1471         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1472         (osdata_item_clear): Remove.
1473         (get_osdata): return a unique_ptr and adjust.
1474         (get_osdata_column): Return a pointer to std::string and adjust.
1475         (info_osdata): Adjust.
1476         * mi/mi-main.c: Include <map>.
1477         (free_vector_of_osdata_items): Remove.
1478         (list_available_thread_groups): Adjust, use std::map instead of
1479         splay tree.
1480
1481 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
1482
1483         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1484         case in switch.
1485
1486 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1487
1488         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1489
1490 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1491
1492         * varobj.h (struct varobj_update_result): Add constructor, add
1493         move constructor, disable copy and assign, initialize fields.
1494         <newobj>: Change type to std::vector.
1495         (varobj_update): Return std::vector.
1496         * varobj.c (install_dynamic_child): Change VEC parameters to
1497         std::vector and adjust.
1498         (update_dynamic_varobj_children): Likewise.
1499         (varobj_update): Return std::vector and adjust.
1500         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1501
1502 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1503
1504         * varobj.h (struct varobj) <parent>: Remove const.
1505         <children>: Change type to std::vector.
1506         (varobj_list_children): Return std::vector const reference.
1507         (varobj_restrict_range): Change parameter type to std::vector
1508         const reference.
1509         * varobj.c (varobj_has_more): Adjust.
1510         (varobj_restrict_range): Change parameter type to std::vector
1511         const reference and adjust.
1512         (install_dynamic_child): Adjust.
1513         (update_dynamic_varobj_children): Adjust.
1514         (varobj_list_children): Return std::vector const reference and
1515         adjust.
1516         (varobj_add_child): Adjust.
1517         (update_type_if_necessary): Adjust.
1518         (varobj_update): Adjust.
1519         (delete_variable_1): Adjust.
1520         * ada-varobj.c (ada_value_has_mutated): Adjust.
1521         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1522
1523 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1524
1525         * varobj.h (struct varobj): Add constructor and destructor,
1526         initialize fields.
1527         * varobj.c (struct varobj_root): Initialize fields.
1528         (struct varobj_dynamic): Initialize fields.
1529         (varobj_create): Use unique_ptr instead of cleanup.  Create
1530         varobj with new instead of new_root_variable.
1531         (delete_variable_1): Free variable with delete instead of
1532         free_variable.
1533         (create_child_with_value): Create variable with new instead of
1534         new_variable.
1535         (varobj::varobj): New.
1536         (varobj::~varobj): New (body mostly coming from free_variable).
1537         (new_variable): Remove.
1538         (free_variable): Remove.
1539         (do_free_variable_cleanup): Remove.
1540         (make_cleanup_free_variable): Remove.
1541
1542 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1543
1544         * core-regset.c: Remove file.
1545         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1546
1547 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1548
1549         * NEWS: Document use of GNU MPFR.
1550         * README: Likewise.
1551
1552         * Makefile.in (LIBMPFR): Add define.
1553         (CLIBS): Add $(LIBMPFR).
1554         * configure.ac: Add --with-mpfr configure option.
1555         * configure: Regenerate.
1556         * config.in: Regenerate.
1557
1558         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1559         (class mpfr_float_ops): New type.
1560         (mpfr_float_ops::from_target): Two new overloaded functions.
1561         (mpfr_float_ops::to_target): Likewise.
1562         (mpfr_float_ops::to_string): New function.
1563         (mpfr_float_ops::from_string): Likewise.
1564         (mpfr_float_ops::to_longest): Likewise.
1565         (mpfr_float_ops::from_longest): Likewise.
1566         (mpfr_float_ops::from_ulongest): Likewise.
1567         (mpfr_float_ops::to_host_double): Likewise.
1568         (mpfr_float_ops::from_host_double): Likewise.
1569         (mpfr_float_ops::convert): Likewise.
1570         (mpfr_float_ops::binop): Likewise.
1571         (mpfr_float_ops::compare): Likewise.
1572         (get_target_float_ops): Use mpfr_float_ops if available.
1573
1574 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
1575
1576         * target-float.c: Do not include <math.h>.
1577         Include <cmath> and <limits>.
1578         (DOUBLEST): Do not define.
1579         (class target_float_ops): New type.
1580         (class host_float_ops): New templated type.
1581         (class decimal_float_ops): New type.
1582
1583         (floatformat_to_doublest): Rename to ...
1584         (host_float_ops<T>::from_target): ... this.  Use template type T
1585         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1586         (host_float_ops<T>::from_target): New overload using a type argument.
1587         (floatformat_from_doublest): Rename to ...
1588         (host_float_ops<T>::to_target): ... this.  Use template type T
1589         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
1590         (host_float_ops<T>::to_target): New overload using a type argument.
1591         (floatformat_printf_format): New function.
1592         (struct printf_length_modifier): New templated type.
1593         (floatformat_to_string): Rename to ...
1594         (host_float_ops<T>::to_string): ... this.  Use type instead of
1595         floatformat argument.  Use floatformat_printf_format and
1596         printf_length_modifier.  Remove special handling of invalid numbers,
1597         infinities and NaN (moved to target_float_to_string).
1598         (struct scanf_length_modifier): New templated type.
1599         (floatformat_from_string): Rename to ...
1600         (host_float_ops<T>::from_string): ... this.  Use type instead of
1601         floatformat argument.  Use scanf_length_modifier.
1602         (floatformat_to_longest): Rename to ...
1603         (host_float_ops<T>::to_longest): ... this.  Use type instead of
1604         floatformat argument.  Handle out-of-range values deterministically.
1605         (floatformat_from_longest): Rename to ...
1606         (host_float_ops<T>::from_longest): ... this.  Use type instead of
1607         floatformat argument.
1608         (floatformat_from_ulongest): Rename to ...
1609         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
1610         floatformat argument.
1611         (floatformat_to_host_double): Rename to ...
1612         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
1613         floatformat argument.
1614         (floatformat_from_host_double): Rename to ...
1615         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
1616         floatformat argument.
1617         (floatformat_convert): Rename to ...
1618         (host_float_ops<T>::convert): ... this.  Use type instead of
1619         floatformat arguments.  Remove handling of no-op conversions.
1620         (floatformat_binop): Rename to ...
1621         (host_float_ops<T>::binop): ... this.  Use type instead of
1622         floatformat arguments.
1623         (floatformat_compare): Rename to ...
1624         (host_float_ops<T>::compare): ... this.  Use type instead of
1625         floatformat arguments.
1626
1627         (match_endianness): Use type instead of length/byte_order arguments.
1628         (set_decnumber_context): Likewise.
1629         (decimal_from_number): Likewise.  Update calls.
1630         (decimal_to_number): Likewise.
1631         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
1632         (decimal_float_ops::to_host_double): New dummy function.
1633         (decimal_float_ops::from_host_double): Likewise.
1634         (decimal_to_string): Rename to ...
1635         (decimal_float_ops::to_string): ... this.  Use type instead of
1636         length/byte_order arguments.  Update calls.
1637         (decimal_from_string): Rename to ...
1638         (decimal_float_ops::from_string): ... this.  Use type instead of
1639         length/byte_order arguments.  Update calls.
1640         (decimal_from_longest): Rename to ...
1641         (decimal_float_ops::from_longest): ... this.  Use type instead of
1642         length/byte_order arguments.  Update calls.
1643         (decimal_from_ulongest): Rename to ...
1644         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
1645         length/byte_order arguments.  Update calls.
1646         (decimal_to_longest): Rename to ...
1647         (decimal_float_ops::to_longest): ... this.  Use type instead of
1648         length/byte_order arguments.  Update calls.
1649         (decimal_binop): Rename to ...
1650         (decimal_float_ops::binop): ... this.  Use type instead of
1651         length/byte_order arguments.  Update calls.
1652         (decimal_compare): Rename to ...
1653         (decimal_float_ops::compare): ... this.  Use type instead of
1654         length/byte_order arguments.  Update calls.
1655         (decimal_convert): Rename to ...
1656         (decimal_float_ops::convert): ... this.  Use type instead of
1657         length/byte_order arguments.  Update calls.
1658
1659         (target_float_same_category_p): New function.
1660         (target_float_same_format_p): Likewise.
1661         (target_float_format_length): Likewise.
1662         (enum target_float_ops_kind): New type.
1663         (get_target_float_ops_kind): New function.
1664         (get_target_float_ops): Three new overloaded functions.
1665
1666         (target_float_is_zero): Update call.
1667         (target_float_to_string): Add special handling of invalid numbers,
1668         infinities and NaN (moved from floatformat_to_string).  Use
1669         target_float_ops callback.
1670         (target_float_from_string): Use target_float_ops callback.
1671         (target_float_to_longest): Likewise.
1672         (target_float_from_longest): Likewise.
1673         (target_float_from_ulongest): Likewise.
1674         (target_float_to_host_double): Likewise.
1675         (target_float_from_host_double): Likewise.
1676         (target_float_convert): Add special case for no-op conversions.
1677         Use target_float_ops callback.
1678         (target_float_binop): Use target_float_ops callback.
1679         (target_float_compare): Likewise.
1680
1681 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1682
1683         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1684
1685 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1686
1687         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1688         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1689
1690 2017-11-21  Jerome Guitton  <guitton@adacore.com>
1691
1692         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1693         with event ptid from the lower layer before doing the
1694         ravenscar-specific update.
1695
1696 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1697
1698         * ravenscar-thread.c (is_ravenscar_task): Also verify that
1699         the ptid's TID is nonzero.
1700
1701 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1702
1703         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1704         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1705         Make non-static.  Change return type to char *.  Adjust code
1706         accordingly.  Rewrite the function's documentation.
1707         (read_atcb): Adjust call to get_tcb_types_info accordingly.
1708         * ravenscar-thread.c (ravenscar_inferior_created): Check that
1709         we have enough debugging information in the runtime to support
1710         Ada task debugging before we enable the ravenscar-thread layer.
1711
1712 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1713
1714         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1715         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1716         * ravenscar-thread.c: Add into comment.
1717         (base_magic_null_ptid): Delete.
1718         (base_ptid): Change documentation.
1719         (ravenscar_active_task): Renames ravenscar_running_thread.
1720         All callers updated throughout.
1721         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1722         (ravenscar_task_is_currently_active): Likewise.
1723         (get_base_thread_from_ravenscar_task): Ditto.
1724         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1725         (ravenscar_runtime_initialized): Likewise.
1726         (get_running_thread_id): Add new parameter "cpu".  Adjust
1727         implementation to handle this new parameter.
1728         (ravenscar_fetch_registers): Small adjustment to use
1729         is_ravenscar_task and ravenscar_task_is_currently_active in
1730         order to decide whether to use the target beneath or this
1731         module's arch_ops.
1732         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1733         (ravenscar_stopped_by_sw_breakpoint): Use
1734         get_base_thread_from_ravenscar_task to get the underlying
1735         thread, rather than using base_ptid.
1736         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1737         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1738         Likewise.
1739         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1740
1741 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1742
1743         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1744         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1745         (get_tcb_types_info): Set fieldnos.base_cpu.
1746         (read_atcb): Set task_info->base_cpu.
1747         (info_task): Print "Base CPU" info if set by runtime.
1748
1749 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
1750
1751         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1752         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1753         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1754         New functions.
1755         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1756         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1757         to_stopped_data_address and to_core_of_thread fields of
1758         ravenscar_ops.
1759
1760 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
1761
1762         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1763         (struct gdbarch_tdep): New member long_double_abi.
1764         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1765         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1766         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1767         format depending on long_double_abi tdep member.
1768         (ppc_floatformat_for_type): Handle __ibm128 type.
1769
1770 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
1771
1772         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1773
1774 2017-11-21  Pedro Alves  <palves@redhat.com>
1775
1776         * dwarf2read.c (mapped_index::find_name_components_bounds)
1777         <completion mode, upper bound>: Use std::lower_bound instead of
1778         std::upper_bound.
1779         (test_mapped_index_find_name_component_bounds): Remove incorrect
1780         "t1_fund" from expected symbols.
1781
1782 2017-11-21  Pedro Alves  <palves@redhat.com>
1783
1784         * dwarf2read.c (mapped_index::name_components_casing): New field.
1785         (mapped_index) <build_name_components,
1786         find_name_components_bounds): Declare new methods.
1787         (mapped_index::find_name_components_bounds)
1788         (mapped_index::build_name_components): New methods, factored out
1789         from dw2_expand_symtabs_matching_symbol.
1790         (check_find_bounds_finds)
1791         (test_mapped_index_find_name_component_bounds): New.
1792         (run_test): Rename to ...
1793         (test_dw2_expand_symtabs_matching_symbol): ... this.
1794         (run_test): Reimplement.
1795
1796 2017-11-21  Pedro Alves  <palves@redhat.com>
1797
1798         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1799         (symbol_end): Use cp_ident_is_alnum.
1800         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1801         * dwarf2read.c (make_sort_after_prefix_name): New function.
1802         (dw2_expand_symtabs_matching_symbol): Use it.
1803         (test_symbols): Add more symbols.
1804         (run_test): Add tests.
1805
1806 2017-11-17  Tom Tromey  <tom@tromey.com>
1807
1808         * symtab.h (enum symbol_subclass_kind): New.
1809         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1810         Remove.
1811         <subclass>: New member.
1812         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1813         * rust-lang.c (rust_get_trait_object_pointer): Update.
1814         * dwarf2read.c (read_func_scope): Update.
1815         (read_variable): Update.
1816
1817 2017-11-17  Tom Tromey  <tom@tromey.com>
1818
1819         * dwarf2read.c (read_func_scope): Update.
1820         * symtab.h (struct template_symbol): Derive from symbol.
1821         <base>: Remove.
1822
1823 2017-11-17  Tom Tromey  <tom@tromey.com>
1824
1825         * symtab.h (struct symbol) <is_rust_vtable>: New member.
1826         (struct rust_vtable_symbol): New.
1827         (find_symbol_at_address): Declare.
1828         * symtab.c (find_symbol_at_address): New function.
1829         * symfile.h (struct quick_symbol_functions)
1830         <find_compunit_symtab_by_address>: New member.
1831         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1832         function.
1833         (debug_sym_quick_functions): Link to
1834         debug_qf_find_compunit_symtab_by_address.
1835         * rust-lang.c (rust_get_trait_object_pointer): New function.
1836         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
1837         rust_get_trait_object_pointer.
1838         * psymtab.c (psym_relocate): Clear psymbol_map.
1839         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1840         functions.
1841         (psym_functions): Link to psym_find_compunit_symtab_by_address.
1842         * objfiles.h (struct objfile) <psymbol_map>: New member.
1843         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1844         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
1845         (rust_containing_type, read_variable): New functions.
1846
1847 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1848
1849         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1850
1851 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1852
1853         * common/filestuff.c: Include <algorithm>.
1854         (open_fds): Change type to std::vector<int>.
1855         (do_mark_open_fd): Adjust.
1856         (unmark_fd_no_cloexec): Adjust.
1857         (do_close): Adjust.
1858
1859 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1860
1861         * breakpoint.c (output_thread_groups): Take an std::vector.
1862         (print_one_breakpoint_location): Adjust.
1863
1864 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
1865
1866         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1867         (ada_evaluate_subexp_for_cast): New function.
1868         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1869         ada_evaluate_subexp_for_cast.
1870         (ada_evaluate_subexp) <nosideret>: Replace code by call to
1871         eval_skip_value.
1872         * eval.c (evaluate_var_value): Make non-static.
1873         (evaluate_var_msym_value, eval_skip_value): Likewise.
1874         * value.h (evaluate_var_value, evaluate_var_msym_value)
1875         (eval_skip_value): Declare.
1876
1877 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
1878
1879         * ada-lang.c (ada_value_cast): Remove parameter "noside".
1880         Update all callers.
1881
1882 2017-11-16  Pedro Alves  <palves@redhat.com>
1883
1884         * python/py-unwind.c (pyuw_sniffer): Translate
1885         PyExc_KeyboardInterrupt to a GDB Quit exception.
1886
1887 2017-11-16  Pedro Alves  <palves@redhat.com>
1888
1889         * infrun.c (resume_cleanups): Delete.
1890         (resume): No longer install a resume_cleanups cleanup nor call
1891         QUIT.
1892         (proceed): Pass the terminal to the inferior.
1893         (keep_going_pass_signal): No longer install a resume_cleanups
1894         cleanup.
1895
1896 2017-11-16  Pedro Alves  <palves@redhat.com>
1897
1898         * inf-loop.c (inferior_event_handler): Don't swallow the exception
1899         if the prompt is blocked.
1900
1901 2017-11-16  Pedro Alves  <palves@redhat.com>
1902
1903         * breakpoint.c (insert_bp_location): Replace bp_err and
1904         bp_err_message locals by a gdb_exception local.
1905
1906 2017-11-16  Pedro Alves  <palves@redhat.com>
1907
1908         * inflow.c (scoped_ignore_sigttou): New class.
1909         (child_terminal_ours_1, new_tty): Use it.
1910
1911 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
1912
1913         * target-float.c (decimal_from_number): Add byte_order argument and
1914         call match_endianness.  Error if unknown floating-point type.
1915         (decimal_to_number): Add byte_order argument and call match_endianness.
1916         (decimal_from_longest): Update call.  Do not call match_endianness.
1917         (decimal_from_ulongest): Likewise.
1918         (decimal_binop): Likewise.
1919         (decimal_is_zero): Likewise.
1920         (decimal_compare): Likewise.
1921         (decimal_convert): Likewise.
1922
1923 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
1924
1925         * python/python.c (gdbpy_rbreak): New function.
1926         * NEWS: Document Python rbreak feature.
1927
1928 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1929
1930         * features/tic6x-c62x.xml: Remove.
1931         * features/tic6x-c64x.xml: Remove.
1932         * features/tic6x-c64xp.xml: Remove.
1933
1934 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1935
1936         * symtab.h: Include <array>.
1937
1938 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
1939
1940         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1941         (bsd_kvm_proc_cmd): Likewise.
1942
1943 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
1944
1945         * tui/tui-win.c (window_name_completer): Replace VEC with
1946         std::vector.
1947
1948 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1949
1950         * MAINTAINERS: Remove no-longer applicable entries.
1951
1952 2017-11-15  Andrew Cagney  <cagney@gnu.org>
1953
1954         * MAINTAINERS: Move self to Past Maintainers.
1955
1956 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1957
1958         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1959         * features/nios2-linux.c: Remove.
1960         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1961         initialize_tdesc_nios2_linux.
1962
1963 2017-11-15  Yao Qi  <yao.qi@linaro.org>
1964
1965         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1966         M68HC11_LAST_HARD_REG + 1.
1967
1968 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
1969
1970         PR gdb/22388
1971         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1972         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1973         Return TARGET_XFER_EOF if size of returned data is 0.
1974
1975 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
1976
1977         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1978         memory-map-selftests.c.
1979         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1980         * memory-map.c (memory_map_start_memory): Fix computation of hi
1981         address.
1982         * unittests/memory-map-selftests.c: New file.
1983
1984 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
1985
1986         * ada-lang.c: Fix some typos in the general command documenting
1987         how Ada expressions are being evaluated and how their result
1988         is printed.
1989
1990 2017-11-09  Tom Tromey  <tom@tromey.com>
1991
1992         * psymtab.c (psymbol_hash): Do not hash string contents.
1993         (psymbol_compare): Add comment.
1994
1995 2017-11-09  Tom Tromey  <tom@tromey.com>
1996
1997         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1998
1999 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
2000
2001         * ada-exp.y (write_var_from_sym): Remove parameter
2002         "orig_left_context".  Update all callers.
2003
2004 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
2005
2006         * tracepoint.h (class collection_list) <stringify>: Return
2007         std::vector<std::string>.
2008         (encode_actions_rsp): Change parameters to
2009         std::vector<std::string> *.
2010         * tracepoint.c (collection_list::stringify): Return
2011         std::vector<std::string> and adjust accordingly.
2012         (encode_actions_rsp): Changee parameters to
2013         std::vector<std::string> and adjust accordingly.
2014         * remote.c (free_actions_list),
2015         free_actions_list_cleanup_wrapper): Remove.
2016         (remote_download_tracepoint): Adjust to std::vector.
2017
2018 2017-11-08  Tom Tromey  <tom@tromey.com>
2019
2020         * dwarf2read.c (symbolp): Remove typedef.
2021         (read_func_scope): Use std::vector.
2022         (process_structure_scope): Use std::vector.
2023
2024 2017-11-08  Pedro Alves  <palves@redhat.com>
2025
2026         * ada-lang.c (ada_make_symbol_completion_list): Use
2027         completion_skip_symbol.
2028         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2029         (symbol_is_function_or_method(symbol*)): New.
2030         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
2031         completion_skip_symbol.
2032         (default_collect_symbol_completion_matches_break_on): Use
2033         completion_skip_symbol.  Pass down mode.
2034         (collect_file_symbol_completion_matches): Pass down mode.
2035         * symtab.h (symbol_is_function_or_method): New declarations.
2036         (completion_skip_symbol): New template function.
2037
2038 2017-11-08  Pedro Alves  <palves@redhat.com>
2039
2040         * linespec.c (iterate_over_all_matching_symtabs): Add
2041         search_domain parameter.  Pass it down to expand_symtabs_matching.
2042         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2043         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2044         search_domain.
2045         (add_all_symbol_names_from_pspace): Add search_domain parameter.
2046         Pass it down.
2047         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2048         symbols.
2049         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
2050         it down.
2051
2052 2017-11-08  Pedro Alves  <palves@redhat.com>
2053
2054         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2055         text_len locals and don't pass them down.
2056         * symtab.c (completion_list_add_name): Remove
2057         sym_text/sym_text_len parameters and adjust.
2058         (completion_list_add_symbol, completion_list_add_msymbol)
2059         (completion_list_objc_symbol, completion_list_add_fields)
2060         (add_symtab_completions): Likewise.
2061         (default_collect_symbol_completion_matches_break_on)
2062         (collect_file_symbol_completion_matches): Remove sym_text_len
2063         local and don't pass it down.
2064         * symtab.h (completion_list_add_name): Remove
2065         sym_text/sym_text_len parameters.
2066
2067 2017-11-08  Pedro Alves  <palves@redhat.com>
2068
2069         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2070         unittests/lookup_name_info-selftests.c.
2071         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2072         * cp-support.c: Include "selftest.h".
2073         (cp_remove_params_1): Rename from cp_remove_params.  Add
2074         'require_param' parameter, and handle it.
2075         (cp_remove_params): Reimplement.
2076         (cp_remove_params_if_any): New.
2077         (selftests::quote): New.
2078         (selftests::check_remove_params): New.
2079         (selftests::test_cp_remove_params): New.
2080         (_initialize_cp_support): Install
2081         selftests::test_cp_remove_params.
2082         * cp-support.h (cp_remove_params_if_any): Declare.
2083         * dwarf2read.c :Include "selftest.h".
2084         (dw2_expand_symtabs_matching_symbol): Use
2085         lookup_name_info::make_ignore_params.
2086         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2087         (selftests::dw2_expand_symtabs_matching::string_or_null)
2088         (selftests::dw2_expand_symtabs_matching::check_match)
2089         (selftests::dw2_expand_symtabs_matching::test_symbols)
2090         (selftests::dw2_expand_symtabs_matching::run_test): New.
2091         (_initialize_dwarf2_read): Register
2092         selftests::dw2_expand_symtabs_matching::run_test.
2093         * psymtab.c (psym_expand_symtabs_matching): Use
2094         lookup_name_info::make_ignore_params.
2095         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2096         If the lookup name wants to ignore parameters, strip them.
2097         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2098         code handling '('.
2099         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2100         (default_collect_symbol_completion_matches_break_on): Don't try to
2101         strip parameters.
2102         * symtab.h (lookup_name_info::lookup_name_info): Add
2103         'ignore_parameters' parameter.
2104         (lookup_name_info::ignore_parameters)
2105         (lookup_name_info::make_ignore_params): New methods.
2106         (lookup_name_info::m_ignore_parameters): New field.
2107         * unittests/lookup_name_info-selftests.c: New file.
2108
2109 2017-11-08  Pedro Alves  <palves@redhat.com>
2110
2111         * dwarf2read.c (dw2_expand_marked_cus)
2112         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2113         (dw2_expand_symtabs_matching): Move further below.
2114         (dw2_expand_marked_cus): Reindent.
2115
2116 2017-11-08  Pedro Alves  <palves@redhat.com>
2117
2118         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2119         (struct name_component): New.
2120         (mapped_index::name_components): New field.
2121         (mapped_index::symbol_name_at): New method.
2122         (dwarf2_read_index): Call mapped_index ctor.
2123         (dw2_map_matching_symbols): Add comment about name_components
2124         table.
2125         (dw2_expand_symtabs_matching): Factor part to...
2126         (dw2_expand_symtabs_matching_symbol): ... this new function.
2127         Build name components table, and lookup symbols in it before
2128         calling the name matcher.
2129         (dw2_expand_marked_cus): New, factored out from
2130         dw2_expand_symtabs_matching.
2131         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2132
2133 2017-11-08   Pedro Alves  <palves@redhat.com>
2134
2135         * ada-lang.c (ada_encode): Rename to ..
2136         (ada_encode_1): ... this.  Add throw_errors parameter and handle
2137         it.
2138         (ada_encode): Reimplement.
2139         (match_name): Delete, folded into full_name.
2140         (resolve_subexp): No longer pass the encoded name to
2141         ada_lookup_symbol_list.
2142         (should_use_wild_match): Delete.
2143         (name_match_type_from_name): New.
2144         (ada_lookup_simple_minsym): Use lookup_name_info and the
2145         language's symbol_name_matcher_ftype.
2146         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2147         (ada_add_block_renamings): Adjust to use lookup_name_info.
2148         (ada_lookup_name): New.
2149         (add_nonlocal_symbols, ada_add_all_symbols)
2150         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2151         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2152         (ada_name_for_lookup): Delete.
2153         (ada_lookup_encoded_symbol): Construct a verbatim name.
2154         (wild_match): Reverse sense of return type.  Use bool.
2155         (full_match): Reverse sense of return type.  Inline bits of old
2156         match_name here.
2157         (ada_add_block_symbols): Adjust to use lookup_name_info.
2158         (symbol_completion_match): Delete, folded into...
2159         (ada_lookup_name_info::matches): ... .this new method.
2160         (symbol_completion_add): Delete.
2161         (ada_collect_symbol_completion_matches): Add name_match_type
2162         parameter.  Adjust to use lookup_name_info and
2163         completion_list_add_name.
2164         (get_var_value, ada_add_global_exceptions): Adjust to use
2165         lookup_name_info.
2166         (ada_get_symbol_name_cmp): Delete.
2167         (do_wild_match, do_full_match): New functions.
2168         (ada_lookup_name_info::ada_lookup_name_info): New method.
2169         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2170         functions.
2171         (ada_language_defn): Install ada_get_symbol_name_matcher.
2172         * ada-lex.l (processId): If name starts with '<', copy it
2173         verbatim.
2174         * block.c (block_iter_match_step, block_iter_match_first)
2175         (block_iter_match_next, block_lookup_symbol)
2176         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2177         lookup_name_info.
2178         * block.h (block_iter_match_first, block_iter_match_next)
2179         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2180         * c-lang.c (c_language_defn, cplus_language_defn)
2181         (asm_language_defn, minimal_language_defn): Adjust comments to
2182         refer to la_get_symbol_name_matcher.
2183         * completer.c (complete_files_symbols)
2184         (collect_explicit_location_matches, symbol_completer): Pass a
2185         symbol_name_match_type down.
2186         * completer.h (class completion_match, completion_match_result):
2187         New classes.
2188         (completion_tracker::reset_completion_match_result): New method.
2189         (completion_tracker::m_completion_match_result): New field.
2190         * cp-support.c (make_symbol_overload_list_block): Adjust to use
2191         lookup_name_info.
2192         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2193         functions.
2194         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2195         * d-lang.c: Adjust comments to refer to
2196         la_get_symbol_name_matcher.
2197         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2198         Adjust to use lookup_name_info.
2199         (dict_iter_match_first, dict_iter_match_next)
2200         (iter_match_first_hashed, iter_match_next_hashed)
2201         (iter_match_first_linear, iter_match_next_linear): Adjust to work
2202         with a lookup_name_info.
2203         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2204         Likewise.
2205         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2206         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2207         (gdb_index_symbol_name_matcher): New class.
2208         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2209         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
2210         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2211         with a symbol_name_match_type.
2212         (f_language_defn): Adjust comments to refer to
2213         la_get_symbol_name_matcher.
2214         * go-lang.c (go_language_defn): Adjust comments to refer to
2215         la_get_symbol_name_matcher.
2216         * language.c (default_symbol_name_matcher)
2217         (language_get_symbol_name_matcher): New functions.
2218         (unknown_language_defn, auto_language_defn): Adjust comments to
2219         refer to la_get_symbol_name_matcher.
2220         * language.h (symbol_name_cmp_ftype): Delete.
2221         (language_defn) <la_collect_symbol_completion_matches>: Add match
2222         type parameter.
2223         <la_get_symbol_name_cmp>: Delete field.
2224         <la_get_symbol_name_matcher>: New field.
2225         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2226         (default_symbol_name_matcher, language_get_symbol_name_matcher):
2227         Declare.
2228         * linespec.c (iterate_over_all_matching_symtabs)
2229         (iterate_over_file_blocks): Adjust to use lookup_name_info.
2230         (find_methods): Add language parameter, and use lookup_name_info
2231         and the language's symbol_name_matcher_ftype.
2232         (linespec_complete_function): Adjust.
2233         (lookup_prefix_sym): Use lookup_name_info.
2234         (add_all_symbol_names_from_pspace): Adjust.
2235         (find_superclass_methods): Add language parameter and pass it
2236         down.
2237         (find_method): Pass symbol language down.
2238         (find_linespec_symbols): Don't demangle or Ada encode here.
2239         (search_minsyms_for_name): Add lookup_name_info parameter.
2240         (add_matching_symbols_to_info): Add name_match_type parameter.
2241         Use lookup_name_info.
2242         * m2-lang.c (m2_language_defn): Adjust comments to refer to
2243         la_get_symbol_name_matcher.
2244         * minsyms.c: Include <algorithm>.
2245         (add_minsym_to_demangled_hash_table): Remove table parameter and
2246         add objfile parameter.  Use search_name_hash, and add language to
2247         demangled languages vector.
2248         (struct found_minimal_symbols): New struct.
2249         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2250         New functions.
2251         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
2252         input names here.  Use lookup_name_info instead.  Lookup up
2253         demangled names once for each language in the demangled names
2254         vector.
2255         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
2256         demangled names once for each language in the demangled names
2257         vector.
2258         (build_minimal_symbol_hash_tables): Adjust.
2259         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2260         lookup_name_info.
2261         * objc-lang.c (objc_language_defn): Adjust comment to refer to
2262         la_get_symbol_name_matcher.
2263         * objfiles.h: Include <vector>.
2264         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2265         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2266         la_get_symbol_name_matcher.
2267         * p-lang.c (pascal_language_defn): Adjust comment to refer to
2268         la_get_symbol_name_matcher.
2269         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2270         (match_partial_symbol): Use symbol_name_match_type,
2271         lookup_name_info and psymbol_name_matches.
2272         (lookup_partial_symbol): Use lookup_name_info.
2273         (map_block): Use symbol_name_match_type and lookup_name_info.
2274         (psym_map_matching_symbols): Use symbol_name_match_type.
2275         (psymbol_name_matches): New.
2276         (recursively_search_psymtabs): Use lookup_name_info and
2277         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
2278         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
2279         'kind' parameter to 'domain'.
2280         * rust-lang.c (rust_language_defn): Adjust comment to refer to
2281         la_get_symbol_name_matcher.
2282         * symfile-debug.c (debug_qf_map_matching_symbols)
2283         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2284         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2285         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2286         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2287         Adjust to use symbol_name_match_type.
2288         <expand_symtabs_matching>: Adjust to use lookup_name_info.
2289         (expand_symtabs_matching): Adjust to use lookup_name_info.
2290         * symmisc.c (maintenance_expand_symtabs): Use
2291         lookup_name_info::match_any ().
2292         * symtab.c (symbol_matches_search_name): New.
2293         (eq_symbol_entry): Adjust to use lookup_name_info and the
2294         language's matcher.
2295         (demangle_for_lookup_info::demangle_for_lookup_info): New.
2296         (lookup_name_info::match_any): New.
2297         (iterate_over_symbols, search_symbols): Use lookup_name_info.
2298         (compare_symbol_name): Add language, lookup_name_info and
2299         completion_match_result parameters, and use them.
2300         (completion_list_add_name): Make extern.  Add language and
2301         lookup_name_info parameters.  Use them.
2302         (completion_list_add_symbol, completion_list_add_msymbol)
2303         (completion_list_objc_symbol): Add lookup_name_info parameters and
2304         adjust.  Pass down language.
2305         (completion_list_add_fields): Add lookup_name_info parameters and
2306         adjust.  Pass down language.
2307         (add_symtab_completions): Add lookup_name_info parameters and
2308         adjust.
2309         (default_collect_symbol_completion_matches_break_on): Add
2310         name_match_type parameter, and use it.  Use lookup_name_info.
2311         (default_collect_symbol_completion_matches)
2312         (collect_symbol_completion_matches): Add name_match_type
2313         parameter, and pass it down.
2314         (collect_symbol_completion_matches_type): Adjust.
2315         (collect_file_symbol_completion_matches): Add name_match_type
2316         parameter, and use lookup_name_info.
2317         * symtab.h: Include <string> and "common/gdb_optional.h".
2318         (enum class symbol_name_match_type): New.
2319         (class ada_lookup_name_info): New.
2320         (struct demangle_for_lookup_info): New.
2321         (class lookup_name_info): New.
2322         (symbol_name_matcher_ftype): New.
2323         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2324         (symbol_matches_search_name): Declare.
2325         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2326         (default_collect_symbol_completion_matches)
2327         (collect_symbol_completion_matches)
2328         (collect_file_symbol_completion_matches): Add name_match_type
2329         parameter.
2330         (iterate_over_symbols): Use lookup_name_info.
2331         (completion_list_add_name): Declare.
2332         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2333         (strncmp_iw_with_mode): Now extern.
2334         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2335         (strncmp_iw_with_mode): Declare.
2336
2337 2017-11-08  Keith Seitz  <keiths@redhat.com>
2338             Pedro Alves  <palves@redhat.com>
2339
2340         * ada-lang.c (ada_language_defn): Install
2341         default_search_name_hash.
2342         * buildsym.c (struct buildsym_compunit): <language>: New field.
2343         (finish_block_internal): Pass language when creating dictionaries.
2344         (start_buildsym_compunit, start_symtab): New language parameters.
2345         Use them.
2346         (restart_symtab): Pass down compilation unit's language.
2347         * buildsym.h (enum language): Forward declare.
2348         (start_symtab): New 'language' parameter.
2349         * c-lang.c (c_language_defn, cplus_language_defn)
2350         (asm_language_defn, minimal_language_defn): Install
2351         default_search_name_hash.
2352         * coffread.c (coff_start_symtab): Adjust.
2353         * d-lang.c (d_language_defn): Install default_search_name_hash.
2354         * dbxread.c (struct symloc): Add 'pst_language' field.
2355         (PST_LANGUAGE): Define.
2356         (start_psymtab, read_ofile_symtab): Use it.
2357         (process_one_symbol): New 'language' parameter.  Pass it down.
2358         * dictionary.c (struct dictionary) <language>: New field.
2359         (DICT_LANGUAGE): Define.
2360         (dict_create_hashed, dict_create_hashed_expandable)
2361         (dict_create_linear, dict_create_linear_expandable): New parameter
2362         'language'.  Set the dictionary's language.
2363         (iter_match_first_hashed): Adjust to rename.
2364         (insert_symbol_hashed): Assert we don't see mismatching
2365         languages.  Adjust to rename.
2366         (dict_hash): Rename to ...
2367         (default_search_name_hash): ... this and make extern.
2368         * dictionary.h (struct language_defn): Forward declare.
2369         (dict_create_hashed): New parameter 'language'.
2370         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2371         * f-lang.c (f_language_defn): Install default_search_name_hash.
2372         * go-lang.c (go_language_defn): Install default_search_name_hash.
2373         * jit.c (finalize_symtab): Pass compunit's language to dictionary
2374         creation.
2375         * language.c (unknown_language_defn, auto_language_defn):
2376         * language.h (language_defn::la_search_name_hash): New field.
2377         (default_search_name_hash): Declare.
2378         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2379         * mdebugread.c (new_block): New parameter 'language'.
2380         * mdebugread.c (parse_symbol): Pass symbol language to block
2381         allocation.
2382         (psymtab_to_symtab_1): Pass down language.
2383         (new_symtab): Pass compunit's language to block allocation.
2384         * objc-lang.c (objc_language_defn): Install
2385         default_search_name_hash.
2386         * opencl-lang.c (opencl_language_defn):
2387         * p-lang.c (pascal_language_defn): Install
2388         default_search_name_hash.
2389         * rust-lang.c (rust_language_defn): Install
2390         default_search_name_hash.
2391         * stabsread.h (enum language): Forward declare.
2392         (process_one_symbol): Add 'language' parameter.
2393         * symtab.c (search_name_hash): New function.
2394         * symtab.h (search_name_hash): Declare.
2395         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2396
2397 2017-11-08  Pedro Alves  <palves@redhat.com>
2398
2399         * cp-name-parser.y (main): Don't initialize extra_chars.
2400
2401 2017-11-07  Tom Tromey  <tom@tromey.com>
2402
2403         * event-top.h (command_handler): Constify.
2404         * record-full.c (cmd_record_full_start): Update.
2405         * thread.c (thread_apply_all_command): Update.
2406         * printcmd.c (eval_command): Update.
2407         * mi/mi-main.c (mi_execute_cli_command): Update.
2408         (mi_execute_async_cli_command): Update.
2409         * tui/tui-stack.c (tui_update_command): Update.
2410         * cli/cli-interp.c (safe_execute_command): Constify.
2411         * record.c (record_start): Update.
2412         (record_start, record_stop, cmd_record_start): Update.
2413         * record-btrace.c (cmd_record_btrace_bts_start): Update.
2414         (cmd_record_btrace_pt_start): Update.
2415         (cmd_record_btrace_start): Update.
2416         (cmd_record_btrace_start): Update.
2417         * reverse.c (exec_reverse_once): Update.
2418         * python/python.c (execute_gdb_command): Don't copy the command.
2419         * event-top.c (command_line_handler): Update.
2420         (command_handler): Constify.
2421         * defs.h (deprecated_call_command_hook): Constify.
2422         * cli/cli-script.h (execute_user_command): Constify.
2423         * cli/cli-script.c (execute_user_command): Constify.
2424         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2425         (enum command_control_type): Update.
2426         * main.c (catch_command_errors): Remove non-const overload.
2427         (catch_command_errors_ftype): Remove.
2428         * python/py-cmd.c (cmdpy_function): Constify.
2429         * guile/scm-cmd.c (cmdscm_function): Constify.
2430         * cli/cli-dump.c (call_dump_func): Constify.
2431         * cli/cli-decode.c (do_const_cfunc): Constify.
2432         (do_sfunc): Constify.
2433         (cmd_func): Constify.
2434         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2435         * top.h (execute_command): Constify.
2436         * top.c (execute_command): Constify.
2437         (execute_command_to_string): Constify.
2438         (deprecated_call_command_hook): Constify.
2439         * command.h (cmd_func): Constify.
2440         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2441
2442 2017-11-07  Tom Tromey  <tom@tromey.com>
2443
2444         * ada-lang.c (catch_ada_exception_command): Constify.
2445         (catch_assert_command): Constify.
2446         * break-catch-throw.c (catch_catch_command, catch_throw_command)
2447         (catch_rethrow_command): Constify.
2448         (catch_exception_command_1): Constify.
2449         * breakpoint.h (add_catch_command): Constify.
2450         * break-catch-syscall.c (catch_syscall_command_1): Constify.
2451         (catch_syscall_split_args): Constify.
2452         * break-catch-sig.c (catch_signal_command): Constify.
2453         (catch_signal_split_args): Constify.
2454         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2455         cmd_const_sfunc_ftype.
2456         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2457         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2458         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2459         (add_setshow_string_cmd, struct cmd_list_element)
2460         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2461         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2462         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2463         Constify.
2464         (set_cmd_sfunc): Constify.
2465         (empty_sfunc): Constify.
2466         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2467         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2468         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2469         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2470         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2471         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2472         Constify.
2473         (set_cmd_sfunc): Constify.
2474         (cmd_sfunc_ftype): Remove.
2475         * compile/compile.c (set_compile_args): Constify.
2476         * infrun.c (set_disable_randomization): Constify.
2477         * infcmd.c (set_args_command, set_cwd_command): Constify.
2478         * breakpoint.c (set_condition_evaluation_mode): Constify.
2479         (add_catch_command): Constify.
2480         (catch_fork_command_1, catch_exec_command_1)
2481         (catch_load_command_1, catch_unload_command_1): Constify.
2482         (catch_load_or_unload): Constify.
2483         * guile/scm-param.c (pascm_set_func): Constify.
2484         (add_setshow_generic): Constify.
2485         * python/py-param.c (get_set_value): Constify.
2486         * top.h (set_verbose): Constify.
2487         * tui/tui-win.c (tui_set_var_cmd): Constify.
2488         * mi/mi-main.c (set_mi_async_command): Constify.
2489         * cli/cli-logging.c (set_logging_overwrite)
2490         (set_logging_redirect): Constify.
2491         * value.c (set_max_value_size): Constify.
2492         * valprint.c (set_input_radix, set_output_radix): Constify.
2493         * utils.c (set_width_command, set_height_command): Constify.
2494         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2495         * tracepoint.c (set_disconnected_tracing)
2496         (set_circular_trace_buffer, set_trace_buffer_size)
2497         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2498         * top.c (set_history_size_command, set_verbose, set_editing)
2499         (set_gdb_datadir, set_history_filename): Constify.
2500         * target.c (set_targetdebug, maint_set_target_async_command)
2501         (maint_set_target_non_stop_command, set_target_permissions)
2502         (set_write_memory_permission): Constify.
2503         (open_target): Constify.
2504         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2505         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2506         * symtab.c (set_symbol_cache_size_handler): Constify.
2507         * symfile.c (set_ext_lang_command): Constify.
2508         * symfile-debug.c (set_debug_symfile): Constify.
2509         * source.c (set_directories_command): Constify.
2510         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2511         * serial.c (set_parity): Constify.
2512         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2513         * remote.c (set_remote_exec_file, set_remotebreak)
2514         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2515         * record.c (set_record_insn_history_size)
2516         (set_record_call_history_size): Constify.
2517         * record-full.c (set_record_full_insn_max_num): Constify.
2518         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2519         * osabi.c (set_osabi): Constify.
2520         * mips-tdep.c (set_mips64_transfers_32bit_regs)
2521         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2522         * maint.c (maintenance_set_profile_cmd): Constify.
2523         * linux-thread-db.c (set_libthread_db_search_path): Constify.
2524         * language.c (set_language_command, set_range_command)
2525         (set_case_command): Constify.
2526         * infrun.c (set_non_stop, set_observer_mode)
2527         (set_stop_on_solib_events, set_schedlock_func)
2528         (set_exec_direction_func): Constify.
2529         * infcmd.c (set_inferior_tty_command): Constify.
2530         * disasm.c (set_disassembler_options_sfunc): Constify.
2531         * demangle.c (set_demangling_command): Constify.
2532         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2533         * cris-tdep.c (set_cris_version, set_cris_mode)
2534         (set_cris_dwarf2_cfi): Constify.
2535         * corefile.c (set_gnutarget_command): Constify.
2536         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2537         (set_target_wide_charset_sfunc): Constify.
2538         * breakpoint.c (update_dprintf_commands): Constify.
2539         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2540         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2541         (set_disassembly_style_sfunc): Constify.
2542         * arch-utils.c (set_endian, set_architecture): Constify.
2543         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2544         * agent.c (set_can_use_agent): Constify.
2545
2546 2017-11-07  Tom Tromey  <tom@tromey.com>
2547
2548         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2549         (go32_pde, go32_pte, go32_pte_for_address): Constify.
2550         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2551         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2552         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2553         (parse_int_arg, show_thread_default_detach_sc_cmd)
2554         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2555         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2556         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2557         (show_task_pause_cmd, set_task_detach_sc_cmd)
2558         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2559         (set_noninvasive_cmd, set_thread_pause_cmd)
2560         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2561         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2562         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2563         * windows-nat.c (display_selectors): Constify.
2564         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2565         non-const "cfunc".
2566         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2567         (cmd_cfunc_eq): Likewise.
2568         (struct cmd_list_element): Likewise.
2569         (do_cfunc): Remove.
2570         (cli_user_command_p): Update.
2571         * command.h (add_cmd): Remove non-const overload.
2572         (cmd_cfunc_ftype): Remove typedef.
2573         (cmd_cfunc_eq): Remove non-const overload.
2574         * value.c (show_values): Constify.
2575         * thread.c (thread_apply_all_command): Constify.
2576         * symfile.c (load_command): Constify.
2577         * source.c (directory_command): Constify.
2578         * maint.c (maintenance_internal_error)
2579         (maintenance_demangler_warning, maintenance_space_display)
2580         (maintenance_print_architecture, maintenance_translate_address)
2581         (maintenance_info_selftests, maintenance_internal_warning):
2582         Constify.
2583         * breakpoint.c (disable_trace_command, enable_trace_command):
2584         Constify.
2585         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2586         Constify.
2587         (add_auto_load_safe_path): Constify.
2588         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2589         * top.h (show_commands): Constify.
2590         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2591         * sparc64-tdep.c (adi_examine_command): Constify.
2592         (adi_assign_command): Constify.
2593
2594 2017-11-07  Tom Tromey  <tom@tromey.com>
2595
2596         * frame.h (info_locals_command, info_args_command): Constify.
2597         * auto-load.h (auto_load_info_scripts): Constify.
2598         * inferior.h (registers_info): Constify.
2599         * copying.c: Rebuild.
2600         * copying.awk: Constify generated commands.
2601         * auto-load.c (auto_load_info_scripts)
2602         (info_auto_load_gdb_scripts): Constify.
2603         * cli/cli-decode.c (struct cmd_list_element): Take a
2604         cmd_const_cfunc_ftype.
2605         * command.h (add_info): Take a cmd_const_cfunc_ftype.
2606         * tui/tui-win.c (tui_all_windows_info): Constify.
2607         * python/py-auto-load.c (info_auto_load_python_scripts):
2608         Constify.
2609         * cli/cli-cmds.c (show_command): Remove non-const overload.
2610         * tracepoint.c (info_tvariables_command, info_scope_command):
2611         Constify.
2612         (info_static_tracepoint_markers_command): Constify.
2613         * thread.c (info_threads_command): Constify.
2614         (print_thread_info_1): Constify.
2615         * target.c (info_target_command): Constify.
2616         * symtab.c (info_sources_command, info_functions_command)
2617         (info_types_command): Constify.
2618         (info_variables_command): Remove non-const overload.
2619         * symfile.c (info_ext_lang_command): Constify.
2620         * stack.c (info_frame_command, info_locals_command)
2621         (info_args_command): Constify.
2622         (backtrace_command): Remove non-const overload.
2623         * source.c (info_source_command, info_line_command): Constify.
2624         * solib.c (info_sharedlibrary_command): Constify.
2625         * skip.c (info_skip_command): Constify.
2626         * ser-go32.c (info_serial_command): Constify.
2627         * reverse.c (info_bookmarks_command): Constify.
2628         * printcmd.c (info_symbol_command, info_address_command)
2629         (info_display_command): Constify.
2630         * osdata.c (info_osdata_command): Constify.
2631         * objc-lang.c (info_selectors_command, info_classes_command):
2632         Constify.
2633         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2634         * memattr.c (info_mem_command): Constify.
2635         * macrocmd.c (info_macro_command, info_macros_command): Constify.
2636         * linux-fork.c (info_checkpoints_command): Constify.
2637         * infrun.c (info_signals_command): Constify.
2638         * inflow.c (info_terminal_command): Constify.
2639         * inferior.c (info_inferiors_command): Constify.
2640         (print_inferior): Constify.
2641         * infcmd.c (info_program_command, info_all_registers_command)
2642         (info_registers_command, info_vector_command)
2643         (info_float_command): Constify.
2644         (registers_info): Constify.
2645         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2646         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2647         Constify.
2648         * f-valprint.c (info_common_command): Constify.
2649         * dcache.c (info_dcache_command): Constify.
2650         (dcache_info_1): Constify.
2651         * darwin-nat-info.c (info_mach_tasks_command)
2652         (info_mach_task_command, info_mach_ports_command)
2653         (info_mach_port_command, info_mach_threads_command)
2654         (info_mach_thread_command, info_mach_regions_command)
2655         (info_mach_regions_recurse_command, info_mach_region_command)
2656         (info_mach_exceptions_command): Constify.
2657         (get_task_from_args): Constify.
2658         * cp-support.c (info_vtbl_command): Constify.
2659         * breakpoint.c (info_watchpoints_command)
2660         (info_tracepoints_command): Constify.
2661         (info_breakpoints_command): Remove non-const overload.
2662         * avr-tdep.c (avr_io_reg_read_command): Constify.
2663         * auxv.c (info_auxv_command): Constify.
2664         * ada-tasks.c (info_tasks_command): Constify.
2665         (info_task): Constify.
2666         * ada-lang.c (info_exceptions_command): Constify.
2667
2668 2017-11-07  Tom Tromey  <tom@tromey.com>
2669
2670         * solib.h (no_shared_libraries): Constify.
2671         * frame.h (return_command): Constify.
2672         * cli/cli-cmds.h (quit_command): Constify.
2673         * top.h (quit_command, execute_command): Constify.
2674         * target.h (flash_erase_command): Constify.
2675         * inferior.h (set_inferior_args, attach_command): Constify.
2676         * tracepoint.h (start_tracing, stop_tracing): Constify.
2677         * breakpoint.h (break_command, tbreak_command)
2678         (hbreak_command_wrapper, thbreak_command_wrapper)
2679         (rbreak_command_wrapper, watch_command_wrapper)
2680         (awatch_command_wrapper, rwatch_command_wrapper)
2681         (get_tracepoint_by_number): Constify.
2682         * symtab.c (info_variables_command, rbreak_command)
2683         (symtab_symbol_info): Constify.
2684         (info_variables_command): Add non-const overload.
2685         * top.c (dont_repeat_command): Constify.
2686         * breakpoint.c (ignore_command, commands_command)
2687         (condition_command, tbreak_command, hbreak_command)
2688         (thbreak_command, clear_command, break_command)
2689         (info_breakpoints_command, watch_command, rwatch_command)
2690         (awatch_command, trace_command, ftrace_command, strace_command)
2691         (trace_pass_command, break_range_command, dprintf_command)
2692         (agent_printf_command, get_tracepoint_by_number)
2693         (watch_maybe_just_location, trace_pass_command): Constify.
2694         (info_breakpoints_command): Add non-const overload.
2695         * tracefile.c (tsave_command): Constify.
2696         * infcmd.c (attach_command, disconnect_command, signal_command)
2697         (queue_signal_command, stepi_command, nexti_command)
2698         (finish_command, next_command, step_command, until_command)
2699         (advance_command, jump_command, continue_command, run_command)
2700         (start_command, starti_command, interrupt_command)
2701         (run_command_1, set_inferior_args, step_1): Constify.
2702         * inferior.c (add_inferior_command, remove_inferior_command)
2703         (clone_inferior_command): Constify.
2704         * linux-fork.c (checkpoint_command, restart_command): Constify.
2705         * windows-nat.c (signal_event_command): Constify.
2706         * guile/guile.c (guile_repl_command, guile_command): Constify.
2707         * printcmd.c (x_command, display_command, printf_command)
2708         (output_command, set_command, call_command, print_command)
2709         (eval_command): Constify.
2710         (non_const_set_command): Remove.
2711         (_initialize_printcmd): Update.
2712         * source.c (forward_search_command, reverse_search_command):
2713         Constify.
2714         * jit.c (jit_reader_load_command, jit_reader_unload_command):
2715         Constify.
2716         * infrun.c (handle_command): Constify.
2717         * memattr.c (mem_command): Constify.
2718         * stack.c (return_command, up_command, up_silently_command)
2719         (down_command, down_silently_command, frame_command)
2720         (backtrace_command, func_command, backtrace_command_1): Constify.
2721         (backtrace_command): Add non-const overload.
2722         * remote-sim.c (simulator_command): Constify.
2723         * exec.c (set_section_command): Constify.
2724         * tracepoint.c (tdump_command, trace_variable_command)
2725         (tstatus_command, tstop_command, tstart_command)
2726         (end_actions_pseudocommand, while_stepping_pseudocommand)
2727         (collect_pseudocommand, teval_pseudocommand, actions_command)
2728         (start_tracing, stop_tracing): Constify.
2729         * value.c (init_if_undefined_command): Constify.
2730         * tui/tui-stack.c (tui_update_command): Constify.
2731         * tui/tui-win.c (tui_refresh_all_command)
2732         (tui_set_tab_width_command, tui_set_win_height_command)
2733         (tui_set_focus_command, tui_scroll_forward_command)
2734         (tui_scroll_backward_command, tui_scroll_left_command)
2735         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2736         (tui_set_win_height): Constify.
2737         * tui/tui-layout.c (tui_layout_command): Constify.
2738         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2739         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2740         (proc_untrace_sysexit_cmd): Constify.
2741         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2742         (threadset_test_cmd, threadlist_update_test_cmd)
2743         (threadalive_test): Constify.
2744         * objc-lang.c (print_object_command): Constify.
2745         * command.h (add_com): Constify.
2746         * cli/cli-dump.c (restore_command): Constify.
2747         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2748         (help_command, complete_command, shell_command, edit_command)
2749         (list_command, disassemble_command, make_command)
2750         (apropos_command, alias_command): Constify.
2751         * cli/cli-script.c (document_command, define_command)
2752         (while_command, if_command, validate_comname): Constify.
2753         * cli/cli-decode.c (struct cmd_list_element): Change type of
2754         "fun".
2755         * target.c (do_monitor_command, flash_erase_command): Constify.
2756         * regcache.c (reg_flush_command): Constify.
2757         * reverse.c (reverse_step, reverse_next, reverse_stepi)
2758         (reverse_nexti, reverse_continue, reverse_finish)
2759         (save_bookmark_command, goto_bookmark_command)
2760         (exec_reverse_once): Constify.
2761         * python/python.c (python_interactive_command, python_command):
2762         Constify.
2763         * typeprint.c (ptype_command, whatis_command, whatis_exp):
2764         Constify.
2765         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2766         * gcore.c (gcore_command): Constify.
2767
2768 2017-11-07  Tom Tromey  <tom@tromey.com>
2769
2770         * printcmd.c (x_command): Call set_repeat_arguments.
2771         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2772         * top.c (repeat_arguments): New global.
2773         (set_repeat_arguments): New function.
2774         (execute_command): Handle repeat_arguments.
2775         (show_commands): Calls set_repeat_arguments.
2776         * command.h (set_repeat_arguments): Declare.
2777
2778 2017-11-07  Tom Tromey  <tom@tromey.com>
2779
2780         * stack.c (backtrace_command): Use std::string.
2781         (backtrace_command_1): Make "count_exp" const.
2782
2783 2017-11-07  Tom Tromey  <tom@tromey.com>
2784
2785         * source.c (directory_switch, mod_path, add_path): Constify.
2786         * defs.h (add_path, mod_path, directory_switch): Constify.
2787         * mi/mi-cmd-env.c (env_mod_path): Constify.
2788
2789 2017-11-07  Tom Tromey  <tom@tromey.com>
2790
2791         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2792         (run_command_1, continue_command, step_1, jump_command)
2793         (signal_command, until_command, advance_command, finish_command)
2794         (attach_command): Update.
2795
2796 2017-11-07  Tom Tromey  <tom@tromey.com>
2797
2798         * command.h (set_cmd_cfunc): Don't declare.
2799         * cli/cli-decode.c (set_cmd_cfunc): Now static.
2800
2801 2017-11-07  Tom Tromey  <tom@tromey.com>
2802
2803         * stack.c (select_frame_command): Constify.
2804         * cli/cli-decode.c (add_com_suppress_notification): Constify.
2805         * command.h (add_com_suppress_notification): Constify.
2806
2807 2017-11-07  Tom Tromey  <tom@tromey.com>
2808
2809         * breakpoint.c (stop_command): Constify.
2810         * cli/cli-decode.c (struct cmd_list_element): Constify.
2811         * command.h (add_abbrev_prefix_cmd): Constify.
2812
2813 2017-11-07  Pedro Alves  <palves@redhat.com>
2814
2815         * breakpoint.c (extract_bp_kind): New enum.
2816         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2817         factored out from ...
2818         (extract_bp_number_and_location): ... here.
2819         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2820
2821 2017-11-07  Pedro Alves  <palves@redhat.com>
2822
2823         * breakpoint.c (extract_bp_number_and_location): Change return
2824         type to void.  Throw error instead of warning.
2825         (enable_disable_command): Adjust.
2826
2827 2017-11-07  Xavier Roirand  <roirand@adacore.com>
2828             Pedro Alves  <palves@redhat.com>
2829
2830         * breakpoint.c (map_breakpoint_number_range): New, factored out
2831         from ...
2832         (map_breakpoint_numbers): ... here.
2833         (find_location_by_number): Change parameters from string to
2834         breakpoint number and location.
2835         (extract_bp_number_and_location): New function.
2836         (enable_disable_bp_num_loc)
2837         (enable_disable_breakpoint_location_range)
2838         (enable_disable_command): New functions, factored out ...
2839         (enable_command, disable_command): ... these functions, and
2840         adjusted to support ranges.
2841         * NEWS: Document enable/disable breakpoint location range feature.
2842
2843 2017-11-06  Luis Machado  <luis.machado@linaro.org>
2844
2845         * MAINTAINERS (Write After Approval): Update my e-mail address.
2846
2847 2017-11-06  Pedro Alves  <palves@redhat.com>
2848
2849         * gnu-nat.c (gnu_terminal_init): Delete.
2850         (gnu_target): Don't install gnu_terminal_init.
2851         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2852         (child_terminal_init): ... this function.
2853
2854 2017-11-06  Pedro Alves  <palves@redhat.com>
2855
2856         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2857         sgtty.h.
2858         * config.in, configure: Regenerate.
2859
2860 2017-11-06  Pedro Alves  <palves@redhat.com>
2861
2862         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2863         (async_init_signals): Adjust.
2864         (handle_stop_sig): Rename to ...
2865         (handle_sigtstp): ... this.
2866         (async_stop_sig): Rename to ...
2867         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2868         SIGTSTP path.
2869         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
2870         instead of STOP_SIGNAL thoughout.
2871         (handle_stop_sig): Rename to ...
2872         (handle_sigtstp): ... this.
2873         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2874
2875 2017-11-06  Pedro Alves  <palves@redhat.com>
2876
2877         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2878         longer set flags twice in row.
2879
2880 2017-11-06  Pedro Alves  <palves@redhat.com>
2881
2882         * Makefile.in (SER_HARDWIRE): Update comment.
2883         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2884         * common/gdb_termios.h: Delete file.
2885         * common/job-control.c: Include termios.h and unistd.h instead of
2886         gdb_termios.h.
2887         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2888         check.
2889         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2890         Remove sgtty code.
2891         * configure.ac: No longer check for termio.h and sgtty.h.
2892         * configure: Regenerate.
2893         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
2894         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2895         Replace PROCESS_GROUP_TYPE references with pid_t references
2896         throughout.
2897         (gdb_getpgrp): Delete.
2898         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2899         (child_terminal_inferior): Remove comment.  Remove sgtty code.
2900         (child_terminal_ours_1): Use tcgetpgrp directly instead of
2901         gdb_getpgrp.  Use serial_set_tty_state instead aof
2902         serial_noflush_set_tty_state.  Remove sgtty code.
2903         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
2904         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2905         (inferior_process_group): Now returns pid_t.
2906         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2907         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2908         * ser-event.c (serial_event_ops): Update.
2909         * ser-go32.c (dos_noflush_set_tty_state): Delete.
2910         (dos_ops): Update.
2911         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2912         * ser-pipe.c (pipe_ops): Update.
2913         * ser-tcp.c (tcp_ops): Update.
2914         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
2915         HAVE_TERMIOS checks.
2916         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2917         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2918         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2919         assume termios.
2920         (hardwire_noflush_set_tty_state): Delete.
2921         (hardwire_print_tty_state, hardwire_drain_output)
2922         (hardwire_flush_output, hardwire_flush_input)
2923         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2924         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2925         code, and assume termios.
2926         (hardwire_ops): Update.
2927         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2928         * serial.c (serial_noflush_set_tty_state): Delete.
2929         * serial.h (serial_noflush_set_tty_state): Delete.
2930         (serial_ops::noflush_set_tty_state): Delete.
2931
2932 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2933
2934         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2935         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2936         (COMMON_OBS): Remove doublest.o and dfp.o.
2937         Do not build target-float.c (instead of doublest.c)
2938         with -Wformat-nonliteral.
2939
2940         * doublest.c: Remove file.
2941         * doublest.h: Remove file.
2942         * dfp.c: Remove file.
2943         * dfp.h: Remove file.
2944
2945         * target-float.c: Do not include "doublest.h" and "dfp.h".
2946         (DOUBLEST): Move here from doublest.h.
2947         (enum float_kind): Likewise.
2948         (FLOATFORMAT_CHAR_BIT): Likewise.
2949         (FLOATFORMAT_LARGEST_BYTES): Likewise.
2950         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
2951         (floatformat_precision): Likewise.
2952         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2953         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2954         Likewise.
2955         (host_float_format, host_double_format, host_long_double_format):
2956         Likewise.
2957         (floatformat_to_string, floatformat_from_string): Likewise.
2958         (floatformat_to_doublest): Likewise.  Also, inline the original
2959         convert_floatformat_to_doublest.
2960         (floatformat_from_doublest): Likewise.  Also, inline the original
2961         convert_floatformat_from_doublest.
2962
2963         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2964         (MAX_DECIMAL_STRING): Move here from dfp.c.
2965         (match_endianness): Likewise.
2966         (set_decnumber_context, decimal_check_errors): Likewise.
2967         (decimal_from_number, decimal_to_number): Likewise.
2968         (decimal_to_string, decimal_from_string): Likewise.  Make static.
2969         (decimal_from_longest, decimal_from_ulongest): Likewise.
2970         (decimal_to_longest): Likewise.
2971         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2972         (decimal_convert): Likewise.
2973
2974 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2975
2976         * doublest.c: Do not include "gdbtypes.h".
2977         (extract_typed_floating): Remove.
2978         (store_typed_floating): Remove.
2979         (convert_typed_floating): Remove.
2980         * doublest.h (struct type): Remove.
2981         (DOUBLEST_PRINT_FORMAT): Remove.
2982         (DOUBLEST_SCAN_FORMAT): Remove.
2983         (extract_typed_floating): Remove.
2984         (store_typed_floating): Remove.
2985         (convert_typed_floating): Remove.
2986
2987         * dfp.c (decimal_from_doublest): Remove.
2988         (decimal_to_doublest): Remove.
2989         * dfp.h: Do not include "doublest.h".
2990         (decimal_from_doublest): Remove.
2991         (decimal_to_doublest): Remove.
2992
2993         * value.c: Do not include "doublest.h" and "dfp.h".
2994         (value_as_double): Remove.
2995         (unpack_double): Remove.
2996         (value_from_double): Remove.
2997         (value_from_decfloat): Remove.
2998         * value.h: Do not include "doublest.h".
2999         (value_as_double): Remove.
3000         (unpack_double): Remove.
3001         (value_from_double): Remove.
3002         (value_from_decfloat): Remove.
3003
3004 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3005
3006         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3007         (i386_extract_return_value): Use target_float_convert.
3008         (i386_store_return_value): Likewise.
3009         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3010         (i387_value_to_register): Likewise.
3011         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3012         (ia64_register_to_value): Use target_float_convert.
3013         (ia64_value_to_register): Likewise.
3014         (ia64_extract_return_value): Likewise.
3015         (ia64_store_return_value): Likewise.
3016         (ia64_push_dummy_call): Likewise.
3017         * m68k-tdep.c: Include "target-float.h".
3018         (m68k_register_to_value): Use target_float_convert.
3019         (m68k_value_to_register): Likewise.
3020         (m68k_svr4_extract_return_value): Likewise.
3021         (m68k_svr4_store_return_value): Likewise.
3022         * ppc-sysv-tdep.c: Include "target-float.h".
3023         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3024         (do_ppc_sysv_return_value): Likewise.
3025         (ppc64_sysv_abi_push_freg): Likewise.
3026         (ppc64_sysv_abi_return_value_base): Likewise.
3027         * rs6000-aix-tdep.c: Include "target-float.h".
3028         (rs6000_push_dummy_call): Use target_float_convert.
3029         (rs6000_return_value): Likewise.
3030         * rs6000-lynx178-tdep.c: Include "target-float.h".
3031         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3032         (rs6000_lynx178_return_value): Likewise.
3033         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3034         (rs6000_register_to_value): Use target_float_convert.
3035         (rs6000_value_to_register): Likewise.
3036         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3037         (arm_extract_return_value): Use target_float_convert.
3038         (arm_store_return_value): Likewise.
3039         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3040         (sh_register_convert_to_virtual): Use target_float_convert.
3041         (sh_register_convert_to_raw): Likewise.
3042         * sh64-tdep.c: Include "target-float.h".
3043         (sh64_extract_return_value): Use target_float_convert.
3044         (sh64_register_convert_to_virtual): Likewise.
3045         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
3046
3047 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3048
3049         * target-float.c (floatformat_to_host_double): New function.
3050         (floatformat_from_host_double): Likewise.
3051         (target_float_to_host_double): Likewise.
3052         (target_float_from_host_double): Likewise.
3053         * target-float.h (target_float_to_host_double): Add prototype.
3054         (target_float_from_host_double): Likewise.
3055
3056         * guile/scm-value.c: Include "target-float.h".
3057         (gdbscm_value_to_real): Use target_float_to_host_double.
3058         Handle integer source values via value_as_long.
3059         * guile/scm-math.c: Include "target-float.h".  Do not include
3060         "doublest.h", "dfp.h", and "expression.h".
3061         (vlscm_convert_typed_number): Use target_float_from_host_double.
3062         (vlscm_convert_number): Likewise.
3063
3064         * python/py-value.c (valpy_float): Use target_float_to_host_double.
3065         (convert_value_from_python): Use target_float_from_host_double.
3066
3067 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3068
3069         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3070         (cast_from_fixed): Likewise.
3071         (ada_scaling_type): New function.
3072         (ada_delta): Return value instead of DOUBLEST.  Perform target
3073         arithmetic instead of host arithmetic.
3074         (scaling_factor): Rename to ...
3075         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
3076         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
3077         (ada_fixed_to_float): Remove.
3078         (ada_float_to_fixed): Remove.
3079         * ada-lang.h (ada_fixed_to_float): Remove.
3080         (ada_float_to_fixed): Remove.
3081         (ada_delta): Return value instead of DOUBLEST.
3082         (ada_scaling_factor): Add prototype.
3083
3084         * ada-typeprint.c: Include "target-float.h".
3085         (print_fixed_point_type): Perform target arithmetic instead of
3086         host arithmetic.
3087         * ada-valprint.c: Include "target-float.h".
3088         (ada_val_print_num): Perform target arithmetic instead of
3089         host arithmetic for fixed-point types.
3090
3091 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3092
3093         * target-float.c: Include <math.h>.
3094         (floatformat_binop): New function.
3095         (floatformat_compare): Likewise.
3096         (target_float_binop): Likewise.
3097         (target_float_compare): Likewise.
3098         * target-float.h: Include "expression.h".
3099         (target_float_binop): Add prototype.
3100         (target_float_compare): Likewise.
3101
3102         * valarith.c: Do not include "doublest.h" and "dfp.h".
3103         Include "common/byte-vector.h".
3104         (value_args_as_decimal): Remove, replace by ...
3105         (value_args_as_target_float): ... this function.  Handle both
3106         binary and decimal target floating-point formats.
3107         (scalar_binop): Handle both binary and decimal FP using
3108         value_args_as_target_float and target_float_binop.
3109         (value_equal): Handle both binary and decimal FP using
3110         value_args_as_target_float and target_float_compare.
3111         (value_less): Likewise.
3112         (value_pos): Handle all scalar types as simple copy.
3113         (value_neg): Handle all scalar types via BINOP_SUB from 0.
3114         * dfp.c (decimal_binop): Throw error instead of internal_error
3115         when called with an unsupported operation code.
3116
3117 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3118
3119         * target-float.c (target_float_to_string): New function.
3120         (target_float_from_string): New function.
3121         * target-float.h (target_float_to_string): Add prototype.
3122         (target_float_from_string): Add prototype.
3123
3124         * valprint.c: Include "target-float.h".  Do not include
3125         "doublest.h" and "dfp.h".
3126         (print_floating): Use target_float_to_string.
3127         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
3128         (printf_floating): Use target_float_to_string.
3129         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3130         (print_i387_value): Use target_float_to_string.
3131         * mips-tdep.c: Include "target-float.h".
3132         (mips_print_fp_register): Use target_float_to_string.
3133         * sh64-tdep.c: Include "target-float.h".
3134         (sh64_do_fp_register): Use target_float_to_string.
3135
3136         * parse.c: Include "target-float.h".  Do not include
3137         "doublest.h" and "dfp.h".
3138         (parse_float): Use target_float_from_string.
3139         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
3140         (define_symbol): Use target_float_from_string.
3141         * gdbarch-selftests.c: Include "target-float.h".
3142         (register_to_value_test): Use target_float_from_string.
3143
3144 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3145
3146         * Makefile.c (SFILES): Add target-float.c.
3147         (HFILES_NO_SRCDIR): Add target-float.h.
3148         (COMMON_OBS): Add target-float.o.
3149         * target-float.h: New file.
3150         * target-float.c: New file.
3151
3152         * doublest.c (floatformat_classify): Fix detection of float_zero.
3153
3154         * gdbtypes.c (is_floating_type): New function.
3155         * gdbtypes.h (is_floating_type): Add prototype.
3156
3157         * value.c: Do not include "floatformat.h".
3158         (unpack_double): Use target_float_is_valid.
3159         (is_floating_value): New function.
3160         * value.h (is_floating_value): Add prototype-
3161
3162         * valarith.c: Include "target-float.h".
3163         (value_logical_not): Use target_float_is_zero.
3164
3165         * python/py-value.c: Include "target-float.h".
3166         (valpy_nonzero): Use target_float_is_zero.
3167
3168 2017-11-04  Tom Tromey  <tom@tromey.com>
3169
3170         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3171
3172 2017-11-04  Tom Tromey  <tom@tromey.com>
3173
3174         * breakpoint.c (set_momentary_breakpoint): Return
3175         breakpoint_up.
3176         (until_break_command): Update.
3177         (new_until_break_fsm): Change argument types to
3178         breakpoint_up.
3179         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3180         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3181         Remove.
3182         * infcmd.c (finish_forward): Update.
3183         * breakpoint.h (set_momentary_breakpoint)
3184         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3185         (make_cleanup_delete_breakpoint): Remove.
3186         (struct breakpoint_deleter): New.
3187         (breakpoint_up): New typedef.
3188         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3189         (insert_exception_resume_breakpoint): Update.
3190         (insert_exception_resume_from_probe): Update.
3191         (insert_longjmp_resume_breakpoint): Update.
3192         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3193         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3194         * infcall.c (call_function_by_hand_dummy): Update
3195
3196 2017-11-04  Tom Tromey  <tom@tromey.com>
3197
3198         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3199
3200 2017-11-04  Tom Tromey  <tom@tromey.com>
3201
3202         * linux-tdep.c (linux_core_info_proc_mappings): Use
3203         gdb::def_vector.
3204         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
3205         "size" argument.
3206         (linux_corefile_thread): Update.
3207         (linux_make_corefile_notes): Remove unused variable.
3208
3209 2017-11-04  Tom Tromey  <tom@tromey.com>
3210
3211         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3212         gdb::byte_vector.
3213
3214 2017-11-04  Tom Tromey  <tom@tromey.com>
3215
3216         * objfiles.c (do_free_objfile_cleanup): Remove.
3217         * compile/compile-object-load.c (compile_object_load): Update.
3218         * objfiles.h (make_cleanup_free_objfile): Remove.
3219
3220 2017-11-04  Tom Tromey  <tom@tromey.com>
3221
3222         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3223         (adi_read_versions): Change "tags" to "gdb_byte *".
3224         (adi_print_versions): Likewise.
3225
3226 2017-11-04  Tom Tromey  <tom@tromey.com>
3227
3228         * breakpoint.c
3229         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3230         from start_rbreak_breakpoints.
3231         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3232         * breakpoint.h (class scoped_rbreak_breakpoints): New.
3233         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3234         * symtab.c (do_end_rbreak_breakpoints): Remove.
3235         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3236
3237 2017-11-04  Tom Tromey  <tom@tromey.com>
3238
3239         * cp-namespace.c (reset_directive_searched): Remove.
3240         (cp_lookup_symbol_via_imports): Use scoped_restore.
3241         * cp-support.c (reset_directive_searched): Remove.
3242         (make_symbol_overload_list_using): Use scoped_restore.
3243         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3244         (reset_directive_searched): Remove.
3245
3246 2017-11-04  Tom Tromey  <tom@tromey.com>
3247
3248         * symfile.c (find_separate_debug_file_by_debuglink): Use
3249         unique_xmalloc_ptr.
3250
3251 2017-11-04  Tom Tromey  <tom@tromey.com>
3252
3253         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3254         type of "info".
3255         (compute_stack_depth): Likewise.
3256         (do_compile_dwarf_expr_to_c): Use std::vector.
3257
3258 2017-11-04  Tom Tromey  <tom@tromey.com>
3259
3260         * compile/compile-object-load.c (link_callbacks_einfo): Use
3261         std::string.
3262
3263 2017-11-04  Tom Tromey  <tom@tromey.com>
3264
3265         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3266         Use scoped_free_pendings.
3267         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3268         scoped_free_pendings.
3269         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3270         (xcoff_initial_scan): Likewise.
3271         * buildsym.c (reset_symtab_globals): Update comment.
3272         (scoped_free_pendings): Rename from really_free_pendings.
3273         (prepare_for_building): Update comment.
3274         (buildsym_init): Likewise.
3275         * buildsym.h (class scoped_free_pendings): New class.
3276         (really_free_pendings): Don't declare.
3277
3278 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
3279
3280         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3281         output when converting a zero value to a special byteorder format.
3282
3283 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3284
3285         * frame.c (do_frame_register_read): Remove aspace.
3286         * jit.c (jit_frame_sniffer): Likwise.
3287         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3288         * regcache.c (regcache::regcache): Pass nullptr.
3289         (regcache_print): Caller updated.
3290         * regcache.h (regcache::regcache): Remove one constructor
3291         parameter aspace.
3292
3293 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3294
3295         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3296
3297 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3298
3299         * breakpoint.c (insert_single_step_breakpoints): Update.
3300         * frame.c (struct frame_info) <aspace>: Add const.
3301         (frame_save_as_regcache): Add const.
3302         (get_frame_address_space): Return const address_space *.
3303         * frame.h (get_frame_address_space): Update declaration.
3304         * infrun.c (struct step_over_info) <aspace>: Add const.
3305         (set_step_over_info): Make aspace const.
3306         (displaced_step_prepare_throw): Change variable const.
3307         (resume): Likewise.
3308         (proceed): Likewise.
3309         (adjust_pc_after_break): Likewise.
3310         (save_waitstatus): Likewise.
3311         (handle_signal_stop): Likewise.
3312         (keep_going_pass_signal): Likewise.
3313         * jit.c (jit_frame_sniffer): Add const.
3314         * mips-tdep.c (mips_single_step_through_delay): Likewise.
3315         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3316         * record-full.c (record_full_wait_1): Likewise.
3317         * regcache.c (regcache::regcache): Change parameter to const.
3318         * regcache.h (regcache::regcache): Likewise.
3319         (regcache::aspace): Return const address_space *.
3320         (regcache) <m_aspace>: Add const.
3321
3322 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3323
3324         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3325         * frame.c (create_sentinel_frame): Likewise.
3326         * infrun.c (displaced_step_prepare_throw): Likewise.
3327         (resume): Likewise.
3328         (thread_still_needs_step_over_bp): Likewise.
3329         (proceed): Likewise.
3330         (do_target_wait): Likewise.
3331         (adjust_pc_after_break): Likewise.
3332         (handle_syscall_event): Likewise.
3333         (save_waitstatus): Likewise.
3334         (handle_inferior_event_1): Likewise.
3335         (handle_signal_stop): Likewise.
3336         (keep_going_pass_signal): Likewise.
3337         * linux-nat.c (status_callback): Likewise.
3338         (save_stop_reason): Likewise.
3339         (resume_stopped_resumed_lwps): Likewise.
3340         * record-full.c (record_full_exec_insn): Likewise.
3341         (record_full_wait_1): Likewise.
3342         * regcache.c (get_regcache_aspace): Remove.
3343         * regcache.h (get_regcache_aspace): Remove.
3344
3345 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3346
3347         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3348         (init_regcache_descr): Use gdbarch_num_regs.
3349         (regcache::regcache): Likewise.
3350         (regcache::get_register_status): Likewise.
3351         (regcache::assert_raw_regnum): Likewise.
3352         (regcache::cooked_read): Likewise.
3353         (regcache::cooked_read_value): Likewise.
3354         (regcache::cooked_write): Likewise.
3355         (regcache::dump): Likewise.
3356         (regcache::num_raw_registers): New method.
3357         * regcache.h (class regcache) <num_raw_registers>: New.
3358
3359 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3360
3361         * regcache.c (regcache::assert_regnum): New method.
3362         (regcache::invalidate): Call assert_regnum.
3363         (regcache::raw_update): Likewise.
3364         (regcache::raw_write): Likewise.
3365         (regcache::raw_read_part): Likewise.
3366         (regcache::raw_write_part): Likewise.
3367         (regcache::raw_supply): Likewise.
3368         (regcache::raw_supply_integer): Likewise.
3369         (regcache::raw_supply_zeroed): Likewise.
3370         (regcache::raw_collect): Likewise.
3371         (regcache::raw_collect_integer): Likewise.
3372         * regcache.h (regcache::assert_regnum): Declare.
3373
3374 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3375
3376         * regcache.c (regcache::dump): Remove code.
3377
3378 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3379
3380         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3381         Remove.
3382         <sizeof_cooked_register_status>: Remove.
3383         (init_regcache_descr): Update.
3384         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3385         (regcache::save): Likewise.
3386         (regcache::dump): Likewise.
3387
3388 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
3389
3390         * ft32-tdep.c (ft32_fetch_instruction): New function.
3391         (ft32_analyze_prologue): Use ft32_fetch_instruction().
3392
3393 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
3394
3395         * cli/cli-script.c (execute_control_command): Rename to ...
3396         (execute_control_command_1): ... this.
3397         (execute_control_command): New function.
3398
3399 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
3400
3401         * tracepoint.c (tfind_command): Remove const_cast.
3402
3403 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
3404
3405         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3406
3407 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3408
3409         * common/common-utils.h (in_inclusive_range): New function.
3410         * arm-tdep.c (arm_record_extension_space): Use
3411         in_inclusive_range.
3412         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3413         * cris-tdep.c (cris_spec_reg_applicable): Use
3414         in_inclusive_range.
3415
3416 2017-10-30  Pedro Alves  <palves@redhat.com>
3417             Simon Marchi <simon.marchi@ericsson.com>
3418
3419         * remote.c (remote_set_syscall_catchpoint): Build a std::string
3420         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3421
3422 2017-10-30  Pedro Alves  <palves@redhat.com>
3423
3424         * common/common-utils.c (string_appendf, string_vappendf): New
3425         functions.
3426         * common/common-utils.h (string_appendf, string_vappendf): New
3427         declarations.
3428         * unittests/common-utils-selftests.c (string_appendf_func)
3429         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3430         (string_vappendf_tests): New functions.
3431         (_initialize_common_utils_selftests): Register "string_appendf" and
3432         "string_vappendf tests".
3433
3434 2017-10-30  Pedro Alves  <palves@redhat.com>
3435
3436         * unittests/common-utils-selftests.c (format_func): New typedef.
3437         (string_printf_tests, string_vprintf_tests): Tests factored out
3438         and merged to ...
3439         (test_format_func): ... this new function.
3440         (string_printf_tests, string_vprintf_tests): Reimplement on top of
3441         test_format_func.
3442
3443 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3444
3445         * darwin-nat.c: Remove include of gdb.h.
3446
3447 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3448
3449         * xtensa-xtregs.c: Fix formatting issues.
3450
3451 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3452
3453         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3454
3455 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
3456
3457         PR python/21213
3458         * python/py-infthread.c (thpy_get_inferior): Increment reference
3459         of inferior before returning it.
3460
3461 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3462
3463         * unittests/common-utils-selftests.c (format): Add
3464         ATTRIBUTE_PRINTF.
3465
3466 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3467
3468         * xml-syscall.c (struct syscall_desc): Add constructor.
3469         <name>: Change type to std::string.
3470         (syscall_desc_up): New typedef.
3471         (syscall_desc_p): Remove typeder.
3472         (DEF_VEC_P(syscall_desc_p)): Remove.
3473         (struct syscall_group_desc): Add constructor.
3474         <name>: Change type to std::string.
3475         <syscalls>: Change type to std::vector.
3476         (syscall_group_desc_up): New typedef.
3477         (syscall_group_desc_p): Remove typedef.
3478         (DEF_VEC_P(syscall_group_desc_p)): Remove.
3479         (struct syscalls_info) <syscalls>: Change type to std::vector of
3480         unique_ptr.
3481         <groups>: Likewise.
3482         <my_gdb_datadir>: Change type to std::string.
3483         (syscalls_info_up): New typedef.
3484         (allocate_syscalls_info): Remove.
3485         (syscalls_info_free_syscalls_desc): Remove.
3486         (syscalls_info_free_syscall_group_desc): Remove.
3487         (free_syscalls_info): Remove.
3488         (make_cleanup_free_syscalls_info): Remove.
3489         (syscall_group_create_syscall_group_desc): Adjust.
3490         (syscall_group_add_syscall): Adjust.
3491         (syscall_create_syscall_desc): Adjust.
3492         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3493         (init_syscalls_info): Adjust.
3494         (syscall_group_get_group_by_name): Adjust.
3495         (xml_get_syscall_number): Adjust.
3496         (xml_get_syscall_name): Adjust.
3497         (xml_list_of_syscalls): Adjust.
3498         (xml_list_syscalls_by_group): Adjust.
3499         (xml_list_of_groups): Adjust.
3500
3501 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3502
3503         * probe.h: Don't include gdb_vecs.h.
3504         (DEF_VEC_P (probe_p)): Remove.
3505         (find_probes_in_objfile): Return an std::vector.
3506         * probe.c (find_probes_in_objfile): Likewise.
3507         * breakpoint.c (breakpoint_objfile_data)
3508         <longjmp_probes>: Change type to std::vector.
3509         <exception_probes>: Likewise.
3510         (free_breakpoint_probes): Don't manually free vectors.
3511         (create_longjmp_master_breakpoint): Adjust.
3512         (create_exception_master_breakpoint): Adjust.
3513         * solib-svr4.c (svr4_create_probe_breakpoints): Change
3514         parameter type, adjust.
3515         (svr4_create_solib_event_breakpoints): Adjust.
3516
3517 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3518
3519         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3520         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3521         with new.
3522         (free_breakpoint_probes): Rename to ...
3523         (free_breakpoint_objfile_data): ... this, and call delete on
3524         bp_objfile_data..
3525
3526 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3527
3528         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3529         (loaded_script_ptr): Remove typedef.
3530         (DEF_VEC_P (loaded_script_ptr)): Remove.
3531         (struct collect_matching_scripts_data): Add constructor.
3532         <scripts_p>: Change type to (pointer to) std::vector.
3533         (collect_matching_scripts_data): Adjust.
3534         (sort_scripts_by_name): Make suitable for std::sort.
3535         (print_scripts): Don't sort vector, adjust to std::vector.
3536         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3537
3538 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3539
3540         * symfile.c (filename_language): Make struct, not typedef.  Add
3541         constructor.
3542         <ext>: Change type to std::string.
3543         (DEF_VEC_O (filename_language)): Remove.
3544         (filename_language_table): Change type to std::vector.
3545         (add_filename_language): Adjust.
3546         (set_ext_lang_command): Adjust.
3547         (info_ext_lang_command): Adjust.
3548         (deduce_language_from_filename): Adjust.
3549         (class scoped_restore_filename_language_table): Remove.
3550         (test_filename_language): Use scoped_restore.
3551         (test_set_ext_lang_command): Use scoped_restore, adjust to
3552         std::vector change.
3553
3554 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3555
3556         * symfile.c: Include selftest.h.
3557         (class scoped_restore_filename_language_table): New.
3558         (test_filename_language): New test.
3559         (test_set_ext_lang_command): New test.
3560         (_initialize_symfile): Register tests.
3561
3562 2017-10-27  Keith Seitz  <keiths@redhat.com>
3563
3564         * breakpoint.c (print_breakpoint_location): Use the symbol saved
3565         in the bp_location, falling back to find_pc_sect_function when
3566         needed.
3567         (add_location_to_breakpoint): Save sal->symbol.
3568         * breakpoint.h (struct bp_location) <symbol>: New field.
3569         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3570         * symtab.h (struct symtab_and_line) <symbol>: New field.
3571
3572 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
3573
3574         PR gdb/13669
3575         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3576         to rewind obstack.
3577
3578 2017-10-26  Pedro Alves  <palves@redhat.com>
3579
3580         * remote.c (remote_async_terminal_ours_p): Delete.
3581         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3582         Remove references to 'remote_async_terminal_ours_p'.
3583
3584 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3585
3586         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3587
3588 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3589
3590         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3591         aspace const.
3592         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3593         Likewise.
3594         * breakpoint.c (bpstat_check_location): Remove cast.
3595         (breakpoint_hit_catch_fork): Make aspce const.
3596         (breakpoint_hit_catch_solib): Likewise.
3597         (breakpoint_hit_catch_exec): Likewise.
3598         (breakpoint_hit_ranged_breakpoint): Likewise.
3599         (breakpoint_hit_watchpoint): Likewise.
3600         (base_breakpoint_breakpoint_hit): Likewise.
3601         (bkpt_breakpoint_hit): Likewise.
3602         (dprintf_breakpoint_hit): Likewise.
3603         (tracepoint_breakpoint_hit): Likewise.
3604         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3605
3606 2017-10-26  Yao Qi  <yao.qi@linaro.org>
3607
3608         * breakpoint.c (breakpoint_location_address_match): Change
3609         "struct address_space *" to "const address_space".
3610         (breakpoint_location_address_range_overlap): Likewise.
3611         (breakpoint_here_p): Likewise.
3612         (breakpoint_in_range_p): Likewise.
3613         (moribund_breakpoint_here_p): Likewise.
3614         (bp_location_inserted_here_p): Likewise.
3615         (software_breakpoint_inserted_here_p): Likewise.
3616         (hardware_breakpoint_inserted_here_p): Likewise.
3617         (hardware_watchpoint_inserted_in_range): Likewise.
3618         (bpstat_check_location): Likewise.
3619         (bpstat_stop_status): Likewise.
3620         (breakpoint_address_match): Likewise.
3621         (breakpoint_address_match_range): Likewise.
3622         (breakpoint_location_address_match): Likewise.
3623         (breakpoint_location_address_range_overlap): Likewise.
3624         (insert_single_step_breakpoint): Likewise.
3625         (breakpoint_has_location_inserted_here): Likewise.
3626         (single_step_breakpoint_inserted_here_p): Likewise.
3627         (pc_at_non_inline_function): Likewise.
3628         * breakpoint.h (bpstat_stop_status): Update declaration.
3629         (breakpoint_here_p): Likewise.
3630         (breakpoint_in_range_p): Likewise.
3631         (moribund_breakpoint_here_p): Likewise.
3632         (breakpoint_inserted_here_p): Likewise.
3633         (software_breakpoint_inserted_here_p): Likewise.
3634         (hardware_breakpoint_inserted_here_p): Likewise.
3635         (breakpoint_has_location_inserted_here): Likewise.
3636         (single_step_breakpoint_inserted_here_p): Likewise.
3637         (hardware_watchpoint_inserted_in_range): Likewise.
3638         (breakpoint_address_match): Likewise.
3639         (insert_single_step_breakpoint): Likewise.
3640         (pc_at_non_inline_function): Likewise.
3641         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3642         * record.c (record_check_stopped_by_breakpoint): Likewise.
3643         * record.h (record_check_stopped_by_breakpoint): Likewise.
3644         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3645
3646 2017-10-25  Yao Qi  <yao.qi@linaro.org>
3647
3648         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3649         regcache->arch () instead get_regcache_arch.
3650         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3651         Likewise.
3652         (aarch64_fbsd_store_inferior_registers): Likewise.
3653         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3654         (store_gregs_to_thread): Likewise.
3655         (fetch_fpregs_from_thread): Likewise.
3656         (store_fpregs_to_thread): Likewise.
3657         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3658         (aarch64_store_return_value): Likewise.
3659         (aarch64_software_single_step): Likewise.
3660         * aix-thread.c (aix_thread_wait): Likewise.
3661         (supply_reg32): Likewise.
3662         (supply_sprs64): Likewise.
3663         (supply_sprs32): Likewise.
3664         (fill_gprs64): Likewise.
3665         (fill_gprs32): Likewise.
3666         (fill_sprs64): Likewise.
3667         (fill_sprs32): Likewise.
3668         (store_regs_user_thread): Likewise.
3669         (store_regs_kernel_thread): Likewise.
3670         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3671         (alphabsd_store_inferior_registers): Likewise.
3672         * alpha-tdep.c (alpha_extract_return_value): Likewise.
3673         (alpha_store_return_value): Likewise.
3674         (alpha_deal_with_atomic_sequence): Likewise.
3675         (alpha_next_pc): Likewise.
3676         (alpha_software_single_step): Likewise.
3677         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3678         (amd64bsd_store_inferior_registers): Likewise.
3679         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3680         Likewise.
3681         (amd64_linux_store_inferior_registers): Likewise.
3682         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3683         (amd64_collect_native_gregset): Likewise.
3684         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3685         (amd64obsd_collect_uthread): Likewise.
3686         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3687         (amd64_collect_fpregset): Likewise.
3688         (amd64_supply_fxsave): Likewise.
3689         (amd64_supply_xsave): Likewise.
3690         (amd64_collect_fxsave): Likewise.
3691         (amd64_collect_xsave): Likewise.
3692         * arc-tdep.c (arc_write_pc): Likewise.
3693         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3694         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3695         (arm_fbsd_store_inferior_registers): Likewise.
3696         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3697         (store_vfp_regs): Likewise.
3698         (arm_linux_fetch_inferior_registers): Likewise.
3699         (arm_linux_store_inferior_registers): Likewise.
3700         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3701         (arm_linux_sigreturn_next_pc): Likewise.
3702         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3703         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3704         (fetch_register): Likewise.
3705         (store_register): Likewise.
3706         * arm-tdep.c (arm_is_thumb): Likewise.
3707         (displaced_in_arm_mode): Likewise.
3708         (bx_write_pc): Likewise.
3709         (arm_get_next_pcs_addr_bits_remove): Likewise.
3710         (arm_software_single_step): Likewise.
3711         (arm_extract_return_value): Likewise.
3712         (arm_store_return_value): Likewise.
3713         (arm_write_pc): Likewise.
3714         * bfin-tdep.c (bfin_extract_return_value): Likewise.
3715         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3716         (bsd_uthread_store_registers): Likewise.
3717         * core-regset.c (fetch_core_registers): Likewise.
3718         * corelow.c (get_core_registers): Likewise.
3719         * cris-tdep.c (cris_store_return_value): Likewise.
3720         (cris_extract_return_value): Likewise.
3721         (find_step_target): Likewise.
3722         (find_step_target): Likewise.
3723         (cris_software_single_step): Likewise.
3724         * ctf.c (ctf_fetch_registers): Likewise.
3725         * darwin-nat.c (cancel_breakpoint): Likewise.
3726         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3727         * frv-tdep.c (frv_extract_return_value): Likewise.
3728         * ft32-tdep.c (ft32_store_return_value): Likewise.
3729         (ft32_extract_return_value): Likewise.
3730         * go32-nat.c (fetch_register): Likewise.
3731         (go32_fetch_registers): Likewise.
3732         (go32_store_registers): Likewise.
3733         (store_register): Likewise.
3734         * h8300-tdep.c (h8300_extract_return_value): Likewise.
3735         (h8300_store_return_value): Likewise.
3736         * hppa-linux-nat.c (fetch_register): Likewise.
3737         (store_register): Likewise.
3738         (hppa_linux_fetch_inferior_registers): Likewise.
3739         (hppa_linux_store_inferior_registers): Likewise.
3740         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3741         (i386_darwin_store_inferior_registers): Likewise.
3742         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3743         (gnu_store_registers): Likewise.
3744         * i386-linux-nat.c (fetch_register): Likewise.
3745         (store_register): Likewise.
3746         (supply_gregset): Likewise.
3747         (fill_gregset): Likewise.
3748         (i386_linux_fetch_inferior_registers): Likewise.
3749         (i386_linux_store_inferior_registers): Likewise.
3750         (i386_linux_resume): Likewise.
3751         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3752         Likewise.
3753         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3754         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3755         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3756         (i386obsd_collect_uthread): Likewise.
3757         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3758         (i386_supply_gregset): Likewise.
3759         (i386_collect_gregset): Likewise.
3760         (i386_supply_fpregset): Likewise.
3761         (i386_collect_fpregset): Likewise.
3762         (i386_mpx_bd_base): Likewise.
3763         * i386-v4-nat.c (supply_fpregset): Likewise.
3764         (fill_fpregset): Likewise.
3765         * i387-tdep.c (i387_supply_fsave): Likewise.
3766         (i387_collect_fsave): Likewise.
3767         (i387_supply_fxsave): Likewise.
3768         (i387_collect_fxsave): Likewise.
3769         (i387_supply_xsave): Likewise.
3770         (i387_collect_xsave): Likewise.
3771         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3772         (ia64_linux_store_registers): Likewise.
3773         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3774         (ia64_extract_return_value): Likewise.
3775         (ia64_store_return_value): Likewise.
3776         (find_func_descr): Likewise.
3777         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3778         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3779         (inf_ptrace_store_registers): Likewise.
3780         * infrun.c (use_displaced_stepping): Likewise.
3781         (displaced_step_prepare_throw): Likewise.
3782         (resume): Likewise.
3783         (proceed): Likewise.
3784         (do_target_wait): Likewise.
3785         (adjust_pc_after_break): Likewise.
3786         (handle_inferior_event_1): Likewise.
3787         (handle_signal_stop): Likewise.
3788         (save_infcall_suspend_state): Likewise.
3789         (restore_infcall_suspend_state): Likewise.
3790         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3791         * jit.c (jit_frame_prev_register): Likewise.
3792         * linux-nat.c (save_stop_reason): Likewise.
3793         (linux_nat_wait_1): Likewise.
3794         (resume_stopped_resumed_lwps): Likewise.
3795         * linux-record.c (record_linux_sockaddr): Likewise.
3796         (record_linux_msghdr): Likewise.
3797         (record_linux_system_call): Likewise.
3798         * linux-tdep.c (linux_collect_thread_registers): Likewise.
3799         * lm32-tdep.c (lm32_extract_return_value): Likewise.
3800         (lm32_store_return_value): Likewise.
3801         * m32c-tdep.c (m32c_read_flg): Likewise.
3802         (m32c_pseudo_register_read): Likewise.
3803         (m32c_pseudo_register_write): Likewise.
3804         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3805         (m32r_linux_collect_gregset): Likewise.
3806         * m32r-tdep.c (m32r_store_return_value): Likewise.
3807         (m32r_extract_return_value): Likewise.
3808         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3809         (m68kbsd_collect_fpregset): Likewise.
3810         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3811         * m68k-linux-nat.c (fetch_register): Likewise.
3812         (old_fetch_inferior_registers): Likewise.
3813         (old_store_inferior_registers): Likewise.
3814         (store_regs): Likewise.
3815         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3816         (m68k_svr4_store_return_value): Likewise.
3817         * m88k-tdep.c (m88k_store_arguments): Likewise.
3818         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3819         (mi_cmd_data_write_register_values): Likewise.
3820         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3821         (mips_fbsd_store_inferior_registers): Likewise.
3822         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3823         (mips_fbsd_supply_gregs): Likewise.
3824         (mips_fbsd_collect_fpregs): Likewise.
3825         (mips_fbsd_collect_gregs): Likewise.
3826         (mips_fbsd_supply_fpregset): Likewise.
3827         (mips_fbsd_collect_fpregset): Likewise.
3828         (mips_fbsd_supply_gregset): Likewise.
3829         (mips_fbsd_collect_gregset): Likewise.
3830         * mips-linux-nat.c (supply_gregset): Likewise.
3831         (fill_gregset): Likewise.
3832         (supply_fpregset): Likewise.
3833         (fill_fpregset): Likewise.
3834         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3835         (mips_fill_gregset): Likewise.
3836         (mips_supply_fpregset): Likewise.
3837         (mips_fill_fpregset): Likewise.
3838         (mips64_supply_gregset): Likewise.
3839         (micromips_linux_sigframe_validate): Likewise.
3840         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3841         (mipsnbsd_fetch_inferior_registers): Likewise.
3842         (mipsnbsd_store_inferior_registers): Likewise.
3843         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3844         (mipsnbsd_supply_gregset): Likewise.
3845         (mipsnbsd_iterate_over_regset_sections): Likewise.
3846         (mipsnbsd_supply_reg): Likewise.
3847         (mipsnbsd_supply_fpreg): Likewise.
3848         * mips-tdep.c (mips_in_frame_stub): Likewise.
3849         (mips_dummy_id): Likewise.
3850         (is_octeon_bbit_op): Likewise.
3851         (micromips_bc1_pc): Likewise.
3852         (extended_mips16_next_pc): Likewise.
3853         (mips16_next_pc): Likewise.
3854         (deal_with_atomic_sequence): Likewise.
3855         * moxie-tdep.c (moxie_process_readu): Likewise.
3856         * nios2-tdep.c (nios2_get_next_pc): Likewise.
3857         * nto-procfs.c (procfs_store_registers): Likewise.
3858         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3859         (ppcfbsd_store_inferior_registers): Likewise.
3860         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3861         (fetch_altivec_register): Likewise.
3862         (get_spe_registers): Likewise.
3863         (fetch_spe_register): Likewise.
3864         (fetch_altivec_registers): Likewise.
3865         (fetch_all_gp_regs): Likewise.
3866         (fetch_all_fp_regs): Likewise.
3867         (store_vsx_register): Likewise.
3868         (store_altivec_register): Likewise.
3869         (set_spe_registers): Likewise.
3870         (store_spe_register): Likewise.
3871         (store_altivec_registers): Likewise.
3872         (store_all_gp_regs): Likewise.
3873         (store_all_fp_regs): Likewise.
3874         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3875         (ppc_linux_collect_gregset): Likewise.
3876         (ppc_canonicalize_syscall): Likewise.
3877         (ppc_linux_record_signal): Likewise.
3878         (ppu2spu_prev_register): Likewise.
3879         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3880         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3881         (ppcobsd_store_registers): Likewise.
3882         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3883         Likewise.
3884         (ppc_ravenscar_generic_store_registers): Likewise.
3885         * procfs.c (procfs_fetch_registers): Likewise.
3886         (procfs_store_registers): Likewise.
3887         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3888         (ravenscar_store_registers): Likewise.
3889         (ravenscar_prepare_to_store): Likewise.
3890         * record-btrace.c (record_btrace_fetch_registers): Likewise.
3891         * record-full.c (record_full_wait_1): Likewise.
3892         (record_full_registers_change): Likewise.
3893         (record_full_store_registers): Likewise.
3894         (record_full_core_fetch_registers): Likewise.
3895         (record_full_save): Likewise.
3896         (record_full_goto_insn): Likewise.
3897         * regcache.c (regcache_register_size): Likewise.
3898         (get_regcache_arch): Remove.
3899         (regcache_read_pc): Likewise.
3900         * regcache.h (get_regcache_arch): Remove.
3901         * remote-sim.c (gdbsim_fetch_register): Likewise.
3902         (gdbsim_store_register): Likewise.
3903         * remote.c (fetch_register_using_p): Likewise.
3904         (send_g_packet): Likewise.
3905         (remote_prepare_to_store): Likewise.
3906         (store_registers_using_G): Likewise.
3907         * reverse.c (save_bookmark_command): Likewise.
3908         (goto_bookmark_command): Likewise.
3909         * rs6000-aix-tdep.c (branch_dest): Likewise.
3910         * rs6000-nat.c (rs6000_ptrace64): Likewise.
3911         (fetch_register): Likewise.
3912         * rs6000-tdep.c (ppc_supply_reg): Likewise.
3913         (ppc_collect_reg): Likewise.
3914         (ppc_collect_gregset): Likewise.
3915         (ppc_collect_fpregset): Likewise.
3916         (ppc_collect_vsxregset): Likewise.
3917         (ppc_collect_vrregset): Likewise.
3918         (ppc_displaced_step_hw_singlestep): Likewise.
3919         (rs6000_pseudo_register_read): Likewise.
3920         (rs6000_pseudo_register_write): Likewise.
3921         * s390-linux-nat.c (supply_gregset): Likewise.
3922         (fill_gregset): Likewise.
3923         (s390_linux_fetch_inferior_registers): Likewise.
3924         * s390-linux-tdep.c (s390_write_pc): Likewise.
3925         (s390_software_single_step): Likewise.
3926         (s390_all_but_pc_registers_record): Likewise.
3927         (s390_linux_syscall_record): Likewise.
3928         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3929         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3930         (shnbsd_store_inferior_registers): Likewise.
3931         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3932         (sh_extract_return_value_fpu): Likewise.
3933         (sh_store_return_value_nofpu): Likewise.
3934         (sh_corefile_supply_regset): Likewise.
3935         (sh_corefile_collect_regset): Likewise.
3936         * sh64-tdep.c (sh64_extract_return_value): Likewise.
3937         (sh64_store_return_value): Likewise.
3938         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3939         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3940         (sparc_store_inferior_registers): Likewise.
3941         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3942         (sparc_ravenscar_prepare_to_store): Likewise.
3943         * sparc-tdep.c (sparc32_store_arguments): Likewise.
3944         (sparc_analyze_control_transfer): Likewise.
3945         (sparc_step_trap): Likewise.
3946         (sparc_software_single_step): Likewise.
3947         (sparc32_gdbarch_init): Likewise.
3948         (sparc_supply_rwindow): Likewise.
3949         (sparc_collect_rwindow): Likewise.
3950         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3951         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3952         (sparc64nbsd_collect_gregset): Likewise.
3953         (sparc64nbsd_supply_fpregset): Likewise.
3954         (sparc64nbsd_collect_fpregset): Likewise.
3955         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3956         (sparc64_supply_gregset): Likewise.
3957         (sparc64_collect_gregset): Likewise.
3958         (sparc64_supply_fpregset): Likewise.
3959         (sparc64_collect_fpregset): Likewise.
3960         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3961         * spu-tdep.c (spu_unwind_sp): Likewise.
3962         (spu2ppu_prev_register): Likewise.
3963         (spu_memory_remove_breakpoint): Likewise.
3964         * stack.c (return_command): Likewise.
3965         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3966         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3967         * tracefile.c (trace_save_ctf): Likewise.
3968         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3969         (do_windows_store_inferior_registers): Likewise.
3970         (windows_resume): Likewise.
3971         * xtensa-linux-nat.c (fill_gregset): Likewise.
3972         (supply_gregset_reg): Likewise.
3973         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3974         (xtensa_register_read_masked): Likewise.
3975         (xtensa_supply_gregset): Likewise.
3976         (xtensa_extract_return_value): Likewise.
3977         (xtensa_store_return_value): Likewise.
3978
3979 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
3980
3981         * doublest.c (floatformat_from_string): New function.
3982         * doublest.h (floatformat_from_string): Add prototype.
3983
3984         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3985         (OP_FLOAT): ... this.
3986         * expression.h: Do not include "doublest.h".
3987         (union exp_element): Replace doubleconst and decfloatconst by
3988         new element floatconst.
3989         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3990         (ada_evaluate_subexp): Likewise.
3991         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3992         OP_DOUBLE and OP_DECFLOAT.
3993         * expprint.c (print_subexp_standard): Likewise.
3994         (dump_subexp_body_standard): Likewise.
3995         * breakpoint.c (watchpoint_exp_is_const): Likewise.
3996
3997         * parse.c: Include "dfp.h".
3998         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3999         (write_exp_elt_floatcst): New function.
4000         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4001         and OP_DECFLOAT.
4002         (operator_check_standard): Likewise.
4003         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
4004         Return target format buffer instead of host DOUBLEST.
4005         Use floatformat_from_string and decimal_from_string to parse
4006         either binary or decimal floating-point types.
4007         (parse_c_float): Remove.
4008         * parser-defs.h: Do not include "doublest.h".
4009         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4010         (write_exp_elt_floatcst): Add prototype.
4011         (parse_float): Update prototype.
4012         (parse_c_float): Remove.
4013
4014         * c-exp.y: Do not include "dfp.h".
4015         (typed_val_float): Use byte buffer instead of DOUBLEST.
4016         (typed_val_decfloat): Remove.
4017         (DECFLOAT): Remove.
4018         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4019         (parse_number): Update to new parse_float interface.
4020         Parse suffixes and determine type before calling parse_float.
4021         Handle decimal and binary FP types the same way.
4022
4023         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4024         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4025         (parse_number): Update to new parse_float interface.
4026         Parse suffixes and determine type before calling parse_float.
4027
4028         * f-exp.y: Replace dval by typed_val_float.
4029         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4030         (parse_number): Use parse_float instead of atof.
4031
4032         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4033         (parse_go_float): Remove.
4034         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4035         (parse_number): Call parse_float instead of parse_go_float.
4036         Parse suffixes and determine type before calling parse_float.
4037
4038         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4039         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4040         (parse_number): Update to new parse_float interface.
4041         Parse suffixes and determine type before calling parse_float.
4042
4043         * m2-exp.y: Replace dval by byte buffer val.
4044         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4045         (parse_number): Call parse_float instead of atof.
4046
4047         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4048         (lex_number): Call parse_float instead of strtod.
4049         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4050         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4051         Use write_exp_elt_floatcst.
4052         (unit_testing): Remove static variable.
4053         (rust_type): Do not check unit_testing.
4054         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
4055
4056         * ada-exp.y (type_float, type_double): Remove.
4057         (typed_val_float): Use byte buffer instead of DOUBLEST.
4058         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4059         * ada-lex.l (processReal): Use parse_float instead of sscanf.
4060
4061 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
4062
4063         * aarch64-tdep.h (enum aarch64_regnum): Remove.
4064         * arch/aarch64.h: New file.
4065
4066 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4067
4068         * dfp.h (decimal_from_string): Use const reference for argument.
4069         * dfp.c (decimal_from_string): Likewise.
4070
4071 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4072
4073         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4074         * sh64-tdep.c (sh64_do_fp_register): Likewise.
4075         * mips-tdep.c (mips_print_fp_register): Likewise.
4076
4077 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4078
4079         * common/format.h (enum argclass): Replace decfloat_arg by
4080         dec32float_arg, dec64float_arg, and dec128float_arg.
4081         * common/format.c (parse_format_string): Update to return
4082         new decimal float argument classes.
4083
4084         * printcmd.c (printf_decfloat): Rename to ...
4085         (printf_floating): ... this.  Add argclass argument, and use it
4086         instead of parsing the format string again.  Add support for
4087         binary floating-point values, using floatformat_to_string.
4088         Convert value to the target format if it doesn't already match.
4089         (ui_printf): Call printf_floating instead of printf_decfloat,
4090         also for double_arg / long_double_arg.  Pass argclass.
4091
4092         * dfp.c (decimal_to_string): Add format string argument.
4093         * dfp.h (decimal_to_string): Likewise.
4094
4095         * doublest.c (floatformat_to_string): Add format string argument.
4096         * doublest.h (floatformat_to_string): Likewise.
4097
4098 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4099
4100         * doublest.c (floatformat_precision): New routine.
4101         (floatformat_to_string): Likewise.
4102         * doublest.c (floatformat_to_string): Add prototype.
4103
4104         * printcmd.c (print_scalar_formatted): Only call print_floating
4105         on floating-point types.
4106         * valprint.c: Do not include "floatformat.h".
4107         (generic_val_print_decfloat): Remove.
4108         (generic_val_print): Call generic_val_print_float for both
4109         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4110         (print_floating): Use floatformat_to_string.  Handle decimal float.
4111         (print_decimal_floating): Remove, merge into floatformat_to_string.
4112         * value.h (print_decimal_floating): Remove.
4113
4114         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4115
4116 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4117
4118         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4119
4120 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4121
4122         * memattr.h: Don't include vec.h.
4123         (struct mem_attrib): Initialize fields.
4124         <unknown>: New static method.
4125         (struct mem_region): Add constructors, operator<, initialize
4126         fields.
4127         * memattr.c: Include algorithm.
4128         (default_mem_attrib, unknown_mem_attrib): Remove.
4129         (user_mem_region_list): New global.
4130         (target_mem_region_list, mem_region_list): Change type to
4131         std::vector<mem_region>.
4132         (mem_use_target): Now a function.
4133         (target_mem_regions_valid): Change type to bool.
4134         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4135         (require_user_regions): Adjust.
4136         (require_target_regions): Adjust.
4137         (create_mem_region): Adjust.
4138         (lookup_mem_region): Adjust.
4139         (invalidate_target_mem_regions): Adjust.
4140         (mem_clear): Rename to...
4141         (user_mem_clear): ... this, and adjust.
4142         (mem_command): Adjust.
4143         (info_mem_command): Adjust.
4144         (mem_enable, enable_mem_command, mem_disable,
4145         disable_mem_command): Adjust.
4146         (mem_delete): Adjust.
4147         (delete_mem_command): Adjust.
4148         * memory-map.h (parse_memory_map): Return an std::vector.
4149         * memory-map.c (parse_memory_map): Likewise.
4150         (struct memory_map_parsing_data): Add constructor.
4151         <memory_map>: Point to std::vector.
4152         (memory_map_start_memory): Adjust.
4153         (memory_map_end_memory): Adjust.
4154         (memory_map_end_property): Adjust.
4155         (clear_result): Remove.
4156         * remote.c (remote_memory_map): Return an std::vector.
4157         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4158         Remove.
4159         (target_debug_print_mem_region_vector): New.
4160         * target-delegates.c: Regenerate.
4161         * target.h (mem_region_vector): New typedef.
4162         (to_memory_map): Return mem_region_vector.
4163         (target_memory_map): Return an std::vector.
4164         * target.c (target_memory_map): Return an std::vector.
4165         (flash_erase_command): Adjust.
4166
4167 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4168
4169         * memory-map.c (struct memory_map_parsing_data) <property_name>:
4170         Change type to std::string.
4171         (memory_map_start_property): Adjust.
4172         (memory_map_end_property): Adjust.
4173
4174 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4175
4176         * infrun.h: Include common/byte-vector.h.
4177         (struct displaced_step_closure): New struct.
4178         (struct buf_displaced_step_closure): New struct.
4179         * infrun.c (displaced_step_closure::~displaced_step_closure):
4180         Provide default implementation.
4181         (displaced_step_clear): Deallocate step closure with delete.
4182         * aarch64-tdep.c (displaced_step_closure): Rename to ...
4183         (aarch64_displaced_step_closure): ... this, extend
4184         displaced_step_closure.
4185         (aarch64_displaced_step_data) <dsc>: Change type to
4186         aarch64_displaced_step_closure.
4187         (aarch64_displaced_step_copy_insn): Adjust to type change, use
4188         unique_ptr.
4189         (aarch64_displaced_step_fixup): Add cast for displaced step
4190         closure.
4191         * amd64-tdep.c (displaced_step_closure): Rename to ...
4192         (amd64_displaced_step_closure): ... this, extend
4193         displaced_step_closure.
4194         <insn_buf>: Change type to std::vector<gdb_byte>.
4195         <max_len>: Remove.
4196         (fixup_riprel): Change type of DSC parameter, adjust to type
4197         change of insn_buf.
4198         (fixup_displaced_copy): Change type of DSC parameter.
4199         (amd64_displaced_step_copy_insn): Instantiate
4200         amd64_displaced_step_closure.
4201         (amd64_displaced_step_fixup): Add cast for closure type, adjust
4202         to type change of insn_buf.
4203         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4204         parameter DSC.
4205         (arm_linux_copy_svc): Likewise.
4206         (cleanup_kernel_helper_return): Likewise.
4207         (arm_catch_kernel_helper_return): Likewise.
4208         (arm_linux_displaced_step_copy_insn): Instantiate
4209         arm_displaced_step_closure.
4210         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4211         (displaced_read_reg): Change type of parameter DSC.
4212         (branch_write_pc): Likewise.
4213         (load_write_pc): Likewise.
4214         (alu_write_pc): Likewise.
4215         (displaced_write_reg): Likewise.
4216         (arm_copy_unmodified): Likewise.
4217         (thumb_copy_unmodified_32bit): Likewise.
4218         (thumb_copy_unmodified_16bit): Likewise.
4219         (cleanup_preload): Likewise.
4220         (install_preload): Likewise.
4221         (arm_copy_preload): Likewise.
4222         (thumb2_copy_preload): Likewise.
4223         (install_preload_reg): Likewise.
4224         (arm_copy_preload_reg): Likewise.
4225         (cleanup_copro_load_store): Likewise.
4226         (install_copro_load_store): Likewise.
4227         (arm_copy_copro_load_store) Likewise.
4228         (thumb2_copy_copro_load_store): Likewise.
4229         (cleanup_branch): Likewise.
4230         (install_b_bl_blx): Likewise.
4231         (arm_copy_b_bl_blx): Likewise.
4232         (thumb2_copy_b_bl_blx): Likewise.
4233         (thumb_copy_b): Likewise.
4234         (install_bx_blx_reg): Likewise.
4235         (arm_copy_bx_blx_reg): Likewise.
4236         (thumb_copy_bx_blx_reg): Likewise.
4237         (cleanup_alu_imm): Likewise.
4238         (arm_copy_alu_imm): Likewise.
4239         (thumb2_copy_alu_imm): Likewise.
4240         (cleanup_alu_reg): Likewise.
4241         (install_alu_reg): Likewise.
4242         (arm_copy_alu_reg): Likewise.
4243         (thumb_copy_alu_reg): Likewise.
4244         (cleanup_alu_shifted_reg): Likewise.
4245         (install_alu_shifted_reg): Likewise.
4246         (arm_copy_alu_shifted_reg): Likewise.
4247         (cleanup_load): Likewise.
4248         (cleanup_store): Likewise.
4249         (arm_copy_extra_ld_st): Likewise.
4250         (install_load_store): Likewise.
4251         (thumb2_copy_load_literal): Likewise.
4252         (thumb2_copy_load_reg_imm): Likewise.
4253         (arm_copy_ldr_str_ldrb_strb): Likewise.
4254         (cleanup_block_load_all): Likewise.
4255         (cleanup_block_store_pc): Likewise.
4256         (cleanup_block_load_pc): Likewise.
4257         (arm_copy_block_xfer): Likewise.
4258         (thumb2_copy_block_xfer): Likewise.
4259         (cleanup_svc): Likewise.
4260         (install_svc): Likewise.
4261         (arm_copy_svc): Likewise.
4262         (thumb_copy_svc): Likewise.
4263         (arm_copy_undef): Likewise.
4264         (thumb_32bit_copy_undef): Likewise.
4265         (arm_copy_unpred): Likewise.
4266         (arm_decode_misc_memhint_neon): Likewise.
4267         (arm_decode_unconditional): Likewise.
4268         (arm_decode_miscellaneous): Likewise.
4269         (arm_decode_dp_misc): Likewise.
4270         (arm_decode_ld_st_word_ubyte): Likewise.
4271         (arm_decode_media): Likewise.
4272         (arm_decode_b_bl_ldmstm): Likewise.
4273         (arm_decode_ext_reg_ld_st): Likewise.
4274         (thumb2_decode_dp_shift_reg): Likewise.
4275         (thumb2_decode_ext_reg_ld_st): Likewise.
4276         (arm_decode_svc_copro): Likewise.
4277         (thumb2_decode_svc_copro): Likewise.
4278         (install_pc_relative): Likewise.
4279         (thumb_copy_pc_relative_16bit): Likewise.
4280         (thumb_decode_pc_relative_16bit): Likewise.
4281         (thumb_copy_pc_relative_32bit): Likewise.
4282         (thumb_copy_16bit_ldr_literal): Likewise.
4283         (thumb_copy_cbnz_cbz): Likewise.
4284         (thumb2_copy_table_branch): Likewise.
4285         (cleanup_pop_pc_16bit_all): Likewise.
4286         (thumb_copy_pop_pc_16bit): Likewise.
4287         (thumb_process_displaced_16bit_insn): Likewise.
4288         (decode_thumb_32bit_ld_mem_hints): Likewise.
4289         (thumb_process_displaced_32bit_insn): Likewise.
4290         (thumb_process_displaced_insn): Likewise.
4291         (arm_process_displaced_insn): Likewise.
4292         (arm_displaced_init_closure): Likewise.
4293         (arm_displaced_step_fixup): Add cast for closure.
4294         * arm-tdep.h: Include infrun.h.
4295         (displaced_step_closure): Rename to ...
4296         (arm_displaced_step_closure): ... this, extend
4297         displaced_step_closure.
4298         <u::svc::copy_svc_os>: Change type of parameter DSC.
4299         <cleanup>: Likewise.
4300         (arm_process_displaced_insn): Likewise.
4301         (arm_displaced_init_closure): Likewise.
4302         (displaced_read_reg): Likewise.
4303         (displaced_write_reg): Likewise.
4304         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4305         Adjust.
4306         * i386-tdep.h: Include infrun.h.
4307         (i386_displaced_step_closure): New typedef.
4308         * i386-tdep.c (i386_displaced_step_copy_insn): Use
4309         i386_displaced_step_closure.
4310         (i386_displaced_step_fixup): Adjust.
4311         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4312         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4313         and unique_ptr.
4314         (ppc_displaced_step_fixup): Adjust.
4315         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4316         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4317         and unique_ptr.
4318         (s390_displaced_step_fixup): Adjust.
4319
4320 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4321
4322         * interps.h (interp_resume, interp_suspend, interp_set_temp):
4323         Remove declarations.
4324
4325 2017-10-20  Tom Tromey  <tom@tromey.com>
4326
4327         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4328         std::vector.
4329         (gdb_bfd_record_inclusion): Update.
4330         (bfdp): Remove typedef.
4331
4332 2017-10-20  Tom Tromey  <tom@tromey.com>
4333
4334         * gdb_bfd.c (gdb_bfd_ref): Use new.
4335         (struct gdb_bfd_data): Add constructor, destructor, and member
4336         initializers.
4337         (gdb_bfd_unref): Use delete.
4338
4339 2017-10-20  Tom Tromey  <tom@tromey.com>
4340
4341         * exec.c (exec_file_attach): Use new_bfd_ref.
4342         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4343         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4344         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4345         new_bfd_ref.
4346         * gdb_bfd.h (new_bfd_ref): New function.
4347
4348 2017-10-20  Pedro Alves  <palves@redhat.com>
4349
4350         * main.c (captured_command_loop): Add attribute noinline.
4351
4352 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
4353
4354         * interps.c (struct interp_factory): Add constructor.
4355         (interp_factory_p): Remove typedef.
4356         (DEF_VEC_P(interp_factory_p)): Remove.
4357         (interpreter_factories): Change type to std::vector.
4358         (interp_factory_register): Adjust.
4359         (interp_lookup): Adjust.
4360         (interpreter_completer): Adjust.
4361
4362 2017-10-19  Tom Tromey  <tom@tromey.com>
4363
4364         * break-catch-syscall.c (catch_syscall_completer): Use
4365         std::string, gdb::unique_xmalloc_ptr.
4366
4367 2017-10-19  Tom Tromey  <tom@tromey.com>
4368
4369         * infcall.c (call_function_by_hand_dummy): Use std::string.
4370
4371 2017-10-19  Tom Tromey  <tom@tromey.com>
4372
4373         * mi/mi-main.c (mi_cmd_execute): Update.
4374         * top.h (prepare_execute_command): Return scoped_value_mark.
4375         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4376         Add move constructor.
4377         * top.c (prepare_execute_command): Return scoped_value_mark.
4378         (execute_command): Update.
4379
4380 2017-10-19  Pedro Alves  <palves@redhat.com>
4381
4382         * xml-support.c (xml_fetch_content_from_file): Check fread's
4383         return.
4384
4385 2017-10-19  Pedro Alves  <palves@redhat.com>
4386
4387         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4388         async.
4389         (handle_error_fd): New function.
4390         (ser_base_async): Add/delete an event loop file handler for
4391         error_fd.
4392
4393 2017-10-19  Pedro Alves  <palves@redhat.com>
4394
4395         * xml-support.c (xml_fetch_content_from_file): Don't read in
4396         chunks.  Instead use fseek to determine the file's size, and read
4397         it in one go.
4398
4399 2017-11-18  Keith Seitz  <keiths@redhat.com>
4400
4401         * c-exp.y (oper): Canonicalize conversion operators of user-defined
4402         types.
4403         Add whitespace to front of type name.
4404
4405 2017-10-18  Keith Seitz  <keiths@redhat.com>
4406
4407         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4408         DW_AT_accessibility.
4409
4410 2017-10-18  Yao Qi  <yao.qi@linaro.org>
4411
4412         * features/tic6x-c62x-linux.c: Remove.
4413
4414 2017-10-17  Tom Tromey  <tom@tromey.com>
4415
4416         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4417         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4418         (do_mixed_source_and_assembly): Likewise.
4419
4420 2017-10-17  Tom Tromey  <tom@tromey.com>
4421
4422         * regcache.c (regcache::xfer_part): Remove assertion.
4423
4424 2017-10-17  Pedro Alves  <palves@redhat.com>
4425
4426         * xml-support.c (xml_fetch_content_from_file): Call
4427         unique_ptr::release() instead unique_ptr::get() when passing
4428         through xrealloc.
4429
4430 2017-10-17  Yao Qi  <yao.qi@linaro.org>
4431
4432         * regcache.c (regcache::xfer_part): Remove parameters read and
4433         write, add parameter is_raw.  All callers are updated.
4434
4435 2017-10-16  Keith Seitz  <keiths@redhat.com>
4436
4437         * c-typeprint.c (enum access_specifier): Moved here from
4438         c_type_print_base.
4439         (output_access_specifier): New function.
4440         (c_type_print_base): Consider typedefs when assessing
4441         whether access labels are needed.
4442         Use output_access_specifier as needed.
4443         Output access specifier for typedefs, if needed.
4444         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4445         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4446         fields.
4447         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4448         accessor macros.
4449
4450 2017-10-16  Tom Tromey  <tom@tromey.com>
4451
4452         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4453         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4454         * target.c (target_fileio_read_stralloc): Update.
4455         * sparc64-tdep.c (adi_is_addr_mapped): Update.
4456         * target.h (target_fileio_read_stralloc): Return
4457         unique_xmalloc_ptr.
4458
4459 2017-10-16  Tom Tromey  <tom@tromey.com>
4460
4461         * xml-syscall.c (xml_init_syscalls_info): Update.
4462         * xml-support.c (xinclude_start_include): Update.
4463         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4464         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4465         (xml_fetch_content_from_file): Likewise.
4466         * osdata.c (get_osdata): Update.
4467         * target.h (target_read_stralloc, target_get_osdata): Return
4468         unique_xmalloc_ptr.
4469         * solib-aix.c (solib_aix_get_library_list): Update.
4470         * solib-target.c (solib_target_current_sos): Update.
4471         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4472         * xml-tdesc.c (fetch_available_features_from_target): Update.
4473         (target_fetch_description_xml): Update.
4474         (file_read_description_xml): Update.
4475         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4476         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4477         (remote_pid_to_exec_file): Update.
4478         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4479         (target_get_osdata): Likewise.
4480
4481 2017-10-16  Tom Tromey  <tom@tromey.com>
4482
4483         * remote.c (remote_register_number_and_offset): Use std::vector.
4484         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4485         (putpkt_binary): Use gdb::def_vector.
4486         (compare_sections_command): Use gdb::byte_vector.
4487
4488 2017-10-16  Tom Tromey  <tom@tromey.com>
4489
4490         * ppc-linux-nat.c (hwdebug_insert_point): Use
4491         gdb::unique_xmalloc_ptr, XDUP.
4492
4493 2017-10-16  Tom Tromey  <tom@tromey.com>
4494
4495         * probe.c (parse_probes): Use std::string.
4496         (info_probes_for_ops, enable_probes_command)
4497         (disable_probes_command): Remove cleanups.
4498
4499 2017-10-16  Tom Tromey  <tom@tromey.com>
4500
4501         * buildsym.c (block_compar): Remove.
4502         (end_symtab_get_static_block): Use std::vector.
4503
4504 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
4505
4506         * memrange.h (struct mem_range): Define operator< and operator==.
4507         (mem_range_s): Remove.
4508         (DEF_VEC_O (mem_range_s)): Remove.
4509         (normalize_mem_ranges): Change parameter type to std::vector.
4510         * memrange.c (compare_mem_ranges): Remove.
4511         (normalize_mem_ranges): Change parameter type to std::vector,
4512         adjust to vector change.
4513         * exec.c (section_table_available_memory): Return vector, remove
4514         parameter.
4515         (section_table_read_available_memory): Adjust to std::vector
4516         change.
4517         * remote.c (remote_read_bytes): Adjust to std::vector
4518         change.
4519         * tracepoint.h (traceframe_available_memory): Change parameter
4520         type to std::vector.
4521         * tracepoint.c (traceframe_available_memory): Change parameter
4522         type to std::vector, adjust.
4523         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4524         std::vector change.
4525         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4526         unittests/memrange-selftests.c.
4527         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4528         * gdb/unittests/memrange-selftests.c: New file.
4529
4530 2017-10-16  Pedro Alves  <palves@redhat.com>
4531
4532         * elfread.c (probe_key_free): Rename range-for variable.
4533         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4534         (find_probe_by_pc, collect_probes): Rename range-for variable.
4535
4536 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4537
4538         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4539         * features/tic6x-c62x.c: Remove.
4540         * features/tic6x-c64x-linux.c: Remove.
4541         * features/tic6x-c64x.c: Remove.
4542         * features/tic6x-c64xp-linux.c: Remove.
4543         * features/tic6x-c64xp.c: Remove.
4544         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4545         initialize_tdesc_tic6x_*_linux functions.
4546         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4547         initialize_tdesc_tic6x_* functions.
4548
4549 2017-10-16  Yao Qi  <yao.qi@linaro.org>
4550
4551         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4552         tic6x-c62x.
4553         * regformats/tic6x-c62x.dat: Remove.
4554         * regformats/tic6x-c64x.dat: Remove.
4555         * regformats/tic6x-c64xp.dat: Remove.
4556
4557 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
4558
4559         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4560         (the !HAVE_LIBEXPAT version).
4561
4562 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4563
4564         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4565         const.
4566
4567 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4568
4569         * target.h: Include tracepoint.h.
4570         (enum trace_find_type): Move to tracepoint.h.
4571         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4572         * tracepoint.h: Don't include target.h
4573         (enum trace_find_type): Move from target.h.
4574         (parse_traceframe_info): Return a unique ptr.
4575         * tracepoint.c (current_traceframe_info): Change type to unique
4576         ptr.
4577         (free_traceframe_info): Remove.
4578         (clear_traceframe_info): Don't manually free
4579         current_traceframe_info.
4580         (free_result): Remove.
4581         (parse_traceframe_info): Return a unique ptr.
4582         (get_traceframe_info): Adjust to unique ptr.
4583         * ctf.c (ctf_traceframe_info): Return a unique ptr.
4584         * remote.c (remote_traceframe_info): Return a unique ptr.
4585         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4586         ptr.
4587         * target-debug.h (target_debug_print_traceframe_info_up): New
4588         macro.
4589         * target-delegates.c: Regenerate.
4590
4591 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4592
4593         * memrange.h (struct mem_range): Add constructors.
4594         * tracepoint.h (struct traceframe_info) <memory>: Change type to
4595         std::vector<mem_range>.
4596         * tracepoint.c (free_traceframe_info): Don't manually free
4597         vector.
4598         (traceframe_info_start_memory): Adjust to vector change.
4599         (traceframe_available_memory): Likewise.
4600         * tracefile-tfile.c (build_traceframe_info): Likewise.
4601         * ctf.c (ctf_traceframe_info): Likewise.
4602
4603 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4604
4605         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4606         std::vector<int>.
4607         * tracepoint.c (free_traceframe_info): Deallocate with delete.
4608         (traceframe_info_start_tvar): Adjust to vector change.
4609         (parse_traceframe_info): Allocate with new.
4610         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4611         vector change.
4612         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4613         change.
4614         tfile_traceframe_info): Allocate with new.
4615         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4616         change.
4617
4618 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
4619
4620         * tracepoint.c (traceframe_info): Rename to...
4621         (current_traceframe_info): ...this.
4622         (clear_traceframe_info): Adjust.
4623         (get_traceframe_info): Adjust.
4624
4625 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4626
4627         * nat/linux-osdata.c: Include algorithm.
4628         (compare_processes): Remove.
4629         (struct pid_pgid_entry): New struct.
4630         (linux_xfer_osdata_processgroups): Use std::vector instead of
4631         XNEWVEC.
4632
4633 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
4634
4635         * objfiles.h: Don't include symfile.h.
4636         (struct partial_symbol): Remove forward-declaration.
4637         (struct objfile) <global_psymbols, static_psymbols>: Change type
4638         to std::vector<partial_symbol *>.
4639         * objfiles.c (objfile::objfile): Don't memset those fields.
4640         (objfile::~objfile): Don't free those fields.
4641         * psympriv.h (struct psymbol_allocation_list): Remove
4642         forward-declaration.
4643         (add_psymbol_to_list): Change psymbol_allocation_list parameter
4644         to std::vector.
4645         (start_psymtab_common): Change parameters to std::vector.
4646         * psymtab.c: Include algorithm.
4647         (require_partial_symbols): Call shrink_to_fit.
4648         (find_pc_sect_psymbol): Adjust to vector change.
4649         (match_partial_symbol): Likewise.
4650         (lookup_partial_symbol): Likewise.
4651         (psym_relocate): Likewise.
4652         (dump_psymtab): Likewise.
4653         (recursively_search_psymtabs): Likewise.
4654         (compare_psymbols): Remove.
4655         (sort_pst_symbols): Adjust to vector change.
4656         (start_psymtab_common): Likewise.
4657         (end_psymtab_common): Likewise.
4658         (psymbol_bcache_full): De-constify return value.
4659         (add_psymbol_to_bcache): Likewise.
4660         (extend_psymbol_list): Remove.
4661         (append_psymbol_to_list): Adjust to vector change.
4662         (add_psymbol_to_list): Likewise.
4663         (init_psymbol_list): Likewise.
4664         (maintenance_info_psymtabs): Likewise.
4665         (maintenance_check_psymtabs): Likewise.
4666         * symfile.h (struct psymbol_allocation_list): Remove.
4667         * symfile.c (reread_symbols): Adjust to vector change.
4668         * dbxread.c (start_psymtab): Change type of parameters.
4669         (dbx_symfile_read): Adjust to vector change.
4670         (read_dbx_symtab): Likewise.
4671         (start_psymtab): Change type of parameters.
4672         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4673         (create_partial_symtab): Likewise.
4674         (add_partial_symbol): Likewise.
4675         (write_one_signatured_type): Likewise.
4676         (recursively_write_psymbols): Likewise.
4677         * mdebugread.c (parse_partial_symbols): Likewise.
4678         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4679         (scan_xcoff_symtab): Adjust to vector change.
4680         (xcoff_initial_scan): Likewise.
4681
4682 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
4683
4684         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4685
4686 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4687
4688         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4689         Remove s390x-*-expedite, add s390x-expedite.
4690
4691 2017-10-13  Yao Qi  <yao.qi@linaro.org>
4692
4693         * features/s390-gs-linux64.c: Regenerated.
4694         * features/s390x-gs-linux64.c: Regenerated.
4695
4696 2017-10-13  Tom Tromey  <tom@tromey.com>
4697
4698         * compile/compile-object-run.c (do_module_cleanup): Use delete.
4699         * solib.c (update_solib_list, reload_shared_libraries_1): Use
4700         delete.
4701         * symfile.c (symbol_file_add_with_addrs): Use new.
4702         (symbol_file_add_separate): Update comment.
4703         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4704         * jit.c (jit_object_close_impl): Use new.
4705         (jit_unregister_code): Use delete.
4706         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4707         (~objfile): Rename from free_objfile.
4708         (free_objfile_separate_debug, do_free_objfile_cleanup)
4709         (free_all_objfiles, objfile_purge_solibs): Use delete.
4710         * objfiles.h (struct objfile): Add constructor and destructor.
4711         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
4712         (allocate_objfile, free_objfile): Don't declare.
4713         (struct objstats): Add initializers.
4714
4715 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4716
4717         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4718         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4719         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4720         * gdbarch.h: Regenerate.
4721         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4722         Adjust comment.
4723         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4724         (i386_displaced_step_fixup): Adjust comment.
4725         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4726
4727 2017-10-12  Tom Tromey  <tom@tromey.com>
4728
4729         * prologue-value.h (pv_area::store_would_trash): Return bool.
4730         (pv_area::find_reg): Likewise.
4731         * prologue-value.c (pv_area::store_would_trash): Return bool.
4732         (pv_area::find_reg): Likewise.
4733
4734 2017-10-12  Tom Tromey  <tom@tromey.com>
4735
4736         * s390-linux-tdep.c (s390_store, s390_load)
4737         (s390_check_for_saved, s390_analyze_prologue): Update.
4738         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4739         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4740         * prologue-value.h (class pv_area): Move from prologue-value.c.
4741         Change names of members.  Add constructor, destructor, member
4742         functions.
4743         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4744         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4745         (pv_area_fetch, pv_area_scan): Don't declare.
4746         * prologue-value.c (struct pv_area::area_entry): Now member of
4747         pv_area.
4748         (struct pv_area): Move to prologue-value.h.
4749         (pv_area::pv_area): Rename from make_pv_area.
4750         (pv_area::~pv_area): Rename from free_pv_area.
4751         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4752         (clear_entries, find_entry, overlaps, store_would_trash, store)
4753         (fetch, find_reg, scan): Now member of pv_area.
4754         Remove "area" argument.  Update.
4755         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4756         Update.
4757         * mn10300-tdep.c (push_reg, check_for_saved)
4758         (mn10300_analyze_prologue): Update.
4759         * mep-tdep.c (is_arg_spill, check_for_saved)
4760         (mep_analyze_prologue): Update.
4761         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4762         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4763         (m32c_is_struct_return, m32c_analyze_prologue): Update.
4764         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4765         Update.
4766         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4767         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4768
4769 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
4770
4771         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4772         * linux-nat.c (linux_nat_delete_thread): New variable.
4773         (lwp_free): Invoke linux_nat_delete_thread if set.
4774         (linux_nat_set_delete_thread): New function.
4775         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4776         thread delete callback.
4777         * arm-linux-nat.c (arm_linux_delete_thread): New function.
4778         (_initialize_arm_linux_nat): Assign thread delete callback.
4779         * s390-linux-nat.c (s390_delete_thread): New function.
4780         (_initialize_s390_nat): Assign thread delete callback.
4781         * x86-linux-nat.c (x86_linux_add_target): Likewise.
4782         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4783         function.
4784         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4785         declaration.
4786         * nat/x86-linux.c (x86_linux_delete_thread): New function.
4787         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4788
4789 2017-10-09  Tom Tromey  <tom@tromey.com>
4790
4791         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4792         std::string.
4793         * tui/tui-layout.c (enum tui_status): Use std::string.
4794
4795 2017-10-11  Tom Tromey  <tom@tromey.com>
4796
4797         * gdbthread.h (thread_command): Constify.
4798         * inferior.h (detach_command): Constify.
4799         * top.h (set_history, show_history): Constify.
4800         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4801         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4802         * bsd-kvm.c (bsd_kvm_cmd): Constify.
4803         * printcmd.c (set_command): Constify.
4804         (non_const_set_command): New function.
4805         * dcache.c (set_dcache_command, show_dcache_command): Constify.
4806         * breakpoint.c (enable_command, disable_command, delete_command)
4807         (catch_command, tcatch_command, set_breakpoint_cmd)
4808         (show_breakpoint_cmd): Constify.
4809         * macrocmd.c (macro_command): Constify.
4810         * infcmd.c (unset_command, kill_command, detach_command)
4811         (info_proc_cmd): Constify.
4812         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4813         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4814         (info_auto_load_cmd): Constify.
4815         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4816         (unset_tdesc_cmd): Constify.
4817         * ada-lang.c (set_ada_command, show_ada_command)
4818         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4819         * guile/guile.c (set_guile_command, show_guile_command)
4820         (info_guile_command): Constify.
4821         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4822         Constify.
4823         * skip.c (skip_command): Constify.
4824         * compile/compile.c (_initialize_compile): Constify.
4825         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4826         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4827         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4828         (maint_btrace_pt_show_cmd): Constify.
4829         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4830         Constify.
4831         * python/python.c (user_show_python, user_set_python): Constify.
4832         * mips-tdep.c (set_mips_command, show_mips_command)
4833         (set_mipsfpu_command): Constify.
4834         * record-btrace.c (cmd_record_btrace_start)
4835         (cmd_set_record_btrace, cmd_show_record_btrace)
4836         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4837         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4838         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4839         Constify.
4840         * symfile.c (overlay_command): Constify.
4841         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4842         * cli/cli-logging.c (set_logging_command, show_logging_command):
4843         Constify.
4844         * cli/cli-dump.c (dump_command, append_command)
4845         (srec_dump_command, ihex_dump_command, verilog_dump_command)
4846         (tekhex_dump_command, binary_dump_command)
4847         (binary_append_command): Constify.
4848         * cli/cli-decode.c (struct cmd_list_element): Change type of
4849         "fun".
4850         * cli/cli-cmds.c (info_command, show_command, set_debug)
4851         (show_debug): Constify.
4852         (show_command): Add non-const overload.
4853         * top.c (set_history, show_history): Constify.
4854         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4855         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4856         * target.c (target_command): Constify.
4857         * sparc64-tdep.c (info_adi_command): Constify.
4858         * record-full.c (cmd_record_full_start): Constify.
4859         (set_record_full_command): Constify.  Fix typo.
4860         (show_record_full_command): Constify.
4861         * thread.c (thread_command, thread_apply_command): Constify.
4862         * memattr.c (dummy_cmd): Constify.
4863         * value.c (function_command): Constify.
4864         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4865         * probe.c (info_probes_command): Constify.
4866         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4867         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4868         (show_thread_cmd, set_thread_default_cmd)
4869         (show_thread_default_cmd): Constify.
4870         (check_empty): Constify.
4871         * tracepoint.c (tfind_command): Constify.
4872         * cp-support.c (maint_cplus_command): Constify.
4873         * windows-tdep.c (info_w32_command): Constify.
4874         * record.c (cmd_record_start, set_record_command)
4875         (show_record_command, info_record_command, cmd_record_goto):
4876         Constify.
4877         * ravenscar-thread.c (set_ravenscar_command)
4878         (show_ravenscar_command): Constify.
4879         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4880         Constify.
4881         (add_internal_problem_command): Remove casts.
4882         * arc-tdep.c (maintenance_print_arc_command): Constify.
4883         * valprint.c (set_print, show_print, set_print_raw)
4884         (show_print_raw): Constify.
4885         * maint.c (maintenance_command, maintenance_info_command)
4886         (maintenance_print_command, maintenance_set_cmd)
4887         (maintenance_show_cmd, set_per_command_cmd)
4888         (show_per_command_cmd, maintenance_check_command): Constify.
4889         * language.c (set_check, show_check): Constify.
4890         * typeprint.c (show_print_type, set_print_type): Constify.
4891         * go32-nat.c (go32_info_dos_command): Constify.
4892
4893 2017-10-11  Tom Tromey  <tom@tromey.com>
4894
4895         * breakpoint.c (prepare_re_set_context): Remove.
4896         (breakpoint_re_set_one): Update.  Don't use cleanups.
4897         (breakpoint_re_set): Use scoped_restore, std::string, and
4898         scoped_restore_current_language.
4899
4900 2017-10-11  Tom Tromey  <tom@tromey.com>
4901
4902         * breakpoint.c (commands_command_1): Use std::string.
4903         (cleanup_executing_breakpoints): Remove.
4904         (bpstat_do_actions_1): Use scoped_restore.
4905         (bpstat_check_watchpoint): Use std::string.
4906         (decode_static_tracepoint_spec): Likewise.
4907         (break_range_command): Likewise.
4908         (watch_command_1): Likewise.
4909         (compare_breakpoints): Change argument types.
4910         (clear_command): Use std::vector.
4911         (cleanup_executing_breakpoints): Remove.
4912         (update_global_location_list): Use unique_xmalloc_ptr.
4913         (strace_command): Remove unused declaration.
4914
4915 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4916
4917         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4918         * NEWS: Mention new FreeBSD/arm native configuration.
4919         * configure.host: Add arm*-*-freebsd*.
4920         * configure.nat: Likewise.
4921         * arm-fbsd-nat.c: New file.
4922
4923 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
4924
4925         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4926         (ALLDEPFILES): Add arm-fbsd-tdep.c.
4927         * NEWS: Mention new FreeBSD/arm target.
4928         * configure.tgt: Add arm*-*-freebsd*.
4929         * arm-fbsd-tdep.c: New file.
4930         * arm-fbsd-tdep.h: New file.
4931
4932 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4933
4934         * linux-tdep.c (linux_make_corefile_notes): Remove call to
4935         `gdbarch_elfcore_write_linux_prpsinfo'.
4936         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4937         method.
4938         (elf_internal_linux_prpsinfo): Remove declaration.
4939         * gdbarch.h: Regenerate.
4940         * gdbarch.c: Regenerate.
4941
4942 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
4943
4944         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4945         `set_gdbarch_elfcore_write_linux_prpsinfo'.
4946
4947 2017-10-11  Pedro Alves  <palves@redhat.com>
4948
4949         * breakpoint.c (reattach_breakpoints): Delete.
4950         * breakpoint.h (reattach_breakpoints): Delete.
4951
4952 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
4953
4954         * symfile.c (registered_sym_fns): Make struct, not typedef.
4955         (DEF_VEC_O (registered_sym_fns)): Remove.
4956         (symtab_fns): Change type to std::vector.
4957         (add_symtab_fns): Adjust.
4958         (find_sym_fns): Adjust.
4959
4960 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
4961
4962         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4963         * arc-tdep.h (arc_arch_is_em): New function.
4964         (arc_arch_is_hs): Likewise.
4965
4966 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
4967
4968         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4969         parentheses in the declaration.
4970         (macro_lookup_inclusion): Likewise.
4971         (macro_lookup_definition): Likewise.
4972         * p-lang.h (pascal_builtin_types): Likewise.
4973         * tui/tui-data.c (tui_win_list): Likewise.
4974         * tui/tui-data.h (tui_win_list): Likewise.
4975         * utils.h (make_cleanup_free_section_addr_info): Likewise.
4976
4977 2017-10-11  Mark Rages  <markrages@gmail.com>
4978
4979         * target-memory.c (block_boundaries): Fix for block address not
4980         aligned on block size.
4981
4982 2017-10-10  Pedro Alves <palves@redhat.com>
4983             Tom Tromey  <tom@tromey.com>
4984
4985         * breakpoint.c (struct captured_breakpoint_query_args)
4986         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4987         (print_breakpoint): New.
4988         * breakpoint.h (print_breakpoint): Declare.
4989         * common/common-exceptions.h (enum return_reason): Remove
4990         references to catch_exceptions.
4991         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4992         Delete.
4993         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4994         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4995         * gdb.h: Delete.
4996         * gdbthread.h (thread_select): Declare.
4997         * mi/mi-cmd-break.c: Don't include gdb.h.
4998         (breakpoint_notify): Use print_breakpoint.
4999         * mi/mi-cmd-catch.c: Don't include gdb.h.
5000         * mi/mi-interp.c: Don't include gdb.h.
5001         (mi_print_breakpoint_for_event): New.
5002         (mi_breakpoint_created, mi_breakpoint_modified): Use
5003         mi_print_breakpoint_for_event.
5004         * mi/mi-main.c: Don't include gdb.h.
5005         (mi_cmd_thread_select): Parse the global thread ID here.  Use
5006         thread_select instead of gdb_thread_select.
5007         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5008         of using gdb_list_thread_ids.
5009         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
5010         FILEIO_ENOSYS here.
5011         (remote_fileio_request): Use TRY/CATCH instead of
5012         catch_exceptions.
5013         * symfile-mem.c (struct symbol_file_add_from_memory_args)
5014         (symbol_file_add_from_memory_wrapper): Delete.
5015         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5016         * thread.c: Don't include gdb.h.
5017         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5018         (thread_alive): Use thread_select.
5019         (do_captured_thread_select): Delete, parts salvaged as ...
5020         (thread_select): ... this new function.
5021         (gdb_thread_select): Delete.
5022
5023 2017-10-10  Pedro Alves  <palves@redhat.com>
5024             Tom Tromey  <tom@tromey.com>
5025
5026         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5027         and reverse logic.
5028         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5029         No longer macros.  Instead ...
5030         (enum wp_check_result): They're now values of this new
5031         enumeration.
5032         (watchpoint_check): Change return type to wp_check_result and
5033         parameter type to bpstat.
5034         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5035         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5036         catch_errors.  Reverse logic of watchpoint_check call.
5037         (breakpoint_re_set_one): Now returns void and takes a breakpoint
5038         pointer as parameter.
5039         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5040         * common/common-exceptions.c (throw_exception_sjlj): Update
5041         comments to avoid mentioning catch_errors.
5042         * exceptions.c (catch_errors): Delete.
5043         * exceptions.h: Update comments to avoid mentioning catch_errors.
5044         (catch_errors_ftype, catch_errors): Delete.
5045         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5046         (hook_stop_stub): Delete.
5047         (restore_selected_frame): Change return type to void, and
5048         parameter type to const frame_id &.
5049         (restore_infcall_control_state): Use TRY/CATCH instead of
5050         catch_errors.
5051         * main.c (captured_command_loop): Return void and remove
5052         parameter.  Remove references to catch_errors.
5053         (captured_main): Use TRY/CATCH instead of catch_errors.
5054         * objc-lang.c (objc_submethod_helper_data)
5055         (find_objc_msgcall_submethod_helper): Delete.
5056         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5057         catch_errors.
5058         * record-full.c (record_full_message): Return void.
5059         (record_full_message_args, record_full_message_wrapper): Delete.
5060         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5061         instead of catch_errors.
5062         * solib-aix.c (solib_aix_open_symbol_file_object): Change
5063         parameter type to int.
5064         * solib-darwin.c (open_symbol_file_object): Ditto.
5065         * solib-dsbt.c (open_symbol_file_object): Ditto.
5066         * solib-frv.c (open_symbol_file_object): Ditto.
5067         * solib-svr4.c (open_symbol_file_object): Ditto.
5068         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5069         * solib.c (update_solib_list): Use TRY/CATCH instead of
5070         catch_errors.
5071         * solist.h (struct target_so_ops) <open_symbol_file_object>:
5072         Change type.
5073         * symmisc.c (struct print_symbol_args): Remove.
5074         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5075         (print_symbol): Change type.
5076         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5077         and remove parameters.
5078         (catch_errors): New.
5079         (get_windows_debug_event): Adjust.
5080
5081 2017-10-09  Tom Tromey  <tom@tromey.com>
5082
5083         * mi/mi-main.c (free_splay_tree): Remove.
5084         (list_available_thread_groups): Use splay_tree_up.
5085         * common/gdb_splay_tree.h: New file.
5086
5087 2017-10-09  Tom Tromey  <tom@tromey.com>
5088
5089         * mi/mi-main.c (do_nothing): Remove.
5090         (list_available_thread_groups): Update.
5091
5092 2017-10-09  Pedro Alves  <palves@redhat.com>
5093
5094         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5095         reading registers when switching context.
5096
5097 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
5098
5099         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5100         (fbsd_convert_siginfo): Likewise.
5101         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5102
5103 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
5104
5105         * configure.ac (try_guile_versions): Remove guile-2.2.
5106         * configure: Regenerate.
5107
5108 2017-10-09  Tom Tromey  <tom@tromey.com>
5109
5110         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5111         (COMPILE.pre): Use $(CXX).
5112
5113 2017-10-09  Pedro Alves  <palves@redhat.com>
5114
5115         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5116         Use bool.
5117         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5118         * cp-support.h (cp_remove_params): Now returns a
5119         gdb::unique_xmalloc_ptr.
5120         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5121         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5122         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5123         returning a gdb::unique_xmalloc_ptr.
5124         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5125         * stack.c (find_frame_funname): Adjust to cp_remove_params
5126         returning a gdb::unique_xmalloc_ptr.
5127
5128 2017-10-08  Tom Tromey  <tom@tromey.com>
5129
5130         * dwarf2read.c (dwarf2_get_dwz_file): Use
5131         gdb::unique_xmalloc_ptr.
5132         (find_slot_in_mapped_hash): Likewise.
5133         (dwarf2_physname): Likewise.
5134         (create_dwo_unit_in_dwp_v1): Use std::string.
5135         (create_dwo_unit_in_dwp_v2): Likewise.
5136         (lookup_dwo_cutu): Likewise.
5137         (inherit_abstract_dies): Use std::vector.
5138         (read_array_type): Likewise.
5139         (dwarf_decode_macros): Remove unused declaration.
5140         (unsigned_int_compar): Remove.
5141         (dwarf2_build_psymtabs_hard): Use scoped_restore.
5142         (psymtabs_addrmap_cleanup): Remove.
5143
5144 2017-10-08  Tom Tromey  <tom@tromey.com>
5145
5146         * frame-unwind.c (frame_unwind_try_unwinder): Update.
5147         * frame.h (frame_cleanup_after_sniffer): Declare.
5148         (frame_prepare_for_sniffer): Return void.
5149         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
5150         type of argument.
5151         (frame_prepare_for_sniffer): Return void.
5152
5153 2017-10-08  Tom Tromey  <tom@tromey.com>
5154
5155         * utils.h (make_cleanup_value_free): Remove.
5156         * utils.c (do_value_free, struct cleanup): Remove.
5157         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5158         Use gdb_value_up.
5159         * value.h (struct value_deleter): New.
5160         (gdb_value_up): New typedef.
5161
5162 2017-10-08  Tom Tromey  <tom@tromey.com>
5163
5164         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5165         (make_cleanup_free_search_symbols): Remove.
5166         (search_symbols): Return std::vector.
5167         (symbol_search::compare_search_syms): Now member of
5168         symbol_search.  Change arguments.
5169         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
5170         (symtab_symbol_info, rbreak_command): Update.
5171         * symtab.h (struct symbol_search) <next>: Remove.
5172         Add constructors.
5173         (symbol_search::operator<): New function.
5174         (symbol_search::operator==): New function.
5175         (search_symbols): Remove std::vector.
5176         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5177         (symbol_search::compare_search_syms): Declare.
5178
5179 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5180
5181         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5182         arch/aarch64-insn.o.
5183         Remove one rule.
5184         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5185
5186 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5187
5188         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5189         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5190         arch/arm-linux.o respectively.
5191         * configure.tgt: Likewise.
5192
5193 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5194
5195         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5196         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5197
5198 2017-10-06  Pedro Alves  <palves@redhat.com>
5199
5200         * windows-nat.c: Include <algorithm>.
5201
5202 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5203
5204         * configure.tgt (i386_tobjs): New variable.
5205         (amd64_tobjs): New variable.
5206         Set $cpu_obs and $os_obs.
5207
5208 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5209
5210         * Makefile.in (CONFIG_SRC_SUBDIR): New.
5211         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5212         (clean): Remove object files and dependency files.
5213         (distclean): Remove the directory.
5214         * configure.ac: Invoke AC_CONFIG_COMMANDS.
5215         * configure: Re-generated.
5216         * configure.tgt: Replace amd64.o with arch/amd64.o.
5217
5218 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
5219
5220         PR build/22188
5221         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5222         and SETEND.
5223
5224 2017-10-05  Pedro Alves  <palves@redhat.com>
5225
5226         * linux-nat.c (linux_child_follow_fork): When following the parent
5227         and detaching the child, consult the parent thread's architecture
5228         instead of the child's.
5229
5230 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5231
5232         * ax.h: Do not include "doublest.h".
5233         (union agent_val): Remove.
5234
5235 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5236
5237         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5238         (decimal_to_string): Return std::string object.
5239         (decimal_from_string): Accept std::string object.  Return bool.
5240         (decimal_from_integral, decimal_from_doublest): Remove.
5241         (decimal_from_longest): Add prototype.
5242         (decimal_from_ulongest): Likewise.
5243         (decimal_to_longest): Likewise.
5244         (decimal_from_doublest): Likewise.
5245         * dfp.c: Do not include "gdbtypes.h" or "value.h".
5246         (MAX_DECIMAL_STRING): Move here.
5247         (decimal_to_string): Return std::string object.
5248         (decimal_from_string): Accept std::string object.  Return bool.
5249         (decimal_from_integral): Remove, replace by ...
5250         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5251         (decimal_to_longest): New function.
5252         (decimal_from_floating): Remove, replace by ...
5253         (decimal_from_doublest): ... this new function.
5254         (decimal_to_doublest): Update to new decimal_to_string interface.
5255
5256         * value.c (unpack_long): Use decimal_to_longest.
5257         * valops.c (value_cast): Use decimal_from_doublest instead of
5258         decimal_from_floating.  Use decimal_from_[u]longest isntead of
5259         decimal_from_integral.
5260         * valarith.c (value_args_as_decimal): Likewise.
5261         * valprint.c (print_decimal_floating): Update to new
5262         decimal_to_string interface.
5263         * printcmd.c (printf_decfloat): Likewise.
5264         * c-exp.y (parse_number): Update to new decimal_from_string interface.
5265
5266 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5267
5268         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
5269         * gdbtypes.c: Include "floatformat.h".
5270         * value.c: Likewise.
5271         * m68k-tdep.c: Likewise.
5272
5273         * findvar.c: Do not include "floatformat.h".
5274         * amd64-darwin-tdep.c: Likewise.
5275         * arm-linux-tdep.c: Likewise.
5276         * i386-darwin-tdep.c: Likewise.
5277         * i387-tdep.c: Likewise.
5278         * m68k-linux-tdep.c: Likewise.
5279         * mep-tdep.c: Likewise.
5280         * mips-tdep.c: Likewise.
5281         * nios2-tdep.c: Likewise.
5282         * s390-linux-tdep.c: Likewise.
5283         * sparc-obsd-tdep.c: Likewise.
5284         * sparc-tdep.c: Likewise.
5285         * sparc64-tdep.c: Likewise.
5286         * spu-tdep.c: Likewise.
5287         * tic6x-tdep.c: Likewise.
5288         * tilegx-tdep.c: Likewise.
5289         * vax-tdep.c: Likewise.
5290         * xstormy16-tdep.c: Likewise.
5291         * xtensa-tdep.c: Likewise.
5292
5293         * top.c: Do not include "doublest.h".
5294         * aarch64-tdep.c: Likewise.
5295         * alpha-tdep.c: Likewise.
5296         * arm-linux-tdep.c: Likewise.
5297         * m68k-linux-tdep.c: Likewise.
5298         * tilegx-tdep.c: Likewise.
5299         * xstormy16-tdep.c: Likewise.
5300
5301 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5302
5303         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5304         (mipsn32_fbsd_sigframe): Define.
5305         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5306         for FreeBSD/mipsn32.
5307
5308 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5309
5310         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5311         AT_HWCAP.
5312
5313 2017-10-05  Tristan Gingold  <tgingold@free.fr>
5314
5315         * MAINTAINERS (Misc): Update my email address.
5316
5317 2017-10-04  Pedro Alves  <palves@redhat.com>
5318
5319         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
5320         it instead of target_gdbarch.
5321         (get_remote_state, get_remote_packet_size): Adjust
5322         get_remote_arch_state calls, passing down target_gdbarch
5323         explicitly.
5324         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5325         'gdbarch' and use it instead of target_gdbarch.
5326         (get_memory_packet_size): Adjust get_remote_arch_state calls,
5327         passing down target_gdbarch explicitly.
5328         (struct stop_reply) <arch>: New field.
5329         (remote_parse_stop_reply): Use the stopped thread's architecture,
5330         not the current inferior's.  Save the architecture in the
5331         stop_reply.
5332         (process_stop_reply): Use the stop reply's architecture.
5333         (process_g_packet, remote_fetch_registers)
5334         (remote_prepare_to_store, store_registers_using_G)
5335         (remote_store_registers): Adjust get_remote_arch_state calls,
5336         using the regcache's architecture.
5337         (remote_get_trace_status): Adjust get_remote_arch_state calls,
5338         passing down target_gdbarch explicitly.
5339         * spu-multiarch.c (spu_thread_architecture): Defer to the target
5340         beneath instead of calling target_gdbarch.
5341         * target.c (default_thread_architecture): Use the specified
5342         inferior's architecture, instead of the current inferior's
5343         architecture (via target_gdbarch).
5344
5345 2017-10-04  Pedro Alves  <palves@redhat.com>
5346
5347         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5348         case.
5349         (regcache_print): Handle !target_has_registers here instead.
5350
5351 2017-10-04  Pedro Alves  <palves@redhat.com>
5352
5353         * frame.c (create_test_frame): Delete.
5354         * frame.h (create_test_frame): Delete.
5355         * gdbarch-selftests.c: Include gdbthread.h and target.h.
5356         (class regcache_test): Delete.
5357         (test_target_has_registers, test_target_has_stack)
5358         (test_target_has_memory, test_target_prepare_to_store)
5359         (test_target_store_registers): New functions.
5360         (test_target_ops): New class.
5361         (register_to_value_test): Error out if there's already a
5362         process_stratum (or higher) target pushed.  Create a fuller mock
5363         environment, with mock target_ops, inferior, address space, thread
5364         and inferior_ptid.
5365         * progspace.c (struct address_space): Move to ...
5366         * progspace.h (struct address_space): ... here.
5367         * regcache.h (regcache::~regcache, regcache::raw_write)
5368         [GDB_SELF_TEST]: No longer virtual.
5369
5370 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
5371
5372         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5373
5374 2017-10-04  Pedro Alves  <palves@redhat.com>
5375
5376         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5377         out of 'between TRY and CATCH'.
5378
5379 2017-10-04  Pedro Alves  <palves@redhat.com>
5380
5381         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5382         * common/common-exceptions.h (TRY): Open an outermost scope.
5383         Expand intro comment.
5384         (CATCH): Reindent.
5385         (END_CATCH): Close the outermost scope.
5386         * completer.c (complete_line_internal): Add missing END_CATCH.
5387
5388 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5389
5390         * NEWS (Changes since GDB 8.0): Add entry about new
5391         'set-cwd-on-gdbserver' feature.
5392         (New remote packets): Add entry for QSetWorkingDir.
5393         * common/common-inferior.h (set_inferior_cwd): New prototype.
5394         * infcmd.c (set_inferior_cwd): Remove "static".
5395         (show_cwd_command): Expand text to include remote debugging.
5396         * remote.c: Add PACKET_QSetWorkingDir.
5397         (remote_protocol_features) <QSetWorkingDir>: New entry for
5398         PACKET_QSetWorkingDir.
5399         (extended_remote_set_inferior_cwd): New function.
5400         (extended_remote_create_inferior): Call
5401         "extended_remote_set_inferior_cwd".
5402         (_initialize_remote): Call "add_packet_config_cmd" for
5403         QSetWorkingDir.
5404
5405 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5406
5407         * NEWS (New commands): Mention "set/show cwd".
5408         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5409         "cd" command's help text.
5410         * common/common-inferior.h (get_inferior_cwd): New prototype.
5411         * infcmd.c (inferior_cwd_scratch): New global variable.
5412         (set_inferior_cwd): New function.
5413         (get_inferior_cwd): Likewise.
5414         (set_cwd_command): Likewise.
5415         (show_cwd_command): Likewise.
5416         (_initialize_infcmd): Add "set/show cwd" commands.
5417         * inferior.h (class inferior) <cwd>: New field.
5418         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5419         (fork_inferior): Change inferior's cwd before its execution.
5420         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5421         to CreateProcess.
5422
5423 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5424
5425         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5426         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5427         (COMMON_OBS): Add gdb_tilde_expand.o.
5428         * common/gdb_tilde_expand.c: New file.
5429         * common/gdb_tilde_expand.h: Likewise.
5430
5431 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
5432
5433         * gdbarch.sh (objfile): Remove duplicate declaration.
5434         * gdbarch.h: Regenerate.
5435
5436 2017-10-03  Tom Tromey  <tom@tromey.com>
5437
5438         * utils.c (internal_vproblem): Use string_vprintf.
5439
5440 2017-10-03  Tom Tromey  <tom@tromey.com>
5441
5442         * printcmd.c (info_symbol_command): Use std::string.
5443
5444 2017-10-03  Tom Tromey  <tom@tromey.com>
5445
5446         * top.c (gdb_safe_append_history): Use std::string.
5447
5448 2017-10-03  Tom Tromey  <tom@tromey.com>
5449
5450         * event-top.c (stdin_event_handler): Update.
5451         * main.c (captured_main_1): Update.
5452         * top.h (make_delete_ui_cleanup): Remove.
5453         (struct ui): Add constructor and destructor.
5454         (new_ui, delete_ui): Remove.
5455         * top.c (make_delete_ui_cleanup): Remove.
5456         (new_ui_command): Use std::unique_ptr.
5457         (delete_ui_cleanup): Remove.
5458         (ui::ui): Rename from new_ui.  Update.
5459         (free_ui): Remove.
5460         (ui::~ui): Rename from delete_ui.  Update.
5461
5462 2017-10-03  Tom Tromey  <tom@tromey.com>
5463
5464         * symfile.c (load_progress): Use gdb::byte_vector.
5465
5466 2017-10-03  Tom Tromey  <tom@tromey.com>
5467
5468         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5469         declaration.
5470         * printcmd.c (x_command): Remove unused declaration.
5471         * symfile.c (symbol_file_command): Remove unused declaration.
5472
5473 2017-10-03  Tom Tromey  <tom@tromey.com>
5474
5475         * utils.c (internal_vproblem): Use std::string.
5476         (defaulted_query): Likewise.
5477
5478 2017-10-03  Tom Tromey  <tom@tromey.com>
5479
5480         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5481         * top.c (execute_command_to_string): Update.
5482         * utils.c (make_cleanup_restore_page_info): Remove.
5483         (do_restore_page_info_cleanup): Remove.
5484         (set_batch_flag_and_restore_page_info):
5485         New.
5486         (make_cleanup_restore_page_info): Remove.
5487         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5488         (~set_batch_flag_and_restore_page_info): New
5489         (make_cleanup_restore_uinteger): Remove.
5490         (make_cleanup_restore_integer): Remove.
5491         (struct restore_integer_closure): Remove.
5492         (restore_integer): Remove.
5493         * utils.h (struct set_batch_flag_and_restore_page_info): New
5494         class.
5495         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5496         (make_cleanup_restore_page_info): Remove.
5497         (make_cleanup_restore_uinteger) Remove.
5498         (make_cleanup_restore_integer) Remove.
5499
5500 2017-10-03  Tom Tromey  <tom@tromey.com>
5501
5502         * record-full.h (record_full_gdb_operation_disable_set): Return
5503         scoped_restore_tmpl<int>.
5504         * infrun.c (adjust_pc_after_break): Update.
5505         (handle_signal_stop): Update.
5506         * record-full.c (record_full_gdb_operation_disable_set): Return
5507         scoped_restore_tmpl<int>.
5508         (record_full_wait_1, record_full_insert_breakpoint)
5509         (record_full_remove_breakpoint, record_full_save)
5510         (record_full_goto_insn): Update.
5511
5512 2017-10-02  Tom Tromey  <tom@tromey.com>
5513
5514         PR rust/22236:
5515         * rust-lang.c (rust_val_print_str): New function.
5516         (val_print_struct): Call it.
5517         (rust_subscript): Preserve name of slice type.
5518
5519 2017-10-02  Tom Tromey  <tom@tromey.com>
5520
5521         * rust-lang.c (rust_subscript): Handle slices in
5522         EVAL_AVOID_SIDE_EFFECTS case.
5523
5524 2017-10-02  Tom Tromey  <tom@tromey.com>
5525
5526         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5527
5528 2017-10-02  Tom Tromey  <tom@tromey.com>
5529
5530         * rust-lang.h (rust_slice_type): Add "extern".
5531
5532 2017-10-02  Tom Tromey  <tom@tromey.com>
5533             Pedro Alves  <palves@redhat.com>
5534
5535         * ada-lang.h (ada_exc_info::operator<): Make const.
5536         (ada_exc_info::operator==): Make const.
5537         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5538         Make const.
5539
5540 2017-09-29  Tom Tromey  <tom@tromey.com>
5541
5542         * target.c (read_whatever_is_readable): Change type of "result".
5543         Update.
5544         (free_memory_read_result_vector): Remove.
5545         (read_memory_robust): Change return type.  Update.
5546         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
5547         bin2hex, std::string.
5548         * target.h (memory_read_result_s): Remove typedef.
5549         (free_memory_read_result_vector): Remove.
5550         (read_memory_robust): Return std::vector.
5551
5552 2017-09-29  Tom Tromey  <tom@tromey.com>
5553
5554         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5555
5556 2017-09-29  Tom Tromey  <tom@tromey.com>
5557
5558         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5559         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
5560         operator< and operator==.
5561         (ada_exceptions_list): Return a std::vector.
5562         * ada-lang.c (ada_exc_info::operator<): Rename from
5563         compare_ada_exception_info.
5564         (ada_exc_info::operator==): New.
5565         (sort_remove_dups_ada_exceptions_list): Change type of
5566         "exceptions".
5567         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5568         (ada_add_global_exceptions): Likewise.
5569         (ada_exceptions_list_1): Return a std::vector.
5570         (ada_exceptions_list): Likewise.
5571
5572 2017-09-29  Tom Tromey  <tom@tromey.com>
5573
5574         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5575         'std::set *'.
5576         (print_one_inferior): Update.
5577         (free_vector_of_ints): Remove.
5578         (list_available_thread_groups): Change "ids" to std::set.
5579         (mi_cmd_list_thread_groups): Update.
5580         (struct collect_cores_data) <core>: Now a std::set.
5581         (collect_cores): Update.
5582         (unique): Remove.
5583         (print_one_inferior): Update.
5584
5585 2017-09-29  Tom Tromey  <tom@tromey.com>
5586
5587         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5588         (mi_execute_async_cli_command): Likewise.
5589         (mi_cmd_trace_frame_collected): Use field_fmt.
5590
5591 2017-09-29  Tom Tromey  <tom@tromey.com>
5592
5593         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5594         gdb::byte_vector.
5595
5596 2017-09-29  Tom Tromey  <tom@tromey.com>
5597
5598         * mi/mi-parse.c (mi_parse): Remove unused declaration.
5599
5600 2017-09-29  Tom Tromey  <tom@tromey.com>
5601
5602         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5603
5604 2017-09-29  Tom Tromey  <tom@tromey.com>
5605
5606         * varobj.h (varobj_gen_name): Return std::string.
5607         * varobj.c (varobj_gen_name): Return std::string.
5608         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5609         (mi_cmd_var_delete): Don't copy "name".
5610
5611 2017-09-29  Tom Tromey  <tom@tromey.com>
5612
5613         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5614         (mi_cmd_break_insert_1): Update.
5615
5616 2017-09-29  Tom Tromey  <tom@tromey.com>
5617
5618         * target.h (make_scoped_defer_target_commit_resume): Update.
5619         * target.c (make_scoped_defer_target_commit_resume): Rename from
5620         make_cleanup_defer_target_commit_resume.  Return a
5621         scoped_restore.
5622         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5623
5624 2017-09-29  Tom Tromey  <tom@tromey.com>
5625
5626         * main.c (captured_main_1): Remove unused declaration.
5627         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5628
5629 2017-09-29  Tom Tromey  <tom@tromey.com>
5630
5631         * symtab.c (search_symbols): Remove unused outer cleanup.
5632         (make_source_files_completion_list): Remove unused declaration.
5633
5634 2017-09-29  Tom Tromey  <tom@tromey.com>
5635
5636         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5637
5638 2017-09-29  Tom Tromey  <tom@tromey.com>
5639
5640         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5641         gdb::byte_vector.
5642
5643 2017-09-29  Tom Tromey  <tom@tromey.com>
5644
5645         * complaints.c (vcomplaint): Use std::string.
5646
5647 2017-09-29  Tom Tromey  <tom@tromey.com>
5648
5649         * tracepoint.c (trace_variable_command): Use std::string.
5650         (encode_actions_1): Remove unused declarations.
5651         (create_tsv_from_upload): Use std::string.
5652
5653 2017-09-29  Tom Tromey  <tom@tromey.com>
5654
5655         * cp-support.c (gdb_demangle): Use std::string.
5656
5657 2017-09-29  Tom Tromey  <tom@tromey.com>
5658
5659         * stack.c (parse_frame_specification): Use std::string
5660         (info_frame_command): Use gdb::unique_xmalloc_ptr.
5661
5662 2017-09-29  Tom Tromey  <tom@tromey.com>
5663
5664         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5665
5666 2017-09-29  Tom Tromey  <tom@tromey.com>
5667
5668         * utils.c (vfprintf_maybe_filtered): Use std::string.
5669         (vfprintf_unfiltered): Likewise.
5670
5671 2017-09-29  Tom Tromey  <tom@tromey.com>
5672
5673         * event-top.c (top_level_prompt): Return std::string.
5674         (display_gdb_prompt): Update.
5675
5676 2017-09-29  Tom Tromey  <tom@tromey.com>
5677
5678         * unittests/common-utils-selftests.c (format): New function.
5679         (string_vprintf_tests): New function.
5680         (_initialize_common_utils_selftests): Register new tests.
5681         * common/common-utils.c (string_vprintf): New function.
5682         * common/common-utils.h (string_vprintf): Declare.
5683
5684 2017-09-29  Pedro Alves  <palves@redhat.com>
5685
5686         * common/rsp-low.c (unpack_varlen_hex): Constify.
5687         * common/rsp-low.h (unpack_varlen_hex): Constify.
5688         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5689         Constify.
5690         * remote.c (remote_set_permissions, read_ptid)
5691         (remote_current_thread, remote_get_threads_with_qthreadinfo)
5692         (remote_static_tracepoint_marker_at)
5693         (remote_static_tracepoint_markers_by_strid)
5694         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5695         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5696         (parse_tracepoint_definition, parse_tsv_definition)
5697         (parse_static_tracepoint_marker_definition): Constify.
5698         * tracepoint.h (parse_static_tracepoint_marker_definition)
5699         (parse_trace_status, parse_tracepoint_status)
5700         (parse_tracepoint_definition, parse_tsv_definition): Constify.
5701
5702 2017-09-29  Pedro Alves  <palves@redhat.com>
5703
5704         * remote.c (target_buf, target_buf_size): Delete.
5705         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5706         Use the connection's packet buffer instead.
5707         All callers adjusted.
5708         (_initialize_remote): Remove references to target_buf and
5709         target_buf_size.
5710
5711 2017-09-28  Pedro Alves  <palves@redhat.com>
5712
5713         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5714         unittests/common-utils-selftests.c.
5715         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5716         (COMMON_OBS): Remove utils-selftests.o.
5717         * utils-selftests.c: Move to ...
5718         * unittests/common-utils-selftests.c: ... here and rename self
5719         test to "string_printf".
5720
5721 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5722
5723         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5724         having NULL cus or tus.
5725
5726 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5727
5728         * arm-tdep.c: (convert_from_extended): Remove.
5729         (convert_to_extended): Likewise.
5730         (arm_extract_return_value): Use convert_typed_floating.
5731         (arm_store_return_value): Likewise.
5732
5733         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5734         * sh-tdep.c: Do not include "floatformat.h".
5735         (sh_littlebyte_bigword_type): New function.
5736         (sh_register_convert_to_virtual): Use convert_typed_floating.
5737         (sh_register_convert_to_raw): Likewise.
5738         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5739         (sh64_littlebyte_bigword_type): New function.
5740         (sh64_extract_return_value): Use convert_typed_floating.
5741         (sh64_register_convert_to_virtual): Likewise.
5742         (sh64_register_convert_to_raw): Likewise.
5743
5744 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5745
5746         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5747         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5748
5749         * gdbtypes.h (union type_specific): Make field floatformat hold
5750         just a single struct floatformat, not an array.
5751         (floatformat_from_type): Move here.
5752         * gdbtypes.c (floatformat_from_type): Move here.  Update to
5753         changed TYPE_FLOATFORMAT definition.
5754         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5755         (recursive_dump_type): Likewise.
5756         (init_float_type): Install correct floatformat for byte order.
5757         (arch_float_type): Likewise.
5758
5759 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
5760
5761         * gdbtypes.c (init_type): Change incoming argument from
5762         length-in-bytes to length-in-bits.  Assert length is a
5763         multiple of TARGET_CHAR_BITS.
5764         (arch_type, arch_flags_type): Likewise.
5765         (init_integer_type): Update call to init_type.
5766         (init_character_type): Likewise.
5767         (init_boolean_type): Likewise.
5768         (init_float_type): Likewise.
5769         (init_decfloat_type): Likewise.
5770         (init_complex_type): Likewise.
5771         (init_pointer_type): Likewise.
5772         (objfile_type): Likewise.
5773         (arch_integer_type): Update call to arch_type.
5774         (arch_character_type): Likewise.
5775         (arch_boolean_type): Likewise.
5776         (arch_float_type): Likewise.
5777         (arch_decfloat_type): Likewise.
5778         (arch_complex_type): Likewise.
5779         (arch_pointer_type): Likewise.
5780         (gdbtypes_post_init): Likewise.
5781
5782         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5783         (read_base_type): Likewise.
5784         * mdebugread.c (basic_type): Likewise.
5785         * stabsread.c (dbx_init_float_type): Likewise.
5786         (rs6000_builtin_type): Likewise.
5787         (read_range_type): Likewise.  Also, fix call to init_integer_type
5788         with erroneous length argument.
5789
5790         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5791         * d-lang.c (build_d_types): Likewise.
5792         * f-lang.c (build_fortran_types): Likewise.
5793         * go-lang.c (build_go_types): Likewise.
5794         * opencl-lang.c (build_opencl_types): Likewise.
5795         * jit.c (finalize_symtab): Likewise.
5796         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5797         (build_std_type_info_type): Likewise.
5798         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
5799         update call to arch_flags_type.
5800
5801         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5802         arch_type.
5803         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5804         * windows-tdep.c (windows_get_tlb_type): Likewise.
5805
5806         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5807         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5808         * m32c-tdep.c (make_types): Likewise.
5809         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5810         (rl78_psw_type): Update call to arch_flags_type.
5811         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5812         * rx-tdep.c (rx_psw_type): Likewise.
5813         (rx_fpsw_type): Likewise.
5814         * sparc-tdep.c (sparc_psr_type): Likewise.
5815         (sparc_fsr_type): Likewise.
5816         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5817         (sparc64_ccr_type): Likewise.
5818         (sparc64_fsr_type): Likewise.
5819         (sparc64_fprs_type): Likewise.
5820
5821 2017-09-27  Tom Tromey  <tom@tromey.com>
5822
5823         * findcmd.c (find_command): Constify.
5824
5825 2017-09-27  Tom Tromey  <tom@tromey.com>
5826
5827         * ada-tasks.c (task_command_1, task_command): Constify.
5828
5829 2017-09-27  Tom Tromey  <tom@tromey.com>
5830
5831         * symtab.c (maintenance_print_symbol_cache)
5832         (maintenance_flush_symbol_cache)
5833         (maintenance_print_symbol_cache_statistics): Constify.
5834
5835 2017-09-27  Tom Tromey  <tom@tromey.com>
5836
5837         * inferior.c (detach_inferior_command, kill_inferior_command)
5838         (inferior_command): Constify.
5839
5840 2017-09-27  Tom Tromey  <tom@tromey.com>
5841
5842         * regcache.c (regcache_print, maintenance_print_registers)
5843         (maintenance_print_raw_registers)
5844         (maintenance_print_cooked_registers)
5845         (maintenance_print_register_groups)
5846         (maintenance_print_remote_registers): Constify.
5847
5848 2017-09-27  Tom Tromey  <tom@tromey.com>
5849
5850         * printcmd.c (map_display_numbers, undisplay_command)
5851         (enable_disable_display_command, enable_display_command)
5852         (disable_display_command): Constify.
5853
5854 2017-09-27  Tom Tromey  <tom@tromey.com>
5855
5856         * breakpoint.h (delete_command): Don't declare.
5857         * breakpoint.c (delete_command, enable_once_command)
5858         (enable_count_command, enable_delete_command, breakpoint_1)
5859         (maintenance_info_breakpoints, stopin_command, stopat_command)
5860         (delete_command, delete_trace_command, save_breakpoints)
5861         (save_breakpoints_command, save_tracepoints_command): Constify.
5862
5863 2017-09-27  Tom Tromey  <tom@tromey.com>
5864
5865         * macrocmd.c (macro_expand_command, macro_expand_once_command)
5866         (skip_ws, extract_identifier, macro_define_command)
5867         (macro_undef_command, macro_list_command): Constify.
5868
5869 2017-09-27  Tom Tromey  <tom@tromey.com>
5870
5871         * infcmd.c (environment_info, set_environment_command)
5872         (unset_environment_command, path_info, info_proc_cmd_1)
5873         (info_proc_cmd_mappings, info_proc_cmd_stat)
5874         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5875         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5876
5877 2017-09-27  Tom Tromey  <tom@tromey.com>
5878
5879         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5880         Constify.
5881
5882 2017-09-27  Tom Tromey  <tom@tromey.com>
5883
5884         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5885
5886 2017-09-27  Tom Tromey  <tom@tromey.com>
5887
5888         * demangle.c (demangle_command): Constify.
5889
5890 2017-09-27  Tom Tromey  <tom@tromey.com>
5891
5892         * progspace.c (maintenance_info_program_spaces_command):
5893         Constify.
5894
5895 2017-09-27  Tom Tromey  <tom@tromey.com>
5896
5897         * compile/compile.c (check_raw_argument, compile_file_command)
5898         (compile_code_command, compile_print_command): Constify.
5899
5900 2017-09-27  Tom Tromey  <tom@tromey.com>
5901
5902         * reggroups.c (maintenance_print_reggroups): Constify.
5903
5904 2017-09-27  Tom Tromey  <tom@tromey.com>
5905
5906         * dwarf2read.c (save_gdb_index_command): Constify.
5907
5908 2017-09-27  Tom Tromey  <tom@tromey.com>
5909
5910         * stap-probe.c (info_probes_stap_command): Constify.
5911
5912 2017-09-27  Tom Tromey  <tom@tromey.com>
5913
5914         * fork-child.c (unset_exec_wrapper_command): Constify.
5915
5916 2017-09-27  Tom Tromey  <tom@tromey.com>
5917
5918         * btrace.c (get_uint, get_context_size, no_chunk)
5919         (maint_btrace_packet_history_cmd)
5920         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5921         (maint_info_btrace_cmd): Constify.
5922
5923 2017-09-27  Tom Tromey  <tom@tromey.com>
5924
5925         * reverse.c (delete_bookmark_command): Constify.
5926
5927 2017-09-27  Tom Tromey  <tom@tromey.com>
5928
5929         * remote.c (set_memory_packet_size)
5930         (set_memory_write_packet_size, show_memory_write_packet_size)
5931         (set_memory_read_packet_size, show_memory_read_packet_size)
5932         (compare_sections_command, packet_command, remote_put_command)
5933         (remote_get_command, remote_delete_command): Constify.
5934
5935 2017-09-27  Tom Tromey  <tom@tromey.com>
5936
5937         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5938         (set_mipsfpu_double_command, set_mipsfpu_none_command)
5939         (set_mipsfpu_auto_command): Constify.
5940
5941 2017-09-27  Tom Tromey  <tom@tromey.com>
5942
5943         * cli/cli-cmds.h (cd_command): Constify.
5944         * cli/cli-cmds.c (cd_command): Constify.
5945
5946 2017-09-27  Tom Tromey  <tom@tromey.com>
5947
5948         * thread.c (thread_name_command, thread_find_command): Constify.
5949
5950 2017-09-27  Tom Tromey  <tom@tromey.com>
5951
5952         * probe.c (enable_probes_command, disable_probes_command):
5953         Constify.
5954
5955 2017-09-27  Tom Tromey  <tom@tromey.com>
5956
5957         * symfile.c (symbol_file_command): Constify.
5958         * gdbcore.h (deprecated_file_changed_hook): Constify.
5959         * exec.c (deprecated_file_changed_hook, exec_file_command)
5960         (file_command): Constify.
5961         * defs.h (symbol_file_command): Constify.
5962
5963 2017-09-27  Tom Tromey  <tom@tromey.com>
5964
5965         * remote-fileio.c (set_system_call_allowed)
5966         (show_system_call_allowed): Constify.
5967
5968 2017-09-27  Tom Tromey  <tom@tromey.com>
5969
5970         * tracepoint.c (delete_trace_variable_command)
5971         (tfind_end_command, tfind_start_command, tfind_pc_command)
5972         (tfind_tracepoint_command, tfind_line_command)
5973         (tfind_range_command, tfind_outside_command): Constify.
5974
5975 2017-09-27  Tom Tromey  <tom@tromey.com>
5976
5977         * ax-gdb.c (maint_agent_printf_command, agent_command)
5978         (agent_eval_command): Constify.
5979
5980 2017-09-27  Tom Tromey  <tom@tromey.com>
5981
5982         * tracepoint.c (info_scope_command): Constify.
5983         * python/python.c (gdbpy_decode_line): Constify.
5984         * python/py-breakpoint.c (bppy_init): Constify.
5985         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5986         * location.h: (new_linespec_location)
5987         (string_to_event_location_basic, string_to_event_location):
5988         Constify.
5989         * location.c (new_linespec_location)
5990         (string_to_event_location_basic, string_to_event_location):
5991         Constify.
5992         * linespec.h (decode_line_with_current_source)
5993         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5994         * linespec.c (linespec_lex_to_end)
5995         (decode_line_with_current_source)
5996         (decode_line_with_last_displayed): Constify.
5997         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5998         Constify.
5999         * cli/cli-cmds.c (edit_command, list_command): Constify.
6000         * breakpoint.h (until_break_command, watch_command_wrapper)
6001         (awatch_command_wrapper, rwatch_command_wrapper)
6002         (init_ada_exception_breakpoint): Constify.
6003         * breakpoint.c (break_command_1, dprintf_command)
6004         (break_range_command, watch_command_wrapper)
6005         (rwatch_command_wrapper, awatch_command_wrapper)
6006         (until_break_command, init_ada_exception_breakpoint)
6007         (strace_marker_create_sals_from_location, trace_command)
6008         (ftrace_command, strace_command, struct tracepoint): Constify.
6009         * ax-gdb.c (agent_command_1): Constify.
6010         * ada-lang.c (ada_exception_sal): Constify.
6011
6012 2017-09-27  Tom Tromey  <tom@tromey.com>
6013
6014         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6015         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6016         (get_context_size, no_chunk, get_insn_history_modifiers)
6017         (cmd_record_insn_history, get_call_history_modifiers)
6018         (cmd_record_call_history): Constify.
6019
6020 2017-09-27  Tom Tromey  <tom@tromey.com>
6021
6022         * source.c (show_substitute_path_command)
6023         (unset_substitute_path_command, set_substitute_path_command):
6024         Constify.
6025
6026 2017-09-27  Tom Tromey  <tom@tromey.com>
6027
6028         * typeprint.c (maintenance_print_type): Constify.
6029         * maint.c (maintenance_dump_me, maintenance_demangle)
6030         (maintenance_time_display, maintenance_info_sections)
6031         (maintenance_print_statistics, maintenance_deprecate)
6032         (maintenance_undeprecate): Constify.
6033         (maintenance_do_deprecate): Constify.  Use std::string.
6034         (maintenance_selftest): Constify.
6035         * gdbtypes.h (maintenance_print_type): Constify.
6036
6037 2017-09-27  Tom Tromey  <tom@tromey.com>
6038
6039         * hppa-tdep.c (unwind_command): Constify.
6040
6041 2017-09-27  Tom Tromey  <tom@tromey.com>
6042
6043         * target-descriptions.c (unset_tdesc_filename_cmd)
6044         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6045         Constify.
6046
6047 2017-09-27  Tom Tromey  <tom@tromey.com>
6048
6049         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6050
6051 2017-09-27  Tom Tromey  <tom@tromey.com>
6052
6053         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6054
6055 2017-09-27  Tom Tromey  <tom@tromey.com>
6056
6057         * tui/tui-regs.c (tui_reg_command): Constify.
6058
6059 2017-09-27  Tom Tromey  <tom@tromey.com>
6060
6061         * skip.c (skip_file_command, skip_function_command)
6062         (skip_enable_command, skip_disable_command, skip_delete_command):
6063         Constify.
6064
6065 2017-09-27  Tom Tromey  <tom@tromey.com>
6066
6067         * record-btrace.c (cmd_record_btrace_bts_start)
6068         (cmd_record_btrace_pt_start): Constify.
6069
6070 2017-09-27  Tom Tromey  <tom@tromey.com>
6071
6072         * symmisc.c (maintenance_print_symbols)
6073         (maintenance_print_msymbols, maintenance_print_objfiles)
6074         (maintenance_info_symtabs, maintenance_check_symtabs)
6075         (maintenance_expand_symtabs, maintenance_info_line_tables):
6076         Constify.
6077
6078 2017-09-27  Tom Tromey  <tom@tromey.com>
6079
6080         * top.c (new_ui_command): Constify.
6081
6082 2017-09-27  Tom Tromey  <tom@tromey.com>
6083
6084         * symfile.c (add_symbol_file_command)
6085         (remove_symbol_file_command, list_overlays_command)
6086         (map_overlay_command, unmap_overlay_command)
6087         (overlay_auto_command, overlay_manual_command)
6088         (overlay_off_command, overlay_load_command): Constify.
6089
6090 2017-09-27  Tom Tromey  <tom@tromey.com>
6091
6092         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6093         (info_spu_mailbox_command, info_spu_dma_command)
6094         (info_spu_proxydma_command): Constify.
6095
6096 2017-09-27  Tom Tromey  <tom@tromey.com>
6097
6098         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6099
6100 2017-09-27  Tom Tromey  <tom@tromey.com>
6101
6102         * cli/cli-script.c (user_defined_command): Constify.
6103
6104 2017-09-27  Tom Tromey  <tom@tromey.com>
6105
6106         * cli/cli-dump.c (dump_memory_command, dump_value_command)
6107         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6108         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6109         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6110         (dump_binary_value, append_binary_memory, append_binary_value):
6111         Constify.
6112         (struct dump_context) <func>: Constify.
6113         (add_dump_command): Update.
6114
6115 2017-09-27  Tom Tromey  <tom@tromey.com>
6116
6117         * cli/cli-cmds.c (show_version, show_configuration)
6118         (source_command, show_user): Constify.
6119
6120 2017-09-27  Tom Tromey  <tom@tromey.com>
6121
6122         * target.c (maintenance_print_target_stack): Constify.
6123
6124 2017-09-27  Tom Tromey  <tom@tromey.com>
6125
6126         * interps.c (interpreter_exec_cmd): Constify.
6127
6128 2017-09-27  Tom Tromey  <tom@tromey.com>
6129
6130         * record-full.c (cmd_record_full_restore): Constify.
6131
6132 2017-09-27  Tom Tromey  <tom@tromey.com>
6133
6134         * memattr.c (enable_mem_command, disable_mem_command)
6135         (delete_mem_command): Constify.
6136
6137 2017-09-27  Tom Tromey  <tom@tromey.com>
6138
6139         * value.c (show_convenience): Constify.
6140
6141 2017-09-27  Tom Tromey  <tom@tromey.com>
6142
6143         * gdbcore.h (core_file_command): Update.
6144         * corefile.c (core_file_command): Constify.
6145
6146 2017-09-27  Tom Tromey  <tom@tromey.com>
6147
6148         * user-regs.c (maintenance_print_user_registers): Constify.
6149
6150 2017-09-27  Tom Tromey  <tom@tromey.com>
6151
6152         * cp-namespace.c (maintenance_cplus_namespace): Constify.
6153
6154 2017-09-27  Tom Tromey  <tom@tromey.com>
6155
6156         * cp-support.c (first_component_command): Constify.
6157
6158 2017-09-27  Tom Tromey  <tom@tromey.com>
6159
6160         * psymtab.c (maintenance_print_psymbols)
6161         (maintenance_info_psymtabs, maintenance_check_psymtabs):
6162         Constify.
6163
6164 2017-09-27  Tom Tromey  <tom@tromey.com>
6165
6166         * windows-tdep.c (display_tib): Constify.
6167
6168 2017-09-27  Tom Tromey  <tom@tromey.com>
6169
6170         * linux-fork.c (delete_checkpoint_command)
6171         (detach_checkpoint_command): Constify.
6172
6173 2017-09-27  Tom Tromey  <tom@tromey.com>
6174
6175         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6176
6177 2017-09-27  Tom Tromey  <tom@tromey.com>
6178
6179         * arc-tdep.c (dump_arc_instruction_command): Constify.
6180
6181 2017-09-27  Tom Tromey  <tom@tromey.com>
6182
6183         * valprint.c (set_radix, show_radix): Constify.
6184
6185 2017-09-27  Tom Tromey  <tom@tromey.com>
6186
6187         * dtrace-probe.c (info_probes_dtrace_command): Constify.
6188
6189 2017-09-27  Tom Tromey  <tom@tromey.com>
6190
6191         * command.h (not_just_help_class_command): Update.
6192         * cli/cli-decode.h (not_just_help_class_command): Update.
6193         * cli/cli-decode.c (not_just_help_class_command): Constify.
6194
6195 2017-09-27  Tom Tromey  <tom@tromey.com>
6196
6197         * gdb_bfd.c (maintenance_info_bfds): Constify.
6198
6199 2017-09-27  Tom Tromey  <tom@tromey.com>
6200
6201         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6202         overloads.
6203         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
6204         (do_const_cfunc): New function.
6205         (cmd_cfunc_eq): New overload.
6206         (cli_user_command_p): Check do_const_cfunc.
6207         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6208         const_cfunc.
6209         * command.h (add_cmd): Add const overload and no-function
6210         overload.
6211         (set_cmd_cfunc): Add const overload.
6212         (cmd_const_cfunc_ftype): Declare.
6213         (cmd_cfunc_eq): Add const overload.
6214         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6215         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6216         overload.
6217
6218 2017-09-27  Tom Tromey  <tom@tromey.com>
6219
6220         * macroexp.c (get_next_token_for_substitution): New function.
6221         (substitute_args): Call it.  Check for __VA_OPT__.
6222
6223 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6224             Pedro Alves <palves@redhat.com>
6225
6226         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6227         producer_is_icc_lt_14.
6228         (producer_is_icc_lt_14): New function.
6229         (check_producer): Add code for checking version of ICC.
6230         (producer_is_icc): Move to producer.c.
6231         (read_structure_type): Restrict ICC workaround to ICC<14.
6232         * producer.c: Include selftest.h.
6233         (producer_is_icc, producer_parsing_tests, _initialize_producer):
6234         New functions.
6235         * producer.h (producer_is_icc): New declaration.
6236
6237 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6238
6239         * Makefile.in (SFILES): Add producer.c.
6240         (COMMON_OBS): Add producer.o
6241         * amd64-tdep.c (producer.h): Add new include.
6242         * dwarf2read.c (producer.h): Add new include.
6243         * producer.c: New file.
6244         * producer.h: New file.
6245         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6246         producer.c.
6247         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6248         producer.h.
6249
6250 2017-09-26  Matthias Klose  <doko@ubuntu.com>
6251
6252         * configure.ac: Search ncursesw before ncurses.
6253         Check ncursesw/ncurses.h before ncurses/ncurses.h.
6254         * gdb_curses.h: Include <ncursesw/ncurses.h>
6255         * config.in, configure: Regenerate.
6256
6257 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6258
6259         PR gdb/22185
6260         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6261         obsolete.
6262         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6263         Remove i386sol2 support.
6264         * configure.nat <i386sol2>: Remove.
6265         <sol2-64>: Fold into ...
6266         <sol2>: ... this.
6267         Move common settings to default section.
6268         Add sol-thread.o.
6269         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6270         x86_64-*-solaris2.1[0-9]*>: Rename to ...
6271         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6272         <i[34567]86-*-solaris*>: Remove.
6273         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6274
6275         * configure.ac: Remove wctype in libw check.
6276         (_MSE_INT_H): Don't define on Solaris 7-9.
6277         <solaris*>: Remove libthread_db.so.1 check.
6278         * configure: Regenerate.
6279         * config.in: Regenerate.
6280
6281         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6282         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6283         (gdb_ps_size_t): Remove.
6284         Use base types in users.
6285         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6286
6287         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6288
6289 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6290
6291         PR build/22206
6292         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6293         (adi_is_addr_mapped): Likewise.
6294         (PSR_ICC): Don't redefine.
6295         (PSR_IMPL): Likewise.
6296
6297 2017-09-25  Tom Tromey  <tom@tromey.com>
6298
6299         * regcache.c (regcache::dump): Use string_printf.
6300
6301 2017-09-25  Tom Tromey  <tom@tromey.com>
6302
6303         * regcache.c (class regcache_invalidator): New.
6304         (struct register_to_invalidate): Remove.
6305         (make_cleanup_regcache_invalidate): Remove.
6306         (regcache::raw_write): Use regcache_invalidator.
6307
6308 2017-09-25  Tom Tromey  <tom@tromey.com>
6309
6310         * spu-tdep.c (spu2ppu_sniffer): Update.
6311         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6312         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6313         Remove.
6314         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6315         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6316         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6317         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6318         (frame_pop): Update.
6319
6320 2017-09-25  Tom Tromey  <tom@tromey.com>
6321
6322         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6323         * regcache.h (regcache_xfree): Don't declare.
6324         * regcache.c (regcache_xfree): Remove.
6325         (do_regcache_xfree): Use delete.
6326         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6327         * linux-fork.c (free_fork): Use delete.
6328         (fork_save_infrun_state): Likewise.
6329         * jit.c (jit_dealloc_cache): Use delete.
6330         * infrun.c (discard_infcall_suspend_state): Use delete.
6331
6332 2017-09-25  Tom Tromey  <tom@tromey.com>
6333
6334         * regcache.h (regcache_xmalloc): Don't declare.
6335         (regcache_raw_set_cached_value): Update comment.
6336         * regcache.c (regcache_xmalloc): Remove.
6337         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6338         * jit.c (jit_frame_sniffer): Use new.
6339         * frame.c (frame_save_as_regcache): Use new.
6340
6341 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6342
6343         * NEWS: Advertise support for guarded-storage registers on IBM z.
6344
6345 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6346
6347         * s390-linux-nat.c (have_regset_gs): New static variable.
6348         (s390_linux_fetch_inferior_registers): Handle guarded-storage
6349         control block and guarded-storage broadcast control regsets.
6350         (s390_read_description): Detect whether the target has
6351         guarded-storage support, return appropriate tdesc.
6352         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6353         (features/s390x-gs-linux64.c): Likewise.
6354         (struct gdbarch_tdep) <have_gs>: New field.
6355         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6356         (s390_gsbc_regset): New variables.
6357         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6358         and s390_gsbc_regset, if applicable.
6359         (s390_core_read_description): Check whether core file was from a
6360         target with guarded-storage support; include appropriate regsets.
6361         (s390_gdbarch_init): Add registers for guarded-storage support.
6362         (_initialize_s390_tdep): Initialize new target descriptions that
6363         include registers for guarded-storage support.
6364         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6365         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6366         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6367         (S390_NUM_REGS): Adjust macro definition.
6368         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6369         (tdesc_s390x_gs_linux64): New declarations.
6370
6371 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6372
6373         * features/s390-gs-linux64.xml: New file.
6374         * features/s390-gs.xml: New file.
6375         * features/s390-gsbc.xml: New file.
6376         * features/s390x-gs-linux64.xml: New file.
6377         * features/Makefile (WHICH): Add s390-gs-linux64 and
6378         s390x-gs-linux64.
6379         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6380         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6381         * features/s390-gs-linux64.c: New generated file.
6382         * features/s390x-gs-linux64.c: New file.
6383         * regformats/s390-gs-linux64.dat: New file.
6384         * regformats/s390x-gs-linux64.dat: New file.
6385
6386 2017-09-23  Tom Tromey  <tom@tromey.com>
6387
6388         * defs.h (make_cleanup_override_quit_handler): Don't declare.
6389
6390 2017-09-22  Tom Tromey  <tom@tromey.com>
6391
6392         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6393         type to scoped_restore_tmpl.
6394         <scoped_input_handler>: Initialize m_quit_handler directly.
6395
6396 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6397
6398         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6399         (cd_command): Likewise.  Free "current_directory" before
6400         assigning to it.
6401         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6402         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6403         * top.c (gdb_dirbuf): Remove global declaration.
6404         * top.h (gdb_dirbuf): Likewise.
6405
6406 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6407
6408         * gnulib/aclocal.m4: Regenerate.
6409         * gnulib/config.in: Regenerate.
6410         * gnulib/configure: Regenerate.
6411         * gnulib/import/Makefile.am: Regenerate.
6412         * gnulib/import/Makefile.in: Regenerate.
6413         * gnulib/import/assure.h: New file.
6414         * gnulib/import/at-func.c: Likewise
6415         * gnulib/import/chdir-long.c: New file.
6416         * gnulib/import/chdir-long.h: New file.
6417         * gnulib/import/cloexec.c: New file.
6418         * gnulib/import/cloexec.h: New file.
6419         * gnulib/import/close.c: New file.
6420         * gnulib/import/closedir.c: New file.
6421         * gnulib/import/dirent-private.h: New file.
6422         * gnulib/import/dup-safer.c: New file.
6423         * gnulib/import/dup.c: New file.
6424         * gnulib/import/dup2.c: New file.
6425         * gnulib/import/error.c: New file.
6426         * gnulib/import/error.h: New file.
6427         * gnulib/import/exitfail.c: New file.
6428         * gnulib/import/exitfail.h: New file.
6429         * gnulib/import/fchdir.c: New file.
6430         * gnulib/import/fcntl.c: New file.
6431         * gnulib/import/fcntl.in.h: New file.
6432         * gnulib/import/fd-hook.c: New file.
6433         * gnulib/import/fd-hook.h: New file.
6434         * gnulib/import/fd-safer.c: New file.
6435         * gnulib/import/fdopendir.c: New file.
6436         * gnulib/import/filename.h: New file.
6437         * gnulib/import/filenamecat-lgpl.c: New file.
6438         * gnulib/import/filenamecat.h: New file.
6439         * gnulib/import/fstat.c: New file.
6440         * gnulib/import/fstatat.c: New file.
6441         * gnulib/import/getcwd-lgpl.c: New file.
6442         * gnulib/import/getcwd.c: New file.
6443         * gnulib/import/getdtablesize.c: New file.
6444         * gnulib/import/getlogin_r.c: New file.
6445         * gnulib/import/getprogname.c: New file.
6446         * gnulib/import/getprogname.h: New file.
6447         * gnulib/import/gettext.h: New file.
6448         * gnulib/import/glob-libc.h: New file.
6449         * gnulib/import/glob.c: New file.
6450         * gnulib/import/glob.in.h: New file.
6451         * gnulib/import/intprops.h: New file.
6452         * gnulib/import/m4/chdir-long.m4: New file.
6453         * gnulib/import/m4/close.m4: New file.
6454         * gnulib/import/m4/closedir.m4: New file.
6455         * gnulib/import/m4/d-ino.m4: New file.
6456         * gnulib/import/m4/d-type.m4: New file.
6457         * gnulib/import/m4/dup.m4: New file.
6458         * gnulib/import/m4/dup2.m4: New file.
6459         * gnulib/import/m4/error.m4: New file.
6460         * gnulib/import/m4/fchdir.m4: New file.
6461         * gnulib/import/m4/fcntl.m4: New file.
6462         * gnulib/import/m4/fcntl_h.m4: New file.
6463         * gnulib/import/m4/fdopendir.m4: New file.
6464         * gnulib/import/m4/filenamecat.m4: New file.
6465         * gnulib/import/m4/fstat.m4: New file.
6466         * gnulib/import/m4/fstatat.m4: New file.
6467         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6468         * gnulib/import/m4/getcwd-path-max.m4: New file.
6469         * gnulib/import/m4/getcwd.m4: New file.
6470         * gnulib/import/m4/getdtablesize.m4: New file.
6471         * gnulib/import/m4/getlogin_r.m4: New file.
6472         * gnulib/import/m4/getprogname.m4: New file.
6473         * gnulib/import/m4/glob.m4: New file.
6474         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6475         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6476         * gnulib/import/m4/mempcpy.m4: New file.
6477         * gnulib/import/m4/memrchr.m4: New file.
6478         * gnulib/import/m4/mode_t.m4: New file.
6479         * gnulib/import/m4/msvc-inval.m4: New file.
6480         * gnulib/import/m4/msvc-nothrow.m4: New file.
6481         * gnulib/import/m4/open.m4: New file.
6482         * gnulib/import/m4/openat.m4: New file.
6483         * gnulib/import/m4/opendir.m4: New file.
6484         * gnulib/import/m4/readdir.m4: New file.
6485         * gnulib/import/m4/realloc.m4: New file.
6486         * gnulib/import/m4/rewinddir.m4: New file.
6487         * gnulib/import/m4/save-cwd.m4: New file.
6488         * gnulib/import/m4/strdup.m4: New file.
6489         * gnulib/import/m4/strerror.m4: New file.
6490         * gnulib/import/m4/unistd-safer.m4: New file.
6491         * gnulib/import/mempcpy.c: New file.
6492         * gnulib/import/memrchr.c: New file.
6493         * gnulib/import/msvc-inval.c: New file.
6494         * gnulib/import/msvc-inval.h: New file.
6495         * gnulib/import/msvc-nothrow.c: New file.
6496         * gnulib/import/msvc-nothrow.h: New file.
6497         * gnulib/import/open.c: New file.
6498         * gnulib/import/openat-die.c: New file.
6499         * gnulib/import/openat-priv.h: New file.
6500         * gnulib/import/openat-proc.c: New file.
6501         * gnulib/import/openat.c: New file.
6502         * gnulib/import/openat.h: New file.
6503         * gnulib/import/opendir.c: New file.
6504         * gnulib/import/pipe-safer.c: New file.
6505         * gnulib/import/readdir.c: New file.
6506         * gnulib/import/realloc.c: New file.
6507         * gnulib/import/rewinddir.c: New file.
6508         * gnulib/import/save-cwd.c: New file.
6509         * gnulib/import/save-cwd.h: New file.
6510         * gnulib/import/strdup.c: New file.
6511         * gnulib/import/strerror-override.c: New file.
6512         * gnulib/import/strerror-override.h: New file.
6513         * gnulib/import/strerror.c: New file.
6514         * gnulib/import/unistd--.h: New file.
6515         * gnulib/import/unistd-safer.h: New file.
6516         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6517         "getcwd" and "glob".
6518         * ser-tcp.c: Undefine "close" before redefining it.
6519
6520 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6521
6522         * guile/scm-value.c (gdbscm_value_address): Initialize address,
6523         get rid of res_val.
6524
6525 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6526
6527         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6528         <sol2,sparc>: Likewise.
6529         <sol2-64,i386>: Likewise.
6530
6531         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6532         -Wdeprecated-declarations on *-*-solaris*.
6533         * configure: Regenerate.
6534
6535         * procfs.c: Include "nat/inferior.h".
6536         (procfs_info_proc): Fix typo.
6537
6538 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6539
6540         * remote.c (vector): Include.
6541         (struct private_thread_info): Add field, thread_handle.
6542         (free_private_thread_info): Deallocate storage associated with
6543         thread handle.
6544         (get_private_info_thread): Initialize `thread_handle' field.
6545         (struct thread_item): Add field, thread_handle.
6546         (clear_threads_listing_context): Deallocate storage associated
6547         with thread handle.
6548         (start_thread): Add support for "handle" attribute.
6549         (thread_attributes): Add "handle".
6550         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6551         field.
6552         (remote_update_thread_list): Update thread_handle.
6553         (remote_thread_handle_to_thread_info): New function.
6554         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6555
6556 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6557
6558         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6559         function.
6560         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6561         * python/python-internal.h (thread_object_type): Declare.
6562
6563 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
6564
6565         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6566         (target_thread_handle_to_thread_info): Declare.
6567         * target.c (target_thread_handle_to_thread_info): New function.
6568         * target-delegates.c: Regenerate.
6569         * gdbthread.h (find_thread_by_handle): Declare.
6570         * thread.c (find_thread_by_handle): New function.
6571         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6572         function.
6573         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6574
6575 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6576
6577         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6578
6579 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
6580
6581         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6582
6583 2017-09-21  Yao Qi  <yao.qi@linaro.org>
6584
6585         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6586         to gdb_target_obs.
6587
6588 2017-09-20  Tom Tromey  <tom@tromey.com>
6589
6590         * breakpoint.c (struct counted_command_line): Remove.
6591         (breakpoint_commands): Update.
6592         (alloc_counted_command_line, incref_counted_command_line)
6593         (decref_counted_command_line, do_cleanup_counted_command_line)
6594         (make_cleanup_decref_counted_command_line): Remove.
6595         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6596         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6597         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6598         (save_breakpoints): Update.
6599         * breakpoint.h (counted_command_line): Now a typedef to
6600         shared_ptr.
6601         (struct breakpoint) <commands>: Now a counted_command_line.
6602         (struct bpstats) <command>: Likewise.
6603
6604 2017-09-20  Tom Tromey  <tom@tromey.com>
6605
6606         * breakpoint.c (struct commands_info, do_map_commands_command):
6607         Remove.
6608         (commands_command_1): Update.
6609         (iterate_over_related_breakpoints): Take a function_view.
6610         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6611         (delete_command): Update.
6612         (map_breakpoint_numbers): Take a function_view.
6613         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6614         (disable_command): Update.
6615         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6616         (enable_command): Update.
6617         (struct disp_data, do_enable_breakpoint_disp)
6618         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6619         (do_map_enable_delete_breakpoint): Remove.
6620         (enable_once_command, enable_count_command, enable_delete_command)
6621         (delete_trace_variable_command): Update.
6622
6623 2017-09-20  Tom Tromey  <tom@tromey.com>
6624
6625         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
6626         (bpstat_clear): Use delete.
6627         (bpstats): New constructors.
6628         (bpstat_copy, bpstat_stop_status): Use new.
6629         (dprintf_after_condition_true): Update.
6630         * breakpoint.h (bpstats::bpstats): Add constructors.
6631         (bpstats::~bpstats): Add destructor.
6632
6633 2017-09-20  Pedro Alves  <palves@redhat.com>
6634
6635         * eval.c (make_params): Delete, refactored as ...
6636         (class fake_method): ... this new type's ctor.
6637         (fake_method::~fake_method): New.
6638         (evaluate_subexp_standard): Use 'fake_method'.
6639
6640 2017-09-20  Tom Tromey  <tom@tromey.com>
6641
6642         * windows-nat.c (get_windows_debug_event, windows_wait)
6643         (do_initial_windows_stuff, windows_attach): Update.
6644         * utils.c (vwarning, internal_vproblem): Update.
6645         (ui_unregister_input_event_handler_cleanup)
6646         (prepare_to_handle_input): Remove.
6647         (class scoped_input_handler): New.
6648         (defaulted_query, prompt_for_continue): Update.
6649         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6650         Update.
6651         * top.c (undo_terminal_modifications_before_exit): Update.
6652         * target/target.h (target_terminal_init, target_terminal_inferior)
6653         (target_terminal_ours): Don't declare.
6654         (class target_terminal): New.
6655         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6656         (target_terminal_ours_for_output)
6657         (make_cleanup_restore_target_terminal): Don't declare.
6658         (target_terminal_info): Remove.
6659         * target.c (enum terminal_state, terminal_state): Remove.
6660         (target_terminal::terminal_state): Define.
6661         (target_terminal::init): Rename from target_terminal_init.
6662         (target_terminal::inferior): Rename from
6663         target_terminal_inferior.
6664         (target_terminal::ours): Rename from target_terminal_ours.
6665         (target_terminal::ours_for_output): Rename from
6666         target_terminal_ours_for_output.
6667         (target_terminal::info): New method.
6668         (cleanup_restore_target_terminal)
6669         (make_cleanup_restore_target_terminal): Remove.
6670         * solib.c (handle_solib_event): Update.
6671         * remote.c (remote_serial_quit_handler): Update.
6672         (remote_terminal_inferior, remote_wait_as): Update.
6673         * record-full.c (record_full_wait_1): Update.
6674         * nto-procfs.c (procfs_create_inferior): Update.
6675         * nat/fork-inferior.c (startup_inferior): Update.
6676         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6677         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6678         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6679         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6680         (mi_breakpoint_created, mi_breakpoint_deleted)
6681         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6682         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6683         (mi_user_selected_context_changed, report_initial_inferior):
6684         Update.
6685         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6686         (linux_nat_terminal_inferior): Update.
6687         * infrun.c (follow_fork_inferior)
6688         (handle_vfork_child_exec_or_exit, do_target_resume)
6689         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6690         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6691         Update.
6692         * inflow.c (child_terminal_init, info_terminal_command): Update.
6693         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6694         (attach_command): Update.
6695         * infcall.c (call_thread_fsm_should_stop): Update.
6696         * gnu-nat.c (gnu_attach): Update.
6697         * extension.c (struct active_ext_lang_state)
6698         (restore_active_ext_lang): Update.
6699         * exceptions.c (print_flush): Update.
6700         * event-top.c (async_enable_stdin, default_quit_handler): Update.
6701         (struct quit_handler_cleanup_data, restore_quit_handler)
6702         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6703         Remove.
6704         * cp-support.c (gdb_demangle): Update.
6705         * breakpoint.c (update_inserted_breakpoint_locations)
6706         (insert_breakpoint_locations, handle_jit_event)
6707         (disable_breakpoints_in_unloaded_shlib): Update.
6708         * annotate.c (annotate_breakpoints_invalid)
6709         (annotate_frames_invalid): Update.
6710
6711 2017-09-20  Tom Tromey  <tom@tromey.com>
6712
6713         * main.c (catch_command_errors): Rename from
6714         catch_command_errors_const.
6715         (captured_main_1): Update.
6716
6717 2017-09-20  Pedro Alves  <palves@redhat.com>
6718
6719         * cli/cli-cmds.c (list_command): Use print_sal_location.
6720         (print_sal_location): New function.
6721         (ambiguous_line_spec): Use print_sal_location.
6722         * linespec.c (symbol_to_sal): Record the symbol in the sal.
6723         * symtab.c (find_function_start_sal): Likewise.
6724         * symtab.h (symtab_and_line::symbol): New field.
6725
6726 2017-09-20  Pedro Alves  <palves@redhat.com>
6727
6728         * linespec.c (minsym_found): Handle non-text minsyms.
6729         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6730
6731 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6732
6733         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6734         backslash.
6735
6736 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6737
6738         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6739         vmovups instead vmovaps.
6740         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6741
6742 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
6743
6744         * NEWS (Changes since GDB 8.0): Add starti.
6745         * infcmd.c (enum run_break): New.
6746         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6747         case.
6748         (run_command): Use enum run_how.
6749         (start_command): Likewise.
6750         (starti_command): New function.
6751         (RUN_ARGS_HELP): New macro.
6752         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6753         commands.  Add starti command.
6754
6755 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6756
6757         * Makefile.in (monitor.o): Remove the rule.
6758
6759 2017-09-19  Yao Qi  <yao.qi@linaro.org>
6760
6761         * annotate.h (struct annotate_arg_emitter): Use
6762         DISABLE_COPY_AND_ASSIGN.
6763         * common/refcounted-object.h (refcounted_object): Likewise.
6764         * completer.h (struct completion_result): Likewise.
6765         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6766         * filename-seen-cache.h (filename_seen_cache): Likewise.
6767         * gdbcore.h (thread_section_name): Likewise.
6768         * gdb_regex.h (compiled_regex): Likewise.
6769         * gdbthread.h (scoped_restore_current_thread): Likewise.
6770         * inferior.h (scoped_restore_current_inferior): Likewise.
6771         * jit.c (jit_reader): Likewise.
6772         * linespec.h (struct linespec_result): Likewise.
6773         * mi/mi-parse.h (struct mi_parse): Likewise.
6774         * nat/fork-inferior.c (execv_argv): Likewise.
6775         * progspace.h (scoped_restore_current_program_space): Likewise.
6776         * python/python-internal.h (class gdbpy_enter): Likewise.
6777         * regcache.h (regcache): Likewise.
6778         * target-descriptions.c (struct tdesc_reg): Likewise.
6779         (struct tdesc_type): Likewise.
6780         (struct tdesc_feature): Likewise.
6781         * ui-out.h (ui_out_emit_type): Likewise.
6782
6783 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
6784
6785         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6786         label abort_expression.
6787
6788 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6789
6790         * common/buffer.c (buffer_xml_printf): Adjust.
6791         * common/xml-utils.c (xml_escape_text): Change return type to
6792         std::string, update code accordingly.
6793         * common/xml-utils.h (xml_escape_text): Change return type to
6794         std::string.
6795         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6796         * windows-tdep.c (windows_xfer_shared_library): Adjust.
6797         * unittests/xml-utils-selftests.c (test_xml_escape_text):
6798         Adjust.
6799
6800 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6801
6802         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6803         (SUBDIR_UNITTESTS_OBS): Add new object file.
6804         * unittests/xml-utils-selftests.c: New file.
6805
6806 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6807
6808         * common/selftest.h (selftest): New struct/interface.
6809         (register_test): Add name parameter, add new overload.
6810         (run_tests): Add filter parameter.
6811         (for_each_selftest_ftype): New typedef.
6812         (for_each_selftest): New declaration.
6813         * common/selftest.c (tests): Change type to
6814         map<string, unique_ptr<selftest>>.
6815         (simple_selftest): New struct.
6816         (register_test): New function.
6817         (register_test): Add name parameter and use it.
6818         (run_tests): Add filter parameter and use it.  Add prints.
6819         Adjust to vector -> map change.
6820         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6821         registering selftests.
6822         * arm-tdep.c (_initialize_arm_tdep): Likewise.
6823         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6824         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6825         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6826         * findvar.c (_initialize_findvar): Likewise.
6827         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6828         * maint.c (maintenance_selftest): Update call to run_tests.
6829         (maintenance_info_selftests): New function.
6830         (_initialize_maint_cmds): Register "maintenance info selftests"
6831         command.  Update "maintenance selftest" doc.
6832         * regcache.c (_initialize_regcache): Add names when registering
6833         selftests.
6834         * rust-exp.y (_initialize_rust_exp): Likewise.
6835         * selftest-arch.c (gdbarch_selftest): New struct.
6836         (gdbarch_tests): Remove.
6837         (register_test_foreach_arch): Add name parameter.  Call
6838         register_test.
6839         (tests_with_arch): Remove, move most content to
6840         gdbarch_selftest::operator().
6841         (_initialize_selftests_foreach_arch): Remove.
6842         * selftest-arch.h (register_test_foreach_arch): Add name
6843         parameter.
6844         (run_tests_with_arch): New declaration.
6845         * utils-selftests.c (_initialize_utils_selftests): Add names
6846         when registering selftests.
6847         * utils.c (_initialize_utils): Likewise.
6848         * unittests/array-view-selftests.c
6849         (_initialize_array_view_selftests): Likewise.
6850         * unittests/environ-selftests.c (_initialize_environ_selftests):
6851         Likewise.
6852         * unittests/function-view-selftests.c
6853         (_initialize_function_view_selftests): Likewise.
6854         * unittests/offset-type-selftests.c
6855         (_initialize_offset_type_selftests): Likewise.
6856         * unittests/optional-selftests.c
6857         (_initialize_optional_selftests): Likewise.
6858         * unittests/scoped_restore-selftests.c
6859         (_initialize_scoped_restore_selftests): Likewise.
6860         * NEWS: Document "maintenance selftest" and "maint info
6861         selftests".
6862
6863 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6864
6865         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6866         scoped_restore.
6867
6868 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
6869
6870         * mi/mi-main.c (mi_load_progress): Make uiout variable
6871         a unique_ptr.
6872
6873 2017-09-15  Pedro Alves  <palves@redhat.com>
6874
6875         * compile/compile-c-types.c (convert_enum, convert_int)
6876         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6877
6878 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
6879
6880         * dwarf2read.c (copy_string): Remove.
6881         (parse_macro_definition): Replace copy_string with savestring.
6882
6883 2017-09-15  Yao Qi  <yao.qi@linaro.org>
6884
6885         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6886         gdb_target_obs.
6887         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6888         Likewise.
6889         (i[34567]86-*-linux*): Likewise.
6890
6891 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6892
6893         * dwarf2expr.h (dwarf_stack_value): Add constructor.
6894         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6895         <stack>: Change type to std::vector.
6896         <stack_len, stack_allocated>: Remove.
6897         <grow_stack>: Remove.
6898         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6899         (dwarf_expr_context::~dwarf_expr_context): Remove.
6900         (dwarf_expr_context::grow_stack): Remove.
6901         (dwarf_expr_context::push): Adjust.
6902         (dwarf_expr_context::pop): Adjust.
6903         (dwarf_expr_context::fetch): Adjust.
6904         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6905         (dwarf_expr_context::stack_empty_p): Adjust.
6906         (dwarf_expr_context::execute_stack_op): Adjust.
6907
6908 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6909
6910         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6911         return type to bool.
6912         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6913
6914 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6915
6916         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6917         Change type to bool.
6918         (dwarf_stack_value) <in_stack_memory>: Likewise.
6919         (dwarf_expr_context) <push_address>: Change parameter type to
6920         bool.
6921         <fetch_in_stack_memory>: Change return type to bool.
6922         <push>: Change parameter type to bool.
6923         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6924         to bool.
6925         (dwarf_expr_context::push_address): Likewise.
6926         (dwarf_expr_context::fetch_in_stack_memory): Change return type
6927         to bool.
6928         (dwarf_expr_context::execute_stack_op): Adjust.
6929         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6930
6931 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
6932
6933         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6934         (struct dwarf_expr_context) <n_pieces>: Remove.
6935         <pieces>: Change type to std::vector.
6936         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6937         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6938         pieces.
6939         (dwarf_expr_context::add_piece): Adjust.
6940         * dwarf2loc.c (struct piece_closure): Initialize fields.
6941         <n_pieces>: Remove.
6942         <pieces>: Change type to std::vector.
6943         (allocate_piece_closure): Adjust, change parameter to
6944         std::vector rvalue and std::move it to piece_closure.
6945         (rw_pieced_value): Adjust.
6946         (check_pieced_synthetic_pointer): Adjust.
6947         (indirect_synthetic_pointer): Adjust.
6948         (coerce_pieced_ref): Adjust.
6949         (free_pieced_value_closure):  Adjust.  Use delete to free
6950         piece_closure.
6951         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
6952         to allocate_piece_closure.
6953         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6954
6955 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6956
6957         * probe.h (probe_ops_cp): Remove typedef.
6958         (DEF_VEC_P (probe_ops_cp)): Remove.
6959         (all_probe_ops): Change type to std::vector.
6960         * probe.c (info_probes_for_ops): Adjust to vector change.
6961         (probe_linespec_to_ops): Likewise.
6962         (all_probe_ops): Change type to std::vector.
6963         (_initialize_probe): Adjust to vector change.
6964         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6965         * elfread.c (elf_get_probes): Likewise.
6966         * stap-probe.c (_initialize_stap_probe): Likewise.
6967
6968 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6969
6970         * probe.h (struct bound_probe): Define constructors.
6971         * probe.c (bound_probe_s): Remove typedef.
6972         (DEF_VEC_O (bound_probe_s)): Remove VEC.
6973         (collect_probes): Change return type to std::vector, remove
6974         cleanup.
6975         (compare_probes): Return bool, change parameter type.  Change
6976         semantic to "less than".
6977         (gen_ui_out_table_header_info): Change parameter to std::vector
6978         and update.
6979         (exists_probe_with_pops): Likewise.
6980         (info_probes_for_ops): Update to std::vector change.
6981         (enable_probes_command): Likewise.
6982         (disable_probes_command): Likewise.
6983
6984 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
6985
6986         * probe.h (struct probe_ops) <get_probes>: Change parameter from
6987         vec to std::vector.
6988         * probe.c (parse_probes_in_pspace): Update.
6989         (find_probes_in_objfile): Update.
6990         (find_probe_by_pc): Update.
6991         (collect_probes): Update.
6992         (probe_any_get_probes): Update.
6993         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6994         return type to reference to std::vector.
6995         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6996         std::vector and update.
6997         (dtrace_process_dof): Likewise.
6998         (dtrace_get_probes): Likewise.
6999         * elfread.c (elf_get_probes): Change return type to std::vector,
7000         store an std::vector in bfd_data.
7001         (probe_key_free): Update to std::vector.
7002         * stap-probe.c (handle_stap_probe): Change parameter to
7003         std::vector and update.
7004         (stap_get_probes): Likewise.
7005         * symfile-debug.c (debug_sym_get_probes): Change return type to
7006         std::vector and update.
7007
7008 2017-09-11  Tom Tromey  <tom@tromey.com>
7009
7010         * breakpoint.c (program_breakpoint_here_p): Update.
7011         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7012         from make_show_memory_breakpoints_cleanup.  Return a
7013         scoped_restore_tmpl<int>.
7014         (restore_show_memory_breakpoints): Remove.
7015         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7016         * mem-break.c (memory_validate_breakpoint): Update.
7017         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7018         (ia64_memory_remove_breakpoint): Update.
7019         (ia64_breakpoint_from_pc): Update.
7020         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7021         from make_show_memory_breakpoints_cleanup.
7022
7023 2017-09-11  Tom Tromey  <tom@tromey.com>
7024
7025         * d-namespace.c (d_lookup_symbol): Use std::string.
7026         (find_symbol_in_baseclass): Likewise.
7027
7028 2017-09-11  Tom Tromey  <tom@tromey.com>
7029
7030         * ctf.c (ctf_start): Use std::string.
7031
7032 2017-09-11  Tom Tromey  <tom@tromey.com>
7033
7034         * ada-lang.c (is_known_support_routine): Update.
7035         (ada_unhandled_exception_name_addr_from_raise): Update.
7036         * guile/scm-frame.c (gdbscm_frame_name): Update.
7037         * python/py-frame.c (frapy_name): Update.
7038         (frapy_function): Update.
7039         * stack.h (find_frame_funname): Update.
7040         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7041         (print_frame): Update.
7042
7043 2017-09-11  Tom Tromey  <tom@tromey.com>
7044
7045         * findcmd.c (put_bits): Take a gdb::byte_vector.
7046         (parse_find_args): Return gdb::byte_vector.  "args" now const.
7047         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
7048         cleanups.
7049         (find_command): Update.
7050
7051 2017-09-11  Tom Tromey  <tom@tromey.com>
7052
7053         * cli/cli-script.c (class scoped_restore_hook_in): New.
7054         (clear_hook_in_cleanup): Remove.
7055         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7056         scoped_restore_hook_in.
7057
7058 2017-09-11  Tom Tromey  <tom@tromey.com>
7059
7060         * cli/cli-script.c (restore_interp): Remove.
7061         (read_command_lines): Use scoped_restore_interp.
7062         * interps.c (scoped_restore_interp::set_temp): Rename from
7063         interp_set_temp.
7064         * interps.h (class scoped_restore_interp): New.
7065         (interp_set_temp): Remove.
7066
7067 2017-09-11  Tom Tromey  <tom@tromey.com>
7068
7069         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7070         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7071         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7072         scoped_restore.
7073         (mi_cmd_break_insert_1): Update.
7074         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7075         scoped_restore.
7076
7077 2017-09-11  Tom Tromey  <tom@tromey.com>
7078
7079         * demangle.c (demangle_command): Update.
7080         * breakpoint.c (disable_command): Update.
7081         (enable_command): Update.
7082         (find_location_by_number): Make "number" const.  Use
7083         get_number_trailer.
7084         * cli/cli-utils.c (extract_arg): Return std::string.
7085         * probe.c (parse_probe_linespec): Update.  Change types.
7086         (collect_probes): Take string arguments.
7087         (parse_probe_linespec): Likewise.
7088         (info_probes_for_ops): Update.
7089         (enable_probes_command): Update.
7090         (disable_probes_command): Update.
7091         * break-catch-sig.c (catch_signal_split_args): Update.
7092         * mi/mi-parse.c (mi_parse): Update.
7093
7094 2017-09-11  Tom Tromey  <tom@tromey.com>
7095
7096         * language.h (language_enum): Make argument const.
7097         * language.c (language_enum): Make argument const.
7098
7099 2017-09-11  Tom Tromey  <tom@tromey.com>
7100
7101         * common/common-utils.h (skip_to_space): Remove macro, redeclare
7102         as function.
7103         (skip_to_space): Rename from skip_to_space_const.
7104         * common/common-utils.c (skip_to_space): New function.
7105         (skip_to_space): Rename from skip_to_space_const.
7106         * cli/cli-utils.h (get_number): Rename from get_number_const.
7107         (extract_arg): Rename from extract_arg_const.
7108         * cli/cli-utils.c (get_number): Rename from get_number_const.
7109         (extract_arg): Rename from extract_arg_const.
7110         (number_or_range_parser::get_number): Use ::get_number.
7111         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7112         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7113         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7114         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7115         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7116         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7117         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7118         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7119
7120 2017-09-11  Tom Tromey  <tom@tromey.com>
7121
7122         * python/python.c (do_start_initialization): Use
7123         py-event-types.def to initialize types.
7124         Define all object type structures.
7125         * python/python-internal.h: Don't declare event initialization
7126         functions.
7127         * python/py-threadevent.c (thread_event_object_type): Don't
7128         define.
7129         * python/py-stopevent.c (stop_event_object_type): Don't define.
7130         * python/py-signalevent.c (signal_event_object_type): Don't
7131         declare or define.
7132         * python/py-newobjfileevent.c (new_objfile_event_object_type)
7133         (clear_objfiles_event_object_type): Don't declare or define.
7134         * python/py-infevents.c (inferior_call_pre_event_object_type)
7135         (inferior_call_post_event_object_type)
7136         (register_changed_event_object_type)
7137         (memory_changed_event_object_type): Don't declare or define.
7138         * python/py-inferior.c (new_thread_event_object_type)
7139         (new_inferior_event_object_type)
7140         (inferior_deleted_event_object_type): Don't declare or define.
7141         * python/py-exitedevent.c (exited_event_object_type): Don't
7142         declare or define.
7143         * python/py-evts.c (gdbpy_initialize_py_events): Use
7144         py-all-events.def.
7145         * python/py-events.h (thread_event_object_type): Don't declare.
7146         (events_object): Use py-all-events.def.
7147         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
7148         py-event-types.def.
7149         * python/py-event-types.def: New file.
7150         * python/py-continueevent.c (create_continue_event_object): Don't
7151         declare or define.
7152         * python/py-bpevent.c (breakpoint_event_object_type): Don't
7153         declare or define.
7154         * python/py-all-events.def: New file.
7155
7156 2017-09-11  Tom Tromey  <tom@tromey.com>
7157
7158         * python/py-threadevent.c (create_thread_event_object): Return
7159         gdbpy_ref.
7160         * python/py-stopevent.h (create_stop_event_object)
7161         (create_breakpoint_event_object, create_signal_event_object):
7162         Update.
7163         * python/py-stopevent.c (create_stop_event_object): Return
7164         gdbpy_ref.
7165         (emit_stop_event): Update.
7166         * python/py-signalevent.c (create_signal_event_object): Return
7167         gdbpy_ref.
7168         * python/py-infevents.c (create_inferior_call_event_object):
7169         Update.
7170         * python/py-event.h (create_event_object)
7171         (create_thread_event_object): Update.
7172         * python/py-event.c (create_event_object): Return gdbpy_ref.
7173         * python/py-continueevent.c: Return gdbpy_ref.
7174         * python/py-bpevent.c (create_breakpoint_event_object): Return
7175         gdbpy_ref.
7176
7177 2017-09-11  Tom Tromey  <tom@tromey.com>
7178
7179         PR python/15622:
7180         * NEWS: Add entry.
7181         * python/python.c (do_start_initialization): Initialize new event
7182         types.
7183         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7184         (gdbpy_initialize_inferior_deleted_event)
7185         (gdbpy_initialize_new_thread_event): Declare.
7186         * python/py-threadevent.c (create_thread_event_object): Add option
7187         "thread" parameter.
7188         * python/py-inferior.c (new_thread_event_object_type)
7189         (new_inferior_event_object_type)
7190         (inferior_deleted_event_object_type): Declare.
7191         (python_new_inferior, python_inferior_deleted): New functions.
7192         (add_thread_object): Emit new_thread event.
7193         (gdbpy_initialize_inferior): Attach new functions to corresponding
7194         observers.
7195         (new_thread, new_inferior, inferior_deleted): Define new event
7196         types.
7197         * python/py-evts.c (gdbpy_initialize_py_events): Add new
7198         registries.
7199         * python/py-events.h (events_object) <new_inferior,
7200         inferior_deleted, new_thread>: New fields.
7201         * python/py-event.h (create_thread_event_breakpoint): Add optional
7202         "thread" parameter.
7203
7204 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7205
7206         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7207         check current_ui instead.
7208         (internal_vproblem): Likewise.
7209
7210 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
7211
7212         * thread.c (print_thread_info_1): Remove unnecessary calls to
7213         uiout->is_mi_like_p.
7214
7215 2017-09-09  Tom Tromey  <tom@tromey.com>
7216
7217         * namespace.h (add_using_directive): Update.
7218         * namespace.c (add_using_directive): Change type of excludes to
7219         std::vector.
7220         * dwarf2read.c (read_import_statement): Use std::vector.
7221         (read_namespace): Update.
7222         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7223
7224 2017-09-09  Tom Tromey  <tom@tromey.com>
7225
7226         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7227
7228 2017-09-09  Tom Tromey  <tom@tromey.com>
7229
7230         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7231
7232 2017-09-09  Tom Tromey  <tom@tromey.com>
7233
7234         * stack.c (func_command): Use gdb::def_vector.
7235
7236 2017-09-09  Tom Tromey  <tom@tromey.com>
7237
7238         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7239         ui_out_emit_list, ui_out_emit_tuple.
7240         (mi_cmd_var_update): Likewise.
7241
7242 2017-09-09  Tom Tromey  <tom@tromey.com>
7243
7244         * mi/mi-interp.c (mi_user_selected_context_changed): Use
7245         ui_out_redirect_pop.
7246         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7247         ui_out_redirect_pop.
7248         * utils.c (do_ui_out_redirect_pop)
7249         (make_cleanup_ui_out_redirect_pop): Remove.
7250         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7251         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7252         * ui-out.h (ui_out_redirect_pop): New class.
7253
7254 2017-09-09  Tom Tromey  <tom@tromey.com>
7255
7256         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7257         (list_available_thread_groups, mi_cmd_list_thread_groups)
7258         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7259         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7260         Likewise.
7261
7262 2017-09-09  Tom Tromey  <tom@tromey.com>
7263
7264         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7265         ui_out_emit_tuple.
7266
7267 2017-09-09  Tom Tromey  <tom@tromey.com>
7268
7269         * target.c (flash_erase_command): Use ui_out_emit_tuple.
7270         * stack.c (print_frame): Use ui_out_emit_tuple.
7271         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7272         (info_spu_mailbox_command, info_spu_dma_command)
7273         (info_spu_proxydma_command): Likewise.
7274         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7275         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7276         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7277         ui_out_emit_tuple.
7278         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7279
7280 2017-09-09  Tom Tromey  <tom@tromey.com>
7281
7282         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7283         (class ui_out_emit_table): Update comment.
7284         * ui-out.c (do_cleanup_table_end)
7285         (make_cleanup_ui_out_table_begin_end): Remove.
7286         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7287         (info_spu_dma_cmdlist): Likewise.
7288         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7289         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7290         ui_out_emit_table.
7291
7292 2017-09-09  Tom Tromey  <tom@tromey.com>
7293
7294         * thread.c (print_thread_info_1): Use ui_out_emit_table,
7295         ui_out_emit_list, gdb::optional.
7296
7297 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
7298
7299         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7300         prototype.
7301         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7302         prototype.
7303         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7304         prototype.
7305         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7306         * ada-exp.y: Remove _initialize_ada_exp prototype.
7307         * ada-lang.c: Remove _initialize_ada_language prototype.
7308         * ada-tasks.c: Remove _initialize_tasks prototype.
7309         * addrmap.c: Remove _initialize_addrmap prototype.
7310         * agent.c: Remove _initialize_agent prototype.
7311         * aix-thread.c: Remove _initialize_aix_thread prototype.
7312         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7313         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7314         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7315         prototype.
7316         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7317         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7318         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7319         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7320         prototype.
7321         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7322         prototype.
7323         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7324         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7325         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7326         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7327         prototype.
7328         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7329         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7330         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7331         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7332         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7333         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7334         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7335         prototype.
7336         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7337         prototype.
7338         * annotate.c: Remove _initialize_annotate prototype.
7339         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7340         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7341         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7342         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7343         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7344         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7345         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7346         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7347         prototype.
7348         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7349         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7350         * auto-load.c: Remove _initialize_auto_load prototype.
7351         * auxv.c: Remove _initialize_auxv prototype.
7352         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7353         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7354         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7355         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7356         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7357         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7358         prototype.
7359         * break-catch-throw.c: Remove _initialize_break_catch_throw
7360         prototype.
7361         * breakpoint.c: Remove _initialize_breakpoint prototype.
7362         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7363         * btrace.c: Remove _initialize_btrace prototype.
7364         * charset.c: Remove _initialize_charset prototype.
7365         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7366         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7367         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7368         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7369         * cli/cli-script.c: Remove _initialize_cli_script prototype.
7370         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7371         * coffread.c: Remove _initialize_coffread prototype.
7372         * compile/compile.c: Remove _initialize_compile prototype.
7373         * complaints.c: Remove _initialize_complaints prototype.
7374         * completer.c: Remove _initialize_completer prototype.
7375         * copying.awk: Remove _initialize_copying prototype.
7376         * copying.c: Regenerate.
7377         * core-regset.c: Remove _initialize_core_regset prototype.
7378         * corefile.c: Remove _initialize_core prototype.
7379         * corelow.c: Remove _initialize_corelow prototype.
7380         * cp-abi.c: Remove _initialize_cp_abi prototype.
7381         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7382         * cp-support.c: Remove _initialize_cp_support prototype.
7383         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7384         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7385         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7386         * ctf.c: Remove _initialize_ctf prototype.
7387         * d-lang.c: Remove _initialize_d_language prototype.
7388         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7389         prototype.
7390         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7391         * dbxread.c: Remove _initialize_dbxread prototype.
7392         * dcache.c: Remove _initialize_dcache prototype.
7393         * demangle.c: Remove _initialize_demangler prototype.
7394         * disasm-selftests.c: Remove _initialize_disasm_selftests
7395         prototype.
7396         * disasm.c: Remove _initialize_disasm prototype.
7397         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7398         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7399         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7400         prototype.
7401         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7402         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7403         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7404         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7405         * elfread.c: Remove _initialize_elfread prototype.
7406         * exec.c: Remove _initialize_exec prototype.
7407         * extension.c: Remove _initialize_extension prototype.
7408         * f-lang.c: Remove _initialize_f_language prototype.
7409         * f-valprint.c: Remove _initialize_f_valprint prototype.
7410         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7411         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7412         * filesystem.c: Remove _initialize_filesystem prototype.
7413         * findcmd.c: Remove _initialize_mem_search prototype.
7414         * fork-child.c: Remove _initialize_fork_child prototype.
7415         * frame-base.c: Remove _initialize_frame_base prototype.
7416         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7417         * frame.c: Remove _initialize_frame prototype.
7418         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7419         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7420         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7421         * gcore.c: Remove _initialize_gcore prototype.
7422         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7423         * gdbarch.c: Regenerate.
7424         * gdbarch.sh: Remove _initialize_gdbarch prototype.
7425         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7426         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7427         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7428         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7429         * go-lang.c: Remove _initialize_go_language prototype.
7430         * go32-nat.c: Remove _initialize_go32_nat prototype.
7431         * guile/guile.c: Remove _initialize_guile prototype.
7432         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7433         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7434         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7435         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7436         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7437         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7438         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7439         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7440         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7441         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7442         prototype.
7443         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7444         prototype.
7445         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7446         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7447         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7448         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7449         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7450         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7451         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7452         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7453         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7454         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7455         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7456         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7457         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7458         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7459         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7460         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7461         prototype.
7462         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7463         prototype.
7464         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7465         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7466         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7467         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7468         * infcall.c: Remove _initialize_infcall prototype.
7469         * infcmd.c: Remove _initialize_infcmd prototype.
7470         * inferior.c: Remove _initialize_inferiors prototype.
7471         * inflow.c: Remove _initialize_inflow prototype.
7472         * infrun.c: Remove _initialize_infrun prototype.
7473         * interps.c: Remove _initialize_interpreter prototype.
7474         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7475         * jit.c: Remove _initialize_jit prototype.
7476         * language.c: Remove _initialize_language prototype.
7477         * linux-fork.c: Remove _initialize_linux_fork prototype.
7478         * linux-nat.c: Remove _initialize_linux_nat prototype.
7479         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7480         * linux-thread-db.c: Remove _initialize_thread_db prototype.
7481         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7482         * m2-lang.c: Remove _initialize_m2_language prototype.
7483         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7484         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7485         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7486         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7487         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7488         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7489         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7490         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7491         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7492         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7493         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7494         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7495         * machoread.c: Remove _initialize_machoread prototype.
7496         * macrocmd.c: Remove _initialize_macrocmd prototype.
7497         * macroscope.c: Remove _initialize_macroscope prototype.
7498         * maint.c: Remove _initialize_maint_cmds prototype.
7499         * mdebugread.c: Remove _initialize_mdebugread prototype.
7500         * memattr.c: Remove _initialize_mem prototype.
7501         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7502         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7503         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7504         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7505         * mi/mi-main.c: Remove _initialize_mi_main prototype.
7506         * microblaze-linux-tdep.c: Remove
7507         _initialize_microblaze_linux_tdep prototype.
7508         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7509         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7510         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7511         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7512         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7513         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7514         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7515         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7516         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7517         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7518         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7519         prototype.
7520         * mipsread.c: Remove _initialize_mipsread prototype.
7521         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7522         prototype.
7523         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7524         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7525         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7526         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7527         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7528         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7529         prototype.
7530         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7531         * nto-procfs.c: Remove _initialize_procfs prototype.
7532         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7533         * objc-lang.c: Remove _initialize_objc_language prototype.
7534         * objfiles.c: Remove _initialize_objfiles prototype.
7535         * observer.c: Remove observer_test_first_notification_function,
7536         observer_test_second_notification_function,
7537         observer_test_third_notification_function, and
7538         _initialize_observer prototypes.
7539         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7540         * osabi.c: Remove _initialize_gdb_osabi prototype.
7541         * osdata.c: Remove _initialize_osdata prototype.
7542         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7543         * parse.c: Remove _initialize_parse prototype.
7544         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7545         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7546         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7547         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7548         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7549         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7550         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7551         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7552         * printcmd.c: Remove _initialize_printcmd prototype.
7553         * probe.c: Remove _initialize_probe prototype.
7554         * proc-api.c: Remove _initialize_proc_api prototype.
7555         * proc-events.c: Remove _initialize_proc_events prototype.
7556         * proc-service.c: Remove _initialize_proc_service prototype.
7557         * procfs.c: Remove _initialize_procfs prototype.
7558         * psymtab.c: Remove _initialize_psymtab prototype.
7559         * python/python.c: Remove _initialize_python prototype.
7560         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7561         * record-btrace.c: Remove _initialize_record_btrace prototype.
7562         * record-full.c: Remove _initialize_record_full prototype.
7563         * record.c: Remove _initialize_record prototype.
7564         * regcache.c: Remove _initialize_regcache prototype.
7565         * reggroups.c: Remove _initialize_reggroup prototype.
7566         * remote-notif.c: Remove _initialize_notif prototype.
7567         * remote-sim.c: Remove _initialize_remote_sim prototype.
7568         * remote.c: Remove _initialize_remote prototype.
7569         * reverse.c: Remove _initialize_reverse prototype.
7570         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7571         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7572         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7573         prototype.
7574         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7575         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7576         * rust-exp.y: Remove _initialize_rust_exp prototype.
7577         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7578         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7579         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7580         * score-tdep.c: Remove _initialize_score_tdep prototype.
7581         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7582         prototype.
7583         * ser-go32.c: Remove _initialize_ser_dos prototype.
7584         * ser-mingw.c: Remove _initialize_ser_windows prototype.
7585         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7586         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7587         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7588         * serial.c: Remove _initialize_serial prototype.
7589         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7590         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7591         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7592         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7593         * skip.c: Remove _initialize_step_skip prototype.
7594         * sol-thread.c: Remove _initialize_sol_thread prototype.
7595         * solib-aix.c: Remove _initialize_solib_aix prototype.
7596         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7597         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7598         * solib-frv.c: Remove _initialize_frv_solib prototype.
7599         * solib-spu.c: Remove _initialize_spu_solib prototype.
7600         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7601         * solib-target.c: Remove _initialize_solib_target prototype.
7602         * solib.c: Remove _initialize_solib prototype.
7603         * source.c: Remove _initialize_source prototype.
7604         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7605         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7606         prototype.
7607         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7608         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7609         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7610         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7611         prototype.
7612         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7613         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7614         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7615         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7616         prototype.
7617         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7618         prototype.
7619         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7620         prototype.
7621         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7622         prototype.
7623         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7624         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7625         prototype.
7626         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7627         prototype.
7628         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7629         prototype.
7630         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7631         prototype.
7632         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7633         prototype.
7634         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7635         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7636         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7637         * stabsread.c: Remove _initialize_stabsread prototype.
7638         * stack.c: Remove _initialize_stack prototype.
7639         * stap-probe.c: Remove _initialize_stap_probe prototype.
7640         * std-regs.c: Remove _initialize_frame_reg prototype.
7641         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7642         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7643         * symfile.c: Remove _initialize_symfile prototype.
7644         * symmisc.c: Remove _initialize_symmisc prototype.
7645         * symtab.c: Remove _initialize_symtab prototype.
7646         * target-dcache.c: Remove _initialize_target_dcache prototype.
7647         * target-descriptions.c: Remove _initialize_target_descriptions
7648         prototype.
7649         * thread.c: Remove _initialize_thread prototype.
7650         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7651         prototype.
7652         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7653         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7654         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7655         prototype.
7656         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7657         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7658         * tracefile.c: Remove _initialize_tracefile prototype.
7659         * tracepoint.c: Remove _initialize_tracepoint prototype.
7660         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7661         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7662         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7663         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7664         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7665         * tui/tui-win.c: Remove _initialize_tui_win prototype.
7666         * tui/tui.c: Remove _initialize_tui prototype.
7667         * typeprint.c: Remove _initialize_typeprint prototype.
7668         * user-regs.c: Remove _initialize_user_regs prototype.
7669         * utils.c: Remove _initialize_utils prototype.
7670         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7671         * valarith.c: Remove _initialize_valarith prototype.
7672         * valops.c: Remove _initialize_valops prototype.
7673         * valprint.c: Remove _initialize_valprint prototype.
7674         * value.c: Remove _initialize_values prototype.
7675         * varobj.c: Remove _initialize_varobj prototype.
7676         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7677         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7678         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7679         * windows-nat.c: Remove _initialize_windows_nat,
7680         _initialize_check_for_gdb_ini, and _initialize_loadable
7681         prototypes.
7682         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7683         * xcoffread.c: Remove _initialize_xcoffread prototype.
7684         * xml-support.c: Remove _initialize_xml_support prototype.
7685         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7686         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7687         prototype.
7688         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7689         prototype.
7690         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7691
7692 2017-09-08  Keith Seitz  <keiths@redhat.com>
7693
7694         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7695         field.
7696
7697 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
7698
7699         * f-valprint.c (f_val_print): Remove check for one byte
7700         sized integers. Remove printing of character type.
7701
7702 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
7703             Christoph Weinmann  <christoph.t.weinmann@intel.com>
7704             Bernhard Heckel  <bernhard.heckel@intel.com>
7705
7706         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7707         to maintain proper indentation when printing pointers/refs.
7708
7709 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7710
7711         GDB 8.0.1 released.
7712
7713 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
7714
7715         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7716
7717 2017-09-05  Tom Tromey  <tom@tromey.com>
7718
7719         * parse.c (funcall_chain): Now a std::vector.
7720         (start_arglist, end_arglist): Simplify.
7721         (free_funcalls): Remove.
7722         (parse_exp_in_context_1): Remove cleanup.
7723
7724 2017-09-05  Tom Tromey  <tom@tromey.com>
7725
7726         * go-exp.y (go_parse): Don't create a cleanup.
7727
7728 2017-09-05  Tom Tromey  <tom@tromey.com>
7729
7730         * d-exp.y (PrimaryExpression): Use std::string.
7731         (d_parse): Don't create a cleanup.
7732
7733 2017-09-05  Tom Tromey  <tom@tromey.com>
7734
7735         * utils.c (do_clear_parser_state): Remove.
7736         (make_cleanup_clear_parser_state): Remove.
7737         * p-exp.y (pascal_parse): Use scoped_restore.
7738         * m2-exp.y (m2_parse): Use scoped_restore.
7739         * f-exp.y (f_parse): Use scoped_restore.
7740         * d-exp.y (d_parse): Use scoped_restore.
7741         * c-exp.y (c_parse): Use scoped_restore.
7742         * ada-exp.y (ada_parse): Use scoped_restore.
7743         * utils.h (make_cleanup_clear_parser_state): Remove.
7744
7745 2017-09-06  Keith Seitz  <keiths@redhat.com>
7746
7747         * dwarf2read.c (dw2_linkage_name_attr): New function.
7748         (dw2_linkage_name): New function.
7749         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7750         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7751         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7752
7753 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7754
7755         * config/djgpp/djconfig.sh: Correct shell portability issue.
7756
7757 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7758
7759         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7760
7761 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7762
7763         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7764         * NEWS: Mention new FreeBSD/mips native configuration.
7765         * configure.host: Add aarch64*-*-freebsd*.
7766         * configure.nat: Likewise.
7767         * aarch64-fbsd-nat.c: New file.
7768
7769 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
7770
7771         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7772         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7773         * NEWS: Mention new FreeBSD/aarch64 target.
7774         * configure.tgt: Add aarch64*-*-freebsd*.
7775         * aarch64-fbsd-tdep.c: New file.
7776         * aarch64-fbsd-tdep.h: New file.
7777
7778 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
7779
7780         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7781
7782 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7783
7784         * parse.c (find_minsym_type_and_address): Don't relocate addresses
7785         of TLS symbols.
7786
7787 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7788
7789         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7790         call.
7791
7792 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7793
7794         * infrun.c (follow_exec): Call add_thread after
7795         target_find_description.
7796
7797 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7798
7799         * infrun.c (handle_inferior_event_1): When exec'ing, read
7800         stop_pc after follow_exec.
7801
7802 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7803
7804         * remote.c (process_g_packet): Update error message.
7805
7806 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7807
7808         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7809         targets.
7810
7811 2017-09-05  Pedro Alves  <palves@redhat.com>
7812
7813         * eval.c (eval_call, evaluate_funcall): New functions, factored
7814         out from ...
7815         (evaluate_subexp_standard): ... this.
7816
7817 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7818
7819         * amd64-tdep.c (amd64_target_description): Create target
7820         descriptions.
7821         (_initialize_amd64_tdep): Don't call functions
7822         initialize_tdesc_amd64_*.  Add self tests.
7823         * arch/amd64.c (amd64_create_target_description): Add parameter
7824         is_linux.  Call set_tdesc_osabi if is_linux is true.
7825         * arch/amd64.h (amd64_create_target_description): Update the
7826         declaration.
7827         * arch/i386.c (i386_create_target_description): Add parameter
7828         is_linux.  Call set_tdesc_osabi if is_linux is true.
7829         * arch/i386.h (i386_create_target_description): Update
7830         declaration.
7831         * configure.tgt: Add i386.o to gdb_target_obs.
7832         * features/Makefile (XMLTOC): Remove i386/*.xml.
7833         * features/i386/amd64-avx-avx512.c: Remove.
7834         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7835         * features/i386/amd64-avx-mpx.c: Remove.
7836         * features/i386/amd64-avx.c: Remove.
7837         * features/i386/amd64-mpx.c: Remove.
7838         * features/i386/amd64.c: Remove.
7839         * features/i386/i386-avx-avx512.c: Remove.
7840         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7841         * features/i386/i386-avx-mpx.c: Remove.
7842         * features/i386/i386-avx.c: Remove.
7843         * features/i386/i386-mmx.c: Remove.
7844         * features/i386/i386-mpx.c: Remove.
7845         * features/i386/i386.c: Remove.
7846         * i386-tdep.c: Don't include features/i386/i386*.c., include
7847         target-descriptions.h and arch/i386.h.
7848         (i386_target_description): Create target descriptions.
7849         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7850         functions.  Do self tests.
7851
7852 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7853
7854         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7855         * features/i386/amd64-avx-avx512-linux.c: Removed.
7856         * features/i386/amd64-avx-linux.c: Removed.
7857         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7858         * features/i386/amd64-avx-mpx-linux.c: Removed.
7859         * features/i386/amd64-linux.c: Removed.
7860         * features/i386/amd64-mpx-linux.c: Removed.
7861         * features/i386/x32-avx-avx512-linux.c: Removed.
7862         * features/i386/x32-avx-linux.c: Removed.
7863         * features/i386/x32-linux.c: Removed.
7864
7865 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7866
7867         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
7868         features/i386/*.c.
7869         (amd64_linux_read_description): Call
7870         amd64_create_target_description.
7871         * arch/amd64.c: New file.
7872         * arch/amd64.h: New file.
7873         * configure.tgt (x86_64-*-linux*): Append amd64.o.
7874         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7875
7876 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7877
7878         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7879         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
7880         (amd64_linux_read_description): Create target descriptions.
7881         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7882         functions.  Add unit tests.
7883         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7884         x32-core.xml.
7885         * features/i386/64bit-avx.c: Generated.
7886         * features/i386/64bit-avx512.c: Generated.
7887         * features/i386/64bit-core.c: Generated.
7888         * features/i386/64bit-linux.c: Generated.
7889         * features/i386/64bit-mpx.c: Generated.
7890         * features/i386/64bit-pkeys.c: Generated.
7891         * features/i386/64bit-segments.c: Generated.
7892         * features/i386/64bit-sse.c: Generated.
7893         * features/i386/x32-core.c: Generated.
7894         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7895         c files for amd64-linux and x32-linux.
7896
7897 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7898
7899         * amd64-linux-tdep.c (amd64_linux_read_description): New
7900         function.
7901         (amd64_linux_core_read_description): Call
7902         amd64_linux_read_description.
7903         (amd64_linux_init_abi): Likewise.
7904         (amd64_x32_linux_init_abi): Likewise.
7905         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7906         * x86-linux-nat.c (x86_linux_read_description): Call
7907         amd64_linux_read_description.
7908
7909 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7910
7911         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7912         comments.
7913
7914 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7915
7916         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7917         * features/i386/i386-avx-avx512-linux.c: Remove.
7918         * features/i386/i386-avx-linux.c: Remove.
7919         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7920         * features/i386/i386-avx-mpx-linux.c: Remove.
7921         * features/i386/i386-linux.c: Remove.
7922         * features/i386/i386-mmx-linux.c: Remove.
7923         * features/i386/i386-mpx-linux.c: Remove.
7924
7925 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7926
7927         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7928         (SFILES): Add arch/i386.c.
7929         (HFILES_NO_SRCDIR): Add arch/i386.h.
7930         * arch/i386.c: New file.
7931         * arch/i386.h: New file.
7932         * arch/tdesc.h (allocate_target_description): Declare.
7933         (set_tdesc_architecture): Declare.
7934         (set_tdesc_osabi): Declare.
7935         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7936         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7937         include arch/i386.h.
7938         (i386_linux_read_description): Remove code and call
7939         i386_create_target_description.
7940         (set_tdesc_architecture): New function.
7941         (set_tdesc_osabi): New function.
7942         * target-descriptions.h (allocate_target_description): Remove.
7943
7944 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7945
7946         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7947         * target-descriptions.c (tdesc_create_feature): Likewise, and
7948         adjust code.
7949         * features/i386/32bit-avx.c: Re-generated.
7950         * features/i386/32bit-avx512.c: Re-generated.
7951         * features/i386/32bit-core.c: Re-generated.
7952         * features/i386/32bit-linux.c: Re-generated.
7953         * features/i386/32bit-mpx.c: Re-generated.
7954         * features/i386/32bit-pkeys.c: Re-generated.
7955         * features/i386/32bit-sse.c: Re-generated.
7956
7957 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7958
7959         * regformats/regdef.h (struct reg): Override operator == and !=.
7960
7961 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7962
7963         * arch/tdesc.h: New file.
7964         * regformats/regdat.sh: Generate code using tdesc_create_reg.
7965         * target-descriptions.c: Update comments.
7966         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
7967         declarations.
7968         * features/i386/32bit-avx.c: Re-generated.
7969         * features/i386/32bit-avx512.c: Re-generated.
7970         * features/i386/32bit-core.c: Re-generated.
7971         * features/i386/32bit-linux.c: Re-generated.
7972         * features/i386/32bit-mpx.c: Re-generated.
7973         * features/i386/32bit-pkeys.c: Re-generated.
7974         * features/i386/32bit-sse.c: Re-generated.
7975
7976 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7977
7978         * regformats/regdat.sh: Update generated code.
7979
7980 2017-09-05  Yao Qi  <yao.qi@linaro.org>
7981
7982         * regformats/regdat.sh: Adjust code order.
7983
7984 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
7985
7986         * expprint.c (dump_subexp_body_standard): Use constant format
7987         string in fprintf_filtered call.
7988
7989 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7990
7991         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7992         NetBSD/i386.
7993         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7994
7995 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
7996
7997         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7998
7999 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8000
8001         * bsd-kvm.o: Define _KMEMUSER.
8002         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8003         * configure: Regenerate.
8004
8005 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8006
8007         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8008         * i386-fbsd-nat.c: Likewise.
8009
8010 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8011
8012         * unittests/array-view-selftests.c: Add include of <array>.
8013
8014 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8015
8016         * spu-tdep.c (flush_ea_cache): Add missing argument to
8017         call_function_by_hand.
8018
8019 2017-09-04  Pedro Alves  <palves@redhat.com>
8020
8021         * NEWS (Safer support for debugging with no debug info): New.
8022
8023 2017-09-04  Pedro Alves  <palves@redhat.com>
8024
8025         * c-exp.y (function_method, function_method_void): Add current
8026         instance flags to TYPE_INSTANCE.
8027         * dwarf2read.c (check_modifier): New.
8028         (compute_delayed_physnames): Assert that only C++ adds delayed
8029         physnames.  Mark fn_fields as const/volatile depending on
8030         physname.
8031         * eval.c (make_params): New type_instance_flags parameter.  Use
8032         it as the new type's instance flags.
8033         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8034         flags element and pass it to make_params.
8035         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8036         instance flags element.
8037         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8038         * gdbtypes.h: Include "enum-flags.h".
8039         (type_instance_flags): New enum-flags type.
8040         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8041         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8042         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8043         (follow_type_instance_flags): New function.
8044         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8045         * parser-defs.h (follow_type_instance_flags): Declare.
8046         * valops.c (value_struct_elt_for_reference): const/volatile must
8047         match too.
8048
8049 2017-09-04  Pedro Alves  <palves@redhat.com>
8050
8051         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8052         function/method scopes; lookup the nested name as a function local
8053         static variable.
8054
8055 2017-09-04  Pedro Alves  <palves@redhat.com>
8056
8057         (%type <voidval>): Add function_method.
8058         * c-exp.y (exp): New production for calls with no arguments.
8059         (function_method, function_method_void_or_typelist): New
8060         productions.
8061         (exp): New production for "method()::static_var".
8062         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8063         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8064         Handle OP_FUNC_STATIC_VAR.
8065         * parse.c (operator_length_standard):
8066         Handle OP_FUNC_STATIC_VAR.
8067
8068 2017-09-04  Pedro Alves  <palves@redhat.com>
8069
8070         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8071         handling.
8072         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8073         Ditto.
8074         * parse.c (operator_length_standard, operator_check_standard):
8075         Ditto.
8076         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8077
8078 2017-09-04  Pedro Alves  <palves@redhat.com>
8079
8080         * ax-gdb.c: Include "typeprint.h".
8081         (gen_expr_for_cast): New function.
8082         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8083         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8084         type is unknown.
8085         * dwarf2read.c (new_symbol_full): Fallback to int instead of
8086         nodebug_data_symbol.
8087         * eval.c: Include "typeprint.h".
8088         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8089         Error out if symbol has unknown type.
8090         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8091         evaluate_subexp_for_cast.
8092         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8093         OP_VAR_MSYM_VALUE.
8094         (evaluate_subexp_for_cast): New function.
8095         * gdbtypes.c (init_nodebug_var_type): New function.
8096         (objfile_type): Use it to initialize types of variables with no
8097         debug info.
8098         * typeprint.c (error_unknown_type): New.
8099         * typeprint.h (error_unknown_type): New declaration.
8100         * compile/compile-c-types.c (convert_type_basic): Handle
8101         TYPE_CODE_ERROR; warn and fallback to int for variables with
8102         unknown type.
8103
8104 2017-09-04  Pedro Alves  <palves@redhat.com>
8105
8106         * eval.c (evaluate_var_value): New function, factored out from ...
8107         (evaluate_subexp_standard): ... here.
8108
8109 2017-09-04  Pedro Alves  <palves@redhat.com>
8110
8111         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8112         Remove useless assignments to 'op'.
8113
8114 2017-09-04  Pedro Alves  <palves@redhat.com>
8115
8116         * eval.c (eval_skip_value): New function.
8117         (evaluate_subexp_standard): Use it.
8118
8119 2017-09-04  Pedro Alves  <palves@redhat.com>
8120
8121         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8122         function name from symbol/minsym and pass it to
8123         error_call_unknown_return_type.
8124
8125 2017-09-04  Pedro Alves  <palves@redhat.com>
8126
8127         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8128         * ax-gdb.c (gen_msym_var_ref): New function.
8129         (gen_expr): Handle OP_VAR_MSYM_VALUE.
8130         * eval.c (evaluate_var_msym_value): New function.
8131         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8132         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8133         to call_function_by_hand.
8134         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8135         Handle OP_VAR_MSYM_VALUE.
8136         (union exp_element) <msymbol>: New field.
8137         * minsyms.h (struct type): Forward declare.
8138         (find_minsym_type_and_address): Declare.
8139         * parse.c (write_exp_elt_msym): New function.
8140         (write_exp_msymbol): Delete, refactored as ...
8141         (find_minsym_type_and_address): ... this new function.
8142         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8143         (operator_length_standard, operator_check_standard): Handle
8144         OP_VAR_MSYM_VALUE.
8145         * std-operator.def (OP_VAR_MSYM_VALUE): New.
8146
8147 2017-09-04  Pedro Alves  <palves@redhat.com>
8148
8149         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8150         TYPE_GNU_IFUNC specially here.  Throw error if return type is
8151         unknown.
8152         * ada-typeprint.c (print_func_type): Handle functions with unknown
8153         return type.
8154         * c-typeprint.c (c_type_print_base): Handle functions and methods
8155         with unknown return type.
8156         * compile/compile-c-symbols.c (convert_symbol_bmsym)
8157         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8158         * compile/compile-c-types.c: Include "objfiles.h".
8159         (convert_func): For functions with unknown return type, warn and
8160         default to int.
8161         * compile/compile-object-run.c (compile_object_run): Adjust call
8162         to call_function_by_hand_dummy.
8163         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8164         call_function_by_hand.
8165         * eval.c (evaluate_subexp_standard): Adjust calls to
8166         call_function_by_hand.  Handle functions and methods with unknown
8167         return type.  Pass expect_type to call_function_by_hand.
8168         * f-typeprint.c (f_type_print_base): Handle functions with unknown
8169         return type.
8170         * gcore.c (call_target_sbrk): Adjust call to
8171         call_function_by_hand.
8172         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8173         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
8174         an integer address type instead of nodebug.
8175         * guile/scm-value.c (gdbscm_value_call): Adjust call to
8176         call_function_by_hand.
8177         * infcall.c (error_call_unknown_return_type): New function.
8178         (call_function_by_hand): New "default_return_type" parameter.
8179         Pass it down.
8180         (call_function_by_hand_dummy): New "default_return_type"
8181         parameter.  Use it instead of defaulting to int.  If there's no
8182         default and the return type is unknown, throw an error.  If
8183         there's a default return type, and the called function has no
8184         debug info, then assume the function is prototyped.
8185         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8186         New "default_return_type" parameter.
8187         (error_call_unknown_return_type): New declaration.
8188         * linux-fork.c (call_lseek): Cast return type of lseek.
8189         (inferior_call_waitpid, checkpoint_command): Adjust calls to
8190         call_function_by_hand.
8191         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8192         calls to call_function_by_hand.
8193         * m2-typeprint.c (m2_procedure): Handle functions with unknown
8194         return type.
8195         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8196         (value_nsstring, print_object_command): Adjust calls to
8197         call_function_by_hand.
8198         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8199         functions with unknown return type.
8200         (pascal_type_print_func_varspec_suffix): New function.
8201         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8202         TYPE_CODE_METHOD>: Use it.
8203         * python/py-value.c (valpy_call): Adjust call to
8204         call_function_by_hand.
8205         * rust-lang.c (rust_evaluate_funcall): Adjust call to
8206         call_function_by_hand.
8207         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8208         call_function_by_hand.
8209         * valops.c (value_allocate_space_in_inferior): Adjust call to
8210         call_function_by_hand.
8211         * typeprint.c (type_print_unknown_return_type): New function.
8212         * typeprint.h (type_print_unknown_return_type): New declaration.
8213
8214 2017-09-04  Pedro Alves  <palves@redhat.com>
8215
8216         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8217         types with more than one parameter as prototyped.
8218
8219 2017-09-04  Pedro Alves  <palves@redhat.com>
8220
8221         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8222         (disassemble_command): Use gdb_disassembly_flags instead of bare
8223         int.
8224         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8225         (dump_insns, do_mixed_source_and_assembly_deprecated)
8226         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8227         Use gdb_disassembly_flags instead of bare int.
8228         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8229         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8230         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8231         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
8232         (enum gdb_disassembly_flag): ... values of this new enumeration.
8233         (gdb_disassembly_flags): Define.
8234         (gdb_disassembly)
8235         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8236         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8237         gdb_disassembly_flags instead of bare int.
8238         * record-btrace.c (btrace_insn_history)
8239         (record_btrace_insn_history, record_btrace_insn_history_range)
8240         (record_btrace_insn_history_from): Use gdb_disassembly_flags
8241         instead of bare int.
8242         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8243         Use gdb_disassembly_flags instead of bare int.
8244         * target-debug.h (target_debug_print_gdb_disassembly_flags):
8245         Define.
8246         * target-delegates.c: Regenerate.
8247         * target.c (target_insn_history, target_insn_history_from)
8248         (target_insn_history_range): Use gdb_disassembly_flags instead of
8249         bare int.
8250         * target.h: Include "disasm.h".
8251         (struct target_ops) <to_insn_history, to_insn_history_from,
8252         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8253         int.
8254         (target_insn_history, target_insn_history_from)
8255         (target_insn_history_range): Use gdb_disassembly_flags instead of
8256         bare int.
8257
8258 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8259
8260         * cli/cli-script.c (build_command_line): For if/while commands,
8261         check whether args is empty.
8262
8263 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8264
8265         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8266         (enum command_control_type): Likewise.
8267         (struct command_line): Likewise.
8268         (free_command_lines): Likewise.
8269         (struct command_lines_deleter): Likewise.
8270         (command_line_up): Likewise.
8271         (read_command_lines): Likewise.
8272         (read_command_lines_1): Likewise.
8273         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8274         (enum command_control_type): Likewise.
8275         (struct command_line): Likewise.
8276         (free_command_lines): Likewise.
8277         (struct command_lines_deleter): Likewise.
8278         (command_line_up): Likewise.
8279         (read_command_lines): Likewise.
8280         (read_command_lines_1): Likewise.
8281         * breakpoint.h: Include cli/cli-script.h.
8282         * extension-priv.h: Likewise.
8283         * gdbcmd.h: Likewise.
8284
8285 2017-09-04  Pedro Alves  <palves@redhat.com>
8286
8287         * ada-lang.c (is_known_support_routine): Move sal declaration to
8288         where it is initialized.
8289         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8290         (parse_breakpoint_sals, decode_static_tracepoint_spec)
8291         (clear_command, update_static_tracepoint): Remove init_sal
8292         references.  Move declarations closer to initializations.
8293         * cli/cli-cmds.c (list_command): Move sal declarations closer to
8294         initializations.
8295         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8296         references.  Move sal declarations closer to initializations.
8297         * frame.c (find_frame_sal): Return a symtab_and_line via function
8298         return instead of output parameter.  Remove init_sal references.
8299         * frame.h (find_frame_sal): Return a symtab_and_line via function
8300         return instead of output parameter.
8301         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8302         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8303         instead of memset.
8304         (gdbscm_find_pc_line): Remove init_sal reference.
8305         * infcall.c (call_function_by_hand_dummy): Remove init_sal
8306         references.  Move declarations closer to initializations.
8307         * infcmd.c (set_step_frame): Update.  Move declarations closer to
8308         initializations.
8309         (finish_backward): Remove init_sal references.  Move declarations
8310         closer to initializations.
8311         * infrun.c (process_event_stop_test, handle_step_into_function)
8312         (insert_hp_step_resume_breakpoint_at_frame)
8313         (insert_step_resume_breakpoint_at_caller): Likewise.
8314         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8315         (symbol_to_sal): Likewise.
8316         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8317         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8318         to its initialization.
8319         * reverse.c (save_bookmark_command): Use new/delete.  Remove
8320         init_sal references.  Move declarations closer to initializations.
8321         * source.c (get_current_source_symtab_and_line): Remove brace
8322         initialization.
8323         (set_current_source_symtab_and_line): Now takes the sal by const
8324         reference.  Remove brace initialization.
8325         (line_info): Remove init_sal reference.
8326         * source.h (set_current_source_symtab_and_line): Now takes a
8327         symtab_and_line via const reference.
8328         * stack.c (set_current_sal_from_frame): Adjust.
8329         (print_frame_info): Adjust.
8330         (get_last_displayed_sal): Return the sal via function return
8331         instead of via output parameter.  Simplify.
8332         (frame_info): Adjust.
8333         * stack.h (get_last_displayed_sal): Return the sal via function
8334         return instead of via output parameter.
8335         * symtab.c (init_sal): Delete.
8336         (find_pc_sect_line): Remove init_sal references.  Move
8337         declarations closer to initializations.
8338         (find_function_start_sal): Remove init_sal references.  Move
8339         declarations closer to initializations.
8340         * symtab.h (struct symtab_and_line): In-class initialize all
8341         fields.
8342         * tracepoint.c (set_traceframe_context)
8343         (print_one_static_tracepoint_marker): Remove init_sal references.
8344         Move declarations closer to initializations.
8345         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8346         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
8347         declarations closer to initializations.
8348         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8349         init_sal references.  Adjust.
8350
8351 2017-09-04  Pedro Alves  <palves@redhat.com>
8352
8353         * ax-gdb.c (agent_command_1): Use range-for.
8354         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8355         * breakpoint.c: Include "common/array-view.h".
8356         (init_breakpoint_sal, create_breakpoint_sal): Change sals
8357         parameter from struct symtabs_and_lines to
8358         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
8359         (breakpoint_sals_to_pc): Change sals parameter from struct
8360         symtabs_and_lines to std::vector reference.
8361         (check_fast_tracepoint_sals): Change sals parameter from struct
8362         symtabs_and_lines to std::array_view.  Use range-for.
8363         (decode_static_tracepoint_spec): Return a std::vector instead of
8364         symtabs_and_lines.  Update.
8365         (create_breakpoint): Update.
8366         (break_range_command, until_break_command, clear_command): Update.
8367         (base_breakpoint_decode_location, bkpt_decode_location)
8368         (bkpt_probe_create_sals_from_location)
8369         (bkpt_probe_decode_location, tracepoint_decode_location)
8370         (tracepoint_probe_decode_location)
8371         (strace_marker_create_sals_from_location): Return a std::vector
8372         instead of symtabs_and_lines.
8373         (strace_marker_create_breakpoints_sal): Update.
8374         (strace_marker_decode_location): Return a std::vector instead of
8375         symtabs_and_lines.  Update.
8376         (update_breakpoint_locations): Change struct symtabs_and_lines
8377         parameters to gdb::array_view.  Adjust.
8378         (location_to_sals): Return a std::vector instead of
8379         symtabs_and_lines.  Update.
8380         (breakpoint_re_set_default): Use std::vector instead of struct
8381         symtabs_and_lines.
8382         (decode_location_default): Return a std::vector instead of
8383         symtabs_and_lines.  Update.
8384         * breakpoint.h: Include "common/array-view.h".
8385         (struct breakpoint_ops) <decode_location>: Now returns a
8386         std::vector instead of returning a symtabs_and_lines via output
8387         parameter.
8388         (update_breakpoint_locations): Change sals parameters to use
8389         gdb::array_view.
8390         * cli/cli-cmds.c (edit_command, list_command): Update to use
8391         std::vector and gdb::array_view.
8392         (ambiguous_line_spec): Adjust to use gdb::array_view and
8393         range-for.
8394         (compare_symtabs): Rename to ...
8395         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
8396         const reference and adjust.
8397         (filter_sals): Rewrite using std::vector and standard algorithms.
8398         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8399         (jump_command): Update to use std::vector.
8400         * linespec.c (struct linespec_state) <canonical_names>: Update
8401         comment.
8402         (add_sal_to_sals_basic): Delete.
8403         (add_sal_to_sals, filter_results, convert_results_to_lsals)
8404         (decode_line_2, create_sals_line_offset)
8405         (convert_address_location_to_sals, convert_linespec_to_sals)
8406         (convert_explicit_location_to_sals, parse_linespec)
8407         (event_location_to_sals, decode_line_full, decode_line_1)
8408         (decode_line_with_current_source)
8409         (decode_line_with_last_displayed, decode_objc)
8410         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8411         (linespec_result::~linespec_result): Adjust to use std::vector
8412         instead of symtabs_and_lines.
8413         * linespec.h (linespec_sals::sals): Now a std::vector.
8414         (struct linespec_result): Use std::vector, bool, and in-class
8415         initialization.
8416         (decode_line_1, decode_line_with_current_source)
8417         (decode_line_with_last_displayed): Return std::vector.
8418         * macrocmd.c (info_macros_command): Use std::vector.
8419         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8420         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8421         std::vector.
8422         * probe.h (parse_probes): Return a std::vector.
8423         * python/python.c (gdbpy_decode_line): Use std::vector and
8424         gdb::array_view.
8425         * source.c (select_source_symtab, line_info): Use std::vector.
8426         * stack.c (func_command): Use std::vector.
8427         * symtab.h (struct symtabs_and_lines): Delete.
8428         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8429
8430 2017-09-04  Pedro Alves  <palves@redhat.com>
8431
8432         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8433         unittests/array-view-selftests.c.
8434         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8435         * common/array-view.h: New file.
8436         * unittests/array-view-selftests.c: New file.
8437
8438 2017-09-04  Pedro Alves  <palves@redhat.com>
8439
8440         * cli/cli-cmds.c (edit_command): Pass message to
8441         ambiguous_line_spec.
8442         (list_command): Pass message to ambiguous_line_spec.  Say
8443         "first"/"last" instead of "start" and "end" to be consistent with
8444         the manual.
8445         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
8446         them to print formatted message.
8447
8448 2017-09-04  Pedro Alves  <palves@redhat.com>
8449
8450         * btrace.c (ftrace_add_pt): Pass btrace_insn to
8451         ftrace_update_insns by reference instead of pointer.
8452
8453 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8454
8455         * i386-go32-tdep.c: Include x86-xstate.h.
8456         (i386_go32_init_abi): Call i386_target_description.
8457         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8458         if xcr0 is X86_XSTATE_X87_MASK.
8459         * i386-tdep.h (tdesc_i386): Remove the declaration.
8460         (tdesc_i386_mmx): Likewise.
8461
8462 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8463
8464         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8465         X86_XSTATE_SSE_MASK instead of 0.
8466
8467 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8468
8469         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8470         i386_target_description.
8471         * i386-fbsd-nat.c (i386fbsd_read_description): Call
8472         i386_target_description.
8473         * i386-tdep.c (i386_gdbarch_init): Likewise.
8474
8475 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8476
8477         * amd64-darwin-tdep.c: Include "x86-xstate.h".
8478         (x86_darwin_init_abi_64): Call amd64_target_description.
8479         * amd64-dicos-tdep.c: Likewise.
8480         * amd64-fbsd-nat.c: Likewise.
8481         * amd64-fbsd-tdep.c: Likewise.
8482         * amd64-nbsd-tdep.c: Likewise.
8483         * amd64-obsd-tdep.c: Likewise.
8484         * amd64-sol2-tdep.c: Likewise.
8485         * amd64-windows-tdep.c: Likewise.
8486         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8487
8488 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8489
8490         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8491         (btrace_function) <insn>: Change type to use std::vector.
8492         * btrace.c (ftrace_debug, ftrace_call_num_insn,
8493         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8494         ftrace_update_insns, ftrace_compute_global_level_offset,
8495         btrace_stitch_bts, btrace_clear, btrace_insn_get,
8496         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8497         change to std::vector.
8498         (ftrace_update_insns): Adjust to change to std::vector, change
8499         type of INSN parameter.
8500         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8501         * record-btrace.c (btrace_call_history_insn_range,
8502         btrace_compute_src_line_range,
8503         record_btrace_frame_prev_register): Adjust to change to
8504         std::vector.
8505         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8506         to change to std::vector.
8507
8508 2017-09-03  Tom Tromey  <tom@tromey.com>
8509
8510         * corefile.c (reopen_exec_file): Use std::string.
8511
8512 2017-09-03  Tom Tromey  <tom@tromey.com>
8513
8514         * compile/compile.c (compile_register_name_mangled): Return
8515         std::string.
8516         * compile/compile-loc2c.c (pushf_register_address): Update.
8517         (pushf_register): Update.
8518         * compile/compile-c-types.c (convert_array): Update.
8519         * compile/compile-c-symbols.c (generate_vla_size): Update.
8520         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8521         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8522         (convert_one_symbol): Update.
8523         (generate_c_for_for_one_variable): Update.
8524         * compile/compile-c-support.c (c_get_range_decl_name): Return a
8525         std::string.
8526         (generate_register_struct): Update.
8527         * compile/compile-internal.h (c_get_range_decl_name): Return a
8528         std::string.
8529         (compile_register_name_mangled): Return std::string.
8530
8531 2017-09-03  Tom Tromey  <tom@tromey.com>
8532
8533         * utils.c (perror_string): Return a std::string.
8534         (throw_perror_with_name, perror_warning_with_name): Update.
8535
8536 2017-09-03  Tom Tromey  <tom@tromey.com>
8537
8538         * demangle.c (demangle_command): Use std::string,
8539         unique_xmalloc_ptr.
8540
8541 2017-09-03  Tom Tromey  <tom@tromey.com>
8542
8543         * cli/cli-setshow.c (do_set_command): Use std::string.
8544
8545 2017-09-03  Tom Tromey  <tom@tromey.com>
8546
8547         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8548
8549 2017-09-03  Tom Tromey  <tom@tromey.com>
8550
8551         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8552
8553 2017-09-03  Tom Tromey  <tom@tromey.com>
8554
8555         * mi/mi-cmd-env.c (env_execute_cli_command): Use
8556         gdb::unique_xmalloc_ptr.
8557
8558 2017-09-03  Tom Tromey  <tom@tromey.com>
8559
8560         * thread.c (print_thread_info_1): Use string_printf.
8561         (thread_apply_command, thread_apply_all_command): Use
8562         std::string.
8563
8564 2017-09-03  Tom Tromey  <tom@tromey.com>
8565
8566         * valprint.c (val_print_string): Update.
8567         * gdbcore.h (memory_error_message): Return std::string.
8568         * corefile.c (memory_error_message): Return std::string.
8569         (memory_error): Update.
8570         * breakpoint.c (insert_bp_location): Update.
8571
8572 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
8573
8574         * target/waitstatus.h (target_waitstatus_to_string): Change
8575         return type to std::string.
8576         * target/waitstatus.c (target_waitstatus_to_string): Return
8577         std::string.
8578         * target.h (target_waitstatus_to_string): Remove declaration.
8579         * infrun.c (resume, clear_proceed_status_thread,
8580         print_target_wait_results, do_target_wait, save_waitstatus,
8581         stop_all_threads): Adjust.
8582         * record-btrace.c (record_btrace_wait): Adjust.
8583         * target-debug.h
8584         (target_debug_print_struct_target_waitstatus_p): Adjust.
8585
8586 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
8587
8588         PR gdb/22046
8589         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8590         detection.
8591
8592 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
8593
8594         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8595         for setting/unsetting environment variables on the remote target.
8596         (New remote packets): Add entries for QEnvironmentHexEncoded,
8597         QEnvironmentUnset and QEnvironmentReset.
8598         * common/environ.c (gdb_environ::operator=): Extend method to
8599         handle m_user_set_env_list and m_user_unset_env_list.
8600         (gdb_environ::clear): Likewise.
8601         (match_var_in_string): Change type of first parameter from 'char
8602         *' to 'const char *'.
8603         (gdb_environ::set): Extend method to handle
8604         m_user_set_env_list and m_user_unset_env_list.
8605         (gdb_environ::unset): Likewise.
8606         (gdb_environ::clear_user_set_env): New method.
8607         (gdb_environ::user_set_envp): Likewise.
8608         (gdb_environ::user_unset_envp): Likewise.
8609         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8610         m_user_unset_env_list on move constructor/assignment.
8611         (unset): Add new default parameter 'update_unset_list = true'.
8612         (clear_user_set_env): New method.
8613         (user_set_envp): Likewise.
8614         (user_unset_envp): Likewise.
8615         (m_user_set_env_list): New std::set.
8616         (m_user_unset_env_list): Likewise.
8617         * common/rsp-low.c (hex2str): New function.
8618         (bin2hex): New overload for bin2hex function.
8619         * common/rsp-low.c (hex2str): New prototype.
8620         (str2hex): New overload prototype.
8621         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8622         QEnvironmentUnset and QEnvironmentReset.
8623         (remote_protocol_features): Add QEnvironmentHexEncoded,
8624         QEnvironmentUnset and QEnvironmentReset packets.
8625         (send_environment_packet): New function.
8626         (extended_remote_environment_support): Likewise.
8627         (extended_remote_create_inferior): Call
8628         extended_remote_environment_support.
8629         (_initialize_remote): Add QEnvironmentHexEncoded,
8630         QEnvironmentUnset and QEnvironmentReset packet configs.
8631         * unittests/environ-selftests.c (gdb_selftest_env_var):
8632         New variable.
8633         (test_vector_initialization): New function.
8634         (test_init_from_host_environ): Likewise.
8635         (test_reinit_from_host_environ): Likewise.
8636         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8637         Likewise.
8638         (test_unset_set_empty_vector): Likewise.
8639         (test_vector_clear): Likewise.
8640         (test_std_move): Likewise.
8641         (test_move_constructor):
8642         (test_self_move): Likewise.
8643         (test_set_unset_reset): Likewise.
8644         (run_tests): Rewrite in terms of the functions above.
8645
8646 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
8647
8648         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8649         (adi_available): Use a temp variable of type CORE_ADDR as argument
8650         3 when calling target_auxv_search.
8651         (adi_normalize_address): Use masks and xor operators to calculate
8652         normalized address.
8653         (adi_read_versions, adi_write_versions, adi_print_versions)
8654         (do_examine, do_assign): Use paddress.
8655
8656 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
8657
8658         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8659         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8660         out of loop and add supply of FIR.
8661         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8662         add collect of FIR.
8663
8664 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
8665
8666         PR gdb/21827
8667         * cli/cli-script.c (define_command): Don't convert command name
8668         to lower case.
8669
8670 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
8671
8672         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8673         Update all callers accordingly. Remove all code blocks handling
8674         the case where DISPP is not NULL.
8675
8676 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8677
8678         PR symtab/22003
8679         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8680         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8681         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8682
8683 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8684
8685         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8686         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8687         (read_comp_units_from_section): New parameter abbrev_section, use
8688         read_and_check_comp_unit_head, allocate signatured_type if needed.
8689         (create_all_comp_units): Update read_comp_units_from_section caller.
8690
8691 2017-08-23  Pedro Alves  <palves@redhat.com>
8692
8693         PR remote/21852
8694         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8695         to null_ptid and switch to thread without reading the registers
8696         after adding the inferior.
8697
8698 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8699
8700         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8701         compile-gcc.
8702         * compile/compile.c (compile_gcc, show_compile_gcc): New.
8703         (compile_to_object): Implement compile_gcc.
8704         (_initialize_compile): Install "set compile-gcc".  Initialize
8705         compile_gcc.
8706
8707 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
8708
8709         * compile/compile.c (compile_to_object): Conditionally call
8710         set_verbose.  Conditionally call compile or compile_v0.
8711
8712 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
8713
8714         * sparc64-tdep.h: (adi_normalize_address): New export.
8715         * sparc-nat.h: (open_adi_tag_fd): New export.
8716         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8717         * sparc64-linux-tdep.c:
8718         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8719         (sparc64_linux_handle_segmentation_fault): New function.
8720         (sparc64_linux_init_abi): Register
8721         sparc64_linux_handle_segmentation_fault
8722         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8723         (sparc64_addr_bits_remove): New function.
8724         (sparc64_init_abi): Register sparc64_addr_bits_remove.
8725         (MAX_PROC_NAME_SIZE): New macro.
8726         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8727         (sparc64adilist): New variable.
8728         (adi_proc_list): New variable.
8729         (find_adi_info): New function.
8730         (add_adi_info): New function.
8731         (get_adi_info_proc): New function.
8732         (get_adi_info): New function.
8733         (info_adi_command): New function.
8734         (read_maps_entry): New function.
8735         (adi_available): New function.
8736         (adi_normalize_address): New function.
8737         (adi_align_address): New function.
8738         (adi_convert_byte_count): New function.
8739         (adi_tag_fd): New function.
8740         (adi_is_addr_mapped): New function.
8741         (adi_read_versions): New function.
8742         (adi_write_versions): New function.
8743         (adi_print_versions): New function.
8744         (do_examine): New function.
8745         (do_assign): New function.
8746         (adi_examine_command): New function.
8747         (adi_assign_command): New function.
8748         (_initialize_sparc64_adi_tdep): New function.
8749
8750 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
8751
8752         * breakpoint.c (breakpoints_info): Rename to ...
8753         (info_breakpoints_command): ... this.
8754         (watchpoints_info): Rename to ...
8755         (info_watchpoints_command): ... this.
8756         (tracepoints_info): Rename to ...
8757         (info_tracepoints_command): ... this.
8758         (_initialize_breakpoint): Adjust.
8759         * dcache.c (dcache_info): Rename to ...
8760         (info_display_command): ... this.
8761         (_initialize_dcache): Adjust.
8762         * frame.h (args_info): Rename to ...
8763         (info_args_command): ... this.
8764         (locals_info): Rename to ...
8765         (info_locals_command): ... this.
8766         * infcmd.c (nofp_registers_info): Rename to ...
8767         (info_registers_command): ... this.
8768         (float_info): Rename to ...
8769         (info_float_command): ... this.
8770         (program_info): Rename to ...
8771         (info_program_command): ... this.
8772         (all_registers_info): Rename to ...
8773         (info_all_registers_command): ... this.
8774         (vector_info): Rename to ...
8775         (info_vector_command): ... this.
8776         (float_info): Rename to ...
8777         (info_float_command): ... this.
8778         (_initialize_infcmd): Adjust.
8779         * inferior.h (term_info): Rename to ...
8780         (info_terminal_command): ... this.
8781         * inflow.c (term_info): Rename to ...
8782         (info_terminal_command): ... this.
8783         (_initialize_inflow): Adjust.
8784         * infrun.c (signals_info): Rename to ...
8785         (info_signals_command): ... this.
8786         (_initialize_infrun): Adjust.
8787         * objc-lang.c (classes_info): Rename to ...
8788         (info_classes_command): ... this.
8789         (selectors_info): Rename to ...
8790         (info_selectors_command): ... this.
8791         (_initialize_objc_language): Adjust.
8792         * printcmd.c (sym_info): Rename to ...
8793         (info_symbol_command): ... this.
8794         (address_info): Rename to ...
8795         (info_address_command): ... this.
8796         (display_info): Rename to ...
8797         (info_display_command): ... this.
8798         (_initialize_printcmd): Adjust.
8799         * reverse.c (bookmarks_info): Rename to ...
8800         (info_breakpoints_command): ... this.
8801         (_initialize_reverse): Adjust.
8802         * ser-go32.c (dos_info): Rename to ...
8803         (info_serial_command): ... this.
8804         (_initialize_ser_dos): Adjust.
8805         * skip.c (skip_info): Rename to ...
8806         (info_skip_command): ... this.
8807         (_initialize_step_skip): Adjust.
8808         * source.c (line_info): Rename to ...
8809         (info_line_command): ... this.
8810         (source_info): Rename to ...
8811         (info_source_command)
8812         * stack.c (frame_info): Rename to ...
8813         (info_frame_command): ... this.
8814         (locals_info): Rename to ...
8815         (info_locals_command): ... this.
8816         (args_info): Rename to ...
8817         (info_args_command): ... this.
8818         (_initialize_stack): Adjust.
8819         * symtab.c (sources_info): Rename to ...
8820         (info_sources_command): ... this.
8821         (variables_info): Rename to ...
8822         (info_variables_command): ... this.
8823         (functions_info): Rename to ...
8824         (info_functions_command): ... this.
8825         (types_info): Rename to ...
8826         (info_types_command): ... this.
8827         (_initialize_symtab): Adjust.
8828         * target.c (target_info): Rename to ...
8829         (info_target_command): ... this.
8830         (initialize_targets): Adjust.
8831         * tracepoint.c (tvariables_info): Rename to ...
8832         (info_tvariables_command): ... this.
8833         (scope_info): Rename to ...
8834         (info_scope_command): ... this.
8835         (trace_dump_actions): Adjust.
8836         (_initialize_tracepoint): Adjust.
8837
8838 2017-08-22  Tom Tromey  <tom@tromey.com>
8839
8840         * breakpoint.h (install_breakpoint): Update.
8841         * breakpoint.c (add_solib_catchpoint): Update.
8842         (install_breakpoint): Change argument to a std::unique_ptr.
8843         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8844         (create_breakpoint_sal, create_breakpoint): Update.
8845         (watch_command_1, catch_exec_command_1)
8846         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8847         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8848         Return the breakpoint.
8849         (set_raw_breakpoint_without_location, set_raw_breakpoint)
8850         (new_single_step_breakpoint): Update.
8851         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8852         std::unique_ptr.
8853         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8854         std::unique_ptr.
8855         * break-catch-sig.c (create_signal_catchpoint): Use
8856         std::unique_ptr.
8857         * ada-lang.c (create_ada_exception_catchpoint): Use
8858         std::unique_ptr.
8859
8860 2017-08-22  Tom Tromey  <tom@tromey.com>
8861
8862         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8863
8864 2017-08-22  Tom Tromey  <tom@tromey.com>
8865
8866         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8867         (lookup_partial_symbol): Update.
8868
8869 2017-08-22  Tom Tromey  <tom@tromey.com>
8870
8871         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8872         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8873         (find_and_open_source, symtab_to_fullname): Update.
8874         * psymtab.c (psymtab_to_fullname): Update.
8875
8876 2017-08-22  Tom Tromey  <tom@tromey.com>
8877
8878         * exec.c (exec_file_attach): Update.
8879         * linux-thread-db.c (try_thread_db_load): Update.
8880         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8881         * utils.c (gdb_realpath): Change return type.
8882         (gdb_realpath_keepfile): Update.
8883         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8884         (_initialize_utils): Register the new self test.
8885         * source.c (openp): Update.
8886         (find_and_open_source): Update.
8887         * nto-tdep.c (nto_find_and_open_solib): Update.
8888         * main.c (set_gdb_data_directory): Update.
8889         (captured_main_1): Update.
8890         * dwarf2read.c (dwarf2_get_dwz_file): Update
8891         (dw2_map_symbol_filenames): Update.
8892         * auto-load.c (auto_load_safe_path_vec_update): Update.
8893         (filename_is_in_auto_load_safe_path_vec): Change type of
8894         "filename_realp".
8895         (auto_load_objfile_script): Update.
8896         (file_is_auto_load_safe): Update.  Use std::string.
8897         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8898
8899 2017-08-22  Tom Tromey  <tom@tromey.com>
8900
8901         * utils.c (gdb_realpath_keepfile): Return a
8902         gdb::unique_xmalloc_ptr.
8903         * exec.c (exec_file_attach): Update.
8904         * utils.h (gdb_realpath_keepfile): Return a
8905         gdb::unique_xmalloc_ptr.
8906
8907 2017-08-22  Tom Tromey  <tom@tromey.com>
8908
8909         * compile/compile.c (compile_file_command): Use
8910         gdb::unique_xmalloc_ptr, std::string.
8911         * utils.c (gdb_abspath): Change return type.
8912         * source.c (openp): Update.
8913         * objfiles.c (allocate_objfile): Update.
8914         * main.c (set_gdb_data_directory): Update.
8915         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8916
8917 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
8918
8919         * cli-cmds.c (list_commands): List actual code around more than
8920         one location.
8921
8922 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
8923
8924         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8925
8926 2017-08-21  Pedro Alves  <palves@redhat.com>
8927
8928         PR gdb/19487
8929         * c-exp.y (variable production): Handle function aliases.
8930         * minsyms.c (msymbol_is_text): New function.
8931         * minsyms.h (msymbol_is_text): Declare.
8932         * symtab.c (find_function_alias_target): New function.
8933         * symtab.h (find_function_alias_target): Declare.
8934
8935 2017-08-21  Pedro Alves  <palves@redhat.com>
8936
8937         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8938         typedefs.
8939         * typeprint.c (whatis_exp): If handling "whatis", and expression
8940         is OP_TYPE, strip one typedef level.  Otherwise don't strip
8941         typedefs here.
8942         * valops.c (value_cast): Save "to" type before resolving
8943         stubs/typedefs.  Use that type as resulting value's type.
8944
8945 2017-08-18  Tom Tromey  <tom@tromey.com>
8946             Pedro Alves  <palves@redhat.com>
8947
8948         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8949         * sol-thread.c (sol_thread_resume, sol_thread_wait)
8950         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8951         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8952         * proc-service.c (ps_xfer_memory): Use scoped_restore.
8953         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8954         (linux_get_siginfo_data): Add "thread" argument.  Use
8955         scoped_restore.
8956         * linux-nat.c (linux_child_follow_fork)
8957         (check_stopped_by_watchpoint): Use scoped_restore.
8958         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8959         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8960         (restore_inferior_ptid, save_inferior_ptid): Remove.
8961         * btrace.c (btrace_fetch): Use scoped_restore.
8962         * bsd-uthread.c (bsd_uthread_fetch_registers)
8963         (bsd_uthread_store_registers): Use scoped_restore.
8964         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8965         scoped_restore.
8966         * aix-thread.c (aix_thread_resume, aix_thread_wait)
8967         (aix_thread_xfer_partial): Use scoped_restore.
8968         * inferior.h (save_inferior_ptid): Remove.
8969
8970 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8971
8972         PR tdep/21818
8973         * arm-tdep.c (gdb_print_insn_arm): Mark
8974         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8975
8976 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8977
8978         * NEWS: Mention GDBserver's new option "--selftest".
8979         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8980         * selftest.c: Move it to common/selftest.c.
8981         * selftest.h: Move it to common/selftest.h.
8982         * selftest-arch.c (reset): New function.
8983         (tests_with_arch): Call reset.
8984
8985 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8986
8987         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
8988         instead of exception_fprintf and printf_filtered.
8989
8990 2017-08-18  Yao Qi  <yao.qi@linaro.org>
8991
8992         * selftest.c (register_self_test): Rename it to
8993         selftests::register_test.
8994         (run_self_tests): selftest::run_tests.
8995         * selftest.h: Update declarations.
8996         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8997         selftests::register_test_foreach_arch.
8998         * selftest-arch.h: Update declaration.
8999         * aarch64-tdep.c: Update.
9000         * arm-tdep.c: Likewise.
9001         * disasm-selftests.c: Likewise.
9002         * dwarf2loc.c: Likewise.
9003         * dwarf2-frame.c: Likewise.
9004         * findvar.c: Likewise.
9005         * gdbarch-selftests.c: Likewise.
9006         * maint.c (maintenance_selftest): Likewise.
9007         * regcache.c: Likewise.
9008         * rust-exp.y: Likewise.
9009         * selftest-arch.c: Likewise.
9010         * unittests/environ-selftests.c: Likewise.
9011         * unittests/function-view-selftests.c: Likewise.
9012         * unittests/offset-type-selftests.c: Likewise.
9013         * unittests/optional-selftests.c: Likewise.
9014         * unittests/scoped_restore-selftests.c: Likewise.
9015         * utils-selftests.c: Likewise.
9016
9017 2017-08-17  Pedro Alves  <palves@redhat.com>
9018
9019         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9020         local.
9021
9022 2017-08-17  Pedro Alves  <palves@redhat.com>
9023
9024         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9025         field.
9026         (reset_die_in_process): Delete, replaced by ...
9027         (process_die_scope): ... this new class.  Make it responsible for
9028         freeing cu->line_header too.
9029         (process_die): Use process_die_scope.
9030         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9031         cu->line_header_die_owner.  Don't release the line header if it's
9032         owned by the CU.
9033         (setup_type_unit_groups): Make the CU/DIE own the line header.
9034         Don't release the line header here.
9035
9036 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
9037
9038         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9039
9040 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9041
9042         * NEWS: Mention new shortcuts for nexti and stepi in TUI
9043         Single-Key mode
9044
9045 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9046
9047         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9048         mode command list.
9049
9050 2017-08-15  Stafford Horne  <shorne@gmail.com>
9051
9052         * MAINTAINERS (Write After Approval): Add Stafford Horne.
9053
9054 2017-08-15  Stafford Horne  <shorne@gmail.com>
9055
9056         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9057
9058 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9059
9060         PR gdb/21954
9061         * infcmd.c (unset_environment_command): Use the 'clear' method on
9062         the environment instead of resetting it.
9063
9064 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
9065
9066         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9067         platforms.
9068
9069 2017-08-14  Tom Tromey  <tom@tromey.com>
9070
9071         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9072         (print_binary_chars): Likewise.
9073         (BITS_IN_BYTES): Remove.
9074
9075 2017-08-14  Tom Tromey  <tom@tromey.com>
9076
9077         PR gdb/21675
9078         * valprint.c (LOW_ZERO): Change value to 034.
9079         (print_octal_chars): Add static_asserts for octal constants.
9080         * printcmd.c (print_scalar_formatted): Add 'd' case.
9081
9082 2017-08-11  Tom Tromey  <tom@tromey.com>
9083
9084         * symfile.c (add_symbol_file_command): Use std::vector.
9085
9086 2017-08-14  Tom Tromey  <tom@tromey.com>
9087
9088         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9089         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9090         std::move.
9091         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9092
9093 2017-08-11  Pedro Alves  <palves@redhat.com>
9094
9095         * infrun.c (process_event_stop_test): Adjust
9096         function_name_is_marked_for_skip call.
9097         * skip.c: Include <list>.
9098         (skiplist_entry): Make it a class with private fields, and
9099         getters/setters.
9100         (skiplist_entry_chain): Delete.
9101         (skiplist_entries): New.
9102         (skiplist_entry_count): Delete.
9103         (highest_skiplist_entry_num): New.
9104         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9105         (add_skiplist_entry): Delete.
9106         (skiplist_entry::skiplist_entry): New.
9107         (skiplist_entry::add_entry): New.
9108         (skip_file_command, skip_function): Adjust.
9109         (compile_skip_regexp): Delete.
9110         (skip_command): Don't compile regexp here.  Adjust to use
9111         skiplist_entry::add_entry.
9112         (skip_info): Adjust to use range-for and getters.
9113         (skip_enable_command, skip_disable_command): Adjust to use
9114         range-for and setters.
9115         (skip_delete_command): Adjust to use std::list.
9116         (add_skiplist_entry): Delete.
9117         (skip_file_p): Delete, refactored as ...
9118         (skiplist_entry::do_skip_file_p): ... this new method.
9119         (skip_gfile_p): Delete, refactored as ...
9120         (skiplist_entry::do_gskip_file_p): ... this new method.
9121         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9122         (skiplist_entry::skip_function_p): ... this new method.
9123         (function_name_is_marked_for_skip): Now returns bool, and takes
9124         the function sal by const reference.  Adjust to use range-for and
9125         skiplist_entry methods.
9126         (_initialize_step_skip): Remove references to
9127         skiplist_entry_chain, skiplist_entry_count.
9128         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9129         takes the function sal by const reference.
9130
9131 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9132
9133         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9134         (dwarf2_frame_cache): Remove reset_cache_cleanup.
9135         (dwarf2_frame_cache):
9136         * frame-unwind.c (frame_unwind_try_unwinder): Catch
9137         RETURN_MASK_ALL and set *this_case to NULL.
9138         * frame-unwind.h: Update comments.
9139
9140 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9141
9142         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9143         (dwarf2_frame_state_copy_regs): Remove.
9144         (dwarf2_frame_state_free_regs): Remove.
9145         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9146         (dwarf2_restore_rule): Call method .alloc_regs instead of
9147         dwarf2_frame_state_alloc_regs.
9148         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
9149         constructor.  Call std::move.
9150         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9151         (dwarf2_frame_cache): Likewise.
9152
9153         [GDB_SELF_TEST]: Include selftest.h and
9154         selftest-arch.h.
9155         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9156         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9157         execute_cfa_program_test.
9158
9159         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9160         copy ctor, assignment operator, move assignment.
9161         <alloc_regs>: New method.
9162         <swap>: New method.
9163         (struct dwarf2_frame_state): Delete dtor.
9164         (dwarf2_frame_state_alloc_regs): Remove declaration.
9165         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9166         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9167
9168 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9169
9170         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9171         (dwarf2_frame_state::dwarf2_frame_state): New.
9172         (dwarf2_frame_state::~dwarf2_frame_state): New.
9173         (dwarf2_fetch_cfa_info): Update.
9174         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
9175         rather than a pointer.  Update code.
9176         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9177         dtor.
9178         <data_align, code_align, retaddr_column>: Change them to const.
9179         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9180         to bool.
9181
9182 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9183
9184         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9185         <loc.exp>: New field.
9186         * dwarf2-frame.c (execute_cfa_program): Update.
9187         (dwarf2_frame_prev_register): Update.
9188
9189 2017-08-10  Pedro Alves  <palves@redhat.com>
9190
9191         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9192
9193 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9194
9195         * fbsd-nat.c (struct fbsd_fork_info): Remove.
9196         (fbsd_pending_children): Use std::list.
9197         (fbsd_remember_child): Likewise.
9198         (fbsd_is_child_pending): Likewise.
9199         (fbsd_pending_vfork_done): Use std::forward_list.
9200         (fbsd_add_vfork_done): Likewise.
9201         (fbsd_is_vfork_done_pending): Likewise.
9202         (fbsd_next_vfork_done): Likewise.
9203
9204 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9205
9206         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9207         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9208         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9209         for `mapfilename'.
9210         (fbsd_xfer_partial): Use gdb::byte_vector.
9211         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9212
9213 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9214
9215         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9216         "filestuff.h".
9217         (fbsd_find_memory_regions): Fix `mapfile' initialization.
9218
9219 2017-08-09  Tom Tromey  <tom@tromey.com>
9220
9221         * skip.c (skiplist_entry): New constructor.
9222         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9223         (skiplist_entry::file_is_glob): Now bool.
9224         (skiplist_entry::file, skiplist_entry::function): Now
9225         std::string.
9226         (make_skip_entry): Return a unique_ptr.  Use new.
9227         (free_skiplist_entry, free_skiplist_entry_cleanup)
9228         (make_free_skiplist_entry_cleanup): Remove.
9229         (skip_command, skip_disable_command, add_skiplist_entry)
9230         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9231         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9232         (function_name_is_marked_for_skip): Update.
9233         (skip_delete_command): Update.  Use delete.
9234
9235 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
9236
9237         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9238         (aarch64_linux_core_read_description): New function.
9239         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9240
9241 2017-08-09  Pedro Alves  <palves@redhat.com>
9242
9243         * cp-name-parser.y (cp_comp_to_string): Return a
9244         gdb::unique_xmalloc_ptr<char>.
9245         * cp-support.c (replace_typedefs_qualified_name)
9246         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9247         (cp_canonicalize_string_full): Use op= instead of explicit
9248         convertion.
9249         (cp_class_name_from_physname, method_name_from_physname)
9250         (cp_func_name, cp_remove_params): Adjust to use
9251         gdb::unique_xmalloc_ptr<char>.
9252         * cp-support.h (cp_comp_to_string): Return a
9253         gdb::unique_xmalloc_ptr<char>.
9254         * python/py-type.c (typy_lookup_type): Adjust to use
9255         gdb::unique_xmalloc_ptr<char>.
9256
9257 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
9258
9259         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9260
9261 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
9262             Yao Qi  <yao.qi@linaro.org>
9263
9264         * cp-support.c (cp_canonicalize_string_full): Use
9265         gdb::unique_xmalloc_ptr<char>.
9266         (cp_canonicalize_string): Likewise.
9267
9268 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9269
9270         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9271         * regformats/i386/amd64-avx-avx512.dat: Remove.
9272         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9273         * regformats/i386/amd64-avx-mpx.dat:Remove.
9274         * regformats/i386/amd64-avx.dat: Remove.
9275         * regformats/i386/amd64-mpx.dat: Remove.
9276         * regformats/i386/i386-avx-avx512.dat: Remove.
9277         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9278         * regformats/i386/i386-avx-mpx.dat: Remove.
9279         * regformats/i386/i386-mmx.dat: Remove.
9280         * regformats/i386/i386-mpx.dat: Remove.
9281
9282 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9283
9284         * amd64-tdep.h (tdesc_x32): Remove the declaration.
9285         * amd64-tdep.c: Don't include features/i386/x32*.c.
9286         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9287         functions.
9288         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9289         and i386/x32-avx-avx512.
9290         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9291         and i386/x32.xml.
9292         * features/i386/x32-avx-avx512.c: Removed.
9293         * features/i386/x32-avx-avx512.xml: Removed.
9294         * features/i386/x32-avx.c: Removed.
9295         * features/i386/x32-avx.xml: Removed.
9296         * features/i386/x32.c: Removed.
9297         * features/i386/x32.xml: Removed.
9298         * regformats/i386/x32-avx-avx512.dat: Removed.
9299         * regformats/i386/x32-avx.dat: Removed.
9300         * regformats/i386/x32.dat: Removed.
9301
9302 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9303
9304         PR breakpoints/21886
9305         * mem-break.c (default_memory_insert_breakpoint): Use
9306         `->placed_address' rather than `->reqstd_address' for the
9307         breakpoint location.
9308
9309 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9310
9311         * arch-utils.c (default_print_insn): Remove arch/mach/endian
9312         assertions.
9313
9314 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9315
9316         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9317         a union of `tdep_info', `tdesc_data' and `id'.
9318         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9319         rather than `info.tdep_info'.
9320         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9321         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9322         * i386-tdep.c (i386_gdbarch_init): Likewise.
9323         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9324         * mips-tdep.c (mips_gdbarch_init): Likewise.
9325         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9326         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9327         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9328         `info.tdep_info'.
9329         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9330         `info.tdep_info'.
9331         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9332         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9333         `info.tdep_info'.
9334         * spu-tdep.c (spu_gdbarch_init): Likewise.
9335         * gdbarch.h: Regenerate.
9336
9337 2017-08-07  Leszek Swirski  <leszeks@google.com>
9338
9339         PR symtab/20899
9340         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9341
9342 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
9343
9344         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9345         (gdbsim_open): Rename gdb_argv args object to argv.
9346
9347 2017-08-05  Tom Tromey  <tom@tromey.com>
9348
9349         * compile/compile-object-load.c (compile_object_load): Use
9350         gdb::unique_xmalloc_ptr.
9351         * cli/cli-dump.c (scan_filename): Rename from
9352         scan_filename_with_cleanup.  Change return type.
9353         (scan_expression): Rename from scan_expression_with_cleanup.
9354         Change return type.
9355         (dump_memory_to_file, dump_value_to_file, restore_command):
9356         Use gdb::unique_xmalloc_ptr.  Update.
9357         * cli/cli-cmds.c (find_and_open_script): Use
9358         gdb::unique_xmalloc_ptr.
9359         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9360         * symmisc.c (maintenance_print_symbols)
9361         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9362         * symfile.c (symfile_bfd_open, generic_load)
9363         (add_symbol_file_command, remove_symbol_file_command): Use
9364         gdb::unique_xmalloc_ptr.
9365         * source.c (openp): Use gdb::unique_xmalloc_ptr.
9366         * psymtab.c (maintenance_print_psymbols): Use
9367         gdb::unique_xmalloc_ptr.
9368         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9369         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9370         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9371         (reload_shared_libraries_1): Likewise.
9372
9373 2017-08-05  Tom Tromey  <tom@tromey.com>
9374
9375         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9376         (rust_op_vector, rust_set_vector): New typedefs.
9377         (current_parser): New global.
9378         (work_obstack): Change to pointer type.  Update all users.
9379         (rust_ast, pstate): Remove globals.
9380         (struct rust_parser): New.
9381         (%union) <params, field_inits>: Change type.
9382         (start, tuple_expr, unit_expr, struct_expr_list, literal)
9383         (field_expr, expr_list, maybe_expr_list, type_list): Update.
9384         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9385         (convert_params_to_types, convert_params_to_expression): Change
9386         type of "params".
9387         (ast_string): Change type of "fields".
9388         (rust_parse): Make a rust_parser.  Remove cleanups.
9389         (rust_lex_tests): Make and install an auto_obstack.
9390
9391 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9392
9393         * configure.srv (ipa_x32_linux_regobj): New.
9394         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9395         instead of X86_TDESC_AVX512.
9396         (initialize_low_tracepoint): Call
9397         init_registers_x32_avx_avx512_linux.
9398
9399 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9400
9401         * utils.h (gdb_argv): Add namespace std for nullptr_t.
9402
9403 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9404
9405         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9406
9407 2017-08-03  Tom Tromey  <tom@tromey.com>
9408
9409         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9410         Remove.
9411         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9412
9413 2017-08-03  Tom Tromey  <tom@tromey.com>
9414
9415         * python/py-param.c (compute_enum_values): Use gdb_argv.
9416
9417 2017-08-03  Tom Tromey  <tom@tromey.com>
9418
9419         * utils.h (struct gdb_argv_deleter): New.
9420         (gdb_argv): New class.
9421         * utils.c (gdb_argv::reset): New method.
9422         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9423         * tracefile.c (tsave_command): Use gdb_argv.
9424         * top.c (new_ui_command): Use gdb_argv.
9425         * symmisc.c (maintenance_print_symbols)
9426         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9427         * symfile.c (symbol_file_command, generic_load)
9428         (remove_symbol_file_command): Use gdb_argv.
9429         * stack.c (backtrace_command): Use gdb_argv.
9430         * source.c (add_path, show_substitute_path_command)
9431         (unset_substitute_path_command, set_substitute_path_command):
9432         Use gdb_argv.
9433         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
9434         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9435         * remote.c (extended_remote_run, remote_put_command)
9436         (remote_get_command, remote_delete_command): Use gdb_argv.
9437         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9438         (gdbsim_open): Use gdb_argv.
9439         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9440         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9441         * procfs.c (procfs_info_proc): Use gdb_argv.
9442         * interps.c (interpreter_exec_cmd): Use gdb_argv.
9443         * infrun.c (handle_command): Use gdb_argv.
9444         * inferior.c (add_inferior_command, clone_inferior_command):
9445         Use gdb_argv.
9446         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9447         * exec.c (exec_file_command): Use gdb_argv.
9448         * cli/cli-cmds.c (alias_command): Use gdb_argv.
9449         * compile/compile.c (build_argc_argv): Use gdb_argv.
9450
9451 2017-08-03  Tom Tromey  <tom@tromey.com>
9452
9453         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9454
9455 2017-08-03  Tom Tromey  <tom@tromey.com>
9456
9457         * python/python.c (compute_python_string): Return std::string.
9458         (gdbpy_eval_from_control_command): Update.
9459         (do_start_initialization): Use std::string.
9460         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9461         xstrprintf.
9462         * python/py-breakpoint.c (local_setattro): Use string_printf, not
9463         xstrprintf.
9464
9465 2017-08-03  Tom Tromey  <tom@tromey.com>
9466
9467         * top.h (do_restore_instream_cleanup): Remove.
9468         * top.c (do_restore_instream_cleanup): Remove.
9469         (read_command_file): Use scoped_restore.
9470         * cli/cli-script.c (execute_user_command): Use scoped_restore.
9471
9472 2017-08-03  Tom Tromey  <tom@tromey.com>
9473
9474         * cli/cli-script.c (execute_user_command)
9475         (execute_control_command): Use scoped_restore.
9476
9477 2017-08-03  Tom Tromey  <tom@tromey.com>
9478
9479         * cli/cli-script.c (do_restore_user_call_depth): Remove.
9480         (execute_user_command): Remove user_call_depth; use
9481         user_args_stack's size instead.
9482
9483 2017-08-03  Tom Tromey  <tom@tromey.com>
9484
9485         * top.h (in_user_command): Remove.
9486         * top.c (in_user_command): Remove.
9487         * cli/cli-script.c (do_restore_user_call_depth)
9488         (execute_user_command): Update.
9489
9490 2017-08-03  Tom Tromey  <tom@tromey.com>
9491
9492         * valops.c (search_struct_method): Use gdb::byte_vector.
9493         * valarith.c (value_concat): Use std::vector.
9494         * target.c (memory_xfer_partial): Use gdb::byte_vector.
9495         (simple_search_memory): Likewise.
9496         * printcmd.c (find_string_backward): Use gdb::byte_vector.
9497         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9498         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9499         * elfread.c (elf_rel_plt_read): Use std::string.
9500         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9501         * cli/cli-dump.c (restore_section_callback): Use
9502         gdb::byte_vector.
9503
9504 2017-08-03  Tom Tromey  <tom@tromey.com>
9505
9506         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9507
9508 2017-08-03  Tom Tromey  <tom@tromey.com>
9509
9510         * tui/tui-regs.c (tui_restore_gdbout): Remove.
9511         (tui_register_format): Use scoped_restore.
9512
9513 2017-08-03  Tom Tromey  <tom@tromey.com>
9514
9515         * reverse.c (exec_direction_default): Remove.
9516         (exec_reverse_once): Use scoped_restore.
9517         * remote.c (restore_remote_timeout): Remove.
9518         (remote_flash_erase, remote_flash_write, remote_flash_done)
9519         (readchar, remote_serial_write): Use scoped_restore.
9520         * cli/cli-script.c (struct source_cleanup_lines_args)
9521         (source_cleanup_lines): Remove.
9522         (script_from_file): Use scoped_restore.
9523         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9524         (source_command): Use scoped_restore.
9525
9526 2017-08-03  Tom Tromey  <tom@tromey.com>
9527
9528         * utils.h (make_cleanup_free_so): Remove.
9529         * utils.c (do_free_so, make_cleanup_free_so): Remove.
9530         * solist.h (struct so_deleter): New.
9531         (so_list_up): New typedef.
9532         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9533
9534 2017-08-03  Tom Tromey  <tom@tromey.com>
9535
9536         * utils.h (make_cleanup_restore_current_language): Remove.
9537         * utils.c (do_restore_current_language)
9538         (make_cleanup_restore_current_language): Remove.
9539         * parse.c (parse_exp_in_context_1)
9540         (parse_expression_with_language): Use
9541         scoped_restore_current_language.
9542         * mi/mi-main.c (mi_cmd_execute): Use
9543         scoped_restore_current_language.
9544         * language.h (scoped_restore_current_language): New class.
9545
9546 2017-08-03  Tom Tromey  <tom@tromey.com>
9547
9548         * compile/compile.c (cleanup_unlink_file): Remove.
9549         (compile_to_object): Use gdb::unlinker.
9550         (eval_compile_command): Likewise.
9551
9552 2017-08-03  Tom Tromey  <tom@tromey.com>
9553
9554         * utils.h (make_cleanup_fclose): Remove.
9555         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9556
9557 2017-08-03  Tom Tromey  <tom@tromey.com>
9558
9559         * top.c (open_terminal_stream): Return gdb_file_up.
9560         (new_ui_command): Update.
9561
9562 2017-08-03  Tom Tromey  <tom@tromey.com>
9563
9564         * source.c (print_source_lines_base, forward_search_command)
9565         (reverse_search_command): Use gdb_file_up.
9566
9567 2017-08-03  Tom Tromey  <tom@tromey.com>
9568
9569         * fbsd-nat.c (fbsd_find_memory_regions): Update.
9570
9571 2017-08-03  Tom Tromey  <tom@tromey.com>
9572
9573         * cli/cli-cmds.c (find_and_open_script): Change return type.
9574         Remove "streamp" and "full_path" parameters.
9575         (source_script_with_search): Update.
9576         * auto-load.c (source_script_file): Update.
9577         * cli/cli-cmds.h (find_and_open_script): Change type.
9578         (open_script): New struct.
9579
9580 2017-08-03  Tom Tromey  <tom@tromey.com>
9581
9582         * xml-support.c (xml_fetch_content_from_file): Update.
9583         * ui-file.c (stdio_file::open): Update.
9584         * tracefile-tfile.c (tfile_start): Update.
9585         * remote.c (remote_file_put, remote_file_get): Update.
9586         * nat/linux-procfs.c (linux_proc_get_int)
9587         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9588         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9589         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9590         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9591         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9592         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9593         * linux-nat.c (linux_proc_pending_signals): Update.
9594         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9595         (file_closer): Remove.
9596         * compile/compile.c (compile_to_object): Update.
9597         * common/filestuff.h (struct gdb_file_deleter): New.
9598         (gdb_file_up): New typedef.
9599         (gdb_fopen_cloexec): Change return type.
9600         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9601         * cli/cli-dump.c (fopen_with_cleanup): Remove.
9602         (dump_binary_file, restore_binary_file): Update.
9603         * auto-load.c (auto_load_objfile_script_1): Update.
9604
9605 2017-08-03  Tom Tromey  <tom@tromey.com>
9606
9607         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9608         (info_static_tracepoint_markers_command): Likewise.
9609         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9610         * skip.c (skip_info): Use ui_out_emit_table.
9611         * progspace.c (print_program_space): Use ui_out_emit_table.
9612         * osdata.c (info_osdata): Use ui_out_emit_table.
9613         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9614         ui_out_emit_table.
9615         * linux-thread-db.c (info_auto_load_libthread_db): Use
9616         ui_out_emit_table.
9617         * inferior.c (print_inferior): Use ui_out_emit_table.
9618         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9619         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9620         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9621         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9622         * ui-out.h (class ui_out_emit_table): New.
9623
9624 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
9625
9626         * mips-tdep.c (mips_fpu_type_str): New function.
9627         (mips_dump_tdep): Call it.
9628
9629 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
9630
9631         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9632         `->mips_fpu_type'.
9633
9634 2017-07-31  Xavier Roirand  <roirand@adacore.com>
9635
9636         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9637
9638 2017-07-27  Xavier Roirand  <roirand@adacore.com>
9639
9640         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9641
9642 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9643
9644         * cli/cli-cmds.c (maintenancechecklist): New variable.
9645         * gdbcmd.h (maintenancechecklist): Declare it.
9646         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9647         Call i386_linux_read_description with different masks.
9648         * maint.c (maintenance_check_command): New function.
9649         (_initialize_maint_cmds): Call add_prefix_cmd.
9650         * target-descriptions.c (tdesc_reg): override operator != and ==.
9651         (tdesc_type): Likewise.
9652         (tdesc_feature): Likewise.
9653         (target_desc): Likewise.
9654         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9655         (maintenance_check_xml_descriptions): New function.
9656         (_initialize_target_descriptions) Add command "xml-descriptions".
9657         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9658
9659 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9660
9661         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9662         Include features/i386/32bit-*.c.
9663         (i386_linux_read_description): Generate target description if it
9664         doesn't exist.
9665         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9666         functions.
9667         * features/i386/32bit-linux.c: Re-generated.
9668         * features/i386/32bit-sse.c: Likewise.
9669         * target-descriptions.c (print_c_feature::visit): Print code to
9670         set register number if needed.
9671         (print_c_feature) <m_next_regnum>: New field.
9672
9673 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9674
9675         * features/Makefile (CFILES): Rename with TDESC_CFILES.
9676         (FEATURE_XMLFILES): New.
9677         (FEATURE_CFILES): New.
9678         New rules.
9679         (clean-cfiles): Remove generated c files.
9680         * features/i386/32bit-avx.c: Generated.
9681         * features/i386/32bit-avx512.c: Generated.
9682         * features/i386/32bit-core.c: Generated.
9683         * features/i386/32bit-linux.c: Generated.
9684         * features/i386/32bit-mpx.c: Generated.
9685         * features/i386/32bit-pkeys.c: Generated.
9686         * features/i386/32bit-sse.c: Generated.
9687         * target-descriptions.c: Include algorithm.
9688         (tdesc_element_visitor): Add method visit_end.
9689         (print_c_tdesc): Implement visit_end.
9690         (print_c_tdesc:: m_filename_after_features): Move it to
9691         protected.
9692         (print_c_feature): New class.
9693         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9694         name starts with "i386/32bit-".
9695
9696 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9697
9698         * target-descriptions.c (tdesc_element_visitor): New class.
9699         (tdesc_element): New class.
9700         (tdesc_reg): Inherit from tdesc_element.
9701         (tdesc_reg::accept): New function.
9702         (tdesc_type): Inherit from tdesc_element.
9703         (tdesc_type::accept): New function.
9704         (tdesc_feature): Inherit from tdesc_element.
9705         (tdesc_feature::accept): New function.
9706         (target_desc): Inherit from tdesc_element.
9707         (target_desc::target_desc): New.
9708         (target_desc::~target_desc): New.
9709         (target_desc::accept): New.
9710         (allocate_target_description): Use new.
9711         (free_target_description): Use delete.
9712         (print_c_tdesc): New class.
9713         (maint_print_c_tdesc_cmd): Adjust.
9714
9715         * features/aarch64.c: Re-generated.
9716         * features/arc-arcompact.c: Re-generated.
9717         * features/arc-v2.c: Re-generated.
9718         * features/arm/arm-with-iwmmxt.c: Re-generated.
9719         * features/arm/arm-with-m.c: Re-generated.
9720         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9721         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9722         * features/arm/arm-with-neon.c: Re-generated.
9723         * features/arm/arm-with-vfpv2.c: Re-generated.
9724         * features/arm/arm-with-vfpv3.c: Re-generated.
9725         * features/i386/amd64-avx-avx512.c: Re-generated.
9726         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9727         * features/i386/amd64-avx.c: Re-generated.
9728         * features/i386/amd64-avx-linux.c: Re-generated.
9729         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9730         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9731         * features/i386/amd64-avx-mpx.c: Re-generated.
9732         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9733         * features/i386/amd64.c: Re-generated.
9734         * features/i386/amd64-linux.c: Re-generated.
9735         * features/i386/amd64-mpx.c: Re-generated.
9736         * features/i386/amd64-mpx-linux.c: Re-generated.
9737         * features/i386/i386-avx-avx512.c: Re-generated.
9738         * features/i386/i386-avx-avx512-linux.c: Re-generated.
9739         * features/i386/i386-avx.c: Re-generated.
9740         * features/i386/i386-avx-linux.c: Re-generated.
9741         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9742         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9743         * features/i386/i386-avx-mpx.c: Re-generated.
9744         * features/i386/i386-avx-mpx-linux.c: Re-generated.
9745         * features/i386/i386.c: Re-generated.
9746         * features/i386/i386-linux.c: Re-generated.
9747         * features/i386/i386-mmx.c: Re-generated.
9748         * features/i386/i386-mmx-linux.c: Re-generated.
9749         * features/i386/i386-mpx.c: Re-generated.
9750         * features/i386/i386-mpx-linux.c: Re-generated.
9751         * features/i386/x32-avx-avx512.c: Re-generated.
9752         * features/i386/x32-avx-avx512-linux.c: Re-generated.
9753         * features/i386/x32-avx.c: Re-generated.
9754         * features/i386/x32-avx-linux.c: Re-generated.
9755         * features/i386/x32.c: Re-generated.
9756         * features/i386/x32-linux.c: Re-generated.
9757         * features/microblaze.c: Re-generated.
9758         * features/microblaze-with-stack-protect.c: Re-generated.
9759         * features/mips64-dsp-linux.c: Re-generated.
9760         * features/mips64-linux.c: Re-generated.
9761         * features/mips-dsp-linux.c: Re-generated.
9762         * features/mips-linux.c: Re-generated.
9763         * features/nds32.c: Re-generated.
9764         * features/nios2.c: Re-generated.
9765         * features/nios2-linux.c: Re-generated.
9766         * features/rs6000/powerpc-32.c: Re-generated.
9767         * features/rs6000/powerpc-32l.c: Re-generated.
9768         * features/rs6000/powerpc-403.c: Re-generated.
9769         * features/rs6000/powerpc-403gc.c : Re-generated.
9770         * features/rs6000/powerpc-405.c: Re-generated.
9771         * features/rs6000/powerpc-505.c: Re-generated.
9772         * features/rs6000/powerpc-601.c: Re-generated.
9773         * features/rs6000/powerpc-602.c: Re-generated.
9774         * features/rs6000/powerpc-603.c: Re-generated.
9775         * features/rs6000/powerpc-604.c: Re-generated.
9776         * features/rs6000/powerpc-64.c: Re-generated.
9777         * features/rs6000/powerpc-64l.c: Re-generated.
9778         * features/rs6000/powerpc-7400.c: Re-generated.
9779         * features/rs6000/powerpc-750.c: Re-generated.
9780         * features/rs6000/powerpc-860.c: Re-generated.
9781         * features/rs6000/powerpc-altivec32.c: Re-generated.
9782         * features/rs6000/powerpc-altivec32l.c: Re-generated.
9783         * features/rs6000/powerpc-altivec64.c: Re-generated.
9784         * features/rs6000/powerpc-altivec64l.c: Re-generated.
9785         * features/rs6000/powerpc-cell32l.c: Re-generated.
9786         * features/rs6000/powerpc-cell64l.c: Re-generated.
9787         * features/rs6000/powerpc-e500.c: Re-generated.
9788         * features/rs6000/powerpc-e500l.c: Re-generated.
9789         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9790         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9791         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9792         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9793         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9794         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9795         * features/rs6000/powerpc-vsx32.c: Re-generated.
9796         * features/rs6000/powerpc-vsx32l.c: Re-generated.
9797         * features/rs6000/powerpc-vsx64.c: Re-generated.
9798         * features/rs6000/powerpc-vsx64l.c: Re-generated.
9799         * features/rs6000/rs6000.c: Re-generated.
9800         * features/s390-linux32.c: Re-generated.
9801         * features/s390-linux32v1.c: Re-generated.
9802         * features/s390-linux32v2.c: Re-generated.
9803         * features/s390-linux64.c: Re-generated.
9804         * features/s390-linux64v1.c: Re-generated.
9805         * features/s390-linux64v2.c: Re-generated.
9806         * features/s390-te-linux64.c: Re-generated.
9807         * features/s390-tevx-linux64.c: Re-generated.
9808         * features/s390-vx-linux64.c: Re-generated.
9809         * features/s390x-linux64.c: Re-generated.
9810         * features/s390x-linux64v1.c: Re-generated.
9811         * features/s390x-linux64v2.c: Re-generated.
9812         * features/s390x-te-linux64.c: Re-generated.
9813         * features/s390x-tevx-linux64.c: Re-generated.
9814         * features/s390x-vx-linux64.c: Re-generated.
9815         * features/sparc/sparc32-solaris.c: Re-generated.
9816         * features/sparc/sparc64-solaris.c: Re-generated.
9817         * features/tic6x-c62x.c: Re-generated.
9818         * features/tic6x-c62x-linux.c: Re-generated.
9819         * features/tic6x-c64x.c: Re-generated.
9820         * features/tic6x-c64x-linux.c: Re-generated.
9821         * features/tic6x-c64xp.c: Re-generated.
9822         * features/tic6x-c64xp-linux.c: Re-generated.
9823
9824 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9825
9826         * i386-linux-tdep.c (i386_linux_read_description): New function.
9827         (i386_linux_core_read_description): Call
9828         i386_linux_read_description.
9829         * i386-linux-tdep.h (i386_linux_read_description): Declare.
9830         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9831         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9832         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9833         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9834         * x86-linux-nat.c (x86_linux_read_description): Call
9835         i386_linux_read_description.
9836
9837 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9838
9839         * NEWS: Mention it.
9840         * features/Makefile (%.c: %.xml): Pass the xml file name to
9841         command "maint print c-tdesc".
9842         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9843         name from 'arg'.
9844
9845 2017-07-26  Yao Qi  <yao.qi@linaro.org>
9846
9847         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
9848         in-class initialization.
9849         (tdesc_create_feature): Call new instead of XCNEW.
9850         (free_target_description): Ue delete.
9851
9852 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
9853
9854         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9855
9856 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9857
9858         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9859         constant.
9860         (amd64_x32_init_abi): Likewise.
9861         * amd64-tdep.h (amd64_init_abi): Update declaration.
9862         (amd64_x32_init_abi): Likewise.
9863
9864 2017-07-25  Yao Qi  <yao.qi@linaro.org>
9865
9866         PR tdep/21717
9867         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9868         condition for FPSCR.
9869         (arm_linux_store_inferior_registers): Likewise.
9870
9871 2017-07-22  Tom Tromey  <tom@tromey.com>
9872
9873         * break-catch-syscall.c (struct catch_syscall_inferior_data)
9874         <syscalls_counts>: Now a std::vector.
9875         (get_catch_syscall_inferior_data): Use "new".
9876         (catch_syscall_inferior_data_cleanup): Use "delete".
9877         (insert_catch_syscall, remove_catch_syscall)
9878         (clear_syscall_counts): Update.
9879
9880 2017-07-22  Tom Tromey  <tom@tromey.com>
9881
9882         * break-catch-syscall.c (syscall_catchpoint)
9883         <syscalls_to_be_caught>: Now a std::vector<int>
9884         (~syscall_catchpoint): Remove.
9885         (insert_catch_syscall, remove_catch_syscall)
9886         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9887         (print_mention_catch_syscall, print_recreate_catch_syscall):
9888         Update.
9889         (create_syscall_event_catchpoint): Change type of "filter"
9890         parameter.
9891         (catch_syscall_split_args): Return a std::vector.
9892         (catch_syscall_command_1, catching_syscall_number_1): Update.
9893
9894 2017-07-22  Tom Tromey  <tom@tromey.com>
9895
9896         * break-catch-throw.c (struct exception_catchpoint)
9897         <exception_rx>: Now a std::string.
9898         (~exception_catchpoint): Remove.
9899         (print_one_detail_exception_catchpoint): Update.
9900         (handle_gnu_v3_exceptions): Change type of except_rx.
9901         (extract_exception_regexp): Return a std::string.
9902         (catch_exception_command_1): Update.
9903
9904 2017-07-22  Tom Tromey  <tom@tromey.com>
9905
9906         * break-catch-sig.c (gdb_signal_type): Remove typedef.
9907         (struct signal_catchpoint) <signals_to_be_caught>: Now a
9908         std::vector.
9909         <catch_all>: Now a bool.
9910         (~signal_catchpoint): Remove.
9911         (signal_catchpoint_insert_location)
9912         (signal_catchpoint_remove_location)
9913         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9914         (signal_catchpoint_print_mention)
9915         (signal_catchpoint_print_recreate)
9916         (signal_catchpoint_explains_signal): Update.
9917         (create_signal_catchpoint): Change type of "filter" and
9918         "catch_all".
9919         (catch_signal_split_args): Return a std::vector.  Change type of
9920         "catch_all".
9921         (catch_signal_command): Update.
9922
9923 2017-07-20  Pedro Alves  <palves@redhat.com>
9924
9925         * ada-lang.c (ada_language_defn): Make extern.
9926         (_initialize_ada_language): Remove add_language call.
9927         * c-lang.c (c_language_defn, cplus_language_defn)
9928         (asm_language_defn, minimal_language_defn): Make extern.
9929         (_initialize_c_language): Delete.
9930         * completer.c (compare_cstrings): Delete, moved to utils.h.
9931         * d-lang.c (d_language_defn): Make extern.
9932         (_initialize_d_language): Remove add_language calls.
9933         * defs.h (enum language): Add comment.
9934         * f-lang.c (f_language_defn): Make extern.
9935         (_initialize_f_language): Remove add_language call.
9936         * go-lang.c (go_language_defn): Make extern.
9937         (_initialize_go_language): Remove add_language call.
9938         * language.c: Include <algorithm>.
9939         (languages): Redefine as const array.
9940         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9941         (set_language_command): Handle "local".  Use for-range loop.
9942         (set_language): Remove loop.
9943         (language_enum): Rewrite.
9944         (language_def, language_str): Remove loops.
9945         (add_language): Delete.
9946         (add_set_language_command): New, based on add_languages.
9947         (skip_language_trampoline): Adjust.
9948         (local_language_defn): Delete.
9949         (language_gdbarch_post_init): Adjust.
9950         (_initialize_language): Remove add_language calls.  Call
9951         add_set_language_command.
9952         * language.h (add_language): Delete.
9953         (auto_language_defn)
9954         (unknown_language_defn, minimal_language_defn, ada_language_defn)
9955         (asm_language_defn, c_language_defn, cplus_language_defn)
9956         (d_language_defn, f_language_defn, go_language_defn)
9957         (m2_language_defn, objc_language_defn, opencl_language_defn)
9958         (pascal_language_defn, rust_language_defn): Declare.
9959         * m2-lang.c (m2_language_defn): Make extern.
9960         (_initialize_m2_language): Remove add_language call.
9961         * objc-lang.c (objc_language_defn): Make extern.
9962         (_initialize_objc_language): Remove add_language call.
9963         * opencl-lang.c (opencl_language_defn): Make extern.
9964         (_initialize_opencl_language): Remove add_language call.
9965         * p-lang.c (pascal_language_defn): Make extern.
9966         (_initialize_pascal_language): Delete.
9967         * rust-lang.c (rust_language_defn): Make extern.
9968         (_initialize_rust_language): Delete.
9969         * utils.h (compare_cstrings): New static inline function.
9970
9971 2017-07-20  Pedro Alves  <palves@redhat.com>
9972
9973         * ada-lang.c (ada_to_fixed_type_1): Adjust.
9974         (get_var_value): Constify parameters.
9975         (get_int_var_value): Change prototype.
9976         (to_fixed_range_type): Adjust.
9977         * ada-lang.h (get_int_var_value): Change prototype.
9978
9979 2017-07-20  Pedro Alves  <palves@redhat.com>
9980
9981         * dwarf2read.c (dw2_lookup_symbol): Use
9982         SYMBOL_MATCHES_SEARCH_NAME.
9983         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9984
9985 2017-07-20  Pedro Alves  <palves@redhat.com>
9986
9987         * block.c (block_iter_name_step, block_iter_name_first)
9988         (block_iter_name_next): Delete.
9989         (block_lookup_symbol_primary): Adjust to use
9990         dict_iter_match_first/dict_iter_match_next.
9991         * block.h (block_iter_name_first, block_iter_name_next): Delete
9992         declarations.
9993         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9994         dict_iter_match_first/dict_iter_match_next.
9995
9996 2017-07-20  Pedro Alves  <palves@redhat.com>
9997
9998         * cp-support.c (cp_find_first_component_aux): Add missing case for
9999         end of string.
10000
10001 2017-07-18  David Blaikie  <dblaikie@gmail.com>
10002
10003         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10004         of dwo_cu's dwo_file.
10005
10006 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10007
10008         * remote.c (store_registers_using_G): Remove one line comment.
10009
10010 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10011
10012         * regcache.c (regcache_cpy): Simplify it.
10013         (regcache::cpy_no_passthrough): Remove it.
10014         * regcache.h (cpy_no_passthrough): Remove it.
10015         (regcache_dup, regcache_cpy): Update comments.
10016
10017 2017-07-18  Pedro Alves  <palves@redhat.com>
10018
10019         * remote-sim.c (sim_command_completer): Adjust to work with a
10020         completion_tracker instead of a VEC.
10021
10022 2017-07-17  Pedro Alves  <palves@redhat.com>
10023
10024         * completer.c (complete_source_filenames): New function.
10025         (complete_address_and_linespec_locations): New function.
10026         (location_completer): Use complete_address_and_linespec_locations.
10027         (completion_tracker::build_completion_result): Honor the tracker's
10028         request to suppress append.
10029         * completer.h (completion_tracker::suppress_append_ws)
10030         (completion_tracker::set_suppress_append_ws): New methods.
10031         (completion_tracker::m_suppress_append_ws): New field.
10032         (complete_source_filenames): New declaration.
10033         * linespec.c (linespec_complete_what): New.
10034         (struct ls_parser) <complete_what, completion_word,
10035         completion_quote_char, completion_quote_end, completion_tracker>:
10036         New fields.
10037         (string_find_incomplete_keyword_at_end): New.
10038         (linespec_lexer_lex_string): Record quote char.  If in completion
10039         mode, don't throw.
10040         (linespec_lexer_consume_token): Advance the completion word point.
10041         (linespec_lexer_peek_token): Save/restore completion info.
10042         (save_stream_and_consume_token): New.
10043         (set_completion_after_number): New.
10044         (linespec_parse_basic): Set what to complete next depending on
10045         token.  Handle function and label completions specially.
10046         (parse_linespec): Disable objc shortcut in completion mode.  Set
10047         what to complete next depending on token type.  Skip keyword if in
10048         completion mode.
10049         (complete_linespec_component, linespec_complete): New.
10050         * linespec.h (linespec_complete): Declare.
10051
10052 2017-07-17  Pedro Alves  <palves@redhat.com>
10053
10054         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10055         Handle 'operator<' / 'operator<<'.
10056
10057 2017-07-17  Pedro Alves  <palves@redhat.com>
10058
10059         * completer.c (collect_explicit_location_matches): Handle
10060         MATCH_LABEL.
10061         (convert_explicit_location_to_linespec): New, factored out from
10062         ...
10063         (convert_explicit_location_to_sals): ... this.
10064         (complete_label): New.
10065         (linespec_complete_label, find_label_symbols_in_block): New.
10066         (find_label_symbols): Add completion_mode parameter and adjust to
10067         call find_label_symbols_in_block.
10068         * linespec.h (linespec_complete_label): Declare.
10069
10070 2017-07-17  Pedro Alves  <palves@redhat.com>
10071
10072         * ada-lang.c (ada_collect_symbol_completion_matches): Add
10073         complete_symbol_mode parameter.
10074         * cli/cli-cmds.c (complete_command): Get the completion result out
10075         of the handle_brkchars tracker if used a custom word point.
10076         * completer.c: Include "linespec.h".
10077         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10078         (advance_to_expression_complete_word_point): New.
10079         (completion_tracker::completes_to_completion_word): New.
10080         (complete_files_symbols): Pass down
10081         complete_symbol_mode::EXPRESSION.
10082         (explicit_options, probe_options): New.
10083         (collect_explicit_location_matches): Complete on the
10084         explictit_loc->foo instead of word.  Use
10085         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
10086         keyword and options completions.
10087         (backup_text_ptr): Delete.
10088         (skip_keyword): New.
10089         (complete_explicit_location): Remove 'word' parameter.  Add
10090         language, quoted_arg_start and quoted_arg_end parameters.
10091         Rewrite, parsing left to right.
10092         (location_completer): Rewrite.
10093         (location_completer_handle_brkchars): New function.
10094         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10095         (enum complete_line_internal_reason): Adjust comments.
10096         (completion_tracker::discard_completions): New.
10097         (completer_handle_brkchars_func_for_completer): Handle
10098         location_completer.
10099         (gdb_custom_word_point_brkchars)
10100         (gdb_org_rl_basic_quote_characters): New.
10101         (gdb_completion_word_break_characters_throw)
10102         (completion_find_completion_word): Handle trackers that use a
10103         custom word point.
10104         (completion_tracker::advance_custom_word_point_by): New.
10105         (completion_tracker::build_completion_result): Don't rely on
10106         readline appending the quote char.
10107         (gdb_rl_attempted_completion_function_throw): Handle trackers that
10108         use a custom word point.
10109         (gdb_rl_attempted_completion_function): Restore
10110         rl_basic_quote_characters.
10111         * completer.h (class completion_tracker): Extend intro comment.
10112         (completion_tracker::set_quote_char)
10113         (completion_tracker::quote_char)
10114         (completion_tracker::set_use_custom_word_point)
10115         (completion_tracker::use_custom_word_point)
10116         (completion_tracker::custom_word_point)
10117         (completion_tracker::set_custom_word_point)
10118         (completion_tracker::advance_custom_word_point_by)
10119         (completion_tracker::completes_to_completion_word)
10120         (completion_tracker::discard_completions): New methods.
10121         (completion_tracker::m_quote_char)
10122         (completion_tracker::m_use_custom_word_point)
10123         (completion_tracker::m_custom_word_point): New fields.
10124         (advance_to_expression_complete_word_point): Declare.
10125         * f-lang.c (f_collect_symbol_completion_matches): Add
10126         complete_symbol_mode parameter.
10127         * language.h (struct language_defn)
10128         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10129         parameter.
10130         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
10131         (linespec_complete_function): New function.
10132         (linespec_lexer_lex_keyword): Adjust.
10133         * linespec.h (linespec_keywords, linespec_complete_function): New
10134         declarations.
10135         * location.c (find_end_quote): New function.
10136         (explicit_location_lex_one): Add explicit_completion_info
10137         parameter.  Save quoting info.  Don't throw if being called for
10138         completion.  Don't handle Ada operators here.
10139         (is_cp_operator, skip_op_false_positives, first_of)
10140         (explicit_location_lex_one_function): New function.
10141         (string_to_explicit_location): Replace 'dont_throw' parameter with
10142         an explicit_completion_info pointer parameter.  Handle it.  Don't
10143         use explicit_location_lex_one to lex function names.  Use
10144         explicit_location_lex_one_function instead.
10145         * location.h (struct explicit_completion_info): New.
10146         (string_to_explicit_location): Replace 'dont_throw' parameter with
10147         an explicit_completion_info pointer parameter.
10148         * symtab.c (default_collect_symbol_completion_matches_break_on):
10149         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
10150         (default_collect_symbol_completion_matches)
10151         (collect_symbol_completion_matches): Add complete_symbol_mode
10152         parameter.
10153         (collect_symbol_completion_matches_type): Pass down
10154         complete_symbol_mode::EXPRESSION.
10155         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10156         parameter.  Handle LINESPEC mode.
10157         * symtab.h (complete_symbol_mode): New.
10158         (default_collect_symbol_completion_matches_break_on)
10159         (default_collect_symbol_completion_matches)
10160         (collect_symbol_completion_matches)
10161         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10162         parameter.
10163
10164 2017-07-17  Pedro Alves  <palves@redhat.com>
10165
10166         * utils.c (enum class strncmp_iw_mode): New.
10167         (strcmp_iw): Rename to ...
10168         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
10169         parameters.  Handle them.
10170         (strncmp_iw): New.
10171         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10172         * utils.h (strncmp_iw): Declare.
10173         (strcmp_iw): Move describing comments here.
10174
10175 2017-07-17  Pedro Alves  <palves@redhat.com>
10176
10177         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10178         CP_OPERATOR_STR.
10179         * c-typeprint.c (is_type_conversion_operator): Use
10180         CP_OPERATOR_STR.
10181         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10182         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10183         CP_OPERATOR_LEN.
10184         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10185         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10186         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10187         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10188         CP_OPERATOR_STR.
10189         * location.c: Include "cp-support.h".
10190         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10191         CP_OPERATOR_STR.
10192         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10193         CP_OPERATOR_LEN.
10194
10195 2017-07-17  Pedro Alves  <palves@redhat.com>
10196
10197         * cli/cli-cmds.c (complete_command): Use a completion tracker
10198         along with completion_find_completion_word for handle_brkchars
10199         phase.
10200         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10201         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10202         (struct gdb_rl_completion_word_info): New.
10203         (gdb_rl_find_completion_word): New.
10204         (completion_find_completion_word): New.
10205         * completer.h (completion_find_completion_word): Declare.
10206
10207 2017-07-17  Pedro Alves  <palves@redhat.com>
10208
10209         * ada-lang.c (symbol_completion_match): Adjust comments.
10210         (symbol_completion_add): Replace vector parameter with
10211         completion_tracker parameter.  Use it.
10212         (ada_make_symbol_completion_list): Rename to...
10213         (ada_collect_symbol_completion_matches): ... this.  Add
10214         completion_tracker parameter and use it.
10215         (ada_language_defn): Adjust.
10216         * break-catch-syscall.c (catch_syscall_completer): Adjust
10217         prototype and work with completion_tracker instead of VEC.
10218         * breakpoint.c (condition_completer): Adjust prototype and work
10219         with completion_tracker instead of VEC.
10220         * c-lang.c (c_language_defn, cplus_language_defn)
10221         (asm_language_defn, minimal_language_defn): Adjust to renames.
10222         * cli/cli-cmds.c (complete_command): Rework using
10223         completion_tracker.  Catch exceptions when completing.
10224         * cli/cli-decode.c (integer_unlimited_completer)
10225         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10226         with completion_tracker instead of VEC.
10227         * command.h (struct completion_tracker): Forward declare.
10228         (completer_ftype, completer_handle_brkchars_ftype): Change
10229         types.
10230         (complete_on_cmdlist, complete_on_enum): Adjust.
10231         * completer.c: Include <algorithm>.
10232         (struct gdb_completer_state): New.
10233         (current_completion): New global.
10234         (readline_line_completion_function): Delete.
10235         (noop_completer, filename_completer)
10236         (filename_completer_handle_brkchars, complete_files_symbols)
10237         (linespec_location_completer): Adjust to work with a
10238         completion_tracker instead of a VEC.
10239         (string_or_empty): New.
10240         (collect_explicit_location_matches): Adjust to work with a
10241         completion_tracker instead of a VEC.
10242         (explicit_location_completer): Rename to ...
10243         (complete_explicit_location): ... this and adjust to work with a
10244         completion_tracker instead of a VEC.
10245         (location_completer): Adjust to work with a completion_tracker
10246         instead of a VEC.
10247         (add_struct_fields): Adjust to work with a completion_list instead
10248         of VEC.
10249         (expression_completer): Rename to ...
10250         (complete_expression): ... this and adjust to work with a
10251         completion_tracker instead of a VEC.  Use complete_files_symbols.
10252         (expression_completer): Reimplement on top of complete_expression.
10253         (symbol_completer): Adjust to work with a completion_tracker
10254         instead of a VEC.
10255         (enum complete_line_internal_reason): Add describing comments.
10256         (complete_line_internal_normal_command): Adjust to work with a
10257         completion_tracker instead of a VEC.
10258         (complete_line_internal): Rename to ...
10259         (complete_line_internal_1): ... this and adjust to work with a
10260         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
10261         handle_brkchars phase.
10262         (new_completion_tracker): Delete.
10263         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10264         complete_line_internal_1.
10265         (free_completion_tracker): Delete.
10266         (INITIAL_COMPLETION_HTAB_SIZE): New.
10267         (completion_tracker::completion_tracker)
10268         (completion_tracker::~completion_tracker): New.
10269         (maybe_add_completion): Delete.
10270         (completion_tracker::maybe_add_completion)
10271         (completion_tracker::add_completion)
10272         (completion_tracker::add_completions): New.
10273         (throw_max_completions_reached_error): Delete.
10274         (complete_line): Adjust to work with a completion_tracker instead
10275         of a VEC.  Don't create a completion_tracker_t or check for max
10276         completions here.
10277         (command_completer, command_completer_handle_brkchars)
10278         (signal_completer, reg_or_group_completer_1)
10279         (reg_or_group_completer, default_completer_handle_brkchars):
10280         Adjust to work with a completion_tracker.
10281         (gdb_completion_word_break_characters_throw): New.
10282         (gdb_completion_word_break_characters): Reimplement.
10283         (line_completion_function): Delete.
10284         (completion_tracker::recompute_lowest_common_denominator)
10285         (expand_preserving_ws)
10286         (completion_tracker::build_completion_result)
10287         (completion_result::completion_result)
10288         (completion_result::completion_result)
10289         (completion_result::~completion_result)
10290         (completion_result::completion_result)
10291         (completion_result::release_match_list, compare_cstrings)
10292         (completion_result::sort_match_list)
10293         (completion_result::reset_match_list)
10294         (gdb_rl_attempted_completion_function_throw)
10295         (gdb_rl_attempted_completion_function): New.
10296         * completer.h (completion_list, struct completion_result)
10297         (class completion_tracker): New.
10298         (complete_line): Add completion_tracker parameter.
10299         (readline_line_completion_function): Delete.
10300         (gdb_rl_attempted_completion_function): New.
10301         (noop_completer, filename_completer, expression_completer)
10302         (location_completer, symbol_completer, command_completer)
10303         (signal_completer, reg_or_group_completer): Update prototypes.
10304         (completion_tracker_t, new_completion_tracker)
10305         (make_cleanup_free_completion_tracker): Delete.
10306         (enum maybe_add_completion_enum): Delete.
10307         (maybe_add_completion): Delete.
10308         (throw_max_completions_reached_error): Delete.
10309         * corefile.c (complete_set_gnutarget): Adjust to work with a
10310         completion_tracker instead of a VEC.
10311         * cp-abi.c (cp_abi_completer): Adjust to work with a
10312         completion_tracker instead of a VEC.
10313         * d-lang.c (d_language_defn): Adjust.
10314         * disasm.c (disassembler_options_completer): Adjust to work with a
10315         completion_tracker instead of a VEC.
10316         * f-lang.c (f_make_symbol_completion_list): Rename to ...
10317         (f_collect_symbol_completion_matches): ... this.  Adjust to work
10318         with a completion_tracker instead of a VEC.
10319         (f_language_defn): Adjust.
10320         * go-lang.c (go_language_defn): Adjust.
10321         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10322         Adjust to work with a completion_tracker instead of a VEC.
10323         * infrun.c (handle_completer): Likewise.
10324         * interps.c (interpreter_completer): Likewise.
10325         * interps.h (interpreter_completer): Likewise.
10326         * language.c (unknown_language_defn, auto_language_defn)
10327         (local_language_defn): Adjust.
10328         * language.h (language_defn::la_make_symbol_completion_list):
10329         Rename to ...
10330         (language_defn::la_collect_symbol_completion_matches): ... this
10331         and adjust to work with a completion_tracker instead of a VEC.
10332         * m2-lang.c (m2_language_defn): Adjust.
10333         * objc-lang.c (objc_language_defn): Adjust.
10334         * opencl-lang.c (opencl_language_defn): Adjust.
10335         * p-lang.c (pascal_language_defn): Adjust.
10336         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10337         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10338         with a completion_tracker.
10339         * rust-lang.c (rust_language_defn): Adjust.
10340         * symtab.c (free_completion_list, do_free_completion_list)
10341         (return_val, completion_tracker): Delete.
10342         (completion_list_add_name, completion_list_add_symbol)
10343         (completion_list_add_msymbol, completion_list_objc_symbol)
10344         (completion_list_add_fields, add_symtab_completions): Add
10345         completion_tracker parameter and use it.
10346         (default_make_symbol_completion_list_break_on_1): Rename to...
10347         (default_collect_symbol_completion_matches_break_on): ... this.
10348         Add completion_tracker parameter and use it instead of allocating
10349         a completion tracker here.
10350         (default_make_symbol_completion_list_break_on): Delete old
10351         implementation.
10352         (default_make_symbol_completion_list): Delete.
10353         (default_collect_symbol_completion_matches): New.
10354         (make_symbol_completion_list): Delete.
10355         (collect_symbol_completion_matches): New.
10356         (make_symbol_completion_type): Rename to ...
10357         (collect_symbol_completion_matches_type): ... this.  Add
10358         completion_tracker parameter and use it instead of VEC.
10359         (make_file_symbol_completion_list_1): Rename to...
10360         (collect_file_symbol_completion_matches): ... this.  Add
10361         completion_tracker parameter and use it instead of VEC.
10362         (make_file_symbol_completion_list): Delete.
10363         (add_filename_to_list): Use completion_list instead of a VEC.
10364         (add_partial_filename_data::list): Now a completion_list.
10365         (make_source_files_completion_list): Work with a completion_list
10366         instead of a VEC.
10367         * symtab.h: Include "completer.h".
10368         (default_make_symbol_completion_list_break_on)
10369         (default_make_symbol_completion_list, make_symbol_completion_list)
10370         (make_symbol_completion_type, make_file_symbol_completion_list)
10371         (make_source_files_completion_list): Delete.
10372         (default_collect_symbol_completion_matches_break_on)
10373         (default_collect_symbol_completion_matches)
10374         (collect_symbol_completion_matches)
10375         (collect_symbol_completion_matches_type)
10376         (collect_file_symbol_completion_matches)
10377         (make_source_files_completion_list): New.
10378         * top.c (init_main): Don't install a rl_completion_entry_function
10379         hook.  Install a rl_attempted_completion_function hook instead.
10380         * tui/tui-layout.c (layout_completer): Adjust to work with a
10381         completion_tracker.
10382         * tui/tui-regs.c (tui_reggroup_completer):
10383         * tui/tui-win.c (window_name_completer, focus_completer)
10384         (winheight_completer): Adjust to work with a completion_tracker.
10385         * value.c: Include "completer.h".
10386         (complete_internalvar): Adjust to work with a completion_tracker.
10387         * value.h (complete_internalvar): Likewise.
10388
10389 2017-07-17  Pedro Alves  <palves@redhat.com>
10390
10391         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10392         renames.
10393         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10394         comments to completer_ftype's declaration.
10395         <completer_handle_brkchars>: Change type to
10396         completer_handle_brkchars_ftype.
10397         * command.h (completer_ftype): Add describing comment and give
10398         names to parameters.
10399         (completer_ftype_void): Rename to ...
10400         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
10401         (set_cmd_completer_handle_brkchars): Adjust.
10402         * completer.c (filename_completer_handle_brkchars): New function.
10403         (complete_line_internal_normal_command): New function, factored
10404         out from ...
10405         (complete_line_internal): ... here.
10406         (command_completer_handle_brkchars)
10407         (default_completer_handle_brkchars)
10408         (completer_handle_brkchars_func_for_completer): New functions.
10409         * completer.h (set_gdb_completion_word_break_characters): Delete
10410         declaration.
10411         (completer_handle_brkchars_func_for_completer): New declaration.
10412         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10413         completer_handle_brkchars_func_for_completer.
10414
10415 2017-07-17  Pedro Alves  <palves@redhat.com>
10416
10417         * completer.c (symbol_completer): New function, based on
10418         make_symbol_completion_list_fn.
10419         * completer.h (symbol_completer): New declaration.
10420         * guile/scm-cmd.c (cmdscm_completers): Adjust.
10421         * python/py-cmd.c (completers): Adjust.
10422         * symtab.c (make_symbol_completion_list_fn): Delete.
10423         * symtab.h (make_symbol_completion_list_fn): Delete.
10424         * cli/cli-decode.c (add_cmd): Adjust.
10425
10426 2017-07-17  Pedro Alves  <palves@redhat.com>
10427
10428         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10429         * dwarf2read.c: Include "filename-seen-cache.h".
10430         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10431         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10432         * filename-seen-cache.c: New file.
10433         * filename-seen-cache.h: New file.
10434         * symtab.c: Include "filename-seen-cache.h".
10435         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10436         (create_filename_seen_cache, clear_filename_seen_cache)
10437         (delete_filename_seen_cache, filename_seen): Delete, parts moved
10438         to filename-seen-cache.h/filename-seen-cache.c.
10439         (output_source_filename, sources_info)
10440         (maybe_add_partial_symtab_filename)
10441         (make_source_files_completion_list): Adjust to use
10442         filename_seen_cache.
10443
10444 2017-07-17  Pedro Alves  <palves@redhat.com>
10445
10446         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10447         fields.
10448         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10449         dwarf2_debug_sections*)): New.
10450         (dwarf2_per_objfile::dwarf2_per_objfile(const
10451         dwarf2_per_objfile&)): Declare as deleted.
10452         (dwarf2_per_objfile::operator=): Declare as deleted.
10453         (dwarf2_per_objfile::dwarf2_per_objfile)
10454         (dwarf2_per_objfile::~dwarf2_per_objfile)
10455         (dwarf2_per_objfile::free_cached_comp_units): New.
10456         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10457         ctor.  Call dwarf2_per_objfile's ctor manually.
10458         (dwarf2_locate_sections): Deleted/refactored as ...
10459         (dwarf2_per_objfile::locate_sections): ... this new method.
10460         (free_cached_comp_units): Defer to
10461         dwarf2_per_objfile::free_cached_comp_units.
10462         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10463
10464 2017-07-14  Tom Tromey  <tom@tromey.com>
10465
10466         PR rust/21764:
10467         * rust-exp.y (convert_ast_to_expression): Add "want_type"
10468         parameter.
10469         <UNOP_SIZEOF>: Split into separate case.
10470         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
10471
10472 2017-07-14  Tom Tromey  <tom@tromey.com>
10473
10474         PR rust/21763:
10475         * symtab.c (symbol_matches_domain): Add language_rust to special
10476         case.
10477         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10478         treat LOC_TYPEDEF symbols as variables.
10479
10480 2017-07-14  Pedro Alves  <palves@redhat.com>
10481
10482         * symtab.c (make_file_symbol_completion_list_1): Iterate over
10483         symtabs matching all symtabs with SRCFILE as file name instead of
10484         only considering the first hit, with lookup_symtab.
10485
10486 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10487
10488         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10489         operator_name parameters.
10490         (gen_expr): Update function call.
10491
10492 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10493
10494         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10495         parameter.
10496         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10497         Likewise.
10498         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10499         parameter, use agent_expr::gdbarch instead, update function
10500         calls.
10501         (locexpr_tracepoint_var_ref): Likewise.
10502         (loclist_tracepoint_var_ref): Likewise.
10503         * ax-gdb.c (gen_trace_static_fields): Likewise.
10504         (gen_traced_pop): Likewise.
10505         (gen_frame_args_address): Likewise.
10506         (gen_frame_locals_address): Likewise.
10507         (gen_var_ref): Likewise.
10508         (gen_struct_ref_recursive): Likewise.
10509         (gen_static_field): Likewise.
10510         (gen_maybe_namespace_elt): Likewise.
10511         (gen_expr): Likewise.
10512         (gen_trace_for_var): Likewise.
10513         (gen_trace_for_expr): Likewise.
10514         (gen_trace_for_return_address): Likewise.
10515
10516 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10517
10518         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10519         parameter.
10520         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10521
10522 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10523
10524         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10525         from ax, update calls.
10526         (gen_usual_arithmetic): Likewise.
10527         (gen_integral_promotions): Likewise.
10528         (gen_bitfield_ref): Likewise.
10529         (gen_primitive_field): Likewise.
10530         (gen_struct_ref_recursive): Likewise.
10531         (gen_struct_ref): Likewise.
10532         (gen_maybe_namespace_elt): Likewise.
10533         (gen_struct_elt_for_reference): Likewise.
10534         (gen_namespace_elt): Likewise.
10535         (gen_aggregate_elt_ref): Likewise.
10536         (gen_expr): Get gdbarch from ax, update calls.
10537         (gen_expr_binop_rest): Likewise.
10538
10539 2017-07-13  Pedro Alves  <palves@redhat.com>
10540
10541         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10542         as default tdesc.
10543         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10544         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10545         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10546         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
10547         tdep.
10548         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10549         Get final tdesc from the tdep.
10550         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10551         default tdesc.
10552         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10553         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10554         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10555         Use it as default tdesc.
10556         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10557         down to amd_init_abi.  No longer handle fallback tdesc here.
10558         * amd64-tdep.h (tdesc_x32): Declare.
10559         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10560         parameter.
10561         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10562         as default tdesc.
10563
10564 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10565
10566         * s390-linux-tdep.c (s390_process_record): Add support for
10567         instructions new in arch12.
10568
10569 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10570
10571         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10572         PT_GETFSBASE and PT_GETGSBASE.
10573         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10574         PT_SETGSBASE.
10575
10576 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
10577
10578         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10579         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10580         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10581         those rules.
10582         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10583         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10584         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10585         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10586         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10587         * features/i386/amd64.xml: Add 64bit-segments.xml.
10588         * features/i386/amd64-avx-avx512.c: Regenerated.
10589         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10590         * features/i386/amd64-avx-mpx.c: Regenerated.
10591         * features/i386/amd64-avx.c: Regenerated.
10592         * features/i386/amd64-mpx.c: Regenerated.
10593         * features/i386/amd64.c: Regenerated.
10594         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10595         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10596         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10597         * regformats/i386/amd64-avx.dat: Regenerated.
10598         * regformats/i386/amd64-mpx.dat: Regenerated.
10599         * regformats/i386/amd64.dat: Regenerated.
10600
10601 2017-07-10  Yao Qi  <yao.qi@linaro.org>
10602
10603         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10604         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10605
10606 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
10607
10608         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10609         unsetenv.
10610         * gnulib/aclocal.m4: Regenerate.
10611         * gnulib/config.in: Regenerate.
10612         * gnulib/configure: Regenerate.
10613         * gnulib/import/Makefile.am: Regenerate.
10614         * gnulib/import/Makefile.in: Regenerate.
10615         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10616         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10617         * gnulib/import/m4/environ.m4: New file.
10618         * gnulib/import/m4/setenv.m4: New file.
10619         * gnulib/import/setenv.c: New file.
10620         * gnulib/import/unsetenv.c: New file.
10621
10622 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
10623
10624         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10625         address when op is DW_OP_addr.
10626
10627 2017-07-09  Tom Tromey  <tom@tromey.com>
10628
10629         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10630         check and apply to outer type.
10631
10632 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10633
10634         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10635         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10636         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10637         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10638
10639 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10640
10641         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10642
10643 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10644
10645         * corelow.c (get_core_siginfo): Remove.
10646         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10647         instead of get_core_siginfo.
10648         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10649         * gdbarch.h: Re-generate.
10650         * gdbarch.c: Re-generate.
10651         * linux-tdep.c (linux_core_xfer_siginfo): New.
10652         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10653
10654 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10655
10656         * corelow.c (thread_section_name): Move to ...
10657         * gdbcore.h (thread_section_name): ... here.
10658
10659 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10660
10661         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10662         (struct siginfo32): New.
10663         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10664         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10665         via ptrace(PT_LWPINFO).
10666
10667 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
10668
10669         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10670         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10671         (fbsd_get_siginfo_type): New.
10672         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10673         (_initialize_fbsd_tdep): New.
10674
10675 2017-07-06  David Blaikie  <dblaikie@gmail.com>
10676
10677         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10678         a singular dwo_unit*) to support multiple CUs in the same way that
10679         multiple TUs are supported.
10680         (create_cus_hash_table): Replace create_dwo_cu with a function for
10681         parsing multiple CUs from a DWO file.
10682         (open_and_init_dwo_file): Use create_cus_hash_table rather than
10683         create_dwo_cu.
10684         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10685         htab_find, rather than comparing the signature to a singleton CU in
10686         the dwo_file.
10687
10688 2017-07-06  Pedro Alves  <palves@redhat.com>
10689
10690         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10691
10692 2017-07-04  Pedro Alves  <palves@redhat.com>
10693
10694         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10695         * gdbtypes.h (TYPE_STATIC): Delete.
10696         (struct fn_field) <is_public, is_abstract, is_static, is_final,
10697         is_synchronized, is_native>: Delete.
10698         <dummy>: Bump.
10699         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10700         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10701         (TYPE_FN_FIELD_ABSTRACT): Delete.
10702
10703 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
10704
10705         * buffer.h (buffer_finish): Fix spelling mistakes.
10706
10707 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
10708
10709         * .dir-locals.el: Automatically switch to C-style comments in
10710         versions of Emacs that support the feature.
10711
10712 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10713             Pedro Alves  <palves@redhat.com>
10714
10715         PR cli/21688
10716         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10717         (process_next_line): New variable 'inline_cmd'.
10718         Adjust 'if' clauses for "python", "compile" and "guile" to use
10719         'command_name_equals' and check for '!inline_cmd'.
10720
10721 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
10722
10723         PR cli/21688
10724         * cli/cli-script.c (command_name_equals_not_inline): New function.
10725         (process_next_line): Adjust 'if' clauses for "python", "compile"
10726         and "guile" to use command_name_equals_not_inline.
10727
10728 2017-06-29  Pedro Alves  <palves@redhat.com>
10729
10730         * completer.c (expression_completer): Call
10731         linespec_location_completer instead of location_completer.
10732
10733 2017-06-29  Pedro Alves  <palves@redhat.com>
10734
10735         * completer.c (expression_completer): Remove code that recomputes
10736         'text' from 'word'.
10737
10738 2017-06-29  Yao Qi  <yao.qi@linaro.org>
10739
10740         * regformats/regdat.sh: Generate code with
10741         "ifndef IN_PROCESS_AGENT".
10742
10743 2017-06-28  Pedro Alves  <palves@redhat.com>
10744
10745         * command.h: Include "common/scoped_restore.h".
10746
10747 2017-06-28  Yao Qi  <yao.qi@linaro.org>
10748
10749         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10750         instead of obstack_grow.
10751
10752 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
10753
10754         PR gdb/21337
10755         * symfile.c (reread_symbols): Call objfiles_changed just before
10756         read_symbols.
10757
10758 2017-06-27  Pedro Alves  <palves@redhat.com>
10759
10760         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10761         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10762         (completion_list_add_symbol, completion_list_add_msymbol):
10763         ... these new functions.
10764         (add_symtab_completions)
10765         (default_make_symbol_completion_list_break_on_1): Adjust.
10766
10767 2017-06-27  Pedro Alves  <palves@redhat.com>
10768
10769         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10770         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
10771         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10772         dtor.
10773         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
10774         'storage_obstack' field an auto_obstack.  In-class initialize all
10775         non-bitfield fields.  Make minsyms_read bool.
10776         * symfile.c (read_symbols): Adjust.
10777
10778 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
10779
10780         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10781         (gdbsim_store_register): Likewise.
10782
10783 2017-06-27  Pedro Alves  <palves@redhat.com>
10784
10785         * c-exp.y (name_obstack): Now an auto_obstack.
10786         (yylex): Use auto_obstack::clear.
10787         (c_parse): Use auto_obstack::clear instead of reinitializing and
10788         freeing the obstack.
10789         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10790         * d-exp.y (name_obstack): Now an auto_obstack.
10791         (yylex): Use auto_obstack::clear.
10792         (d_parse): Use auto_obstack::clear instead of reinitializing and
10793         freeing the obstack.
10794         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10795         auto_obstack.
10796         * dwarf2read.c (create_addrmap_from_index)
10797         (dwarf2_build_psymtabs_hard)
10798         (update_enumeration_type_from_children): Likewise.
10799         * gdb_obstack.h (auto_obstack): New type.
10800         * go-exp.y (name_obstack): Now an auto_obstack.
10801         (build_packaged_name): Use auto_obstack::clear.
10802         (go_parse): Use auto_obstack::clear instead of reinitializing and
10803         freeing the obstack.
10804         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10805         auto_obstack.
10806         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10807         * rust-exp.y (work_obstack): Now an auto_obstack.
10808         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10809         reinitializing and freeing the obstack.
10810         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10811         (host_char_to_target): Use auto_obstack.
10812         * utils.h (make_cleanup_obstack_free): Delete declaration.
10813         * valprint.c (generic_emit_char, generic_printstr): Use
10814         auto_obstack.
10815
10816 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
10817
10818         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10819         thread.
10820         (darwin_init_thread_list): Don't update dummy thread.
10821         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10822
10823 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10824
10825         * record-full.c (netorder16): Remove.
10826
10827 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10828
10829         * common/diagnostics.h: Define macros for GCC.
10830         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10831         * common/vec.h: Include diagnostics.h.
10832         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10833         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10834         warning.
10835
10836 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
10837
10838         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10839         New macro.
10840         * ada-lex.l: Ignore deprecated register warnings.
10841
10842 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10843
10844         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10845         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10846
10847 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10848
10849         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10850         its own line.
10851
10852 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
10853
10854         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10855
10856 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
10857
10858         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10859         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10860         (xtensa_register_read_masked): Likewise.
10861
10862 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
10863
10864         * common/environ.c (gdb_environ::unset): Update comment.
10865
10866 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10867
10868         * python/py-unwind.c (pyuw_sniffer): Allocate space for
10869         registers.
10870
10871 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10872
10873         * record-full.c (record_full_exec_insn): Use byte_vector.
10874
10875 2017-06-22  Yao Qi  <yao.qi@linaro.org>
10876
10877         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10878         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10879
10880 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
10881
10882         * remote.c (cached_reg): Move from here...
10883         * regcache.h (cached_reg): ...to here.
10884         * python/py-unwind.c (struct reg_info): Remove.
10885         (cached_frame_info): Use cached_reg_t.
10886         (pyuw_prev_register): Likewise.
10887         (pyuw_sniffer): Use cached_reg_t and allocate registers.
10888         (pyuw_dealloc_cache): Free all registers.
10889
10890 2017-06-22  Pedro Alves  <palves@redhat.com>
10891             Simon Marchi  <simon.marchi@ericsson.com>
10892
10893         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10894         warning.
10895         * common/diagnostics.h: New file.
10896
10897 2017-06-22  Pedro Alves  <palves@redhat.com>
10898
10899         * common/agent.h: Add include guards.
10900
10901 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
10902
10903         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10904         talk about addressable units instead of bytes.
10905
10906 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10907
10908         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10909         of '::const_iterator'.
10910
10911 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
10912
10913         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10914         'unittests/environ-selftests.c'.
10915         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10916         * charset.c (find_charset_names): Declare object 'iconv_env'.
10917         Update code to use 'iconv_env' object.  Remove call to
10918         'free_environ'.
10919         * common/environ.c: Include <utility>.
10920         (make_environ): Delete function.
10921         (free_environ): Delete function.
10922         (gdb_environ::clear): New function.
10923         (gdb_environ::operator=): New function.
10924         (gdb_environ::get): Likewise.
10925         (environ_vector): Delete function.
10926         (set_in_environ): Delete function.
10927         (gdb_environ::set): New function.
10928         (unset_in_environ): Delete function.
10929         (gdb_environ::unset): New function.
10930         (gdb_environ::envp): Likewise.
10931         * common/environ.h: Include <vector>.
10932         (struct gdb_environ): Delete; transform into...
10933         (class gdb_environ): ... this class.
10934         (free_environ): Delete prototype.
10935         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10936         environ_vector): Likewise.
10937         * infcmd.c (run_command_1): Update code to call
10938         'envp' from 'gdb_environ' class.
10939         (environment_info): Update code to call methods from 'gdb_environ'
10940         class.
10941         (unset_environment_command): Likewise.
10942         (path_info): Likewise.
10943         (path_command): Likewise.
10944         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10945         (inferior::inferior): Initialize 'environment' using the host's
10946         information.
10947         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10948         Include "environ.h".
10949         (class inferior) <environment>: Change type from 'struct
10950         gdb_environ' to 'gdb_environ'.
10951         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10952         methods from 'gdb_environ' class.
10953         * solib.c (solib_find_1): Likewise
10954         * unittests/environ-selftests.c: New file.
10955
10956 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10957
10958         * features/i386/i386-linux.xml: Exchange the order of including
10959         32bit-linux.xml and 32bit-sse.xml.
10960         * features/i386/i386-linux.c: Regenerated.
10961
10962 2017-06-20  Yao Qi  <yao.qi@linaro.org>
10963
10964         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10965         Delete copy ctor and assignment operator.
10966         (tdesc_type): Likewise.
10967         (tdesc_feature): Likewise.
10968         (tdesc_free_reg): Remove.
10969         (tdesc_create_reg): Use new.
10970         (tdesc_free_type): Remove.
10971         (tdesc_create_vector): Use new.
10972         (tdesc_create_union): Likewise.
10973         (tdesc_create_flags): Likewise.
10974         (tdesc_create_enum): Likewise.
10975         (tdesc_free_feature): Delete.
10976         (free_target_description): Use delete.
10977
10978 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
10979
10980         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10981         registers.
10982
10983 2017-06-19  Pedro Alves  <palves@redhat.com>
10984
10985         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10986         after gdb::unlinker.
10987
10988 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
10989
10990         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10991         gdb_environ to access an environment variable.
10992
10993 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
10994
10995         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10996         gdb_byte*.
10997
10998 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
10999
11000         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11001
11002 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11003
11004         * configure: Re-generate.
11005         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11006
11007 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11008
11009         * configure: Re-generate.
11010         * warning.m4: Pass -Werror to compiler when checking for
11011         supported warning flags.
11012
11013 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11014
11015         * Makefile.in (COMPILE.pre): Add "-x c++".
11016
11017 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
11018             Pedro Alves  <palves@redhat.com>
11019             Yao Qi  <yao.qi@linaro.org>
11020
11021         * defs.h (RequireLongest): New.
11022         (extract_integer): Declare function template.
11023         (extract_signed_integer): Remove the declaration, but define it
11024         static inline.
11025         (extract_unsigned_integer): Likewise.
11026         (store_integer): Declare function template.
11027         (store_signed_integer): Remove the declaration, but define it
11028         static inline.
11029         (store_unsigned_integer): Likewise.
11030         * findvar.c (extract_integer): New function template.
11031         (extract_signed_integer): Remove.
11032         (extract_unsigned_integer): Remove.
11033         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11034         instantiations.
11035         (store_integer): New function template.
11036         (store_signed_integer): Remove.
11037         (store_unsigned_integer): Remove.
11038         (store_integer): Explicit instantiations.
11039         * regcache.c (regcache_raw_read_signed): Update.
11040         (regcache::raw_read): New function.
11041         (regcache::raw_read_signed): Remove.
11042         (regcache::raw_read_unsigned): Remove.
11043         (regcache_raw_read_unsigned): Update.
11044         (regcache_raw_write_unsigned): Update.
11045         (regcache::raw_write_signed): Remove.
11046         (regcache::raw_write): New function.
11047         (regcache_cooked_read_signed): Update.
11048         (regcache::raw_write_unsigned): Remove.
11049         (regcache::cooked_read_signed): Remove.
11050         (regcache_cooked_read_unsigned): Update.
11051         (regcache::cooked_read_unsigned): Remove.
11052         (regcache_cooked_write_signed): Update.
11053         (regcache_cooked_write_unsigned): Update.
11054         * regcache.h (regcache) <raw_read_signed>: Remove.
11055         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11056         <raw_read, raw_write>: New.
11057         <cooked_read_signed, cooked_write_signed>: Remove.
11058         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11059         <cooked_read, cooked_write>: New.
11060         * sh64-tdep.c (sh64_pseudo_register_read): Update.
11061         (sh64_pseudo_register_write): Update.
11062
11063 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
11064
11065         * arc-tdep.c (arc_disassembler_options): New variable.
11066         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11067         of default_print_insn.
11068         (arc_delayed_print_insn): Set info->section when needed,
11069         use default_print_insn to retrieve a disassembler.
11070
11071 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
11072
11073         PR gdb/21574
11074         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11075         to mention $SHELL and startup-with-shell.
11076
11077 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
11078
11079         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11080
11081 2017-06-14  Yao Qi  <yao.qi@linaro.org>
11082
11083         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11084         default_print_insn instead of print_insn_aarch64.
11085         * arm-tdep.c (gdb_print_insn_arm): Call
11086         default_print_insn instead of print_insn_big_arm
11087         and print_insn_little_arm.
11088         * i386-tdep.c (i386_print_insn): Call default_print_insn
11089         instead of print_insn_i386.
11090         * ia64-tdep.c (ia64_print_insn): Call
11091         default_print_insn instead of print_insn_ia64.
11092         * mips-tdep.c (gdb_print_insn_mips): Call
11093         default_print_insn instead of print_insn_big_mips
11094         and print_insn_little_mips.
11095         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11096         instead of print_insn_spu.
11097
11098 2017-06-14  Pedro Alves  <palves@redhat.com>
11099
11100         * ada-lang.c: Include "common/byte-vector.h".
11101         (ada_value_primitive_packed_val): Use gdb::byte_vector.
11102         * charset.c (wchar_iterator::iterate): Resize the vector instead
11103         of reserving it.
11104         * common/byte-vector.h: Include "common/def-vector.h".
11105         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11106         * cli/cli-dump.c: Include "common/byte-vector.h".
11107         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11108         * common/byte-vector.h: New file.
11109         * common/def-vector.h: New file.
11110         * common/default-init-alloc.h: New file.
11111         * dwarf2loc.c: Include "common/byte-vector.h".
11112         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11113         instead of reserving it.
11114         * dwarf2read.c: Include "common/byte-vector.h".
11115         (data_buf::m_vec): Now a gdb::byte_vector.
11116         * gdb_regex.c: Include "common/def-vector.h".
11117         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11118         * mi/mi-main.c: Include "common/byte-vector.h".
11119         (mi_cmd_data_read_memory): Use gdb::byte_vector.
11120         * printcmd.c: Include "common/byte-vector.h".
11121         (print_scalar_formatted): Use gdb::byte_vector.
11122         * valprint.c: Include "common/byte-vector.h".
11123         (maybe_negate_by_bytes, print_decimal_chars): Use
11124         gdb::byte_vector.
11125
11126 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11127
11128         * darwin-nat.c: Include "nat/fork-inferior.h".
11129
11130 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11131
11132         * configure.nat: Factor out Darwin bits that are not
11133         architecture-specific.  Add fork-inferior.o.
11134
11135 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11136
11137         * configure.nat: Factor out AIX bits that are not
11138         architecture-specific.  Add fork-inferior.o.
11139
11140 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11141
11142         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
11143         (read_pieced_value, write_pieced_value): ...here.  Reduce to
11144         wrappers that just call rw_pieced_value.
11145
11146 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11147
11148         * dwarf2loc.c (write_pieced_value): When writing the data for a
11149         memory piece, use write_memory_with_notification instead of
11150         write_memory.
11151
11152 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11153
11154         * valops.c (read_value_memory): Change embedded_offset to
11155         represent a bit offset instead of a byte offset.
11156         * value.h (read_value_memory): Adjust comment.
11157
11158 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11159
11160         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11161         dest_offset_bits and source_offset_bits.
11162         (write_pieced_value): Likewise.
11163
11164 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11165
11166         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11167         given by DW_OP_bit_piece.
11168         (write_pieced_value): Likewise.
11169
11170 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11171
11172         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11173         some other preparations to the places where sufficient information
11174         is available.
11175         (write_pieced_value): Likewise.
11176
11177 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11178
11179         * dwarf2loc.c (bits_to_bytes): New function.
11180         (read_pieced_value): Fix offset calculations for register pieces
11181         on big-endian targets.
11182         (write_pieced_value): Likewise.
11183
11184 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11185
11186         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11187         (write_pieced_value): Likewise.
11188
11189 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11190
11191         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11192         transfer the source value's least significant bits, instead of its
11193         lowest-addressed ones.  Rename type_len to max_offset.
11194         (read_pieced_value): Mirror above changes to write_pieced_value as
11195         applicable.
11196
11197 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11198
11199         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11200         truncate full bytes from dest_offset_bits before using it as an
11201         offset into the buffer.
11202
11203 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11204
11205         * dwarf2loc.c (write_pieced_value): Include transfer size in
11206         byte-wise check.
11207
11208 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11209
11210         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11211         calculation of this_size.
11212
11213 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11214
11215         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11216         when targeting a bit-field.
11217         (write_pieced_value): Likewise.
11218
11219 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11220
11221         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11222         (allocate_piece_closure): Drop addr_size parameter.
11223         (dwarf2_evaluate_loc_desc_full): Adjust call to
11224         allocate_piece_closure.
11225
11226 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11227
11228         PR gdb/21226
11229         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11230         the LSB end, independent of endianness.
11231
11232 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11233
11234         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11235         size capping.
11236
11237 2017-06-13  Yao Qi  <yao.qi@linaro.org>
11238
11239         * mips-linux-nat.c: Move include features/mips*-linux.c to
11240         mips-linux-tdep.c.
11241         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11242         to mips-linux-tdep.c.
11243         * mips-linux-tdep.c: Include features/mips*-linux.c
11244         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11245         functions.
11246         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11247         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11248         (tdesc_mips64_dsp_linux): Declare.
11249
11250 2017-06-12  Tom Tromey  <tom@tromey.com>
11251
11252         * valprint.h (val_print_type_code_int): Remove.
11253         * valprint.c (generic_val_print_int): Always call
11254         val_print_scalar_formatted.
11255         (val_print_type_code_int): Remove.
11256         * printcmd.c (print_scalar_formatted): Handle options->format==0.
11257         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11258         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11259         * ada-valprint.c (ada_val_print_num): Use
11260         val_print_scalar_formatted.
11261
11262 2017-06-12  Tom Tromey  <tom@tromey.com>
11263
11264         * printcmd.c (print_scalar_formatted): Unify the two switches.
11265         Don't convert scalars to LONGEST.
11266
11267 2017-06-12  Tom Tromey  <tom@tromey.com>
11268
11269         PR exp/16225:
11270         * valprint.h (print_decimal_chars): Update.
11271         * valprint.c (maybe_negate_by_bytes): New function.
11272         (print_decimal_chars): Add "is_signed" argument.
11273         * printcmd.c (print_scalar_formatted): Update.
11274
11275 2017-06-12  Tom Tromey  <tom@tromey.com>
11276
11277         PR exp/16225:
11278         * valprint.h (print_binary_chars, print_hex_chars): Update.
11279         * valprint.c (val_print_type_code_int): Update.
11280         (print_binary_chars): Add "zero_pad" argument.
11281         (emit_octal_digit): New function.
11282         (print_octal_chars): Don't zero-pad.
11283         (print_decimal_chars): Likewise.
11284         (print_hex_chars): Add "zero_pad" argument.
11285         * sh64-tdep.c (sh64_do_fp_register): Update.
11286         * regcache.c (regcache::dump): Update.
11287         * printcmd.c (print_scalar_formatted): Update.
11288         * infcmd.c (default_print_one_register_info): Update.
11289
11290 2017-06-12  Pedro Alves  <palves@redhat.com>
11291             Alan Hayward  <alan.hayward@arm.com>
11292
11293         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11294         (mips_eabi_push_dummy_call): Rename local 'regsize' to
11295         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
11296         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11297         Assert that abi_regsize bytes fit in 'ref_valbuf'.
11298
11299 2017-06-12  Pedro Alves  <palves@redhat.com>
11300
11301         * dwarf2read.c (mapped_symtab::data): Now a vector of
11302         symtab_index_entry instead of vector of
11303         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
11304         whether an element's name is NULL instead of checking whether the
11305         element itself is NULL.
11306         (find_slot): Change return type.  Adjust.
11307         (hash_expand, , add_index_entry, uniquify_cu_indices)
11308         (write_hash_table): Adjust.
11309
11310 2017-06-12  Pedro Alves  <palves@redhat.com>
11311
11312         * dwarf2read.c (recursively_count_psymbols): New function.
11313         (write_psymtabs_to_index): Call it to compute number of psyms and
11314         pass estimate size of psyms_seen to unordered_set's ctor.
11315
11316 2017-06-12  Pedro Alves  <palves@redhat.com>
11317
11318         * dwarf2read.c (write_hash_table): Check if key already exists
11319         before emplacing.
11320
11321 2017-06-12  Pedro Alves  <palves@redhat.com>
11322
11323         * dwarf2read.c (data_buf::append_space): Rename to...
11324         (data_buf::grow): ... this, and make private.  Adjust all callers.
11325         (data_buf::append_uint): New method.
11326         (add_address_entry, write_one_signatured_type)
11327         (write_psymtabs_to_index): Use it.
11328
11329 2017-06-12  Pedro Alves  <palves@redhat.com>
11330
11331         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11332         (file_write (FILE *, const std::vector<Elem>&)): Delete.
11333         (data_buf::file_write): Call ::fwrite directly.
11334
11335 2017-06-12  Pedro Alves  <palves@redhat.com>
11336
11337         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11338         std::vector::erase.
11339
11340 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11341
11342         Code cleanup: C++ify .gdb_index producer.
11343         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11344         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11345         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11346         (create_strtab, add_string): Remove.
11347         (file_write, data_buf): New.
11348         (struct symtab_index_entry): Use std::vector for cu_indices.
11349         (struct mapped_symtab): Use std::vector for data.
11350         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11351         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11352         Remove.
11353         (find_slot): Change return type.  Update it to the new data structures.
11354         (hash_expand, add_index_entry): Update it to the new data structures.
11355         (offset_type_compare): Remove.
11356         (uniquify_cu_indices): Update it to the new data structures.
11357         (c_str_view, c_str_view_hasher, vector_hasher): New.
11358         (add_indices_to_cpool): Remove.
11359         (write_hash_table): Update it to the new data structures.
11360         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11361         (eq_psymtab_cu_index): Remove.
11362         (psym_index_map): New typedef.
11363         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11364         reference and std::unordered_map for cu_index_htab.
11365         (add_address_entry, add_address_entry_worker, write_address_map)
11366         (write_psymbols): Update it to the new data structures.
11367         (write_obstack): Remove.
11368         (struct signatured_type_index_data): Change types_list to a data_buf
11369         reference and psyms_seen to a std::unordered_set reference.
11370         (write_one_signatured_type, recursively_write_psymbols)
11371         (write_psymtabs_to_index): Update it to the new data structures.
11372
11373 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
11374
11375         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11376         separate-debug-file commands.
11377         * symfile.h (separate_debug_file_debug): New global.
11378         * symfile.c (separate_debug_file_debug): New global.
11379         (separate_debug_file_exists, find_separate_debug_file): Add
11380         debug output.
11381         (_initialize_symfile): Add "set debug separate-debug-file"
11382         command.
11383         * build-id.c (build_id_to_debug_bfd,
11384         find_separate_debug_file_by_buildid): Add debug output.
11385
11386 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
11387
11388         * gdbarch.sh (displaced_step_free_closure): Remove.
11389         * gdbarch.h, gdbarch.c: Re-generate.
11390         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11391         displaced_step_free_closure.
11392         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11393         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11394         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11395         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11396         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11397         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11398         * arch-utils.h (simple_displaced_step_free_closure): Remove.
11399         * arch-utils.c (simple_displaced_step_free_closure): Remove.
11400         * infrun.c (displaced_step_clear): Call xfree instead of
11401         gdbarch_displaced_step_free_closure.
11402
11403 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
11404
11405         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11406         NULL".
11407
11408 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
11409
11410         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11411         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11412         (mn10300_push_dummy_call): Likewise.
11413
11414 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11415
11416         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11417
11418 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11419
11420         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11421
11422 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11423
11424         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11425         able to start inferiors using a shell.
11426         (New remote packets): Announce new packet "QStartupWithShell".
11427         * remote.c: Add PACKET_QStartupWithShell.
11428         (extended_remote_create_inferior): Handle new
11429         PACKET_QStartupWithShell.
11430         (remote_protocol_features) <QStartupWithShell>: New entry for
11431         PACKET_QStartupWithShell.
11432         (_initialize_remote): Call "add_packet_config_cmd" for
11433         QStartupShell.
11434
11435 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11436             Pedro Alves  <palves@redhat.com>
11437
11438         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11439         and "nat/fork-inferior.h".
11440         * common/common-inferior.h: New file, with contents from
11441         "gdb/inferior.h".
11442         * commom/common-utils.c: Include "common-utils.h".
11443         (stringify_argv): New function.
11444         * common/common-utils.h (stringify_argv): New prototype.
11445         * configure.nat: Add "fork-inferior.o" as a dependency for
11446         "*linux*", "fbsd*" and "nbsd*" hosts.
11447         * corefile.c (get_exec_file): Update comment.
11448         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11449         instead of "startup_inferior".
11450         (darwin_create_inferior): Call "add_thread_silent" after
11451         "fork_inferior".
11452         * fork-child.c: Cleanup unnecessary includes.
11453         (SHELL_FILE): Move to "common/common-fork-child.c".
11454         (environ): Likewise.
11455         (exec_wrapper): Initialize.
11456         (get_exec_wrapper): New function.
11457         (breakup_args): Move to "common/common-fork-child.c"; rename to
11458         "breakup_args_for_exec".
11459         (escape_bang_in_quoted_argument): Move to
11460         "common/common-fork-child.c".
11461         (saved_ui): New variable.
11462         (prefork_hook): New function.
11463         (postfork_hook): Likewise.
11464         (postfork_child_hook): Likewise.
11465         (gdb_startup_inferior): Likewise.
11466         (fork_inferior): Move to "common/common-fork-child.c".  Update
11467         function to support gdbserver.
11468         (startup_inferior): Likewise.
11469         * gdbcore.h (get_exec_file): Remove declaration.
11470         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11471         instead of "startup_inferior".  Call "add_thread_silent" after
11472         "fork_inferior".
11473         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11474         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11475         instead of "startup_inferior".  Call "add_thread_silent" after
11476         "fork_inferior".
11477         * inferior.h: Include "common-inferior.h".
11478         (trace_start_error): Move to "common/common-utils.h".
11479         (trace_start_error_with_name): Likewise.
11480         (fork_inferior): Move prototype to "nat/fork-inferior.h".
11481         (startup_inferior): Likewise.
11482         (gdb_startup_inferior): New prototype.
11483         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11484         * nat/fork-inferior.h: New file.
11485         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11486         instead of "startup_inferior".  Call "add_thread_silent" after
11487         "fork_inferior".
11488         * target.h (target_terminal_init): Move prototype to
11489         "target/target.h".
11490         (target_terminal_inferior): Likewise.
11491         (target_terminal_ours): Likewise.
11492         * target/target.h (target_terminal_init): New prototype, moved
11493         from "target.h".
11494         (target_terminal_inferior): Likewise.
11495         (target_terminal_ours): Likewise.
11496         * utils.c (gdb_flush_out_err): New function.
11497
11498 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11499
11500         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11501         * common/common-gdbthread.h: New file, with parts from
11502         "gdb/gdbthread.h".
11503         * gdbthread.h: Include "common-gdbthread.h".
11504         (switch_to_thread): Moved to "common/common-gdbthread.h".
11505
11506 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11507
11508         * Makefile.in (SFILES): Add "common/job-control.c".
11509         (HFILES_NO_SRCDIR): Add "common/job-control.h".
11510         (COMMON_OBS): Add "job-control.o".
11511         * common/job-control.c: New file, with contents from
11512         "gdb/inflow.c".
11513         * common/job-control.h: New file, with contents from "terminal.h".
11514         * fork-child.c: Include "job-control.h".
11515         * inflow.c: Include "job-control.h".
11516         (gdb_setpgid): Move to "common/common-inflow.c".
11517         (_initialize_inflow): Move setting of "job_control" to
11518         "handle_job_control".
11519         * terminal.h (job_control): Moved to "common/common-terminal.h".
11520         (gdb_setpgid): Likewise.
11521         * top.c: Include "job_control.h".
11522         * utils.c: Likewise.
11523         (job_control): Moved to "job-control.c".
11524
11525 2017-06-07  Pedro Alves  <palves@redhat.com>
11526
11527         * Makefile.in (SFILES): Add gdb_regex.c.
11528         (COMMON_OBS): Add gdb_regex.o.
11529         * ada-lang.c (ada_add_standard_exceptions)
11530         (ada_add_exceptions_from_frame, name_matches_regex)
11531         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11532         parameter type to compiled_regex.  Adjust.
11533         (ada_exceptions_list): Use compiled_regex.
11534         * break-catch-throw.c (exception_catchpoint::pattern): Now a
11535         std::unique_ptr<compiled_regex>.
11536         (exception_catchpoint::~exception_catchpoint): Remove regfree
11537         call.
11538         (check_status_exception_catchpoint): Adjust to use compiled_regex.
11539         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11540         * breakpoint.c (solib_catchpoint::compiled): Now a
11541         std::unique_ptr<compiled_regex>.
11542         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11543         (check_status_catch_solib): Adjust to use compiled_regex.
11544         (add_solib_catchpoint): Adjust to use compiled_regex.
11545         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11546         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11547         compiled_regex reference.  Adjust to use it.
11548         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11549         declaration.  Include "gdb_regex.h".
11550         (apropos_cmd): Change regex parameter to compiled_regex reference.
11551         * gdb_regex.c: New file.
11552         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11553         declarations.
11554         (class compiled_regex): New.
11555         * linux-tdep.c: Include "common/gdb_optional.h".
11556         (struct mapping_regexes): New, factored out from
11557         mapping_is_anonymous_p, and adjusted to use compiled_regex.
11558         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11559         gdb::optional and remove cleanups.  Adjust to compiled_regex.
11560         * probe.c: Include "common/gdb_optional.h".
11561         (collect_probes): Use compiled_regex and gdb::optional and remove
11562         cleanups.
11563         * skip.c: Include "common/gdb_optional.h".
11564         (skiplist_entry::compiled_function_regexp): Now a
11565         gdb::optional<compiled_regex>.
11566         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11567         (free_skiplist_entry): Remove regfree call.
11568         (compile_skip_regexp, skip_rfunction_p): Adjust to use
11569         compiled_regex and gdb::optional.
11570         * symtab.c: Include "common/gdb_optional.h".
11571         (search_symbols): Use compiled_regex and gdb::optional.
11572         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11573         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
11574         to gdb_regex.c.
11575
11576 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11577
11578         * regcache.c (regcache::save): Avoid buffer use.
11579         (regcache::dump): Likewise.
11580
11581 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11582
11583         * sh-tdep.c (sh_pseudo_register_read): Remove
11584         MAX_REGISTER_SIZE.
11585         (sh_pseudo_register_write): Likewise.
11586         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11587         (sh64_pseudo_register_write): Likewise
11588
11589 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
11590
11591         * aarch64-tdep.c (aarch64_store_return_value): Use
11592         V_REGISTER_SIZE.
11593         (aarch64_pseudo_read_value): Likewise.
11594         (aarch64_pseudo_write): Likewise.
11595
11596 2017-06-06  Yao Qi  <yao.qi@linaro.org>
11597
11598         * regformats/regdef.h (set_register_cache): Remove the
11599         declaration.
11600
11601 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
11602
11603         * frame.c (frame_unwind_register_signed): Use
11604         frame_unwind_register_value.
11605
11606 2017-06-06  Pedro Alves  <palves@redhat.com>
11607
11608         PR breakpoints/21553
11609         * breakpoint.c (create_breakpoints_sal_default)
11610         (init_breakpoint_sal, create_breakpoint_sal): Use
11611         gdb::unique_xmalloc_ptr for string parameters.
11612         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11613         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
11614         (base_breakpoint_create_breakpoints_sal)
11615         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11616         (strace_marker_create_breakpoints_sal)
11617         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11618         string parameters.
11619         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11620         gdb::unique_xmalloc_ptr for string parameters.
11621         (create_breakpoint): Constify 'extra_string' and 'cond_string'
11622         parameters.
11623
11624 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11625
11626         * alpha-tdep.c (alpha_register_to_value): Use
11627         get_frame_register_value.
11628         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11629
11630 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
11631
11632         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11633         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11634         (ia64_value_to_register): Likewise.
11635         (ia64_extract_return_value): Likewise.
11636         (ia64_store_return_value): Likewise.
11637         (ia64_push_dummy_call): Likewise.
11638
11639 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
11640
11641         GDB 8.0 released.
11642
11643 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
11644
11645         * x86-linux-nat.c (struct arch_lwp_info): Remove.
11646
11647 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
11648
11649         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11650         parameter.
11651         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11652
11653 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
11654
11655         * event-loop.c (poll_timers): Unallocate timer using delete
11656         instead of xfree.
11657
11658 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11659
11660         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11661         (struct breakpoint) <~breakpoint>: New.
11662         (struct watchpoint): Inherit from breakpoint.
11663         <~watchpoint>: New.
11664         <base>: Remove.
11665         (struct tracepoint): Inherit from breakpoint.
11666         <base>: Remove.
11667         * breakpoint.c (longjmp_breakpoint_ops): Remove.
11668         (struct longjmp_breakpoint): Inherit from breakpoint.
11669         <~longjmp_breakpoint>: New.
11670         <base>: Remove.
11671         (new_breakpoint_from_type): Remove casts.
11672         (watchpoint_in_thread_scope): Remove reference to base field.
11673         (watchpoint_del_at_next_stop): Likewise.
11674         (update_watchpoint): Likewise.
11675         (watchpoint_check): Likewise.
11676         (bpstat_check_watchpoint): Likewise.
11677         (set_longjmp_breakpoint): Likewise.
11678         (struct fork_catchpoint): Inherit from breakpoint.
11679         <base>: Remove.
11680         (struct solib_catchpoint): Inherit from breakpoint.
11681         <~solib_catchpoint>: New.
11682         <base>: Remove.
11683         (dtor_catch_solib): Change to ...
11684         (solib_catchpoint::~solib_catchpoint): ... this.
11685         (breakpoint_hit_catch_solib): Remove reference to base field.
11686         (add_solib_catchpoint): Likewise.
11687         (create_fork_vfork_event_catchpoint): Likewise.
11688         (struct exec_catchpoint): Inherit from breakpoint.
11689         <~exec_catchpoint>: New.
11690         <base>: Remove.
11691         (dtor_catch_exec): Change to ...
11692         (exec_catchpoint::~exec_catchpoint): ... this.
11693         (dtor_watchpoint): Change to ...
11694         (watchpoint::~watchpoint): ... this.
11695         (watch_command_1): Remove reference to base field.
11696         (catch_exec_command_1): Likewise.
11697         (base_breakpoint_dtor): Change to ...
11698         (breakpoint::~breakpoint): ... this.
11699         (base_breakpoint_ops): Remove dtor field value.
11700         (longjmp_bkpt_dtor): Change to ...
11701         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11702         (strace_marker_create_breakpoints_sal): Remove reference to base
11703         field.
11704         (delete_breakpoint): Don't manually call breakpoint destructor.
11705         (create_tracepoint_from_upload): Remove reference to base field.
11706         (trace_pass_set_count): Likewise.
11707         (initialize_breakpoint_ops): Don't initialize
11708         momentary_breakpoint_ops, don't set dtors.
11709         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11710         <~ada_catchpoint>: New.
11711         <base>: Remove.
11712         (create_excep_cond_exprs): Remove reference to base field.
11713         (dtor_exception): Change to ...
11714         (ada_catchpoint::~ada_catchpoint): ... this.
11715         (dtor_catch_exception): Remove.
11716         (dtor_catch_exception_unhandled): Remove.
11717         (dtor_catch_assert): Remove.
11718         (create_ada_exception_catchpoint): Remove reference to base
11719         field.
11720         (initialize_ada_catchpoint_ops): Don't set dtors.
11721         * break-catch-sig.c (struct signal_catchpoint): Inherit from
11722         breakpoint.
11723         <~signal_catchpoint>: New.
11724         <base>: Remove.
11725         (signal_catchpoint_dtor): Change to ...
11726         (signal_catchpoint::~signal_catchpoint): ... this.
11727         (create_signal_catchpoint): Remove reference to base field.
11728         (initialize_signal_catchpoint_ops): Don't set dtor.
11729         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11730         from breakpoint.
11731         <~syscall_catchpoint>: New.
11732         <base>: Remove.
11733         (dtor_catch_syscall): Change to ...
11734         (syscall_catchpoint::~syscall_catchpoint): ... this.
11735         (create_syscall_event_catchpoint): Remove reference to base
11736         field.
11737         (initialize_syscall_catchpoint_ops): Don't set dtor.
11738         * break-catch-throw.c (struct exception_catchpoint): Inherit
11739         from breakpoint.
11740         <~exception_catchpoint>: New.
11741         <base>: Remove.
11742         (dtor_exception_catchpoint): Change to ...
11743         (exception_catchpoint::~exception_catchpoint): ... this.
11744         (handle_gnu_v3_exceptions): Remove reference to base field.
11745         (initialize_throw_catchpoint_ops): Don't set dtor.
11746         * ctf.c (ctf_get_traceframe_address): Remove reference to base
11747         field.
11748         * remote.c (remote_get_tracepoint_status): Likewise.
11749         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11750         * tracefile.c (tracefile_fetch_registers): Likewise.
11751         * tracepoint.c (actions_command): Likewise.
11752         (validate_actionline): Likewise.
11753         (tfind_1): Likewise.
11754         (get_traceframe_location): Likewise.
11755         (find_matching_tracepoint_location): Likewise.
11756         (parse_tracepoint_status): Likewise.
11757         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11758
11759 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11760
11761         * breakpoint.c (struct longjmp_breakpoint): New struct.
11762         (is_tracepoint_type): Change return type to bool.
11763         (is_longjmp_type): New function.
11764         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11765         (set_raw_breakpoint_without_location): Use
11766         new_breakpoint_from_type.
11767         (set_raw_breakpoint): Likewise.
11768
11769 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
11770
11771         * breakpoint.c (new_breakpoint_from_type): New function.
11772         (create_breakpoint_sal): Use new_breakpoint_from_type and
11773         unique_ptr.
11774         (create_breakpoint): Likewise.
11775
11776 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
11777
11778         * memattr.c (mem_info_command): Rename to ...
11779         (info_mem_command): ... this.
11780         (mem_enable_command): Rename to ...
11781         (enable_mem_command): ... this.
11782         (mem_disable_command): Rename to ...
11783         (disable_mem_command): ... this.
11784         (mem_delete_command): Rename to ...
11785         (delete_mem_command): ... this.
11786         (_initialize_mem): Adjust function names.
11787
11788 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11789
11790         * btrace.c (handle_pt_insn_events): New.
11791         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
11792         STATUS.  Split into this and ...
11793         (handle_pt_insn_event_flags): ... this.
11794
11795 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
11796
11797         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11798         and struct pt_insn.resynced.
11799         * configure: Regenerated.
11800         * config.in: Regenerated.
11801
11802 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11803
11804         * btrace.c (ftrace_find_call_by_number): New function.
11805         (ftrace_new_function): Store objects, not pointers.
11806         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11807         ftrace_new_gap, ftrace_update_function,
11808         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11809         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11810         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11811         btrace_ends_with_single_insn, btrace_call_get): Account for
11812         btrace_thread_info::functions now storing objects.
11813         * btrace.h (struct btrace_thread_info): Add constructor.
11814         (struct btrace_thread_info) <functions>: Make std::vector.
11815         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11816         Initialize with default values.
11817         * record-btrace.c (record_btrace_frame_sniffer): Account for
11818         btrace_thread_info::functions now storing objects.
11819
11820 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11821
11822         * btrace.c: Remove typedef bfun_s.
11823         (ftrace_new_gap): Directly add gaps to the list of gaps.
11824         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11825         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11826         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11827         instead of gdb VEC.
11828
11829 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11830
11831         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11832         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11833         with btrace_thread_info::next_segment and
11834         btrace_thread_info::prev_segment.
11835         * btrace.h: Remove struct btrace_func_link.
11836         (struct btrace_function): Replace pair of function segment pointers
11837         with pair of indices.
11838         * python/py-record-btrace.c (btpy_call_prev_sibling,
11839         btpy_call_next_sibling): Replace references to
11840         btrace_thread_info::segment with btrace_thread_info::next_segment and
11841         btrace_thread_info::prev_segment.
11842         * record-btrace.c (record_btrace_frame_this_id): Use
11843         btrace_find_call_by_number.
11844
11845 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11846
11847         * btrace.c (ftrace_new_function, ftrace_fixup_level,
11848         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11849         btrace_insn_next, btrace_insn_prev): Remove references to
11850         btrace_thread_info::flow.
11851         * btrace.h (struct btrace_function): Remove FLOW.
11852
11853 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11854
11855         * btrace.c (ftrace_find_call_by_number): New function.
11856         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11857         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11858         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11859         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11860         index.
11861         * btrace.h (struct btrace_function): Turn UP into an index.
11862         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11863         as an index.
11864         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11865         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11866         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11867
11868 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11869
11870         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11871         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11872         ftrace_update_function, ftrace_compute_global_level_offset,
11873         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11874         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11875         btrace_insn_end, btrace_is_empty): Remove references to
11876         btrace_thread_info::begin and btrace_thread_info::end.
11877         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11878         (struct btrace_thread_info) <functions>: Adjust comment.
11879         * record-btrace.c (record_btrace_start_replaying): Remove reference to
11880         btrace_thread_info::begin.
11881
11882 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11883
11884         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11885         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11886         ftrace_update_function): Remove arguments that implicitly were always
11887         BTINFO->END.
11888         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11889         Don't pass BTINFO->END.
11890
11891 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11892
11893         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11894         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11895         btrace_find_insn_by_number): Replace function segment pointer with
11896         index.
11897         (btrace_insn_cmp): Simplify.
11898         * btrace.h: (struct btrace_insn_iterator) Rename index to
11899         insn_index.  Replace function segment pointer with index into function
11900         segment vector.
11901         * record-btrace.c (record_btrace_call_history): Replace function
11902         segment pointer use with index.
11903         (record_btrace_frame_sniffer): Retrieve function call segment through
11904         vector.
11905         (record_btrace_set_replay): Remove defunc't safety check.
11906
11907 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11908
11909         * btrace.c (btrace_ends_with_single_insn): New function.
11910         (btrace_call_get, btrace_call_number, btrace_call_begin,
11911         btrace_call_end, btrace_call_next, btrace_call_prev,
11912         btrace_find_call_by_number): Use index into call segment vector
11913         instead of pointer.
11914         (btrace_call_cmp): Simplify.
11915         * btrace.h (struct btrace_call_iterator): Replace function call segment
11916         pointer with index into vector.
11917         * record-btrace.c (record_btrace_call_history): Use index instead of
11918         pointer.
11919
11920 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11921
11922         * btrace.c (btrace_insn_begin, btrace_insn_end,
11923         btrace_find_insn_by_number): Add btinfo to iterator.
11924         * btrace.h (struct btrace_insn_iterator): Add btinfo.
11925
11926 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11927
11928         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11929         and save pointers directly.
11930         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11931         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11932         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
11933         changed signature of functions.
11934         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11935         (btrace_fetch): Remove code that adds btrace_function pointers to
11936         vector of btrace_functions.
11937         (btrace_clear): Simplify freeing vector of btrace_functions.
11938
11939 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
11940
11941         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11942         Replace VEC_* with std::vector functions.
11943         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11944         (struct btrace_thread_info)<functions>: Change type to std::vector.
11945
11946 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
11947
11948         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
11949         "Removed targets and native configurations" up.  Merge duplicate
11950         "New commands" sub-sections.  Add "New options" sub-sections.
11951
11952 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
11953
11954         * defs.h (copy_integer_to_size): New declaration.
11955         * findvar.c (copy_integer_to_size): New function.
11956         (do_cint_test): New selftest function.
11957         (copy_integer_to_size_test): Likewise.
11958         (_initialize_findvar): Likewise.
11959         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11960         (mips_fbsd_collect_reg): Use raw_collect_integer.
11961         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11962         (mips64_fill_gregset): Use raw_collect_integer
11963         (mips64_fill_fpregset): Use raw_supply_integer.
11964         * regcache.c (regcache::raw_supply_integer): New function.
11965         (regcache::raw_collect_integer): Likewise.
11966         * regcache.h: (regcache::raw_supply_integer): New declaration.
11967         (regcache::raw_collect_integer): Likewise.
11968
11969 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11970
11971         * Makefile.in (SFILES): Add gdbarch-selftests.c.
11972         (COMMON_OBS): Add gdbarch-selftests.o.
11973         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11974         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11975         * gdbarch-selftests.c: New file.
11976         * regcache.h (regcache) <~regcache>: Mark it virtual if
11977         GDB_SELF_TEST.
11978         <raw_write>: Likewise.
11979
11980 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11981
11982         * regcache.c (current_regcache): Change it to
11983         regcache::current_regcache.
11984         (regcache_observer_target_changed): Update.
11985         (regcache_thread_ptid_changed): Make it a regcache static
11986         method.
11987         (regcache_thread_ptid_changed): Update.
11988         (class regcache_access): New.
11989         (current_regcache_test): Update.
11990         (_initialize_regcache): Update.
11991         * regcache.h: Include forward_list.
11992         (regcache): Declare regcache_thread_ptid_changed and declare
11993         registers_changed_ptid as friend.
11994
11995 2017-05-24  Yao Qi  <yao.qi@linaro.org>
11996
11997         * i387-tdep.c (i387_register_to_value): Use register_size
11998         instead of TYPE_LENGTH.
11999         * m68k-tdep.c (m68k_register_to_value): Likewise.
12000
12001 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12002
12003         * i387-tdep.c (i387_convert_register_p): Return false if type
12004         code isn't TYPE_CODE_FLT.
12005
12006 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12007
12008         * alpha-tdep.c (alpha_convert_register_p): Return true if type
12009         length is 4.
12010         (alpha_register_to_value): Remove type length check.
12011         (alpha_value_to_register): Likewise.
12012
12013 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12014
12015         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12016         TYPE_CODE_FLT.
12017
12018 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12019
12020         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12021         TYPE_CODE_FLT or not.
12022
12023 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12024
12025         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12026         * avr-tdep.c (avr_gdbarch_init): Likewise.
12027         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12028         * cris-tdep.c (cris_gdbarch_init): Likewise.
12029         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12030         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12031         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12032         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12033         * mep-tdep.c (mep_gdbarch_init): Likewise.
12034         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12035         * mips-tdep.c (mips_gdbarch_init): Likewise.
12036         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12037         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12038         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12039         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12040         * v850-tdep.c (v850_gdbarch_init): Likewise.
12041
12042 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12043
12044         * selftest-arch.c (tests_with_arch): Call registers_changed
12045         and reinit_frame_cache.
12046         * selftest.c (run_self_tests): Likewise.
12047
12048 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12049
12050         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12051         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12052
12053 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12054
12055         * rl78-tdep.c (rl78_gdbarch_init): Don't call
12056         set_gdbarch_print_insn.
12057
12058 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12059
12060         * h8300-tdep.c (h8300_gdbarch_init): Don't call
12061         set_gdbarch_print_insn.
12062
12063 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12064
12065         * alpha-tdep.c (alpha_gdbarch_init): Don't call
12066         set_gdbarch_print_insn.
12067         * arc-tdep.c (arc_gdbarch_init): Likewise.
12068         * arch-utils.c: include dis-asm.h.
12069         (default_print_insn): New function.
12070         * arch-utils.h (default_print_insn): Declare.
12071         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12072         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12073         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12074         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12075         * frv-tdep.c (frv_gdbarch_init): Likewise.
12076         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12077         * gdbarch.sh (print_insn): Use default_print_insn.
12078         * gdbarch.c: Regenerated.
12079         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12080         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12081         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12082         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12083         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12084         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12085         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12086         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12087         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12088         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12089         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12090         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12091         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12092         * mt-tdep.c (mt_gdbarch_init): Likewise.
12093         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12094         * nios2-tdep.c (nios2_print_insn): Remove.
12095         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12096         * rx-tdep.c (rx_gdbarch_init): Likewise.
12097         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12098         * score-tdep.c (score_print_insn): Remove.
12099         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12100         * sh-tdep.c (sh_gdbarch_init): Likewise.
12101         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12102         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12103         * tic6x-tdep.c (tic6x_print_insn): Remove.
12104         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12105         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12106         * v850-tdep.c (v850_gdbarch_init): Likewise.
12107         * vax-tdep.c (vax_gdbarch_init): Likewise.
12108         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12109         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12110
12111 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12112
12113         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12114         (MIPS_FP0_REGNUM): Remove.
12115         (MIPS_FSR_REGNUM): Remove.
12116         (mips_fbsd_supply_fpregs): Use mips_regnum.
12117         (mips_fbsd_supply_gregs): Likewise.
12118         (mips_fbsd_collect_fpregs): Likewise.
12119         (mips_fbsd_collect_gregs): Likewise.
12120
12121 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12122
12123         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12124         (getpfpregs_supplies): New function.
12125         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12126         getfpregs_supplies.
12127         (mips_fbsd_store_inferior_registers): Likewise.
12128
12129 2017-05-22  Pedro Alves <palves@redhat.com>
12130
12131         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12132         maintainer.
12133
12134 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
12135
12136         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12137         (store_register): Likewise.
12138         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12139         (get_decimal_float_return_value): Likewise.
12140         (do_ppc_sysv_return_value): Likewise.
12141         (ppc64_sysv_abi_push_integer): Likewise.
12142         (ppc64_sysv_abi_push_freg): Likewise.
12143         (ppc64_sysv_abi_return_value_base): Likewise.
12144         (ppc64_sysv_abi_return_value): Likewise.
12145         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12146         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12147         * rs6000-nat.c: Likewise.
12148         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12149         (rs6000_value_to_register): Likewise.
12150         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12151
12152 2017-05-21  Tom Tromey  <tom@tromey.com>
12153
12154         PR rust/21466:
12155         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12156         arrays as "[T]", not "[T; ]".
12157
12158 2017-05-19  Tom Tromey  <tom@tromey.com>
12159
12160         PR rust/21484:
12161         * rust-lang.c (exp_descriptor_rust): New function.
12162         (rust_language_defn): Use it.
12163         * p-lang.c (pascal_language_defn): Update.
12164         * opencl-lang.c (opencl_language_defn): Update.
12165         * objc-lang.c (objc_language_defn): Update.
12166         * m2-lang.c (m2_language_defn): Update.
12167         * language.h (struct language_defn)
12168         <la_watch_location_expression>: New member.
12169         * language.c (unknown_language_defn, auto_language_defn)
12170         (local_language_defn): Update.
12171         * go-lang.c (go_language_defn): Update.
12172         * f-lang.c (f_language_defn): Update.
12173         * d-lang.c (d_language_defn): Update.
12174         * c-lang.h (c_watch_location_expression): Declare.
12175         * c-lang.c (c_watch_location_expression): New function.
12176         (c_language_defn, cplus_language_defn, asm_language_defn)
12177         (minimal_language_defn): Use it.
12178         * breakpoint.c (watch_command_1): Call
12179         la_watch_location_expression.
12180         * ada-lang.c (ada_language_defn): Update.
12181
12182 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12183
12184         PR tui/21482
12185         * gdb_curses.h (NOMACROS): Define.
12186         (NCURSES_NOMACROS): Define.
12187
12188 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12189
12190         PR tui/21482
12191         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12192         arg to char *.
12193         * tui/tui-wingeneral.c (box_win): Likewise.
12194         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12195         (tui_show_source_line): Likewise.
12196         (tui_show_exec_info_content): Likewise.
12197
12198 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12199
12200         * sparc-tdep.c (sparc_structure_return_p)
12201         (sparc_arg_on_registers_p): New functions.
12202         (sparc32_store_arguments): Use them.
12203         * sparc64-tdep.c (sparc64_16_byte_align_p)
12204         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12205         Handle TYPE_CODE_ARRAY.
12206
12207 2017-05-17  Yao Qi  <yao.qi@linaro.org>
12208
12209         * cli/cli-decode.c (add_alias_cmd): New function.
12210         * command.h (add_alias_cmd): Declare.
12211         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12212         instead call add_alias_cmd.
12213
12214 2017-05-17  Pedro Alves  <palves@redhat.com>
12215
12216         * Makefile.in (nat_extra_makefile_frag): Rename to ...
12217         (nat_makefile_frag): ... this.  All references updated.
12218         * configure.ac: Likewise.
12219         * configure.nat: Likewise.  Enhance comments.
12220         * configure: Regenerate.
12221
12222 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12223
12224         * procfs.c (procfs_create_inferior): Change prototype to match
12225         definition.
12226
12227 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
12228
12229         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12230         C++ compiler warning.
12231
12232 2017-05-12  Tom Tromey  <tom@tromey.com>
12233
12234         PR rust/21483:
12235         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12236         recurse, just call value_struct_elt directly.
12237
12238 2017-05-12  Tom Tromey  <tom@tromey.com>
12239
12240         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12241         OP_RUST_ARRAY>: Fix.
12242
12243 2017-05-12  Tom Tromey  <tom@tromey.com>
12244
12245         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12246
12247 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12248
12249         * regcache.c: Include <forward_list>.
12250         (struct regcache_list): Remove.
12251         (current_regcache): Update.
12252         (get_thread_arch_aspace_regcache): Update for std::forward_list.
12253         (regcache_thread_ptid_changed): Likewise.
12254         (registers_changed_ptid): Likewise.
12255         (current_regcache_size): Likewise.
12256
12257 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12258
12259         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12260         (current_regcache_size): New function.
12261         (current_regcache_test): New function.
12262         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12263
12264 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12265
12266         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12267         (print_gp_register_row): Use get_frame_register_value.
12268
12269 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12270
12271         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12272         (mips_supply_fpregset): Likewise.
12273         (mips64_supply_gregset): Likewise.
12274
12275 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12276
12277         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
12278         regcache->raw_supply_zeroed.
12279
12280 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12281
12282         * configure.nat: Rearrange 'case' statements to match
12283         host before cpu.
12284
12285 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12286
12287         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
12288         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12289         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
12290         "@nat_extra_makefile_frag@".
12291         (Makefile): Remove dependency on "@frags@".
12292         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12293         (data-directory/Makefile): Likewise.
12294         * config/aarch64/linux.mh: Deleted; moved contents to
12295         "gdb/configure.nat".
12296         * config/alpha/alpha-linux.mh: Likewise.
12297         * config/alpha/nbsd.mh: Likewise.
12298         * config/arm/linux.mh: Likewise.
12299         * config/arm/nbsdelf.mh: Likewise.
12300         * config/i386/cygwin.mh: Likewise.
12301         * config/i386/cygwin64.mh: Likewise.
12302         * config/i386/darwin.mh: Likewise.
12303         * config/i386/fbsd.mh: Likewise.
12304         * config/i386/fbsd64.mh: Likewise.
12305         * config/i386/go32.mh: Likewise.
12306         * config/i386/i386gnu.mh: Likewise.
12307         * config/i386/i386sol2.mh: Likewise.
12308         * config/i386/linux.mh: Likewise.
12309         * config/i386/linux64.mh: Likewise.
12310         * config/i386/mingw.mh: Likewise.
12311         * config/i386/mingw64.mh: Likewise.
12312         * config/i386/nbsd64.mh: Likewise.
12313         * config/i386/nbsdelf.mh: Likewise.
12314         * config/i386/nto.mh: Likewise.
12315         * config/i386/obsd.mh: Likewise.
12316         * config/i386/obsd64.mh: Likewise.
12317         * config/i386/sol2-64.mh: Likewise.
12318         * config/ia64/linux.mh: Likewise.
12319         * config/m32r/linux.mh: Likewise.
12320         * config/m68k/linux.mh: Likewise.
12321         * config/m68k/nbsdelf.mh: Likewise.
12322         * config/m68k/obsd.mh: Likewise.
12323         * config/m88k/obsd.mh: Likewise.
12324         * config/mips/fbsd.mh: Likewise.
12325         * config/mips/linux.mh: Likewise.
12326         * config/mips/nbsd.mh: Likewise.
12327         * config/mips/obsd64.mh: Likewise.
12328         * config/pa/linux.mh: Likewise.
12329         * config/pa/nbsd.mh: Likewise.
12330         * config/pa/obsd.mh: Likewise.
12331         * config/powerpc/aix.mh: Likewise.
12332         * config/powerpc/fbsd.mh: Likewise.
12333         * config/powerpc/linux.mh: Likewise.
12334         * config/powerpc/nbsd.mh: Likewise.
12335         * config/powerpc/obsd.mh: Likewise.
12336         * config/powerpc/ppc64-linux.mh: Likewise.
12337         * config/powerpc/spu-linux.mh: Likewise.
12338         * config/s390/linux.mh: Likewise.
12339         * config/sh/nbsd.mh: Likewise.
12340         * config/sparc/fbsd.mh: Likewise.
12341         * config/sparc/linux.mh: Likewise.
12342         * config/sparc/linux64.mh: Likewise.
12343         * config/sparc/nbsd64.mh: Likewise.
12344         * config/sparc/nbsdelf.mh: Likewise.
12345         * config/sparc/obsd64.mh: Likewise.
12346         * config/sparc/sol2.mh: Likewise.
12347         * config/tilegx/linux.mh: Likewise.
12348         * config/vax/nbsdelf.mh: Likewise.
12349         * config/vax/obsd.mh: Likewise.
12350         * config/xtensa/linux.mh: Likewise.
12351         * config/i386/i386gnu.mn: New file, with excerpts from
12352         "config/i386/i386gnu.mh".
12353         * configure: Regenerate.
12354         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12355         *.mh files under "gdb/config".
12356         * configure.nat: New file, with contents from the
12357         "gdb/config/*/*.mh" files.
12358
12359 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
12360
12361         * btrace.c (btrace_clear): Free insn vector.
12362
12363 2017-05-05  Pedro Alves  <palves@redhat.com>
12364
12365         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12366         * configure: Regenerate.
12367
12368 2017-05-04  Pedro Alves  <palves@redhat.com>
12369
12370         * Makefile.in (SFILES): Add progspace-and-thread.c.
12371         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12372         (COMMON_OBS): Add progspace-and-thread.o.
12373         * breakpoint.c: Include "progspace-and-thread.h".
12374         (update_inserted_breakpoint_locations)
12375         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12376         Use scoped_restore_current_pspace_and_thread.
12377         (create_std_terminate_master_breakpoint): Use
12378         scoped_restore_current_program_space.
12379         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12380         (print_breakpoint_location): Use
12381         scoped_restore_current_program_space.
12382         (bp_loc_is_permanent): Use
12383         scoped_restore_current_pspace_and_thread.
12384         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12385         (download_tracepoint_locations): Use
12386         scoped_restore_current_pspace_and_thread.
12387         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12388         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12389         (enum step_over_calls_kind): Moved from inferior.h.
12390         (class scoped_restore_current_thread): New class.
12391         * gdbthread.h (make_cleanup_restore_current_thread): Delete
12392         declaration.
12393         (scoped_restore_current_thread): New class.
12394         * infcmd.c: Include "common/gdb_optional.h".
12395         (continue_1, proceed_after_attach): Use
12396         scoped_restore_current_thread.
12397         (notice_new_inferior): Use scoped_restore_current_thread.
12398         * inferior.c: Include "progspace-and-thread.h".
12399         (restore_inferior, save_current_inferior): Delete.
12400         (add_inferior_command, clone_inferior_command): Use
12401         scoped_restore_current_pspace_and_thread.
12402         * inferior.h (scoped_restore_current_inferior): New class.
12403         * infrun.c: Include "progspace-and-thread.h" and
12404         "common/gdb_optional.h".
12405         (follow_fork_inferior): Use
12406         scoped_restore_current_pspace_and_thread.
12407         (scoped_restore_exited_inferior): New class.
12408         (handle_vfork_child_exec_or_exit): Use
12409         scoped_restore_exited_inferior,
12410         scoped_restore_current_pspace_and_thread,
12411         scoped_restore_current_thread and scoped_restore.
12412         (fetch_inferior_event): Use scoped_restore_current_thread.
12413         * linespec.c (decode_line_full, decode_line_1): Use
12414         scoped_restore_current_program_space.
12415         * mi/mi-main.c: Include "progspace-and-thread.h".
12416         (exec_continue): Use scoped_restore_current_thread.
12417         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12418         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12419         * proc-service.c (ps_pglobal_lookup): Use
12420         scoped_restore_current_program_space.
12421         * progspace-and-thread.c: New file.
12422         * progspace-and-thread.h: New file.
12423         * progspace.c (release_program_space, clone_program_space): Use
12424         scoped_restore_current_program_space.
12425         (restore_program_space, save_current_program_space)
12426         (save_current_space_and_thread): Delete.
12427         (switch_to_program_space_and_thread): Moved to
12428         progspace-and-thread.c.
12429         * progspace.h (save_current_program_space)
12430         (save_current_space_and_thread): Delete declarations.
12431         (scoped_restore_current_program_space): New class.
12432         * remote.c (remote_btrace_maybe_reopen): Use
12433         scoped_restore_current_thread.
12434         * symtab.c: Include "progspace-and-thread.h".
12435         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12436         * thread.c (print_thread_info_1): Use
12437         scoped_restore_current_thread.
12438         (struct current_thread_cleanup): Delete.
12439         (do_restore_current_thread_cleanup)
12440         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12441         (scoped_restore_current_thread::~scoped_restore_current_thread):
12442         ... this new dtor.
12443         (make_cleanup_restore_current_thread): Rename/convert to ...
12444         (scoped_restore_current_thread::scoped_restore_current_thread):
12445         ... this new ctor.
12446         (thread_apply_all_command): Use scoped_restore_current_thread.
12447         (thread_apply_command): Use scoped_restore_current_thread.
12448         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12449         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12450
12451 2017-05-04  Pedro Alves  <palves@redhat.com>
12452
12453         * thread.c (make_cleanup_restore_current_thread): Move
12454         find_thread_ptid call before the is_stopped call.  Assert that the
12455         thread is found.  Replace is_stopped call by checking the thread's
12456         state directly.  Remove unnecessary NULL-thread check.
12457
12458 2017-05-04  Pedro Alves  <palves@redhat.com>
12459
12460         * corelow.c (thread_section_name): New class.
12461         (get_core_register_section, get_core_siginfo): Use it.
12462
12463 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12464
12465         * corelow.c (sniff_core_bfd): Remove extra semicolon.
12466         (get_core_register_section): Remove xfree of NULL pointer.
12467
12468 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
12469
12470         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12471         * regcache.c (regcache::raw_supply_zeroed): New function.
12472         * regcache.h (regcache::raw_supply_zeroed): New declaration.
12473
12474 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
12475
12476         * gdbarch.sh: Remove commented out definition of
12477         TARGET_CHAR_BIT.
12478         * gdbarch.h: Re-generate.
12479
12480 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
12481
12482         * configure: Regenerate.
12483
12484 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
12485
12486         * solib-target.c (solib_target_relocate_section_addresses):
12487         Remove num_section_bases, num_bases, segment_bases variables.
12488
12489 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12490
12491         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12492
12493 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12494
12495         * solib-target.c: Include <vector>
12496         (struct lm_info_target) <~lm_info_target>: Remove.
12497         <segment_bases, section_bases>: Change type to
12498         std::vector<CORE_ADDR>.
12499         (library_list_start_segment, library_list_start_section,
12500         library_list_end_library,
12501         solib_target_relocate_section_addresses): Adjust.
12502
12503 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12504
12505         * gdbarch.sh (software_single_step): Change return type to
12506         std::vector<CORE_ADDR>.
12507         * gdbarch.c, gdbarch.h: Re-generate.
12508         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12509         Adjust.
12510         (arm_deal_with_atomic_sequence_raw): Adjust.
12511         (thumb_get_next_pcs_raw): Adjust.
12512         (arm_get_next_pcs_raw): Adjust.
12513         (arm_get_next_pcs): Adjust.
12514         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12515         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12516         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12517         (alpha_software_single_step): Adjust.
12518         * alpha-tdep.h (alpha_software_single_step): Adjust.
12519         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12520         * arm-tdep.c (arm_software_single_step): Adjust.
12521         (arm_breakpoint_kind_from_current_state): Adjust.
12522         * arm-tdep.h (arm_software_single_step): Adjust.
12523         * breakpoint.c (insert_single_step_breakpoint): Adjust.
12524         * cris-tdep.c (cris_software_single_step): Adjust.
12525         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12526         (micromips_deal_with_atomic_sequence): Adjust.
12527         (deal_with_atomic_sequence): Adjust.
12528         (mips_software_single_step): Adjust.
12529         * mips-tdep.h (mips_software_single_step): Adjust.
12530         * moxie-tdep.c (moxie_software_single_step): Adjust.
12531         * nios2-tdep.c (nios2_software_single_step): Adjust.
12532         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12533         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12534         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12535         * s390-linux-tdep.c (s390_software_single_step): Adjust.
12536         * sparc-tdep.c (sparc_software_single_step): Adjust.
12537         * spu-tdep.c (spu_software_single_step): Adjust.
12538         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12539
12540 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12541
12542         * gdbarch.sh: Use semi-colon as field separator instead of colon.
12543         * gdbarch.h: Re-generate.
12544
12545 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12546
12547         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12548         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12549         * python/py-instruction.c, python/py-instruction.h: New file.
12550         * python/py-record.c: Add py-instruction.h include.
12551         (gdbpy_initialize_record): Make gdb.Instruction a super class of
12552         gdb.RecordInstruction.
12553         * python/python-internal.h: Add gdbpy_initialize_instruction
12554         declaration.
12555         * python/python.c (do_start_initialization): Add
12556         gdbpy_initialize_instruction.
12557
12558 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12559
12560         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12561         Remove.
12562         (btrace_func_from_recpy_func): New function.
12563         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12564         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12565         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12566         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12567         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12568         Also, use new helper functions.
12569         (btpy_list_item): Use new helper functions.
12570         (recpy_bt_function_call_history): Use new type name.
12571         (btpy_call_getset): Remove.
12572         (gdbpy_initialize_btrace): Remove code to initialize
12573         gdb.BtraceFunctionCall.
12574         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12575         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12576         recpy_bt_func_prev, recpy_bt_func_next): New export.
12577         * python/py-record.c (recpy_func_type): New static object.
12578         (recpy_func_new, recpy_func_level, recpy_func_symbol,
12579         recpy_func_instructions, recpy_func_up, recpy_func_prev,
12580         recpy_func_next): New function.
12581         (recpy_element_hash, recpy_element_richcompare): Updated comment.
12582         (recpy_func_getset): New static object.
12583         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12584         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12585
12586 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12587
12588         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12589         (btpy_object, btpy_insn_type, btpy_new): Remove.
12590         (btpy_list_object): Use gdb.RecordInstruction type instead of
12591         gdb.BtraceInstruction type.
12592         (btrace_insn_from_recpy_insn): New function.
12593         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12594         btpy_new.
12595         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12596         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12597         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12598         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12599         instead of btpy_object.
12600         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12601         btpy_insn_data, btpy_insn_decode): Rename to ...
12602         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12603         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12604         recpy_bt_insn_decode): This.  Also, use new helper functions.
12605         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12606         recpy_insn_type.
12607         (btpy_insn_getset): Remove.
12608         (gdbpy_initialize_btrace): Remove code to initialize
12609         gdb.BtraceInstruction.  Use recpy_element_object.
12610         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12611         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12612         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12613         * python/py-record.c (recpy_insn_type): New static object.
12614         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12615         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12616         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12617         New function.
12618         (recpy_insn_getset): New static object.
12619         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12620         * python/py-record.h (recpy_element_object): New typedef.
12621         (recpy_insn_type, recpy_insn_new): New export.
12622
12623 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12624
12625         * py-record-btrace.c (btpy_insn_new): Removed.
12626         (btpy_insn_or_gap_new): New function.
12627         (btpy_insn_error): Removed.
12628         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12629         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12630         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12631         btpy_insn_or_gap_new instead of btpy_insn_new.
12632         (btpy_insn_getset): Remove btpy_insn_error.
12633         * py-record.c (recpy_gap_type): New static object.
12634         (recpy_gap_object): New typedef.
12635         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12636         recpy_gap_reason_string): New function.
12637         (recpy_gap_getset): New static object.
12638         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12639         * py-record.h (recpy_gap_new): New export.
12640
12641 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12642
12643         * python/py-record.c (recpy_ptid): Remove.
12644         (recpy_record_getset): Remove recpy_ptid.
12645
12646 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12647
12648         * btrace.c (btrace_fetch): Set inferior_ptid.
12649         * python/py-record-btrace.c: Add "py-record.h" include.
12650         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12651         recpy_bt_end, recpy_bt_instruction_history,
12652         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12653         in gdb.Record object instead of current ptid.
12654         * python/py-record.c: Include new "py-record.h" file.
12655         (recpy_record_object): Moved to py-record.h.
12656         * python/py-record.h: New file.
12657
12658 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
12659
12660         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12661         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12662         indentation.
12663
12664 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
12665
12666         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12667         the past maintainers section.
12668
12669 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12670
12671         * infcmd.c (get_return_value): Use regcache ctor, and remove
12672         cleanup.
12673
12674 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12675             Pedro Alves  <palves@redhat.com>
12676
12677         * regcache.c (regcache::regcache): New tag dispatch ctor.
12678         (do_cooked_read): Moved above.
12679         (regcache_dup): Use the tag dispatch ctor..
12680         * regcache.h (regcache): Declare ctor, delete copy ctor and
12681         assignment operator, remove friend regcache_dup.
12682
12683 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12684
12685         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12686         call method save instead of regcache_cpy.
12687         * regcache.h (struct regcache): Make regcache_dup a friend.
12688
12689 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12690
12691         * regcache.c (struct regcache): Move to regcache.h
12692         (regcache::arch): New method.
12693         (regcache_get_ptid): Update.
12694         (get_regcache_arch): Call arch method.
12695         (get_regcache_aspace): Call method aspace.
12696         (register_buffer): Change it to method.
12697         (regcache_save): Change it to regcache::save.
12698         (regcache_restore): Likewise.
12699         (regcache_cpy_no_passthrough): Remove the declaration.
12700         (regcache_cpy): Call methods restore and cpy_no_passthrough.
12701         (regcache_cpy_no_passthrough): Change it to method
12702         cpy_no_passthrough.
12703         (regcache_register_status): Change it to method
12704         get_register_status.
12705         (regcache_invalidate): Change it to method invalidate.
12706         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12707         (regcache_raw_update): Change it to method raw_update.
12708         (regcache_raw_read): Likewise.
12709         (regcache_raw_read_signed): Likewise.
12710         (regcache_raw_read_unsigned): Likewise.
12711         (regcache_raw_write_signed): Likewise.
12712         (regcache_raw_write_unsigned): Likewise.
12713         (regcache_cooked_read): Likewise.
12714         (regcache_cooked_read_value): Likewise.
12715         (regcache_cooked_read_signed): Likewise.
12716         (regcache_cooked_read_unsigned): Likewise.
12717         (regcache_cooked_write_signed): Likewise.
12718         (regcache_cooked_write_unsigned): Likewise.
12719         (regcache_raw_set_cached_value): Likewise.
12720         (regcache_raw_write): Likewise.
12721         (regcache_cooked_write): Likewise.
12722         (regcache_xfer_part): Likewise.
12723         (regcache_raw_read_part): Likewise.
12724         (regcache_raw_write_part): Likewise.
12725         (regcache_cooked_read_part): Likewise.
12726         (regcache_cooked_write_part): Likewise.
12727         (regcache_raw_supply): Likewise.
12728         (regcache_raw_collect): Likewise.
12729         (regcache_transfer_regset): Likewise.
12730         (regcache_supply_regset): Likewise.
12731         (regcache_collect_regset): Likewise.
12732         (regcache_debug_print_register): Likewise.
12733         (enum regcache_dump_what): Move it to regcache.h.
12734         (regcache_dump): Change it to method dump.
12735         * regcache.h (enum regcache_dump_what): New.
12736         (class regcache): New.
12737         * target.c (target_fetch_registers): Call method
12738         debug_print_register.
12739         (target_store_registers): Likewise.
12740
12741 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12742
12743         * windows-nat.c (struct lm_info_windows): Initialize field.
12744         (windows_make_so): Allocate lm_info_windows with new.
12745         (windows_free_so): Free lm_info_windows with delete.
12746
12747 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12748
12749         * solib-darwin.c (struct lm_info_darwin): Initialize field.
12750         (darwin_current_sos): Allocate lm_info_darwin with new, remove
12751         cleanup.
12752         (darwin_free_so): Free lm_info_darwin with delete.
12753
12754 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12755
12756         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12757         <l_addr_p>: Change type to bool.
12758         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12759         (svr4_free_so): Free lm_info_svr4 with delete.
12760         (svr4_copy_library_list): Replace memcpy with call to copy
12761         constructor.
12762         (library_list_start_library, svr4_default_sos): Allocate
12763         lm_info_svr4 with new.
12764
12765 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12766
12767         * solib-target.c (struct lm_info_target): Add destructor,
12768         initialize fields.
12769         <name>: Change type to std::string.
12770         (library_list_start_library): Allocate lm_info_target with new.
12771         (solib_target_free_library_list): Free lm_info_target with
12772         delete.
12773         (solib_target_current_sos): Adapt to std::string.
12774         (solib_target_free_so): Free lm_info_target with delete.
12775
12776 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12777
12778         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12779         fields.
12780         (frv_current_sos): Allocate lm_info_frv with new.
12781         (frv_relocate_main_executable): Free lm_info_frv with delete,
12782         allocate with new.
12783         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12784
12785 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12786
12787         * solib-frv.c (struct lm_info_frv): Fix indentation.
12788
12789 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12790
12791         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12792         map field.
12793         (dsbt_current_sos): Allocate lm_info_dsbt with new.
12794         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12795         and allocate with new.
12796         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12797
12798 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12799
12800         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12801         <filename, member_name>: Change type to std::string.
12802         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12803         (library_list_start_library): Allocate lm_info_aix with new.
12804         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12805         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12806         with copy constructor.
12807
12808 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12809
12810         * solist.h (struct lm_info): Remove.
12811         (struct lm_info_base): New class.
12812         (struct so_list) <lm_info>: Change type to lm_info_base *.
12813         * nto-tdep.c (struct lm_info): Remove.
12814         (lm_addr): Adjust.
12815         * solib-aix.c (struct lm_info): Rename to ...
12816         (struct lm_info_aix): ... this.  Extend lm_info_base.
12817         (lm_info_p): Rename to ...
12818         (lm_info_aix_p): ... this, and adjust.
12819         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12820         solib_aix_parse_libraries, library_list_start_library,
12821         solib_aix_free_library_list, solib_aix_parse_libraries,
12822         solib_aix_get_library_list,
12823         solib_aix_relocate_section_addresses, solib_aix_free_so,
12824         solib_aix_get_section_offsets,
12825         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12826         Adjust.
12827         (struct solib_aix_inferior_data) <library_list>: Adjust.
12828         * solib-darwin.c (struct lm_info): Rename to ...
12829         (struct lm_info_darwin): ... this.  Extend lm_info_base.
12830         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12831         * solib-dsbt.c (struct lm_info): Rename to ...
12832         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
12833         (struct dsbt_info) <main_executable_lm_info): Adjust.
12834         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12835         dsbt_relocate_section_addresses): Adjust.
12836         * solib-frv.c (struct lm_info): Rename to ...
12837         (struct lm_info_frv): ... this.  Extend lm_info_base.
12838         (main_executable_lm_info): Adjust.
12839         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12840         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12841         find_canonical_descriptor_in_load_object,
12842         frv_fdpic_find_canonical_descriptor): Adjust.
12843         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12844         to lm_info_svr4.
12845         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12846         svr4_clear_so, svr4_copy_library_list,
12847         library_list_start_library, svr4_default_sos, svr4_read_so_list,
12848         svr4_current_sos, svr4_fetch_objfile_link_map,
12849         solist_update_incremental): Adjust.
12850         * solib-svr4.h (struct lm_info_svr4): Move here from
12851         solib-svr4.c.
12852         * solib-target.c (struct lm_info): Rename to ...
12853         (struct lm_info_target): ... this.  Extend lm_info_base.
12854         (lm_info_p): Rename to ...
12855         (lm_info_target_p): ... this.
12856         (solib_target_parse_libraries, library_list_start_segment,
12857         library_list_start_section, library_list_start_library,
12858         library_list_end_library, solib_target_free_library_list,
12859         solib_target_current_sos, solib_target_free_so,
12860         solib_target_relocate_section_addresses): Adjust.
12861         * windows-nat.c (struct lm_info): Rename to ...
12862         (struct lm_info_windows): ... this.  Extend lm_info_base.
12863         (windows_make_so, handle_load_dll, handle_unload_dll,
12864         windows_xfer_shared_libraries): Adjust.
12865
12866 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
12867
12868         * solib-darwin.c (struct darwin_so_list): Remove.
12869         (darwin_current_sos): Allocate an so_list object instead of a
12870         darwin_so_list, separately allocate an lm_info object.
12871         (darwin_free_so): Free lm_info.
12872
12873 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
12874
12875         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12876         with fprintf_filtered.
12877
12878 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12879
12880         * regcache.c (regcache::regcache): New function.
12881         (regcache::~regcache): New function.
12882         (regcache_xmalloc_1): Remove.
12883         (regcache_xmalloc): Call new regcache.
12884         (regcache_xfree): Call delete regcache.
12885         (get_thread_arch_aspace_regcache): Call new regcache.
12886
12887 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12888
12889         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12890         lwp instead of ptid_get_lwp.
12891
12892 2017-04-28  Yao Qi  <yao.qi@linaro.org>
12893
12894         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12895         lwp_info instead of getting from inferior_ptid.
12896
12897 2017-04-27  Keith Seitz  <keiths@redhat.com>
12898
12899         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12900         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12901         (CV_CONVERSION_BADNESS): Define.
12902         (rank_one_type): Remove overly restrictive rvalue reference
12903         rank checks.
12904         Add cv-qualifier checks and subranks for type equality.
12905         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12906         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12907         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12908
12909 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
12910
12911         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12912         count when creating the object.
12913
12914 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
12915             Ulrich Weigand  <uweigand@de.ibm.com>
12916
12917         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12918         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12919         is used in AIX.
12920         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12921         (process_xcoff_symbol): Likewise.
12922         (scan_xcoff_symtab): Likewise.
12923
12924 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12925
12926         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12927         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12928         (ia64_access_reg): Use get_frame_register_unsigned.
12929         (ia64_access_rse_reg): Likewise.
12930         (ia64_libunwind_frame_prev_register): Likewise.
12931
12932 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
12933
12934         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12935         * gdbarch.c: Regenerated.
12936         * gdbarch.h: Regenerated.
12937         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12938         visibility external.
12939         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12940         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12941         (enum cfa_how_kind): Move to ...
12942         (struct dwarf2_frame_state_reg_info): Likewise.
12943         (struct dwarf2_frame_state): Likewise.
12944         * dwarf2-frame.h: ... here.
12945         (dwarf2_frame_state_alloc_regs): New declaration.
12946         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12947         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12948
12949 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12950
12951         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12952         regcache_raw_read_unsigned.
12953         (xtensa_pseudo_register_write): Likewise.
12954
12955 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
12956
12957         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12958         (nds32_pseudo_register_write): Likewise.
12959
12960 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12961
12962         * regcache.c (struct regcache) <readonly_p>: Change its type
12963         to bool.
12964         (regcache_xmalloc_1): Update parameter type and callers update.
12965
12966 2017-04-25  Yao Qi  <yao.qi@linaro.org>
12967
12968         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12969         set_gdbarch_wchar_bit.
12970         * arm-tdep.c (arm_gdbarch_init): Likewise.
12971
12972 2017-04-25  Pedro Alves  <palves@redhat.com>
12973
12974         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12975         (BothAreRelocatable, memcopy, memmove): Don't define.
12976         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12977         macros.
12978
12979 2017-04-25  Pedro Alves  <palves@redhat.com>
12980
12981         * common/common-defs.h: Include "common/poison.h".
12982         * common/function-view.h: (Not, Or, Requires): Move to traits.h
12983         and adjust.
12984         * common/poison.h: New file.
12985         * common/traits.h: Include <type_traits>.
12986         (Not, Or, Requires): New, moved from common/function-view.h.
12987
12988 2017-04-25  Pedro Alves  <palves@redhat.com>
12989
12990         * breakpoint.h (struct breakpoint): In-class initialize all
12991         fields.  Make boolean fields "bool".
12992         * breakpoint.c (init_raw_breakpoint_without_location): Remove
12993         memset call and initializations no longer necessary.
12994
12995 2017-04-25  Pedro Alves  <palves@redhat.com>
12996
12997         * btrace.c (pt_btrace_insn_flags): Change parameter type to
12998         reference.
12999         (pt_btrace_insn): New function.
13000         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13001
13002 2017-04-25  Pedro Alves  <palves@redhat.com>
13003
13004         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
13005         "base" field and inherit from "bp_location" instead.  Add
13006         non-default ctor.
13007         (allocate_location_exception): Use new non-default ctor.
13008         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13009         (init_bp_location): Convert to ...
13010         (bp_location::bp_location): ... this new ctor, and remove memset
13011         call.
13012         (base_breakpoint_allocate_location): Use the new non-default ctor.
13013         * breakpoint.h (bp_location): Now a class.  Declare default and
13014         non-default ctors.  In-class initialize all members.
13015         (init_bp_location): Remove declaration.
13016
13017 2017-04-25  Pedro Alves  <palves@redhat.com>
13018
13019         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13020         assignment operator.
13021
13022 2017-04-24  Yao Qi  <yao.qi@linaro.org>
13023
13024         * doublest.c (convert_doublest_to_floatformat): Call
13025         floatformat_totalsize_bytes.
13026
13027 2017-04-22  Tom Tromey  <tom@tromey.com>
13028
13029         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13030         ui_out_emit_list.
13031         * stack.c (print_frame): Use ui_out_emit_list.
13032         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13033         ui_out_emit_list.
13034         * mi/mi-main.c (print_one_inferior)
13035         (mi_cmd_data_list_register_names)
13036         (mi_cmd_data_list_register_values, mi_cmd_list_features)
13037         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13038         ui_out_emit_list.
13039         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13040         (mi_output_solib_attribs): Use ui_out_emit_list,
13041         ui_out_emit_tuple.
13042         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13043         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13044         (mi_cmd_stack_list_args, list_args_or_locals): Use
13045         ui_out_emit_list.
13046         * disasm.c (do_assembly_only): Use ui_out_emit_list.
13047         * breakpoint.c (print_solib_event, output_thread_groups): Use
13048         ui_out_emit_list.
13049
13050 2017-04-22  Tom Tromey  <tom@tromey.com>
13051
13052         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13053         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13054         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13055
13056 2017-04-22  Tom Tromey  <tom@tromey.com>
13057
13058         * tracepoint.c (tvariables_info_1)
13059         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13060
13061 2017-04-22  Tom Tromey  <tom@tromey.com>
13062
13063         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13064         annotate_arg_emitter.
13065         * breakpoint.c (print_mention_watchpoint)
13066         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13067         * annotate.h (struct annotate_arg_emitter): New.
13068
13069 2017-04-22  Tom Tromey  <tom@tromey.com>
13070
13071         * record-btrace.c (record_btrace_insn_history)
13072         (record_btrace_insn_history_range, record_btrace_call_history)
13073         (record_btrace_call_history_range): Use ui_out_emit_tuple.
13074         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13075         ui_out_emit_tuple.
13076         * stack.c (print_frame_info): Use ui_out_emit_tuple.
13077         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13078         * skip.c (skip_info): Use ui_out_emit_tuple.
13079         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13080         * progspace.c (print_program_space): Use ui_out_emit_tuple.
13081         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13082         * osdata.c (info_osdata): Use ui_out_emit_tuple.
13083         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13084         ui_out_emit_tuple.
13085         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13086         (output_register, mi_cmd_data_read_memory)
13087         (mi_cmd_data_read_memory_bytes, mi_load_progress)
13088         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13089         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13090         Use ui_out_emit_tuple.
13091         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13092         ui_out_emit_tuple.
13093         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13094         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13095         * linux-thread-db.c (info_auto_load_libthread_db): Use
13096         ui_out_emit_tuple.
13097         * inferior.c (print_inferior): Use ui_out_emit_tuple.
13098         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13099         * disasm.c (do_mixed_source_and_assembly_deprecated)
13100         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13101         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13102         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13103         * breakpoint.c (print_one_breakpoint_location)
13104         (print_one_breakpoint): Use ui_out_emit_tuple.
13105         * auto-load.c (print_script, info_auto_load_cmd): Use
13106         ui_out_emit_tuple.
13107         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13108
13109 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
13110
13111         * thread.c (print_thread_info_1): Remove dead code.
13112
13113 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13114
13115         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13116         GDB_SELF_TEST.
13117         * arm-tdep.c (selftests::arm_record_test): Likewise.
13118
13119 2017-04-21  Yao Qi  <yao.qi@linaro.org>
13120
13121         * regcache.c (regcache_restore): Remove argument 2.  Replace
13122         argument 3 with regcache.  Get register status from
13123         src->register_status and get register contents from
13124         register_buffer (src, regnum).
13125         (regcache_cpy): Update.
13126
13127 2017-04-19  Pedro Alves  <palves@redhat.com>
13128
13129         * gdbthread.h (thread): Add missing closing parenthesis in
13130         comment.
13131
13132 2017-04-19  Pedro Alves  <palves@redhat.com>
13133
13134         * common/refcounted-object.h: New file.
13135         * gdbthread.h: Include "common/refcounted-object.h".
13136         (thread_info): Inherit from refcounted_object and add comments.
13137         (thread_info::incref, thread_info::decref)
13138         (thread_info::m_refcount): Delete.
13139         (thread_info::deletable): Use the refcounted_object::refcount()
13140         method.
13141         * inferior.c (current_inferior_): Add comment.
13142         (set_current_inferior): Increment/decrement refcounts.
13143         (prune_inferiors, remove_inferior_command): Skip inferiors marked
13144         not-deletable instead of comparing with the current inferior.
13145         (initialize_inferiors): Increment the initial inferior's refcount.
13146         * inferior.h (struct inferior): Forward declare.
13147         Include "common/refcounted-object.h".
13148         (current_inferior, set_current_inferior): Move declaration to
13149         before struct inferior's definition, and fix comment.
13150         (inferior): Inherit from refcounted_object.  Add comments.
13151         * thread.c (switch_to_thread_no_regs): Reference the thread's
13152         inferior pointer directly instead of doing a ptid lookup.
13153         (switch_to_no_thread): New function.
13154         (switch_to_thread(thread_info *)): New function, factored out
13155         from ...
13156         (switch_to_thread(ptid_t)): ... this.
13157         (restore_current_thread): Delete.
13158         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13159         fields, and add 'inf' field.
13160         (do_restore_current_thread_cleanup): Check whether old->inf is
13161         alive instead of looking up an inferior by ptid.  Use
13162         switch_to_thread and switch_to_no_thread.
13163         (restore_current_thread_cleanup_dtor): Use old->inf directly
13164         instead of lookup up an inferior by id.  Decref the inferior.
13165         Don't restore 'removable'.
13166         (make_cleanup_restore_current_thread): Same the inferior pointer
13167         in old, instead of the inferior number.  Incref the inferior.
13168         Don't save/clear 'removable'.
13169
13170 2017-04-19  Pedro Alves  <palves@redhat.com>
13171
13172         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13173         unittests/scoped_restore-selftests.c.
13174         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13175         * common/scoped_restore.h (scoped_restore_base): Make "class".
13176         (scoped_restore_base::release): New public method.
13177         (scoped_restore_base::scoped_restore_base): New protected ctor.
13178         (scoped_restore_base::m_saved_var): New protected field.
13179         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13180         scoped_restore_base base class instead of m_saved_var directly.
13181         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13182         (scoped_restore_tmpl::scoped_restore_tmpl(const
13183         scoped_restore_tmpl<T>&)): Likewise.
13184         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13185         method.
13186         (scoped_restore_tmpl::saved_var): New method.
13187         (scoped_restore_tmpl::m_saved_var): Delete.
13188         * inferior.h (inferior::detaching): Now a bool.
13189         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13190         cleanup.
13191         * unittests/scoped_restore-selftests.c: New file.
13192
13193 2017-04-19  Pedro Alves  <palves@redhat.com>
13194
13195         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13196         Re-sort in alphabetic order.
13197
13198 2017-04-18  Pedro Alves  <palves@redhat.com>
13199
13200         * xml-support.c (obstack_xml_printf): Delete.
13201         * xml-support.h (obstack_xml_printf): Delete.
13202
13203 2017-04-18  Pedro Alves  <palves@redhat.com>
13204
13205         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13206         vdebug, verror, body_text, start_element, end_element, name,
13207         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13208         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13209         is_xinclude>: Make private and add m_ prefix.
13210         (gdb_xml_parser::body_text): New method, based on ...
13211         (gdb_xml_body_text): ... this.  Adjust.
13212         (gdb_xml_parser::vdebug): New method, based on ...
13213         (gdb_xml_debug): ... this.  Adjust.
13214         (gdb_xml_parser::verror): New method, based on ...
13215         (gdb_xml_error): ... this.  Adjust.
13216         (gdb_xml_parser::start_element): New method, based on ...
13217         (gdb_xml_start_element): ... this.  Adjust.
13218         (gdb_xml_start_element_wrapper): Defer to
13219         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13220         (gdb_xml_parser::end_element): New method, based on ...
13221         (gdb_xml_end_element_wrapper): ... this.  Adjust.
13222         (gdb_xml_parser::~gdb_xml_parser): Adjust.
13223         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13224         (gdb_xml_parser::use_dtd): New method, based on ...
13225         (gdb_xml_use_dtd): ... this.  Adjust.
13226         (gdb_xml_parser::parse): New method, based on ...
13227         (gdb_xml_parse): ... this.  Adjust.
13228         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13229         (xinclude_start_include): Adjust to call the parser's name method.
13230         (xml_xinclude_default, xml_xinclude_start_doctype)
13231         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13232         method.
13233         (xml_process_xincludes): Adjust to call parser methods.
13234         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13235         declarations.
13236
13237 2017-04-18  Pedro Alves  <palves@redhat.com>
13238
13239         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13240         gdb::optional<std::string>.
13241         * xml-support.c: Include <string>.
13242         (scope_level::scope_level(scope_level &&))
13243         (scope_level::~scope_level): Delete.
13244         (scope_level::body): Now a std::string.
13245         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13246         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13247         parameter.
13248         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13249         (xinclude_parsing_data::output): Now a std::string reference.
13250         (xinclude_start_include): Adjust.
13251         (xml_xinclude_default): Adjust.
13252         (xml_process_xincludes): Add 'output' parameter, and return bool.
13253         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13254         and return bool.
13255         * xml-tdesc.c: Include <unordered_map> and <string>.
13256         (tdesc_xml_cache): Delete.
13257         (tdesc_xml_cache_s): Delete.
13258         (xml_cache): Now an std::unordered_map.
13259         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13260         (target_fetch_description_xml): Change return type to
13261         gdb::optional<std::string>, and adjust.
13262         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13263         (target_fetch_description_xml): Change return type to
13264         gdb::optional<std::string>.
13265
13266 2017-04-18  Pedro Alves  <palves@redhat.com>
13267
13268         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13269         unittests/optional-selftests.c.
13270         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13271         * unittests/optional-selftests.c: New file.
13272         * unittests/optional/assignment/1.cc: New file.
13273         * unittests/optional/assignment/2.cc: New file.
13274         * unittests/optional/assignment/3.cc: New file.
13275         * unittests/optional/assignment/4.cc: New file.
13276         * unittests/optional/assignment/5.cc: New file.
13277         * unittests/optional/assignment/6.cc: New file.
13278         * unittests/optional/assignment/7.cc: New file.
13279         * unittests/optional/cons/copy.cc: New file.
13280         * unittests/optional/cons/default.cc: New file.
13281         * unittests/optional/cons/move.cc: New file.
13282         * unittests/optional/cons/value.cc: New file.
13283         * unittests/optional/in_place.cc: New file.
13284         * unittests/optional/observers/1.cc: New file.
13285         * unittests/optional/observers/2.cc: New file.
13286
13287 2017-04-18  Pedro Alves  <palves@redhat.com>
13288
13289         * common/gdb_optional.h: Include common/traits.h.
13290         (in_place_t): New type.
13291         (in_place): New constexpr variable.
13292         (optional::optional): Remove member initialization of
13293         m_instantiated.
13294         (optional::optional(in_place_t...)): New constructor.
13295         (optional::~optional): Use reset.
13296         (optional::optional(const optional&)): New.
13297         (optional::optional(const optional&&)): New.
13298         (optional::optional(T &)): New.
13299         (optional::optional(T &&)): New.
13300         (operator::operator=(const optional &)): New.
13301         (operator::operator=(optional &&)): New.
13302         (operator::operator= (const T &))
13303         (operator::operator= (T &&))
13304         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
13305         (operator::reset): New.
13306         (operator::m_instantiated):: Add in-class initializer.
13307         * common/traits.h: Include <type_traits>.
13308         (struct And): New types.
13309
13310 2017-04-18  Pedro Alves  <palves@redhat.com>
13311
13312         * xml-support.c: Include <vector>.
13313         (scope_level::scope_level(const gdb_xml_element *))
13314         (scope_level::scope_level(scope_level&&)): New.
13315         (scope_level::~scope_level): New.
13316         (scope_level_s): Delete.
13317         (gdb_xml_parser::scopes): Now a std::vector.
13318         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13319         Use std::vector.
13320         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13321         scope cleanup code.
13322         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13323         of the scopes member.  Use std::vector::emplace_back.
13324
13325 2017-04-18  Pedro Alves  <palves@redhat.com>
13326
13327         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
13328         a bool.
13329         (gdb_xml_end_element): Change type of first parameter.
13330         (gdb_xml_cleanup): Rename to ...
13331         (gdb_xml_parser::~gdb_xml_parser): ... this.
13332         (gdb_xml_create_parser_and_cleanup): Delete with ...
13333         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13334         to this new ctor.
13335         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13336         using gdb_xml_create_parser_and_cleanup.
13337         (xinclude_parsing_data): Add ctor/dtor.
13338         (xml_xinclude_cleanup): Delete.
13339         (xml_process_xincludes): Create a local xinclude_parsing_data
13340         instead of heap-allocating one.  Create a local gdb_xml_parser
13341         instead of heap-allocating one with
13342         gdb_xml_create_parser_and_cleanup.
13343
13344 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
13345
13346         PR threads/20743
13347         * fbsd-nat.c (resume_one_thread_cb): Remove.
13348         (resume_all_threads_cb): Remove.
13349         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13350         iterate_over_threads.
13351
13352 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13353
13354         * NEWS: Create a new section for the next release branch.
13355         Rename the section of the current branch, now that it has
13356         been cut.
13357
13358 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13359
13360         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13361         * version.in: Bump version to 8.0.50.DATE-git.
13362
13363 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
13364
13365         PR gdb/21385
13366         * windows-nat.c (windows_create_inferior): Declare 'allargs'
13367         independently of the host, and fix build breakage on Cygwin.
13368
13369 2017-04-13  Pedro Alves  <palves@redhat.com>
13370
13371         * inferior.c (free_inferior): Convert to ...
13372         (inferior::~inferior): ... this dtor.
13373         (inferior::inferior): New ctor, factored out from ...
13374         (add_inferior_silent): ... here.  Allocate the inferior with a new
13375         expression.
13376         (delete_inferior): Call delete instead of free_inferior.
13377         * inferior.h (gdb_environ, continuation): Forward declare.
13378         (inferior): Now a class.  Add in-class initialization to all
13379         members.  Make boolean fields bool, except 'detaching'.
13380         (inferior::inferior): New explicit ctor.
13381         (inferior::~inferior): New.
13382
13383 2017-04-13  Pedro Alves  <palves@redhat.com>
13384
13385         * inferior.c (init_inferior_list): Delete.
13386         * inferior.h (init_inferior_list): Delete.
13387
13388 2017-04-13  Pedro Alves  <palves@redhat.com>
13389
13390         PR threads/13217
13391         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13392         (top level): Call it twice, with different thread sets.
13393
13394 2017-04-13  Pedro Alves  <palves@redhat.com>
13395
13396         * thread.c: Include <algorithm>.
13397         (thread_array_cleanup): Delete.
13398         (scoped_inc_dec_ref): New class.
13399         (live_threads_count): New function.
13400         (set_thread_refcount): Delete.
13401         (tp_array_compar_ascending): Now a bool.
13402         (tp_array_compar): Convert to a std::sort comparison function.
13403         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13404         and live_threads_count.
13405
13406 2017-04-13  Pedro Alves  <palves@redhat.com>
13407
13408         * infrun.c (follow_fork_inferior): Also switch the current
13409         inferior.
13410
13411 2017-04-13  Pedro Alves  <palves@redhat.com>
13412
13413         * breakpoint.c (watch_command_1): Save watchpoint-frame info
13414         before calling create_internal_breakpoint.
13415
13416 2017-04-13  Pedro Alves  <palves@redhat.com>
13417
13418         * fork-child.c (execv_argv): New class.
13419         (breakup_args): Refactored as ...
13420         (execv_argv::init_for_no_shell): .. this method of execv_argv.
13421         Copy arguments to storage and replace separators with NULL
13422         terminators in place.
13423         (escape_bang_in_quoted_argument): Adjust to return bool.
13424         (execv_argv::execv_argv): New ctor.
13425         (execv_argv::init_for_shell): New method, factored out from
13426         fork_inferior.  Don't strdup strings into the vector.
13427         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
13428         Remove free_vector_argv call.
13429
13430 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13431
13432         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13433         tdep->rx_psw_type.
13434
13435 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13436
13437         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13438         * rx-tdep.c (rx_gdbarch_init): Likewise.
13439
13440 2017-04-13  Pedro Alves  <palves@redhat.com>
13441
13442         * breakpoint.h (struct breakpoint): Reindent.
13443
13444 2017-04-13  Pedro Alves  <palves@redhat.com>
13445
13446         * breakpoint.c (bp_location): Rename to ...
13447         (bp_locations): ... this.  All references updated.
13448         (bp_location_count): Rename to ...
13449         (bp_locations_count): ... this.  All references updated.
13450         (bp_location_placed_address_before_address_max): Rename to ...
13451         (bp_locations_placed_address_before_address_max): ... this.  All
13452         references updated.
13453         (bp_location_shadow_len_after_address_max): Rename to ...
13454         (bp_locations_shadow_len_after_address_max): ... this.  All
13455         references updated.
13456         (bp_location_compare_addrs): Rename to ...
13457         (bp_locations_compare_addrs): ... this.  All references updated.
13458         (bp_location_compare):Rename to ...
13459         (bp_locations_compare): ... this.  All references updated.
13460         (bp_location_target_extensions_update): Rename to ...
13461         (bp_locations_target_extensions_update): ... this.  All references
13462         updated.
13463
13464 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13465
13466         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13467         * common/common.m4: Check headers 'termios.h', 'termio.h' and
13468         'sgtty.h'.
13469         * common/gdb_termios.h: New file, with parts of "terminal.h".
13470         * inflow.c: Include "gdb_termios.h".
13471         * ser-unix.c: Include "gdb_termios.h".
13472         * terminal.h: Move terminal-related defines to
13473         "common/gdb_termios.h".
13474
13475 2017-04-12  Tom Tromey  <tom@tromey.com>
13476
13477         * probe.c (parse_probes): Update.
13478         * location.h (delete_event_location): Don't declare.
13479         (event_location_deleter::operator()): Update.
13480         * location.c (event_location_deleter::operator()): Rename from
13481         delete_event_location.
13482         * linespec.h (linespec_result) <location>: Change type to
13483         event_location_up.
13484         * linespec.c (canonicalize_linespec, event_location_to_sals)
13485         (decode_objc): Update.
13486         (linespec_result): Don't call delete_event_location.
13487         * breakpoint.c (create_breakpoints_sal)
13488         (bkpt_probe_create_sals_from_location)
13489         (strace_marker_create_sals_from_location): Update.
13490
13491 2017-04-12  Tom Tromey  <tom@tromey.com>
13492
13493         * linespec.h (struct linespec_result): Add constructor and
13494         destructor.
13495         (init_linespec_result, destroy_linespec_result)
13496         (make_cleanup_destroy_linespec_result): Don't declare.
13497         * linespec.c (init_linespec_result): Remove.
13498         (linespec_result::~linespec_result): Rename from
13499         destroy_linespec_result.  Update.
13500         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13501         Remove.
13502         * breakpoint.c (create_breakpoint, break_range_command)
13503         (decode_location_default): Update.
13504         * ax-gdb.c (agent_command_1): Update.
13505
13506 2017-04-12  Tom Tromey  <tom@tromey.com>
13507
13508         * remote.c (remote_download_tracepoint): Update.
13509         * python/py-breakpoint.c (bppy_get_location): Update.
13510         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13511         (gdbscm_breakpoint_location): Update.
13512         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13513         * breakpoint.h (struct breakpoint) <location, location_range_end>:
13514         Change type to event_location_up.
13515         * breakpoint.c (create_overlay_event_breakpoint)
13516         (create_longjmp_master_breakpoint)
13517         (create_std_terminate_master_breakpoint)
13518         (create_exception_master_breakpoint)
13519         (breakpoint_event_location_empty_p, print_breakpoint_location)
13520         (print_one_breakpoint_location, create_thread_event_breakpoint)
13521         (init_breakpoint_sal, create_breakpoint)
13522         (print_recreate_ranged_breakpoint, break_range_command)
13523         (init_ada_exception_breakpoint, say_where): Update.
13524         (base_breakpoint_dtor): Don't call delete_event_location.
13525         (bkpt_print_recreate, tracepoint_print_recreate)
13526         (dprintf_print_recreate, update_static_tracepoint)
13527         (breakpoint_re_set_default): Update.
13528
13529 2017-04-12  Tom Tromey  <tom@tromey.com>
13530
13531         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13532         type of "to_do".  Update.
13533         (compute_stack_depth): Use std::vector.
13534
13535 2017-04-12  Tom Tromey  <tom@tromey.com>
13536
13537         * printcmd.c (find_instruction_backward): Use std::vector.
13538
13539 2017-04-12  Tom Tromey  <tom@tromey.com>
13540
13541         * symfile.c (objfilep): Remove typedef.
13542         (reread_symbols): Use a std::vector.
13543
13544 2017-04-12  Tom Tromey  <tom@tromey.com>
13545
13546         * mi/mi-main.c (exec_direction_forward): Remove.
13547         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13548         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13549         scoped_restore.
13550         * guile/guile.c (guile_repl_command, guile_command)
13551         (gdbscm_execute_gdb_command): Use scoped_restore.
13552         * go-exp.y (go_parse): Use scoped_restore.
13553         * d-exp.y (d_parse): Use scoped_restore.
13554         * cli/cli-decode.c (cmd_func): Use scoped_restore.
13555         * c-exp.y (c_parse): Use scoped_restore.
13556
13557 2017-04-12  Tom Tromey  <tom@tromey.com>
13558
13559         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13560         (mi_parse): Update return type.
13561         (mi_parse_free): Remove.
13562         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13563         (mi_parse::~mi_parse): Rename from mi_parse_free.
13564         (mi_parse_cleanup): Remove.
13565         (mi_parse): Return a unique_ptr.  Use new.
13566         * mi/mi-main.c (mi_execute_command): Update.
13567
13568 2017-04-12  Tom Tromey  <tom@tromey.com>
13569
13570         * location.c (explicit_location_lex_one): Return a
13571         unique_xmalloc_ptr.
13572         (string_to_explicit_location): Update.  Remove cleanups.
13573
13574 2017-04-12  Tom Tromey  <tom@tromey.com>
13575
13576         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13577         (compare_value_and_voffset): Change type.  Update.
13578         (compute_vtable_size): Change type of "offset_vec".
13579         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
13580         (gnuv3_get_typeid): Remove extraneous declaration.
13581
13582 2017-04-12  Tom Tromey  <tom@tromey.com>
13583
13584         * charset.h (wchar_iterator): Fix comment.
13585
13586 2017-04-12  Tom Tromey  <tom@tromey.com>
13587
13588         * charset.c (iconv_wrapper): New class.
13589         (cleanup_iconv): Remove.
13590         (convert_between_encodings): Use it.
13591
13592 2017-04-12  Tom Tromey  <tom@tromey.com>
13593
13594         * symfile.h (increment_reading_symtab): Update type.
13595         * symfile.c (decrement_reading_symtab): Remove.
13596         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13597         * psymtab.c (psymtab_to_symtab): Update.
13598         * dwarf2read.c (dw2_instantiate_symtab): Update.
13599
13600 2017-04-12  Tom Tromey  <tom@tromey.com>
13601
13602         * jit.c (struct jit_reader): Declare separately.  Add constructor
13603         and destructor.  Change type of "handle".
13604         (loaded_jit_reader): Define separately.
13605         (jit_reader_load): Update.  New "new".
13606         (jit_reader_unload_command): Use "delete".
13607         * gdb-dlfcn.h (struct dlclose_deleter): New.
13608         (gdb_dlhandle_up): New typedef.
13609         (gdb_dlopen, gdb_dlsym): Update types.
13610         (gdb_dlclose): Remove.
13611         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13612         (gdb_dlsym): Change type of "handle".
13613         (make_cleanup_dlclose): Remove.
13614         (dlclose_deleter::operator()): Rename from gdb_dlclose.
13615         * compile/compile-c-support.c (load_libcc): Update.
13616
13617 2017-04-12  Tom Tromey  <tom@tromey.com>
13618
13619         * symtab.h (find_pcs_for_symtab_line): Change return type.
13620         * symtab.c (find_pcs_for_symtab_line): Change return type.
13621         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13622         type of "vec".  Update.
13623         (ltpy_get_pcs_for_line): Update.
13624         * linespec.c (decode_digits_ordinary): Update.
13625
13626 2017-04-12  Tom Tromey  <tom@tromey.com>
13627
13628         * tracepoint.c (actions_command): Update.
13629         * python/python.c (python_command, python_interactive_command):
13630         Update.
13631         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13632         * guile/guile.c (guile_command): Update.
13633         * defs.h (read_command_lines, read_command_lines_1): Return
13634         command_line_up.
13635         (command_lines_deleter): New struct.
13636         (command_line_up): New typedef.
13637         * compile/compile.c (compile_code_command)
13638         (compile_print_command): Update.
13639         * cli/cli-script.h (get_command_line, copy_command_lines): Return
13640         command_line_up.
13641         (make_cleanup_free_command_lines): Remove.
13642         * cli/cli-script.c (get_command_line, read_command_lines_1)
13643         (copy_command_lines): Return command_line_up.
13644         (while_command, if_command, read_command_lines, define_command)
13645         (document_command): Update.
13646         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13647         Remove.
13648         * breakpoint.h (breakpoint_set_commands): Change type of
13649         "commands".
13650         * breakpoint.c (breakpoint_set_commands): Change type of
13651         "commands".  Update.
13652         (do_map_commands_command, update_dprintf_command_list)
13653         (create_tracepoint_from_upload): Update.
13654
13655 2017-04-12  Tom Tromey  <tom@tromey.com>
13656
13657         * tracepoint.c (scope_info): Update.
13658         * spu-tdep.c (spu_catch_start): Update.
13659         * python/python.c (gdbpy_decode_line): Update.
13660         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13661         * python/py-breakpoint.c (bppy_init): Update.
13662         * probe.c (parse_probes): Update.
13663         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13664         * location.h (event_location_deleter): New struct.
13665         (event_location_up): New typedef.
13666         (new_linespec_location, new_address_location, new_probe_location)
13667         (new_explicit_location, copy_event_location)
13668         (string_to_event_location, string_to_event_location_basic)
13669         (string_to_explicit_location): Update return type.
13670         (make_cleanup_delete_event_location): Remove.
13671         * location.c (new_linespec_location, new_address_location)
13672         (new_probe_location, new_explicit_location, copy_event_location):
13673         Return event_location_up.
13674         (delete_event_location_cleanup)
13675         (make_cleanup_delete_event_location): Remove.
13676         (string_to_explicit_location, string_to_event_location_basic)
13677         (string_to_event_location): Return event_location_up.
13678         * linespec.c (canonicalize_linespec, event_location_to_sals)
13679         (decode_line_with_current_source)
13680         (decode_line_with_last_displayed, decode_objc): Update.
13681         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13682         * completer.c (location_completer): Update.
13683         * cli/cli-cmds.c (edit_command, list_command): Update.
13684         * breakpoint.c (create_overlay_event_breakpoint)
13685         (create_longjmp_master_breakpoint)
13686         (create_std_terminate_master_breakpoint)
13687         (create_exception_master_breakpoint)
13688         (create_thread_event_breakpoint): Update.
13689         (init_breakpoint_sal): Update.  Remove some dead code.
13690         (create_breakpoint_sal): Change type of "location".  Update.
13691         (create_breakpoints_sal, create_breakpoint, break_command_1)
13692         (dprintf_command, break_range_command, until_break_command)
13693         (init_ada_exception_breakpoint)
13694         (strace_marker_create_sals_from_location)
13695         (update_static_tracepoint, trace_command, ftrace_command)
13696         (strace_command, create_tracepoint_from_upload): Update.
13697         * break-catch-throw.c (re_set_exception_catchpoint): Update.
13698         * ax-gdb.c (agent_command_1): Update.
13699
13700 2017-04-12  Pedro Alves  <palves@redhat.com>
13701
13702         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13703         * configure.tgt: Handle i[34567]86-*-go32* and
13704         i[34567]86-*-msdosdjgpp*.
13705         * i386-tdep.c (i386_svr4_reg_to_regnum):
13706         Make extern.
13707         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13708         i386-go32-tdep.c.
13709         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13710         * i386-go32-tdep.c: New file.
13711         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13712         declarations.
13713
13714 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
13715
13716         * aix-thread.c (pd_status2str): Change return type to const char *.
13717
13718 2017-04-12  Pedro Alves  <palves@redhat.com>
13719
13720         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13721         calls to set_gdbarch_gnu_triplet_regexp.
13722
13723 2017-04-12  Pedro Alves  <palves@redhat.com>
13724
13725         PR gdb/21323
13726         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13727         New enum value.
13728         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13729         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13730         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13731         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13732         * gdbarch.h, gdbarch.c: Regenerate.
13733         * aarch64-tdep.c (aarch64_gdbarch_init): Override
13734         gdbarch_wchar_bit and gdbarch_wchar_signed.
13735         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13736         * arm-tdep.c (arm_gdbarch_init): Likewise.
13737         * avr-tdep.c (avr_gdbarch_init): Likewise.
13738         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13739         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13740         * i386-tdep.c (i386_go32_init_abi): Likewise.
13741         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13742         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13743         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13744         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13745         * sh-tdep.c (sh_gdbarch_init): Likewise.
13746         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13747         * sparc64-tdep.c (sparc64_init_abi): Likewise.
13748         * windows-tdep.c (windows_init_abi): Likewise.
13749         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13750
13751 2017-04-12  Pedro Alves  <palves@redhat.com>
13752
13753         PR c++/21323
13754         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13755         cplus_primitive_type_char32_t>: New enum values.
13756         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13757         and cplus_primitive_type_char32_t.
13758         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13759         32, use the archtecture's built-in type for char16_t and char32_t,
13760         respectively.  Otherwise, fallback to init_integer_type as before,
13761         but make the type unsigned, and issue a complaint.
13762         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13763
13764 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
13765
13766         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13767         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13768
13769 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13770
13771         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13772         'const char *'.
13773
13774 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13775
13776         * common/common-utils.c (free_vector_argv): New function.
13777         * common/common-utils.h: Include <vector>.
13778         (free_vector_argv): New prototype.
13779         * darwin-nat.c (darwin_create_inferior): Rewrite function
13780         prototype in order to constify "exec_file" and accept a
13781         "std::string" for "allargs".
13782         * fork-child.c: Include <vector>.
13783         (breakup_args): Rewrite function, using C++.
13784         (fork_inferior): Rewrite function header, constify "exec_file_arg"
13785         and accept "std::string" for "allargs".  Update the code to
13786         calculate "argv" based on "allargs".  Update calls to "exec_fun"
13787         and "execvp".
13788         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13789         order to constify "exec_file" and accept a "std::string" for
13790         "allargs".
13791         * go32-nat.c (go32_create_inferior): Likewise.
13792         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13793         * infcmd.c (run_command_1): Constify "exec_file".  Use
13794         "std::string" for inferior arguments.
13795         * inferior.h (fork_inferior): Update prototype.
13796         * linux-nat.c (linux_nat_create_inferior): Rewrite function
13797         prototype in order to constify "exec_file" and accept a
13798         "std::string" for "allargs".
13799         * nto-procfs.c (procfs_create_inferior): Likewise.
13800         * procfs.c (procfs_create_inferior): Likewise.
13801         * remote-sim.c (gdbsim_create_inferior): Likewise.
13802         * remote.c (extended_remote_run): Update code to accept
13803         "std::string" as argument.
13804         (extended_remote_create_inferior): Rewrite function prototype in
13805         order to constify "exec_file" and accept a "std::string" for
13806         "allargs".
13807         * rs6000-nat.c (super_create_inferior): Likewise.
13808         (rs6000_create_inferior): Likewise.
13809         * target.h (struct target_ops) <to_create_inferior>: Likewise.
13810         * windows-nat.c (windows_create_inferior): Likewise.
13811
13812 2017-04-11  Pedro Alves  <palves@redhat.com>
13813
13814         * thread.c: Fix whitespace throughout.
13815
13816 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13817
13818         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13819
13820 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
13821
13822         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13823
13824 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
13825
13826         PR gdb/21364
13827         * osdata.c (info_osdata): Check if 'type' is an empty string
13828         instead of NULL.
13829
13830 2017-04-10  Pedro Alves  <palves@redhat.com>
13831
13832         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13833         (ptid_to_global_thread_id, in_thread_list)
13834         (do_captured_list_thread_ids, set_resumed, set_running)
13835         (set_executing, set_stop_requested, finish_thread_state)
13836         (validate_registers_access, can_access_registers_ptid)
13837         (print_thread_info_1, switch_to_thread)
13838         (do_restore_current_thread_cleanup)
13839         (make_cleanup_restore_current_thread, thread_command)
13840         (thread_name_command): Use operator== instead of ptid_equal.
13841
13842 2017-04-10  Pedro Alves  <palves@redhat.com>
13843
13844         * thread.c (struct current_thread_cleanup) <next>: Delete field.
13845         (current_thread_cleanup_chain): Delete.
13846         (restore_current_thread_cleanup_dtor)
13847         (make_cleanup_restore_current_thread): Remove references to
13848         current_thread_cleanup_chain.
13849
13850 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
13851
13852         * msp430-tdep.c (msp430_pseudo_register_read): Never return
13853         REG_UNKNOWN.
13854
13855 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13856
13857         PR gdb/19942
13858         * gdbthread.h (thread_info::deletable): New method.
13859         (thread_info::incref): New method.
13860         (thread_info::decref): New method.
13861         (thread_info::refcount): Move it to private.
13862         * infrun.c (save_stop_context): Call inc_refcount.
13863         (release_stop_context_cleanup): Likewise.
13864         * thread.c (set_thread_exited): New function.
13865         (init_thread_list): Delete "tp" only it is deletable, otherwise
13866         call set_thread_exited.
13867         (delete_thread_1): Call set_thread_exited.
13868         (current_thread_cleanup) <inferior_pid>: Remove.
13869         <thread>: New field.
13870         (restore_current_thread_ptid_changed): Removed.
13871         (do_restore_current_thread_cleanup): Adjust.
13872         (restore_current_thread_cleanup_dtor): Don't call
13873         find_thread_ptid.
13874         (set_thread_refcount): Use dec_refcount.
13875         (make_cleanup_restore_current_thread): Adjust.
13876         (thread_apply_all_command): Call inc_refcount.
13877         (_initialize_thread): Don't call
13878         observer_attach_thread_ptid_changed.
13879
13880 2017-04-10  Yao Qi  <yao.qi@linaro.org>
13881
13882         * thread.c (delete_thread_1): Hoist code on marking thread as
13883         exited.
13884
13885 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
13886
13887         * windows-nat.c (windows_detach): Initialize ptid with
13888         minus_one_ptid.
13889
13890 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
13891
13892         * unittests/ptid-selftests.c: Fix erroneous assert messages.
13893
13894 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
13895
13896         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13897         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13898         (bfin_pseudo_register_write): Likewise
13899
13900 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
13901
13902         * common/ptid.h (struct ptid): Change to...
13903         (class ptid_t): ... this.
13904         <ptid_t>: New constructors.
13905         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13906         matches>: New methods.
13907         <make_null, make_minus_one>: New static methods.
13908         <pid>: Rename to...
13909         <m_pid>: ...this.
13910         <lwp>: Rename to...
13911         <m_lwp>: ...this.
13912         <tid>: Rename to...
13913         <m_tid>: ...this.
13914         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13915         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13916         as references, move comment to class ptid_t.
13917         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13918         ptid_t static methods.
13919         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13920         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13921         Take ptid arguments as references, implement using ptid_t methods.
13922         * unittests/ptid-selftests.c: New file.
13923         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13924         unittests/ptid-selftests.c.
13925         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13926
13927 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13928
13929         * python/python.c (python_run_simple_file): Cast mode literal to
13930         non-const char pointer as expected by PyFile_FromString.
13931
13932 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
13933
13934         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13935         minus_one_ptid and null_ptid.
13936
13937 2017-04-05  Pedro Alves  <palves@redhat.com>
13938
13939         * warning.m4 (build_warnings): Remove -Wno-write-strings.
13940         * configure: Regenerate.
13941
13942 2017-04-05  Pedro Alves  <palves@redhat.com>
13943
13944         * ada-exp.y (yyerror): Constify.
13945         * ada-lang.c (bound_name, get_selections)
13946         (ada_variant_discrim_type)
13947         (ada_variant_discrim_name, ada_value_struct_elt)
13948         (ada_lookup_struct_elt_type, is_unchecked_variant)
13949         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13950         (catch_ada_exception_command_split)
13951         (catch_ada_assert_command_split, catch_assert_command)
13952         (ada_op_name): Constify.
13953         * ada-lang.h (ada_yyerror, get_selections)
13954         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13955         * arc-tdep.c (arc_print_frame_cache): Constify.
13956         * arm-tdep.c (arm_skip_stub): Constify.
13957         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13958         (gen_aggregate_elt_ref): Constify.
13959         * bcache.c (print_bcache_statistics): Constify.
13960         * bcache.h (print_bcache_statistics): Constify.
13961         * break-catch-throw.c (catch_exception_command_1):
13962         * breakpoint.c (struct ep_type_description::description):
13963         Constify.
13964         (add_solib_catchpoint): Constify.
13965         (catch_fork_command_1): Add cast.
13966         (add_catch_command): Constify.
13967         * breakpoint.h (add_catch_command, add_solib_catchpoint):
13968         Constify.
13969         * bsd-uthread.c (bsd_uthread_state): Constify.
13970         * buildsym.c (patch_subfile_names): Constify.
13971         * buildsym.h (next_symbol_text_func, patch_subfile_names):
13972         Constify.
13973         * c-exp.y (yyerror): Constify.
13974         (token::oper): Constify.
13975         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13976         * c-varobj.c (cplus_describe_child): Constify.
13977         * charset.c (find_charset_names): Add cast.
13978         (find_charset_names): Constify array and add const_cast.
13979         * cli/cli-cmds.c (complete_command, cd_command): Constify.
13980         (edit_command): Constify.
13981         * cli/cli-decode.c (lookup_cmd): Constify.
13982         * cli/cli-dump.c (dump_memory_command, dump_value_command):
13983         Constify.
13984         (struct dump_context): Constify.
13985         (add_dump_command, restore_command): Constify.
13986         * cli/cli-script.c (get_command_line): Constify.
13987         * cli/cli-script.h (get_command_line): Constify.
13988         * cli/cli-utils.c (check_for_argument): Constify.
13989         * cli/cli-utils.h (check_for_argument): Constify.
13990         * coff-pe-read.c (struct read_pe_section_data): Constify.
13991         * command.h (lookup_cmd): Constify.
13992         * common/print-utils.c (decimal2str): Constify.
13993         * completer.c (gdb_print_filename): Constify.
13994         * corefile.c (set_gnutarget): Constify.
13995         * cp-name-parser.y (yyerror): Constify.
13996         * cp-valprint.c (cp_print_class_member): Constify.
13997         * cris-tdep.c (cris_register_name, crisv32_register_name):
13998         Constify.
13999         * d-exp.y (yyerror): Constify.
14000         (struct token::oper): Constify.
14001         * d-lang.h (d_yyerror): Constify.
14002         * dbxread.c (struct header_file_location::name): Constify.
14003         (add_old_header_file, add_new_header_file, last_function_name)
14004         (dbx_next_symbol_text, add_bincl_to_list)
14005         (find_corresponding_bincl_psymtab, set_namestring)
14006         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14007         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14008         * defs.h (command_line_input, print_address_symbolic)
14009         (deprecated_readline_begin_hook): Constify.
14010         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14011         Constify.
14012         * event-top.c (handle_line_of_input): Constify and add cast.
14013         * exceptions.c (catch_errors): Constify.
14014         * exceptions.h (catch_errors): Constify.
14015         * expprint.c (print_subexp_standard, op_string, op_name)
14016         (op_name_standard, dump_raw_expression, dump_raw_expression):
14017         * expression.h (op_name, op_string, dump_raw_expression):
14018         Constify.
14019         * f-exp.y (yyerror): Constify.
14020         (struct token::oper): Constify.
14021         (struct f77_boolean_val::name): Constify.
14022         * f-lang.c (f_word_break_characters): Constify.
14023         * f-lang.h (f_yyerror): Constify.
14024         * fork-child.c (fork_inferior): Add cast.
14025         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14026         (new_variant): Constify.
14027         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14028         * gdbarch.c: Regenerate.
14029         * gdbcore.h (set_gnutarget): Constify.
14030         * go-exp.y (yyerror): Constify.
14031         (token::oper): Constify.
14032         * go-lang.h (go_yyerror): Constify.
14033         * go32-nat.c (go32_sysinfo): Constify.
14034         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14035         * guile/scm-cmd.c (cmdscm_function): Constify.
14036         * guile/scm-param.c (pascm_param_value): Constify.
14037         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14038         (h8300sx_register_name): Constify.
14039         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14040         Constify.
14041         * ia64-tdep.c (ia64_register_names): Constify.
14042         * infcmd.c (construct_inferior_arguments): Constify.
14043         (path_command, attach_post_wait): Constify.
14044         * language.c (show_range_command, show_case_command)
14045         (unk_lang_error): Constify.
14046         * language.h (language_defn::la_error)
14047         (language_defn::la_name_of_this): Constify.
14048         * linespec.c (decode_line_2): Constify.
14049         * linux-thread-db.c (thread_db_err_str): Constify.
14050         * lm32-tdep.c (lm32_register_name): Constify.
14051         * m2-exp.y (yyerror): Constify.
14052         * m2-lang.h (m2_yyerror): Constify.
14053         * m32r-tdep.c (m32r_register_names): Constify and make static.
14054         * m68hc11-tdep.c (m68hc11_register_names): Constify.
14055         * m88k-tdep.c (m88k_register_name): Constify.
14056         * macroexp.c (appendmem): Constify.
14057         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14058         (upgrade_type, parse_external, parse_partial_symbols)
14059         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14060         (new_symbol): Constify.
14061         * memattr.c (mem_info_command): Constify.
14062         * mep-tdep.c (register_name_from_keyword): Constify.
14063         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14064         Constify.
14065         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14066         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14067         * mi/mi-main.c (captured_mi_execute_command): Constify and add
14068         cast.
14069         (mi_execute_async_cli_command): Constify.
14070         * mips-tdep.c (mips_register_name): Constify.
14071         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14072         (am33_register_name, am33_2_register_name)
14073         * moxie-tdep.c (moxie_register_names): Constify.
14074         * nat/linux-osdata.c (osdata_type): Constify fields.
14075         * nto-tdep.c (nto_parse_redirection): Constify.
14076         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14077         (lookup_child_selector): Constify.
14078         (objc_methcall::name): Constify.
14079         * objc-lang.h (lookup_objc_class, lookup_child_selector)
14080         (lookup_struct_typedef): Constify.
14081         * objfiles.c (pc_in_section): Constify.
14082         * objfiles.h (pc_in_section): Constify.
14083         * p-exp.y (struct token::oper): Constify.
14084         (yyerror): Constify.
14085         * p-lang.h (pascal_yyerror): Constify.
14086         * parser-defs.h (op_name_standard): Constify.
14087         (op_print::string): Constify.
14088         (exp_descriptor::op_name): Constify.
14089         * printcmd.c (print_address_symbolic): Constify.
14090         * psymtab.c (print_partial_symbols): Constify.
14091         * python/py-breakpoint.c (stop_func): Constify.
14092         (bppy_get_expression): Constify.
14093         * python/py-cmd.c (cmdpy_completer::name): Constify.
14094         (cmdpy_function): Constify.
14095         * python/py-event.c (evpy_add_attribute)
14096         (gdbpy_initialize_event_generic): Constify.
14097         * python/py-event.h (evpy_add_attribute)
14098         (gdbpy_initialize_event_generic): Constify.
14099         * python/py-evts.c (add_new_registry): Constify.
14100         * python/py-finishbreakpoint.c (outofscope_func): Constify.
14101         * python/py-framefilter.c (get_py_iter_from_func): Constify.
14102         * python/py-inferior.c (get_buffer): Add cast.
14103         * python/py-param.c (parm_constant::name): Constify.
14104         * python/py-unwind.c (fprint_frame_id): Constify.
14105         * python/python.c (gdbpy_parameter_value): Constify.
14106         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14107         * remote.c (memory_packet_config::name): Constify.
14108         (show_packet_config_cmd, remote_write_bytes)
14109         (remote_buffer_add_string):
14110         * reverse.c (exec_reverse_once): Constify.
14111         * rs6000-tdep.c (variant::name, variant::description): Constify.
14112         * rust-exp.y (rustyyerror): Constify.
14113         * rust-lang.c (rust_op_name): Constify.
14114         * rust-lang.h (rustyyerror): Constify.
14115         * serial.h (serial_ops::name): Constify.
14116         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14117         (sh_sh3e_register_name, sh_sh2e_register_name)
14118         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14119         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14120         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14121         (sh_sh4al_dsp_register_name): Constify.
14122         * sh64-tdep.c (sh64_register_name): Constify.
14123         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14124         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14125         * stabsread.c (patch_block_stabs, read_type_number)
14126         (ref_map::stabs, ref_add, process_reference)
14127         (symbol_reference_defined, define_symbol, define_symbol)
14128         (error_type, read_type, read_member_functions, read_cpp_abbrev)
14129         (read_one_struct_field, read_struct_fields, read_baseclasses)
14130         (read_tilde_fields, read_struct_type, read_array_type)
14131         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14132         (read_huge_number, read_range_type, read_args, common_block_start)
14133         (find_name_end): Constify.
14134         * stabsread.h (common_block_start, define_symbol)
14135         (process_one_symbol, symbol_reference_defined, ref_add):
14136         * symfile.c (get_section_index, add_symbol_file_command):
14137         * symfile.h (get_section_index): Constify.
14138         * target-descriptions.c (tdesc_type::name): Constify.
14139         (tdesc_free_type): Add cast.
14140         * target.c (find_default_run_target):
14141         (add_deprecated_target_alias, find_default_run_target)
14142         (target_announce_detach): Constify.
14143         (do_option): Constify.
14144         * target.h (add_deprecated_target_alias): Constify.
14145         * thread.c (print_thread_info_1): Constify.
14146         * top.c (deprecated_readline_begin_hook, command_line_input):
14147         Constify.
14148         (init_main): Add casts.
14149         * top.h (handle_line_of_input): Constify.
14150         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14151         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14152         (tfind_command): Rename to ...
14153         (tfind_command_1): ... this and constify.
14154         (tfind_command): New function.
14155         (tfind_end_command, tfind_start_command): Adjust.
14156         (encode_source_string): Constify.
14157         * tracepoint.h (encode_source_string): Constify.
14158         * tui/tui-data.c (tui_partial_win_by_name): Constify.
14159         * tui/tui-data.h (tui_partial_win_by_name): Constify.
14160         * tui/tui-source.c (tui_set_source_content_nil): Constify.
14161         * tui/tui-source.h (tui_set_source_content_nil): Constify.
14162         * tui/tui-win.c (parse_scrolling_args): Constify.
14163         * tui/tui-windata.c (tui_erase_data_content): Constify.
14164         * tui/tui-windata.h (tui_erase_data_content): Constify.
14165         * tui/tui-winsource.c (tui_erase_source_content): Constify.
14166         * tui/tui.c (tui_enable): Add cast.
14167         * utils.c (defaulted_query): Constify.
14168         (init_page_info): Add cast.
14169         (puts_debug, subset_compare): Constify.
14170         * utils.h (subset_compare): Constify.
14171         * varobj.c (varobj_format_string): Constify.
14172         * varobj.h (varobj_format_string): Constify.
14173         * vax-tdep.c (vax_register_name): Constify.
14174         * windows-nat.c (windows_detach): Constify.
14175         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14176         * xml-support.c (gdb_xml_end_element): Constify.
14177         * xml-tdesc.c (tdesc_start_reg): Constify.
14178         * xstormy16-tdep.c (xstormy16_register_name): Constify.
14179         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14180         * xtensa-tdep.h (xtensa_register_t::name): Constify.
14181
14182 2017-04-05  Pedro Alves  <palves@redhat.com>
14183
14184         * proc-api.c (struct trans): Constify.
14185         (procfs_note): Constify.
14186         * proc-events.c (struct trans, syscall_table):
14187         * proc-flags.c (struct trans): Constify.
14188         * proc-utils.h (procfs_note): Constify.
14189         * proc-why.c (struct trans): Constify.
14190         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14191         (procfs_detach): Constify.
14192         * sol-thread.c (struct string_map): Constify.
14193         (td_err_string, td_state_string): Constify.
14194
14195 2017-04-05  Pedro Alves  <palves@redhat.com>
14196
14197         * proc-api.c (procfs_filename): Don't initialize
14198         procfs_filename.
14199         (prepare_to_trace): Assume procfs_filename is non-NULL.
14200         (_initialize_proc_api): Give procfs_filename a default value here.
14201
14202 2017-04-05  Pedro Alves  <palves@redhat.com>
14203
14204         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14205         'cond_string' parameter.
14206         (extract_exception_regexp): Constify 'string' parameter.
14207         (catch_exception_command_1): Constify.
14208         * breakpoint.c (init_catchpoint)
14209         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14210         parameter.
14211         (ep_parse_optional_if_clause, catch_fork_command_1)
14212         (catch_exec_command_1): Constify.
14213         * breakpoint.h (init_catchpoint): Constify 'cond_string'
14214         parameter.
14215         (ep_parse_optional_if_clause): Constify.
14216         * cli/cli-utils.c (remove_trailing_whitespace)
14217         (check_for_argument): Constify.
14218         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14219         non-const overload.
14220         (check_for_argument): Likewise.
14221
14222 2017-04-05  Pedro Alves  <palves@redhat.com>
14223
14224         * event-top.c (command_line_handler): Add cast to execute_command
14225         call.
14226         * record-btrace.c (cmd_record_btrace_bts_start)
14227         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14228         (cmd_record_btrace_start): Add cast to execute_command call.
14229         * record-full.c (record_full_goto_insn):
14230         * record.c (record_start, record_stop): Add cast to
14231         execute_command_to_string calls.
14232         (cmd_record_start): Add cast to execute_command calls.
14233
14234 2017-04-05  Pedro Alves  <palves@redhat.com>
14235
14236         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14237         static inline function.
14238         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14239         array and use gdb_PyArg_ParseTupleAndKeywords.
14240         * python/py-cmd.c (cmdpy_init): Likewise.
14241         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14242         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14243         (infpy_search_memory): Likewise.
14244         * python/py-objfile.c (objfpy_add_separate_debug_file)
14245         (gdbpy_lookup_objfile): Likewise.
14246         * python/py-symbol.c (gdbpy_lookup_symbol)
14247         (gdbpy_lookup_global_symbol): Likewise.
14248         * python/py-type.c (gdbpy_lookup_type): Likewise.
14249         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14250         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14251         Likewise.
14252
14253 2017-04-05  Pedro Alves  <palves@redhat.com>
14254
14255         * python/python-internal.h (gdb_PyGetSetDef): New type.
14256         * python/py-block.c (block_object_getset)
14257         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14258         * python/py-event.c (event_object_getset)
14259         (finish_breakpoint_object_getset): Likewise.
14260         * python/py-inferior.c (inferior_object_getset): Likewise.
14261         * python/py-infthread.c (thread_object_getset): Likewise.
14262         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14263         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14264         * python/py-objfile.c (objfile_getset): Likewise.
14265         * python/py-progspace.c (pspace_getset): Likewise.
14266         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14267         Likewise.
14268         * python/py-record.c (recpy_record_getset): Likewise.
14269         * python/py-symbol.c (symbol_object_getset): Likewise.
14270         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14271         Likewise.
14272         * python/py-type.c (type_object_getset, field_object_getset):
14273         Likewise.
14274         * python/py-value.c (value_object_getset): Likewise.
14275
14276 2017-04-05  Pedro Alves  <palves@redhat.com>
14277
14278         * python/python-internal.h (gdb_PyObject_CallMethod)
14279         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14280         New functions.
14281         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14282         (PySys_GetObject, PySys_SetPath): New macros.
14283
14284 2017-04-05  Pedro Alves  <palves@redhat.com>
14285
14286         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14287         info_osdata_command.
14288         * osdata.c (info_osdata_command): Rename to ...
14289         (info_osdata): ... this.  Constify 'type' parameter, and remove
14290         the 'from_tty' parameter.  Accept NULL TYPE.
14291         (info_osdata_command): New function.
14292         * osdata.h (info_osdata_command): Remove declaration.
14293         (info_osdata): New declaration.
14294
14295 2017-04-05  Pedro Alves  <palves@redhat.com>
14296
14297         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14298         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14299         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14300         parameter.
14301         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14302         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14303         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14304         parameter.
14305         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14306         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14307         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14308         (mi_cmd_file_list_exec_source_files)
14309         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14310         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14311         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14312         parameter.
14313         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14314         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14315         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14316         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14317         (mi_cmd_stack_info_frame): Constify 'command' parameter.
14318         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14319         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14320         'command' parameter.
14321         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14322         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14323         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14324         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14325         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14326         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14327         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14328         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14329         (mi_cmd_var_set_update_range): Constify 'command' parameter.
14330         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14331         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14332         parameter.
14333         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14334         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14335         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14336         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14337         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14338         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14339         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14340         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14341         (mi_cmd_data_list_changed_registers)
14342         (mi_cmd_data_write_register_values)
14343         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14344         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14345         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14346         (mi_cmd_list_features, mi_cmd_list_target_features)
14347         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14348         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14349         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14350         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14351         (mi_cmd_trace_frame_collected): Constify 'command'
14352         parameter.
14353         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14354         'command' parameter.
14355
14356 2017-04-05  Pedro Alves  <palves@redhat.com>
14357
14358         * ada-lang.c (ada_completer_word_break_characters): Now a const
14359         array.
14360         (ada_get_gdb_completer_word_break_characters): Constify.
14361         * completer.c (gdb_completer_command_word_break_characters)
14362         (gdb_completer_file_name_break_characters)
14363         (gdb_completer_quote_characters): Now const arrays.
14364         (get_gdb_completer_quote_characters): Constify.
14365         (set_rl_completer_word_break_characters): New function.
14366         (set_gdb_completion_word_break_characters)
14367         (complete_line_internal): Use it.
14368         * completer.h (get_gdb_completer_quote_characters): Constify.
14369         (set_rl_completer_word_break_characters): Declare.
14370         * f-lang.c (f_word_break_characters): Constify.
14371         * language.c (default_word_break_characters): Constify.
14372         * language.h (language_defn::la_word_break_characters): Constify.
14373         (default_word_break_characters): Constify.
14374         * top.c (init_main): Use set_rl_completer_word_break_characters.
14375
14376 2017-04-05  Pedro Alves  <palves@redhat.com>
14377
14378         * aix-thread.c (aix_thread_pid_to_str)
14379         (aix_thread_extra_thread_info): Constify.
14380         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14381         * bsd-uthread.c (bsd_uthread_extra_thread_info)
14382         (bsd_uthread_pid_to_str): Constify.
14383         * corelow.c (core_pid_to_str): Constify.
14384         * darwin-nat.c (darwin_pid_to_str): Constify.
14385         * fbsd-nat.c (fbsd_pid_to_str): Constify.
14386         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14387         Constify.
14388         * gnu-nat.c (gnu_pid_to_str): Constify.
14389         * go32-nat.c (go32_pid_to_str): Constify.
14390         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14391         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14392         * inferior.c (inferior_pid_to_str): Constify.
14393         * linux-nat.c (linux_nat_pid_to_str): Constify.
14394         * linux-tdep.c (linux_core_pid_to_str): Constify.
14395         * linux-thread-db.c (thread_db_pid_to_str)
14396         (thread_db_extra_thread_info): Constify.
14397         * nto-tdep.c (nto_extra_thread_info): Constify.
14398         * nto-tdep.h (nto_extra_thread_info): Constify.
14399         * obsd-nat.c (obsd_pid_to_str): Constify.
14400         * procfs.c (procfs_pid_to_str): Constify.
14401         * ravenscar-thread.c (ravenscar_extra_thread_info)
14402         (ravenscar_pid_to_str): Constify.
14403         * remote-sim.c (gdbsim_pid_to_str): Constify.
14404         * remote.c (remote_threads_extra_info, remote_pid_to_str):
14405         Constify.
14406         * sol-thread.c (solaris_pid_to_str): Constify.
14407         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14408         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14409         * target.c (default_pid_to_str, target_pid_to_str)
14410         (normal_pid_to_str, default_pid_to_str): Constify.
14411         * target.h (target_ops::to_pid_to_str)
14412         (target_ops::to_extra_thread_info): Constify.
14413         (target_pid_to_str, normal_pid_to_str): Constify.
14414         * windows-nat.c (windows_pid_to_str): Constify.
14415         * gdbarch.sh (core_pid_to_str): Constify.
14416         * target-delegates.c: Regenerate.
14417         * gdbarch.h, gdbarch.c: Regenerate.
14418
14419 2017-04-05  Pedro Alves  <palves@redhat.com>
14420
14421         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14422         the memory of the temporary warning_pre_print override.
14423         * utils.c (warning_pre_print): Constify.
14424         * utils.h (warning_pre_print): Constify.
14425
14426 2017-04-05  Pedro Alves  <palves@redhat.com>
14427
14428         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14429         (shell_command): New function.
14430         (make_command): Use std::string.
14431         (init_cli_cmds): Register shell_command instead of shell_escape.
14432
14433 2017-04-05  Pedro Alves  <palves@redhat.com>
14434
14435         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14436         * tracepoint.c (default_collect): Don't initialize.
14437
14438 2017-04-05  Pedro Alves  <palves@redhat.com>
14439
14440         * macroexp.c (macro_buffer::shared): Now a bool.
14441         (init_buffer): Update.
14442         (init_shared_buffer): Constify 'addr' parameter.
14443         (substitute_args, expand, macro_expand, macro_expand_next): Remove
14444         casts.
14445
14446 2017-04-05  Pedro Alves  <palves@redhat.com>
14447
14448         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14449         * disasm.c (set_disassembler_options): Constify local.
14450         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14451
14452 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
14453
14454         PR gdb/21352
14455         * tracefile.c (tsave_command): Fix argument parsing for '-r'
14456         option.
14457
14458 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14459
14460         * frame.c (frame_unwind_register_unsigned): Call
14461         frame_unwind_register_value.
14462
14463 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14464
14465         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14466         Use gdb_test_multiple, and don't match anchor.
14467
14468 2017-04-05  Pedro Alves  <palves@redhat.com>
14469
14470         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14471         (Write After Approval): Remove Simon Marchi.
14472
14473 2017-04-05  Pedro Alves  <palves@redhat.com>
14474
14475         * common/gdb_optional.h (optional::optional): Make constexpr and
14476         initialize m_dummy.
14477
14478 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14479
14480         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14481         (amd64fbsd_jmp_buf_reg_offset): Remove.
14482         (amd64fbsd_supply_uthread): Remove function.
14483         (amd64fbsd_collect_uthread): Remove function.
14484         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14485         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14486         (x86_64-*-freebsd*): Remove bsd-uthread.o.
14487         (fbsd-nat.c): Update comment.
14488         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14489         (i386fbsd_jmp_buf_reg_offset): Remove.
14490         (i386fbsd_supply_uthread): Remove function.
14491         (i386fbsd_collect_uthread): Remove function.
14492         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14493
14494 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14495
14496         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14497         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14498         * NEWS: Mention that support for FreeBSD/alpha was removed.
14499         * alpha-fbsd-tdep.c: Delete file.
14500         * config/alpha/fbsd.mh: Delete file.
14501         * configure.host: Delete alpha*-*-freebsd* and
14502         alpha*-*-kfreebsd*-gnu.
14503         * configure.tgt: Delete alpha*-*-freebsd* and
14504         alpha*-*-kfreebsd*-gnu.
14505
14506 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14507
14508         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14509         amd64bsd_store_inferior_registers): Use ptid from regcache.
14510
14511 2017-04-04  Pedro Alves  <palves@redhat.com>
14512
14513         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
14514         data fields, make them private and add "m_" prefixes.
14515         (lnp_state_machine::lnp_state_machine): New ctor.
14516         (record_line, check_line_address, handle_set_discriminator)
14517         (handle_set_address, handle_advance_pc, handle_special_opcode)
14518         (handle_advance_line, handle_set_file, handle_negate_stmt)
14519         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14520         (end_sequence, advance_line): New methods.
14521         (m_gdbarch, m_record_lines_p): New fields.
14522         (lnp_reader_state): Delete.
14523         (dwarf_record_line): Rename to ...
14524         (lnp_state_machine::record_line): ... adjust.
14525         (init_lnp_state_machine): Delete.
14526         (lnp_state_machine::lnp_state_machine): New.
14527         (check_line_address): Rename to ...
14528         (lnp_state_machine::check_line_address): This.
14529         (dwarf_decode_lines_1): Remove reference to "reader_state".
14530         Adjust lnp_state_machine having a non-default ctor.  Use bool.
14531         State machine internal state manipulation moved to
14532         lnp_state_machine methods.
14533
14534 2017-04-04  Pedro Alves  <palves@redhat.com>
14535
14536         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14537         unittests/offset-type-selftests.c.
14538         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14539         * common/offset-type.h: New file.
14540         * common/preprocessor.h: New file.
14541         * common/traits.h: New file.
14542         * common/valid-expr.h: New file.
14543         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
14544         sect_offset and cu_offset strong typedefs throughout.
14545         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14546         typedefs throughout.
14547         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
14548         sect_offset and cu_offset strong typedefs throughout.
14549         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14550         typedefs throughout.
14551         * gdbtypes.h: Include "common/offset-type.h".
14552         (cu_offset): Now an offset type (strong typedef) instead of a
14553         struct.
14554         (sect_offset): Likewise.
14555         (union call_site_parameter_u): Rename "param_offset" field to
14556         "param_cu_off".
14557         * unittests/offset-type-selftests.c: New file.
14558
14559 2017-04-04  Pedro Alves  <palves@redhat.com>
14560
14561         * common/underlying.h: New file.
14562         * dwarf2read.c: Include "common/gdb_optional.h" and
14563         "common/underlying.h".
14564         (dir_index, file_name_index): New types.
14565         (file_entry): Use them.
14566         (file_entry::include): Use to_underlying.
14567         (line_header::add_file_name): Use dir_index.
14568         (read_formatted_entries): Use gdb::optional.  Read form before
14569         writting to file_entry.
14570         (dwarf_decode_line_header): Use dir_index.
14571         (lnp_state_machine::current_file): Use to_underlying.
14572         (lnp_state_machine::file): Change type to file_name_index.
14573         (dwarf_record_line): Use to_underlying.
14574         (init_lnp_state_machine): Use file_name_index.
14575         (dwarf_decode_lines_1): Use dir_index and file_name_index.
14576
14577 2017-04-04  Pedro Alves  <palves@redhat.com>
14578
14579         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14580         operator bool, has_value and get methods.
14581
14582 2017-04-04  Pedro Alves  <palves@redhat.com>
14583
14584         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14585         fields.
14586         (line_header): Initialize all data fields.  Change type of
14587         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14588         Change type of include_dirs to std::vector<const char *>.  Remove
14589         num_include_dirs, include_dirs_size.  Change type of file_names to
14590         std::vector<file_entry>.  Remove num_file_names, file_names_size.
14591         (line_header::line_header): New.
14592         (line_header::add_include_dir, line_header::add_file_name): New
14593         methods.
14594         (line_header::include_dir_at): Remove NULL check.
14595         (line_header::file_name_at): Add const overload.
14596         (line_header_up): New unique_ptr typedef.
14597         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
14598         std::vector.  Remove free_line_header call.
14599         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
14600         free_line_header call.
14601         (free_cu_line_header): Delete.
14602         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14603         (setup_type_unit_groups): Use line_header_up instead of cleanups.
14604         Adjust to use std::vector.
14605         (free_line_header): Delete.
14606         (free_line_header_voidp): Use delete.
14607         (add_include_dir): Replace with ...
14608         (line_header::add_include_dir): ... this method.  Use std::vector.
14609         (add_file_name): Replace with ...
14610         (line_header::add_file_name): ... this method.  Use std::vector.
14611         (add_include_dir_stub): Delete.
14612         (read_formatted_entries): Remove memset.
14613         (dwarf_decode_line_header): Return a line_header_up instead of a
14614         raw pointer.  Remove cleanup handling.  Pass lambdas to
14615         read_formatted_entries.  Adjust to use line_header methods.
14616         (dwarf_decode_lines_1): Adjust to use line_header methods.
14617         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14618         use std::vector.
14619
14620 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
14621
14622         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14623         instead of struct ptid.
14624
14625 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
14626
14627         * frame.c (get_frame_register_bytes): Unwind using value.
14628         (put_frame_register_bytes): Likewise.
14629
14630 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
14631
14632         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14633         aggregate-like.
14634
14635 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
14636
14637         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14638
14639 2017-03-29  Yao Qi  <yao.qi@linaro.org>
14640
14641         * gdbthread.h (struct thread_info): Declare constructor and
14642         destructor.  Add some in-class member initializers.
14643         * thread.c (free_thread): Remove.
14644         (init_thread_list): Call delete instead of free_thread.
14645         (new_thread): Call thread_info constructor.
14646         (thread_info::thread_info): New function.
14647         (thread_info::~thread_info): New function.
14648         (delete_thread_1): Call delete instead of free_thread.
14649         (make_cleanup_restore_current_thread): Move tp and frame to
14650         inner block.
14651
14652 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14653
14654         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14655         (arc_skip_prologue): Likewise.
14656         (arc_make_frame_cache): Likewise.
14657         (arc_pv_get_operand): New function.
14658         (arc_is_in_prologue): Likewise.
14659         (arc_analyze_prologue): Likewise.
14660         (arc_print_frame_cache): Likewise.
14661         (MAX_PROLOGUE_LENGTH): New constant.
14662
14663 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14664
14665         * configure.tgt: Add arc-insn.o.
14666         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14667         (dump_arc_instruction_command): New function.
14668         (arc_fprintf_disasm): Likewise.
14669         (arc_disassemble_info): Likewise.
14670         (arc_insn_get_operand_value): Likewise.
14671         (arc_insn_get_operand_value_signed): Likewise.
14672         (arc_insn_get_memory_base_reg): Likewise.
14673         (arc_insn_get_memory_offset): Likewise.
14674         (arc_insn_get_branch_target): Likewise.
14675         (arc_insn_dump): Likewise.
14676         (arc_insn_get_linear_next_pc): Likewise.
14677         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14678         (arc_disassemble_info): Likewise.
14679         (arc_insn_get_branch_target): Likewise.
14680         (arc_insn_get_linear_next_pc): Likewise.
14681         * NEWS: Mention new "maint print arc arc-instruction".
14682
14683 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14684
14685         * arc-tdep (maintenance_print_arc_list): New variable.
14686         (maintenance_print_arc_command): New function.
14687
14688 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
14689
14690         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14691         Add "limm" and "reserved".
14692         (arc_cannot_fetch_register, arc_cannot_store_register): Add
14693         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14694         * arc-tdep.h (arc_regnum): Likewise.
14695
14696 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14697
14698         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14699         for THREADPTR register.
14700         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14701         register.
14702         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14703         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14704         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14705
14706 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14707
14708         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14709         registers above gdbarch_num_regs (gdbarch) as privileged in
14710         call0 ABI.
14711
14712 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14713
14714         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14715         for a single specified register or for all registers in
14716         a0_base..a0_base + C0_NREGS range.
14717         (supply_gregset_reg): Call regcache_raw_supply for a single
14718         specified register or for all registers in a0_base..a0_base +
14719         C0_NREGS range.
14720
14721 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14722
14723         * arch/xtensa.h (C0_NREGS): Add definition.
14724         * xtensa-tdep.c (C0_NREGS): Remove definition.
14725
14726 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
14727
14728         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14729         Drop xtensa_default_isa initialization.
14730         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14731
14732 2017-03-27  Pedro Alves  <palves@redhat.com>
14733
14734         * dwarf2read.c (file_entry) <dir_index>: Add comment.
14735         (file_entry::include_dir): New method.
14736         (line_header::include_dir_at, line_header::file_name_at): New
14737         methods.
14738         (setup_type_unit_groups, setup_type_unit_groups)
14739         (psymtab_include_file_name): Simplify using the new methods.
14740         (lnp_state_machine) <the_line_header>: New field.
14741         <file>: Add comment.
14742         (lnp_state_machine::current_file): New method.
14743         (dwarf_record_line): Simplify using the new methods.
14744         (init_lnp_state_machine): Initialize the "the_line_header" field.
14745         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14746         Simplify using the new methods.
14747
14748 2017-03-27  Pedro Alves  <palves@redhat.com>
14749
14750         * cp-name-parser.y (make_empty): Delete.
14751         (demangler_special, nested_name, ptr_operator, array_indicator)
14752         (direct_declarator, declarator_1): Use fill_comp instead of
14753         make_empty.
14754
14755 2017-03-27  Pedro Alves  <palves@redhat.com>
14756
14757         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14758         to ATTRIBUTE_PRINTF.
14759         * solib-target.c (library_list_start_list): Print "string" not
14760         "version".
14761         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14762         gdb_xml_error call.
14763
14764 2017-03-27  Pedro Alves  <palves@redhat.com>
14765
14766         * dwarf2read.c (struct file_and_directory): New.
14767         (dwarf2_get_dwz_file): Adjust to use std::string.
14768         (dw2_get_file_names_reader): Adjust to use file_and_directory.
14769         (find_file_and_directory): Adjust to return a file_and_directory
14770         object.
14771         (read_file_scope): Adjust to use file_and_directory.  Remove
14772         make_cleanup/do_cleanups calls.
14773         (open_and_init_dwp_file): Adjust to use std::string.  Remove
14774         make_cleanup/do_cleanups calls.
14775         * python/python.c (do_start_initialization): Adjust to ldirname
14776         returning a std::string.
14777         * utils.c (ldirname): Now returns a std::string.
14778         * utils.h (ldirname): Change return type to std::string.
14779         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14780         returning a std::string.
14781         * xml-tdesc.c (file_read_description_xml): Likewise.
14782
14783 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
14784
14785         * regcache.c (regcache_debug_print_register): New function.
14786         * regcache.h (regcache_debug_print_register): New declaration.
14787         * target.c (debug_print_register): Remove.
14788         (target_fetch_registers): Call regcache_debug_print_register.
14789         (target_store_registers): Likewise.
14790
14791 2017-03-24  Pádraig Brady  <pbrady@fb.com>
14792
14793         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14794         reference beyond the 'lh->include_dirs' array before accessing to
14795         it.
14796         (psymtab_include_file_name): Likewise.
14797         (dwarf_decode_lines_1): Likewise.
14798         (dwarf_decode_lines): Likewise.
14799         (file_file_name): Likewise.
14800
14801 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
14802
14803         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14804         inferior_ptid.
14805         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14806         ps_lsetfpregs): Likewise.
14807         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14808         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14809         ps_lsetfpregs): Likewise.
14810         * target.c (target_fetch_registers, target_store_registers):
14811         Remove asserts.
14812
14813 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
14814
14815         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14816
14817 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14818
14819         * aarch64-tdep.c (aarch64_process_record_test): Declare.
14820         (_initialize_aarch64_tdep): Register it.
14821         (aarch64_record_load_store): Handle PRFM instruction.
14822         (aarch64_process_record_test): New function.
14823
14824 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14825
14826         * aarch64-tdep.c (aarch64_record_load_store): Fix code
14827         indentation.
14828
14829 2017-03-23  Yao Qi  <yao.qi@linaro.org>
14830
14831         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14832
14833 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14834
14835         python/python.c (do_start_initialization): Fix memory leak.
14836
14837 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
14838
14839         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14840         using get_ptrace_pid.
14841         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14842         inferior_ptid.
14843         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14844         inferior_ptid instead of pid.
14845
14846 2017-03-22  Yao Qi  <yao.qi@linaro.org>
14847
14848         * aarch64-tdep.c: Wrap locally used classes in anonymous
14849         namespace.
14850         * arm-tdep.c: Likewise.
14851         * linespec.c: Likewise.
14852         * ui-out.c: Likewise.
14853
14854 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
14855
14856         PR gdb/19637
14857         * python/lib/gdb/printer/bound_registers.py: Import sys.
14858
14859 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14860
14861         * windows-nat.c (do_windows_fetch_inferior_registers): Add
14862         windows_thread_info parameter and use it instead of
14863         current_thread.
14864         (windows_fetch_inferior_registers): Don't set current_thread,
14865         pass the thread to do_windows_fetch_inferior_registers.  Use
14866         ptid from regcache instead of inferior_ptid.
14867         (do_windows_store_inferior_registers): Add windows_thread_info
14868         parameter and use it instead of current_thread.
14869         (windows_store_inferior_registers): Don't set current_thread,
14870         pass the thread to do_windows_store_inferior_registers.  Use
14871         ptid from regcache instead of inferior_ptid.
14872
14873 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
14874
14875         * ser-mingw.c (ser_windows_raw): Remove reference to
14876         struct serial::current_timeout.
14877
14878 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
14879
14880         PR tdep/20928
14881         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14882         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14883         (sparc64_fsr_type): Fix %fsr decoding.
14884
14885 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
14886
14887         * python/py-record-btrace.c (btpy_insn_data): Change return type
14888         for Python 2.
14889
14890 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14891
14892         * spu-linux-nat.c (spu_fetch_inferior_registers,
14893         spu_store_inferior_registers): Use ptid from regcache, set and
14894         restore inferior_ptid.
14895         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14896         Likewise.
14897
14898 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
14899
14900         * i386-linux-nat.c (fetch_register, store_register,
14901         i386_linux_fetch_inferior_registers,
14902         i386_linux_store_inferior_registers): Use ptid from regcache.
14903         * ia64-linux-nat.c (ia64_linux_fetch_register,
14904         ia64_linux_store_register): Likewise.
14905         * inf-ptrace.c (inf_ptrace_fetch_register,
14906         inf_ptrace_store_register): Likewise.
14907         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14908         m32r_linux_store_inferior_registers): Likewise.
14909         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14910         m68kbsd_store_inferior_registers): Likewise.
14911         * m68k-linux-nat.c (fetch_register, store_register,
14912         m68k_linux_fetch_inferior_registers,
14913         m68k_linux_store_inferior_registers): Likewise.
14914         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14915         m88kbsd_store_inferior_registers): Likewise.
14916         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14917         mips_fbsd_store_inferior_registers): Likewise.
14918         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14919         mips64_linux_regsets_store_registers): Likewise.
14920         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14921         mipsnbsd_store_inferior_registers): Likewise.
14922         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14923         mips64obsd_store_inferior_registers): Likewise.
14924         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14925         Likewise.
14926         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14927         ppcfbsd_store_inferior_registers): Likewise.
14928         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14929         ppc_linux_store_inferior_registers): Likewise.
14930         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14931         ppcnbsd_store_inferior_registers): Likewise.
14932         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14933         ppcobsd_store_registers): Likewise.
14934         * procfs.c (procfs_fetch_registers, procfs_store_registers):
14935         Likewise.
14936         * ravenscar-thread.c (ravenscar_fetch_registers,
14937         ravenscar_store_registers, ravenscar_prepare_to_store):
14938         Likewise.
14939         * record-btrace.c (record_btrace_fetch_registers,
14940         record_btrace_store_registers, record_btrace_prepare_to_store):
14941         Likewise.
14942         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14943         Lookup inferior using ptid from regcache, instead of
14944         current_inferior.
14945         * remote.c (remote_fetch_registers, remote_store_registers): Use
14946         ptid from regcache.
14947         * rs6000-nat.c (fetch_register, store_register): Likewise.
14948         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14949         s390_linux_store_inferior_registers): Likewise.
14950         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14951         shnbsd_store_inferior_registers): Likewise.
14952         * sol-thread.c (sol_thread_fetch_registers,
14953         sol_thread_store_registers): Likewise.
14954         * sparc-nat.c (sparc_fetch_inferior_registers,
14955         sparc_store_inferior_registers): Likewise.
14956         * tilegx-linux-nat.c (fetch_inferior_registers,
14957         store_inferior_registers): Likewise.
14958         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14959         vaxbsd_store_inferior_registers): Likewise.
14960         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14961         store_xtregs): Likewise.
14962
14963 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14964
14965         PR gdb/14441
14966         * NEWS: Mention support for rvalue references in GDB and python.
14967         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14968         supports both lvalue and rvalue references.
14969
14970 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14971
14972         PR gdb/14441
14973         * gdbtypes.c (rank_one_type): Implement overloading
14974         resolution rules regarding rvalue references.
14975
14976 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
14977
14978         PR gdb/14441
14979         * aarch64-tdep.c (aarch64_type_align)
14980         (aarch64_extract_return_value, aarch64_store_return_value): Change
14981         lvalue reference type checks to general reference type checks.
14982         * amd64-tdep.c (amd64_classify): Likewise.
14983         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14984         Likewise.
14985         * arm-tdep.c (arm_type_align, arm_extract_return_value)
14986         (arm_store_return_value): Likewise.
14987         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14988         * c-typeprint.c (c_print_type): Likewise.
14989         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14990         (cplus_number_of_children, cplus_describe_child): Likewise.
14991         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14992         * completer.c (expression_completer): Likewise.
14993         * cp-support.c (make_symbol_overload_list_adl_namespace):
14994         Likewise.
14995         * darwin-nat-info.c (info_mach_region_command): Likewise.
14996         * dwarf2loc.c (entry_data_value_coerce_ref)
14997         (value_of_dwarf_reg_entry): Likewise.
14998         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14999         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15000         Likewise.
15001         * findvar.c (extract_typed_address, store_typed_address):
15002         Likewise.
15003         * gdbtypes.c (rank_one_type): Likewise.
15004         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15005         * infcall.c (value_arg_coerce): Likewise.
15006         * language.c (pointer_type): Likewise.
15007         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15008         Likewise.
15009         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15010         * mn10300-tdep.c (mn10300_type_align): Likewise.
15011         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15012         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15013         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15014         Likewise.
15015         * printcmd.c (print_formatted, x_command): Likewise.
15016         * python/py-type.c (typy_get_composite, typy_template_argument):
15017         Likewise.
15018         * python/py-value.c (valpy_referenced_value)
15019         (valpy_get_dynamic_type, value_has_field): Likewise.
15020         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15021         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15022         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15023         * spu-tdep.c (spu_scalar_value_p): Likewise.
15024         * symtab.c (lookup_symbol_aux): Likewise.
15025         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15026         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15027         Likewise.
15028         * valops.c (value_cast_pointers, value_cast)
15029         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15030         (value_struct_elt, value_struct_elt_bitpos)
15031         (value_find_oload_method_list, find_overload_match)
15032         (value_rtti_indirect_type): Likewise.
15033         * valprint.c (val_print_scalar_type_p, generic_val_print):
15034         Likewise.
15035         * value.c (value_actual_type, value_as_address, unpack_long)
15036         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15037         (coerce_ref): Likewise.
15038         * varobj.c (varobj_get_value_type): Likewise.
15039
15040 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15041
15042         PR gdb/14441
15043         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15044         table of constants.
15045         * python/lib/gdb/command/explore.py: Support exploring values
15046         of rvalue reference types.
15047         * python/lib/gdb/types.py: Implement get_basic_type() for
15048         rvalue reference types.
15049         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15050         constant.
15051         * python/py-value.c (valpy_getitem): Add an rvalue reference
15052         check.
15053         (valpy_reference_value): Add new parameter "refcode".
15054         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15055         New wrappers for valpy_reference_value().
15056         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15057         (gdbpy_invoke_xmethod): Likewise.
15058
15059 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15060
15061         PR gdb/14441
15062         * dwarf2read.c (process_die, read_type_die_1): Handle the
15063         DW_TAG_rvalue_reference_type DIE.
15064         (read_tag_reference_type): Add new parameter "refcode".
15065
15066 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15067
15068         PR gdb/14441
15069         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15070         (c_type_print_modifier, c_type_print_varspec_suffix)
15071         (c_type_print_base): Support printing rvalue reference types.
15072         * c-valprint.c (c_val_print, c_value_print): Support printing
15073         rvalue reference values.
15074
15075 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15076
15077         PR gdb/14441
15078         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15079         typename.
15080         * cp-support.c (replace_typedefs): Handle
15081         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15082         * python/py-type.c (typy_lookup_type): Likewise.
15083
15084 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15085
15086         PR gdb/14441
15087         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15088         * parse.c (insert_type): Change assert statement.
15089         (follow_types): Handle rvalue reference types.
15090         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15091         constant.
15092
15093 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15094
15095         PR gdb/14441
15096         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15097         value_ref() interface.
15098         * c-valprint.c (c_value_print): Likewise.
15099         * infcall.c (value_arg_coerce): Likewise.
15100         * python/py-value.c (valpy_reference_value): Likewise.
15101         * valops.c (value_cast, value_reinterpret_cast)
15102         (value_dynamic_cast, typecmp): Likewise.
15103         (value_ref): Parameterize by kind of return value reference type.
15104         * value.h (value_ref): Add new parameter "refcode".
15105
15106 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15107
15108         PR gdb/14441
15109         * dwarf2read.c (read_tag_reference_type): Use
15110         lookup_lvalue_reference_type() instead of lookup_reference_type().
15111         * eval.c (evaluate_subexp_standard): Likewise.
15112         * f-exp.y: Likewise.
15113         * gdbtypes.c (make_reference_type, lookup_reference_type):
15114         Generalize with rvalue reference types.
15115         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15116         convenience wrappers for lookup_reference_type().
15117         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15118         reference kind parameter.
15119         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15120         wrappers for lookup_reference_type().
15121         * guile/scm-type.c (gdbscm_type_reference): Use
15122         lookup_lvalue_reference_type() instead of lookup_reference_type().
15123         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15124         * parse.c (follow_types): Likewise.
15125         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15126         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15127         Likewise.
15128         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15129         (gdbpy_invoke_xmethod): Likewise.
15130         * stabsread.c: Provide extra argument to make_reference_type()
15131         call.
15132         * valops.c (value_ref, value_rtti_indirect_type): Use
15133         lookup_lvalue_reference_type() instead of lookup_reference_type().
15134
15135 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15136
15137         PR gdb/14441
15138         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15139         (TYPE_IS_REFERENCE): New macro.
15140         (struct type): Add rvalue_reference_type field.
15141         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15142
15143 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15144
15145         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15146         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15147         New function definition.
15148         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15149         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15150         New function declaration.
15151         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15152         * mi/mi-interp.h: New file.
15153         * solib.c (info_sharedlibrary_command): Replace for loop with
15154         ALL_SO_LIBS macro
15155         * solib.h (update_solib_list): New function declaration.
15156         (so_list_head): Move macro.
15157         * solist.h (ALL_SO_LIBS): New macro.
15158
15159 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15160
15161         * infcmd.c (post_create_inferior): Remove unused argument in
15162         call to solib_add.
15163         * remote.c (remote_start_remote): Likewise.
15164         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15165         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15166         (enable_break): Likewise.
15167         * solib.c (update_solib_list): Remove unused target argument
15168         and its documentation.
15169         (solib_add): Remove unused target argument.  Remove unused
15170         argument in call to update_solib_list.
15171         (info_sharedlibrary_command): Remove unused argument in call
15172         to update_solib_list.
15173         (sharedlibrary_command): Remove unused argument in call to
15174         solib_add.
15175         (handle_solib_event): Likewise.
15176         (reload_shared_libraries): Likewise.
15177         * solib.h (solib_add): Remove unused target argument.
15178
15179 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15180
15181         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15182         (s390_displaced_step_fixup): Cover relative branches with the
15183         default fixup handling.  This fixes lack of support for some
15184         relative branch instructions.
15185
15186 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15187
15188         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15189         ptid from regcache.
15190
15191 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15192
15193         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15194         i386_darwin_store_inferior_registers): Use ptid from regcache.
15195
15196 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15197
15198         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15199         i386bsd_store_inferior_registers): Use ptid from regcache.
15200
15201 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15202
15203         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15204         hppaobsd_store_registers): Use ptid from regcache.
15205
15206 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15207
15208         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15209         hppanbsd_store_registers): Use ptid from regcache.
15210
15211 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15212
15213         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15214         from regcache.  Use get_ptrace_pid.
15215
15216 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15217
15218         * corelow.c (get_core_register_section): Use ptid from regcache,
15219         update doc.
15220
15221 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15222
15223         * bsd-uthread.c (bsd_uthread_fetch_registers,
15224         bsd_uthread_store_registers): Use ptid from regcache, set and
15225         restore inferior_ptid.
15226
15227 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15228
15229         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15230         fetch_fp_regs, store_register, store_regs, store_fp_register,
15231         store_fp_regs): Use ptid from regcache.
15232
15233 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15234
15235         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15236         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15237         store_vfp_regs): Use ptid from regcache.
15238
15239 2017-03-17  Pedro Alves  <palves@redhat.com>
15240
15241         PR remote/21188
15242         * ser-base.c (ser_base_wait_for): Add comment.
15243         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15244         version.
15245         * ser-unix.c (hardwire_raw): Remove reference to
15246         scb->current_timeout.
15247         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15248         (hardwire_ops): Install ser_base_readchar instead of
15249         hardwire_readchar.
15250         * serial.h (struct serial) <current_timeout, timeout_remaining>:
15251         Remove fields.
15252
15253 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
15254
15255         PR gdb/19637
15256         * python/lib/gdb/printer/bound_registers.py: Add support for
15257         Python 3.
15258
15259 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15260
15261         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15262         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15263         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15264         byte_offset to subobj_byte_offset.  Fix the handling of
15265         DWARF_VALUE_STACK on big-endian targets when coming via an
15266         implicit pointer.
15267         (dwarf2_evaluate_loc_desc): Adjust call to
15268         dwarf2_evaluate_loc_desc_full.
15269         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15270         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15271
15272 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15273
15274         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15275         and REVSH instructions.
15276
15277 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15278
15279         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15280         (arm_record_test): Declare.
15281         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15282         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15283         align with the manual.
15284         (thumb_record_misc): Adjust the code order to align with the
15285         manual.
15286         (thumb2_record_decode_insn_handler): Fix instruction matching.
15287         (instruction_reader_thumb): New class.
15288         (arm_record_test): New function.
15289
15290 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15291
15292         * arm-tdep.c (abstract_memory_reader): New class.
15293         (instruction_reader): New class.
15294         (extract_arm_insn): Add argument 'reader'.  Callers updated.
15295         (decode_insn): Likewise.
15296
15297 2017-03-16  Doug Evans  <dje@google.com>
15298
15299         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15300         member.  Change type of TYPE member to SCM.  All uses updated.
15301         (lsscm_make_lazy_string_smob): Add assert.
15302         (lsscm_make_lazy_string): Flag bad length values.
15303         (lsscm_elt_type): New function.
15304         (gdbscm_lazy_string_to_value): Rewrite to use
15305         lsscm_safe_lazy_string_to_value.
15306         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15307         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15308         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
15309         in incoming type.
15310         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15311         * guile/scm-type.c (tyscm_scm_to_type): New function.
15312
15313 2017-03-15  Doug Evans  <dje@google.com>
15314
15315         PR python/17728, python/18439, python/18779
15316         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15317         member.  Change type of TYPE member to PyObject *.  All uses updated.
15318         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15319         (gdbpy_create_lazy_string_object): Flag bad length values.
15320         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15321         Handle typedefs in incoming type.
15322         (stpy_lazy_string_elt_type): New function.
15323         (gdbpy_extract_lazy_string): Call it.
15324         * python/py-value.c (valpy_lazy_string): Flag bad length values.
15325         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
15326         typedefs in incoming type.
15327
15328 2017-03-16  Doug Evans  <dje@google.com>
15329
15330         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15331         * guile/scm-type.c (tyscm_scm_to_type): New function.
15332
15333 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
15334
15335         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15336         "ULONGEST" for "skip".
15337
15338 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15339
15340         PR gdb/21220
15341         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15342         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15343         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
15344         over ptrace peek/poke until end of buffer or error.
15345
15346 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
15347
15348         * parse.c (length_of_subexp): Make static.
15349         * parser-defs.h (length_of_subexp): Remove.
15350
15351 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15352
15353         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15354         as well.
15355
15356 2017-03-14  Pedro Alves  <palves@redhat.com>
15357
15358         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15359         (main): Use std::unique_ptr.  Remove calls to
15360         cp_demangled_name_parse_free.
15361
15362 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15363
15364         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15365         alphabsd_store_inferior_registers): Use regcache->ptid instead
15366         of inferior_ptid.
15367
15368 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15369
15370         * aix-thread.c (aix_thread_fetch_registers,
15371         aix_thread_store_registers): Use regcache->ptid instead of
15372         inferior_ptid.
15373
15374 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15375
15376         * aarch64-linux-nat.c (fetch_gregs_from_thread,
15377         store_gregs_to_thread, fetch_fpregs_from_thread,
15378         store_fpregs_to_thread): Use regcache->ptid instead of
15379         inferior_ptid.
15380
15381 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15382
15383         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15384         amd64_linux_fetch_inferior_registers): Use regcache->ptid
15385         instead of inferior_ptid.
15386
15387 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15388
15389         * target.c (target_fetch_registers, target_store_registers): Add
15390         assert.
15391
15392 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15393
15394         * regcache.h (regcache_get_ptid): New function.
15395         * regcache.c (regcache_get_ptid): New function.
15396
15397 2017-03-13  Mark Wielaard  <mark@klomp.org>
15398
15399         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15400
15401 2017-03-10  Keith Seitz  <keiths@redhat.com>
15402
15403         PR c++/8218
15404         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15405
15406 2017-03-08  Pedro Alves  <palves@redhat.com>
15407
15408         PR gdb/18360
15409         * infrun.c (start_step_over, do_target_resume, resume)
15410         (restart_threads): Assert we're not resuming a thread that is
15411         meant to be stopped.
15412         (infrun_thread_stop_requested_callback): Delete.
15413         (infrun_thread_stop_requested): If the thread is internally
15414         stopped, queue a pending stop event and clear the thread's
15415         inline-frame state.
15416         (handle_stop_requested): New function.
15417         (handle_syscall_event, handle_inferior_event_1): Use
15418         handle_stop_requested.
15419         (handle_stop_requested): New function.
15420         (handle_signal_stop): Set the thread's stop_signal here instead of
15421         at caller.
15422         (finish_step_over): Clear step over info unconditionally.
15423         (handle_signal_stop): If the user had interrupted the event
15424         thread, consider the stop a random signal.
15425         (handle_signal_stop) <signal arrived while stepping over
15426         breakpoint>: Don't restart threads here.
15427         (stop_waiting): Don't clear step-over info here.
15428
15429 2017-03-08  Pedro Alves  <palves@redhat.com>
15430
15431         PR 21206
15432         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15433         goes to argument 2, not 1.
15434
15435 2017-03-08  Pedro Alves  <palves@redhat.com>
15436
15437         PR cli/21218
15438         * top.c (gdb_readline_wrapper): Avoid passing NULL to
15439         display_gdb_prompt.
15440         (command_line_input): Add comment.
15441
15442 2017-03-08  Pedro Alves  <palves@redhat.com>
15443
15444         PR tui/21216
15445         * tui/tui-file.c (tui_file::write): New.
15446         * tui/tui-file.h (tui_file): Override "write".
15447         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15448         factored out from ...
15449         (tui_puts): ... here.
15450         (tui_putc): Use them.
15451         (tui_write): New function.
15452         * tui/tui-io.h (tui_write): Declare.
15453
15454 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
15455
15456         * Makefile.in (SFILES): Replace "environ.c" with
15457         "common/environ.c".
15458         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15459         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
15460         to...
15461         * common/environ.c: ... here.
15462         * environ.h: Moved to...
15463         * common/environ.h: ... here.
15464
15465 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15466
15467         * gdbarch.sh (pstring_ptr): New static function.
15468         (gdbarch_disassembler_options): Use it.
15469         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15470         not valid_disassembler_option->name.
15471         * gdbarch.c: Regenerate.
15472
15473 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15474
15475         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15476
15477 2017-03-07  Pedro Alves  <palves@redhat.com>
15478
15479         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15480
15481 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15482
15483         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15484         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15485         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15486         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15487
15488 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
15489
15490         * xtensa-linux-nat.c (fetch_gregs): Remove const.
15491
15492 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
15493
15494         * remote.c (remote_add_target_side_commands): Use range-based
15495         for loop.
15496
15497 2017-03-03  Yao Qi  <yao.qi@linaro.org>
15498
15499         PR gdb/21165
15500         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15501         value is lazy.
15502         * valprint.c (common_val_print): Likewise.
15503
15504 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
15505
15506         * NEWS: Mention new set/show disassembler-options commands.
15507         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15508         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15509         (prospective_options): New static variable.
15510         (gdb_disassembler::gdb_disassembler): Initialize
15511         m_di.disassembler_options.
15512         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15513         (get_disassembler_options): New function.
15514         (set_disassembler_options): Likewise.
15515         (set_disassembler_options_sfunc): Likewise.
15516         (show_disassembler_options_sfunc): Likewise.
15517         (disassembler_options_completer): Likewise.
15518         (_initialize_disasm): Likewise.
15519         * disasm.h (get_disassembler_options): New prototype.
15520         (set_disassembler_options): Likewise.
15521         * gdbarch.sh (gdbarch_disassembler_options): New variable.
15522         (gdbarch_verify_disassembler_options): Likewise.
15523         * gdbarch.c: Regenerate.
15524         * gdbarch.h: Likewise.
15525         * arm-tdep.c (num_disassembly_options): Delete.
15526         (set_disassembly_style): Likewise.
15527         (arm_disassembler_options): New static variable.
15528         (set_disassembly_style_sfunc): Convert short style name into long
15529         option name.  Call set_disassembler_options.
15530         (show_disassembly_style_sfunc): New function.
15531         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15532         set_gdbarch_verify_disassembler_options.
15533         (_initialize_arm_tdep): Delete regnames variable and update callers.
15534         (arm_disassembler_options): Initialize.
15535         (disasm_options): New variable.
15536         (num_disassembly_options): Rename from this...
15537         (num_disassembly_styles): ...to this.  Compute by scanning through
15538         disasm_options.
15539         (valid_disassembly_styles): Initialize using disasm_options.
15540         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15541         set_arm_regname_option.
15542         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15543         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15544         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15545         set_gdbarch_verify_disassembler_options.
15546         * s390-tdep.c (s390_disassembler_options): New static variable.
15547         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15548         set_gdbarch_verify_disassembler_options.
15549
15550 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15551
15552         * remote.c (remote_add_target_side_condition): Remove "struct"
15553         keyword from range-based for loop.
15554
15555 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
15556
15557         * remote.c (remote_add_target_side_condition): Use range-based
15558         for loop.  Update comment.
15559
15560 2017-02-27  Yao Qi  <yao.qi@linaro.org>
15561
15562         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15563
15564 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
15565
15566         * regcache.c (regcache_raw_update): New function.
15567         (regcache_raw_read): Move code to regcache_raw_update.
15568         * regcache.h (regcache_raw_update): New declaration.
15569         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15570
15571 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
15572
15573         * dwarf2read.c (create_debug_type_hash_table): Initialize
15574         header.signature and header.type_offset_in_tu.
15575
15576 2017-02-24  Pedro Alves  <palves@redhat.com>
15577
15578         * symtab.c (make_file_symbol_completion_list_1): Use
15579         add_symtab_completions.
15580
15581 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15582
15583         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15584
15585 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
15586
15587         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15588         I386_MAX_REGISTER_SIZE.
15589         (i386_pseudo_register_write): Likewise.
15590         (i386_process_record): Likewise.
15591         * i387-tdep.c (i387_supply_xsave): Likewise.
15592         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15593         (store_register): Likewise.
15594
15595 2017-02-23  Pedro Alves  <palves@redhat.com>
15596
15597         * ada-lang.c: Include "common/function-view.h".
15598         (ada_iterate_over_symbols): Adjust to use function_view as
15599         callback type.
15600         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15601         (ada_make_symbol_completion_list): Use a lambda.
15602         (ada_exc_search_name_matches): Delete.
15603         (name_matches_regex): New.
15604         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15605         * compile/compile-c-support.c: Include "common/function-view.h".
15606         (print_one_macro): Change prototype to accept a ui_file pointer.
15607         (write_macro_definitions): Use a lambda.
15608         * dwarf2read.c: Include "common/function-view.h".
15609         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15610         (dw2_expand_symtabs_matching): Adjust to use function_view as
15611         callback type.
15612         * language.h: Include "common/function-view.h".
15613         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15614         function_view as callback type.
15615         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15616         * linespec.c: Include "common/function-view.h".
15617         (collect_info::add_symbol): New method.
15618         (struct symbol_and_data_callback, iterate_inline_only, struct
15619         symbol_matcher_data, iterate_name_matcher): Delete.
15620         (iterate_over_all_matching_symtabs): Adjust to use function_view
15621         as callback type and lambdas.
15622         (iterate_over_file_blocks): Adjust to use function_view as
15623         callback type.
15624         (decode_compound_collector): Now a class with private fields.
15625         (decode_compound_collector::release_symbols): New method.
15626         (collect_one_symbol): Rename to...
15627         (decode_compound_collector::operator()): ... this and adjust.
15628         (lookup_prefix_sym): decode_compound_collector construction bits
15629         move to decode_compound_collector ctor.  Pass the
15630         decode_compound_collector object directly as callback.  Remove
15631         cleanups and use decode_compound_collector::release_symbols
15632         instead.
15633         (symtab_collector): Now a class with private fields.
15634         (symtab_collector::release_symtabs): New method.
15635         (add_symtabs_to_list): Rename to...
15636         (symtab_collector::operator()): ... this and adjust.
15637         (collect_symtabs_from_filename): symtab_collector construction
15638         bits move to symtab_collector ctor.  Pass the symtab_collector
15639         object directly as callback.  Remove cleanups and use
15640         symtab_collector::release_symtabs instead.
15641         (collect_symbols): Delete.
15642         (add_matching_symbols_to_info): Use lambdas.
15643         * macrocmd.c (print_macro_callback): Delete.
15644         (info_macro_command): Use a lambda.
15645         (info_macros_command): Pass print_macro_definition as callable
15646         directly.
15647         (print_one_macro): Remove 'ignore' parameter.
15648         (macro_list_command): Adjust.
15649         * macrotab.c (macro_for_each_data::fn): Now a function_view.
15650         (macro_for_each_data::user_data): Delete field.
15651         (foreach_macro): Adjust to call the function_view.
15652         (macro_for_each): Adjust to use function_view as callback type.
15653         (foreach_macro_in_scope): Adjust to call the function_view.
15654         (macro_for_each_in_scope): Adjust to use function_view as callback
15655         type.
15656         * macrotab.h: Include "common/function-view.h".
15657         (macro_callback_fn): Declare a prototype instead of a pointer.
15658         Remove "user_data" parameter.
15659         (macro_for_each, macro_for_each_in_scope): Adjust to use
15660         function_view as callback type.
15661         * psymtab.c (partial_map_expand_apply)
15662         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15663         Adjust to use function_view as callback type and to return bool.
15664         (psym_expand_symtabs_matching): Adjust to use function_view as
15665         callback types.
15666         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15667         to use function_view as callback type and to return bool.
15668         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15669         callback types.
15670         * symfile.c (expand_symtabs_matching): Adjust to use function_view
15671         as callback types.
15672         * symfile.h: Include "common/function-view.h".
15673         (expand_symtabs_file_matcher_ftype)
15674         (expand_symtabs_symbol_matcher_ftype)
15675         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15676         return bool.
15677         (quick_symbol_functions::map_symtabs_matching_filename)
15678         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15679         function_view as callback type and return bool.
15680         (expand_symtabs_matching): Adjust to use function_view as callback
15681         type.
15682         (maintenance_expand_name_matcher)
15683         (maintenance_expand_file_matcher): Delete.
15684         (maintenance_expand_symtabs): Use lambdas.
15685         * symtab.c (iterate_over_some_symtabs): Adjust to use
15686         function_view as callback types and return bool.
15687         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
15688         of a cleanup.
15689         (lookup_symtab_callback): Delete.
15690         (lookup_symtab): Use a lambda.
15691         (iterate_over_symbols): Adjust to use function_view as callback
15692         type.
15693         (struct search_symbols_data, search_symbols_file_matches)
15694         (search_symbols_name_matches): Delete.
15695         (search_symbols): Use a pair of lambdas.
15696         (struct add_name_data, add_macro_name, symbol_completion_matcher)
15697         (symtab_expansion_callback): Delete.
15698         (default_make_symbol_completion_list_break_on_1): Use lambdas.
15699         * symtab.h: Include "common/function-view.h".
15700         (iterate_over_some_symtabs): Adjust to use function_view as
15701         callback type and return bool.
15702         (iterate_over_symtabs): Adjust to use function_view as callback
15703         type.
15704         (symbol_found_callback_ftype): Remove 'data' parameter and return
15705         bool.
15706         (iterate_over_symbols): Adjust to use function_view as callback
15707         type.
15708
15709 2017-02-23  Pedro Alves  <palves@redhat.com>
15710
15711         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15712         (%.o) <unittests/%.c>: New pattern.
15713         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15714         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15715         * common/function-view.h: New file.
15716         * unittests/function-view-selftests.c: New file.
15717         * configure: Regenerate.
15718
15719 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
15720
15721         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15722         inferior_ptid.
15723         * go32-nat.c (go32_thread_alive): Likewise.
15724
15725 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15726
15727         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15728         delete.
15729
15730 2017-02-23  Yao Qi  <yao.qi@linaro.org>
15731
15732         * varobj.c (varobj_clear_saved_item): Use delete instead of
15733         xfree.
15734         (update_dynamic_varobj_children): Likewise.
15735
15736 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15737
15738         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15739
15740 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
15741
15742         * common/enum-flags.h (enum_flags::enum_flags): Initialize
15743         m_enum_value to 0 in default constructor.
15744
15745 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
15746
15747         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15748         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15749         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15750         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15751         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15752         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15753         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15754         IS_STORE_CONDITIONAL_INSN.
15755
15756 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
15757
15758         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15759
15760 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15761
15762         * NEWS (Changes since GDB 7.12): Add DWARF-5.
15763
15764 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15765
15766         * dwarf2read.c (skip_one_die, read_attribute_value)
15767         (dwarf2_const_value_attr, dump_die_shallow)
15768         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15769         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15770
15771 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15772
15773         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15774         (dwarf_parse_macro_header): Accept DWARF version 5.
15775         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15776
15777 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15778
15779         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15780         DW_AT_GNU_*.
15781         * common/common-exceptions.h (enum errors): Likewise.
15782         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15783         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15784         (dwarf_expr_context::execute_stack_op): Likewise.
15785         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15786         Likewise.
15787         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15788         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15789         (show_entry_values_debug, call_site_to_target_addr)
15790         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15791         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15792         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15793         (value_of_dwarf_block_entry, indirect_pieced_value)
15794         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15795         (disassemble_dwarf_expression): Likewise.
15796         * dwarf2read.c (process_die, inherit_abstract_dies)
15797         (read_call_site_scope): Likewise.
15798         * gdbtypes.h (struct func_type, struct call_site_parameter)
15799         (struct call_site): Likewise.
15800         * stack.c (read_frame_arg): Likewise.
15801         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15802
15803 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15804
15805         * defs.h (read_unsigned_leb128): New declaration.
15806         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15807         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15808         (dwarf2_find_location_expression): Call also
15809         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
15810         * dwarf2loc.h (dwarf2_version): New declaration.
15811         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15812         rnglists.
15813         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15814         .debug_rnglists.
15815         (struct dwop_section_names): Add loclists_dwo.
15816         (dwop_section_names): Add .debug_loclists.dwo.
15817         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15818         (struct dwarf2_per_cu_data): Add dwarf_version.
15819         (struct dwo_sections): Add loclists.
15820         (struct attr_abbrev): Add implicit_const.
15821         (read_indirect_line_string): New declaration.
15822         (read_unsigned_leb128): Delete declaration.
15823         (rcuh_kind): New definition.
15824         (read_and_check_comp_unit_head): Change parameter
15825         is_debug_types_section to section_kind.
15826         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15827         (read_comp_unit_head): Change parameter abfd to section, add parameter
15828         section_kind.  Handle DWARF-5.
15829         (error_check_comp_unit_head): Accept also DWARF version 5.
15830         (read_and_check_comp_unit_head): Change parameter
15831         is_debug_types_section to section_kind.
15832         (read_and_check_type_unit_head): Delete function.
15833         (read_abbrev_offset): Handle DWARF-5.
15834         (create_debug_type_hash_table): Add parameter section_kind.  Process
15835         only DW_UT_type.  Use signature and type_offset_in_tu from struct
15836         comp_unit_head.
15837         (create_debug_types_hash_table): Update create_debug_type_hash_table
15838         caller.
15839         (create_all_type_units): Call create_debug_type_hash_table.
15840         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15841         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15842         caller.
15843         (skip_one_die): Handle DW_FORM_implicit_const.
15844         (dwarf2_rnglists_process): New function.
15845         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15846         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15847         (read_attribute_value): Handle DW_FORM_implicit_const,
15848         DW_FORM_line_strp.
15849         (read_attribute): Handle DW_FORM_implicit_const.
15850         (read_indirect_string_at_offset_from): New function from
15851         read_indirect_string_at_offset.
15852         (read_indirect_string_at_offset): Call
15853         read_indirect_string_at_offset_from.
15854         (read_indirect_line_string_at_offset): New function.
15855         (read_indirect_string): New function comment.
15856         (read_indirect_line_string): New function.
15857         (read_unsigned_leb128): Make it global.
15858         (dwarf2_string_attr): Handle DWARF-5.
15859         (add_include_dir_stub, read_formatted_entries): New functions.
15860         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15861         Handle DWARF-5.
15862         (per_cu_header_read_in): Update read_comp_unit_head caller.
15863         (dwarf2_version): New function.
15864         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15865         rnglists.
15866         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15867         fields.
15868
15869 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15870
15871         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15872
15873 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15874
15875         * dwarf2read.c (dwarf2_ranges_process): New function from
15876         dwarf2_ranges_read.
15877         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15878         dwarf2_ranges_process.
15879
15880 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15881
15882         * dwarf2read.c (create_debug_type_hash_table): New function from
15883         create_debug_types_hash_table.
15884         (create_debug_types_hash_table): Call create_debug_type_hash_table.
15885         (create_all_type_units, open_and_init_dwo_file): Update
15886         create_debug_types_hash_table callers.
15887
15888 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15889
15890         PR gdb/16188
15891         * fork-child.c (trace_start_error): Fix thinko.  va_end should
15892         refer to 'ap', not 'args'.
15893
15894 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
15895             Pedro Alves  <palves@redhat.com>
15896
15897         PR gdb/16188
15898         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15899         calls succeeded.
15900         * fork-child.c (trace_start_error): New function.
15901         (trace_start_error_with_name): Likewise.
15902         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15903         * inf-ptrace.c (inf_ptrace_me): Likewise.
15904         * inferior.h (trace_start_error): New prototype.
15905         (trace_start_error_with_name): Likewise.
15906
15907 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
15908
15909         PR gdb/21164
15910         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15911         NULL before using it.
15912         * symmisc.c (maintenance_print_symbols): Likewise.
15913         (maintenance_print_msymbols): Likewise.
15914
15915 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15916
15917         * NEWS: Add record Python bindings entry.
15918
15919 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15920
15921         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15922         py-record-full.o.
15923         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15924         * python/py-record-btrace.c, python/py-record-btrace.h,
15925         python/py-record-full.c, python/py-record-full.h: New file.
15926         * python/py-record.c: Add include for py-record-btrace.h and
15927         py-record-full.h.
15928         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15929         recpy_instruction_history, recpy_function_call_history, recpy_begin,
15930         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15931         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15932         New definition.
15933         (gdbpy_initialize_btrace): New export.
15934         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15935
15936 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15937
15938         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15939         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15940         * python/py-record.c: New file.
15941         * python/python-internal.h (gdbpy_start_recording,
15942         gdbpy_current_recording, gdpy_stop_recording,
15943         gdbpy_initialize_record): New export.
15944         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15945         (python_GdbMethods): Add gdbpy_start_recording,
15946         gdbpy_current_recording and gdbpy_stop_recording.
15947
15948 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15949
15950         * record-btrace.c (record_btrace_record_method): New function.
15951         (init_record_btrace_ops): Initialize to_record_method.
15952         * record-full.c (record_full_record_method): New function.
15953         (init_record_full_ops, init_record_full_core_ops): Add
15954         record_full_record_method.
15955         * record.h (enum record_method): New enum.
15956         * target-debug.h (target_debug_print_enum_record_method: New define.
15957         * target-delegates.c: Regenerate.
15958         * target.c (target_record_method): New function.
15959         * target.h: Include record.h.
15960         (struct target_ops) <to_record_method>: New field.
15961         (target_record_method): New export.
15962
15963 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15964
15965         * record.h (record_start, record_stop): New export.
15966         * record.c (record_start, record_stop): New function.
15967
15968 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15969
15970         * btrace.c (btrace_fetch): Copy function call segments pointer
15971         into a vector.
15972         (btrace_clear): Clear the vector.
15973         (btrace_find_insn_by_number): Use binary search to find the correct
15974         function call segment.
15975         * btrace.h (brace_fun_p): New typedef.
15976         (struct btrace_thread_info) <functions>: New field.
15977
15978 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15979
15980         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15981         * btrace.c (btrace_decode_error): ... here.  New function.
15982         * btrace.h (btrace_decode_error): New export.
15983
15984 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
15985
15986         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15987         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15988         btrace_find_insn_by_number): Remove special case for gaps.
15989         * btrace.h (btrace_insn_get_error): New export.
15990         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15991         * record-btrace.c (btrace_insn_history): Print number for gaps.
15992         (record_btrace_info, record_btrace_goto): Handle gaps.
15993
15994 2017-02-14  Tom Tromey  <tom@tromey.com>
15995
15996         PR python/13598:
15997         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15998         event.
15999         * python/py-evts.c (gdbpy_initialize_py_events): Add
16000         before_prompt registry.
16001         * python/py-events.h (events_object) <before_prompt>: New field.
16002
16003 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
16004
16005         * btrace.c (ftrace_new_switch): Preserve up link and flags.
16006
16007 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
16008
16009         * symfile (_initialize_symfile): Add usage text to the load command's
16010         help text.
16011
16012 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
16013
16014         * utils.c (defaulted_query): Don't query on secondary UIs.
16015
16016 2017-02-10  Tom Tromey  <tom@tromey.com>
16017
16018         * rust-lang.c (rust_get_disr_info): Remove unused variable.
16019
16020 2017-02-10  Tom Tromey  <tom@tromey.com>
16021
16022         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16023         "cleanup" local.
16024         * python/py-type.c (typy_legacy_template_argument): Remove
16025         unnecessary "cleanup" local.
16026
16027 2017-02-10  Tom Tromey  <tom@tromey.com>
16028
16029         * python/python.c (do_start_initialization): New function, from
16030         _initialize_python.
16031         (_initialize_python): Call do_start_initialization.
16032         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16033         goto.
16034
16035 2017-02-10  Tom Tromey  <tom@tromey.com>
16036
16037         * python/py-prettyprint.c (pretty_print_one_value): Use
16038         gdbpy_ref.
16039
16040 2017-02-10  Tom Tromey  <tom@tromey.com>
16041
16042         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16043         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16044         gdbpy_ref.
16045         * python/py-type.c (field_new): Use gdbpy_ref.
16046         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16047         gdbpy_ref.
16048         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16049         (py_free_pspace): Likewise.
16050         (pspace_to_pspace_object): Likewise.
16051         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16052         (py_free_objfile): Likewise.
16053         (objfile_to_objfile_object): Likewise.
16054         * python/py-inferior.c (delete_thread_object): Use
16055         gdbpy_ref.
16056         (infpy_read_memory): Likewise.
16057         (py_free_inferior): Likewise.
16058         * python/py-evtregistry.c (create_eventregistry_object): Use
16059         gdbpy_ref.
16060         * python/py-event.c (create_event_object): Use gdbpy_ref.
16061
16062 2017-02-10  Tom Tromey  <tom@tromey.com>
16063
16064         * python/py-ref.h (gdbpy_ref_policy): Now a template.
16065         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16066         used.
16067         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16068         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16069         python/py-exitedevent.c, python/py-finishbreakpoint.c,
16070         python/py-framefilter.c, python/py-function.c,
16071         python/py-inferior.c, python/py-infevents.c,
16072         python/py-linetable.c, python/py-newobjfileevent.c,
16073         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16074         python/py-signalevent.c, python/py-stopevent.c,
16075         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16076         python/py-unwind.c, python/py-utils.c, python/py-value.c,
16077         python/py-varobj.c, python/py-xmethods.c, python/python.c,
16078         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16079
16080 2017-02-10  Tom Tromey  <tom@tromey.com>
16081
16082         * ui-out.h (ui_out_emit_type): New class.
16083         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16084         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16085         and ui_out_emit_tuple.
16086         (enumerate_locals): Likewise.
16087         (py_mi_print_variables, py_print_locals, py_print_args): Use
16088         ui_out_emit_list.
16089         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16090         ui_out_emit_list.
16091         * common/gdb_optional.h: New file.
16092
16093 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16094
16095         * MAINTAINERS (Write After Approval): Update my e-mail address.
16096
16097 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16098
16099         PR gdb/21122
16100         * breakpoint.c (_initialize_breakpoint): Update the help description
16101         of the 'commands' command to indicate that it takes a list argument.
16102
16103 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
16104
16105         * interps.c (current_interp_set_logging): Remove "return".
16106
16107 2017-02-09  Gary Benson  <gbenson@redhat.com>
16108
16109         * symtab.c (add_symtab_completions): Prevent NULL pointer
16110         dereference.
16111
16112 2017-02-08  Pedro Alves  <palves@redhat.com>
16113
16114         * interps.c (interp::interp): Remove reference to quiet_p.
16115         (interp_set): Make static.  Remove dead "Switching to" output
16116         code.
16117         (interp_quiet_p, interp_set_quiet): Delete.
16118         (interpreter_exec_cmd): Don't set the interpreter quiet.
16119         * interps.h (interp_quiet_p): Make static.
16120         (class interp) <quiet_p>: Remove field
16121
16122 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16123
16124         * cli/cli-decode.c (find_command_name_length): Make it extern.
16125         * cli/cli-decode.h (find_command_name_length): Declare.
16126         * cli/cli-script.c (command_name_equals, line_first_arg):
16127         New functions.
16128         (process_next_line): Use cli-decode to parse command names.
16129         (build_command_line): Make args a constant pointer.
16130
16131 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16132
16133         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16134         Remove case-insensitive search.
16135
16136 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
16137
16138         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16139         at the end of the line.  Avoids an ARI warning.
16140
16141 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
16142
16143         * NEWS: Mention support for record/replay of Intel 64 rdrand and
16144         rdseed instructions.
16145         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16146
16147 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
16148
16149         PR tdep/20936
16150         Provide and use sparc32 and sparc64 target description XML files.
16151         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16152         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16153         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16154         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16155         * features/sparc/sparc32-solaris.xml: New file.
16156         * features/sparc/sparc64-solaris.xml: New file.
16157         * features/sparc/sparc32-solaris.c: Generated.
16158         * features/sparc/sparc64-solaris.c: Generated.
16159         * sparc-tdep.h: Account for differences in target descriptions.
16160         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16161         (sparc32_register_type): Use target provided registers.
16162         (validate_tdesc_registers): New function.
16163         (sparc32_gdbarch_init): Use tdesc_has_registers.
16164         Set pseudoregister functions.
16165         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16166         (sparc64_register_type): Use target provided registers.
16167         (sparc64_init_abi): Set pseudoregister functions.
16168
16169 2017-02-03  Tom Tromey  <tom@tromey.com>
16170
16171         PR rust/21097:
16172         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16173         with a single member.
16174
16175 2017-02-03  Pedro Alves  <palves@redhat.com>
16176
16177         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16178         (cli_interp_base::~cli_interp_base): New.
16179         (cli_interp): New struct.
16180         (as_cli_interp): Cast the interp itself to cli_interp.
16181         (cli_interpreter_pre_command_loop): Rename to ...
16182         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
16183         parameter.
16184         (cli_interpreter_init): Rename to ...
16185         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
16186         boolean.  Make extern.
16187         (cli_interpreter_resume): Rename to ...
16188         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
16189         extern.
16190         (cli_interpreter_suspend): Rename to ...
16191         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
16192         extern.
16193         (cli_interpreter_exec): Rename to ...
16194         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
16195         extern.
16196         (cli_interpreter_supports_command_editing): Rename to ...
16197         (cli_interp_base::supports_command_editing): ... this.  Remove
16198         'interp' parameter.  Make extern.
16199         (cli_ui_out): Rename to ...
16200         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
16201         Make extern.
16202         (cli_set_logging): Rename to ...
16203         (cli_interp_base::set_logging): ... this.  Remove 'interp'
16204         parameter.  Make extern.
16205         (cli_interp_procs): Delete.
16206         (cli_interp_factory): Adjust to use "new".
16207         * cli/cli-interp.h: Include "interps.h".
16208         (struct cli_interp_base): New struct.
16209         * interps.c (struct interp): Delete.  Fields moved to interps.h.
16210         (interp_new): Delete.
16211         (interp::interp, interp::~interp): New.
16212         (interp_set): Use bool, and return void.  Assume the interpreter
16213         has suspend, init and resume methods, and that the all return
16214         void.
16215         (set_top_level_interpreter): interp_set returns void.
16216         (interp_ui_out): Adapt.
16217         (current_interp_set_logging): Adapt.
16218         (interp_data): Delete.
16219         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16220         (interp_exec): Adapt.
16221         (top_level_interpreter_data): Delete.
16222         * interps.h (interp_init_ftype, interp_resume_ftype)
16223         (interp_suspend_ftype, interp_exec_ftype)
16224         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16225         (class interp): New.
16226         (interp_new): Delete.
16227         (interp_set): Now returns void.  Use bool.
16228         (interp_data, top_level_interpreter_data): Delete.
16229         * mi/mi-common.h: Include interps.h.
16230         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
16231         init, resume, suspect, exec, interp_ui_out, set_logging and
16232         pre_command_loop methods.
16233         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16234         (mi_interpreter_init): Rename to ...
16235         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
16236         bool, return void and make extern.  Adjust.
16237         (mi_interpreter_resume): ... Rename to ...
16238         (mi_interp::resume): ... this.  Remove the 'data' parameter,
16239         return void and make extern.  Adjust.
16240         (mi_interpreter_suspend): ... Rename to ...
16241         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
16242         return void and make extern.  Adjust.
16243         (mi_interpreter_exec): ... Rename to ...
16244         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
16245         extern.  Adjust.
16246         (mi_interpreter_pre_command_loop): ... Rename to ...
16247         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
16248         parameter and make extern.
16249         (mi_on_normal_stop_1): Adjust.
16250         (mi_ui_out): Rename to ...
16251         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
16252         parameter and make extern.  Adjust.
16253         (mi_set_logging): Rename to ...
16254         (mi_interp::set_logging): ... this.  Remove the 'interp'
16255         parameter and make extern.  Adjust.
16256         (mi_interp_procs): Delete.
16257         (mi_interp_factory): Adjust to use 'new'.
16258         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16259         (mi_print_exception, mi_execute_command, mi_load_progress):
16260         Adjust.
16261         * tui/tui-interp.c (tui_interp): New class.
16262         (as_tui_interp): Return a tui_interp pointer.
16263         (tui_on_normal_stop, tui_on_signal_received)
16264         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16265         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16266         to use interp::interp_ui_out.
16267         (tui_init): Rename to ...
16268         (tui_interp::init): ... this.  Remove the 'self' parameter, use
16269         bool, return void and make extern.  Adjust.
16270         (tui_resume): Rename to ...
16271         (tui_interp::resume): ... this.  Remove the 'data' parameter,
16272         return void and make extern.  Adjust.
16273         (tui_suspend): Rename to ...
16274         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
16275         return void and make extern.  Adjust.
16276         (tui_ui_out): Rename to ...
16277         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
16278         parameter, and make extern.  Adjust.
16279         (tui_exec): Rename to ...
16280         (tui_interp::exec): ... this.  Remove the 'data' parameter and
16281         make extern.
16282         (tui_interp_procs): Delete.
16283         (tui_interp_factory): Use "new".
16284
16285 2017-02-02  Tom Tromey  <tom@tromey.com>
16286
16287         * rust-exp.y (ends_raw_string, space_then_number)
16288         (rust_identifier_start_p): Return bool.
16289         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16290         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16291         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16292         (rust_chartype_p): Return bool.
16293         (val_print_struct, rust_print_struct_def, rust_print_type):
16294         Update.
16295         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16296         Return bool.
16297
16298 2017-02-02  Tom Tromey  <tom@tromey.com>
16299
16300         * rust-lang.c: Reindent.
16301
16302 2017-02-02  Tom Tromey  <tom@tromey.com>
16303
16304         * rust-lang.h (rust_crate_for_block): Update.
16305         * rust-lang.c (rust_crate_for_block): Return std::string.
16306         (rust_get_disr_info): Use std:;string, not
16307         gdb::unique_xmalloc_ptr.
16308         * rust-exp.y (crate_name): Update.
16309
16310 2017-02-02  Pedro Alves  <palves@redhat.com>
16311
16312         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16313         field out of gdb_disassembler_test and make it static.
16314
16315 2017-02-02  Pedro Alves  <palves@redhat.com>
16316
16317         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16318         mi1_interp and mi_interp fields.
16319
16320 2017-02-02  Pedro Alves  <palves@redhat.com>
16321
16322         * cli/cli-interp.c (struct saved_output_files, saved_output):
16323         Moved from cli/cli-logging.c.
16324         (cli_set_logging): New function.
16325         (cli_interp_procs): Install cli_set_logging.
16326         * cli/cli-interp.h (make_logging_output, cli_set_logging):
16327         Declare.
16328         * cli/cli-logging.c (struct saved_output_files, saved_output):
16329         Moved to cli/cli-interp.c.
16330         (pop_output_files): Don't save outputs here.
16331         (make_logging_output): New function.
16332         (handle_redirections): Don't build tee nor save previous outputs
16333         here.
16334         * interps.c (current_interp_set_logging): Change prototype.
16335         Assume there's always a set_logging_proc method installed.
16336         * interps.h (interp_set_logging_ftype): Change prototype.
16337         (current_interp_set_logging): Change prototype and adjust comment.
16338         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
16339         use make_logging_output.
16340         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16341 2017-02-02  Pedro Alves  <palves@redhat.com>
16342
16343         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16344         from ...
16345         (set_logging_overwrite): ... here.
16346         (logging_no_redirect_file): Delete.
16347         (set_logging_redirect): Don't handle redirection on the fly.
16348         Instead warn that "logging off" / "logging on" is necessary.
16349         (pop_output_files): Delete references to logging_no_redirect_file.
16350         (show_logging_command): Always speak in terms of what will happen
16351         once logging is reenabled.
16352
16353 2017-02-02  Pedro Alves  <palves@redhat.com>
16354
16355         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16356
16357 2017-02-02  Pedro Alves  <palves@redhat.com>
16358
16359         * disasm.c (gdb_pretty_print_insn): Rename to ...
16360         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16361         Remove gdbarch parameter.  Adapt to clear the object's buffers
16362         instead of allocating new buffers, and to print using the object's
16363         gdb_disassembler instead of calling gdb_print_insn.
16364         (dump_insns): Use gdb_pretty_print_disassembler.
16365         * disasm.h (gdb_pretty_print_insn): Delete declaration.
16366         (gdb_pretty_print_disassembler): New class.
16367         * record-btrace.c (btrace_insn_history): Use
16368         gdb_pretty_print_disassembler.
16369
16370 2017-02-02  Pedro Alves  <palves@redhat.com>
16371
16372         * ada-lang.c (type_as_string): Use string_file.
16373         * ada-valprint.c (ada_print_floating): Use string_file.
16374         * ada-varobj.c (ada_varobj_scalar_image)
16375         (ada_varobj_get_value_image): Use string_file.
16376         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16377         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16378         * breakpoint.c (update_inserted_breakpoint_locations)
16379         (insert_breakpoint_locations, reattach_breakpoints)
16380         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16381         (print_it_watchpoint): Use string_file.
16382         (save_breakpoints): Use stdio_file.
16383         * c-exp.y (oper): Use string_file.
16384         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16385         tee_file.
16386         (pop_output_files): Use delete.
16387         (handle_redirections): Use stdio_file and tee_file.
16388         * cli/cli-setshow.c (do_show_command): Use string_file.
16389         * compile/compile-c-support.c (c_compute_program): Use
16390         string_file.
16391         * compile/compile-c-symbols.c (generate_vla_size): Take a
16392         'string_file &' instead of a 'ui_file *'.
16393         (generate_c_for_for_one_variable): Take a 'string_file &' instead
16394         of a 'ui_file *'.  Use string_file.
16395         (generate_c_for_variable_locations): Take a 'string_file &'
16396         instead of a 'ui_file *'.
16397         * compile/compile-internal.h (generate_c_for_for_one_variable):
16398         Take a 'string_file &' instead of a 'ui_file *'.
16399         * compile/compile-loc2c.c (push, pushf, unary, binary)
16400         (print_label, pushf_register_address, pushf_register)
16401         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16402         'ui_file *'.  Adjust.
16403         * compile/compile.c (compile_to_object): Use string_file.
16404         * compile/compile.h (compile_dwarf_expr_to_c)
16405         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16406         'ui_file *'.
16407         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16408         (replace_typedefs_qualified_name): Use string_file and
16409         obstack_copy0.
16410         * disasm.c (gdb_pretty_print_insn): Use string_file.
16411         (gdb_disassembly): Adjust reference the null_stream global.
16412         (do_ui_file_delete): Delete.
16413         (gdb_insn_length): Use null_stream.
16414         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16415         * dwarf2loc.c (dwarf2_compile_property_to_c)
16416         (locexpr_generate_c_location, loclist_generate_c_location): Take a
16417         'string_file &' instead of a 'ui_file *'.
16418         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16419         * dwarf2read.c (do_ui_file_peek_last): Delete.
16420         (dwarf2_compute_name): Use string_file.
16421         * event-top.c (gdb_setup_readline): Use stdio_file.
16422         * gdbarch.sh (verify_gdbarch): Use string_file.
16423         * gdbtypes.c (safe_parse_type): Use null_stream.
16424         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16425         string_file.
16426         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16427         'string_file *' instead of a 'ui_file *'.
16428         (gdbscm_arch_disassemble): Use string_file.
16429         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16430         * guile/scm-ports.c (class ioscm_file_port): Now a class that
16431         inherits from ui_file.
16432         (ioscm_file_port_delete, ioscm_file_port_rewind)
16433         (ioscm_file_port_put): Delete.
16434         (ioscm_file_port_write): Rename to ...
16435         (ioscm_file_port::write): ... this.  Remove file_port_magic
16436         checks.
16437         (ioscm_file_port_new): Delete.
16438         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16439         ui_file_up.
16440         * guile/scm-type.c (tyscm_type_name): Use string_file.
16441         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16442         Use string_file.
16443         * infcmd.c (print_return_value_1): Use string_file.
16444         * infrun.c (print_target_wait_results): Use string_file.
16445         * language.c (add_language): Use string_file.
16446         * location.c (explicit_to_string_internal): Use string_file.
16447         * main.c (captured_main_1): Use null_file.
16448         * maint.c (maintenance_print_architecture): Use stdio_file.
16449         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16450         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16451         event_channel>: Change type to mi_console_file pointer.
16452         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16453         (mi_console_file_delete): Delete.
16454         (struct mi_console_file): Delete.
16455         (mi_console_file_magic): Delete.
16456         (mi_console_file_new): Delete.
16457         (mi_console_file::mi_console_file): New.
16458         (mi_console_file_delete): Delete.
16459         (mi_console_file_fputs): Delete.
16460         (mi_console_file::write): New.
16461         (mi_console_raw_packet): Delete.
16462         (mi_console_file::flush): New.
16463         (mi_console_file_flush): Delete.
16464         (mi_console_set_raw): Rename to ...
16465         (mi_console_file::set_raw): ... this.
16466         * mi/mi-console.h (class mi_console_file): New class.
16467         (mi_console_file_new, mi_console_set_raw): Delete.
16468         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16469         (mi_set_logging): Use delete and tee_file.  Adjust.
16470         * mi/mi-main.c (output_register): Use string_file.
16471         (mi_cmd_data_evaluate_expression): Use string_file.
16472         (mi_cmd_data_read_memory): Use string_file.
16473         (mi_cmd_execute, print_variable_or_computed): Use string_file.
16474         * mi/mi-out.c (mi_ui_out::main_stream): New.
16475         (mi_ui_out::rewind): Use main_stream and
16476         string_file.
16477         (mi_ui_out::put): Use main_stream and string_file.
16478         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16479         Allocate a 'string_file' instead.
16480         (mi_out_new): Don't allocate a mem_fileopen stream here.
16481         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16482         (mi_ui_out::main_stream): Declare method.
16483         * printcmd.c (eval_command): Use string_file.
16484         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16485         * python/py-arch.c (archpy_disassemble): Use string_file.
16486         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16487         * python/py-frame.c (frapy_str): Use string_file.
16488         * python/py-framefilter.c (py_print_type, py_print_single_arg):
16489         Use string_file.
16490         * python/py-type.c (typy_str): Use string_file.
16491         * python/py-unwind.c (unwind_infopy_str): Use string_file.
16492         * python/py-value.c (valpy_str): Use string_file.
16493         * record-btrace.c (btrace_insn_history): Use string_file.
16494         * regcache.c (regcache_print): Use stdio_file.
16495         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16496         * remote.c (escape_buffer): Use string_file.
16497         * rust-lang.c (rust_get_disr_info): Use string_file.
16498         * serial.c (serial_open_ops_1): Use stdio_file.
16499         (do_serial_close): Use delete.
16500         * stack.c (print_frame_arg): Use string_file.
16501         (print_frame_args): Remove local mem_fileopen stream, not used.
16502         (print_frame): Use string_file.
16503         * symmisc.c (maintenance_print_symbols): Use stdio_file.
16504         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16505         Take a 'string_file *' instead of a 'ui_file *'.
16506         * top.c (new_ui): Use stdio_file and stderr_file.
16507         (free_ui): Use delete.
16508         (execute_command_to_string): Use string_file.
16509         (quit_confirm): Use string_file.
16510         * tracepoint.c (collection_list::append_exp): Use string_file.
16511         * tui/tui-disasm.c (tui_disassemble): Use string_file.
16512         * tui/tui-file.c: Don't include "ui-file.h".
16513         (enum streamtype, struct tui_stream): Delete.
16514         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16515         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16516         (tui_file::tui_file): New method.
16517         (tui_file_fputs): Delete.
16518         (tui_file_get_strbuf): Delete.
16519         (tui_file::puts): New method.
16520         (tui_file_adjust_strbuf): Delete.
16521         (tui_file_flush): Delete.
16522         (tui_file::flush): New method.
16523         * tui/tui-file.h: Tweak intro comment.
16524         Include ui-file.h.
16525         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16526         (tui_file_adjust_strbuf): Delete declarations.
16527         (class tui_file): New class.
16528         * tui/tui-io.c (tui_initialize_io): Use tui_file.
16529         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16530         (tui_register_format): Use string_stream.
16531         * tui/tui-stack.c (tui_make_status_line): Use string_file.
16532         (tui_get_function_from_frame): Use string_file.
16533         * typeprint.c (type_to_string): Use string_file.
16534         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16535         (null_stream): New global.
16536         (ui_file_delete): Delete.
16537         (ui_file::ui_file): New.
16538         (null_file_isatty): Delete.
16539         (ui_file::~ui_file): New.
16540         (null_file_rewind): Delete.
16541         (ui_file::printf): New.
16542         (null_file_put): Delete.
16543         (null_file_flush): Delete.
16544         (ui_file::putstr): New.
16545         (null_file_write): Delete.
16546         (ui_file::putstrn): New.
16547         (null_file_read): Delete.
16548         (ui_file::putc): New.
16549         (null_file_fputs): Delete.
16550         (null_file_write_async_safe): Delete.
16551         (ui_file::vprintf): New.
16552         (null_file_delete): Delete.
16553         (null_file::write): New.
16554         (null_file_fseek): Delete.
16555         (null_file::puts): New.
16556         (ui_file_data): Delete.
16557         (null_file::write_async_safe): New.
16558         (gdb_flush, ui_file_isatty): Adjust.
16559         (ui_file_put, ui_file_rewind): Delete.
16560         (ui_file_write): Adjust.
16561         (ui_file_write_for_put): Delete.
16562         (ui_file_write_async_safe, ui_file_read): Adjust.
16563         (ui_file_fseek): Delete.
16564         (fputs_unfiltered): Adjust.
16565         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16566         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16567         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16568         (set_ui_file_data): Delete.
16569         (string_file::~string_file, string_file::write)
16570         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16571         (do_ui_file_as_string, ui_file_as_string): Delete.
16572         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16573         (struct mem_file): Delete.
16574         (mem_file_new): Delete.
16575         (stdio_file::stdio_file): New.
16576         (mem_file_delete): Delete.
16577         (stdio_file::stdio_file): New.
16578         (mem_fileopen): Delete.
16579         (stdio_file::~stdio_file): New.
16580         (mem_file_rewind): Delete.
16581         (stdio_file::set_stream): New.
16582         (mem_file_put): Delete.
16583         (stdio_file::open): New.
16584         (mem_file_write): Delete.
16585         (stdio_file_magic, struct stdio_file): Delete.
16586         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16587         (stdio_file::flush): New.
16588         (stdio_file_read): Rename to ...
16589         (stdio_file::read): ... this.  Adjust.
16590         (stdio_file_write): Rename to ...
16591         (stdio_file::write): ... this.  Adjust.
16592         (stdio_file_write_async_safe): Rename to ...
16593         (stdio_file::write_async_safe) ... this.  Adjust.
16594         (stdio_file_fputs): Rename to ...
16595         (stdio_file::puts) ... this.  Adjust.
16596         (stdio_file_isatty): Delete.
16597         (stdio_file_fseek): Delete.
16598         (stdio_file::isatty): New.
16599         (stderr_file_write): Rename to ...
16600         (stderr_file::write) ... this.  Adjust.
16601         (stderr_file_fputs): Rename to ...
16602         (stderr_file::puts) ... this.  Adjust.
16603         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16604         (stderr_file::stderr_file): New.
16605         (tee_file_magic): Delete.
16606         (struct tee_file): Delete.
16607         (tee_file::tee_file): New.
16608         (tee_file_new): Delete.
16609         (tee_file::~tee_file): New.
16610         (tee_file_delete): Delete.
16611         (tee_file_flush): Rename to ...
16612         (tee_file::flush): ... this.  Adjust.
16613         (tee_file_write): Rename to ...
16614         (tee_file::write): ... this.  Adjust.
16615         (tee_file::write_async_safe): New.
16616         (tee_file_fputs): Rename to ...
16617         (tee_file::puts): ... this.  Adjust.
16618         (tee_file_isatty): Rename to ...
16619         (tee_file::isatty): ... this.  Adjust.
16620         * ui-file.h (struct obstack, struct ui_file): Don't
16621         forward-declare.
16622         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16623         (ui_file_write_ftype)
16624         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16625         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16626         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16627         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16628         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16629         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16630         (set_ui_file_fseek): Delete.
16631         (ui_file_data, ui_file_delete, ui_file_rewind)
16632         (struct ui_file): New.
16633         (ui_file_up): New.
16634         (class null_file): New.
16635         (null_stream): Declare.
16636         (ui_file_write_for_put, ui_file_put): Delete.
16637         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16638         Delete.
16639         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16640         (gdb_fopen, tee_file_new): Delete.
16641         (struct string_file): New.
16642         (struct stdio_file): New.
16643         (stdio_file_up): New.
16644         (struct stderr_file): New.
16645         (class tee_file): New.
16646         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16647         of a 'ui_file *'.  Adjust.
16648         * ui-out.h (class ui_out) <field_stream>: Likewise.
16649         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16650         (null_stream): Delete.
16651         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16652         Adjust.
16653         * utils.h (struct ui_file): Delete forward declaration..
16654         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16655         (error_stream): Take a 'string_file &' instead of a
16656         'ui_file *'.
16657         * varobj.c (varobj_value_get_print_value): Use string_file.
16658         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16659         * gdbarch.c: Regenerate.
16660
16661 2017-02-02  Pedro Alves  <palves@redhat.com>
16662
16663         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16664         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
16665         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
16666         Adjust to call gdb_print_insn instead of
16667         gdb_disassembler::print_insn.
16668         (dump_insns, do_mixed_source_and_assembly_deprecated)
16669         (do_mixed_source_and_assembly, do_assembly_only): Add back a
16670         'gdbarch' parameter.  Remove gdb_disassembler parameter.
16671         (gdb_disassembly): Don't allocate a gdb_disassembler here.
16672         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16673         declaration.
16674         (gdb_pretty_print_insn): Re-add declaration.
16675         * record-btrace.c (btrace_insn_history): Don't allocate a
16676         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
16677
16678 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
16679
16680         * disasm.h (gdb_disassembly): Remove file_string parameter.
16681         * disasm.c (gdb_disassembly): Likewise.
16682         * cli/cli-cmds.c (print_disassembly): Adapt.
16683         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16684         * stack.c (do_gdb_disassembly): Likewise.
16685
16686 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16687
16688         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16689         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16690         targets.  And if the implicit value is longer than needed, extract
16691         the first bytes instead of the "least significant" ones.
16692
16693 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16694
16695         * btrace.c (btrace_enable): Do not call btrace_add_pc for
16696         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16697         (btrace_fetch): Assert can_access_registers_ptid.
16698         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16699         validate_registers_access.
16700
16701 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
16702
16703         * gdbthread.h (can_access_registers_ptid): New.
16704         * thread.c (can_access_registers_ptid): New.
16705
16706 2017-02-01  Pedro Alves  <palves@redhat.com>
16707
16708         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16709
16710 2017-01-31  Pedro Alves  <palves@redhat.com>
16711
16712         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16713         Fix typos.
16714
16715 2017-01-31  Pedro Alves  <palves@redhat.com>
16716
16717         * stack.c (print_frame_args): Remove local mem_fileopen stream,
16718         not used.
16719
16720 2017-01-31  Pedro Alves  <palves@redhat.com>
16721
16722         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16723
16724 2017-01-31  Pedro Alves  <palves@redhat.com>
16725
16726         * common/scoped_restore.h
16727         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16728         change the value's parameter type to T2.
16729         (make_scoped_restore): Likewise.
16730
16731 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16732             Richard Henderson  <rth@redhat.com>
16733
16734         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16735         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16736         GS_BASE for older kernels.
16737         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16738         GS_BASE for older kernels.
16739         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16740         and GS_BASE to the offset table.
16741         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16742         system register group.
16743         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16744         for older kernels.
16745         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16746         amd64 ABI.
16747         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16748         AMD64_GSBASE_REGNUM.
16749         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16750         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16751         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16752         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16753         i386/64bit-segments.xml in those rules.
16754         * features/i386/64bit-segments.xml: New file.
16755         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16756         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16757         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16758         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16759         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16760         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16761         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16762         * features/i386/amd64-avx-linux.c: Regenerated.
16763         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16764         * features/i386/amd64-avx-mpx.c: Regenerated.
16765         * features/i386/amd64-avx512-linux.c: Regenerated.
16766         * features/i386/amd64-linux.c: Regenerated.
16767         * features/i386/amd64-mpx-linux.c: Regenerated.
16768         * features/i386/i386-avx-mpx-linux.c: Regenerated.
16769         * features/i386/i386-avx-mpx.c: Regenerated.
16770         * features/i386/x32-avx-linux.c: Regenerated.
16771         * features/i386/x32-avx512-linux.c: Regenerated.
16772         * regformats/i386/amd64-avx-linux.dat: Regenerated.
16773         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16774         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16775         * regformats/i386/amd64-linux.dat: Regenerated.
16776         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16777         * regformats/i386/x32-avx-linux.dat: Regenerated.
16778         * regformats/i386/x32-avx512-linux.dat: Regenerated.
16779         * regformats/i386/x32-linux.dat: Regenerated.
16780
16781 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16782
16783         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16784         Set to AMD64_NUM_REGS.
16785
16786 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16787
16788         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16789         that checks validity of a register number.
16790
16791 2017-01-27  Kees Cook  <keescook@google.com>
16792
16793         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16794         fetch_fpregs if target has fpa registers.
16795         (arm_linux_store_inferior_registers): Call store_fpregs if target
16796         has fpa registers.
16797
16798 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16799
16800         * cris-tdep.c (cris_gdbarch_init): Remove check for
16801         info.byte_order and force it to BFD_ENDIAN_LITTLE.
16802
16803 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
16804
16805         * corelow.c (get_core_register_section): Check for regset
16806         existence before checking for REGSET_VARIABLE_SIZE.
16807
16808 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16809             Pedro Alves  <palves@redhat.com>
16810
16811         PR gdb/20939
16812         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16813         call memory_error, save memaddr instead.
16814         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16815         negative, cal memory_error.
16816         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16817
16818 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16819
16820         * disasm-selftests.c (memory_error_test): New function.
16821         (_initialize_disasm_selftests): Register memory_error_test.
16822
16823 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16824
16825         * Makefile.in (SFILES): Add disasm-selftests.c and
16826         selftest-arch.c.
16827         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16828         * disasm-selftests.c: New file.
16829         * selftest-arch.c: New file.
16830         * selftest-arch.h: New file.
16831
16832 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16833
16834         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16835         to bfd_arch_mep.  Don't return 0 if section is not
16836         found.  Call print_insn_mep.
16837
16838 2017-01-26  Pedro Alves  <palves@redhat.com>
16839             Yao Qi  <yao.qi@linaro.org>
16840
16841         * arm-tdep.c: Include "disasm.h".
16842         (gdb_print_insn_arm): Update code to get gdbarch.
16843         * disasm.c (dis_asm_read_memory): Change it to
16844         gdb_disassembler::dis_asm_read_memory.
16845         (dis_asm_memory_error): Likewise.
16846         (dis_asm_print_address): Likewise.
16847         (gdb_pretty_print_insn): Change it to
16848         gdb_disassembler::pretty_print_insn.
16849         (dump_insns): Add one argument gdb_disassemlber.  All
16850         callers updated.
16851         (do_mixed_source_and_assembly_deprecated): Likewise.
16852         (do_mixed_source_and_assembly): Likewise.
16853         (do_assembly_only): Likewise.
16854         (gdb_disassembler::gdb_disassembler): New.
16855         (gdb_disassembler::print_insn): New.
16856         * disasm.h (class gdb_disassembler): New.
16857         (gdb_pretty_print_insn): Remove declaration.
16858         (gdb_disassemble_info): Likewise.
16859         * guile/scm-disasm.c (class gdbscm_disassembler): New.
16860         (gdbscm_disasm_read_memory_worker): Update.
16861         (gdbscm_disasm_read_memory): Update.
16862         (gdbscm_disasm_memory_error): Remove.
16863         (gdbscm_disasm_print_address): Remove.
16864         (gdbscm_disassembler::gdbscm_disassembler): New.
16865         (gdbscm_print_insn_from_port): Update.
16866         * mips-tdep.c: Include disasm.h.
16867         (gdb_print_insn_mips): Update code to get gdbarch.
16868         * record-btrace.c (btrace_insn_history): Update.
16869         * spu-tdep.c: Include disasm.h.
16870         (struct spu_dis_asm_data): Remove.
16871         (struct spu_dis_asm_info): New.
16872         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16873         SPU id.
16874         (gdb_print_insn_spu): Cast disassemble_info to
16875         spu_dis_asm_info.
16876
16877 2017-01-26  Yao Qi  <yao.qi@linaro.org>
16878
16879         * disasm.c (do_ui_file_delete): Delete.
16880         (gdb_insn_length): Move code creating stream to ...
16881         * utils.c (null_stream): ... here.  New function.
16882         * utils.h (null_stream): Declare.
16883
16884 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
16885
16886         * python/py-inferior.c (find_thread_object): Return directly
16887         from the loop.  Remove "found" variable.
16888
16889 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
16890
16891         GDB 7.12.1 released.
16892
16893 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16894
16895         * python/py-function.c (fnpy_call): Reorder declarations to have
16896         the gdbpy_enter object declared first.
16897         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16898
16899 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
16900
16901         PR python/21068
16902         * python/python-internal.h (PyMem_RawMalloc): Define for
16903         Python < 3.4.
16904         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16905         PyMem_RawMalloc instead of PyMem_Malloc.
16906
16907 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
16908             Luis Machado  <lgustavo@codesourcery.com>
16909
16910         * NEWS (New commands): Mention flash-erase.
16911         (New MI commands): Mention target-flash-erase.
16912         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16913         command.
16914         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16915         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16916         * target.c (flash_erase_command): New function.
16917         (initialize_targets): Add new flash-erase command.
16918         * target.h (flash_erase_command): New declaration.
16919
16920 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
16921
16922         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16923         HAVE_SYS_PROCFS_H is defined.
16924
16925 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16926
16927         * remote.c (struct cached_reg): Change data into a pointer.
16928         * (stop_reply_dtr): Free data pointers before deleting vector.
16929         (process_stop_reply): Likewise.
16930         (remote_parse_stop_reply): Allocate space for data
16931
16932 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
16933
16934         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16935         MAX_REGISTER_SIZE.
16936         (amd64_pseudo_register_read_value): Likewise.
16937         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16938         (store_register_using_P): Likewise.
16939         * regcache.c (regcache_xfer_part): Likewise.
16940
16941 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
16942
16943         Split real and pseudo registers.
16944         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16945         (sparc32_pseudo_regnum): New enum.
16946         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16947         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16948         (SPARC32_CP0_REGISTERS): New macro.
16949         (sparc32_pseudo_register_name): New function.
16950         (sparc32_register_name): Use sparc32_pseudo_register_name.
16951         (sparc32_pseudo_register_type): New function.
16952         (sparc32_register_type): Use sparc32_pseudo_register_type.
16953         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16954         pseudo register numbers.
16955         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16956         (SPARC64_CP0_REGISTERS): New macro.
16957         (sparc64_pseudo_register_name): New function.
16958         (sparc64_register_name): Use sparc64_pseudo_register_name.
16959         (sparc64_pseudo_register_type): New function.
16960         (sparc64_register_type): Use sparc64_pseudo_register_type.
16961         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16962         pseudo register numbers.
16963         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16964         sparc64_store_arguments): Handle pseudo register numbers.
16965
16966 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16967
16968         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16969         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16970         output.
16971         (getpkt_or_notif_sane_1): Likewise.
16972
16973 2017-01-13  Yao Qi  <yao.qi@linaro.org>
16974
16975         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16976         of CC.  Pass "-x c++-header" instead of "-x c".
16977
16978 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16979
16980         * remote.c (remote_can_async_p): Update comment.
16981
16982 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16983
16984         * linux-nat.c (linux_nat_can_async_p): Update comment.
16985
16986 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
16987
16988         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16989
16990 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
16991
16992         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16993
16994 2017-01-10  Tom Tromey  <tom@tromey.com>
16995
16996         * python/py-type.c (typy_legacy_template_argument): Update.
16997         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16998         ~demangle_parse_info): Declare new members.
16999         (cp_demangled_name_to_comp): Return unique_ptr.
17000         (cp_demangled_name_parse_free)
17001         (make_cleanup_cp_demangled_name_parse_free)
17002         (cp_new_demangle_parse_info): Remove.
17003         * cp-support.c (do_demangled_name_parse_free_cleanup)
17004         (make_cleanup_cp_demangled_name_parse_free): Remove.
17005         (inspect_type, cp_canonicalize_string_full)
17006         (cp_canonicalize_string): Update.
17007         (mangled_name_to_comp): Change return type.
17008         (cp_class_name_from_physname, method_name_from_physname)
17009         (cp_func_name, cp_remove_params): Update.
17010         * cp-name-parser.y (demangle_parse_info): New constructor, from
17011         cp_new_demangle_parse_info.
17012         (~demangle_parse_info): New destructor, from
17013         cp_demangled_name_parse_free.
17014         (cp_merge_demangle_parse_infos): Update.
17015         (cp_demangled_name_to_comp): Change return type.
17016
17017 2017-01-10  Tom Tromey  <tom@tromey.com>
17018
17019         * top.c (prevent_dont_repeat): Change return type.
17020         * python/python.c (execute_gdb_command): Use std::string.
17021         Update.
17022         * guile/guile.c (gdbscm_execute_gdb_command): Update.
17023         * command.h (prevent_dont_repeat): Change return type.
17024         * breakpoint.c (bpstat_do_actions_1): Update.
17025
17026 2017-01-10  Tom Tromey  <tom@tromey.com>
17027
17028         * value.h (scoped_value_mark::~scoped_value_mark): Call
17029         free_to_mark.
17030         (scoped_value_mark::free_to_mark): New method.
17031         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17032         scoped_value_mark.
17033
17034 2017-01-10  Tom Tromey  <tom@tromey.com>
17035
17036         * python/py-value.c (valpy_dereference, valpy_referenced_value)
17037         (valpy_reference_value, valpy_const_value, valpy_get_address)
17038         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17039         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17040         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17041         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17042         scoped_value_mark.
17043         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17044         * value.h (scoped_value_mark): New class.
17045
17046 2017-01-10  Tom Tromey  <tom@tromey.com>
17047
17048         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17049         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17050         * psymtab.c (discard_psymtabs_upto): Remove.
17051         (make_cleanup_discard_psymtabs): Remove.
17052         (struct psymtab_state): Remove.
17053
17054 2017-01-10  Tom Tromey  <tom@tromey.com>
17055
17056         * record-full.c (record_full_save_cleanups): Remove.
17057         (record_full_save): Use gdb::unlinker.
17058         * gcore.c (do_bfd_delete_cleanup): Remove.
17059         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
17060         cleanups.
17061         * dwarf2read.c (unlink_if_set): Remove.
17062         (write_psymtabs_to_index): Use gdb::unlinker.
17063         * common/gdb_unlinker.h: New file.
17064
17065 2017-01-10  Tom Tromey  <tom@tromey.com>
17066
17067         * windows-tdep.c (windows_xfer_shared_library): Update.
17068         * windows-nat.c (windows_make_so): Update.
17069         * utils.h (make_cleanup_bfd_unref): Remove.
17070         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17071         * symfile.h (symfile_bfd_open)
17072         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17073         * symfile.c (read_symbols, symbol_file_add)
17074         (separate_debug_file_exists): Update.
17075         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17076         (generic_load, reread_symbols): Update.
17077         * symfile-mem.c (symbol_file_add_from_memory): Update.
17078         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17079         (spu_symbol_file_add_from_memory): Update.
17080         * solist.h (struct target_so_ops) <bfd_open>: Return
17081         gdb_bfd_ref_ptr.
17082         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17083         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17084         gdb_bfd_ref_ptr.
17085         (solib_map_sections, reload_shared_libraries_1): Update.
17086         * solib-svr4.c (enable_break): Update.
17087         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17088         * solib-frv.c (enable_break2): Update.
17089         * solib-dsbt.c (enable_break): Update.
17090         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17091         gdb_bfd_ref_ptr.
17092         (darwin_solib_get_all_image_info_addr_at_init): Update.
17093         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17094         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17095         * record-full.c (record_full_save): Update.
17096         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17097         * procfs.c (insert_dbx_link_bpt_in_file): Update.
17098         * minidebug.c (find_separate_debug_file_in_section): Return
17099         gdb_bfd_ref_ptr.
17100         * machoread.c (macho_add_oso_symfile): Change abfd to
17101         gdb_bfd_ref_ptr.
17102         (macho_symfile_read_all_oso): Update.
17103         (macho_check_dsym): Return gdb_bfd_ref_ptr.
17104         (macho_symfile_read): Update.
17105         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17106         (jit_bfd_try_read_symtab): Update.
17107         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17108         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17109         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17110         gdb_bfd_ref_ptr.
17111         (gdb_bfd_ref_policy): New struct.
17112         (gdb_bfd_ref_ptr): New typedef.
17113         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17114         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17115         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17116         gdb_bfd_ref_ptr.
17117         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17118         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17119         (gcore_command): Update.
17120         * exec.c (exec_file_attach): Update.
17121         * elfread.c (elf_symfile_read): Update.
17122         * dwarf2read.c (dwarf2_get_dwz_file): Update.
17123         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17124         (open_and_init_dwo_file): Update.
17125         (open_dwp_file): Return gdb_bfd_ref_ptr.
17126         (open_and_init_dwp_file): Update.
17127         * corelow.c (core_open): Update.
17128         * compile/compile-object-load.c (compile_object_load): Update.
17129         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17130         * coffread.c (coff_symfile_read): Update.
17131         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17132         gdb_bfd_ref_ptr.  Rename.
17133         (dump_bfd_file, restore_command): Update.
17134         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17135         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17136         (find_separate_debug_file_by_buildid): Update.
17137
17138 2017-01-10  Tom Tromey  <tom@tromey.com>
17139
17140         * common/gdb_ref_ptr.h: New file.
17141         * python/py-ref.h (struct gdbpy_ref_policy): New.
17142         (gdbpy_ref): Now a typedef.
17143
17144 2017-01-10  Tom Tromey  <tom@tromey.com>
17145
17146         * utils.h (make_cleanup_htab_delete): Don't declare.
17147         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17148         Remove.
17149         * linespec.c (decode_compound_collector): Add constructor,
17150         destructor.
17151         (lookup_prefix_sym): Remove cleanup.
17152         (symtab_collector): Add constructor, destructor.
17153         (collect_symtabs_from_filename): Remove cleanup.
17154         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17155         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17156         Use htab_up.
17157         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17158         * dwarf2read.c (dw2_expand_symtabs_matching)
17159         (dw2_map_symbol_filenames, dwarf_decode_macros)
17160         (write_psymtabs_to_index): Use htab_up.
17161         * dwarf2loc.c (func_verify_no_selftailcall)
17162         (call_site_find_chain_1, func_verify_no_selftailcall)
17163         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17164         std::vector, gdb::unique_xmalloc_ptr.
17165         (call_sitep): Remove typedef.
17166         (dwarf2_locexpr_baton_eval): Remove unused variable.
17167
17168 2017-01-10  Tom Tromey  <tom@tromey.com>
17169
17170         * python/python-internal.h (make_cleanup_py_decref)
17171         (make_cleanup_py_xdecref): Don't declare.
17172         * python/py-utils.c (py_decref, make_cleanup_py_decref)
17173         (py_xdecref, make_cleanup_py_xdecref): Remove.
17174
17175 2017-01-10  Tom Tromey  <tom@tromey.com>
17176
17177         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17178         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17179
17180 2017-01-10  Tom Tromey  <tom@tromey.com>
17181
17182         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17183
17184 2017-01-10  Tom Tromey  <tom@tromey.com>
17185
17186         * python/py-utils.c (unicode_to_encoded_string)
17187         (python_string_to_target_string)
17188         (python_string_to_target_python_string)
17189         (python_string_to_host_string, gdbpy_obj_to_string)
17190         (get_addr_from_python): Use gdbpy_ref.
17191
17192 2017-01-10  Tom Tromey  <tom@tromey.com>
17193
17194         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17195         gdbpy_ref.
17196
17197 2017-01-10  Tom Tromey  <tom@tromey.com>
17198
17199         * python/python.c (eval_python_command, gdbpy_decode_line)
17200         (gdbpy_run_events, gdbpy_start_type_printers)
17201         (gdbpy_apply_type_printers): Use gdbpy_ref.
17202
17203 2017-01-10  Tom Tromey  <tom@tromey.com>
17204
17205         * python/py-param.c (get_doc_string, compute_enum_values): Use
17206         gdbpy_ref.
17207
17208 2017-01-10  Tom Tromey  <tom@tromey.com>
17209
17210         * python/py-inferior.c (find_thread_object, build_inferior_list):
17211         Use gdbpy_ref.
17212
17213 2017-01-10  Tom Tromey  <tom@tromey.com>
17214
17215         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17216
17217 2017-01-10  Tom Tromey  <tom@tromey.com>
17218
17219         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17220         gdbpy_ref.
17221
17222 2017-01-10  Tom Tromey  <tom@tromey.com>
17223
17224         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
17225         extra incref.
17226         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17227         Use gdbpy_ref.
17228
17229 2017-01-10  Tom Tromey  <tom@tromey.com>
17230
17231         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17232         gdbpy_ref.
17233
17234 2017-01-10  Tom Tromey  <tom@tromey.com>
17235
17236         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
17237         decref results of PyArg_ParseTupleAndKeywords.
17238
17239 2017-01-10  Tom Tromey  <tom@tromey.com>
17240
17241         * python/python.c (python_run_simple_file): Use
17242         unique_xmalloc_ptr, gdbpy_ref.
17243
17244 2017-01-10  Tom Tromey  <tom@tromey.com>
17245
17246         * python/py-prettyprint.c (print_stack_unless_memory_error)
17247         (print_string_repr, print_children): Use gdbpy_ref.
17248         (dummy_python_frame): New class.
17249         (dummy_python_frame::dummy_python_frame): Rename from
17250         push_dummy_python_frame.
17251         (py_restore_tstate): Remove.
17252
17253 2017-01-10  Tom Tromey  <tom@tromey.com>
17254
17255         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17256
17257 2017-01-10  Tom Tromey  <tom@tromey.com>
17258
17259         * python/python.c (ensure_python_env, restore_python_env):
17260         Remove.
17261         * python/python-internal.h (ensure_python_env): Don't declare.
17262         * varobj.h (varobj_ensure_python_env): Don't declare.
17263         * varobj.c (varobj_ensure_python_env): Remove.
17264
17265 2017-01-10  Tom Tromey  <tom@tromey.com>
17266
17267         * varobj.c (varobj_value_get_print_value): Use
17268         gdbpy_enter_varobj.
17269
17270 2017-01-10  Tom Tromey  <tom@tromey.com>
17271
17272         * python/py-prettyprint.c (print_string_repr, print_children):
17273         Update.
17274         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17275         of "encoding".
17276         * varobj.c (varobj_value_get_print_value): Update.
17277         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17278
17279 2017-01-10  Tom Tromey  <tom@tromey.com>
17280
17281         * varobj.c (varobj_get_display_hint)
17282         (dynamic_varobj_has_child_method, install_new_value_visualizer)
17283         (varobj_set_visualizer, free_variable): Use
17284         gdbpy_enter_varobj.
17285
17286 2017-01-10  Tom Tromey  <tom@tromey.com>
17287
17288         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17289         (do_finish_initialization): New function.  Use gdbpy_ref.
17290         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
17291         do_finish_initialization.
17292
17293 2017-01-10  Tom Tromey  <tom@tromey.com>
17294
17295         * python/py-param.c (get_set_value, get_show_value): Use
17296         gdbpy_enter, gdbpy_ref.
17297
17298 2017-01-10  Tom Tromey  <tom@tromey.com>
17299
17300         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17301
17302 2017-01-10  Tom Tromey  <tom@tromey.com>
17303
17304         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17305
17306 2017-01-10  Tom Tromey  <tom@tromey.com>
17307
17308         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17309         Use gdbpy_enter_varobj.
17310
17311 2017-01-10  Tom Tromey  <tom@tromey.com>
17312
17313         * varobj.c (gdbpy_enter_varobj): New constructor.
17314         * python/python-internal.h (gdbpy_enter_varobj): New class.
17315         * python/py-varobj.c (py_varobj_get_iterator): Use
17316         gdbpy_enter_varobj.
17317
17318 2017-01-10  Tom Tromey  <tom@tromey.com>
17319
17320         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17321         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17322         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17323         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17324         unique_xmalloc_ptr.
17325         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17326
17327 2017-01-10  Tom Tromey  <tom@tromey.com>
17328
17329         * python/py-xmethods.c (invoke_match_method): Use
17330         gdbpy_ref.
17331
17332 2017-01-10  Tom Tromey  <tom@tromey.com>
17333
17334         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17335         gdbpy_enter, gdbpy_ref.
17336
17337 2017-01-10  Tom Tromey  <tom@tromey.com>
17338
17339         * python/python.c (python_interactive_command): Use gdbpy_enter.
17340
17341 2017-01-10  Tom Tromey  <tom@tromey.com>
17342
17343         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17344         gdbpy_ref.
17345
17346 2017-01-10  Tom Tromey  <tom@tromey.com>
17347
17348         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17349         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17350
17351 2017-01-10  Tom Tromey  <tom@tromey.com>
17352
17353         * utils.h (htab_deleter): New struct.
17354         (htab_up): New typedef.
17355         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17356         gdbpy_enter, gdbpy_ref, htab_up.
17357
17358 2017-01-10  Tom Tromey  <tom@tromey.com>
17359
17360         * python/py-unwind.c (pending_frame_invalidate): Remove.
17361         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17362
17363 2017-01-10  Tom Tromey  <tom@tromey.com>
17364
17365         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17366         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17367
17368 2017-01-10  Tom Tromey  <tom@tromey.com>
17369
17370         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17371
17372 2017-01-10  Tom Tromey  <tom@tromey.com>
17373
17374         * python/python.c (gdbpy_eval_from_control_command)
17375         (gdbpy_source_script, gdbpy_run_events)
17376         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17377         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17378         gdbpy_enter.
17379
17380 2017-01-10  Tom Tromey  <tom@tromey.com>
17381
17382         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17383
17384 2017-01-10  Tom Tromey  <tom@tromey.com>
17385
17386         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17387
17388 2017-01-10  Tom Tromey  <tom@tromey.com>
17389
17390         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17391         (python_on_inferior_call_pre, python_on_inferior_call_post)
17392         (python_on_memory_change, python_on_register_change)
17393         (python_inferior_exit, python_new_objfile, add_thread_object)
17394         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17395
17396 2017-01-10  Tom Tromey  <tom@tromey.com>
17397
17398         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17399         (bpfinishpy_handle_exit): Use gdbpy_enter.
17400
17401 2017-01-10  Tom Tromey  <tom@tromey.com>
17402
17403         * python/py-cmd.c (cmdpy_destroyer)
17404         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17405         gdbpy_enter.
17406
17407 2017-01-10  Tom Tromey  <tom@tromey.com>
17408
17409         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17410         gdbpy_enter.
17411         (gdbpy_breakpoint_has_cond): Likewise.
17412
17413 2017-01-10  Tom Tromey  <tom@tromey.com>
17414
17415         * python/python.c (gdbpy_enter): New constructor.
17416         (~gdbpy_enter): New destructor.
17417         (restore_python_env, ensure_python_env): Rewrite.
17418         * python/python-internal.h (gdbpy_enter): New class.
17419
17420 2017-01-10  Tom Tromey  <tom@tromey.com>
17421
17422         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17423
17424 2017-01-10  Tom Tromey  <tom@tromey.com>
17425
17426         * python/py-value.c (value_has_field, get_field_flag)
17427         (get_field_type, valpy_getitem, convert_value_from_python): Use
17428         gdbpy_ref.
17429
17430 2017-01-10  Tom Tromey  <tom@tromey.com>
17431
17432         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17433         gdbpy_ref.
17434
17435 2017-01-10  Tom Tromey  <tom@tromey.com>
17436
17437         * python/py-prettyprint.c (search_pp_list)
17438         (find_pretty_printer_from_objfiles)
17439         (find_pretty_printer_from_progspace)
17440         (find_pretty_printer_from_gdb, find_pretty_printer)
17441         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17442         gdbpy_ref.
17443
17444 2017-01-10  Tom Tromey  <tom@tromey.com>
17445
17446         * python/py-param.c (call_doc_function): Use gdbpy_ref.
17447
17448 2017-01-10  Tom Tromey  <tom@tromey.com>
17449
17450         * python/py-linetable.c (build_line_table_tuple_from_pcs)
17451         (ltpy_get_all_source_lines): Use gdbpy_ref.
17452
17453 2017-01-10  Tom Tromey  <tom@tromey.com>
17454
17455         * python/py-framefilter.c (extract_sym, extract_value)
17456         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17457         gdbpy_ref.
17458
17459 2017-01-10  Tom Tromey  <tom@tromey.com>
17460
17461         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17462
17463 2017-01-10  Tom Tromey  <tom@tromey.com>
17464
17465         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17466
17467 2017-01-10  Tom Tromey  <tom@tromey.com>
17468
17469         * python/py-function.c (convert_values_to_python, fnpy_init): Use
17470         gdbpy_ref.
17471
17472 2017-01-10  Tom Tromey  <tom@tromey.com>
17473
17474         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17475
17476 2017-01-10  Tom Tromey  <tom@tromey.com>
17477
17478         * python/py-type.c (convert_field, make_fielditem, typy_fields)
17479         (typy_range): Use gdbpy_ref.
17480
17481 2017-01-10  Tom Tromey  <tom@tromey.com>
17482
17483         * python/py-threadevent.c (create_thread_event_object): Use
17484         gdbpy_ref.
17485         * python/py-stopevent.c (create_stop_event_object): Simplify.
17486         (emit_stop_event): Use gdbpy_ref.
17487         * python/py-signalevent.c (create_signal_event_object): Use
17488         gdbpy_ref.
17489         * python/py-newobjfileevent.c (create_new_objfile_event_object)
17490         (emit_new_objfile_event, create_clear_objfiles_event_object)
17491         (emit_clear_objfiles_event): Use gdbpy_ref.
17492         * python/py-infevents.c (create_inferior_call_event_object)
17493         (create_register_changed_event_object)
17494         (create_memory_changed_event_object, emit_inferior_call_event)
17495         (emit_memory_changed_event, emit_register_changed_event): Use
17496         gdbpy_ref.
17497         * python/py-exitedevent.c (create_exited_event_object)
17498         (emit_exited_event): Use gdbpy_ref.
17499         * python/py-event.h (evpy_emit_event): Remove
17500         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17501         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17502         * python/py-continueevent.c (emit_continue_event): Use
17503         gdbpy_ref.
17504         * python/py-breakpoint.c (gdbpy_breakpoint_created)
17505         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17506         gdbpy_ref.
17507         * python/py-bpevent.c (create_breakpoint_event_object): Use
17508         gdbpy_ref.
17509
17510 2017-01-10  Tom Tromey  <tom@tromey.com>
17511
17512         * python/py-ref.h: New file.
17513
17514 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17515
17516         * cli-out.c (cli_ui_out::do_redirect): Change return type to
17517         void.
17518         * cli-out.h (cli_ui_out::do_redirect): Likewise.
17519         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17520         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17521         * ui-out.c (ui_out::redirect): Likewise.
17522         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17523         * cli/cli-logging.c (set_logging_redirect): Update call site of
17524         ui_out::redirect.
17525         (handle_redirections): Likewise.
17526         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17527         * top.c (execute_command_to_string): Likewise.
17528         * utils.c (do_ui_out_redirect_pop): Likewise.
17529
17530 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
17531
17532         * stack.c (_initialize_stack): Update "frame" command help message.
17533
17534 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
17535
17536         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17537
17538 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17539
17540         * x86-linux-nat.h: Include gdb_proc_service.h.
17541
17542 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17543
17544         * ser-base.h: Include serial.h.
17545
17546 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17547
17548         * ppc-linux-tdep.h: Include ppc-tdep.h.
17549
17550 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17551
17552         * nat/amd64-linux-siginfo.h: Include signal.h.
17553
17554 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17555
17556         * nat/aarch64-linux-hw-point.h: Include break-common.h.
17557
17558 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17559
17560         * mi/mi-parse.h: Include mi-cmds.h.
17561
17562 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17563
17564         * inf-loop.c: Don't include "target.h".
17565         * inf-loop.h: Include it here.
17566
17567 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17568
17569         * dfp.h: Include "dboulest.h" and "expression.h".
17570
17571 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17572
17573         * ax-gdb.h: Include "ax.h".
17574
17575 2017-01-06  Yao Qi  <yao.qi@linaro.org>
17576
17577         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17578         with nat/gdb_ptrace.h.
17579
17580 2017-01-05  Yao Qi  <yao.qi@linaro.org>
17581
17582         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17583         new line.
17584         (mips64_fbsd_sigframe_init): Likewise.
17585
17586 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17587
17588         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17589         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17590
17591 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17592
17593         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17594         * NEWS: Mention new FreeBSD/mips native configuration.
17595         * config/mips/fbsd.mh: New file.
17596         * configure.host: Add mips*-*-freebsd*.
17597         * mips-fbsd-nat.c: New file.
17598
17599 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
17600
17601         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17602         (ALLDEPFILES): Add mips-fbsd-tdep.c.
17603         * NEWS: Mention new FreeBSD/mips target.
17604         * configure.tgt: Add mips*-*-freebsd*.
17605         * mips-fbsd-tdep.c: New file.
17606         * mips-fbsd-tdep.h: New file.
17607
17608 2017-01-04  Yao Qi  <yao.qi@linaro.org>
17609
17610         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17611         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17612
17613 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17614
17615         Update copyright year range in all GDB files.
17616
17617 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
17618
17619         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17620
17621 For older changes see ChangeLog-2016.
17622 \f
17623 Local Variables:
17624 mode: change-log
17625 left-margin: 8
17626 fill-column: 74
17627 version-control: never
17628 coding: utf-8
17629 End: